Jump to content

Help: Changing a link from .php to .html


kylix

Recommended Posts

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.

The pages are below

 

Any help is appreciated.

 

Thanks!

 

index.php

 

 

Quote:

<?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" />[/url]

</div>

 

<div class="homeform">

<a href="info.php"><img src="images/x.gif" width="74" height="36" alt="Request Info" />[/url]

</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" />[/url]</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" />[/url]

</div>

 

<div class="pageform">

<a href="info.php"><img src="images/x.gif" width="74" height="36" alt="Request Info" />[/url]

</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[/url]";

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\" />[/url]\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" />

 

<p>© <?php echo date('Y'); ?> Camp Huntington

 

All Rights Reserved</p>

 

<p>

vaild CSS

valid XHTML

</p>

 

</div>

 

</body>

</html> 

Link to comment
Share on other sites

Isn't this the section that deals with making a page .html or .php?

 

<?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;
}
?>

Link to comment
Share on other sites

In conig.inc there are several pages with

'page_type' => $PT_DYNAMIC,

 

in the shell page

$url = "{$local_page_name}.php";

 

I think this might be the pages you are wanting to change to .html since for PT_STATIC and the default have

$url = "{$local_page_name}.html";

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.