"; if($c['board_works']=="only_admin"){ if(@$_SESSION['login']&& @$_SESSION['password']){ $admins=mysql_query("SELECT * FROM jb_admin");cq(); $adminsdata=mysql_fetch_assoc($admins); if($_SESSION['login']!=$adminsdata['login'] || md5($_SESSION['password'])!=$adminsdata['password']) die("
".$lang[1118]."
"); }else die("
".$lang[1118]."
"); } if(ctype_digit(@$_GET['id_cat']) && ctype_digit(@$_GET['id_mess']) && !@$_GET['op']){ $name_cat=(defined('JBLANG') && constant('JBLANG')=='en')?'en_name_cat':'name_cat'; $query_mess=mysql_query("SELECT jb_board.id AS board_id, UNIX_TIMESTAMP(jb_board.date_add) as unix_time, DATE_FORMAT(jb_board.date_add,'%d.%m.%Y') as dat, jb_board.*, jb_board_cat.id, jb_board_cat.root_category, jb_board_cat.".$name_cat.", jb_city.city_name, jb_city.en_city_name FROM jb_board LEFT JOIN jb_board_cat ON jb_board.id_category=jb_board_cat.id LEFT JOIN jb_city ON jb_board.city_id=jb_city.id WHERE jb_board.id=".$_GET['id_mess']." AND jb_board.old_mess='old' LIMIT 1"); cq(); if(mysql_num_rows($query_mess)){ $ads=mysql_fetch_assoc($query_mess); if ($ads['city'] == 'Повсеместно') $ads['city'] = "".$lang[1159].""; define("USTITLE",$ads['title']." - ".$ads['city']); define("USKEYWORDS",$ads['title'].", ".$ads['city']); define("USDESCRIPTION",utf8_substr($ads['text'],0,120)); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($ads['root_category'] != 0){ $navparent=$ads['root_category']; while($navparent != 0){ $q_nav=mysql_query("SELECT id,root_category,".$name_cat." FROM jb_board_cat WHERE id='".$navparent."'");cq(); if(@mysql_num_rows($q_nav)){ $cat_nav=mysql_fetch_assoc($q_nav); $navparent=$cat_nav['root_category']; $links[]="".$cat_nav[$name_cat]." → "; } } echo "
"; if(is_array(@$links)) echo implode('',array_reverse($links)); echo "".$ads[$name_cat]."

"; } $page_uri="mess_".$_GET['id_mess'].JBLANG; if($JBSCACHE=="1"){ $flnm=$cdir.$page_uri; ob_start(); if(!$printmess=readData($flnm,$JBSCACHE_expire)){ require_once("inc/message.inc.php"); $printmess=ob_get_contents(); ob_clean(); writeData($flnm,$printmess); }echo $printmess; } else require_once("inc/message.inc.php"); } else {header('HTTP/1.0 404 Not Found');header("location: ".$h."error.php");die();} } elseif(ctype_digit(@$_GET['id_cat']) && !@$_GET['id_mess'] && !@$_GET['op']){ $name_cat=(defined('JBLANG') && constant('JBLANG')=='en')?'en_name_cat':'name_cat'; $querycattitle=mysql_query("SELECT id, root_category, child_category, type_ads, ".$name_cat.", title_cat, description FROM jb_board_cat WHERE id='".$_GET['id_cat']."'"); cq(); if(@mysql_num_rows($querycattitle)){ $cattitle=mysql_fetch_assoc($querycattitle); if(defined('USER_CITY_TITLE')){ if ($cattitle['title_cat'] == "") { define("USTITLE", $cattitle[$name_cat].", ".USER_CITY_TITLE); } else{ define("USTITLE", $cattitle['title_cat'].", ".USER_CITY_TITLE); } define("USKEYWORDS",$cattitle['description']); define("USDESCRIPTION",USER_CITY_TITLE.", ".$cattitle['description']); }else{ if ($cattitle['title_cat'] == "") { define("USTITLE", $cattitle[$name_cat]); } else{ define("USTITLE", $cattitle['title_cat']); } define("USKEYWORDS",$cattitle['description']); define("USDESCRIPTION", $cattitle['description']); } require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($cattitle['root_category'] != 0){ $navparent=$cattitle['root_category']; while($navparent != 0){ $q_nav=mysql_query("SELECT id,root_category,".$name_cat." FROM jb_board_cat WHERE id='".$navparent."'");cq(); if(@mysql_num_rows($q_nav)){ $cat_nav=mysql_fetch_assoc($q_nav); $navparent=$cat_nav['root_category']; $links[]="".$cat_nav[$name_cat]." → "; } } echo "
"; if(is_array(@$links)) echo implode('',array_reverse($links)); echo "".$cattitle[$name_cat]."

