Файл: static.php
Строк: 54
<?php
////////////////////////////////////////
///// Основа ApiCMS //////
///// Автор биллинга - IvanDanilov /////
///// Автор биллинга - IvanDanilov /////
///// ICQ 936545, mail: KyberID@ya.ru //
////////////////////////////////////////
///////////////////////////////////
$title = 'Главная';
require_once 'api_core/apicms_system.php';
require_once 'api_core/head.php';
$counts_form = mysql_result(mysql_query("SELECT COUNT(*) FROM `api_forum_theme`"), 0);
echo'<div class="content"> Последние 7 тем на форуме (Из '.$counts_form.')</div>';
$themos = '7'; /////количество тем которые выводим
$last_theme = mysql_query("SELECT * FROM `api_forum_theme` WHERE `close` = '0' ORDER BY time DESC LIMIT ".$themos."");
while ($themes = mysql_fetch_assoc($last_theme)){
$counts = mysql_result(mysql_query("SELECT COUNT(*) FROM `api_forum_post` WHERE `theme` = '$themes[id]'"), 0);
echo '<a class="subhead" href="/api_forum/theme.php?id='.$themes['id'].'"><img src="/design/profile/razdel.png" alt=""> '.htmlspecialchars($themes['name']).' <span style="float:right"> '.$counts.'</span> </a>';
}
$counts_reg = mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"), 0);
echo'<div class="content"> Последние 3 регистраций (Из '.$counts_reg.')</div>';
$lastreg = '3'; /////количество тем которые выводим
$last_reg = mysql_query("SELECT * FROM `users` ORDER BY regtime DESC LIMIT ".$lastreg."");
while ($lregse = mysql_fetch_assoc($last_reg)){
if ($lregse['isp_akt']==1){
//<table width="50%" cellpadding="0" border="0" cellspacing="0"><tbody><tr><td width="100%"></td></tr></tbody></table>
echo "<div class='subhead'> <img src='/images/akt_1.png' alt=''> <a href=http://".htmlspecialchars($lregse['login']).".".$siteisp."/><img src='/images/www.png' alt=''></a> <a href='/profile.php?id=".$lregse['id']."'>".htmlspecialchars($lregse['login'])."</a> </div>";
}else{
echo "<div class='subhead'> <img src='/images/akt_0.png' alt=''> <a href=http://".htmlspecialchars($lregse['login']).".".$siteisp."/><img src='/images/www.png' alt=''></a> <a href='/profile.php?id=".$lregse['id']."'>".htmlspecialchars($lregse['login'])."</a> </div>";
}
}
$counts_akt = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `isp_akt` = '1'"), 0);
echo'<div class="content"> Последние 3 активаций (Из '.$counts_akt.')</div>';
$last_reg1 = mysql_query("SELECT * FROM `users` WHERE `isp_akt` = '1' ORDER BY regtime DESC LIMIT ".$lastreg."");
while ($lregse1 = mysql_fetch_assoc($last_reg1)){
if ($lregse1['isp_akt']==1){
echo "<div class='subhead'> <img src='/images/akt_1.png' alt=''> <a href=http://".htmlspecialchars($lregse1['login']).".".$siteisp."/><img src='/images/www.png' alt=''></a> <a href='/profile.php?id=".$lregse1['id']."'>".htmlspecialchars($lregse1['login'])."</a> </div>";
}else{
echo "<div class='subhead'> <img src='/images/akt_0.png' alt=''> <a href=http://".htmlspecialchars($lregse1['login']).".".$siteisp."/><img src='/images/www.png' alt=''></a> <a href='/profile.php?id=".$lregse1['id']."'>".htmlspecialchars($lregse1['login'])."</a> </div>";
}
}
$counts_lib = mysql_result(mysql_query("SELECT COUNT(*) FROM `api_lib_article`"), 0);
echo'<div class="content"> Последние 3 статьи (Из '.$counts_lib.')</div>';
$last_article = mysql_query("SELECT * FROM `api_lib_article` ORDER BY time DESC LIMIT ".$lastreg."");
while ($articles = mysql_fetch_assoc($last_article)){
echo '<a class="subhead" href="/api_lib/article.php?id='.$articles['id'].'"><img src="/design/profile/razdel.png" alt=""> '.htmlspecialchars($articles['name']).'</a>';
}
apicms_foot();
include_once '../api_core/timegen.php';
?>