Новогодняя елка
echo $dt; ?>!
$sg = 1; //Если есть подарки if((date('n',time())==12 || date('n',time())<=2) && $sg==1) { ?>
Подарки:
$smt = $u->testAction('`uid` = "'.$u->info['id'].'" AND `time` > '.(time()-600).' AND `vars` = "use_cupNewYear" LIMIT 1',1);
?>
/>
if( date('m') == 12 || (date('m') == 1 && date('d') <= 8)) {
$pd = $u->testAction('`uid` = "'.$u->info['id'].'" AND `time` > '.(time()-600).' AND `vars` = "take_gift'.$dt.'" LIMIT 1',1);
?>
/>
} ?>
} //ТУТ Елка // if($u->info['admin']>0) // { ?>
Наряжаем Ёлку:
$it = mysql_fetch_array(mysql_query(' SELECT * FROM `items_users` WHERE `item_id` > 2723 AND `item_id` < 2741 AND `uid`= "'.$u->info['id'].'" AND `delete` = 0 LIMIT 1 '));
if (isset($it['item_id']))
{
$itt = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$it['item_id'].'" LIMIT 1'));
?>
/>
}
else { echo "У Вас нет шаров для украшения Ёлки!";}
?>
// } if(isset($_GET['page'])) { $fpage = round($_GET['page']); if($fpage<=0) { $fpage = 1; } }else{ $fpage = 1; } $limit1 = ($fpage-1)*20+$fpage-1; $limit2 = 21; $i = mysql_fetch_array(mysql_query('SELECT COUNT(`year`) FROM `elka` WHERE `year` = "'.$dt.'" AND (`delete` = "0" OR '.$u->info['admin'].' > 0) ORDER BY `id` DESC')); $i = $i[0]; $d = ceil($i/21); if($i>0) { if($d<13) { $j=0; $pagesN = ''; while($i>=0) { $i -= 21; if($i!=0) { $j++; $r2 = ''; if($j<=$d) { if(isset($r)) { $r2 = '&r='.$r; } $jt = $j; if($fpage==$j) { $jt = ''.$j.''; } $pagesN .= ' '.$jt.' '; } } } $pages .= ' '.$pagesN.' '; }else{ $j = $fpage-6; $i = 0; $pagesN = ''; while($k<13) { if($j>0) { if($j<=$d) { $jt = $j; if($fpage==$j) { $jt = ''.$j.''; } $pagesN .= ' '.$jt.' '; } $k++; } $j++; } $prpage = $fpage-12; $nxpage = $fpage+12; if($prpage<=0) { $prpage = 1; } if($nxpage>$d) { $nxpage = $d; } $_GET['d'] = (int)$_GET['d']; if($fpage-7>0) { $pages .= '« ... '; } $pages .= ' '.$pagesN.' '; if($fpage<$d-5) { $pages .= '... »'; } } }else{ $pages = ''; } ?> Посетители оставили надписи на стволе елки: echo $pages; ?>
$sp = mysql_query('SELECT * FROM `elka` WHERE `year`="'.$dt.'" AND `city`="'.$u->info['city'].'" AND (`delete` = "0" OR '.$u->info['admin'].' > 0) ORDER BY `time` DESC LIMIT '.$limit1.','.$limit2.'');
$page = floor((int)$_POST['page']);
if($page<1){ $page = 1; }elseif($page>300){ $page==300; }
while($pl = mysql_fetch_array($sp))
{
$prs = explode('|',$pl['pers']); $pers = '';
if($prs[0]!=0)
{
$pers .= '';
}
if($prs[1]!=0)
{
$clanPrs = mysql_fetch_array(mysql_query('SELECT * FROM `clan` WHERE `id`="'.$prs[1].'" LIMIT 1'));
$pers .= '';
}
$pers .= ''.$prs[2].'['.$prs[3].']';
if($pl['delete']!='0')
{
if($pl['delete']=='1')
{
if($u->info['admin']>0)
{
$pl['text'] = 'Сообщение стерто ('.$pl['text'].')';
}else{
$pl['text'] = 'Сообщение стерто';
}
}else{
$prs = explode('|',$pl['delete']); $pers2 = '';
if($prs[0]!=0)
{
$pers2 .= '';
}
if($prs[1]!=0)
{
$clanPrs = mysql_fetch_array(mysql_query('SELECT * FROM `clan` WHERE `id`="'.$prs[1].'" LIMIT 1'));
$pers2 .= '';
}
$pers2 .= ''.$prs[2].'['.$prs[3].']';
if($u->info['admin']>0 || ($u->info['align']>1 && $u->info['align']<2) || ($u->info['align']>3 && $u->info['align']<4))
{
$pl['text'] = 'Сообщение стерто персонажем '.$pers2.' ('.$pl['text'].')';
}else{
$pl['text'] = 'Сообщение стерто персонажем '.$pers2.'';
}
}
}
if(($u->info['admin']>0 || ($u->info['align']>1 && $u->info['align']<2) || ($u->info['align']>3 && $u->info['align']<4)) && $pl['delete']=='0')
{
$dl = ' Стереть';
}else{
$dl = '';
}
echo ''.date('d.m.Y H:i',$pl['time']).' '.$pers.' - '.$pl['text'].''.$dl.'
Страницы: echo $pages; ?>'; } ?> |
|