acl_get('a_')) { trigger_error($user->lang['NO_ADMIN']); } // Generate relevant output if (isset($_GET['pane']) && $_GET['pane'] == 'top') { adm_page_header('', '', false); ?>
phpBB Logo lang['ADMIN_TITLE']; ?>      
body {background-color: #98AAB1}', false); // Grab module information using Bart's "neat-o-module" system (tm) $dir = @opendir('.'); $setmodules = 1; while ($file = @readdir($dir)) { if (preg_match('#^admin_(.*?)\.' . $phpEx . '$#', $file)) { include($file); } } @closedir($dir); unset($setmodules); ?>
$action_ary) { $cat = (!empty($user->lang[$cat . '_CAT'])) ? $user->lang[$cat . '_CAT'] : preg_replace('#_#', ' ', $cat); ?> $file) { if (!empty($file)) { $action = (!empty($user->lang[$action])) ? $user->lang[$action] : preg_replace('/_/', ' ', $action); $row_class = ($row_class == 'row1') ? 'row2' : 'row1'; ?>
» lang['RETURN_TO']; ?>
lang['ADMIN_INDEX']; ?>
lang['FORUM_INDEX']; ?>
»
acl_get('a_user')) { trigger_error($user->lang['NO_ADMIN']); } if (is_array($_POST['mark'])) { $in_sql = ''; foreach ($_POST['mark'] as $user_id) { $in_sql .= (($in_sql != '') ? ', ' : '') . intval($user_id); } if ($in_sql != '') { $sql = (isset($_POST['activate'])) ? 'UPDATE ' . USERS_TABLE . " SET user_active = 1 WHERE user_id IN ($in_sql)" : "DELETE FROM " . USERS_TABLE . " WHERE user_id IN ($in_sql)"; $db->sql_query($sql); if (!isset($_POST['delete'])) { set_config('num_users', $config['num_users'] + sizeof($mark)); } $log_action = (isset($_POST['activate'])) ? 'log_index_activate' : 'log_index_delete'; add_log('admin', $log_action, sizeof($_POST['mark'])); } } } else if (isset($_POST['remind'])) { if (!$auth->acl_get('a_user')) { trigger_error($user->lang['NO_ADMIN']); } if (empty($config['email_enable'])) { trigger_error($user->lang['EMAIL_DISABLED']); } if (is_array($_POST['mark'])) { $in_sql = ''; foreach ($_POST['mark'] as $user_id) { $in_sql .= (($in_sql != '') ? ', ' : '') . intval($user_id); } if ($in_sql != '') { $sql = "SELECT user_id, username, user_email, user_lang, user_regdate, user_actkey FROM " . USERS_TABLE . " WHERE user_id IN ($in_sql)"; $result = $db->sql_query($sql); if ($row = $db->sql_fetchrow($result)) { include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer(); $board_url = generate_board_url() . '/ucp.' . $phpEx; $usernames = ''; do { $emailer->use_template('user_remind_inactive', $row['user_lang']); $emailer->to($row['user_email'], $row['username']); $emailer->assign_vars(array( 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $config['board_email_sig']), 'USERNAME' => $row['username'], 'SITENAME' => $config['sitename'], 'REGISTER_DATE' => $user->format_date($row['user_regdate']), 'U_ACTIVATE' => $board_url . '&mode=activate&u=' . $row['user_id'] . '&k=' . $row['user_actkey']) ); $emailer->send(); $emailer->reset(); $usernames .= (($usernames != '') ? ', ' : '') . $row['username']; } while ($row = $db->sql_fetchrow($result)); add_log('admin', 'LOG_INDEX_REMIND', $usernames); } $db->sql_freeresult($result); } } } else if (isset($_POST['online'])) { if (!$auth->acl_get('a_defaults')) { trigger_error($user->lang['NO_ADMIN']); } set_config('record_online_users', 1); set_config('record_online_date', time()); add_log('admin', 'LOG_RESET_ONLINE'); } else if (isset($_POST['stats'])) { if (!$auth->acl_get('a_defaults')) { trigger_error($user->lang['NO_ADMIN']); } $sql = "SELECT COUNT(post_id) AS stat FROM " . POSTS_TABLE . " WHERE post_approved = 1"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); set_config('num_posts', $row['stat']); $sql = "SELECT COUNT(topic_id) AS stat FROM " . TOPICS_TABLE . " WHERE topic_approved = 1"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); set_config('num_topics', $row['stat']); $sql = "SELECT COUNT(user_id) AS stat FROM " . USERS_TABLE . " WHERE user_active = 1"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); set_config('num_users', $row['stat']); add_log('admin', 'LOG_RESYNC_STATS'); } else if (isset($_POST['date'])) { if (!$auth->acl_get('a_defaults')) { trigger_error($user->lang['NO_ADMIN']); } set_config('board_startdate', time() - 1); add_log('admin', 'LOG_RESET_DATE'); } // Get forum statistics $total_posts = $config['num_posts']; $total_topics = $config['num_topics']; $total_users = $config['num_users']; $start_date = $user->format_date($config['board_startdate']); $boarddays = (time() - $config['board_startdate']) / 86400; $posts_per_day = sprintf('%.2f', $total_posts / $boarddays); $topics_per_day = sprintf('%.2f', $total_topics / $boarddays); $users_per_day = sprintf('%.2f', $total_users / $boarddays); $avatar_dir_size = 0; if ($avatar_dir = @opendir($phpbb_root_path . $config['avatar_path'])) { while ($file = @readdir($avatar_dir)) { if ($file != '.' && $file != '..') { $avatar_dir_size += @filesize($phpbb_root_path . $config['avatar_path'] . '/' . $file); } } @closedir($avatar_dir); // This bit of code translates the avatar directory size into human readable format // Borrowed the code from the PHP.net annoted manual, origanally written by: // Jesse (jesse@jess.on.ca) if ($avatar_dir_size >= 1048576) { $avatar_dir_size = round($avatar_dir_size / 1048576 * 100) / 100 . ' MB'; } else if ($avatar_dir_size >= 1024) { $avatar_dir_size = round($avatar_dir_size / 1024 * 100) / 100 . ' KB'; } else { $avatar_dir_size = $avatar_dir_size . ' Bytes'; } } else { // Couldn't open Avatar dir. $avatar_dir_size = $user->lang['Not_available']; } if ($posts_per_day > $total_posts) { $posts_per_day = $total_posts; } if ($topics_per_day > $total_topics) { $topics_per_day = $total_topics; } if ($users_per_day > $total_users) { $users_per_day = $total_users; } // DB size ... MySQL only // This code is heavily influenced by a similar routine // in phpMyAdmin 2.2.0 if (preg_match('/^mysql/', SQL_LAYER)) { $result = $db->sql_query('SELECT VERSION() AS mysql_version'); if ($row = $db->sql_fetchrow($result)) { $version = $row['mysql_version']; if (preg_match('#^(3\.23|4\.)#', $version)) { $db_name = (preg_match('#^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)#', $version)) ? "`$dbname`" : $dbname; $sql = "SHOW TABLE STATUS FROM " . $db_name; $result = $db->sql_query($sql); $dbsize = 0; while ($row = $db->sql_fetchrow($result)) { if ($row['Type'] != 'MRG_MyISAM') { if ($table_prefix != '') { if (strstr($row['Name'], $table_prefix)) { $dbsize += $row['Data_length'] + $row['Index_length']; } } else { $dbsize += $row['Data_length'] + $row['Index_length']; } } } } else { $dbsize = $user->lang['NOT_AVAILABLE']; } } else { $dbsize = $user->lang['NOT_AVAILABLE']; } } else if (preg_match('#^mssql#', SQL_LAYER)) { $sql = "SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize FROM sysfiles"; $result = $db->sql_query($sql); $dbsize = ($row = $db->sql_fetchrow($result)) ? intval($row['dbsize']) : $user->lang['NOT_AVAILABLE']; } else { $dbsize = $user->lang['NOT_AVAILABLE']; } if (is_int($dbsize)) { $dbsize = ($dbsize >= 1048576) ? sprintf('%.2f MB', ($dbsize / 1048576)) : (($dbsize >= 1024) ? sprintf('%.2f KB', ($dbsize / 1024)) : sprintf('%.2f Bytes', $dbsize)); } adm_page_header($user->lang['ADMIN_INDEX']); ?>

