• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Hướng dẫn auto wap/web new advanced statistics cho johncms

Admin

Well-Known Member
Staff member
Administrator
Cái này khá giống New Advanced Statistics của vbb
Dán đoạn code sau vào pages/mainmenu.php (chỗ nào thì bạn chọn cho thích hợp nhé
PHP:
///New Advanced Statistics/// 
echo '<div class="phdr">New Advanced Statistics</div>'; 
if (!$is_mobile){   
echo '<table width="100%" cellpadding="0" cellspacing="0">'; 
echo '<tr>'; 
echo '<td>'; 
$req = mysql_query("SELECT * FROM `users` WHERE `postforum` > 0 ORDER BY `postforum` DESC LIMIT 15"); 
if (mysql_num_rows($req)) { 
$i = 0; 
while ($res = mysql_fetch_assoc($req)) { 
echo '<div class="list2">'; 
echo '<table width="100%" cellpadding="0" cellspacing="0"><tr><td>'.$res['name'].'</td><td width="auto" align="right">'.$res['postforum'].'</td></tr></table></div>'; 
++$i; 
} 
} else { 
echo '<div class="menu"><p>Trống</p></div>'; 
} 
echo '</td>'; 
echo '<td width="1px" bgcolor="#000000"></td>'; 
echo '<td>'; 
$req = mysql_query("SELECT * FROM `forum` WHERE `type` = 't' and kedit='0' AND `close`!='1' ORDER BY `time` DESC LIMIT 12"); 
while ($arr = mysql_fetch_array($req)) {  
$q3 = mysql_query("select `id`, `refid`, `text` from `forum` where type='r' and id='" . $arr['refid'] . "'"); 
$razd = mysql_fetch_array($q3);  
$q4 = mysql_query("select `id`, `refid`, `text` from `forum` where type='f' and id='" . $razd['refid'] . "'"); 
$frm = mysql_fetch_array($q4);  
$nikuser = mysql_query("SELECT `from`,`id`, `time` FROM `forum` WHERE `type` = 'm' AND `close` != '1' AND `refid` = '" . $arr['id'] . "'ORDER BY time DESC"); 
$colmes1 = mysql_num_rows($nikuser);  
$cpg = ceil($colmes1 / $kmess);  
$nam = mysql_fetch_array($nikuser);  
echo is_integer($i / 2) ? '<div class="list1">' : '<div class="list2">';  
echo '<img src="images/' . ($arr['edit'] == 1 ? 'tz' : 'np') . '.gif" alt=""/>';  
if ($arr['realid'] == 1)  
echo '&nbsp;<img src="images/rate.gif" alt=""/>';  
if ($cpg > 1) { 
echo '&nbsp;<a href="/forum/index.php?id=' . $arr['id'] . ($cpg > 1 && $_SESSION['uppost'] ? '&amp;clip&amp;page=' . $cpg : '') . '">' . $arr['text'] . '</a>&nbsp;(<a href="/forum/index.php?id=' . $arr['id'] . ($_SESSION['uppost'] ? '' : '&amp;clip&amp;page=' . $cpg) . '#' . $nam['id'].'">' . $colmes1 . '</a>)';  
} else { 
echo '&nbsp;<a href="/forum/index.php?id=' . $arr['id'] . ($cpg > 1 && $_SESSION['uppost'] ? '&amp;clip&amp;page=' . $cpg : '') . '">' . $arr['text'] . '</a>&nbsp;(' . $colmes1 . ')';  
} 
if (!empty ($nam['from'])) {  
echo '&nbsp;<font color="Deeppink">' . $nam['from']. '</font><br>';  
} 
echo '</div>';  
$i++;  

}  
echo '</td>'; 
echo '</tr>'; 
echo '</table>';   
}else{  
$req = mysql_query("SELECT * FROM `forum` WHERE `type` = 't' and kedit='0' AND `close`!='1' ORDER BY `time` DESC LIMIT 12"); 
while ($arr = mysql_fetch_array($req)) {  
$q3 = mysql_query("select `id`, `refid`, `text` from `forum` where type='r' and id='" . $arr['refid'] . "'"); 
$razd = mysql_fetch_array($q3);  
$q4 = mysql_query("select `id`, `refid`, `text` from `forum` where type='f' and id='" . $razd['refid'] . "'"); 
$frm = mysql_fetch_array($q4);  
$nikuser = mysql_query("SELECT `from`,`id`, `time` FROM `forum` WHERE `type` = 'm' AND `close` != '1' AND `refid` = '" . $arr['id'] . "'ORDER BY time DESC"); 
$colmes1 = mysql_num_rows($nikuser);  
$cpg = ceil($colmes1 / $kmess);  
$nam = mysql_fetch_array($nikuser);  
echo is_integer($i / 2) ? '<div class="list1">' : '<div class="list2">';  
echo '<img src="images/' . ($arr['edit'] == 1 ? 'tz' : 'np') . '.gif" alt=""/>';  
if ($arr['realid'] == 1)  
echo '&nbsp;<img src="images/rate.gif" alt=""/>';  
if ($cpg > 1) { 
echo '&nbsp;<a href="/forum/index.php?id=' . $arr['id'] . ($cpg > 1 && $_SESSION['uppost'] ? '&amp;clip&amp;page=' . $cpg : '') . '">' . $arr['text'] . '</a>&nbsp;(<a href="/forum/index.php?id=' . $arr['id'] . ($_SESSION['uppost'] ? '' : '&amp;clip&amp;page=' . $cpg) . '#' . $nam['id'].'">' . $colmes1 . '</a>)';  
} else { 
echo '&nbsp;<a href="/forum/index.php?id=' . $arr['id'] . ($cpg > 1 && $_SESSION['uppost'] ? '&amp;clip&amp;page=' . $cpg : '') . '">' . $arr['text'] . '</a>&nbsp;(' . $colmes1 . ')';  
} 
if (!empty ($nam['from'])) {  
echo '&nbsp;<font color="Deeppink">' . $nam['from']. '</font><br>';  
} 
echo '</div>';  
$i++;  

}  
}   
///New Advanced Statistics///
Demo:
tuoitrevnbiz09102012.png

 
Mạng ông chặn picasa rồi
 

Facebook Comments

Similar threads

New posts New threads New resources

Back
Top