kylix Posted February 18, 2007 Share Posted February 18, 2007 I recently was given a website I had to update. I'm new to php and learning as I go along, but already I've ran into a php problem. I want to change one of the link extensions from .php to .html, but I can't find it. I went through the php code and try to find something which would let me change the extension. I found the main text, but I couldn't find a way to change the links. Here is a link to the page www.camphuntington.com, so you can get a clearier picture. Any help is appreciated. Thanks! Link to comment https://forums.phpfreaks.com/topic/39059-updating-error/ Share on other sites More sharing options...
skali Posted February 18, 2007 Share Posted February 18, 2007 Dude, Post some code snippet of what you are talking about. List some code of where you have found the main text of the links and where you think that the links are created. Link to comment https://forums.phpfreaks.com/topic/39059-updating-error/#findComment-188162 Share on other sites More sharing options...
kylix Posted February 18, 2007 Author Share Posted February 18, 2007 My bad...here are the php pages. index.php <?php ob_start(); //include('includes/lib/dbconnect.inc'); include('includes/lib/config.inc'); include('includes/lib/functions.inc'); //include('includes/lib/meta_tags.inc'); $from_shell=true; $page_name = 'home'; $page_type = 1; $meta_title = 'Camp Huntington High Falls, NY'; include("includes/presentation/shell.php"); //mysql_close($conn); ob_end_flush(); ?> config.inc <?php $site_name = 'Camp Huntington'; $PT_STATIC = 1; $PT_DYNAMIC = 2; $pages[] = array('page_name' => 'ourprogram', 'page_label' => 'Our Program', 'page_type' => $PT_STATIC, 'page_level' => 1, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'activities', 'page_label' => 'Activities', 'page_type' => $PT_STATIC, 'page_level' => 1, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'healthservices', 'page_label' => 'Health Services', 'page_type' => $PT_STATIC, 'page_level' => 1, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'settingandfacilities', 'page_label' => 'Setting and Facilities', 'page_type' => $PT_STATIC, 'page_level' => 1, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'sessions', 'page_label' => 'Sessions', 'page_type' => $PT_STATIC, 'page_level' => 1, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'directors', 'page_label' => 'Directors', 'page_type' => $PT_STATIC, 'page_level' => 1, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'joinourstaff', 'page_label' => 'Join Our Staff', 'page_type' => $PT_STATIC, 'page_level' => 1, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'forms', 'page_label' => 'Forms', 'page_type' => $PT_STATIC, 'page_level' => 1, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'photos', 'page_label' => 'Photos', 'page_type' => $PT_DYNAMIC, 'page_level' => 1, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'contactus', 'page_label' => 'Contact Us', 'page_type' => $PT_DYNAMIC, 'page_level' => 1, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'links', 'page_label' => 'Links', 'page_type' => $PT_STATIC, 'page_level' => 1, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); ///// Level 2 pages ///// $pages[] = array('page_name' => 'staff', 'page_label' => 'Staff Application', 'page_type' => $PT_DYNAMIC, 'page_level' => 2, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'add', 'page_label' => 'ADD and ADHD', 'page_type' => $PT_STATIC, 'page_level' => 2, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'dd', 'page_label' => 'Developmentally Disabled', 'page_type' => $PT_STATIC, 'page_level' => 2, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'pdd', 'page_label' => 'Autism Aspergers and PDD', 'page_type' => $PT_STATIC, 'page_level' => 2, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'dailyschedule', 'page_label' => 'Daily Schedule', 'page_type' => $PT_STATIC, 'page_level' => 2, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'food', 'page_label' => 'Food and Menu', 'page_type' => $PT_STATIC, 'page_level' => 2, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'info', 'page_label' => 'Request Info', 'page_type' => $PT_DYNAMIC, 'page_level' => 2, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'enrollment', 'page_label' => 'Camper Enrollment', 'page_type' => $PT_DYNAMIC, 'page_level' => 2, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'registration', 'page_label' => 'Camper Registration', 'page_type' => $PT_DYNAMIC, 'page_level' => 2, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'references', 'page_label' => 'Staff References', 'page_type' => $PT_DYNAMIC, 'page_level' => 2, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); $pages[] = array('page_name' => 'info_staff', 'page_label' => 'Request Staff Application', 'page_type' => $PT_DYNAMIC, 'page_level' => 2, 'meta_title' => 'Camp Huntington', 'meta_description' => 'INSERT_FROM_PAGE_CONTENT', 'meta_keywords' => 'camp huntington'); ?> and the shell page <?php if ($page_name=='home') { ?> <div class="topmost"> <img src="images/homepage_top_temp2.gif" width="769" height="214" alt="Camp Huntington" /> </div> <div class="sidenavhome"> <img src="images/homeleftbar.gif" alt="Camp Huntington" /> </div> <div class="buttonhome"> <a href="/"><img src="images/x.gif" width="60" height="30" alt="Home" /></a> </div> <div class="homeform"> <a href="info.php"><img src="images/x.gif" width="74" height="36" alt="Request Info" /></a> </div> <?php } else { ?> <div class="topmost"> <img src="images/pagehead_last.gif" width="765" height="166" alt="Camp Huntington" /> </div> <div class="header"> <img src="images/headers/<?=$page_name?>_lg.gif" alt="<?=$page_label?>" /> </div> <div class="signhome"><a href="/"><img src="images/x.gif" alt="Camp Huntington" width="220" height="60" /></a></div> <div class="sidenav"> <img src="images/leftbar_last.gif" width="180" height="300" alt="Camp Huntington" /> </div> <div class="buttonpage"> <a href="/"><img src="images/x.gif" width="60" height="30" alt="Home" /></a> </div> <div class="pageform"> <a href="info.php"><img src="images/x.gif" width="74" height="36" alt="Request Info" /></a> </div> <?php } ?> <div id="nav<?php if ($page_name=='home') echo 'home'; ?>"> <?php foreach ($pages as $local_page) { $local_page_name = $local_page['page_name']; $local_page_label = $local_page['page_label']; $local_page_type = $local_page['page_type']; $local_page_level = $local_page['page_level']; if ($local_page_level==1) { switch ($local_page_type) { case $PT_STATIC: $url = "{$local_page_name}.html"; break; case $PT_DYNAMIC: $url = "{$local_page_name}.php"; break; default: $url = "{$local_page_name}.html"; break; } //echo "<a href=\"$url\">$local_page_label</a>"; echo "\t\t<a href=\"$url\" onmouseover=\"flip('$local_page_name','on');\" onmouseout=\"flip('$local_page_name');\"><img id=\"$local_page_name\" src=\"images/nav/{$local_page_name}_n.gif\" alt=\"$local_page_label\" /></a>\n"; } } ?> </div> <div class="main<?php if ($page_name=='home') echo 'home'; ?>"> <div id="content"> <!--h1><?=$page_label?></h1--> <?php switch ($page_type) { case $PT_STATIC: include($inc_path."content/content_{$page_name}.inc"); break; case $PT_DYNAMIC: include($inc_path."presentation/page_{$page_name}.inc"); break; default: include($inc_path."content/content_{$page_name}.inc"); break; } ?> </div> </div> <div id="footer"> <img src="images/aca.3.gif" width="141" height="85" alt="American Camp Association Accredited" /><br /> <p>© <?php echo date('Y'); ?> Camp Huntington<br /> All Rights Reserved</p> <p> <a href="http://jigsaw.w3.org/css-validator/check/referer">vaild CSS</a> <a href="http://validator.w3.org/check?uri=referer">valid XHTML</a> </p> </div> </body> </html> Link to comment https://forums.phpfreaks.com/topic/39059-updating-error/#findComment-188213 Share on other sites More sharing options...
kylix Posted February 18, 2007 Author Share Posted February 18, 2007 I'm trying to change the photo page from php to a html page Link to comment https://forums.phpfreaks.com/topic/39059-updating-error/#findComment-188215 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.