"; } if($cattitle['child_category']==1){ if(defined('JBCITY')) $page_uri="c".$_GET['id_cat']."_".JBLANG.JBCITY; else $page_uri="c".$_GET['id_cat']."_".JBLANG; if (($_GET['id_cat']) && ($cattitle['type_ads'] == 'standart')){ require_once("inc/list_subcat.inc.php"); } else {require_once("inc/list_subcat_action.inc.php"); } }else{ if(ctype_digit(@$_GET['page']) && @$_GET['page']>0) $page=$_GET['page'];else $page=1; if($page<=$limit_pages_in_cache) $start_filename="-p".$page;else $start_filename=""; if(defined('JBCITY')) $page_uri="c".$_GET['id_cat'].$start_filename."_".JBLANG.JBCITY; else $page_uri="c".$_GET['id_cat'].$start_filename."_".JBLANG; if($JBSCACHE=="1" && $page <= $limit_pages_in_cache && !@$_GET['price']){ $flnm=$cdir.$page_uri; ob_start(); if(!$cat=readData($flnm,$JBSCACHE_expire)){ if (($_GET['id_cat']) && ($cattitle['type_ads'] == 'standart')) { require_once("inc/list_ads.inc.php"); } else { require_once("inc/list_ads_action.inc.php"); } $cat=ob_get_contents(); ob_clean(); writeData($flnm,$cat); } echo $cat; } elseif (($_GET['id_cat']) && ($cattitle['type_ads'] == 'standart')) { require_once("inc/list_ads.inc.php"); } else { require_once("inc/list_ads_action.inc.php"); } } } else {header('HTTP/1.0 404 Not Found');header("location: ".$h."error.php");die();} } elseif(@$_GET['op']=="category"){ define("USTITLE",$lang[15003]); define("USDESCRIPTION",$lang[15004]); define("USKEYWORDS",$lang[15005]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if(defined('JBCITY'))$page_uri="category".JBLANG.JBCITY; else $page_uri="category".JBLANG; if($JBSCACHE=="1"){ $flnm=$cdir.$page_uri; ob_start(); if(!$cat_index=readData($flnm,$JBSCACHE_expire)){ require_once("inc/category.inc.php"); $cat_index=ob_get_contents(); ob_clean(); writeData($flnm,$cat_index); }echo $cat_index; } else require_once("inc/category.inc.php"); } elseif(!@$_GET['id_cat'] && !@$_GET['id_mess'] && !@$_GET['op']){ require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if(defined('JBCITY'))$page_uri="index_".JBLANG.JBCITY; else $page_uri="index_".JBLANG; if($JBSCACHE=="1"){ $flnm=$cdir.$page_uri; ob_start(); if(!$cat_index=readData($flnm,$JBSCACHE_expire)){ require_once("inc/cat_index.inc.php"); $cat_index=ob_get_contents(); ob_clean(); writeData($flnm,$cat_index); }echo $cat_index; } else require_once("inc/cat_index.inc.php"); } elseif(@$_GET['op']=="video_tube"){ $video_tube_title = "Видео объявления"; if(ctype_digit(@$_GET['page']) && @$_GET['page']>0) $page=$_GET['page'];else $page=1; if($page <= $limit_pages_in_cache) $start_filename="-p".$page; else $start_filename=""; if(defined('JBCITY')) $page_uri="video_tube".$start_filename."_".JBLANG.JBCITY; else $page_uri="video_tube".$start_filename."_".JBLANG; define("USTITLE", $video_tube_title." - ".$page." ".$lang[1006]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($JBSCACHE=="1" && $page <= $limit_pages_in_cache){ $flnm=$cdir.$page_uri; ob_start(); if(!$adv_index=readData($flnm,$JBSCACHE_expire)){ require_once("inc/video_tube.inc.php"); $adv_index=ob_get_contents(); ob_clean(); writeData($flnm,$adv_index); }echo $adv_index; } else require_once("inc/video_tube.inc.php"); } elseif(@$_GET['op']=="foto"){ $foto_title = "Фото объявления"; if(ctype_digit(@$_GET['page']) && @$_GET['page']>0) $page=$_GET['page'];else $page=1; if($page <= $limit_pages_in_cache) $start_filename="-p".$page; else $start_filename=""; if(defined('JBCITY')) $page_uri="foto".$start_filename."_".JBLANG.JBCITY; else $page_uri="foto".$start_filename."_".JBLANG; define("USTITLE", $foto_title." - ".$page." ".$lang[1006]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($JBSCACHE=="1" && $page <= $limit_pages_in_cache){ $flnm=$cdir.$page_uri; ob_start(); if(!$adv_index=readData($flnm,$JBSCACHE_expire)){ require_once("inc/foto.inc.php"); $adv_index=ob_get_contents(); ob_clean(); writeData($flnm,$adv_index); }echo $adv_index; } else require_once("inc/foto.inc.php"); } elseif(@$_GET['op']=="newlist"){ if(ctype_digit(@$_GET['page']) && @$_GET['page']>0) $page=$_GET['page'];else $page=1; if($page <= $limit_pages_in_cache) $start_filename="-p".$page; else $start_filename=""; if(defined('JBCITY')) $page_uri="newlist".$start_filename."_".JBLANG.JBCITY; else $page_uri="newlist".$start_filename."_".JBLANG; define("USTITLE", $lang[600].", ".$page." ".$lang[1006]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($JBSCACHE=="1" && $page <= $limit_pages_in_cache){ $flnm=$cdir.$page_uri; ob_start(); if(!$adv_index=readData($flnm,$JBSCACHE_expire)){ require_once("inc/last_add.inc.php"); $adv_index=ob_get_contents(); ob_clean(); writeData($flnm,$adv_index); }echo $adv_index; } else require_once("inc/last_add.inc.php"); } elseif(@$_GET['op']=="add"){ require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($c['add_new_ads']=="no") echo "

