Файл: beest.php
Строк: 45
<?php
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
$set['title']='Знакомства';
include_once '../sys/inc/thead.php';
title();
err();
aut();
echo 'Лучшая девушка:';
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user`"), 0) == 0) {
echo 'Пользователей нет';
}else{
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `pol` = '0'"), 0) == 0) {
echo 'Девушки нет';
}else{
$female = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `pol` = '0' ORDER BY `rating` DESC LIMIT 1"));
echo "<br/>n";
avatar($female['id']);
echo '<br />';
echo "".online($female['id'])." ";
echo "<a href='/info.php?id=$female[id]'>$female[nick]</a>";
echo "".medal($female['id'])."";
echo "<br />";
if ($female['privet']!=NULL)echo esc(trim(br(smiles(stripcslashes(htmlspecialchars($female['privet']))))))."<br />n";
else
echo "";
echo "</div>n";
}
echo 'Лучший парень:</div>';
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `pol` = '1'"), 0) == 0) {
echo 'Парня нет';
}else{
$male = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `pol` = '1' ORDER BY `rating` DESC LIMIT 1"));
echo "<br/>n";
avatar($male['id']);
?>