config["head"]["cur_path"]=""; $site->params["only_active"]="Y"; $site->params_get(); $site->out_url(false); $SETTINGS["kur_page"]="info"; $SETTINGS['navigator']=array("/"=>"Главная"); $SETTINGS['navigator']["/info.php"]="Полезная информация"; if($site->params["id"]>0 || $site->params["parent"]>0){ if($site->params["id"]>0){ $site->get_klient(); if(is_error()){ //2 location("/error.php"); } if(count($site->params["parent_path"])>0){ foreach($site->params["parent_path"] as $ar){ $SETTINGS['navigator']["/info.php?parent=".$ar["id"]]=$ar["title"]; } } $title_ar=array( array("Статьи" ,"Обзоры" ,"Аналитика" ) ,array("о недвижимости" ,"от риелторов" ) ,array("России" ,"СНГ" ) ); $title_cur=strip_string($site->params["title"],50,false); $title_add=""; $ii=0; foreach($title_ar as $ar){ $num=(int)substr($site->params["id"],count((string)$site->params["id"])-$ii-1,1); $rand_num=$num%count($ar); if($title_add!="")$title_add.=" "; $title_add.=$ar[$rand_num]; $ii++; } $text_add=strip_string($site->params["text"],50); //." ".$title_add $str=str_replace(array(",",".",":","-","!","?")," ",$site->params["title"]." ".$title_add); $keywords_ar=explode(" ",$str); $cur=array(); foreach($keywords_ar as $str){ if(strlen($str)>4) $cur[$str]=1; } $keywords_cur=""; foreach($cur as $str=>$ar){ if($keywords_cur!="")$keywords_cur.=", "; $keywords_cur.=$str; } // $keywords_ar=preg_split("[\W]","kjsf dhfghjsf ".$site->params["title"],-1,PREG_SPLIT_NO_EMPTY); //preg_split('/\W+(\w{1,2}\W+)?/ $SETTINGS["title_ex"]=$title_cur." - ".$title_add; $SETTINGS["description_ex"]=$title_cur." - ".$title_add." на RPNplus.com - ".$text_add; $SETTINGS["keywords_ex"]=$keywords_cur; }else{ $site->params["id"]=$site->params["parent"]; $site->get(); $site->params["id"]=0; $site->show_klient(); if(count($site->params["parent_path"])>1){ for($i=0;$iparams["parent_path"])-1;$i++){ $ar=$site->params["parent_path"][$i]; $SETTINGS['navigator']["/info.php?parent=".$ar["id"]]=$ar["title"]; } } } $SETTINGS['navigator'][]=$site->params["title"]; $SETTINGS["part_name"]=$site->params["title"]; if($site->params["ptitle"]!="") $SETTINGS["title_ex"]=$site->params["ptitle"]; if($site->params["pdescription"]!="") $SETTINGS["description_ex"]=$site->params["pdescription"]; if($site->params["pkeywords"]!="") $SETTINGS["keywords_ex"]=$site->params["pkeywords"]; $SETTINGS["part_id"]=(int)$site->params["parent_path"][0]["id"]; if($SETTINGS["part_id"]==0 && $site->params["id"]>0){ $SETTINGS["part_id"]=$site->params["id"]; } }else{ $SETTINGS["h1_ex"]="Полезная информация о недвижимости"; $SETTINGS["title_ex"]="Статьи, новости недвижимости, аналитика, обзоры"; $SETTINGS["description_ex"]="Полезная информация о недвижимости на RPNplus.com. Новости, статьи, обзоры и аналитика из авторитетных источников."; $SETTINGS["keywords_ex"]="новости недвижимости, аналитика недвижимости, статьи о недвижимости, обзоры недвижимости"; } include $SETTINGS["PATH_HTML"]."/top.html"; if($site->params["id"]>0){ include $SETTINGS["PATH_HTML"]."/info.html"; }else{ if($site->params["parent"]>0){ $site->params["info_part"]="show"; include $SETTINGS["PATH_HTML"]."/info_show.html"; }else{ $site->params["info_part"]="all"; $site->show_klient_all(); include $SETTINGS["PATH_HTML"]."/info_show.html"; include_once $PATH_LIB."/newsrealty.php"; $site=new newsrealty(); $site->config["head"]["cur_path"]=""; $site->params["only_active"]="Y"; $site->params["info_part"]="all"; $site->show_klient(10); include $SETTINGS["PATH_HTML"]."/newsrealty.html"; } } include $SETTINGS["PATH_HTML"]."/bottom.html"; debug_echo(); ?>