".$lang[1119]."

"; else{ if($c['add_new_only_user']=="yes"){ if(!defined('USER')){ setcookie('jbnocache','1',time()+60,"/"); header("location: ".$h."login.html"); } else { if(@$user_data['activ'] == "no") header("location: ".$h."login.html"); else { define("ADDNEW","reg_user"); require_once("inc/add_new.inc.php"); } } }else{ define("ADDNEW","no_reg"); require_once("inc/add_new.inc.php"); } } } elseif(@$_GET['op']=="add_action"){ require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($c['add_new_ads']=="no") echo "

".$lang[1119]."

"; else{ if($c['add_new_only_user']=="yes"){ if(!defined('USER')){ setcookie('jbnocache','1',time()+60,"/"); header("location: ".$h."login.html"); } else { if(@$user_data['activ'] == "no") header("location: ".$h."login.html"); else { define("ADDNEW","reg_user"); require_once("inc/add_new_action.inc.php"); } } }else{ define("ADDNEW","no_reg"); require_once("inc/add_new_action.inc.php"); } } } elseif(ctype_digit(@$_GET['id_cat']) && ctype_digit(@$_GET['id_mess']) && @$_GET['op']=="print"){ $name_cat=(defined('JBLANG') && constant('JBLANG')=='en')?'en_name_cat':'name_cat'; $query_mess=mysql_query("SELECT jb_board.id AS board_id, UNIX_TIMESTAMP(jb_board.date_add) as unix_time, DATE_FORMAT(jb_board.date_add,'%d.%m.%Y') as dat, jb_board.*, jb_board_cat.id, jb_board_cat.root_category, jb_board_cat.".$name_cat.", jb_city.city_name, jb_city.en_city_name FROM jb_board LEFT JOIN jb_board_cat ON jb_board.id_category=jb_board_cat.id LEFT JOIN jb_city ON jb_board.city_id=jb_city.id WHERE jb_board.id=".$_GET['id_mess']." AND jb_board.old_mess='old' LIMIT 1"); cq(); if(mysql_num_rows($query_mess)){ $ads=mysql_fetch_assoc($query_mess); define("USTITLE",$ads['title'].", ".$ads['city']); define("USKEYWORDS",$ads['title'].", ".$ads['city']); define("USDESCRIPTION",utf8_substr($ads['text'],0,120)); require_once("inc/print_message.inc.php"); $page_uri="printmess_".$_GET['id_mess'].JBLANG; } else {header('HTTP/1.0 404 Not Found');header("location: ".$h."error.php");die();} } elseif(@$_GET['op']=="account"){ define("USTITLE",$lang[841]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/login.inc.php"); } elseif(@$_GET['op']=="cpanel"){ define("USTITLE",$lang[841]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/user.inc.php"); } elseif(@$_GET['op']=="cpanel_action"){ define("USTITLE",$lang[841]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/user_action.inc.php"); } elseif(@$_GET['op']=="vip"){ $query_mess=mysql_query("SELECT jb_board.id AS board_id, UNIX_TIMESTAMP(jb_board.date_add) as unix_time, DATE_FORMAT(jb_board.date_add,'%d.%m.%Y') as dat, jb_board.*, jb_board_cat.id, jb_board_cat.root_category, jb_board_cat.name_cat, jb_city.city_name FROM jb_board LEFT JOIN jb_board_cat ON jb_board.id_category=jb_board_cat.id LEFT JOIN jb_city ON jb_board.city_id=jb_city.id WHERE jb_board.id=".$_GET['id_mess']." AND jb_board.old_mess='old' LIMIT 1"); cq(); if(mysql_num_rows($query_mess)){ $ads=mysql_fetch_assoc($query_mess); define("USTITLE",$ads['title'].", ".$ads['city']); define("USKEYWORDS",$ads['title'].", ".$ads['city']); define("USDESCRIPTION",utf8_substr($ads['text'],0,120)); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if(ctype_digit(@$_GET['id_mess']) && @$_GET['id_mess']>"0"){ if($c['money_service']=="yes" || $c['wm_money_service']=="yes") require_once("inc/vip_info.inc.php"); else echo "

".$lang[1120]."

"; } else echo "

".$lang[1032]."

"; } } elseif(@$_GET['op']=="note"){ define("USTITLE",$lang[501]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/note.inc.php"); } elseif(@$_GET['op']=="informers"){ define("USTITLE",$lang[1014]); $page_uri="informers"; require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/informers.inc.php"); } elseif(@$_GET['op']=="rss_export"){ define("USTITLE","RSS"); $page_uri="rss_export"; require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/rss.inc.php"); } elseif(@$_GET['op']=="cities"){ define("USTITLE","Выбор города на доске объявлений"); $page_uri="rss_export"; require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/cities.inc.php"); } elseif(@$_GET['op']=="search"){ define("USTITLE",$lang[156]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/search.inc.php"); } elseif(@$_GET['op']=="contacts"){ define("USTITLE",$lang[254]); $page_uri="contacts"; require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/contacts.inc.php"); } elseif(@$_GET['op']=="news"){ if(ctype_digit(@$_GET['id'])){ $query_news=mysql_query("SELECT DATE_FORMAT(jb_news.date,'%d.%m.%Y') as dat, jb_news.* FROM jb_news WHERE id='".$_GET['id']."'");cq(); $news_arr=mysql_fetch_assoc($query_news); define("USTITLE",$news_arr['title']); if(@$news_arr['keywords'])define("USKEYWORDS",$news_arr['keywords']); else define("USKEYWORDS",$news_arr['title']); if(@$news_arr['descr'])define("USDESCRIPTION",$news_arr['descr']); else define("USDESCRIPTION",$news_arr['short']); $page_uri="news_".$_GET['id']; } else define("USTITLE",$lang[142]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div;// вывели открывающие блоки дизайна require_once("inc/news.inc.php"); } elseif(@$_GET['op']=="addnews"){ $page_uri="addnews"; define("USTITLE",$lang[292]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div;// вывели открывающие блоки дизайна require_once("inc/addnews.inc.php"); } elseif(@$_GET['op']=="content"){ if(ctype_digit(@$_GET['id'])){ $query_content=mysql_query("SELECT * FROM jb_page WHERE id='".$_GET['id']."'");cq(); $content_arr=mysql_fetch_assoc($query_content); define("USTITLE",$content_arr['title']); if(@$content_arr['keywords'])define("USKEYWORDS",$content_arr['keywords']); else define("USKEYWORDS",$content_arr['title']); if(@$content_arr['descr'])define("USDESCRIPTION",$content_arr['descr']); else define("USDESCRIPTION",$content_arr['title']); $page_uri="content_".$_GET['id']; require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div;// вывели открывающие блоки дизайна require_once("inc/content.inc.php"); } else {header('HTTP/1.0 404 Not Found');header("location: ".$h."error.php");die();} } elseif(@$_GET['op']=="userpage"){ if(ctype_digit(@$_GET['id_user'])){ $query_userpage=mysql_query("SELECT * FROM jb_user WHERE id_user='".$_GET['id_user']."'");cq(); $userpage_arr=mysql_fetch_assoc($query_userpage); define("USTITLE",$lang[7777]." ".$userpage_arr['name']); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/userpage.inc.php"); } else {header('HTTP/1.0 404 Not Found');header("location: ".$h."error.php");die();} } elseif(@$_GET['op']=="book"){ define("USTITLE",$lang[8000]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/category_book.inc.php"); } elseif(@$_GET['op']=="addfirm"){ define("USTITLE",$lang[8001]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($c['add_new_ads']=="no") echo "

".$lang[8059]."

"; else{ if($c['add_new_only_user']=="yes"){ if(!defined('USER')){ setcookie('jbnocache','1',time()+60,"/"); header("location: ".$h."login.html"); } else { if(@$user_data['activ'] == "no") header("location: ".$h."login.html"); else { define("ADDNEW","reg_user"); require_once("inc/add_firm.inc.php"); } } }else{ define("ADDNEW","no_reg"); require_once("inc/add_firm.inc.php"); } } } elseif(@$_GET['op']=="search_book"){ define("USTITLE",$lang[8002]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/search_book.inc.php"); } elseif(@$_GET['op']=="newfirm"){ if(ctype_digit(@$_GET['page']) && @$_GET['page']>0) $page=$_GET['page'];else $page=1; if($page <= $limit_pages_in_cache) $start_filename="-p".$page; else $start_filename=""; if(defined('JBCITY')) $page_uri="newfirm".$start_filename."_".JBLANG.JBCITY; else $page_uri="newfirm".$start_filename."_".JBLANG; define("USTITLE", $lang[8000].", ".$page." ".$lang[1006]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($JBSCACHE=="1" && $page <= $limit_pages_in_cache){ $flnm=$cdir.$page_uri; ob_start(); if(!$adv_index=readData($flnm,$JBSCACHE_expire)){ require_once("inc/last_firm.inc.php"); $adv_index=ob_get_contents(); ob_clean(); writeData($flnm,$adv_index); }echo $adv_index; } else require_once("inc/last_firm.inc.php"); } elseif((@$_GET['op']=="org") && ctype_digit(@$_GET['id_cat_book']) && ctype_digit(@$_GET['id_book'])){ $name_cat=(defined('JBLANG') && constant('JBLANG')=='en')?'en_name_cat':'name_cat'; $query_book=mysql_query("SELECT jb_book.id AS book_id, UNIX_TIMESTAMP(jb_book.date_add) as unix_time, DATE_FORMAT(jb_book.date_add,'%d.%m.%Y') as dat, jb_book.*, jb_book_cat.id, jb_book_cat.root_category, jb_book_cat.".$name_cat." FROM jb_book LEFT JOIN jb_book_cat ON jb_book.id_category=jb_book_cat.id WHERE jb_book.id=".$_GET['id_book']." AND jb_book.old_mess='old' LIMIT 1"); cq(); if(mysql_num_rows($query_book)){ $ads=mysql_fetch_assoc($query_book); define("USTITLE",$ads['title'].", ".$ads['city']); define("USKEYWORDS",$ads['keywords'].", ".$ads['city']); define("USDESCRIPTION",utf8_substr($ads['descr'],0,240)); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($ads['root_category'] != 0){ $navparent=$ads['root_category']; while($navparent != 0){ $q_nav=mysql_query("SELECT id, root_category, ".$name_cat." FROM jb_book_cat WHERE id='".$navparent."'");cq(); if(@mysql_num_rows($q_nav)){ $cat_nav=mysql_fetch_assoc($q_nav); $navparent=$cat_nav['root_category']; $links[]="".$cat_nav[$name_cat]." → "; } } echo "
".$lang[8024]."    ".$lang[8003]." → "; if(is_array(@$links)) echo implode('',array_reverse($links)); echo "".$ads[$name_cat]."


"; } $page_uri="mess_".$_GET['id_book'].JBLANG; require_once("inc/firmpage.inc.php"); } else {header('HTTP/1.0 404 Not Found');header("location: ".$h."error.php");die();} } elseif((@$_GET['op']=="org") && ctype_digit(@$_GET['id_cat_book']) && !@$_GET['id_book']){ $name_cat=(defined('JBLANG') && constant('JBLANG')=='en')?'en_name_cat':'name_cat'; $querycattitle=mysql_query("SELECT id, root_category, child_category, ".$name_cat.", description FROM jb_book_cat WHERE id='".$_GET['id_cat_book']."'"); cq(); if(@mysql_num_rows($querycattitle)){ $cattitle=mysql_fetch_assoc($querycattitle); if(defined('USER_CITY_TITLE')){ define("USTITLE", $cattitle[$name_cat].", ".USER_CITY_TITLE); define("USKEYWORDS",$cattitle['description']); define("USDESCRIPTION",USER_CITY_TITLE.", ".$cattitle[$name_cat].": ".$cattitle['description']); }else{ define("USTITLE", $cattitle[$name_cat]); define("USKEYWORDS",$cattitle['description']); define("USDESCRIPTION",$cattitle[$name_cat].": ".$cattitle['description']); } require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($cattitle['root_category'] != 0){ $navparent=$cattitle['root_category']; while($navparent != 0){ $q_nav=mysql_query("SELECT id,root_category,".$name_cat." FROM jb_book_cat WHERE id='".$navparent."'");cq(); if(@mysql_num_rows($q_nav)){ $cat_nav=mysql_fetch_assoc($q_nav); $navparent=$cat_nav['root_category']; $links[]="".$cat_nav[$name_cat]." → "; } } echo "
".$lang[8024]."    ".$lang[8003]." → "; if(is_array(@$links)) echo implode('',array_reverse($links)); echo "".$cattitle[$name_cat]."

"; } if($cattitle['child_category']==1){ echo "
"; if(defined('JBCITY')) $page_uri="f".$_GET['id_cat_book']."_".JBLANG.JBCITY; else $page_uri="f".$_GET['id_cat_book']."_".JBLANG; require_once("inc/list_subcat_book.inc.php"); }else{ if(ctype_digit(@$_GET['page']) && @$_GET['page']>0) $page=$_GET['page'];else $page=1; if($page<=$limit_pages_in_cache)$start_filename="-p".$page;else $start_filename=""; if(defined('JBCITY')) $page_uri="f".$_GET['id_cat_book'].$start_filename."_".JBLANG.JBCITY; else $page_uri="f".$_GET['id_cat_book'].$start_filename."_".JBLANG; require_once("inc/list_book.inc.php"); } } else {header('HTTP/1.0 404 Not Found');header("location: ".$h."error.php");die();} } elseif(@$_GET['op']=="userfirm"){ define("USTITLE",$lang[841]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/user_firm.inc.php"); } elseif(@$_GET['op']=="tube"){ define("USTITLE","Интересные видеоролики и самые смешные анекдоты"); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/category_tube.inc.php"); } elseif(@$_GET['op']=="search_tube"){ define("USTITLE",$lang[8002]); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна require_once("inc/search_tube.inc.php"); } elseif(@$_GET['op']=="addtube"){ $page_uri="addtube"; define("USTITLE", "Добавление анекдота"); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div;// вывели открывающие блоки дизайна require_once("inc/add_tube.inc.php"); } elseif(@$_GET['op']=="newtube"){ if(ctype_digit(@$_GET['page']) && @$_GET['page']>0) $page=$_GET['page'];else $page=1; if($page <= $limit_pages_in_cache) $start_filename="-p".$page; else $start_filename=""; if(defined('JBCITY')) $page_uri="newtube".$start_filename."_".JBLANG.JBCITY; else $page_uri="newtube".$start_filename."_".JBLANG; if (ctype_digit(@$_GET['page']) && @$_GET['page'] >0) { define("USTITLE", "Анекдоты и новое видео".", ".$page." ".$lang[1006]); } else { define("USTITLE", "Анекдоты и интересное видео с YouTube"); } define("USKEYWORDS", "video, tube, видео, видеоролики, ролики, анекдоты"); define("USDESCRIPTION", "Интересные видеоролики с YouTube. Анекдоты на любой вкус. Лучшая подборка смешных анекдотов. "); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($JBSCACHE=="1" && $page <= $limit_pages_in_cache){ $flnm=$cdir.$page_uri; ob_start(); if(!$adv_index=readData($flnm,$JBSCACHE_expire)){ require_once("inc/last_tube.inc.php"); $adv_index=ob_get_contents(); ob_clean(); writeData($flnm,$adv_index); }echo $adv_index; } else require_once("inc/last_tube.inc.php"); } elseif((@$_GET['op']=="roliki") && ctype_digit(@$_GET['id_cat_tube']) && ctype_digit(@$_GET['id_tube'])){ $name_cat=(defined('JBLANG') && constant('JBLANG')=='en')?'en_name_cat':'name_cat'; $query_tube=mysql_query("SELECT jb_tube.id AS tube_id, UNIX_TIMESTAMP(jb_tube.date_add) as unix_time, DATE_FORMAT(jb_tube.date_add,'%d.%m.%Y') as dat, jb_tube.*, jb_tube_cat.id, jb_tube_cat.root_category, jb_tube_cat.".$name_cat." FROM jb_tube LEFT JOIN jb_tube_cat ON jb_tube.id_category=jb_tube_cat.id WHERE jb_tube.id=".$_GET['id_tube']." AND jb_tube.old_mess='old' LIMIT 1"); cq(); if(mysql_num_rows($query_tube)){ $ads=mysql_fetch_assoc($query_tube); define("USTITLE",$ads['title']); define("USKEYWORDS",$ads['keywords']); define("USDESCRIPTION",utf8_substr($ads['descr'],0,240)); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($ads['root_category'] != 0){ $navparent=$ads['root_category']; while($navparent != 0){ $q_nav=mysql_query("SELECT id, root_category, ".$name_cat." FROM jb_tube_cat WHERE id='".$navparent."'");cq(); if(@mysql_num_rows($q_nav)){ $cat_nav=mysql_fetch_assoc($q_nav); $navparent=$cat_nav['root_category']; $links[]="".$cat_nav[$name_cat]." → "; } } echo "
Новые развлечения    Рубрики развлечений → "; if(is_array(@$links)) echo implode('',array_reverse($links)); echo "".$ads[$name_cat]."


"; } $page_uri="mess_".$_GET['id_tube'].JBLANG; require_once("inc/tubepage.inc.php"); } else {header('HTTP/1.0 404 Not Found');header("location: ".$h."error.php");die();} } elseif((@$_GET['op']=="roliki") && ctype_digit(@$_GET['id_cat_tube']) && !@$_GET['id_tube']){ $name_cat=(defined('JBLANG') && constant('JBLANG')=='en')?'en_name_cat':'name_cat'; $querycattitle=mysql_query("SELECT id, root_category, child_category, ".$name_cat.", description FROM jb_tube_cat WHERE id='".$_GET['id_cat_tube']."'"); cq(); if(@mysql_num_rows($querycattitle)){ $cattitle=mysql_fetch_assoc($querycattitle); define("USTITLE", $cattitle[$name_cat]); define("USKEYWORDS",$cattitle['description']); define("USDESCRIPTION",$cattitle[$name_cat].": ".$cattitle['description']); require_once("inc/head.inc.php"); require_once("inc/top.inc.php"); echo $design_div; // вывели открывающие блоки дизайна if($cattitle['root_category'] != 0){ $navparent=$cattitle['root_category']; while($navparent != 0){ $q_nav=mysql_query("SELECT id,root_category,".$name_cat." FROM jb_tube_cat WHERE id='".$navparent."'");cq(); if(@mysql_num_rows($q_nav)){ $cat_nav=mysql_fetch_assoc($q_nav); $navparent=$cat_nav['root_category']; $links[]="".$cat_nav[$name_cat]." → "; } } echo "
Новые развлечения    Рубрики развлечений → "; if(is_array(@$links)) echo implode('',array_reverse($links)); echo "".$cattitle[$name_cat]."


"; } if($cattitle['child_category']==1){ echo "
"; $page_uri="r".$_GET['id_cat_tube']."_".JBLANG; require_once("inc/list_subcat_tube.inc.php"); }else{ if(ctype_digit(@$_GET['page']) && @$_GET['page']>0) $page=$_GET['page'];else $page=1; if($page<=$limit_pages_in_cache)$start_filename="-p".$page;else $start_filename=""; $page_uri="r".$_GET['id_cat_tube'].$start_filename."_".JBLANG; require_once("inc/list_tube.inc.php"); } } else {header('HTTP/1.0 404 Not Found');header("location: ".$h."error.php");die();} } elseif(@$_GET['op']=="noteprint") require_once("inc/noteprint.inc.php"); if(@$_GET['op']=="print"||@$_GET['op']=="noteprint")die(); ?>