=0; $i--){ if( ($html[$i]!="0") and ($html[$i]!="1") and ($html[$i]!="2") and ($html[$i]!="3") and ($html[$i]!="4") and ($html[$i]!="5") and ($html[$i]!="6") and ($html[$i]!="7") and ($html[$i]!="8") and ($html[$i]!="9") ){ break; } } if($i>0){ $structure=substr($html, 0, $i+1); $st_param=substr($html, $i+1); $structure=htmlspecialchars($structure, ENT_QUOTES); $r=mysql_query("SELECT ID FROM ".$Db_Prefix."_structure WHERE VarName='$structure'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $r=mysql_query("SELECT ID FROM ".$Db_Prefix."_pages WHERE Structure='".$mas['ID']."'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $Page=$mas['ID']; } else{die("Ошибка определения структуры");} } if( ($act!="") and ($act!="structure") ){ $act=htmlspecialchars($act, ENT_QUOTES); $r=mysql_query("SELECT ID FROM ".$Db_Prefix."_pages WHERE Tip='$act' AND Lang='$slang'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $Page=$mas['ID']; } if( ($act=="videoblog") ){ $r=mysql_query("SELECT ID FROM ".$Db_Prefix."_pages WHERE Link='blogs.php' AND Lang='$slang'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $Page=$mas['ID']; } if( ($act=="stena") ){ $r=mysql_query("SELECT ID FROM ".$Db_Prefix."_pages WHERE Link='stena.php' AND Lang='$slang'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $Page=$mas['ID']; } if( ($act=="message") ){ $r=mysql_query("SELECT ID FROM ".$Db_Prefix."_pages WHERE Link='_message_info.php' AND Lang='$slang'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $Page=$mas['ID']; } if( ($act=="blog") ){ $r=mysql_query("SELECT ID FROM ".$Db_Prefix."_pages WHERE Link='blogs.php' AND Lang='$slang'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $Page=$mas['ID']; } if(!$Page){ $r=mysql_query("SELECT * FROM ".$Db_Prefix."_pages WHERE IsIndex='1' AND Lang='$slang'"); if(!$r){die(mysql_error());} $page=mysql_fetch_array($r); $Page=$page['ID']; } else{ $r=mysql_query("SELECT * FROM ".$Db_Prefix."_pages WHERE ID='$Page' AND Lang='$slang'"); if(!$r){die(mysql_error());} $page=mysql_fetch_array($r); } $link=""; if($page['Tip']!=""){ for($i=0; $i"; } } for($i=0; $i".GetXML($my_AuthEnterLink)." ".GetXML($my_AuthRegLink)." "; $Auth="
".GetXML($my_AuthLoginField).":
".GetXML($my_AuthPasswordField).":
     
"; } else{ $TopAuth="
".GetXML($my_AuthHello).", ".stripslashes($user['Name'])." (".GetXML($my_AuthAmount).": CHF ".$user['Amount'].")      ".GetXML($my_AuthLogout)."
"; $Auth="
"; } if($ShopReg==0){$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,Name,IsIndex,wLink FROM ".$Db_Prefix."_pages WHERE IsUp='1' AND Lang='$slang' ORDER BY Rating, Name"); if(!$r){die(mysql_error());} for($i=0; $i"; for($i1=0; $i1".stripslashes($mas1['Name']).""; } $text=stripslashes($mas['Name']); if(file_exists("images/buttons/$slang/".($i+1).".png")){$text="";} $UpMenu.=" "; } else{ $text=stripslashes($mas['Name']); if(file_exists("images/buttons/$slang/".($i+1).".png")){$text="";} $a=substr($_SERVER['REQUEST_URI'], 1, strlen($_SERVER['REQUEST_URI'])); if(!strstr($_SERVER['REQUEST_URI'], "info")){ if( ($link==$a) or ($Page==$mas['ID']) or ($link=="/") and ($a=="") ){ if(file_exists("images/buttons/$slang/".($i+1)."_.png")){$text="";} } } $UpMenu.=""; }*/ $s=($mas['ID']==$Page) ? "class=active" : ""; if($i){$UpMenu.="";} $align=""; if($i){$align="align=center";} if($i==mysql_numrows($r)-1){$align="align=right";} $UpMenu.="".stripslashes($mas['Name']).""; } $LeftMenu=""; $r=mysql_query("SELECT ID,Name,IsIndex,wLink FROM ".$Db_Prefix."_pages WHERE IsLeft='1' AND Lang='$slang' ORDER BY Rating, Name"); if(!$r){die(mysql_error());} for($i=0; $i"; } $DownMenu=""; $r=mysql_query("SELECT ID,Name,IsIndex,wLink FROM ".$Db_Prefix."_pages WHERE IsDown='1' AND Lang='$slang' ORDER BY Rating, Name"); if(!$r){die(mysql_error());} $k=0; for($i=0; $i".GetXML($my_HelpLinkText)."";} $link="page".$mas['ID'].".html"; if($mas['wLink']){$link=$mas['wLink'].".html";} if(strstr($mas['wLink'], "http:")){$link=$mas['wLink'];} if($mas['IsIndex']){$link="/";} $s=($mas['ID']==$Page) ? "class=active" : ""; $DownMenu.=""; $k++; if($k==2){$DownMenu.=""; $k=0;} } $DownMenu.="
"; if(strstr($_SERVER['REQUEST_URI'], "profile.html")){ $LeftMenu="
"; } if( ($_SERVER['REQUEST_URI']=="/".$prepath."visitors.html") or (strstr($_SERVER['REQUEST_URI'], "inbox.html")) or ($_SERVER['REQUEST_URI']=="/".$prepath."outbox.html") or ($_SERVER['REQUEST_URI']=="/".$prepath."visitors.html") or ($_SERVER['REQUEST_URI']=="/".$prepath."to_meet.html") or ($_SERVER['REQUEST_URI']=="/".$prepath."favorite.html") ){ $LeftMenu="
"; } $News=""; if($page['IsIndex']==1){ $r=mysql_query("SELECT * FROM ".$Db_Prefix."_news ORDER BY Date DESC LIMIT 0, 5"); if(!$r){die(mysql_error());} for($i=0; $i"; } } $r=mysql_query("SELECT * FROM ".$Db_Prefix."_members WHERE Active='1' ORDER BY RAND() LIMIT 0, 3"); if(!$r){die(mysql_error());} for($i=0; $i"; if($user['ID']!=$mas['ID']){ $ss=""; if( ($close) and ($user['ID']) ){ $ss=""; } if(!$user['ID']){$inf=" ";} else{ $inf=" $ss "; } } if($user['ID']){ $r1=mysql_query("SELECT ID FROM ".$Db_Prefix."_visitors WHERE F1='".$user['ID']."' AND F2='".$mas['ID']."' AND IsFavorite='1'"); if(!$r1){die(mysql_error());} $mas1=mysql_fetch_array($r1); if($mas1['ID']){ //$ic.=" "; $ic.="Fav "; } } $a=explode("#", UserGetXML($mas['Data'], "ATheme1_DopPay")); $is=0; for($i1=0; $i1 ";} if($is){$ic2.="\$ ";} $a=UserGetXML($mas['Data'], "ATheme1_Summa"); $is=0; if($a>0){$is=1;} if($is){$ic2.=" ";} $Right.="
".stripslashes($mas['Name'])."
".GetXML($my_AgeText).": ".CalculateAge(UserGetXML($mas['Data'], "BirthdayDay"), UserGetXML($mas['Data'], "BirthdayMonth"), UserGetXML($mas['Data'], "BirthdayYear"))."
$inf
".stripslashes($mas['Name'])."
".GetXML($my_AgeText).": ".CalculateAge(UserGetXML($mas['Data'], "BirthdayDay"), UserGetXML($mas['Data'], "BirthdayMonth"), UserGetXML($mas['Data'], "BirthdayYear"))."
$inf
Code: ".$mas['ID']."
".UserGetXML($mas['Data'], "Country").", ".UserGetXML($mas['Data'], "CityLive")."
".GetXML($my_Figure_desc).": ".UserGetXML($mas['Data'], "Weight")."kg/".UserGetXML($mas['Data'], "Height")."cm
".GetXML($my_Children).": ".IsChild($mas['Data'])."
".GetXML($my_Languages_desc).": ".GetLanguages($mas['Data'])."
".GetXML($my_Profession_desc).": ".UserGetXML($mas['Data'], "Profession")."
".GetXML($my_ShortInfoTargets_desc).": ".$ic.$ic2."

"; /*
".$dop[8][0].": ".$dop[8][1]."
".GetXML($my_Countries_desc)." ".GetXML($my_CityLive).": " Профессия: Учитель Языки: англ.(2), нем.(5), рус.(3) Мои цели: тут пиктограммки Интим: тоже как-то обозначить )) */ } $PageHeader=stripslashes($page['Header']); $page['Text']=str_replace("{GlobalPath}", $GlobalPath, $page['Text']);// $PageText=stripslashes($page['Text']); $History=""; $mas=$page; $link="page".$mas['ID'].".html"; if($mas['wLink']){$link=$mas['wLink'].".html";} if(strstr($mas['wLink'], "http:")){$link=$mas['wLink'];} if($mas['IsIndex']){$link="/";} //$hst[]=" → ".$mas['Name'].""; $hst[]=" → ".$mas['Name'].""; while( ($mas['Parent']) and ($mas['Parent']!="99999") ){ $r=mysql_query("SELECT ID,Name,IsIndex,wLink FROM ".$Db_Prefix."_pages WHERE ID='".$mas['Parent']."'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $link="page".$mas['ID'].".html"; if($mas['wLink']){$link=$mas['wLink'].".html";} if(strstr($mas['wLink'], "http:")){$link=$mas['wLink'];} if($mas['IsIndex']){$link="/";} $hst[]=" → ".$mas['Name'].""; } $hst[]=" Главная"; for($i=count($hst)-1; $i>=0; $i--){$History.=$hst[$i];} array_splice($hst, 0, count($hst)); 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; $kstrlen($PageText)){$stop=1;} $a=strtolower(substr($PageText, $i, 3)); if($a=="src"){$find=$i+4;} if($PageText[$i]==">"){$stop=1;} } } if($find>=0){ //find for end of src $i=$find; $stop=0; while(!$stop){ $i++; if($i>strlen($PageText)){$stop=1;} if($PageText[$i]=="\""){$stop=1;} if($PageText[$i]==" "){$stop=1;} } $src=str_replace("\"", "", substr($PageText, $find, ($i-$find))); } $PageText=str_replace($src, "show_foto.php?File=images/upload/".basename($src)."&Width=70&Height=70", $PageText); } $ImageBig=$out[1][$k]; $s=@getimagesize("images/upload/$ImageBig"); $w=""; $h=""; if($s[0]){$w="width=".($s[0]+25).", "; $h="height=".($s[1]+25).", "; } $frm="onclick=\"var w=window.open('images/upload/$ImageBig', '', '$w $h toolbars=0, scrollbars=0, top=50, left=100');\" style='cursor: pointer;'"; $PageText=str_replace("onclick=\"".$out[0][$k]."\"", $frm, $PageText); } } //structures if($page['Structure']){ $out=""; if(!$st_param){ $r=mysql_query("SELECT * FROM ".$Db_Prefix."_structure WHERE ID='".stripslashes($page['Structure'])."'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); //fID } else{ $r=mysql_query("SELECT sID, Text FROM ".$Db_Prefix."_structure_field_data WHERE ID='".$st_param."'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); $st_value=stripslashes($mas['Text']); $a=$mas['sID']; $r=mysql_query("SELECT * FROM ".$Db_Prefix."_structure WHERE Parent='".$mas['sID']."'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); //fID if(!$mas['ID']){ $r=mysql_query("SELECT * FROM ".$Db_Prefix."_structure WHERE ID='".$a."'"); if(!$r){die(mysql_error());} $mas=mysql_fetch_array($r); //fID $st_info=1; } } $stTop=html_entity_decode(stripslashes($mas['ShablonTop']), ENT_QUOTES); $stGen=html_entity_decode(stripslashes($mas['Shablon']), ENT_QUOTES); $stDown=html_entity_decode(stripslashes($mas['ShablonDown']), ENT_QUOTES); $Begin=intval($Begin); $Kol=10000; $sql=($st_value!="") ? " AND Text='$st_value' " : ""; //top if($mas['Kol']){ $Kol=$mas['Kol']; $r=mysql_query("SELECT DISTINCT ID FROM ".$Db_Prefix."_structure_field_data WHERE sID='".($mas['ID'])."' $sql"); if(!$r){die(mysql_error());} $Pages=ceil(mysql_num_rows($r)/$Kol); if($Pages>1){ $r=mysql_query("SELECT * FROM ".$Db_Prefix."_structure WHERE ID='".$mas['Parent']."'"); if(!$r){die(mysql_error());} $mas1=mysql_fetch_array($r); //fID $pgs="
Страницы: "; for($i=1; $i<=$Pages; $i++){ $b1=$i*$Kol-$Kol; $b2=$i*$Kol; $s=($b1==$Begin) ? "" : ""; $pgs.="$s$i  "; } $stTop=$pgs; } } else{ $stTop=str_replace("{{st_Pager}}", "", $stTop); } //main block if(!$st_info){ $r=mysql_query("SELECT DISTINCT ID FROM ".$Db_Prefix."_structure_field_data WHERE sID='".($mas['ID'])."' $sql ORDER BY ID LIMIT $Begin, $Kol"); if(!$r){die(mysql_error());} $items=mysql_num_rows($r); $out=""; for($i=0; $i"; } if($mas3['Tip']==5){ $mas2['Text']="".$mas2['Text'].""; } $a=str_replace("{{st_".$mas3['VarName']."}}", $mas2['Text'], $a); $a=str_replace("{{st_ItemLink}}", "pg_".$mas['VarName'].$mas1['ID'].".html", $a); } $out.=$a; } $stGen=$out; } else{ $stTop=""; $stDown=""; $sTitle=""; $stGen=html_entity_decode(stripslashes($mas['ShablonInfo']), ENT_QUOTES); $out=""; $r1=mysql_query("SELECT * FROM ".$Db_Prefix."_structure_field_data WHERE ID='".$st_param."'"); if(!$r1){die(mysql_error());} $a=$stGen; for($i1=0; $i1"; } if($mas3['Tip']==5){ $mas2['Text']="".$mas2['Text'].""; } if($mas3['IsTitle']==1){$sTitle=stripslashes($mas2['Text']);} $a=str_replace("{{st_".$mas3['VarName']."}}", stripslashes($mas2['Text']), $a); $a=str_replace("{{st_ItemLink}}", "pg_".$mas['VarName'].$mas1['ID'].".html", $a); } $out.=$a; $stGen=$out; $is_inside=1; } //down if($mas['Kol']){ $stDown=str_replace("{{st_Pager}}", $pgs, $stDown); } else{ $stDown=str_replace("{{st_Pager}}", "", $stDown); } $PageText=($is_inside==1) ? $stTop.$stGen.$stDown : $PageText.$stTop.$stGen.$stDown; $PageHeader=($is_inside==1) ? "" : $PageHeader; $page['Title']=($is_inside==1) ? $sTitle : $page['Title']; } // searching for img if(strstr($PageText, "[img")){ preg_match_all("!\[img:(.*?)\]!si",$PageText,$out, PREG_PATTERN_ORDER); for($k=0; $k$s[1]){$w="Width=100";}else{$w="Height=100";} if($s[0]){$w1="width=".($s[0]+25).", "; $h1="height=".($s[1]+25).", "; } $frm=""; //$PageText=str_replace("[img:".$out[1][$k]."]", $frm, $PageText); $PageText=str_replace("[img:".$out[1][$k]."]", "", $PageText); } } // searching for links if(strstr($PageText, "[link")){ preg_match_all("!\[link:(.*?)\]!si",$PageText,$out, PREG_PATTERN_ORDER); for($k=0; $k".$a[1]."", $PageText); } } // searching for urls if(strstr($PageText, "[url")){ preg_match_all("!\[url:(.*?)\]!si",$PageText,$out, PREG_PATTERN_ORDER); for($k=0; $k3){$s.=":";} $s.=$a[$i]; } //a[0] - width, [1] - height, [2] - header, s - link $PageText=str_replace("[url:".$out[1][$k]."]", "".$a[2]."", $PageText); } $PageText.=""; } if($page['Link']!=""){require($page['Link']);} if($user['ID']){ $mas=mysql_fetch_array(mysql_query("SELECT COUNT(ID) FROM ".$Db_Prefix."_messages WHERE ToUser='".$user['ID']."' AND IsRead='0'")); if($mas[0]){ $s=GetXML($my_MessageAlert); $s=str_replace("X", $mas[0], $s); $PageText="
$s
".$PageText; } } if(strstr($PageText, "[Menu")){ $pg=""; preg_match_all("!\[Menu=(.*?)\](.*?)\[/Menu\]!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); } } $PageText=str_replace("{GlobalPath}", $GlobalPath, $PageText);// if($page['Foto']!=""){ $PageText="
$PageText
"; } if($user['ID']){ $s=""; if($page['Link']=="catalog.php"){if($id==$user['ID']){$s="";}} $MProfile="$s".GetXML($my_MyProfileLink).""; $a=explode("\n", str_replace("\r", "", GetXML($my_LanguageTranslate))); $b=UserGetXML($user['Data'], "MyLanguage"); for($i=0; $i