Poniższa modyfikacja dodaje statystyki na forum TBDEV.NET
1. Znajdź w pliku forums.php
print("</table>\n"); print("<p align=center><a href=?action=search><b>Search</b></a> | <a href=?action=viewunread><b>View unread</b></a> | <a href=?catchup><b>Catch up</b></a></p>"); |
Dodaj po tym:
print("<tr><td class=colhead>Statystki forum</td></tr>\n"); $registered = number_format(get_row_count("users", "WHERE enabled = 'yes'")); $a = @mysql_fetch_assoc(@mysql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1")) or die(mysql_error()); $totalonline = number_format(get_row_count("users", "WHERE UNIX_TIMESTAMP(" . get_dt_num() . ") - UNIX_TIMESTAMP(last_access) < 1200")); $topiccount = mysql_query("select sum(topiccount) as topiccount from forums"); $postcount = mysql_query("select sum(postcount) as postcount from forums"); print("<tr><td> print("</table>"); |
Efekt: