Example #1
0
function print_statistic_code($title, $name, $start, $end, $nullvalue = true, $scope = 'daily', $sort = 'date_desc')
{

	global $vbphrase;

	print_form_header('stats', $name);
	print_table_header($title);

	print_time_row($vbphrase['start_date'], 'start', $start, false);
	print_time_row($vbphrase['end_date'], 'end', $end, false);

	if ($name != 'activity')
	{
		print_select_row($vbphrase['scope'], 'scope', array('daily' => $vbphrase['daily'], 'weekly' => $vbphrase['weekly'], 'monthly' => $vbphrase['monthly']), $scope);
	}
	else
	{
		construct_hidden_code('scope', 'daily');
	}
	print_select_row($vbphrase['order_by'], 'sort', array(
		'date_asc'   => $vbphrase['date_ascending'],
		'date_desc'  => $vbphrase['date_descending'],
		'total_asc'  => $vbphrase['total_ascending'],
		'total_desc' => $vbphrase['total_descending'],
	), $sort);
	print_yes_no_row($vbphrase['include_empty_results'], 'nullvalue', $nullvalue);
	print_submit_row($vbphrase['go']);
}
Example #2
0
if ($_POST['do'] == 'update') {
    $vbulletin->input->clean_array_gpc('p', array('cronid' => vB_Cleaner::TYPE_INT, 'varname' => vB_Cleaner::TYPE_STR, 'filename' => vB_Cleaner::TYPE_STR, 'title' => vB_Cleaner::TYPE_STR, 'description' => vB_Cleaner::TYPE_STR, 'logphrase' => vB_Cleaner::TYPE_STR, 'weekday' => vB_Cleaner::TYPE_STR, 'day' => vB_Cleaner::TYPE_STR, 'hour' => vB_Cleaner::TYPE_STR, 'minute' => vB_Cleaner::TYPE_ARRAY, 'active' => vB_Cleaner::TYPE_INT, 'loglevel' => vB_Cleaner::TYPE_INT, 'filename' => vB_Cleaner::TYPE_STR, 'product' => vB_Cleaner::TYPE_STR, 'volatile' => vB_Cleaner::TYPE_INT));
    try {
        vB_Api::instanceInternal('cron')->save($vbulletin->GPC, $vbulletin->GPC['cronid']);
    } catch (vB_Exception_Api $e) {
        $errors = $e->get_errors();
        $errors = array_pop($errors);
        print_stop_message2($errors[0]);
    }
    print_stop_message2(array('saved_scheduled_task_x_successfully', $vbulletin->GPC['title']), 'cronadmin', array('do' => 'modify'));
}
// ###################### Start Remove #######################
if ($_REQUEST['do'] == 'remove') {
    $vbulletin->input->clean_array_gpc('r', array('cronid' => vB_Cleaner::TYPE_INT));
    print_form_header('cronadmin', 'kill');
    construct_hidden_code('cronid', $vbulletin->GPC['cronid']);
    print_table_header($vbphrase['confirm_deletion_gcpglobal']);
    print_description_row($vbphrase['are_you_sure_you_want_to_delete_this_scheduled_task']);
    print_submit_row($vbphrase['yes'], '', 2, $vbphrase['no']);
}
// ###################### Start Kill #######################
if ($_POST['do'] == 'kill') {
    $vbulletin->input->clean_array_gpc('p', array('cronid' => vB_Cleaner::TYPE_INT));
    vB_Api::instanceInternal('cron')->delete($vbulletin->GPC['cronid']);
    print_stop_message2('deleted_scheduled_task_successfully', 'cronadmin', array('do' => 'modify'));
}
// ###################### Start switchactive #######################
if ($_REQUEST['do'] == 'switchactive') {
    $vbulletin->input->clean_array_gpc('r', array('cronid' => vB_Cleaner::TYPE_INT));
    verify_cp_sessionhash();
    try {
Example #3
0
                         echo "Repair Complete<br />\n";
                     }
                 }
                 echo "Overall Repair complete<br />";
                 define('SCRIPT_REDIRECT', true);
             }
             break;
     }
 } else {
     if ($_REQUEST['do'] == 'user') {
         $vbulletin->input->clean_array_gpc('p', array('user' => TYPE_STR));
         switch ($vbulletin->GPC['type']) {
             case 'access':
                 if (empty($vbulletin->GPC['user'])) {
                     print_form_header('tools', 'user');
                     construct_hidden_code('type', 'access');
                     print_table_header('Enter username to restore access to');
                     print_input_row('User Name', 'user', '');
                     print_submit_row('Submit', '');
                 } else {
                     $userid = $db->query_first("SELECT userid, usergroupid FROM " . TABLE_PREFIX . "user WHERE username = '******'user'])) . "'");
                     if (empty($userid['userid'])) {
                         echo '<p align="center">Invalid username</p>';
                     } else {
                         // lets check that usergroupid 6 is still admin
                         $ugroup = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "usergroup WHERE usergroupid = 6 AND (adminpermissions & " . $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] . ")");
                         if (empty($ugroup['usergroupid'])) {
                             // lets give them admin permissions again
                             $db->query_write("UPDATE " . TABLE_PREFIX . "usergroup SET adminpermissions = 3 WHERE usergroupid = 6");
                             build_forum_permissions();
                         }
Example #4
0
			SELECT user.userid, user.username, user.usergroupid AS busergroupid,
				userban.usergroupid AS ousergroupid,
				IF(userban.displaygroupid = 0, userban.usergroupid, userban.displaygroupid) AS odisplaygroupid,
				bandate, liftdate, reason,
				adminuser.userid AS adminid, adminuser.username AS adminname
			FROM " . TABLE_PREFIX . "user AS user
			LEFT JOIN " . TABLE_PREFIX . "userban AS userban ON(userban.userid = user.userid)
			LEFT JOIN " . TABLE_PREFIX . "user AS adminuser ON(adminuser.userid = userban.adminid)
			WHERE user.usergroupid IN(" . implode(',', array_keys($querygroups)) . ")
				AND (userban.liftdate = 0 OR userban.liftdate = NULL)
			ORDER BY user.username
			LIMIT $start, $perpage
		");

		print_form_header('banning', 'banuser');
		construct_hidden_code('period', 'PERMANENT');
		print_table_header("$vbphrase[banned_users]: $vbphrase[permanent_ban] <span class=\"normal\">$vbphrase[usergroups]: " . implode(', ', $querygroups) . '</span>', 8);
		if ($pagecount > 1)
		{
			$pagenav = "<strong>$vbphrase[go_to_page]</strong>";
			for ($thispage = 1; $thispage <= $pagecount; $thispage++)
			{
				if ($thispage == $vbulletin->GPC['pagenumber'])
				{
					$pagenav .= " <strong>[$thispage]</strong> ";
				}
				else
				{
					$pagenav .= " <a href=\"banning.php?$session[sessionurl]do=modify&amp;page=$thispage\" class=\"normal\">$thispage</a> ";
				}
			}
Example #5
0
    print_input_row($vbphrase['minimum_posts'], 'minposts', $usertitle['minposts']);
    print_submit_row($vbphrase['save']);
}
// ###################### Start do update #######################
if ($_POST['do'] == 'doupdate') {
    $vbulletin->input->clean_array_gpc('p', array('title' => vB_Cleaner::TYPE_STR, 'minposts' => vB_Cleaner::TYPE_UINT));
    if (empty($vbulletin->GPC['title'])) {
        print_stop_message2('invalid_user_title_specified');
    }
    $assertor->update('usertitle', array('title' => $vbulletin->GPC['title'], 'minposts' => $vbulletin->GPC['minposts']), array('usertitleid' => $vbulletin->GPC['usertitleid']));
    print_stop_message2(array('saved_user_title_x_successfully', $vbulletin->GPC['title']), 'usertitle', array('do' => 'modify'));
}
// ###################### Start Remove #######################
if ($_REQUEST['do'] == 'remove') {
    print_form_header('usertitle', 'kill');
    construct_hidden_code('usertitleid', $vbulletin->GPC['usertitleid']);
    print_table_header($vbphrase['confirm_deletion_gcpglobal']);
    print_description_row($vbphrase['are_you_sure_you_want_to_delete_this_user_title']);
    print_submit_row($vbphrase['yes'], '', 2, $vbphrase['no']);
}
// ###################### Start Kill #######################
if ($_POST['do'] == 'kill') {
    $assertor->delete('usertitle', array('usertitleid' => $vbulletin->GPC['usertitleid']));
    print_stop_message2('deleted_user_title_successfully', 'usertitle', array('do' => 'modify'));
}
// ###################### Start modify #######################
if ($_REQUEST['do'] == 'modify') {
    $usertitles = $assertor->getRows('usertitle', array(), 'minposts');
    ?>
	<script type="text/javascript">
	function js_usergroup_jump(usertitleid, obj)
Example #6
0
            $sugg = preg_replace('#\\s+#s', '_', strtolower($vbulletin->GPC['productid']));
            $sugg = preg_replace('#[^\\w]#s', '', $sugg);
            $sugg = str_replace('__', '_', $sugg);
            $sugg = substr($sugg, 0, 25);
            print_stop_message('product_id_invalid', htmlspecialchars_uni($vbulletin->GPC['productid']), $sugg);
        }
        // reserve 'vb' prefix for official vBulletin products
        if (!$vbulletin->GPC['confirm'] and strtolower(substr($vbulletin->GPC['productid'], 0, 2)) == 'vb') {
            print_form_header('plugin', 'productsave');
            print_table_header($vbphrase['vbulletin_message']);
            print_description_row(htmlspecialchars_uni($vbulletin->GPC['title']) . ' ' . htmlspecialchars_uni($vbulletin->GPC['version']) . '<dfn>' . htmlspecialchars_uni($vbulletin->GPC['description']) . '</dfn>');
            print_input_row($vbphrase['vb_prefix_reserved'], 'productid', $vbulletin->GPC['productid'], true, 35, 25);
            construct_hidden_code('title', $vbulletin->GPC['title']);
            construct_hidden_code('description', $vbulletin->GPC['description']);
            construct_hidden_code('version', $vbulletin->GPC['version']);
            construct_hidden_code('confirm', 1);
            print_submit_row();
            print_cp_footer();
            // execution terminates here
        }
        /* insert query */
        $db->query_write("\r\n\t\t\tINSERT INTO " . TABLE_PREFIX . "product\r\n\t\t\t\t(productid, title, description, version, active, url, versioncheckurl)\r\n\t\t\tVALUES\r\n\t\t\t\t('" . $db->escape_string($vbulletin->GPC['productid']) . "',\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['title']) . "',\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['description']) . "',\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['version']) . "',\r\n\t\t\t\t1,\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['url']) . "',\r\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['versioncheckurl']) . "')\r\n\t\t");
    }
    // update the products datastore
    build_product_datastore();
    // reload block types
    $blockmanager = vB_BlockManager::create($vbulletin);
    $blockmanager->reloadBlockTypes();
    define('CP_REDIRECT', 'plugin.php?do=product');
    print_stop_message('product_x_updated', $vbulletin->GPC['productid']);
}
Example #7
0
    foreach ($vbulletin->GPC['adminpermissions'] as $key => $value) {
        $admindm->set_bitfield('adminpermissions', $key, $value);
    }
    ($hook = vBulletinHook::fetch_hook('admin_permissions_process')) ? eval($hook) : false;
    $admindm->set('cssprefs', $vbulletin->GPC['cssprefs']);
    $admindm->set('dismissednews', $vbulletin->GPC['dismissednews']);
    $admindm->save();
    define('CP_REDIRECT', "adminpermissions.php?" . $vbulletin->session->vars['sessionurl'] . "#user{$user['userid']}");
    print_stop_message('saved_administrator_permissions_successfully');
}
// #############################################################################
if ($_REQUEST['do'] == 'edit') {
    echo "<p align=\"center\">{$vbphrase['give_admin_access_arbitrary_html']}</p>";
    print_form_header('adminpermissions', 'update');
    construct_hidden_code('userid', $vbulletin->GPC['userid']);
    construct_hidden_code('oldpermissions', $user['adminpermissions']);
    print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['administrator_permissions'], $user['username'], $user['userid']));
    print_label_row("{$vbphrase['administrator']}: <a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;u=" . $vbulletin->GPC['userid'] . "\">{$user['username']}</a>", '<div align="' . $stylevar['right'] . '"><input type="button" class="button" value=" ' . $vbphrase['all_yes'] . ' " onclick="js_check_all_option(this.form, 1);" /> <input type="button" class="button" value=" ' . $vbphrase['all_no'] . ' " onclick="js_check_all_option(this.form, 0);" /></div>', 'thead');
    foreach (convert_bits_to_array($user['adminpermissions'], $ADMINPERMISSIONS) as $field => $value) {
        print_yes_no_row($permsphrase["{$field}"] == '' ? $vbphrase['n_a'] : $permsphrase["{$field}"], "adminpermissions[{$field}]", $value);
    }
    ($hook = vBulletinHook::fetch_hook('admin_permissions_form')) ? eval($hook) : false;
    print_select_row($vbphrase['control_panel_style_choice'], 'cssprefs', array_merge(array('' => "({$vbphrase['default']})"), fetch_cpcss_options()), $user['cssprefs']);
    print_input_row($vbphrase['dismissed_news_item_ids'], 'dismissednews', $user['dismissednews']);
    print_submit_row();
}
// #############################################################################
if ($_REQUEST['do'] == 'modify') {
    print_form_header('adminpermissions', 'edit');
    print_table_header($vbphrase['administrator_permissions'], 3);
    $users = $db->query_read("\n\t\tSELECT user.username, usergroupid, membergroupids, infractiongroupids, administrator.*\n\t\tFROM " . TABLE_PREFIX . "administrator AS administrator\n\t\tINNER JOIN " . TABLE_PREFIX . "user AS user USING(userid)\n\t\tORDER BY user.username\n\t");
/**
* Prints a row containing an input for editing a stylevar
*
* @param	string	Stylevar title
* @param	string	Stylevar varname
* @param	integer	Size of text box
*/
function print_stylevar_row($title, $varname, $size = 30, $validation_regex = '', $failsafe_value = '')
{
    global $stylevars, $stylevar_info, $vbulletin;
    $color = fetch_inherited_color($stylevar_info["{$varname}"], $vbulletin->GPC['dostyleid']);
    $revertcode = construct_revert_code($stylevar_info["{$varname}"], 'stylevar', $varname);
    if ($help = construct_table_help_button("stylevar[{$varname}]")) {
        $helplink = "&nbsp;{$help}";
    }
    if ($validation_regex != '') {
        construct_hidden_code("stylevar[_validation][{$varname}]", htmlspecialchars_uni($validation_regex));
        construct_hidden_code("stylevar[_failsafe][{$varname}]", htmlspecialchars_uni($failsafe_value));
    }
    print_cells_row(array("<span title=\"\$stylevar[{$varname}]\">{$title}</span>", "<span class=\"smallfont\"><input type=\"text\" class=\"{$color}\" title=\"\$stylevar[{$varname}]\" name=\"stylevar[{$varname}]\" tabindex=\"1\" value=\"" . htmlspecialchars_uni($stylevars["{$varname}"]) . "\" size=\"{$size}\" dir=\"ltr\" /><br />{$revertcode['info']}</span>", "<span class=\"smallfont\">{$revertcode['revertcode']}</span>{$helplink}"));
}
Example #9
0
                $db->query_write("DELETE FROM " . TABLE_PREFIX . "phrase WHERE varname='nl_" . $template_id . "_" . $template['varname'] . "_subject'");
                $db->query_write("DELETE FROM " . TABLE_PREFIX . "phrase WHERE varname='nl_" . $template_id . "_" . $template['varname'] . "_text'");
                $db->query_write("DELETE FROM " . TABLE_PREFIX . "phrase WHERE varname='nl_" . $template_id . "_" . $template['varname'] . "_html'");
                print_cp_message('Newsletter deleted!', 'qhvbmailer.php?do=manage_newsletters', 1);
            } else {
                print_cp_message('Error deleting newsletter!', 'qhvbmailer.php?do=manage_newsletters', 2);
            }
        } else {
            print_cp_message('Template ID must be greater than zero!', 'qhvbmailer.php?do=manage_newsletters', 2);
        }
    }
} elseif ($_GET['do'] == 'compose_email') {
    if ($_GET['act'] == 1) {
        print_form_header('qhvbmailer', 'compose_email');
        print_table_header('Compose Email');
        construct_hidden_code('act', '2');
        $sql = "SELECT * FROM " . TABLE_PREFIX . "qhvbmailer_templates WHERE orderr < 1 ORDER BY created DESC";
        $templates = $db->query_read_slave($sql);
        while ($template = $db->fetch_array($templates)) {
            $select_options_templates[$template['id']] = $template_phrases[$template['id'] . "_" . $template['varname'] . "_subject"];
        }
        $select_options_usergroups[0] = 'All Users';
        $sql = "SELECT * FROM " . TABLE_PREFIX . "usergroup";
        $usergroups = $db->query_read_slave($sql);
        while ($usergroup = $db->fetch_array($usergroups)) {
            $select_options_usergroups[$usergroup['usergroupid']] = $usergroup['title'];
        }
        print_select_row('What to send', 'template_id', $select_options_templates);
        print_time_row('When to send', 'date', TIMENOW);
        print_select_row('Who to send to', 'send_to', $select_options_usergroups);
        print_submit_row('Continue', '');
Example #10
0
			}
			</script>
			<?php 
            $groups = $db->query_read("\n\t\t\t\tSELECT usergroupid, title\n\t\t\t\tFROM " . TABLE_PREFIX . "usergroup\n\t\t\t\tWHERE usergroupid NOT IN(1,3,4,5,6)\n\t\t\t\tORDER BY title\n\t\t\t");
            $groupslist = '';
            while ($group = $db->fetch_array($groups)) {
                $groupslist .= "\t<option value=\"{$group['usergroupid']}\">{$group['title']}</option>\n";
            }
            print_form_header('user', 'dopruneusers');
            construct_hidden_code('usergroupid', $vbulletin->GPC['usergroupid']);
            construct_hidden_code('daysprune', $vbulletin->GPC['daysprune']);
            construct_hidden_code('minposts', $vbulletin->GPC['minposts']);
            construct_hidden_code('joindate[day]', $vbulletin->GPC['joindate']['day']);
            construct_hidden_code('joindate[month]', $vbulletin->GPC['joindate']['month']);
            construct_hidden_code('joindate[year]', $vbulletin->GPC['joindate']['year']);
            construct_hidden_code('order', $order);
            print_table_header(construct_phrase($vbphrase['showing_users_x_to_y_of_z'], 1, $numusers, $numusers), 7);
            print_cells_row(array('Userid', $vbphrase['username'], $vbphrase['email'], $vbphrase['post_count'], $vbphrase['last_activity'], $vbphrase['join_date'], '<input type="checkbox" name="allbox" onclick="js_check_all(this.form)" title="' . $vbphrase['check_all'] . '" checked="checked" />'), 1);
            while ($user = $db->fetch_array($users)) {
                $cell = array();
                $cell[] = $user['userid'];
                $cell[] = "<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$user['userid']}\" target=\"_blank\">{$user['username']}</a><br /><span class=\"smallfont\">{$user['title']}" . iif($user['moderatorid'], ', Moderator', '') . "</span>";
                $cell[] = "<a href=\"mailto:{$user['email']}\">{$user['email']}</a>";
                $cell[] = vb_number_format($user['posts']);
                $cell[] = vbdate($vbulletin->options['dateformat'], $user['lastactivity']);
                $cell[] = vbdate($vbulletin->options['dateformat'], $user['joindate']);
                if ($user['userid'] == $vbulletin->userinfo['userid'] or $user['usergroupid'] == 6 or $user['usergroupid'] == 5 or $user['moderatorid'] or is_unalterable_user($user['userid'])) {
                    $cell[] = '<input type="button" class="button" value=" ! " onclick="js_alert_no_permission()" />';
                } else {
                    $cell[] = "<input type=\"checkbox\" name=\"users[{$user['userid']}]\" value=\"1\" checked=\"checked\" tabindex=\"1\" />";
                }
Example #11
0
        $sqlconds[] = "action LIKE '%" . $db->escape_string_like($vbulletin->GPC['modaction']) . "%'";
    }
    if ($vbulletin->GPC['product']) {
        if ($vbulletin->GPC['product'] == 'vbulletin') {
            $sqlconds[] = "product IN ('', 'vbulletin')";
        } else {
            $sqlconds[] = "product = '" . $db->escape_string($vbulletin->GPC['product']) . "'";
        }
    }
    $logs = $db->query_first("\n\t\tSELECT COUNT(*) AS total\n\t\tFROM " . TABLE_PREFIX . "moderatorlog\n\t\tWHERE " . (!empty($sqlconds) ? implode("\r\n\tAND ", $sqlconds) : "") . "\n\t");
    if ($logs['total']) {
        print_form_header('modlog', 'doprunelog');
        construct_hidden_code('datecut', $datecut);
        construct_hidden_code('modaction', $vbulletin->GPC['modaction']);
        construct_hidden_code('userid', $vbulletin->GPC['userid']);
        construct_hidden_code('product', $vbulletin->GPC['product']);
        print_table_header($vbphrase['prune_moderator_log']);
        print_description_row(construct_phrase($vbphrase['are_you_sure_you_want_to_prune_x_log_entries_from_moderator_log'], vb_number_format($logs['total'])));
        print_submit_row($vbphrase['yes'], 0, 0, $vbphrase['no']);
    } else {
        print_stop_message('no_logs_matched_your_query');
    }
}
// ###################### Start do prune log #######################
if ($_POST['do'] == 'doprunelog' and can_access_logs($vbulletin->config['SpecialUsers']['canpruneadminlog'], 0, '<p>' . $vbphrase['control_panel_log_pruning_permission_restricted'] . '</p>')) {
    $vbulletin->input->clean_array_gpc('p', array('datecut' => TYPE_UINT, 'modaction' => TYPE_STR, 'userid' => TYPE_UINT, 'product' => TYPE_STR));
    $sqlconds = array("dateline < " . $vbulletin->GPC['datecut']);
    if (!empty($vbulletin->GPC['modaction'])) {
        $sqlconds[] = "action LIKE '%" . $db->escape_string_like($vbulletin->GPC['modaction']) . "%'";
    }
    if (!empty($vbulletin->GPC['userid'])) {
Example #12
0
        print_description_row($upgradecore_phrases['dump_database_desc']);
        print_table_footer();
        $sqltable = array('all tables' => $upgradecore_phrases['dump_all_tables']);
        $tables = $db->query_write("SHOW TABLES");
        while ($table = $db->fetch_array($tables, DBARRAY_NUM)) {
            $sqltable["{$table['0']}"] = $table[0];
        }
        print_form_header('upgrade_300b3', 'sqltable');
        print_table_header($upgradecore_phrases['dump_data_to_sql']);
        construct_hidden_code('step', 'backup');
        print_label_row($upgradecore_phrases['choose_table_to_dump'], '<select name="table" class="bginput">' . construct_select_options($sqltable) . '</select>');
        print_submit_row($upgradecore_phrases['dump_tables'], 0);
        unset($sqltable['all tables']);
        print_form_header('upgrade_300b3', 'csvtable');
        print_table_header($upgradecore_phrases['dump_data_to_csv']);
        construct_hidden_code('step', 'backup');
        print_label_row($upgradecore_phrases['backup_individual_table'], '<select name="table" class="bginput">' . construct_select_options($sqltable) . '</select>');
        print_input_row($upgradecore_phrases['field_seperator'], 'separator', ',', 0, 15);
        print_input_row($upgradecore_phrases['quote_character'], 'quotes', "'", 0, 15);
        print_yes_no_row($upgradecore_phrases['show_column_names'], 'showhead', 1);
        print_submit_row($upgradecore_phrases['dump_table'], 0);
        define('NO_LOG', true);
        $vbulletin->GPC['step'] = 0;
        print_next_step();
    }
}
// ***************************************************************************************************************************
// #########################################################################
// ############# GENERIC UPGRADE / INSTALL FUNCTIONS PROTOTYPES ############
// #########################################################################
// #########################################################################
Example #13
0
 // check that this usergroup has some join requests
 if ($vbulletin->usergroupcache["{$vbulletin->GPC['usergroupid']}"]['joinrequests']) {
     // everything seems okay, so make a total record for this usergroup
     $usergroup =& $vbulletin->usergroupcache["{$vbulletin->GPC['usergroupid']}"];
     // query the usergroup leaders of this usergroup
     $leaders = array();
     $getleaders = $db->query_read("\n\t\t\t\tSELECT usergroupleader.userid, user.username\n\t\t\t\tFROM " . TABLE_PREFIX . "usergroupleader AS usergroupleader\n\t\t\t\tINNER JOIN " . TABLE_PREFIX . "user AS user USING(userid)\n\t\t\t\tWHERE usergroupleader.usergroupid = " . $vbulletin->GPC['usergroupid'] . "\n\t\t\t");
     while ($getleader = $db->fetch_array($getleaders)) {
         $leaders[] = "<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;u={$getleader['userid']}\">{$getleader['username']}</a>";
     }
     unset($getleader);
     $db->free_result($getleaders);
     // query the requests for this usergroup
     $requests = $db->query_read("\n\t\t\t\tSELECT req.*, user.username\n\t\t\t\tFROM " . TABLE_PREFIX . "usergrouprequest AS req\n\t\t\t\tINNER JOIN " . TABLE_PREFIX . "user AS user USING(userid)\n\t\t\t\tWHERE req.usergroupid = " . $vbulletin->GPC['usergroupid'] . "\n\t\t\t\tORDER BY user.username\n\t\t\t");
     print_form_header('usergroup', 'processjoinrequests');
     construct_hidden_code('usergroupid', $vbulletin->GPC['usergroupid']);
     print_table_header("{$usergroup['title']} - ({$vbphrase['join_requests']}: {$usergroup['joinrequests']})", 6);
     if (!empty($leaders)) {
         print_description_row("<span style=\"font-weight:normal\">(" . $vbphrase['usergroup_leader'] . ': ' . implode(', ', $leaders) . ')</span>', 0, 6, 'thead');
     }
     print_cells_row(array($vbphrase['username'], $vbphrase['reason'], '<span style="white-space:nowrap">' . $vbphrase['date'] . '</span>', '<input type="button" value="' . $vbphrase['accept'] . '" onclick="js_check_all_option(this.form, 1);" class="button" title="' . $vbphrase['check_all'] . '" />', '<input type="button" value=" ' . $vbphrase['deny'] . ' " onclick="js_check_all_option(this.form, 0);" class="button" title="' . $vbphrase['check_all'] . '" />', '<input type="button" value="' . $vbphrase['ignore'] . '" onclick="js_check_all_option(this.form, -1);" class="button" title="' . $vbphrase['check_all'] . '" />'), 1);
     $i = 0;
     while ($request = $db->fetch_array($requests)) {
         if ($i > 0 and $i % 10 == 0) {
             print_description_row('<div align="center"><input type="submit" class="button" value="' . $vbphrase['process'] . '" accesskey="s" tabindex="1" /></div>', 0, 6, 'thead');
         }
         $i++;
         $cell = array("<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;u={$request['userid']}\"><b>{$request['username']}</b></a>", $request['reason'], '<span class="smallfont">' . vbdate($vbulletin->options['dateformat'], $request['dateline']) . '<br />' . vbdate($vbulletin->options['timeformat'], $request['dateline']) . '</span>', '<label for="a' . $request['usergrouprequestid'] . '" class="smallfont">' . $vbphrase['accept'] . '<input type="radio" name="request[' . $request['usergrouprequestid'] . ']" value="1" id="a' . $request['usergrouprequestid'] . '" tabindex="1" /></label>', '<label for="d' . $request['usergrouprequestid'] . '" class="smallfont">' . $vbphrase['deny'] . '<input type="radio" name="request[' . $request['usergrouprequestid'] . ']" value="0" id="d' . $request['usergrouprequestid'] . '" tabindex="1" /></label>', '<label for="i' . $request['usergrouprequestid'] . '" class="smallfont">' . $vbphrase['ignore'] . '<input type="radio" name="request[' . $request['usergrouprequestid'] . ']" value="-1" id="i' . $request['usergrouprequestid'] . '" tabindex="1" checked="checked" /></label>');
         print_cells_row($cell, 0, '', -5);
     }
     unset($request);
                    }
                }
            }
            echo "</ul>";
        } else {
            redirect('tools', 'ame_no_results');
        }
    } else {
        redirect('tools', 'ame_no_results');
    }
    print_form_header('ame', 'dorebuild', false, true, 'cpform', '90%', '', true, 'get');
    print_table_header($vbphrase['ame_rebuild_title']);
    if ($return) {
        print_label_row($vbphrase['ame_rebuild_seconds_till_next'], "<input type=\"text\" name=\"timer\" id=\"timer\" readonly=\"true\" value=\"{$delay}\" />");
        construct_hidden_code("cont", true);
        construct_hidden_code("perpage", $perpage);
        construct_hidden_code("seconds", $seconds);
        construct_hidden_code("length", $length);
        construct_hidden_code("test", $test);
        construct_hidden_code("verbose", $verbose);
        construct_hidden_code("start", $start + 1);
        construct_hidden_code("zone", $zone);
        construct_hidden_code("ameup", $ameup);
        print_submit_row($vbphrase['next'], '');
        echo "<script language=\"javascript\"><!--\n\n\t\t\t\tvar countdown = " . $seconds . ";\n\n\t\t\t  function submit_form()\n\t\t\t  {\n\t\t\t     document.cpform.submit();\n\t\t\t  }\n\n\t\t\t  function count_down()\n\t\t\t  {\n\t\t\t      countdown = countdown-1;\n\t\t\t  \t  document.cpform.timer.value=countdown+ ' {$vbphrase['ame_rebuild_seconds_remaining']}';\n\t\t\t  \t  if (countdown == 0)\n\t\t\t  \t  {\n\t\t\t  \t  \tsubmit_form();\n\t\t\t  \t  }\n\t\t\t  \t  else\n\t\t\t  \t  {\n\t\t\t  \t  \tsetTimeout('count_down()',1000);\n\t\t\t  \t  }\n\t\t\t  }\n\t\t\t  //-->\n\t\t\tsetTimeout('count_down()',1000);\n\t\t  </script>";
    } else {
        $inp = $in ? $in . "_" : "";
        print_description_row($vbphrase['ame_rebuild_completed']);
        print_table_footer();
    }
}
/**
* Prints out the save options for the style generator
*/

