"; require ("cfg/cfg.php"); require ("functions/functions.php"); /**************************************************************************************************************/ deschidedb(); $URL_FINAL = make_uri_title_seo($_GET["idpag"]); $HEADER_CAUTA = htmlspecialchars(strip_tags(stripslashes($_REQUEST["header_cauta"]))); if (isset($_REQUEST["header_cauta"])) { header ('HTTP/1.1 301 Moved Permanently'); header("Location:".make_uri_title(4,$HEADER_CAUTA)); exit(); } $CAUTA = preg_replace('/-/',' ',$URL_FINAL['url']['url']); /**************************************************************************************************************/ /**************************************************************************************************************/ //print_r($URL_FINAL); $ID_PAG = $URL_FINAL["idpag"]; $ID_ELEM = $URL_FINAL["idelem"]; /**************************************************************************************************************/ $URI_FILE = basename($_SERVER["REQUEST_URI"]); $URI_ = substr($URL_SITE,0,strlen($URL_SITE)-1).$_SERVER["REQUEST_URI"]; $URI_SITE = explode("?",$URI_); $URI_SITE = $URI_SITE[0]; if(in_array($URL_FINAL['url']['cauta'],array('search','category','tags','archive'))) $URI_SITE = $URL_SITE.$URL_FINAL['url']['cauta'].'/'.$URL_FINAL['url']['url'].'/'; /**************************************************************************************************************/ $INFO_SITES = querydb("select","SELECT titlu, cuvinte_cheie, descriere, admin_email FROM info_site LIMIT 1"); $INFO_SITE = $INFO_SITES[0]; $MENIU_SUS = querydb("select","SELECT meniu_idpag, meniu_nume_en, meniu_nume_ro AS meniu_nume FROM meniu WHERE meniu_activ = '1' AND meniu_sus = '1' AND meniu_idparinte = '0' ORDER BY meniu_ordine "); $TEXTE_SITE = querydb("select","SELECT texte_site_cod, texte_site_ro, texte_site_en FROM texte_site"); $PAGINI = querydb("select","SELECT pagini.pagini_idpag, meniu.meniu_nume_en, pagini.pagini_titlu_ro AS pagini_titlu, pagini.pagini_continut_ro AS pagini_continut, meniu.meniu_ext FROM pagini LEFT JOIN meniu ON pagini.pagini_idpag = meniu.meniu_idpag WHERE pagini.pagini_idpag='".$ID_PAG."'"); $CATEG = querydb("select","SELECT categorii_id, categorii_activ, categorii_nume_ro, categorii_nume_en FROM categorii WHERE categorii_activ = '1' AND categorii_nivel = '0' AND categorii_id != '1' ORDER BY categorii_ordine ASC"); $PRESA_TAGS = querydb("select","SELECT presa_tag_id, presa_tag_nume FROM presa_tags ORDER BY presa_tag_nume"); $PRESA_TAGS_NR = querydb("select","SELECT presa_tags FROM presa ORDER BY presa_id"); // $USR = $USR[0]; $PAGINI = $PAGINI[0]; $ID_PAG = $PAGINI["pagini_idpag"]; foreach ($TEXTE_SITE as $vts) { $TS[$vts["texte_site_cod"]] = $vts["texte_site_ro"]; } /**************************************************************************************************************/ $DIR_SITE_PAGINI_ID = $DIR_SITE_PAGINI.$PAGINI["pagini_continut"]."/"; $URL_SITE_PAGINI_ID = make_uri_title($ID_PAG); if ($PAGINI["meniu_ext"] == 0) { $PAG_MIJ = $DIR_SITE_PAGINI."home/index.php"; } else { $PAG_MIJ = ((!file_exists($DIR_SITE_PAGINI_ID."index.php")) ? $DIR_SITE_PAGINI."err/index.php" : $DIR_SITE_PAGINI_ID."index.php" ); } /**************************************************************************************************************/ $replaces[0] = "/ /"; $replaces[1] = "/, /"; $replaces[2] = "/,,,,/"; $replaces[3] = "/,,,/"; $replaces[4] = "/,,/"; $patterns[0] = ","; $patterns[1] = ","; $patterns[2] = ","; $patterns[3] = ","; $patterns[4] = ","; $pag = ((!isset($URL_FINAL["pag"])) ? 1 : $URL_FINAL["pag"]); if ($URL_FINAL["url"]["cauta"] == "category") { $cat = querydb("select","SELECT categorii_nume_ro FROM categorii WHERE categorii_nume_en='".$URL_FINAL["url"]["url"]."'"); $INFO_SITE["titlu"] = $cat[0]["categorii_nume_ro"]." Page ".$pag." | ".$INFO_SITE["titlu"]; $INFO_SITE["descriere"] = $cat[0]["categorii_nume_ro"]." page ".$pag." ".$INFO_SITE["descriere"]; $INFO_SITE["cuvinte_cheie"] = preg_replace($replaces,$patterns,clean_str2($cat[0]["categorii_nume_ro"])).", page ".$pag.", ".$INFO_SITE["cuvinte_cheie"]; $BREADCRUMB = array(array("text"=>"Home","link"=>$URL_SITE), array("text"=>"Category","link"=>make_uri_title(2,$URL_FINAL["url"]["url"])), array("text"=>$cat[0]["categorii_nume_ro"],"link"=>"")); } else if ($URL_FINAL["url"]["cauta"] == "search") { $INFO_SITE["titlu"] = $URL_FINAL['url']['url']." Page ".$pag." | ".$INFO_SITE["titlu"]; $INFO_SITE["descriere"] = $URL_FINAL['url']['url']." page ".$pag." ".$INFO_SITE["descriere"]; $INFO_SITE["cuvinte_cheie"] = preg_replace($replaces,$patterns,clean_str2($URL_FINAL['url']['url'])).", ".$INFO_SITE["cuvinte_cheie"]; $BREADCRUMB = array(array("text"=>"Home","link"=>$URL_SITE), array("text"=>"Category","link"=>make_uri_title(2,$URL_FINAL["url"]["url"])), array("text"=>$CAUTA,"link"=>"")); } elseif ($URL_FINAL["url"]["cauta"] == "tags") { $tag = querydb("select","SELECT presa_tag_nume FROM presa_tags"); foreach ($tag as $vt) { if($URL_FINAL["url"]["url"] == clean_str3($vt["presa_tag_nume"])) { $tag_0 = $vt["presa_tag_nume"]; break; } } $INFO_SITE["titlu"] = $tag_0." Page ".((!isset($_GET["pag"])) ? 1 : $_GET["pag"])." | ".$INFO_SITE["titlu"]; $INFO_SITE["descriere"] = $tag_0.", page ".$pag." ".$INFO_SITE["descriere"]; $INFO_SITE["cuvinte_cheie"] = preg_replace($replaces,$patterns,clean_str2($tag[0]["presa_tag_nume"])).", page ".$pag.", ".$INFO_SITE["cuvinte_cheie"]; $BREADCRUMB = array(array("text"=>"Home","link"=>$URL_SITE), array("text"=>"Tags","link"=>make_uri_title(2,$URL_FINAL["url"]["url"])), array("text"=>$tag_0,"link"=>"")); } elseif ($ID_PAG == 3) { $pre = querydb("select","SELECT presa_titlu_en, presa_titlu_ro, presa_categ_id FROM presa WHERE presa_id = '".$ID_ELEM."'"); $categ = explode("_",$pre[0]["presa_categ_id"]); $categ_0 = $categ[1]; $categ_1 = $categ[2]; $cat = querydb("select","SELECT categorii_nume_en, categorii_nume_ro FROM categorii WHERE categorii_id='".$categ_0."' OR categorii_id='".$categ_1."'"); $INFO_SITE["titlu"] = $pre[0]["presa_titlu_ro"]; $INFO_SITE["descriere"] = strip_tags(htmlspecialchars_decode($pre[0]["presa_titlu_ro"])); $INFO_SITE["cuvinte_cheie"] = preg_replace($replaces,$patterns,clean_str2(strip_tags(htmlspecialchars_decode($pre[0]["presa_titlu_ro"])))).", ".$INFO_SITE["cuvinte_cheie"]; $BREADCRUMB = array(array("text"=>"Home","link"=>$URL_SITE), array("text"=>"Category","link"=>make_uri_title(2,$cat[1]["categorii_nume_en"])), array("text"=>$cat[0]["categorii_nume_ro"],"link"=>make_uri_title(2,$cat[0]["categorii_nume_en"])), array("text"=>$pre[0]["presa_titlu_ro"],"link"=>"")); } elseif ($ID_PAG == 4) { $INFO_SITE["titlu"] = htmlspecialchars(strip_tags($_REQUEST["cautare"])); $INFO_SITE["descriere"] = htmlspecialchars(strip_tags($_REQUEST["cautare"]))." | ".$INFO_SITE["descriere"]; $INFO_SITE["cuvinte_cheie"] = preg_replace($replaces,$patterns,clean_str2(htmlspecialchars(strip_tags($_REQUEST["cautare"])))).", ".$INFO_SITE["cuvinte_cheie"]; $BREADCRUMB = array(array("text"=>"Home","link"=>$URL_SITE), array("text"=>"Search","link"=>make_uri_title(4,$URL_FINAL["url"]["url"])), array("text"=>$INFO_SITE["titlu"],"link"=>"")); } elseif ($ID_PAG == 43) { $titl = "WORLDWIDE MUSIC ARTISTS ON TWITTER"; $INFO_SITE["titlu"] = $titl; $INFO_SITE["descriere"] = $titl; $INFO_SITE["cuvinte_cheie"] = preg_replace($replaces,$patterns,clean_str2($titl)); } /**************************************************************************************************************/ include $DIR_SITE_TPL."page.php"; /**************************************************************************************************************/ inchidedb(); unset ($_SESSION["user_ses_status"]); //include "functions/inc.end.cache.php"; ?>