Просмотр поста

.
TalkingTom

Ustanovlen skript lider dnya. I oshibka v glavnuyu, kogda ya pisal include 'lider/main.php'
est kakoy to oshibka?

/**
Jane, icq: 355-350-450, http://4erti.ru
 */
$count_us = mysql_result(mysql_query("select count(`id`) from `lider` where `time` >= '".time()."' and `user_id` = '".$user_id."'"),0);
echo '<div class="phdr"> <a href="lider/index.php">Kun Liderlari</a> ' .($count_us ? '' : '<small>| <a href="lider/index.php?act=get">liderlik olish</a>' ) . '</small></div>';
echo '<div class="menu">';
$count = mysql_result(mysql_query("select count(*) from `lider` where `time` >= '".time()."'"),0);

if($count> 0) {
$sets1 = explode('|', file_get_contents('lider/sets.dat'));
$req = mysql_query("select * from `lider` where `time` >= '".time()."' order by rand() limit 1");
$res = mysql_fetch_array($req);
$us = mysql_fetch_array(mysql_query("SELECT `name`, `yearofbirth`, `dayb`, `monthb` FROM `users` WHERE `id` = '" . $res['user_id'] . "' LIMIT 1"));
echo '<table><tr>';
if ($sets1[1]) {
if (file_exists('files/users/photo/' . $res['user_id'] . '_small.jpg')) 
echo '<td><img src="../files/users/photo/' . $res['user_id'] . '_small.jpg"  border="0" width="60"/></td>';
else 
echo '<td><img src="lider/no_photo.jpg" border="0" width="60"/></td>';

}
echo '<td><a href ="../users/profile.php?user='.$res['user_id'].'">' . functions::checkout($us['name']). '</a>';
if ($sets1[2]) {
if (!$us['yearofbirth'] or !$us['monthb'] or !$us['dayb']) 
$a = 0;
else {
$r = mktime(0, 0, 0, $us['monthb'], $us['dayb'], $us['yearofbirth']);  
$age = (time()-$r)/31536000; 
list($a) = explode(".",$age);   
}
echo ', '.$a;
}
echo '<br /><i>' . functions::checkout($res['text']) .'</i>' ;
echo '</td></tr></table></div>';

}