\n";
print $fsize1;
$r = mysql_query("select count(readd) as num from zapiski WHERE (idtowhom = '" . $id . "')and(readd = '0')and(ininc = '1');");
$a = mysql_fetch_array($r);
$inb = $a["num"];
if ($inb != "0")
echo "
Записки:(" . $inb . ")\n";
echo "
•";
echo "
Обновить";
$r = mysql_query("select count(readd) as num from zapiski WHERE (idwho = '" . $id . "')and(readd = '0')and(insend = '1')");
$a = mysql_fetch_array($r);
$out = $a["num"];
echo "
Непрочитанные:(" . $out . ")\n";
$tm = time() - 1200;
$pr_count = @mysql_query("SELECT id,user,inv,level,birth FROM users WHERE onl> '" . $tm . "' AND room='letters' group by user order by onl desc;");
$kol = mysql_affected_rows();
for ($k = 0; $k < $kol; $k++) {
$pdc = @mysql_fetch_array($pr_count);
$user = $pdc["user"];
$nk = $pdc["id"];
$inv = $pdc["inv"];
$lev = $pdc["level"];
$d = date("d-m-");
$y = date("Y");
$birth = $pdc["birth"];
$d1 = substr($birth, 0, 2);
$m1 = substr($birth, 4, 2);
$y1 = substr($birth, 6, 4);
if ($y > $y1)
$age = $y - $y1;
else
$age = "(bilinmir)";
if ((!$age) || ($age == 0) || ($age == "") || ($age > $y))
$age = "(bilinmir)";
else
$age = "(
" . $age . ")\n";
if ($inv != 1) {
echo "
" . $user . "" . $age;
} else {
if ($row["level"] > 4) {
echo "
" . $user . "(i)" . $age;
}
}
if (($k + 1) != $kol)
print ', ';
}
if ($kol > 0)
echo "
";
unset($pdc);
echo $divide;
print $fsize1;
$tm = time() - 1200;
$userall = mysql_query("select count(id) as num from users where onl> '" . $tm . "';");
$usm = mysql_fetch_array($userall);
$num = $usm["num"];
echo "
Знакомстве:($num)";
$tm = time() - 1200;
$usersm = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where sex='K' and onl> '" . $tm . "'"));
echo "П:
" . $usersm[0] . "\n";
echo "
|";
$tm = time() - 1200;
$usersj = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where sex='Q' and onl> '" . $tm . "'"));
echo "Ж:
" . $usersj[0] . "\n";
print $fsize2;
$tm = time() - 1200;
$userall = mysql_query("select count(id) as num from users where onl> '" . $tm . "';");
$usm = mysql_fetch_array($userall);
$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 $fsize1;
echo $fsize2;
$tm = time() - 1200;
$r = mysql_query("select id,user,inv,level,birth,sex from users where onl> '" . $tm . "' group by user order by onl desc limit $o,$do");
for ($i = $ot; $i <= $do; $i++) {
$arr = mysql_fetch_assoc($r);
$login = $arr['user'];
$usid = $arr['id'];
$inv = $arr['inv'];
$level = $arr['level'];
$sex = $arr["sex"];
$d = date("d-m-");
$y = date("Y");
$birth = $arr["birth"];
$d1 = substr($birth, 0, 2);
$m1 = substr($birth, 4, 2);
$y1 = substr($birth, 6, 4);
if ($y > $y1)
$age = $y - $y1;
else
$age = "(нету)";
if ((!$age) || ($age == 0) || ($age == "") || ($age > $y))
$age = "(bilinmir)";
else
$age = "(лет
" . $age . ")\n";
print $fsize1;
$msg = str_replace($us . ",", "
" . $us . ",", $msg);
if ((file_exists("anim_niks/" . $usid . ".gif")) && $row["resdng"] < 1) {
if ($inv != 1) {
echo ($i) . ")
" . $age . " (" . $sex . ")
";
}
} else {
echo ($i) . ")
" . $login . " " . $age . " (" . $sex . ")
";
}
print $fsize2;
}
$next = $s + 1;
$prev = $s - 1;
if ($num > $do) {
$ot = (($next - 1) * 10) + 1;
$do = $next * 10;
if ($do > $num)
$do = $num;
echo $divide;
echo $fsize1;
echo "
>>$ot-$do>>\n";
echo $fsize2;
}
if ($s > 1) {
$ot = (($prev - 1) * 10) + 1;
$do = $prev * 10;
echo $fsize1;
echo "
<<$ot-$do<<\n";
echo $fsize2;
}
break;
case 'votes':
if ($id == $nk) {
if ($ver == "wml")
echo "
\n";
else
echo "
\n";
echo $fsize1;
echo "Вы не можете отценить фотку!
";
print $fsize2;
} else {
if ($row["posts"] < 50) {
if ($ver == "wml")
echo "
\n";
else
echo "
\n";
echo $fsize1;
echo "У вас нету 50 постов для отценки.!";
print $fsize2;
} else {
mysql_query("Select * from golos where user='" . $nk . "' and who='" . $id . "'");
if (mysql_affected_rows() != 0) {
if ($ver == "wml")
echo "
\n";
else
echo "
\n";
echo $fsize1;
echo "Вы уже отценили.
";
echo $fsize2;
} else {
$q = mysql_query("select user,votefoto from users where id='" . $nk . "';");
$data = mysql_fetch_array($q);
$counter = $data['votefoto'];
$login = $data['user'];
$counter2 = $counter + 1;
mysql_query("update users set votefoto='" . $counter2 . "' where id='" . $nk . "';");
mysql_query("INSERT INTO golos SET user = '" . $nk . "', who = '" . $id . "'");
if ($ver == "wml")
echo "
\n";
else
echo "
\n";
echo $fsize1;
echo "Ваша отценка принята!
";
echo $fsize2;
mysql_close($link);
}
}
}
break;
}
print $fsize1;
echo $divide;
echo "
Кто где?\n";
echo "
Письма($inb)";
echo "
Личный Kabinet";
echo "
Поиск";
echo $divide;
echo "
Прихожая\n";
echo $fsize2;
echo "";