createResultSet($serach_hf, $databasename); if($serach_hf->getNumberRows()<=0) {Header("Location: $url/404.html");exit;} } if($REQUEST_URI=="/folio.html" or $REQUEST_URI=="/hfolio.html") { //проверяем на GET if($_GET["ftype"]!="web-design" and $_GET["ftype"]!="firm-style" or $_GET["ftype"]=="" or !isSet($_GET["ftype"])){Header("Location: /404.html");exit;} if($_GET["ftype"]!="web-design" and $_GET["ftype"]!="firm-style"){Header("Location: /404.html");exit;} } if($REQUEST_URI=="/hfolio.html") { if(!isSet($_GET["offset"])) {Header("Location: /404.html");exit;} else { if(!eregi("^([[:digit:]]+)$",$_GET["offset"])) {Header("Location: 404.html");exit;} } //соединяемся с базой данных $serach_hf ="SELECT hnews, title, message, type, data FROM artiko_news WHERE (hnews='$_GET[hf]')"; $serach_hf=$con->createResultSet($serach_hf, $databasename); if($serach_hf->getNumberRows()<=0) {Header("Location: $url/404.html");exit;} $hf = $serach_hf->getRow(); } $level=-1;$parent=0; foreach ($BasReq as $key=>$val) { if($val!="")@$level++; if(eregi("([a-z0-9]+)\.html", $val)){$val=str_replace(".html","",$val);} //ишем по базе данных if($val!="") { $searchpage ="SELECT id, ideko, parent, level, indexpage, namepage, info, title, keywords, description, dsgn, bold_razdel, activ FROM artiko_page WHERE (parent='$parent' AND indexpage='$val' AND level='$level')"; $searchpage=$con->createResultSet($searchpage, $databasename); if($searchpage->getNumberRows()<=0) {Header("Location: $url/404.html");exit;} $row_page = $searchpage->getRow(); //ПРОВЕРЯЕМ ЕСЛИ ТАКАКЯ ТО СТРАНИЦА АВТОРИЗИРОВАН ЛИ ПОЛЬЗОВАТЕЛЬ //если это не ideko!=1 то записывам parent if($row_page["ideko"]!=1)$parent=$row_page["id"]; if($row_page["ideko"]==1) { //подключаем классы parse.cls PageNavigator.cls example.php ThumbnailImage.cls include_once "$DOCUMENT_ROOT/artpanel/.class/parse.cls"; include_once "$DOCUMENT_ROOT/artpanel/.class/PageNavigator.cls"; include_once "$DOCUMENT_ROOT/artpanel/.class/ThumbnailImage.cls"; //проверяем если $row_page[dsgn]=="" to подсоединяем базу данных с диазйном if($row_page["dsgn"]=="") { $locdsgn ="SELECT dsgn FROM artiko_dsgn"; $locdsgn=$con->createResultSet($locdsgn, $databasename); $row_dsgn = $locdsgn->getRow(); $dsgn=$row_dsgn["dsgn"]; } else {$dsgn=$row_page["dsgn"];} //подключаем классы parse.cls PageNavigator.cls example.php ThumbnailImage.cls include_once "$DOCUMENT_ROOT/artpanel/.class/example.php"; include_once "$DOCUMENT_ROOT/_engine/setup.phl"; //парсируем страницу $parse->get_tpl($dsgn); //Файл который мы будем парсить //$row_page["info"]=str_replace("\r\n","
",$row_page["info"]); $row_page["info"]=$bbcode->parse_bbcode($row_page["info"]); if($_SESSION['st']==true){$_POST=Unserialize($_SESSION['st']);} include_once "$DOCUMENT_ROOT/_engine/moduls.phl"; include_once "$DOCUMENT_ROOT/_engine/vars.phl"; echo iconv("WINDOWS-1251", "UTF-8", $parse->tpl_parse());//if($REQUEST_URI=="/user_prof.html")echo $parse->tpl_parse(); $parse->tpl_parse(); //Парсим $string=$parse->template; } //echo iconv("KOI8-U", "UTF-8", "Пора переходить на юникод."); echo iconv("WINDOWS-1251", "UTF-8", $string); //echo $string; } } //var_dump($_SESSION); if($REQUEST_URI="/kontakt.html" or $REQUEST_URI=="/reg.html" or $REQUEST_URI=="/auth.html"){ @session_unregister('error'); @session_unregister('err'); @session_unregister('st');} exit; ?>