Exemplo n.º 1
0
    $scriptlang['tools'] = $_G['cache']['pluginlanguage_script']['tools'];
}
$toolslang = $scriptlang['tools'];
require_once DISCUZ_ROOT . './source/plugin/tools/function/tools.func.php';
include_once DISCUZ_ROOT . './source/discuz_version.php';
$_GET['cp'] == '' ? $_GET['cp'] = 'aboutdb' : $_GET['cp'];
$xver = preg_replace('/(X|R|C)/im', '', DISCUZ_VERSION);
$ppp = 20;
$page = max(1, intval($_GET['page']));
$startlimit = ($page - 1) * $ppp;
$deletes = '';
$extrasql = '';
$filter = $_GET['filter'];
if ($filter == 'banned') {
    $extrasql = "AND replacement LIKE '%BANNED%'";
} elseif ($filter == 'mod') {
    $extrasql = "AND replacement LIKE '%MOD%'";
} elseif ($filter == 'replace') {
    $extrasql = "AND replacement NOT LIKE '%MOD%' AND replacement NOT LIKE '%BANNED%'";
} else {
    $extrasql = '';
}
$rule = get_rule();
$identifier = $_GET['identifier'];
$urls = '&pmod=safe&identifier=' . $identifier . '&operation=' . $operation . '&do=' . $do;
showsubmenus($toolslang['aboutsafe'], array(array(array('menu' => $toolslang['info_sec'], 'submenu' => array(array($toolslang['censor_admin'], 'plugins&cp=censor_admin' . $urls), array($toolslang['censor_scanbbs'], 'plugins&cp=censor_scanbbs' . $urls), array($toolslang['censor_scanhome'], 'plugins&cp=censor_scanhome' . $urls), array($toolslang['censor_scanprotal'], 'plugins&cp=censor_scanprotal' . $urls)))), array(array('menu' => $toolslang['site_sec'], 'submenu' => array(array($toolslang['file_php'], 'plugins&cp=file_php' . $urls), array($toolslang['file_hack'], 'plugins&cp=file_hack' . $urls), array($toolslang['file_search'], 'plugins&cp=file_search' . $urls), array($toolslang['changekey'], 'plugins&cp=changekey' . $urls))))));
$cparray = array('censor_admin', 'censor_scanbbs', 'censor_scanhome', 'censor_scanprotal', 'file_php', 'file_hack', 'file_search', 'changekey');
$cp = !in_array($_GET['cp'], $cparray) ? 'censor_admin' : $_GET['cp'];
define(TOOLS_ROOT, dirname(__FILE__) . '/');
require TOOLS_ROOT . './include/' . $cp . '.inc.php';
showformfooter();
Exemplo n.º 2
0
//
$userdata = session_pagestart($user_ip, PAGE_RULES);
init_userprefs($userdata);
//
// End session management
//
if (file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_rule.' . $phpEx)) {
    include $phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_rule.' . $phpEx;
} else {
    include $phpbb_root_path . 'language/lang_english/lang_rule.' . $phpEx;
}
$id = isset($HTTP_GET_VARS['id']) ? intval($HTTP_GET_VARS['id']) : SITE_ID;
//
// Get message of the rules.
//
$rule = get_rule($id, 'both');
if ($rule !== FALSE) {
    $text = $rule['TEXT'];
    $date = create_date($lang['DATE_FORMAT'], $rule['DATE'], $board_config['board_timezone']);
} else {
    message_die(GENERAL_MESSAGE, 'There are no site wide rules available', $lang['Rules']);
}
unset($rule);
//
// Update user rules view
//
if ($userdata['session_logged_in']) {
    $today = time();
    $sql = "UPDATE " . USERS_TABLE . " SET user_rules='" . $today . "' WHERE user_id='" . $userdata['user_id'] . "'";
    if (!($result = $db->sql_query($sql))) {
        message_die(GENERAL_ERROR, 'Could not update user rules view', '', __LINE__, __FILE__, $sql);
Exemplo n.º 3
0
} else {
    if ($userdata['session_logged_in'] && $userdata['user_level'] == ADMIN) {
        $gzip_text = $board_config['gzip_compress'] ? 'GZIP : On' : 'GZIP : Off';
        $debug_text = DEBUG == 1 ? 'Debug : On' : 'Debug : Off';
        $excuted_queries = $db->num_queries;
        $endtime = explode(' ', microtime());
        $gentime = round($endtime[1] + $endtime[0] - $starttime, 4);
        $sql_time = round($db->sql_time, 4);
        $sql_part = round($sql_time / $gentime * 100);
        $php_part = 100 - $sql_part;
        $page_gen = 'Page Generation : ' . $gentime . 's (PHP: ' . $php_part . '% - SQL: ' . $sql_part . '%) - SQL queries: ' . $excuted_queries . ' - ' . $gzip_text . ' - ' . $debug_text;
    }
    $temp_url = '<a href="' . append_sid($phpbb_root_path . "rules.{$phpEx}?id=%s") . '">%s</a>';
    $copyright = get_rule(COPY_ID, 'text');
    $terms = get_rule(TERMS_ID, 'text') ? sprintf($temp_url, TERMS_ID, $lang['Terms_of_Use']) : '';
    $privacy = get_rule(PRIVACY_ID, 'text') ? sprintf($temp_url, PRIVACY_ID, $lang['Privacy_Policy']) : '';
    $legal .= $copyright ? $copyright . '<br />' : '';
    $legal .= ($terms xor $privacy) ? $terms . $privacy : ($terms && $privacy ? $terms . ' | ' . $privacy : '');
}
$template->set_filenames(array('overall_footer' => $tpl_name));
$template->assign_vars(array('MINERVA_VERSION' => '3' . $board_config['version'], 'TRANSLATION_INFO' => isset($lang['TRANSLATION_INFO']) ? trim($lang['TRANSLATION_INFO']) : '', 'ADMIN_LINK' => $admin_link, 'PAGE_GENERATION' => $page_gen, 'LEGAL_INFO' => $legal, 'MODULE_INFO' => trim($mvModuleCopyright . ' ' . (isset($lang['MODULE_TRANSLATION_INFO']) ? $lang['MODULE_TRANSLATION_INFO'] : ''))));
$template->pparse('overall_footer');
//
// Unload the Cache.
//
$cache->unload();
//
// Close our DB connection.
//
$db->sql_close();
//
Exemplo n.º 4
0
    $s_auth_can .= sprintf($lang['Rules_moderate'], "<a\thref=\"modcp.{$phpEx}?" . POST_FORUM_URL . "={$forum_id}&amp;start=" . $start . "&amp;sid=" . $userdata['session_id'] . '">', '</a>');
}
//
// Mozilla navigation bar
//
$nav_links['up'] = array('url' => append_sid('index.' . $phpEx), 'title' => sprintf($lang['Forum_Index'], $board_config['sitename']));
//
// Dump	out	the	page header	and	load viewforum template
//
define('SHOW_ONLINE', true);
$page_title = $lang['View_forum'] . ' -	' . $forum_row['forum_name'];
include $phpbb_root_path . 'includes/page_header.' . $phpEx;
$template->set_filenames(array('body' => 'viewforum_body.tpl'));
make_jumpbox('viewforum.' . $phpEx);
// Forum Rules
if (($rule = get_rule($forum_id, 'TEXT')) !== FALSE) {
    $template->assign_vars(array('S_FORUM_RULES' => TRUE, 'L_FORUM_RULES' => $lang['Forum_Rules'], 'FORUM_RULES' => $rule));
}
$template->assign_vars(array('FORUM_ID' => $forum_id, 'FORUM_NAME' => $forum_row['forum_name'], 'MODERATORS' => $forum_moderators, 'POST_IMG' => $forum_row['forum_status'] == FORUM_LOCKED ? $images['post_locked'] : $images['post_new'], 'FOLDER_IMG' => $images['folder'], 'FOLDER_NEW_IMG' => $images['folder_new'], 'FOLDER_HOT_IMG' => $images['folder_hot'], 'FOLDER_HOT_NEW_IMG' => $images['folder_hot_new'], 'FOLDER_LOCKED_IMG' => $images['folder_locked'], 'FOLDER_LOCKED_NEW_IMG' => $images['folder_locked_new'], 'FOLDER_STICKY_IMG' => $images['folder_sticky'], 'FOLDER_STICKY_NEW_IMG' => $images['folder_sticky_new'], 'FOLDER_ANNOUNCE_IMG' => $images['folder_announce'], 'FOLDER_ANNOUNCE_NEW_IMG' => $images['folder_announce_new'], 'L_TOPICS' => $lang['Topics'], 'L_REPLIES' => $lang['Replies'], 'L_VIEWS' => $lang['Views'], 'L_POSTS' => $lang['Posts'], 'L_LASTPOST' => $lang['Last_Post'], 'L_MODERATOR' => $l_moderators, 'L_MARK_TOPICS_READ' => $lang['Mark_all_topics'], 'L_POST_NEW_TOPIC' => $forum_row['forum_status'] == FORUM_LOCKED ? $lang['Forum_locked'] : $lang['Post_new_topic'], 'L_NO_NEW_POSTS' => $lang['No_new_posts'], 'L_NEW_POSTS' => $lang['New_posts'], 'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'], 'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'], 'L_NO_NEW_POSTS_HOT' => $lang['No_new_posts_hot'], 'L_NEW_POSTS_HOT' => $lang['New_posts_hot'], 'L_ANNOUNCEMENT' => $lang['Post_Announcement'], 'L_STICKY' => $lang['Post_Sticky'], 'L_POSTED' => $lang['Posted'], 'L_JOINED' => $lang['Joined'], 'L_AUTHOR' => $lang['Author'], 'S_AUTH_LIST' => $s_auth_can, 'U_VIEW_FORUM' => append_sid("viewforum.{$phpEx}?" . POST_FORUM_URL . "={$forum_id}"), 'U_MARK_READ' => append_sid("viewforum.{$phpEx}?" . POST_FORUM_URL . "={$forum_id}&amp;mark=topics")));
//
// End header
//
//
// Okay, lets dump out the page	...
//
if ($total_topics) {
    for ($i = 0; $i < $total_topics; $i++) {
        $topic_id = $topic_rowset[$i]['topic_id'];
        $topic_title = count($orig_word) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
        $replies = $topic_rowset[$i]['topic_replies'];
        $topic_type = $topic_rowset[$i]['topic_type'];