Hallo,
I am trying to understand this code which doesn't make sense to me.
company.php
<?php
require('wds.php');
include(INC_DIR . 'header.inc.php');
?>
<div class="container">
<div id="header">
<h1 id="book-of-love"><img src="<?php echo SITEURL; ?>images/infracom.png" /> <!--Indonusa Group<span> Portal</span> --></h1>
</div>
<div class="infra-article">
<?php
if ( isset($_GET['pageSlug']) && !empty($_GET['pageSlug']) ) {
$q = new wdsQuery("SELECT pages_ID, pages_title, pages_description, pages_content, pages_slug FROM " . $dbtable['pages'] . " WHERE pages_slug = '" . slugs($_GET['pageSlug']) . "'");
if ( $q->numRows() == 1 ) {
$r = $q->fetchArray();
?>
<h1 class="heading"><?php echo $r['pages_title']; ?></h1>
<?php echo $r['pages_content']; ?>
<?php
}
else {
generate404();
}
?>
<?php
}
else {
generate404();
}
?>
</div>
<?php include(INC_DIR . 'footer.inc.php'); ?>
</div>
</body>
</html>
header.inc.php
<?php
if( !defined('WDS_ROOT') )
exit;
$meta = array();
$meta['title'] = 'Error 404 Object Not Found';
$meta['keywords'] = $config['sitekeywords'];
$meta['description'] = $config['sitename'] . ' :: The page you looking for is not found at this site.';
$meta['robots'] = 'noindex,nofollow';
switch(getCurrentFilename()) :
case "index.php" :
$meta['title'] = $config['sitename'] . ' :: ' . $config['sitedescription'];
$meta['keywords'] = $config['sitename'] . ', ' . $config['sitekeywords'];
$meta['description'] = $config['sitedescription'];
$meta['robots'] = 'index,follow';
break;
case "company.php" :
if ( isset($_GET['pageSlug']) && !empty($_GET['pageSlug']) ) {
$metaCheck = new wdsQuery("SELECT pages_ID, pages_title, pages_description, pages_content, pages_slug FROM " . $dbtable['pages'] . " WHERE pages_slug = '" . slugs($_GET['pageSlug']) . "'");
if ( $metaCheck->numRows() == '1' ) {
$metaResult = $metaCheck->fetchArray();
$meta['title'] = $metaResult['pages_title'];
$meta['keywords'] = $metaResult['pages_title'] . ',' . $config['sitekeywords'];
$meta['description'] = $config['sitename'] . ' :: ' . $metaResult['pages_title'] . ' | ' . $metaResult['pages_description'];
$meta['robots'] = 'index,follow';
}
}
break;
case "contact.php" :
$meta['title'] = "Contact";
$meta['keywords'] = 'contact,' . $config['sitekeywords'];
$meta['description'] = $config['sitename'] . ' :: Contact Us';
$meta['robots'] = 'noindex,nofollow';
break;
default:
$meta['title'] = 'Error 404 Object Not Found';
$meta['keywords'] = $config['sitekeywords'];
$meta['description'] = $config['sitename'] . ' :: The page you looking for is not found at this site.';
$meta['robots'] = 'noindex,nofollow';
endswitch;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title><?php echo netralMetaDesc($meta['title'] . " :: " . $config['sitename']); ?></title>
<meta name="description" content="<?php echo netralMetaDesc($meta['description']); ?>" />
<meta name="keywords" content="<?php echo strtolower(netralMetaDesc($meta['keywords'])); ?>" />
<meta name="robots" content="<?php echo $meta['robots']; ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo SITEURL; ?>css/style.css" />
<link rel="shortcut icon" href="<?php echo SITEURL; ?>favicon.png" />
<link href='https://fonts.googleapis.com/css?family=PT+Sans+Narrow&v1' rel='stylesheet' type='text/css' />
<link href='https://fonts.googleapis.com/css?family=Wire+One&v1' rel='stylesheet' type='text/css' />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>
<script type="text/javascript" src="<?php echo SITEURL; ?>js/jquery.easing-1.3.min.js"></script>
<script type="text/javascript" src="<?php echo SITEURL; ?>js/reality.js"></script>
<script type="text/javascript">
$(function() {
$('#love-story').theHappyCouple({
jantan : {
'storyTitle' : {speed : 400, easing : 'easeOutBack', delay : 200, dir : -1},
'storyDescription' : {speed : 400, easing : 'easeOutBack', delay : 400, dir : -1},
'storyPicture' : {speed : 400, easing : 'easeOutBack', delay : 0, dir : -1}
},
betina : {
'storyTitle' : {speed : 200, easing : 'easeInExpo', delay : 150, dir : 1},
'storyDescription' : {speed : 200, easing : 'easeInExpo', delay : 300, dir : 1},
'storyPicture' : {speed : 200, easing : 'easeInExpo', delay : 0, dir : 1}
}
});
});
</script>
</head>
<body>
<div id="infra-header">
<ul>
<li><a href="<?php echo SITEURL; ?>">Front Page</a></li>
<li><a href="<?php echo SITEURL . 'company/history.html'; ?>">Company History</a></li>
<li><a href="<?php echo SITEURL . 'company/vision-mission.html'; ?>">Vision Mission</a></li>
<li><a href="<?php echo SITEURL . 'contact.html'; ?>">Contact Us</a></li>
</ul>
</div>
In the website in my localhost I can see history.html & vision-mission.html while on the other hand I cannot find company/history.html & company/vision-mission.html file in my folder. If the file does not exist, then why the file works well in my localhost as if that the file exist?