Query("select * from pages where active_page='1'"); $nump = $q->Num($sqlp); if($nump == 0) { $pa = "
".$lang->get_lang(nopages)."
"; } else { $pa = ''; while ($rowp = $q->FetchO($sqlp)) { $time_page = $rowp->time_page; $time_page = date("Y/m/d",$time_page); $content_page = strip_tags($rowp->text_page); $pa .= $template->get_template('ViewPages'); $pa .= $template->rep_template('{id_page}', $rowp->id_page); $pa .= $template->rep_template('{name_page}', $rowp->title_page); $pa .= $template->rep_template('{zwar}', $rowp->zwar_page); $pa .= $template->rep_template('{date}', get_time($rowp->time_page)); $pa .= $template->rep_template('{content}', substr($content_page,0,500)); $pa .= $template->display2(); }// close wile }#close lese if(ib_group('showOnline_g') == 1){ $onlines = ib_des_blocks2($lang->get_lang(onlines), $online->get_online_were_page()); } if(!ib_setting('active_page') == 1){ include 'inc/error_page.html'; exit; } global $header; global $footer; $pa2 = ib_des_blocks2($name_site,$pa); $content = $template->get_template('PagePages'); $content .= $template->rep_template('{header}', $header); $content .= $template->rep_template('{footer}', $footer); $content .= $template->rep_template('{block_right}', ib_blocks(1)); $content .= $template->rep_template('{block_left}', ib_blocks(3)); $content .= $template->rep_template('{content}', $pa2); $content .= $template->rep_template('{online}', $onlines); $content .= $template->rep_template('{share}', $share); $content .= $template->display(); } public function get_page($id_page) { $q = new ib_query(); $template = new ib_template(); global $lang; $pa = ''; if($id_page) { $sqlpp = $q->Query("select * from pages where id_page='$id_page' and active_page=1"); $numpp = $q->Num($sqlpp); if($numpp == 0) { $pa .= "
".$lang->get_lang(errorpage)."
"; include 'inc/error_page.html'; exit; }else { $rowpp = $q->FetchO($sqlpp); $time_page = $rowpp->time_page; $time_page = date("d/m/Y",$time_page); $cookie_zwar_pages = $_COOKIE['zwar_pages']; if($cookie_zwar_pages and $cookie_zwar_pages == $id_page) { } else { $upsate = $q->Query("update pages set zwar_page=zwar_page+1 where id_page='$id_page'"); setcookie("zwar_pages",$id_page,time()+5000); } $pa .= $template->get_template('ShowPage'); $pa .= $template->rep_template('{text_page}', stripslashes($rowpp->text_page)); $pa .= $template->rep_template('{name_page}', $rowpp->title_page); $pa .= $template->rep_template('{time_page}',get_time($rowpp->time_page)); $pa .= $template->rep_template('{zwar_page}', $rowpp->zwar_page); $pa .= $template->display2(); } }else { $pa .= "
".$lang->get_lang(errorpage)."
"; } global $online; if(ib_group('showOnline_g') == 1){ $onlines = ib_des_blocks2($lang->get_lang(onlines), $online->get_online_were_page()); } if(!ib_setting('active_page') == 1){ include 'inc/error_page.html'; exit; } global $header; global $footer; $share = $template->get_template(sharepage); $share = $template->rep_template('{id_page}',$rowpp->id_page); $share = $template->rep_template('{title_page}',$rowpp->title_page); $share = $template->display2(); $share2 = ib_des_blocks2($lang->get_lang(sharepage2),$share); $pa2 = ib_des_blocks2($rowpp->title_page,$pa); $content = $template->get_template('PagePages'); $content .= $template->rep_template('{header}', $header); $content .= $template->rep_template('{footer}', $footer); $content .= $template->rep_template('{block_right}', ib_blocks(1)); $content .= $template->rep_template('{block_left}', ib_blocks(3)); $content .= $template->rep_template('{content}', $pa2); $content .= $template->rep_template('{online}', $onlines); $pa .= $template->rep_template('{share}', $share2); $content .= $template->display(); } } $pages = new ib_pages(); $g_id = intval($_GET['id_page']); if($g_id) { $pages->get_page($g_id); } else { $pages->show_pages(); } #include footer site require_once 'inc/footer.php'; ?>