lang['WELCOME_PHPBB']; ?>

lang['ADMIN_INTRO']; ?>

lang['FORUM_STATS']; ?>

lang['STATISTIC']; ?> lang['VALUE']; ?> lang['STATISTIC']; ?> lang['VALUE']; ?>
lang['NUMBER_POSTS']; ?>: lang['POSTS_PER_DAY']; ?>:
lang['NUMBER_TOPICS']; ?>: lang['TOPICS_PER_DAY']; ?>:
lang['NUMBER_USERS']; ?>: lang['USERS_PER_DAY']; ?>:
lang['BOARD_STARTED']; ?>: lang['AVATAR_DIR_SIZE']; ?>:
lang['DATABASE_SIZE']; ?>: lang['GZIP_COMPRESSION']; ?>: lang['ON'] : $user->lang['OFF']; ?>
    

lang['ADMIN_LOG']; ?>

lang['ADMIN_LOG_INDEX_EXPLAIN']; ?>

acl_get('a_user')) { ?>
lang['USERNAME']; ?> lang['IP']; ?> lang['TIME']; ?> lang['ACTION']; ?>
format_date($log_data[$i]['time']); ?>

lang['INACTIVE_USERS']; ?>

lang['INACTIVE_USERS_EXPLAIN']; ?>

"> ' . ANONYMOUS . ' ORDER BY user_regdate ASC'; $result = $db->sql_query($sql); if ($row = $db->sql_fetchrow($result)) { do { $row_class = ($row_class == 'row1') ? 'row2' : 'row1'; ?> sql_fetchrow($result)); ?>
lang['USERNAME']; ?> lang['JOINED']; ?> lang['MARK']; ?>
format_date($row['user_regdate']); ?>   
     
lang['NO_INACTIVE_USERS']; ?>
lang['MARK_ALL']; ?> :: lang['UNMARK_ALL']; ?>
lang['ENCODING']); $adm_url = "index.$phpEx$SID&pane=right"; /* // Allows non-admin pages to link to admin pages // eg: http://forums.foo.com/adm/index.php?sid=&mod=admin_forums&f=1 if (!empty($_GET['mod']) && preg_match('/admin_([a-z]+)/', $_GET['mod'], $m)) { if (file_exists($phpbb_root_path . 'adm/admin_' . $m[1] . '.' . $phpEx)) { $adm_url = 'admin_' . $m[1] . '.' . $phpEx . $SID; $adm_url .= (!empty($_GET['mode'])) ? '&mode=' . htmlspecialchars($_GET['mode']) : ''; $adm_url .= (!empty($_GET['f'])) ? '&f=' . intval($_GET['f']) : ''; $adm_url .= (!empty($_GET['u'])) ? '&u=' . intval($_GET['u']) : ''; $adm_url .= (!empty($_GET['g'])) ? '&g=' . intval($_GET['g']) : ''; } } */ ?> <?php echo $user->lang['ADMIN_TITLE']; ?> " name="title" noresize marginwidth="0" marginheight="0" scrolling="NO"> " name="nav" marginwidth="3" marginheight="3" scrolling="yes"> <body bgcolor="white" text="#000000"> <p><?php echo $user->lang['NO_FRAMES']; ?></p> </body>