Файл: region_clean/znak/woman.php
Строк: 71
<?
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################
require_once "../start.php";
require_once "../sid.php";
header("Cache-Control: no-cache");
if ($ver == "wml") header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else header("Content-Type:text/html; charset=UTF-8");
require_once "../inc.php";
$link = connect_db();
list($row, $id, $ps, $fsize1, $fsize2) = check_login($link);
require_once "../version.php";
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>
<card id="city" title="Знакомства">
<p>";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="../css/$css.css"/>
<title>Знакомства</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">n";
}
$userm = mysql_query ("select count(id) as num from users where sex ='Ж'");
$usm = mysql_fetch_array($userm);
$num = $usm['num'];
if (!isset($s)) $s = 0;
$mx = round(($num/10)+0.45);
if ($s > $mx) $s = $mx;
if ($s == 0) $s = 1;
$ot = (($s - 1) * 10) + 1;
$do = $s * 10;
if ($do > $num) $do = $num;
$o = $ot - 1;
$n = $ot;
if ($do == 0) $n = $o;
echo "$n-$do из $num<br/>n";
echo '--------<br/>';
$o = intval($o);
$do = intval($do);
$r = mysql_query ("select id,user from users where sex ='Ж' and level<'4' order by posts desc limit $o,$do");
for ($i = $ot; $i <= $do; $i++) {
$arr = mysql_fetch_array($r);
$login = $arr['user'];
$usid = $arr['id'];
$Select = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id`='$usid'"));
$birth = $Select['birth'];
$birth = explode("-",$birth);
$d = $birth[0];
$m = $birth[1];
$g = $birth[2];
if ($d != NULL and $m != NULL and $g != NULL) {
if ($m == 1);
elseif ($m == 2);
elseif ($m == 3);
elseif ($m == 4);
elseif ($m == 5);
elseif ($m == 6);
elseif ($m == 7);
elseif ($m == 8);
elseif ($m == 9);
elseif ($m == 10);
elseif ($m == 11);
elseif ($m == 12);
$birth = date("Y")-$g;
if (date("n") < $m) $birth = $birth-1;
elseif (date("n") == $m and date("j") < $d) $birth = $birth-1;
}
echo ($i).") <a href="../info.php?$ses&nk=$usid&ref=$ref"><b>".col_n($login)."</b></a> (".$birth.")<br/>";
}
$next = $s + 1;
$prev = $s - 1;
if ($num > $do) {
$ot = (($next - 1) * 10) + 1;
$do = $next * 10;
if ($do > $num) $do = $num;
echo '--------<br/>';
echo "<a href="woman.php?$ses&s=$next&ref=$ref">>>$ot-$do>></a><br/>n";
}
if ($s > 1) {
$ot = (($prev - 1) * 10) + 1;
$do = $prev * 10;
echo '--------<br/>';
echo "<a href="woman.php?$ses&s=$prev&ref=$ref"><<$ot-$do<<</a><br/>n";
}
echo '<br/><div class="d1"><a href="index.php?'.$ses.'&ref='.$ref.'">Знакомства</a></div>';
include_once '../foot.php';
?>