get_page_set($_GET['p_id'],"print_version"),T_BYVAR); else if( !empty($_GET['a_id']) ) $tpl = new TemplatePower($T->get_article_set($_GET['a_id'],"print_version"),T_BYVAR); else if( !empty($_GET['i_id']) ) $tpl = new TemplatePower($T->get_item_set($_GET['i_id'],"print_version"),T_BYVAR); $tpl->prepare(); $tpl->assign("Site_Name",$S->val['site_name']); if(!empty($_GET['p_id'])) { $cond['p_id'] = $_GET['p_id']; $row = $DB->db_select("ps_pages",$cond); // Check if Page is on if( $row['p_status'] == false && empty($_SESSION['u_id'])) $FV->error("Print Page '" . $_GET['p_id'] ."' is off and cannot be printed",$C); // Check if page is secure if ( $row['p_secure'] && empty($_SESSION['wu_id']) && empty($_SESSION['u_id']) ) $FV->error("Print Page '" . $_GET['p_id'] ."' is secure and cannot be printed, please login to print the page",$C); $tpl->assign("TITLE", stripslashes($row['p_title'])); $tpl->assign("CONTENT", stripslashes($row['p_content'])); } else if (!empty($_GET['a_id'])) { $cond['a_id'] = $_GET['a_id']; $row = $DB->db_select("ps_articles",$cond); // Check if article is on if( $row['a_status'] == false && empty($_SESSION['u_id'])) $FV->error("Article '" . $_GET['a_id'] ."' is off and cannot be viewed",$C); // Check if article Category is On if( $row['ac_status'] === 0 && empty($_SESSION['u_id']) && empty($_SESSION['wu_id']) ) $FV->error("Article '" . $_GET['a_id'] ."' category is off and cannot be viewed",$C); // Check if article is secure if( $row['ac_secure'] == true && empty($_SESSION['u_id']) && empty($_SESSION['wu_id']) ) $FV->error("Article '" . $_GET['a_id'] ."' is secure and cannot be viewed, please login to view the article",$C); $tpl->assign("TITLE", stripslashes($row['a_title'])); $tpl->assign("CONTENT", stripslashes($row['a_content'])); } if(!empty($_GET['i_id'])) { $cond['i_id'] = $_GET['i_id']; $row = $DB->db_select("ps_items",$cond); // Check if item is on if( $row['i_status'] == false && empty($_SESSION['u_id'])) $FV->error("Item '" . $_GET['i_id'] ."' is off and cannot be viewed",$C); // Check if item Category is On if( $row['ic_status'] === 0 && empty($_SESSION['u_id']) && empty($_SESSION['wu_id']) ) $FV->error("Item '" . $_GET['i_id'] ."' category is off and cannot be viewed",$C); // Check if article is secure if( $row['ic_secure'] == true && empty($_SESSION['u_id']) && empty($_SESSION['wu_id']) ) $FV->error("Item '" . $_GET['i_id'] ."' is secure and cannot be viewed, please login to view the item",$C); $tpl->assign("TITLE", stripslashes($row['i_title'])); $tpl->assign("CONTENT", stripslashes($row['i_content'])); } $end = benchit(); $tpl->assignGlobal("C_Time", round( $end - $start, 3 )); $tpl->assignGlobal("S_Time", date("H:i:s")); $tpl->assignGlobal("Q_Count",$DB->num_queries['total']); $tpl->printToScreen(); ?>