if (!empty($id)) { $id0 = explode(".",$id); if ($id0[0]=='profi') {$incmag = 1;} else $incmag = 0; } ############################ if (empty($incmag)) { ############################ include ('inc/top_magazine.inc'); include ("inc/magazine.inc"); $nameh = 'Интернет-журнал'; include ("inc/nameh.inc"); //nameh($nameh); ################################### $magcontent = 0; if(!empty($id) and empty($magview)) { $id0 = explode(".",$id); //echo "
".$id0[0]."
"; $rubname = rubnamefile($id0[0]); if (!empty($rubname)) { if (!empty($id0[1])) {$view = filedb($id);} if (!empty($id0[1]) and empty($view) and file_exists($patharticle.$id0[0]."/".$id0[1].".txt")) { $nameh .= " >> ".$rubname.""; nameh($nameh); include($patharticle.$id0[0]."/".$id0[1].".txt"); $magview = 1; } // if !view and file_exists //echo "".$patharticle.$id0[0]."/".$id0[1]."txt"; elseif (empty($view)) { $nameh .= " >> ".$rubname.""; nameh($nameh); $magview = rubcontent($id0[0]);} } // if rubname else { $nameh .= " >> ".$rubname.""; nameh($nameh); rubcontent(); $magview = 1;} } // elseif elseif (!empty($view) and empty($magview)) {$magview = magview($view);} else {nameh($nameh); rubcontent();} include ('inc/bottom.inc'); } else {include('magazine.old.phtml');} ############ functions ############# function magview($view) { $return = 0; if (!empty($view)) { global $patharticle; ### проверка view только на цифры $temp = mysql_query("SELECT id, rub FROM magazine WHERE allfile='".$view."' LIMIT 1"); $id = mysql_fetch_row($temp); $id = $id[0]; $mag = article($id,$patharticle); if (!empty($mag) and file_exists($patharticle."all/".$mag[allfile].".txt")) { $mag[text] = ''; global $nameh; $rub = rubname($mag[rub]); $rubname = rubnamefile($rub); $nameh .= " >> ".$rubname.""; nameh($nameh); echo "".$mag[author]." | ".$day." ".$mname[$mon]." ".$year." |
Новость от Chicken.Kiev | ".$day." ".$mname[$mon]." ".$year." |