function import_generated_style() {
	global $vbphrase, $stylecache;

	cache_styles();
	echo "
	<script type=\"text/javascript\">
	<!--
	function js_confirm_upload(tform, filefield)
	{
		if (filefield.value == \"\")
		{
			return confirm(\"".construct_phrase($vbphrase['you_did_not_specify_a_file_to_upload'], " + tform.serverfile.value + ")."\");
		}
		return true;
	}
	function js_fetch_style_title()
	{
		styleid = document.forms.downloadform.dostyleid.options[document.forms.downloadform.dostyleid.selectedIndex].value;
		document.forms.downloadform.title.value = style[styleid];
	}
	var style = new Array();
	style['-1'] = \"" . $vbphrase['master_style'] . "\"";
	foreach($stylecache AS $styleid => $style)
	{
		echo "\n\tstyle['$styleid'] = \"" . addslashes_js($style['title'], '"') . "\";";
		$styleoptions["$styleid"] = construct_depth_mark($style['depth'], '--', iif($vbulletin->debug, '--', '')) . ' ' . $style['title'];
	}
	echo "
	// -->
	</script>";

	echo '<div id="styleform">';
	echo '<form id="form">';
	construct_hidden_code('adid', $vbulletin->GPC['adid']);
	echo '<input id="form-data" type="hidden" name="data">';
	echo '<div class="styledetails"><div id="title-generated-style" class="help title-generated-style">';
	print_input_row($vbphrase['title_generated_style'], 'name', null, null, null, null, null, null, 'form-name');
	echo '</div><div id="parent-id" class="help parent-id">';
	print_style_chooser_row('parentid', -1, $vbphrase['no_parent_style'], $vbphrase['parent_style'], 1);
	echo '</div></div><div class="styleoptions"><div id="display-order" class="help display-order">';
	print_input_row($vbphrase['display_order'], 'displayorder', 1, null, null, null, null, null, 'form-displayorder');
	echo '</div><div id="allow-user-selection" class="help allow-user-selection">';
	print_yes_no_row($vbphrase['allow_user_selection'], 'userselect', 1, null, null, null, null, null, 'form-userselect');
	echo '</div></div></form></div>';
}
/**
* Prints a dialog box asking if the user is sure they want to delete the specified item from the database
*
* @param	string	Name of table from which item will be deleted
* @param	mixed	ID of item to be deleted
* @param	string	PHP script to which the form will submit
* @param	string	'do' action for target script
* @param	string	Word describing item to be deleted - eg: 'forum' or 'user' or 'post' etc.
* @param	mixed	If not empty, an array containing name=>value pairs to be used as hidden input fields
* @param	string	Extra text to be printed in the dialog box
* @param	string	Name of 'title' field in the table in the database
*/
function print_delete_confirmation($table, $itemid, $phpscript, $do, $itemname = '', $hiddenfields = 0, $extra = '', $titlename = 'title')
{
    global $vbulletin, $vbphrase;
    $idfield = $table . 'id';
    $itemname = iif($itemname, $itemname, $table);
    $deleteword = 'delete';
    $encodehtml = true;
    switch ($table) {
        case 'infraction':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT infractionid, infractionid AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "infraction\n\t\t\t\tWHERE infractionid = {$itemid}\n\t\t\t");
            break;
        case 'reputation':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT reputationid, reputationid AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "reputation\n\t\t\t\tWHERE reputationid = {$itemid}\n\t\t\t");
            break;
        case 'user':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT userid, username AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "user\n\t\t\t\tWHERE userid = {$itemid}\n\t\t\t");
            break;
        case 'moderator':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT moderatorid, username, title\n\t\t\t\tFROM " . TABLE_PREFIX . "moderator AS moderator,\n\t\t\t\t" . TABLE_PREFIX . "user AS user,\n\t\t\t\t" . TABLE_PREFIX . "forum AS forum\n\t\t\t\tWHERE user.userid = moderator.userid AND\n\t\t\t\tforum.forumid = moderator.forumid AND\n\t\t\t\tmoderatorid = {$itemid}\n\t\t\t");
            $item['title'] = construct_phrase($vbphrase['x_from_the_forum_y'], $item['username'], $item['title']);
            $encodehtml = false;
            break;
        case 'calendarmoderator':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT calendarmoderatorid, username, title\n\t\t\t\tFROM " . TABLE_PREFIX . "calendarmoderator AS calendarmoderator,\n\t\t\t\t" . TABLE_PREFIX . "user AS user,\n\t\t\t\t" . TABLE_PREFIX . "calendar AS calendar\n\t\t\t\tWHERE user.userid = calendarmoderator.userid AND\n\t\t\t\tcalendar.calendarid = calendarmoderator.calendarid AND\n\t\t\t\tcalendarmoderatorid = {$itemid}\n\t\t\t");
            $item['title'] = construct_phrase($vbphrase['x_from_the_calendar_y'], $item['username'], $item['title']);
            $encodehtml = false;
            break;
        case 'phrase':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT phraseid, varname AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "phrase\n\t\t\t\tWHERE phraseid = {$itemid}\n\t\t\t");
            break;
        case 'userpromotion':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT userpromotionid, usergroup.title\n\t\t\t\tFROM " . TABLE_PREFIX . "userpromotion AS userpromotion,\n\t\t\t\t" . TABLE_PREFIX . "usergroup AS usergroup\n\t\t\t\tWHERE userpromotionid = {$itemid} AND\n\t\t\t\tuserpromotion.usergroupid = usergroup.usergroupid\n\t\t\t");
            break;
        case 'usergroupleader':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT usergroupleaderid, username AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "usergroupleader AS usergroupleader\n\t\t\t\tINNER JOIN " . TABLE_PREFIX . "user AS user USING (userid)\n\t\t\t\tWHERE usergroupleaderid = {$itemid}\n\t\t\t");
            break;
        case 'setting':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT varname AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "setting\n\t\t\t\tWHERE varname = '" . $vbulletin->db->escape_string($itemid) . "'\n\t\t\t");
            $idfield = 'title';
            break;
        case 'settinggroup':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT grouptitle AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "settinggroup\n\t\t\t\tWHERE grouptitle = '" . $vbulletin->db->escape_string($itemid) . "'\n\t\t\t");
            $idfield = 'title';
            break;
        case 'adminhelp':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT adminhelpid, phrase.text AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "adminhelp AS adminhelp\n\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "phrase AS phrase ON (phrase.varname = CONCAT(adminhelp.script, IF(adminhelp.action != '', CONCAT('_', REPLACE(adminhelp.action, ',', '_')), ''), IF(adminhelp.optionname != '', CONCAT('_', adminhelp.optionname), ''), '_title') AND phrase.fieldname = 'cphelptext' AND phrase.languageid IN (-1, 0))\n\t\t\t\tWHERE adminhelpid = {$itemid}\n\t\t\t");
            break;
        case 'faq':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT faqname, IF(phrase.text IS NOT NULL, phrase.text, faq.faqname) AS title\n\t\t\t\tFROM " . TABLE_PREFIX . "faq AS faq\n\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "phrase AS phrase ON (phrase.varname = faq.faqname AND phrase.fieldname = 'faqtitle' AND phrase.languageid IN(-1, 0))\n\t\t\t\tWHERE faqname = '" . $vbulletin->db->escape_string($itemid) . "'\n\t\t\t");
            $idfield = 'faqname';
            break;
        case 'product':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT productid, title\n\t\t\t\tFROM " . TABLE_PREFIX . "product\n\t\t\t\tWHERE productid = '" . $vbulletin->db->escape_string($itemid) . "'\n\t\t\t");
            break;
        case 'prefix':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT prefixid\n\t\t\t\tFROM " . TABLE_PREFIX . "prefix\n\t\t\t\tWHERE prefixid = '" . $vbulletin->db->escape_string($itemid) . "'\n\t\t\t");
            $item['title'] = $vbphrase["prefix_{$item['prefixid']}_title_plain"];
            break;
        case 'prefixset':
            $item = $vbulletin->db->query_first("\n\t\t\t\tSELECT prefixsetid\n\t\t\t\tFROM " . TABLE_PREFIX . "prefixset\n\t\t\t\tWHERE prefixsetid = '" . $vbulletin->db->escape_string($itemid) . "'\n\t\t\t");
            $item['title'] = $vbphrase["prefixset_{$item['prefixsetid']}_title"];
            break;
        default:
            $handled = false;
            ($hook = vBulletinHook::fetch_hook('admin_delete_confirmation')) ? eval($hook) : false;
            if (!$handled) {
                $item = $vbulletin->db->query_first("\n\t\t\t\t\tSELECT {$idfield}, {$titlename} AS title\n\t\t\t\t\tFROM " . TABLE_PREFIX . "{$table}\n\t\t\t\t\tWHERE {$idfield} = {$itemid}\n\t\t\t\t");
            }
            break;
    }
    switch ($table) {
        case 'template':
            if ($itemname == 'replacement_variable') {
                $deleteword = 'delete';
            } else {
                $deleteword = 'revert';
            }
            break;
        case 'adminreminder':
            if (vbstrlen($item['title']) > 30) {
                $item['title'] = substr($item['title'], 0, 30) . '...';
            }
            break;
        case 'subscription':
            $item['title'] = $vbphrase['sub' . $item['subscriptionid'] . '_title'];
            break;
    }
    if ($encodehtml and (strcspn($item['title'], '<>"') < strlen($item['title']) or strpos($item['title'], '&') !== false and !preg_match('/&(#[0-9]+|amp|lt|gt|quot);/si', $item['title']))) {
        // title contains html entities that should be encoded
        $item['title'] = htmlspecialchars_uni($item['title']);
    }
    if ($item["{$idfield}"] == $itemid and !empty($itemid)) {
        echo "<p>&nbsp;</p><p>&nbsp;</p>";
        print_form_header($phpscript, $do, 0, 1, '', '75%');
        construct_hidden_code(($idfield == 'styleid' or $idfield == 'languageid') ? 'do' . $idfield : $idfield, $itemid);
        if (is_array($hiddenfields)) {
            foreach ($hiddenfields as $varname => $value) {
                construct_hidden_code($varname, $value);
            }
        }
        print_table_header(construct_phrase($vbphrase['confirm_deletion_x'], $item['title']));
        print_description_row("\n\t\t\t<blockquote><br />\n\t\t\t" . construct_phrase($vbphrase["are_you_sure_want_to_{$deleteword}_{$itemname}_x"], $item['title'], $idfield, $item["{$idfield}"], iif($extra, "{$extra}<br /><br />")) . "\n\t\t\t<br /></blockquote>\n\t");
        print_submit_row($vbphrase['yes'], 0, 2, $vbphrase['no']);
    } else {
        print_stop_message('could_not_find', '<b>' . $itemname . '</b>', $idfield, $itemid);
    }
}
Example #17
0
File: ad.php Project: Kheros/MMOver
        replace_ad_template(-1, $ad_location_orig, $template_orig, $template_orig_un, $vbulletin->userinfo['username'], $vbulletin->options['templateversion']);
    }
    // note: this error check will ALWAYS be triggered if another ad on the same location have an error.
    // would be a good idea to add a new description row to detail this problem for end users.
    if (empty($vbulletin->GPC['confirmerrors'])) {
        $errors = check_template_errors($template);
        if (!empty($errors)) {
            print_form_header('ad', 'update', 0, 1, '', '75%');
            construct_hidden_code('confirmerrors', 1);
            construct_hidden_code('adid', intval($vbulletin->GPC['adid']));
            construct_hidden_code('title', $vbulletin->GPC['title']);
            construct_hidden_code('ad_location', $vbulletin->GPC['ad_location']);
            construct_hidden_code('ad_html', $vbulletin->GPC['ad_html']);
            construct_hidden_code('displayorder', intval($vbulletin->GPC['displayorder']));
            construct_hidden_code('active', $vbulletin->GPC['active']);
            construct_hidden_code('criteria_serialized', $criterion);
            print_table_header($vbphrase['vbulletin_message']);
            print_description_row(construct_phrase($vbphrase['template_eval_error'], $errors));
            print_description_row(construct_phrase($template_un, $errors));
            print_submit_row($vbphrase['continue'], 0, 2, $vbphrase['go_back']);
            print_cp_footer();
            exit;
        }
    }
    // The insert of the template.
    replace_ad_template(0, $vbulletin->GPC['ad_location'], $template, $template_un, $vbulletin->userinfo['username'], $vbulletin->options['templateversion']);
    replace_ad_template(-1, $vbulletin->GPC['ad_location'], $template, $template_un, $vbulletin->userinfo['username'], $vbulletin->options['templateversion']);
    build_all_styles();
    define('CP_REDIRECT', 'ad.php');
    print_stop_message('saved_ad_x_successfully', $vbulletin->GPC['title']);
}
    } else {
        if (!empty($nodeid) and !empty($usergroupid)) {
            $nodepermission = vB_ChannelPermission::instance()->fetchPermissions($nodeid, $usergroupid);
            $nodepermission = current($nodepermission);
        } else {
            print_table_footer();
            print_stop_message2('invalid_channel_permissions_specified');
        }
    }
    if (empty($nodepermission) or !empty($nodepermission['errors'])) {
        print_table_footer();
        print_stop_message2('invalid_channel_permissions_specified');
    }
    construct_hidden_code('nodepermission[usergroupid]', $usergroupid);
    construct_hidden_code('nodeid', $nodeid);
    construct_hidden_code('permissionid', $nodepermission['permissionid']);
    $channel = vB_Library::instance('node')->getNode($nodeid);
    $usergroup = vB_Api::instanceInternal('usergroup')->fetchUsergroupByID($usergroupid);
    print_table_header(construct_phrase($vbphrase['edit_channel_permissions_for_usergroup_x_in_channel_y'], $usergroup['title'], $channel['title']));
    if ($nodeid > 1) {
        print_description_row('
			<label for="uug_1"><input type="radio" name="inherit" value="1" id="inherit_1" onclick="this.form.reset(); this.checked=true;"' . iif(empty($permissionid), ' checked="checked"') . ' />' . $vbphrase['inherit_channel_permission'] . '</label>
			<br />
			<label for="uug_0"><input type="radio" name="inherit" value="0" id="inherit_0"' . iif(!empty($permissionid), ' checked="checked"') . ' />' . $vbphrase['use_custom_permissions'] . '</label>
		', 0, 2, 'tfoot', '', 'mode');
        print_table_break();
    }
    print_channel_permission_rows($vbphrase['edit_channel_permissions'], $nodepermission, 'js_set_custom();');
    print_submit_row($vbphrase['save']);
}
// ###################### Start do update #######################
Example #19
0
    print_form_header('template', 'updatetemplate');
    print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['template'], $template['title'], $template['templateid']));
    construct_hidden_code('templateid', $template['templateid']);
    construct_hidden_code('group', $vbulletin->GPC['group']);
    construct_hidden_code('searchstring', $vbulletin->GPC['searchstring']);
    construct_hidden_code('dostyleid', $template['styleid']);
    construct_hidden_code('expandset', $vbulletin->GPC['expandset']);
    construct_hidden_code('oldtitle', $template['title']);
    construct_hidden_code('lastedit', $template['dateline']);
    $backlink = "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify&amp;expandset={$template['styleid']}&amp;group=" . $vbulletin->GPC['group'] . "&amp;templateid=" . $vbulletin->GPC['templateid'] . "&amp;searchstring=" . urlencode($vbulletin->GPC['searchstring']);
    $products = fetch_product_list();
    if ($template['styleid'] == -1) {
        print_select_row($vbphrase['product'], 'product', $products, $template['product']);
    } else {
        print_label_row($vbphrase['product'], $products[$template['product'] ? $template['product'] : 'vbulletin']);
        construct_hidden_code('product', $template['product'] ? $template['product'] : 'vbulletin');
    }
    print_label_row($vbphrase['style'], "<a href=\"{$backlink}\" title=\"" . $vbphrase['edit_templates'] . "\"><b>{$template['style']}</b></a>");
    print_input_row($vbphrase['title'] . ($template['styleid'] != -1 ? '<dfn>' . construct_link_code($vbphrase['view_history'], 'template.php?do=history&amp;dostyleid=' . $template['styleid'] . '&amp;title=' . urlencode($template['title']), 1) . '</dfn>' : ''), 'title', $template['title']);
    print_textarea_row($vbphrase['template'] . '
			<br /><br />
			<span class="smallfont">' . iif($template['styleid'] != -1, construct_link_code($vbphrase['show_default'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&amp;title={$template['title']}", 1) . '<br /><br />', '') . '<!--' . $vbphrase['wrap_text'] . '<input type="checkbox" unselectable="on" onclick="set_wordwrap(\'ta_template\', this.checked);" accesskey="w" checked="checked" />-->
			</span>', 'template', $template['template_un'], 22, '75" style="width:100%', true, true, 'ltr', 'code');
    print_template_javascript();
    print_label_row($vbphrase['save_in_template_history'], '<label for="savehistory"><input type="checkbox" name="savehistory" id="savehistory" value="1" tabindex="1" />' . $vbphrase['yes'] . '</label><br /><span class="smallfont">' . $vbphrase['comment'] . '</span> <input type="text" name="histcomment" value="" tabindex="1" class="bginput" size="50" />');
    print_submit_row($vbphrase['save'], '_default_', 2, '', "<input type=\"submit\" class=\"button\" tabindex=\"1\" name=\"return\" value=\"{$vbphrase['save_and_reload']}\" accesskey=\"e\" />");
    ?>
	<script type="text/javascript">
	<!--
	var initial_crc32 = crc32(YAHOO.util.Dom.get(textarea_id).value);
	var confirmUnload = true;
Example #20
0
    }
    // end if ($languageid != 0)
    // ***********************
}
// ##########################################################################
if ($_REQUEST['do'] == 'modify') {
    /*
    $typeoptions = array();
    $phrasetypes = fetch_phrasetypes_array();
    foreach($phrasetypes AS $fieldname => $type)
    {
    	$typeoptions["$fieldname"] = construct_phrase($vbphrase['x_phrases'], $type['title']);
    }
    */
    print_form_header('language', 'add');
    construct_hidden_code('goto', "language.php?" . $vbulletin->session->vars['sessionurl']);
    print_table_header($vbphrase['language_manager'], 4);
    print_cells_row(array($vbphrase['language'], '', '', $vbphrase['default']), 1);
    if ($vbulletin->debug) {
        print_language_row(array('languageid' => -1, 'title' => "<i>{$vbphrase['master_language']}</i>"));
    }
    $languages = fetch_languages_array();
    foreach ($languages as $_languageid => $language) {
        print_language_row($language);
    }
    print_description_row(construct_link_code($vbphrase['search_phrases'], "phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=search") . construct_link_code($vbphrase['view_quickref'], "javascript:js_open_phrase_ref(0,0);") . construct_link_code($vbphrase['rebuild_all_languages'], "language.php?" . $vbulletin->session->vars['sessionurl'] . "do=rebuild&amp;goto=language.php?" . $vbulletin->session->vars['sessionurl']), 0, 4, 'thead" style="text-align:center; font-weight:normal');
    print_table_footer(4, '
		<input type="submit" class="button" value="' . $vbphrase['add_new_language'] . '" tabindex="1" />
		<input type="button" class="button" value="' . $vbphrase['download_upload_language'] . '" tabindex="1" onclick="window.location=\'language.php?do=files\';" />
	');
    print_phrase_ref_popup_javascript();
Example #21
0
 if ($vbulletin->GPC['prefixsetid']) {
     $prefixset = $db->query_first("\r\n\t\t\tSELECT *\r\n\t\t\tFROM " . TABLE_PREFIX . "prefixset\r\n\t\t\tWHERE prefixsetid = '" . $db->escape_string($vbulletin->GPC['prefixsetid']) . "'\r\n\t\t");
     if ($prefixset) {
         $phrase = $db->query_first("\r\n\t\t\t\tSELECT text\r\n\t\t\t\tFROM " . TABLE_PREFIX . "phrase\r\n\t\t\t\tWHERE varname = '" . $db->escape_string("prefixset_{$prefixset['prefixsetid']}_title") . "'\r\n\t\t\t\t\tAND fieldname = 'prefix'\r\n\t\t\t\t\tAND languageid = 0\r\n\t\t\t");
         $prefixset['title'] = $phrase['text'];
     }
 }
 // if not editing a set, setup the default for a new set
 if (empty($prefixset)) {
     $prefixset = array('prefixsetid' => '', 'title' => '', 'displayorder' => 10);
 }
 print_form_header('prefix', 'insertset');
 if ($prefixset['prefixsetid']) {
     print_table_header($vbphrase['editing_prefix_set']);
     print_label_row($vbphrase['prefix_set_id_alphanumeric_note'], $prefixset['prefixsetid'], '', 'top', 'prefixsetid');
     construct_hidden_code('origprefixsetid', $prefixset['prefixsetid']);
 } else {
     print_table_header($vbphrase['adding_prefix_set']);
     print_input_row($vbphrase['prefix_set_id_alphanumeric_note'], 'prefixsetid', '', true, 35, 25);
 }
 $trans_link = "phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&fieldname=prefix&t=1&varname=";
 // has varname appended
 print_input_row($vbphrase['title'] . ($prefixset['prefixsetid'] ? '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . "prefixset_{$prefixset['prefixsetid']}_title", 1) . '</dfn>' : ''), 'title', $prefixset['title']);
 print_input_row($vbphrase['display_order'], 'displayorder', $prefixset['displayorder']);
 $enabled_forums = array();
 if ($prefixset['prefixsetid']) {
     $forums_sql = $db->query_read("\r\n\t\t\tSELECT forumid\r\n\t\t\tFROM " . TABLE_PREFIX . "forumprefixset\r\n\t\t\tWHERE prefixsetid = '" . $db->escape_string($prefixset['prefixsetid']) . "'\r\n\t\t");
     while ($forum = $db->fetch_array($forums_sql)) {
         $enabled_forums[] = $forum['forumid'];
     }
 }
Example #22
0
        // #############################################################################
        // move userpics from database to filesystem
        case 'DB_to_FS':
            // check path is valid
            verify_upload_folder($vbulletin->GPC['avatarpath']);
            verify_upload_folder($vbulletin->GPC['profilepicpath']);
            verify_upload_folder($vbulletin->GPC['sigpicpath']);
            // update $vboptions
            $db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "setting SET value =\n\t\t\t\tCASE varname\n\t\t\t\t\tWHEN 'avatarpath' THEN '" . $db->escape_string($vbulletin->GPC['avatarpath']) . "'\n\t\t\t\t\tWHEN 'avatarurl' THEN '" . $db->escape_string($vbulletin->GPC['avatarurl']) . "'\n\t\t\t\t\tWHEN 'profilepicpath' THEN '" . $db->escape_string($vbulletin->GPC['profilepicpath']) . "'\n\t\t\t\t\tWHEN 'profilepicurl' THEN '" . $db->escape_string($vbulletin->GPC['profilepicurl']) . "'\n\t\t\t\t\tWHEN 'sigpicpath' THEN '" . $db->escape_string($vbulletin->GPC['sigpicpath']) . "'\n\t\t\t\t\tWHEN 'sigpicurl' THEN '" . $db->escape_string($vbulletin->GPC['sigpicurl']) . "'\n\t\t\t\tELSE value END\n\t\t\t\tWHERE varname IN('avatarpath', 'avatarurl', 'profilepicurl', 'profilepicpath', 'sigpicurl', 'sigpicpath')\n\t\t\t");
            build_options();
            break;
    }
    // #############################################################################
    print_form_header('avatar', 'domoveavatar');
    print_table_header(construct_phrase($vbphrase['edit_storage_type'], "<span class=\"normal\">" . $vbphrase['user_pictures'] . "</span>"));
    construct_hidden_code('dowhat', $vbulletin->GPC['dowhat']);
    if ($vbulletin->GPC['dowhat'] == 'DB_to_FS') {
        print_description_row($vbphrase['we_are_ready_to_attempt_to_move_your_images_from_database_to_filesystem']);
    } else {
        print_description_row($vbphrase['we_are_ready_to_attempt_to_move_your_images_from_filesystem_to_database']);
    }
    print_input_row($vbphrase['number_of_users_to_process_per_cycle'], 'perpage', 300, 1, 5);
    print_submit_row($vbphrase['go']);
}
// ################### Move avatars ######################################
if ($_REQUEST['do'] == 'domoveavatar') {
    $vbulletin->input->clean_array_gpc('r', array('perpage' => TYPE_INT, 'startat' => TYPE_INT));
    if (is_demo_mode()) {
        print_cp_message('This function is disabled within demo mode');
    }
    if ($vbulletin->GPC['perpage'] < 1) {
    $vbulletin->input->clean_array_gpc('p', array('method' => TYPE_NOHTML, 'amount' => TYPE_UINT, 'usergroupid' => TYPE_INT, 'banusergroupid' => TYPE_UINT, 'period' => TYPE_NOHTML));
    if (empty($vbulletin->GPC['amount'])) {
        print_stop_message('please_complete_required_fields');
    }
    if (empty($vbulletin->GPC['infractionbanid'])) {
        $db->query_write("INSERT INTO " . TABLE_PREFIX . "infractionban (amount) VALUES (0)");
        $vbulletin->GPC['infractionbanid'] = $db->insert_id();
    }
    $db->query_write("\n\t\tUPDATE " . TABLE_PREFIX . "infractionban\n\t\tSET amount = " . $vbulletin->GPC['amount'] . ",\n\t\t\tmethod = '" . $db->escape_string($vbulletin->GPC['method']) . "',\n\t\t\tusergroupid = " . $vbulletin->GPC['usergroupid'] . ",\n\t\t\tbanusergroupid = " . $vbulletin->GPC['banusergroupid'] . ",\n\t\t\tperiod = '" . $db->escape_string($vbulletin->GPC['period']) . "'\n\t\tWHERE infractionbanid = " . $vbulletin->GPC['infractionbanid'] . "\n\t");
    define('CP_REDIRECT', 'admininfraction.php?do=modify');
    print_stop_message('saved_automatic_ban_successfully');
}
// ###################### Start Remove #######################
if ($_REQUEST['do'] == 'removebangroup') {
    print_form_header('admininfraction', 'killbangroup');
    construct_hidden_code('infractionbanid', $vbulletin->GPC['infractionbanid']);
    print_table_header(construct_phrase($vbphrase['confirm_deletion_x'], $vbphrase['automatic_ban']));
    print_description_row($vbphrase['are_you_sure_you_want_to_delete_this_automatic_ban']);
    print_submit_row($vbphrase['yes'], '', 2, $vbphrase['no']);
}
// ###################### Start Kill #######################
if ($_POST['do'] == 'killbangroup') {
    $db->query_write("DELETE FROM " . TABLE_PREFIX . "infractionban WHERE infractionbanid = " . $vbulletin->GPC['infractionbanid']);
    define('CP_REDIRECT', 'admininfraction.php?do=modify');
    print_stop_message('deleted_automatic_ban_successfully');
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:39, Wed May 30th 2012
|| # CVS: $RCSfile$ - $Revision: 39862 $
Example #24
0
    define('CP_REDIRECT', 'attachment.php?do=types');
    if ($vbulletin->GPC['extension']) {
        $db->query_write(fetch_query_sql($vbulletin->GPC['type'], 'attachmenttype', 'WHERE extension = \'' . $db->escape_string($vbulletin->GPC['extension']) . '\''));
        build_attachment_permissions();
    } else {
        /*insert query*/
        $db->query_write("\n\t\t\tINSERT INTO " . TABLE_PREFIX . "attachmenttype\n\t\t\t(\n\t\t\t\textension,\n\t\t\t\tsize,\n\t\t\t\theight,\n\t\t\t\twidth,\n\t\t\t\tmimetype,\n\t\t\t\tcontenttypes\n\t\t\t)\n\t\t\tVALUES\n\t\t\t(\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['type']['extension']) . "',\n\t\t\t\t" . intval($vbulletin->GPC['type']['size']) . ",\n\t\t\t\t" . intval($vbulletin->GPC['type']['height']) . ",\n\t\t\t\t" . intval($vbulletin->GPC['type']['width']) . ",\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['type']['mimetype']) . "',\n\t\t\t\t'" . $db->escape_string($vbulletin->GPC['type']['contenttype']) . "'\n\t\t\t)\n\t\t");
        build_attachment_permissions();
    }
    print_stop_message('saved_attachment_type_x_successfully', $vbulletin->GPC['type']['extension']);
}
// ###################### Remove File Type ####################
if ($_REQUEST['do'] == 'removetype') {
    $vbulletin->input->clean_array_gpc('r', array('extension' => TYPE_STR));
    print_form_header('attachment', 'killtype', 0, 1, '', '75%');
    construct_hidden_code('extension', $vbulletin->GPC['extension']);
    print_table_header(construct_phrase($vbphrase['confirm_deletion_of_attachment_type_x'], $vbulletin->GPC['extension']));
    print_description_row("\n\t\t<blockquote><br />" . construct_phrase($vbphrase['are_you_sure_you_want_to_delete_the_attachment_type_x'], $vbulletin->GPC['extension']) . "\n\t\t<br /></blockquote>\n\t");
    print_submit_row($vbphrase['yes'], 0, 2, $vbphrase['no']);
}
// ###################### Kill File Type ####################
if ($_POST['do'] == 'killtype') {
    $vbulletin->input->clean_array_gpc('r', array('extension' => TYPE_STR));
    $db->query_write("\n\t\tDELETE FROM " . TABLE_PREFIX . "attachmenttype\n\t\tWHERE extension = '" . $db->escape_string($vbulletin->GPC['extension']) . "'\n\t");
    $db->query_write("\n\t\tDELETE FROM " . TABLE_PREFIX . "attachmentpermission\n\t\tWHERE extension = '" . $db->escape_string($vbulletin->GPC['extension']) . "'\n\t");
    build_attachment_permissions();
    define('CP_REDIRECT', 'attachment.php?do=types');
    print_stop_message('deleted_attachment_type_successfully');
}
print_cp_footer();
/*======================================================================*\
Example #25
0
    print_table_footer(7, "{$firstpage} {$prevpage} &nbsp; {$nextpage} {$lastpage}");
}
// *************************************************************************************************
if ($_REQUEST['do'] == 'editreputation') {
    $vbulletin->input->clean_array_gpc('r', array('reputationid' => TYPE_INT));
    if ($repinfo = $db->query_first("\n\t\tSELECT rep.*, whoadded.username as whoadded_username, user.username, thread.title, thread.threadid\n\t\tFROM " . TABLE_PREFIX . "reputation AS rep\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS user ON (rep.userid = user.userid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS whoadded ON (rep.whoadded = whoadded.userid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "post AS post ON (rep.postid = post.postid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.threadid = post.threadid)\n\t\tWHERE reputationid = " . $vbulletin->GPC['reputationid'])) {
        print_form_header('adminreputation', 'doeditreputation');
        print_table_header($vbphrase['edit_reputation']);
        print_label_row($vbphrase['thread'], $repinfo['title'] ? "<a href=\"" . fetch_seo_url('thread|bburl', $repinfo, array('p' => $repinfo['postid'])) . "#post{$repinfo['postid']}" . "\">{$repinfo['title']}</a>" : '');
        print_label_row($vbphrase['leftby'], $repinfo['whoadded_username']);
        print_label_row($vbphrase['leftfor'], $repinfo['username']);
        print_input_row($vbphrase['comment'], 'reputation[reason]', $repinfo['reason']);
        print_input_row($vbphrase['reputation'], 'reputation[reputation]', $repinfo['reputation'], 0, 5);
        construct_hidden_code('reputationid', $vbulletin->GPC['reputationid']);
        construct_hidden_code('oldreputation', $repinfo[reputation]);
        construct_hidden_code('userid', $repinfo['userid']);
        print_submit_row();
    } else {
        print_stop_message('no_matches_found');
    }
}
// *************************************************************************************************
if ($_POST['do'] == 'doeditreputation') {
    $vbulletin->input->clean_array_gpc('p', array('reputation' => TYPE_ARRAY, 'reputationid' => TYPE_INT, 'oldreputation' => TYPE_INT, 'userid' => TYPE_INT));
    $db->query_write(fetch_query_sql($vbulletin->GPC['reputation'], 'reputation', "WHERE reputationid=" . $vbulletin->GPC['reputationid']));
    if ($vbulletin->GPC['oldreputation'] != $vbulletin->GPC['reputation']['reputation']) {
        $diff = $vbulletin->GPC['oldreputation'] - $vbulletin->GPC['reputation']['reputation'];
        $user = fetch_userinfo($vbulletin->GPC['userid']);
        if ($user) {
            $userdm =& datamanager_init('User', $vbulletin, ERRTYPE_SILENT);
            $userdm->set_existing($user);
if ($vbulletin->GPC['step'] == 3) {
    $vbulletin->input->clean_array_gpc('p', array('settingconfirm' => TYPE_UINT, 'disablesetting' => TYPE_UINT));
    if ($vbulletin->GPC['settingconfirm'] == 1) {
        echo '<p>';
        if ($vbulletin->GPC['disablesetting'] == 1) {
            $db->query_write("UPDATE " . TABLE_PREFIX . "setting SET value=0 WHERE varname='timeoutcontrolpanel'");
            echo $upgrade_phrases['upgrade_300b5.php']['disabled_timeout_admin'];
        } else {
            echo $upgrade_phrases['upgrade_300b5.php']['timeout_admin_not_changed'];
        }
        echo '</p>';
    } else {
        if ($vbulletin->options['timeoutcontrolpanel'] == 1) {
            print_form_header('upgrade_300b5', '');
            construct_hidden_code('step', $vbulletin->GPC['step']);
            construct_hidden_code('settingconfirm', 1);
            print_table_header($upgrade_phrases['upgrade_300b5.php']['change_setting_value']);
            print_yes_no_row($upgrade_phrases['upgrade_300b5.php']['setting_info'], 'disablesetting', 0);
            print_submit_row($upgrade_phrases['upgrade_300b5.php']['proceed'], '');
            print_cp_footer();
        } else {
            echo "<p>{$upgrade_phrases['upgrade_300b5.php']['no_change_needed']}</p>";
        }
    }
}
// #############################################################################
// FINAL step (notice the SCRIPTCOMPLETE define)
if ($vbulletin->GPC['step'] == 4) {
    // tell log_upgrade_step() that the script is done
    define('SCRIPTCOMPLETE', true);
}
Example #27
0
 case 'INSERT':
 case 'REPLACE':
 case 'DELETE':
 case 'ALTER':
 case 'CREATE':
 case 'DROP':
 case 'RENAME':
 case 'TRUNCATE':
 case 'LOAD':
 default:
     if (!$vbulletin->GPC['confirmquery']) {
         print_form_header('queries', 'doquery');
         construct_hidden_code('do', 'doquery');
         construct_hidden_code('query', $query);
         construct_hidden_code('perpage', $vbulletin->GPC['perpage']);
         construct_hidden_code('confirmquery', 1);
         print_table_header($vbphrase['confirm_query_execution']);
         print_description_row($vbphrase['query_may_modify_database']);
         print_submit_row($vbphrase['continue'], false, 2, $vbphrase['go_back']);
     } else {
         $time_before = microtime();
         $db->query_write($query);
         $time_taken = fetch_microtime_difference($time_before);
         print_form_header('queries', 'doquery');
         print_table_header($vbphrase['vbulletin_message']);
         if ($errornum = $db->errno()) {
             print_description_row(construct_phrase($vbphrase['an_error_occured_while_attempting_to_run_your_query'], $errornum, nl2br(htmlspecialchars_uni($db->error()))));
         } else {
             print_description_row(construct_phrase($vbphrase['affected_rows'], vb_number_format($db->affected_rows()), vb_number_format($time_taken, 4)));
         }
         print_table_footer();
Example #28
0
	function updatetemplate_print_error_page($template_un, $error)
	{
		global $vbulletin, $vbphrase;
		print_form_header('template', 'updatetemplate', 0, 1, '', '75%');
		construct_hidden_code('confirmerrors', 1);
		construct_hidden_code('title', $vbulletin->GPC['title']);
		construct_hidden_code('template', $template_un);
		construct_hidden_code('templateid', $vbulletin->GPC['templateid']);
		construct_hidden_code('group', $vbulletin->GPC['group']);
		construct_hidden_code('searchstring', $vbulletin->GPC['searchstring']);
		construct_hidden_code('dostyleid', $vbulletin->GPC['dostyleid']);
		construct_hidden_code('product', $vbulletin->GPC['product']);
		construct_hidden_code('savehistory', intval($vbulletin->GPC['savehistory']));
		construct_hidden_code('histcomment', $vbulletin->GPC['histcomment']);
		print_table_header($vbphrase['vbulletin_message']);
		print_description_row($error);
		print_submit_row($vbphrase['continue'], 0, 2, $vbphrase['go_back']);
		print_cp_footer();
	}
    }
    // rebuild the cache
    build_bookmarksite_datastore();
    define('CP_REDIRECT', 'bookmarksite.php' . $vbulletin->session->vars['sessionurl_q']);
    print_stop_message('bookmark_site_saved_successfully');
    $_REQUEST['do'] = 'modify';
}
// ########################################################################
if ($_REQUEST['do'] == 'add' or $_REQUEST['do'] == 'edit') {
    $vbulletin->input->clean_array_gpc('r', array('bookmarksiteid' => TYPE_UINT));
    print_form_header('bookmarksite', 'update');
    print_column_style_code(array('width:35%', 'width:65%'));
    if ($_REQUEST['do'] == 'edit' and $bookmarksite = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bookmarksite WHERE bookmarksiteid = " . $vbulletin->GPC['bookmarksiteid'])) {
        // edit existing
        print_table_header($vbphrase['edit_social_bookmarking_site'] . " <span class=\"normal\">{$bookmarksite['title']}</span>");
        construct_hidden_code('bookmarksiteid', $bookmarksite['bookmarksiteid']);
    } else {
        // add new
        $bookmarksite = $vbulletin->db->query_first("SELECT MAX(displayorder) AS displayorder FROM " . TABLE_PREFIX . "bookmarksite");
        $bookmarksite['displayorder'] += 10;
        $bookmarksite['url'] = 'http://';
        $bookmarksite['active'] = true;
        $bookmarksite['utf8encode'] = false;
        print_table_header($vbphrase['add_new_social_bookmarking_site']);
    }
    print_input_row($vbphrase['title'], 'title', $bookmarksite['title'], false, 50);
    print_input_row($vbphrase['icon'] . '<dfn>' . $vbphrase['icon_bookmarksite_help'] . '</dfn>', 'iconpath', $bookmarksite['iconpath'], true, 50);
    print_input_row($vbphrase['link'] . '<dfn>' . $vbphrase['link_replacement_variables_help'] . '</dfn>', 'url', $bookmarksite['url'], true, 50);
    print_input_row($vbphrase['display_order'], 'displayorder', $bookmarksite['displayorder'], true, 2);
    print_yes_no_row($vbphrase['active'], 'active', $bookmarksite['active']);
    print_yes_no_row($vbphrase['utf8encode_title'] . '<dfn>' . $vbphrase['utf8encode_title_help'] . '</dfn>', 'utf8encode', $bookmarksite['utf8encode']);
Example #30
0
    print_table_header($vbphrase['nntp_set_group'], 2);
    print_input_row($vbphrase['nntp_group_name'], 'group_name', $nntp_group->get_group_name());
    ($hook = vBulletinHook::fetch_hook('nntp_gate_group_settings')) ? eval($hook) : false;
    $is_active = $nntp_group->get_is_active();
    if (is_null($is_active) || $is_active) {
        $is_active = 'yes';
    }
    print_yes_no_row($vbphrase['nntp_group_is_active'], 'is_active', 'yes' == $is_active);
    print_submit_row($vbphrase['save'], '', 2, $vbphrase['no']);
}
// ###################### Start Remove ###################################
if ($_REQUEST['do'] == 'remove_group') {
    // check for there is no groups mapped to this one
    //    admincp_check_for_mapped_groups( $vbulletin->GPC['group_id'] );
    print_form_header($this_script, 'kill_group');
    construct_hidden_code('group_id', $vbulletin->GPC['group_id']);
    print_table_header($vbphrase['confirm_deletion']);
    print_description_row($vbphrase['nntp_are_you_sure_you_want_to_delete_this_group']);
    print_submit_row($vbphrase['yes'], '', 2, $vbphrase['no']);
}
// ###################### Start Kill #####################################
if ($_REQUEST['do'] == 'kill_group') {
    $group_id = $vbulletin->GPC['group_id'];
    define('CP_REDIRECT', $this_script . '.php?do=list');
    if ($nntp_group->delete_group($group_id)) {
        print_stop_message('nntp_group_deleted_successfully');
    } else {
        print_stop_message('nntp_group_deleted_defeated');
    }
}
// ###################### Start clean #####################################