diff -r 6eea55374f5b -r 3f66ec435f08 decir/admincp/admin_index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/decir/admincp/admin_index.php Tue Nov 13 19:39:50 2007 -0500 @@ -0,0 +1,95 @@ +auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + echo '

Error: Not authenticated

It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.

'; + return; + } + + // + // Obtain forum statistics + // + + // Number of users + $q = $db->sql_query('SELECT COUNT(user_id)-1 AS num_users FROM ' . table_prefix . 'users;'); + if ( !$q ) + $db->_die(); + + $row = $db->fetchrow(); + $db->free_result(); + $num_users = $row['num_users']; + + // Number of posts + $q = $db->sql_query('SELECT COUNT(post_id) AS num_posts FROM ' . table_prefix . 'decir_posts;'); + if ( !$q ) + $db->_die(); + + $row = $db->fetchrow(); + $db->free_result(); + $num_posts = $row['num_posts']; + + // Board start date + $date = intval( getConfig('decir_install_date') ); + if ( !$date ) + { + $date = time(); + setConfig('decir_install_date', $date); + } + $start_date = date('F d, Y h:i a', $date); + + // Average posts per day + $board_age_days = round( ( time() / ( 60*60*24 ) ) - ( $date / ( 60*60*24 ) ) ); + if ( $board_age_days < 1 ) + { + $avg_posts = $num_posts; + } + else + { + $avg_posts = $num_posts / $board_age_days; + } + + echo '

Administration home

'; + echo '

Thank you for choosing Decir as your forum solution. From this panel you can control every aspect of your forum\'s behavior and appearance. If you need support + for Decir, you can visit the Enano support forums.

'; + echo '

Board statistics

'; + echo "
+ + + + + + + + + + + + + + + + + + +
Board statistics
Number of users:{$num_users}Number of posts:{$num_posts}
Board started:{$start_date} ({$board_age_days} days ago)Average posts per day:{$avg_posts}
+
"; +} + +?>