<?php
/*
Скрипт ICQ пирамиды для JohnCMS 3.0
Автор: Максим (simba)
ICQ: 61590077
Сайт: http://symbos.su http://wapmastera.ru
R866920725287
Z117468354234
*/

define('_IN_JOHNCMS', 1);

////// количество //////
function pir_count(){
  $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `piramidka`"), 0);  
  return $total;  
}

///// Вывод последних номеров //////
function out_number($col){
 $zap = mysql_query("SELECT * FROM `piramidka` ORDER BY `date` DESC LIMIT " . $col);
 $out = '';
 while ($arr = mysql_fetch_array($zap)) {
            $date = date("d.m.Y", $arr['date']);
        $out = $out.'<div class="menu"><img src="http://web.icq.com/whitepages/online?icq=' . $arr['uin'] . '&amp;img=5" width="18" height="18" alt="icq" align="middle"/>&nbsp;<b>'.$arr['uin'].'</b> - '.$date.'<div class="sub">Имя: '.$arr['name'].' - Город: '.$arr['city'].'</div><div class="sub">'.$arr['kom'].'</div></div>';
        }   
    
   return $out; 
    
}




?>