Просмотр файла public_html/znak/search.php

Размер файла: 3.41Kb
<?php
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php"; 


$text = @file("../local/profil/$log.prof"); 
if ($text!=""){
$udata = explode(":||:",$text[0]);
$provlog=trim($udata[0]);
$provpar=trim($udata[1]);
$privat=trim($udata[10]);}


//begin
if ($loc == "search"){
if($themes!=="WML"){	

echo"<form method=\"post\" action=\"search.php?loc=obr\">";

print "<b>&#x41F;&#x43E;&#x438;&#x441;&#x43A; &#x430;&#x43D;&#x43A;&#x435;&#x442;:</b><br>";
print "&#x42F; &#x438;&#x449;&#x443;";
print "<select name=\"sex\" title=\"===\">";
print "<option value=\"m\">&#x41F;&#x430;&#x440;&#x43D;&#x44F;</option>";
print "<option value=\"zh\">&#x414;&#x435;&#x432;&#x443;&#x448;&#x43A;&#x443;</option></select><br>"; // &#x43F;&#x43E;&#x43B;
print "&#x412;&#x43E;&#x437;&#x440;&#x430;&#x441;&#x442;:<br>";
print "<input type=\"text\" name=\"age\"  format=\"*N\" maxlength=\"2\"/><br>";
print "<input value=\"&#x41D;&#x430;&#x439;&#x442;&#x438;!\" name=\"do\" type=\"submit\"></form>";
}else{

print "<b>&#x41F;&#x43E;&#x438;&#x441;&#x43A; &#x430;&#x43D;&#x43A;&#x435;&#x442;:</b><br>";
print "&#x42F; &#x438;&#x449;&#x443;";
print "<select name=\"sex\" title=\"===\">";
print "<option value=\"m\">&#x41F;&#x430;&#x440;&#x43D;&#x44F;</option>";
print "<option value=\"zh\">&#x414;&#x435;&#x432;&#x443;&#x448;&#x43A;&#x443;</option></select><br>"; // &#x43F;&#x43E;&#x43B;
print "&#x412;&#x43E;&#x437;&#x440;&#x430;&#x441;&#x442;:<br>";
print "<input type=\"text\" name=\"age\"  format=\"*N\" maxlength=\"2\"/><br>";

echo"<anchor>OK
<go href=\"search.php?loc=obr\" method=\"post\">
<postfield name=\"age\" value=\"$(age)\"/>
<postfield name=\"sex\" value=\"$(sex)\"/>
</go>
</anchor><br>";}

print "<br><a href=\"index.php\">&#x41C;&#x435;&#x43D;&#x44E;</a>";



}
if ($loc == "obr"){
$file = @file("$sex.txt");
$total = count($file);   ////////// c&#x447;&#x438;&#x442;&#x430;&#x435;&#x43C; &#x441;&#x43A;&#x43E;&#x43B;&#x44C;&#x43A;&#x43E; &#x441;&#x442;&#x440;&#x43E;&#x43A; &#x432; &#x444;&#x430;&#x439;&#x43B;&#x435;
// &#x41D;&#x430;&#x447;&#x430;&#x43B;&#x43E;
if (empty($_GET['start'])) $start = 0;
else $start = $_GET['start'];
if ($total < $start + 40){ $end = $total; }
else {$end = $start + 40; }
for ($i = $start; $i < $end; $i++){

$file = @file("$sex.txt");
$file = array_reverse($file);
$data = explode(":::",$file[$i]);
$id = $data[3];
if ($data[2] == $age){ print "<a href=\"look_user.php?id=$id\">$data[1]</a> <b>$data[2]</b> <br>";}
}
print "-----<br>";
// &#x412;&#x44B;&#x432;&#x43E;&#x434;&#x438;&#x43C; &#x441;&#x441;&#x44B;&#x43B;&#x43A;&#x438; &#x43D;&#x430; &#x441;&#x43B;&#x435;&#x434;&#x443;&#x44E;&#x449;&#x438;&#x435; &#x438; &#x43F;&#x440;&#x435;&#x434;&#x44B;&#x434;&#x443;&#x449;&#x438;&#x435; &#x441;&#x442;&#x440;&#x430;&#x43D;&#x438;&#x446;&#x44B;
if ($start != 0) echo " <a href=\"search.php?loc=obr&amp;age=$age&amp;sex=$sex&amp;start=".($start - 40)."\">&#x41D;&#x430;&#x437;&#x430;&#x434;</a>|";
if ($total > $start + 40) echo " <a href=\"search.php?loc=obr&amp;age=$age&amp;sex=$sex&amp;start=".($start + 40)."\">&#x414;&#x430;&#x43B;&#x435;&#x435;</a> \n";
}
//end

include_once"../themes/$config_themes/foot.php";
?>