"; } } for($i=0; $i Пароль:
"; $r=mysql_query("SELECT wLink FROM ".$Db_Prefix."_pages WHERE Link='register.php'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $r=mysql_query("SELECT wLink FROM ".$Db_Prefix."_pages WHERE Link='remember.php'"); if(!$r){die(mysql_error());} $mas1=mysql_fetch_array($r); $Auth.="Регистрация
Забыли пароль?
"; } else{ $r=mysql_query("SELECT wLink FROM ".$Db_Prefix."_pages WHERE Link='profile.php'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $r=mysql_query("SELECT wLink FROM ".$Db_Prefix."_pages WHERE Link='basket.php'"); if(!$r){die(mysql_error());} $mas1=mysql_fetch_array($r); $Auth="
Здравствуйте, ".$user['Name']."

В вашей корзине - ".count($basket)." товаров.

"; } $show=0; if( ($page['Link']=="register.php") or ($page['Link']=="login.php") or ($page['Link']=="catalog.php") or ($page['Link']=="info.php") or ($page['Link']=="basket.php") or ($page['Link']=="order_submit.php") or ($page['Link']=="remember.php") ){$show=1;} if(!$show){$Auth="";} $r=mysql_query("SELECT ID FROM ".$Db_Prefix."_pages WHERE Link='catalog.php'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $CatID=$mas['ID']; $r=mysql_query("SELECT ID FROM ".$Db_Prefix."_pages WHERE Link='info.php'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $Info=$mas['ID']; $r=mysql_query("SELECT ID,Name,IsIndex,wLink FROM ".$Db_Prefix."_pages WHERE IsUp='1' ORDER BY Rating, Name"); if(!$r){die(mysql_error());} for($i=0; $i";} //if( ($i==1) or ($i==2) or ($i>3) ){$UpMenu.="|";} if($i){$UpMenu.=" ";} $UpMenu.="".stripslashes($mas['Name']).""; } $r=mysql_query("SELECT ID,Name,IsIndex,wLink FROM ".$Db_Prefix."_pages WHERE IsRight='1' ORDER BY Rating, Name"); if(!$r){die(mysql_error());} for($i=0; $i"; } $r=mysql_query("SELECT ID,Name,IsIndex,wLink FROM ".$Db_Prefix."_pages WHERE IsDown='1' ORDER BY Rating, Name"); if(!$r){die(mysql_error());} for($i=0; $i"; } $LeftMenu=""; if(!$page['IsIndex']){ if($page['Parent']==0){$r=mysql_query("SELECT ID,Name,IsIndex,wLink,ParentLink FROM ".$Db_Prefix."_pages WHERE Parent='$Page' ORDER BY Rating, Name");} else{ $r1=mysql_query("SELECT ID,Parent FROM ".$Db_Prefix."_pages WHERE ID='".$page['Parent']."'"); if(!$r1){die(mysql_error());} $mas1=mysql_fetch_array($r1); while($mas1['Parent']){ $r1=mysql_query("SELECT ID,Parent FROM ".$Db_Prefix."_pages WHERE ID='".$mas1['Parent']."'"); if(!$r1){die(mysql_error());} $mas1=mysql_fetch_array($r1); } $r=mysql_query("SELECT ID,Name,IsIndex,wLink,ParentLink FROM ".$Db_Prefix."_pages WHERE Parent='".$mas1['ID']."' ORDER BY Rating, Name"); } if( ($page['Parent']==99999) or (!mysql_numrows($r)) ){$r=mysql_query("SELECT ID,Name,IsIndex,wLink,ParentLink FROM ".$Db_Prefix."_pages WHERE IsLeft='1' ORDER BY Rating, Name");} } else{ $r=mysql_query("SELECT ID,Name,IsIndex,wLink,ParentLink FROM ".$Db_Prefix."_pages WHERE IsLeft='1' ORDER BY Rating, Name"); } if(!$r){die(mysql_error());} for($i=0; $i";} } if($page['Link']=="gallery.php"){ $LeftMenu=""; $r=mysql_query("SELECT * FROM ".$Db_Prefix."_photo_raz ORDER BY Rating, Name"); if(!$r){die(mysql_error());} for($i=0; $i".stripslashes($mas['Name']).""; } } if($page['Link']=="personal.php"){ $LeftMenu=""; $r=mysql_query("SELECT * FROM ".$Db_Prefix."_prepods WHERE pID='".$page['ID']."' ORDER BY Rating, Name"); if(!$r){die(mysql_error());} for($i=0; $i".stripslashes($mas['Name']).""; } } if($LeftMenu!=""){$LeftMenu="
$LeftMenu
";} $News=""; $pp=$page; while($pp['Parent']){ $r=mysql_query("SELECT ID, Parent FROM ".$Db_Prefix."_pages WHERE ID='".$pp['Parent']."'"); if(!$r){die(mysql_error());} $pp=mysql_fetch_array($r); } if($page['Link']=="news.php"){ $id=intval($id); if($id){ $r=mysql_query("SELECT Razdel FROM ".$Db_Prefix."_news WHERE ID='".$id."'"); if(!$r){die(mysql_error());} $pp=mysql_fetch_array($r); $r=mysql_query("SELECT ID FROM ".$Db_Prefix."_pages WHERE ID='".$pp['Razdel']."' AND News='1'"); if(!$r){die(mysql_error());} $pp=mysql_fetch_array($r); } } else{ $r=mysql_query("SELECT ID FROM ".$Db_Prefix."_pages WHERE Parent='".$pp['ID']."' AND News='1'"); if(!$r){die(mysql_error());} $pp=mysql_fetch_array($r); } $r=mysql_query("SELECT * FROM ".$Db_Prefix."_news ORDER BY Date DESC LIMIT 0, 3"); if(!$r){die(mysql_error());} for($i=0; $i".stripslashes($mas['Header']).""; $News.=""; } if($page['IsIndex']!=1){ /*$Navig="Главная"; $scat=$page; $nv[]=" → ".$page['Name'].""; while($scat['Parent']){ $r=mysql_query("SELECT ID, Parent, Name, wLink FROM ".$Db_Prefix."_pages WHERE ID='".$scat['Parent']."'"); if(!$r){die(mysql_error());} $scat=mysql_fetch_array($r); $nv[]=" → ".$scat['Name'].""; } for($i=count($nv)-1; $i>=0; $i--){$Navig.=$nv[$i];}*/ $Navig="Главная"; $scat=$page; $nv[]=" → ".$page['Name'].""; while($scat['Parent']){ $r=mysql_query("SELECT ID, Parent, Name, wLink FROM ".$Db_Prefix."_pages WHERE ID='".$scat['Parent']."'"); if(!$r){die(mysql_error());} $scat=mysql_fetch_array($r); if($scat['Name']!=""){ $link="page".$scat['ID'].".html"; if($scat['wLink']){$link=$scat['wLink'].".html";} $nv[]=" → ".$scat['Name'].""; } } for($i=count($nv)-1; $i>=0; $i--){$Navig.=$nv[$i];} } if($page['IsIcon']==1){ // определяем кол-во подуровней у данной страницы $lev=1; $r1=mysql_query("SELECT ID FROM ".$Db_Prefix."_pages WHERE Parent='".$page['ID']."'"); if(!$r1){die(mysql_error());} for($i1=0; $i1".stripslashes($mas1['Name']).""; $k++; $gid++; if($k==4){$k=0; $SubMenu.="";} } $SubMenu.=""; } else{ $r1=mysql_query("SELECT * FROM ".$Db_Prefix."_pages WHERE Parent='".$page['ID']."' ORDER BY Rating, Name"); if(!$r1){die(mysql_error());} $SubMenu.=""; $gid=1; $k=0; for($i1=0; $i1";} else{$SubMenu.="

".$mas1['Header']."

".stripslashes($mas1['Text'])."
";} $r2=mysql_query("SELECT * FROM ".$Db_Prefix."_pages WHERE Parent='".$mas1['ID']."' ORDER BY Rating, Name"); if(!$r1){die(mysql_error());} $SubMenu.="
"; $gid=1; $k=0; $max=4; $pr=25; //if(mysql_numrows($r2)==4){$max=2; $pr=50;} for($i2=0; $i2
".stripslashes($mas2['Name']).""; $k++; $gid++; if($k==$max){$k=0; $SubMenu.="
";} } $SubMenu.="
"; } $SubMenu.="
"; } } $PageHeader=stripslashes($page['Header']); $page['Text']=str_replace("{GlobalPath}", $GlobalPath, $page['Text']);// $PageText=stripslashes($page['Text'].$SubMenu); $HeaderRight=stripslashes($HeaderRight); $RightText=str_replace("{GlobalPath}", $GlobalPath, $RightText);// $RightText=stripslashes($RightText); if($page['Title']==""){$page['Title']=$page['Name'];} // searching for forms if(strstr($PageText, "[[Form")){ preg_match_all("!\[\[Form:(.*?)\]\]!si",$PageText,$out, PREG_PATTERN_ORDER); for($k=0; $k$text"; } $s=""; $j=""; for($i=0; $i$headers[$i] "; $j.="\$('#subtext".$i."').css('display', 'none');\n"; } $PageText="
$s
$pg"; } /*if(strstr($PageText, "[Submenu")){ preg_match_all("!\[Submenu=(.*?)\](.*?)\[/Submenu\]!si",$PageText,$out, PREG_PATTERN_ORDER); for($k=0; $k".$header."", $PageText); } }*/ if(strstr($PageText, "[Submenu")){ preg_match_all("!\[Submenu=(.*?)\](.*?)\[/Submenu\]!si",$PageText,$out, PREG_PATTERN_ORDER); for($k=0; $k".$header."", $PageText); } $PageText.=""; } if($page['Link']!=""){require($page['Link']);} $PageText=str_replace("{GlobalPath}", $GlobalPath, $PageText);// preg_match_all("!\[\[(.*?)\]\]!si",$PageText,$out, PREG_PATTERN_ORDER); for($k=0; $k", $PageText); } $main['Text']=html_entity_decode(stripslashes($main['Text']), ENT_QUOTES); preg_match_all("!{{(.*?)}}!si",$main['Text'],$out, PREG_PATTERN_ORDER); for($i1=0; $i1