View file wapp_antifront.com/dating/search.php

File size: 2.61Kb
<?

require("inc.php");

##------------------------------ заголовок -----------------------------------##
header("Content-type:text/vnd.wap.wml;charset=utf-8");
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
print "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">";
print "<wml>";
print "<card id=\"index\" title=\"$title\">";
print "$sindex";
print "$swapshop";
print "<p>";
##-----------------------------------------------------------------------------##

#####################################################

if ($loc == "search"){
print "<small><b>&#x41F;&#x43E;&#x438;&#x441;&#x43A; &#x430;&#x43D;&#x43A;&#x435;&#x442;:</b></small>";
print "<small><br/>&#x42F; &#x438;&#x449;&#x443;</small>";
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>"; // пол
print "<br/><small>&#x412;&#x43E;&#x437;&#x440;&#x430;&#x441;&#x442;:</small>";
print "<br/><input type=\"text\" name=\"age\"  format=\"*N\" maxlength=\"2\"/>";
print "<br/><anchor title=\"ok\">&#x418;&#x441;&#x43A;&#x430;&#x442;&#x44C;
<go href=\"search.php?loc=obr\" method=\"post\">";
print "<postfield name=\"sex\" value=\"$(sex)\"/>";   //////    пол
print "<postfield name=\"age\" value=\"$(age)\"/>";   ///////// возраст
print "</go></anchor>";
}


if ($loc == "obr"){





$file = @file("$sex.txt");
$total = count($file);   ////////// cчитаем сколько строк в файле
// Начало
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];
print "$line";
if ($data[2] == $age){ print "<br/><small><a href=\"look_user.php?id=$id\">$data[1]</a> $data[2] &#x041B;&#x0435;&#x0442;</small>";}
}

// Выводим ссылки на следующие и предыдущие страницы
if ($start != 0) echo " <br/><small><a href=\"search.php?loc=obr&amp;age=$age&amp;sex=$sex&amp;start=".($start - 40)."\">&#x41D;&#x430;&#x437;&#x430;&#x434;</a>|</small>";
if ($total > $start + 40) echo " <br/><small><a href=\"search.php?loc=obr&amp;age=$age&amp;sex=$sex&amp;start=".($start + 40)."\">&#x414;&#x430;&#x43B;&#x435;&#x435;</a></small> \n";


}

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

print "</p></card></wml>";
?>