query($q);
$dbtemp->next_record();
// get page data:
$db = new ps_DB;
$q = "SELECT * ";
$q .= "FROM cms_pages ";
$q .= "WHERE name = '".$page."' ";
$q .= "And menu_active = 1 ";
$q .= "LIMIT 1";
$db->query($q);
// redirect if page not found:
if(!$db->next_record()){
header("location:index.html");
}
$page_title = $db->f("page_title");
$page_description = $db->f("content1");
$page_keywords = $db->f("content2");
$title = $db->f("menu_title"); // for h1 page title.
$subtitle = $db->f("page_subtitle");
// check for article detail page
if($_GET["article"]){
$db2 = new ps_DB;
$q = "SELECT * ";
$q .= "FROM cms_articles ";
$q .= "WHERE link_url = '". $_GET["article"] ."' ";
$q .= "AND active = '1' ";
$q .= "ORDER BY ordernum";
$db2->query($q);
$db2->next_record();
$page_title = $db2->f("content0");
$page_description = $db2->f("content1");
$page_keywords = $db2->f("content2");
}
// include header:
$skin = $dbtemp->f("name");
include("skins/".$skin."/templates/inc_header.php");
?>
num_rows()) { ?>
p("content3"); ?>
p("content5"); ?>
Article not found
query($q);
?>
next_record()) { ?>
f("id_articlescat") ."' ";
$q .= "AND active = '1' ";
$q .= "ORDER BY ordernum";
$db2->query($q);?>
num_rows()) { ?>
p("content0") ?>