Exemplo n.º 1
0
function kbank_print_cp_header($title = '', $onload = '', $headinsert = '', $marginwidth = 0, $bodyattributes = '')
{
    if (VB_AREA == 'AdminCP') {
        //back-end
        print_cp_header($title, $onload, $headinsert, $marginwidth, $bodyattributes);
    } else {
        //font-end
        global $title_extra, $navbits;
        $title_extra = $title;
        $navbits[] = $title;
    }
}
Exemplo n.º 2
0
require_once DIR . '/includes/photoplog_prefix.php';
require_once DIR . '/' . $vbulletin->config['Misc']['admincpdir'] . '/photoplog_functions.php';
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminforums')) {
    print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
log_admin_action();
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
$photoplog_list_categories = array();
photoplog_list_categories($photoplog_list_categories, -1, $vbphrase['photoplog_no_one']);
$photoplog_categoryoptions = array('allowhtml' => 1, 'allowsmilies' => 2, 'allowbbcode' => 4, 'allowimgcode' => 8, 'allowparseurl' => 16, 'allowcomments' => 32, 'issearchable' => 64, 'ismembersfolder' => 128, 'actasdivider' => 256, 'allowdeschtml' => 512, 'openforsubcats' => 1024);
$photoplog_ds_catopts = photoplog_fetch_ds_cat();
print_cp_header($vbphrase['photoplog_category_manager']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
if ($_REQUEST['do'] == 'decline') {
    $vbulletin->input->clean_array_gpc('r', array('suggestid' => TYPE_UINT));
    print_form_header('photoplog_category', 'dodecline');
    construct_hidden_code('s', $vbulletin->session->vars['sessionhash']);
    construct_hidden_code('suggestid', $vbulletin->GPC['suggestid']);
    print_table_header($vbphrase['photoplog_confirm_decline']);
    print_description_row($vbphrase['photoplog_you_are_about_to_decline'] . ' ' . $vbphrase['photoplog_are_you_sure']);
    print_submit_row($vbphrase['photoplog_yes'], '', 2, $vbphrase['photoplog_no']);
}
if ($_REQUEST['do'] == 'dodecline') {
    $vbulletin->input->clean_array_gpc('r', array('suggestid' => TYPE_UINT));
    $photoplog_suggestid = $vbulletin->GPC['suggestid'];
Exemplo n.º 3
0
}

$vbulletin->input->clean_array_gpc('r', array(
	'userid'      => TYPE_INT,
	'usergroupid' => TYPE_INT,
	'forumid'     => TYPE_INT,
));

// ############################# LOG ACTION ###############################
log_admin_action(iif($vbulletin->GPC['userid'], "user id = " . $vbulletin->GPC['userid'], iif($vbulletin->GPC['usergroupid'], "usergroup id = " . $vbulletin->GPC['usergroupid'], iif($vbulletin->GPC['forumid'], "forum id = " . $vbulletin->GPC['forumid']))));

// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################

print_cp_header($vbphrase['view_permissions']);

$perm_phrase = array(
	'canview'               => $vbphrase['can_view_forum'],
	'canviewthreads'        => $vbphrase['can_view_threads'],
	'canviewothers'         => $vbphrase['can_view_others_threads'],
	'cansearch'             => $vbphrase['can_search_forum'],
	'canemail'              => $vbphrase['can_use_email_to_friend'],
	'canpostnew'            => $vbphrase['can_post_threads'],
	'canreplyown'           => $vbphrase['can_reply_to_own_threads'],
	'canreplyothers'        => $vbphrase['can_reply_to_others_threads'],
	'caneditpost'           => $vbphrase['can_edit_own_posts'],
	'candeletepost'         => $vbphrase['can_delete_own_posts'],
	'candeletethread'       => $vbphrase['can_delete_own_threads'],
	'canopenclose'          => $vbphrase['can_open_close_own_threads'],
	'canmove'               => $vbphrase['can_move_own_threads'],
Exemplo n.º 4
0
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('CVS_REVISION', '$RCSfile$ - $Revision: 37230 $');
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('sql', 'user', 'cpuser');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
$vbulletin->input->clean_array_gpc('r', array('query' => TYPE_STR));
// ############################# LOG ACTION ###############################
log_admin_action(!empty($vbulletin->GPC['query']) ? "query = '" . htmlspecialchars_uni($vbulletin->GPC['query']) . "'" : '');
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['execute_sql_query']);
if (!$vbulletin->debug) {
    $userids = explode(',', str_replace(' ', '', $vbulletin->config['SpecialUsers']['canrunqueries']));
    if (!in_array($vbulletin->userinfo['userid'], $userids)) {
        print_stop_message('no_permission_queries');
    }
}
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
// define auto queries
$queryoptions = array('-1' => '', $vbphrase['all_users'] => array('10' => $vbphrase['yes'] . ' - ' . $vbphrase['invisible_mode'], '80' => $vbphrase['no'] . ' - ' . $vbphrase['invisible_mode'], '20' => $vbphrase['yes'] . ' - ' . $vbphrase['allow_vcard_download'], '90' => $vbphrase['no'] . ' - ' . $vbphrase['allow_vcard_download'], '30' => $vbphrase['yes'] . ' - ' . $vbphrase['receive_admin_emails'], '100' => $vbphrase['no'] . ' - ' . $vbphrase['receive_admin_emails'], '40' => $vbphrase['yes'] . ' - ' . $vbphrase['display_email'], '110' => $vbphrase['no'] . ' - ' . $vbphrase['display_email'], '50' => $vbphrase['yes'] . ' - ' . $vbphrase['receive_private_messages'], '120' => $vbphrase['no'] . ' - ' . $vbphrase['receive_private_messages'], '60' => $vbphrase['yes'] . ' - ' . $vbphrase['send_notification_email_when_a_private_message_is_received'], '130' => $vbphrase['no'] . ' - ' . $vbphrase['send_notification_email_when_a_private_message_is_received'], '70' => $vbphrase['yes'] . ' - ' . $vbphrase['pop_up_notification_box_when_a_private_message_is_received'], '140' => $vbphrase['no'] . ' - ' . $vbphrase['pop_up_notification_box_when_a_private_message_is_received'], '150' => $vbphrase['on'] . ' - ' . $vbphrase['display_signatures'], '180' => $vbphrase['off'] . ' - ' . $vbphrase['display_signatures'], '160' => $vbphrase['on'] . ' - ' . $vbphrase['display_avatars'], '190' => $vbphrase['off'] . ' - ' . $vbphrase['display_avatars'], '170' => $vbphrase['on'] . ' - ' . $vbphrase['display_images'], '200' => $vbphrase['off'] . ' - ' . $vbphrase['display_images'], '175' => $vbphrase['on'] . ' - ' . $vbphrase['display_reputation'], '205' => $vbphrase['off'] . ' - ' . $vbphrase['display_reputation'], '176' => $vbphrase['on'] . ' - ' . $vbphrase['enahnced_attachment_uploading'], '206' => $vbphrase['off'] . ' - ' . $vbphrase['enahnced_attachment_uploading'], 'blank1' => '', '210' => $vbphrase['subscribe_choice_none'], '220' => $vbphrase['subscribe_choice_0'], '230' => $vbphrase['subscribe_choice_1'], '240' => $vbphrase['subscribe_choice_2'], '250' => $vbphrase['subscribe_choice_3'], 'blank2' => '', '270' => $vbphrase['thread_display_mode'] . ' - ' . $vbphrase['linear'], '280' => $vbphrase['thread_display_mode'] . ' - ' . $vbphrase['threaded'], '290' => $vbphrase['thread_display_mode'] . ' - ' . $vbphrase['hybrid'], 'blank3' => '', '260' => $vbphrase['posts'] . ' - ' . $vbphrase['oldest_first'], '265' => $vbphrase['posts'] . ' - ' . $vbphrase['newest_first'], 'blank4' => '', '300' => $vbphrase['do_not_show_editor_toolbar'], '310' => $vbphrase['show_standard_editor_toolbar'], '320' => $vbphrase['show_enhanced_editor_toolbar']), $vbphrase['all_forums'] => array('400' => $vbphrase['show_threads_from_last_day'], '405' => $vbphrase['show_threads_from_last_week'], '410' => $vbphrase['show_threads_from_last_month'], '415' => $vbphrase['show_threads_from_last_year'], '420' => $vbphrase['show_all_threads']));
($hook = vBulletinHook::fetch_hook('admin_queries_auto_options')) ? eval($hook) : false;
// ##################### START DO QUERY #####################
if ($_POST['do'] == 'doquery') {
    require_once DIR . '/includes/functions_misc.php';
Exemplo n.º 5
0
$phrasegroups = array('reputation', 'user', 'reputationlevel');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
require_once DIR . '/includes/adminfunctions_reputation.php';
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminusers')) {
    print_cp_no_permission();
}
$vbulletin->input->clean_array_gpc('r', array('reputationlevelid' => TYPE_INT, 'minimumreputation' => TYPE_INT));
// ############################# LOG ACTION ###############################
log_admin_action(iif($vbulletin->GPC['reputationlevelid'] != 0, " reputationlevel id = " . $vbulletin->GPC['reputationlevelid'], iif($vbulletin->GPC['minimumreputation'] != 0, "minimum reputation = " . $vbulletin->GPC['minimumreputation'], '')));
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['user_reputation_manager']);
// *************************************************************************************************
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
// *************************************************************************************************
if ($_REQUEST['do'] == 'add' or $_REQUEST['do'] == 'edit') {
    $vbulletin->input->clean_array_gpc('r', array('reputationlevelid' => TYPE_INT));
    print_form_header('adminreputation', 'update');
    if ($vbulletin->GPC['reputationlevelid']) {
        $reputationlevel = $db->query_first("\n\t\t\t\tSELECT *\n\t\t\t\tFROM " . TABLE_PREFIX . "reputationlevel\n\t\t\t\tWHERE reputationlevelid = " . $vbulletin->GPC['reputationlevelid']);
        $level = 'reputation' . $reputationlevel['reputationlevelid'];
        if ($phrase = $db->query_first("\n\t\t\tSELECT varname, text\n\t\t\tFROM " . TABLE_PREFIX . "phrase\n\t\t\tWHERE languageid = 0 AND\n\t\t\t\t\tfieldname = 'reputationlevel' AND\n\t\t\t\t\tvarname IN ('{$level}')\n\t\t")) {
            $reputationlevel['level'] = $phrase['text'];
            $reputationlevel['levelvarname'] = 'reputation' . $reputationlevel['reputationlevelid'];
        }
Exemplo n.º 6
0
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('user', 'cpuser', 'infraction', 'infractionlevel', 'banning');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminusers')) {
    print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('infractionlevelid' => TYPE_INT, 'infractiongroupid' => TYPE_UINT, 'infractionbanid' => TYPE_UINT));
log_admin_action(!empty($vbulletin->GPC['infractionlevelid']) ? 'infractionlevel id = ' . $vbulletin->GPC['infractionlevelid'] : '');
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['user_infraction_manager']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
// ###################### Start add #######################
if ($_REQUEST['do'] == 'editlevel') {
    print_form_header('admininfraction', 'updatelevel');
    if (!empty($vbulletin->GPC['infractionlevelid'])) {
        $infraction = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "infractionlevel WHERE infractionlevelid = " . $vbulletin->GPC['infractionlevelid']);
        $title = 'infractionlevel' . $infraction['infractionlevelid'] . '_title';
        if ($phrase = $db->query_first("\n\t\t\tSELECT text\n\t\t\tFROM " . TABLE_PREFIX . "phrase\n\t\t\tWHERE languageid = 0 AND\n\t\t\t\tfieldname = 'infractionlevel' AND\n\t\t\t\tvarname = '{$title}'\n\t\t")) {
            $infraction['title'] = $phrase['text'];
            $infraction['titlevarname'] = 'infractionlevel' . $infraction['infractionlevelid'] . '_title';
        }
        if ($infraction['period'] == 'N') {
            $infraction['expires'] = '';
Exemplo n.º 7
0
//inits classloader -- required to make vB_Cache work
require_once DIR . '/includes/class_bootstrap_framework.php';
vB_Bootstrap_Framework::init();
// ######################## CHECK ADMIN PERMISSIONS #######################
// don't allow demo version or admin with no permission to administer plugins
if (is_demo_mode() or !can_administer('canadminplugins')) {
    print_cp_no_permission();
}
$vbulletin->input->clean_array_gpc('r', array('pluginid' => TYPE_UINT));
// ############################# LOG ACTION ###############################
log_admin_action(iif($vbulletin->GPC['pluginid'] != 0, 'plugin id = ' . $vbulletin->GPC['pluginid']));
// #############################################################################
// ########################### START MAIN SCRIPT ###############################
// #############################################################################
if ($_REQUEST['do'] != 'download' and $_REQUEST['do'] != 'productexport') {
    print_cp_header($vbphrase['plugin_products_system']);
}
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
if (in_array($_REQUEST['do'], array('modify', 'files', 'edit', 'add', 'product', 'productadd', 'productedit'))) {
    if (!$vbulletin->options['enablehooks'] or defined('DISABLE_HOOKS')) {
        print_table_start();
        if (!$vbulletin->options['enablehooks']) {
            print_description_row($vbphrase['plugins_disabled_options']);
        } else {
            print_description_row($vbphrase['plugins_disable_config']);
        }
        print_table_footer(2, '', '', false);
    }
}
Exemplo n.º 8
0
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('cppermission', 'forum', 'moderator');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminforums')) {
    print_cp_no_permission();
}
$vbulletin->input->clean_array_gpc('r', array('forumid' => TYPE_INT, 'moderatorid' => TYPE_UINT, 'userid' => TYPE_UINT, 'modusername' => TYPE_STR, 'redir' => TYPE_NOHTML));
// ############################# LOG ACTION ###############################
log_admin_action($vbulletin->GPC['moderatorid'] != 0 ? " moderator id = " . $vbulletin->GPC['moderatorid'] : ($vbulletin->GPC['forumid'] != 0 ? "forum id = " . $vbulletin->GPC['forumid'] : ($vbulletin->GPC['userid'] != 0 ? "user id = " . $vbulletin->GPC['userid'] : (!empty($vbulletin->GPC['modusername']) ? "mod username = "******"<strong>error</strong>\n";
Exemplo n.º 9
0
			debug : false
		});
	</script>
	<?php 
}
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
if (!isset($_GET['act'])) {
    if (isset($_POST['act'])) {
        $_GET['act'] = $_POST['act'];
    } else {
        $_GET['act'] = 1;
    }
}
print_cp_header('QuantumHacks vbMailer');
if ($_GET['do'] == 'manage_attachments') {
    if ($_GET['act'] == 1) {
        print_form_header('qhvbmailer', 'manage_attachments', true, true, '', '50%');
        print_table_header('Add Attachment');
        construct_hidden_code('act', '2');
        print_upload_row('Browse...', 'attachment_file');
        print_submit_row('Upload');
        $select_options[0] = "---Select---";
        $sql = "SELECT * FROM " . TABLE_PREFIX . "qhvbmailer_attachments ORDER BY created DESC";
        $attachments = $db->query_read_slave($sql);
        while ($attachment = $db->fetch_array($attachments)) {
            $select_options[$attachment['id']] = $attachment['filename'];
        }
        print_form_header('qhvbmailer', 'manage_attachments', false, true, '', '50%');
        print_table_header('Delete Attachment');
Exemplo n.º 10
0
define('CVS_REVISION', '$RCSfile$ - $Revision: 26275 $');
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('logging', 'threadmanage');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
require_once DIR . '/includes/functions_log_error.php';
// ############################# LOG ACTION ###############################
if (!can_administer('canadminmodlog')) {
    print_cp_no_permission();
}
log_admin_action();
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['moderator_log']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'choose';
}
// ###################### Start view #######################
if ($_REQUEST['do'] == 'view') {
    $vbulletin->input->clean_array_gpc('r', array('perpage' => TYPE_UINT, 'pagenumber' => TYPE_UINT, 'userid' => TYPE_UINT, 'modaction' => TYPE_STR, 'orderby' => TYPE_NOHTML, 'product' => TYPE_STR, 'startdate' => TYPE_UNIXTIME, 'enddate' => TYPE_UNIXTIME));
    $princids = array('poll_question' => $vbphrase['question'], 'post_title' => $vbphrase['post'], 'thread_title' => $vbphrase['thread'], 'forum_title' => $vbphrase['forum'], 'attachment_title' => $vbphrase['attachment']);
    $sqlconds = array();
    $hook_query_fields = $hook_query_joins = '';
    if ($vbulletin->GPC['perpage'] < 1) {
        $vbulletin->GPC['perpage'] = 15;
    }
    if ($vbulletin->GPC['userid'] or $vbulletin->GPC['modaction']) {
        if ($vbulletin->GPC['userid']) {
            $sqlconds[] = "moderatorlog.userid = " . $vbulletin->GPC['userid'];
Exemplo n.º 11
0
$phrasegroups = array('cppermission', 'cpuser', 'promotion', 'pm', 'cpusergroup');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
require_once DIR . '/includes/functions_ranks.php';
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminpermissions')) {
    print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('usergroupid' => TYPE_INT, 'usergroupleaderid' => TYPE_INT));
log_admin_action(!empty($vbulletin->GPC['usergroupid']) ? "usergroup id = " . $vbulletin->GPC['usergroupid'] : (!empty($vbulletin->GPC['usergroupleaderid']) ? "leader id = " . $vbulletin->GPC['usergroupleaderid'] : ''));
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['usergroup_manager']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
// ###################### Start getuserid #######################
function fetch_userid_from_username($username)
{
    global $vbulletin;
    if ($user = $vbulletin->db->query_first("SELECT userid FROM " . TABLE_PREFIX . "user WHERE username = '******'")) {
        return $user['userid'];
    } else {
        return false;
    }
}
// ###################### Start add / update #######################
if ($_REQUEST['do'] == 'add' or $_REQUEST['do'] == 'edit') {
Exemplo n.º 12
0
    if ($exists = $db->query_first_slave("SELECT templateid\tFROM " . TABLE_PREFIX . "template WHERE\ttitle = 'bbcode_video' AND product IN ('', 'vbulletin')\tAND\tstyleid = -1")) {
        $db->query_write("UPDATE " . TABLE_PREFIX . "template SET\n\t\t\t\ttemplate = '" . $db->escape_string($t) . "',\n\t\t\t\ttemplate_un = '" . $db->escape_string($template) . "',\n\t\t\t\tdateline = " . TIMENOW . ",\n\t\t\t\tusername = '******'username']) . "',\n\t\t\t\tversion = '" . $vbulletin->options['templateversion'] . "'\n\t\t\tWHERE\n\t\t\t\ttemplateid = {$exists['templateid']}\n\t\t");
    } else {
        $db->query_write("REPLACE INTO " . TABLE_PREFIX . "template (template, template_un, dateline, username, templatetype, styleid, title, product, version) VALUES (\n\t\t\t\t\t'" . $db->escape_string($t) . "',\n\t\t\t\t\t'" . $db->escape_string($template) . "',\n\t\t\t\t\t" . TIMENOW . ",\n\t\t\t\t\t'" . $db->escape_string($vbulletin->userinfo['username']) . "',\n\t\t\t\t\t'template',\n\t\t\t\t\t'-1',\n\t\t\t\t\t'bbcode_video',\n\t\t\t\t\t'vbulletin',\n\t\t\t\t\t'" . $vbulletin->options['templateversion'] . "')\n\t\t");
    }
    print_cp_header("AME");
    build_all_styles();
    define('CP_REDIRECT', 'ame.php' . ($_REQUEST['to'] ? '?do=' . $_REQUEST['to'] . ($_REQUEST['toid'] ? "&amp;providerid=" . $_REQUEST['toid'] : '') : ''));
    print_stop_message('rebuilt_video_bbcodes_successfully');
}
/**
 * Don't print off header stuff if we are exporting
 * definitions
 */
if ($_REQUEST['do'] != "doexport") {
    print_cp_header("AME");
    ?>

	<script type="text/javascript">
		function grab_left(str, n)
	    {
	            if (n <= 0)
	            {
	                return "";
	            }
	            else if (n > String(str).length)
	            {
	                return str;
	            }
	            else
	            {
Exemplo n.º 13
0
$phrasegroups = array('cron', 'logging');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once dirname(__FILE__) . '/global.php';
// ######################## CHECK ADMIN PERMISSIONS #######################
if (is_demo_mode() or !can_administer('canadmincron')) {
    print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('cronid' => vB_Cleaner::TYPE_INT));
log_admin_action(iif($vbulletin->GPC['cronid'] != 0, 'cron id = ' . $vbulletin->GPC['cronid']));
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
$vb5_config =& vB::getConfig();
print_cp_header($vbphrase['scheduled_task_manager_gcron']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
// ############## quick enabled/disabled status ################
if ($_POST['do'] == 'updateenabled') {
    $vbulletin->input->clean_gpc('p', 'enabled', vB_Cleaner::TYPE_ARRAY_BOOL);
    $updates = array();
    //$crons_result = $vbulletin->db->query_read("SELECT varname, active FROM " . TABLE_PREFIX . "cron");
    $crons_result = vB::getDbAssertor()->assertQuery('cron');
    foreach ($crons_result as $cron) {
        $old = $cron['active'] ? 1 : 0;
        $new = $vbulletin->GPC['enabled']["{$cron['varname']}"] ? 1 : 0;
        if ($old != $new) {
            $updates["{$cron['varname']}"] = $new;
        }
Exemplo n.º 14
0
require_once DIR . '/includes/functions_misc.php';
require_once DIR . '/includes/class_bbcode.php';
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminbbcodes')) {
    print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('bbcodeid' => TYPE_INT));
log_admin_action(iif($vbulletin->GPC['bbcodeid'] != 0, "bbcode id = " . $vbulletin->GPC['bbcodeid']));
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
if ($_REQUEST['do'] != 'previewbbcode') {
    print_cp_header($vbphrase['bb_code_manager']);
} else {
    print_cp_header();
}
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
// ########################################### ADD #####################################################
if ($_REQUEST['do'] == 'add') {
    print_form_header('bbcode', 'insert');
    print_table_header($vbphrase['add_new_bb_code']);
    print_input_row($vbphrase['title'], 'title');
    print_input_row($vbphrase['bb_code_tag_name'], 'bbcodetag');
    print_textarea_row($vbphrase['replacement'], 'bbcodereplacement', '', 5, 60);
    print_input_row($vbphrase['example'], 'bbcodeexample');
    print_textarea_row($vbphrase['description'], 'bbcodeexplanation', '', 10, 60);
    print_yes_no_row($vbphrase['use_option'], 'twoparams', 0);
    print_input_row($vbphrase['button_image_desc'], 'buttonimage', '');
Exemplo n.º 15
0
$phrasegroups = array('user', 'cpuser', 'cprank');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
require_once DIR . '/includes/functions_ranks.php';
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminusers')) {
    print_cp_no_permission();
}
$vbulletin->input->clean_array_gpc('r', array('rankid' => TYPE_UINT));
// ############################# LOG ACTION ###############################
log_admin_action(!empty($vbulletin->GPC['rankid']) ? "rank id = " . $vbulletin->GPC['rankid'] : '');
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['user_rank_manager']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
// ###################### Start insert #######################
if ($_POST['do'] == 'insert') {
    $vbulletin->input->clean_array_gpc('p', array('ranklevel' => TYPE_UINT, 'minposts' => TYPE_UINT, 'rankimg' => TYPE_STR, 'usergroupid' => TYPE_INT, 'doinsert' => TYPE_STR, 'rankhtml' => TYPE_NOTRIM, 'stack' => TYPE_UINT, 'display' => TYPE_UINT));
    if (!$vbulletin->GPC['ranklevel'] or !$vbulletin->GPC['rankimg'] and !$vbulletin->GPC['rankhtml']) {
        if ($vbulletin->GPC['doinsert']) {
            echo '<p><b>' . $vbphrase['invalid_file_path_specified'] . '</b></p>';
            $vbulletin->GPC['rankimg'] = $vbulletin->GPC['doinsert'];
        } else {
            print_stop_message('please_complete_required_fields');
        }
    }
    if ($vbulletin->GPC['usergroupid'] == -1) {
Exemplo n.º 16
0
// ############################# LOG ACTION ###############################
log_admin_action(!empty($vbulletin->GPC['templateid']) ? 'template id = ' . $vbulletin->GPC['templateid'] : !empty($vbulletin->GPC['dostyleid']) ? 'style id = ' . $vbulletin->GPC['dostyleid'] : '');
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
} else {
    $nozipDos = array('inserttemplate', 'rebuild', 'kill', 'insertstyle', 'killstyle', 'updatestyle');
    if (in_array($_REQUEST['do'], $nozipDos)) {
        $vbulletin->nozip = true;
    }
}
$full_product_info = fetch_product_list(true);
if ($_REQUEST['do'] != 'download') {
    print_cp_header($vbphrase['style_manager'], iif($_REQUEST['do'] == 'files', 'js_fetch_style_title()'));
    ?>
<script type="text/javascript" src="../clientscript/vbulletin_templatemgr.js"></script><?php 
}
// #############################################################################
// find custom templates that need updating
if ($_REQUEST['do'] == 'findupdates') {
    // query custom templates
    $customcache = array();
    $templates = $db->query_read("\n\t\tSELECT tCustom.templateid, tCustom.title, tCustom.styleid,\n\t\t\ttCustom.username AS customuser, tCustom.dateline AS customdate, tCustom.version AS customversion,\n\t\t\ttGlobal.username AS globaluser, tGlobal.dateline AS globaldate, tGlobal.version AS globalversion,\n\t\t\ttGlobal.product\n\t\tFROM " . TABLE_PREFIX . "template AS tCustom\n\t\tINNER JOIN " . TABLE_PREFIX . "template AS tGlobal ON (tGlobal.styleid = -1 AND tGlobal.title = tCustom.title)\n\t\tWHERE tCustom.styleid <> -1\n\t\t\tAND tCustom.templatetype = 'template'\n\t\tORDER BY tCustom.title\n\t");
    while ($template = $db->fetch_array($templates)) {
        if (!$template['product']) {
            $template['product'] = 'vbulletin';
        }
        $product_version = $full_product_info["{$template['product']}"]['version'];
        // version in the template is newer than the version of the product,
Exemplo n.º 17
0
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('CVS_REVISION', '$RCSfile$ - $Revision: 25308 $');
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('cppermission');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['administrator_permissions_manager']);
if (!in_array($vbulletin->userinfo['userid'], preg_split('#\\s*,\\s*#s', $vbulletin->config['SpecialUsers']['superadministrators'], -1, PREG_SPLIT_NO_EMPTY))) {
    print_stop_message('sorry_you_are_not_allowed_to_edit_admin_permissions');
}
// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('userid' => TYPE_INT));
if ($vbulletin->GPC['userid']) {
    $user = $db->query_first("\n\t\tSELECT administrator.*, IF(administrator.userid IS NULL, 0, 1) AS isadministrator,\n\t\t\tuser.userid, user.username\n\t\tFROM " . TABLE_PREFIX . "user AS user\n\t\tLEFT JOIN " . TABLE_PREFIX . "administrator AS administrator ON(administrator.userid = user.userid)\n\t\tWHERE user.userid = " . $vbulletin->GPC['userid']);
    if (!$user) {
        print_stop_message('no_matches_found');
    } else {
        if (!$user['isadministrator']) {
            // should this user have an administrator record??
            $userinfo = fetch_userinfo($user['userid']);
            cache_permissions($userinfo);
            if ($userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) {
Exemplo n.º 18
0
// ########################## REQUIRE BACK-END ############################
require_once dirname(__FILE__) . '/global.php';
require_once DIR . '/includes/adminfunctions_forums.php';
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminpermissions')) {
    print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('np' => vB_Cleaner::TYPE_INT, 'n' => vB_Cleaner::TYPE_INT, 'u' => vB_Cleaner::TYPE_INT));
log_admin_action(iif($vbulletin->GPC['np'] != 0, "nodepermission id = " . $vbulletin->GPC['np'], iif($vbulletin->GPC['n'] != 0, "node id = " . $vbulletin->GPC['n'] . iif($vbulletin->GPC['u'] != 0, " / usergroup id = " . $vbulletin->GPC['u']))));
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
// Load defaultchannelpermissions datastore as its not loaded by default
vB::getDatastore()->fetch('defaultchannelpermissions');
print_cp_header($vbphrase['channel_permissions_manager']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
// ###################### Start edit #######################
if ($_REQUEST['do'] == 'edit') {
    $nodeid =& $vbulletin->GPC['n'];
    $usergroupid =& $vbulletin->GPC['u'];
    $permissionid =& $vbulletin->GPC['np'];
    ?>
	<script type="text/javascript">
	<!--
	function js_set_custom()
	{
		if (document.cpform.inherit[1].checked == false)
		{
Exemplo n.º 19
0
if (!can_administer('canadminforums')) {
    print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
$log_vars = array();
if (!empty($_REQUEST['prefixsetid'])) {
    $log_vars[] = 'prefixsetid = ' . htmlspecialchars_uni($_REQUEST['prefixsetid']);
}
if (!empty($_REQUEST['prefixid'])) {
    $log_vars[] = 'prefixid = ' . htmlspecialchars_uni($_REQUEST['prefixid']);
}
log_admin_action(implode(', ', $log_vars));
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['thread_prefix_manager']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'list';
}
// notes on phrases:
// prefixset_ID_title (prefixes), prefix_ID_title_plain (global), prefix_ID_title_rich (global)
// ########################################################################
if ($_REQUEST['do'] == 'duplicate') {
    $prefixes = array();
    $prefixes_result = $vbulletin->db->query_read("\r\n\t\tSELECT prefix.prefixid, prefixset.prefixsetid\r\n\t\tFROM " . TABLE_PREFIX . "prefix AS prefix\r\n\t\tINNER JOIN " . TABLE_PREFIX . "prefixset AS prefixset ON (prefix.prefixsetid = prefixset.prefixsetid)\r\n\t\tORDER BY prefixset.displayorder ASC, prefix.displayorder ASC\r\n\t");
    while ($prefix = $vbulletin->db->fetch_array($prefixes_result)) {
        $prefixsetphrase = htmlspecialchars_uni($vbphrase["prefixset_{$prefix[prefixsetid]}_title"]);
        $prefixes["{$prefixsetphrase}"]["{$prefix['prefixid']}"] = htmlspecialchars_uni($vbphrase["prefix_{$prefix[prefixid]}_title_plain"]);
    }
    if (empty($prefixes)) {
        print_cp_message($vbphrase['no_prefix_sets_defined_click_create']);
Exemplo n.º 20
0
            if ($vbulletin->GPC['custom'] and $phrase['languageid'] == 0) {
                $attributes['custom'] = 1;
            }
            $xml->add_tag('phrase', $phrase['text'], $attributes, true);
        }
        $xml->close_group();
    }
    $xml->close_group();
    $doc = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n\r\n";
    $doc .= $xml->output();
    $xml = null;
    require_once DIR . '/includes/functions_file.php';
    file_download($doc, $vbulletin->GPC['filename'], 'text/xml');
}
// ##########################################################################
print_cp_header($vbphrase['language_manager']);
// #############################################################################
// #############################################################################
if ($_POST['do'] == 'update') {
    $vbulletin->input->clean_array_gpc('p', array('fieldname' => TYPE_NOHTML, 'pagenumber' => TYPE_UINT, 'def' => TYPE_ARRAY_STR, 'phr' => TYPE_ARRAY_STR, 'rvt' => TYPE_ARRAY_UINT, 'prod' => TYPE_ARRAY_STR));
    if (empty($vbulletin->GPC['product'])) {
        $vbulletin->GPC['product'] = 'vbulletin';
    }
    $updatelanguage = false;
    if (!empty($vbulletin->GPC['rvt'])) {
        $updatelanguage = true;
        $query = "\n\t\t\tDELETE FROM " . TABLE_PREFIX . "phrase\n\t\t\tWHERE phraseid IN(" . implode(', ', $vbulletin->GPC['rvt']) . ")\n\t\t";
        $db->query_write($query);
        // unset reverted phrases
        foreach (array_keys($vbulletin->GPC['rvt']) as $varname) {
            unset($vbulletin->GPC['def']["{$varname}"]);
Exemplo n.º 21
0
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('help_faq');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
require_once DIR . '/includes/adminfunctions_help.php';
// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('adminhelpid' => TYPE_INT));
log_admin_action(iif($vbulletin->GPC['adminhelpid'] != 0, "help id = " . $vbulletin->GPC['adminhelpid']));
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'answer';
}
print_cp_header("{$vbphrase['admin_help']}");
// ############################### start listing answers ##############
if ($_REQUEST['do'] == 'answer') {
    $vbulletin->input->clean_array_gpc('r', array('page' => TYPE_STR, 'pageaction' => TYPE_STR, 'option' => TYPE_STR));
    if (empty($vbulletin->GPC['page'])) {
        $fullpage = REFERRER;
    } else {
        $fullpage = $vbulletin->GPC['page'];
    }
    if (!$fullpage) {
        print_stop_message('invalid_page_specified');
    }
    if ($strpos = strpos($fullpage, '?')) {
        $pagename = basename(substr($fullpage, 0, $strpos));
    } else {
        $pagename = basename($fullpage);
Exemplo n.º 22
0
define('CVS_REVISION', '$RCSfile$ - $Revision: 27796 $');
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('attachment_image');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminimages')) {
    print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
log_admin_action();
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['userpic_manager']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'storage';
}
// ###################### Start checkpath #######################
function verify_upload_folder($imagepath)
{
    global $vbphrase;
    if ($imagepath == '') {
        print_stop_message('please_complete_required_fields');
    }
    if ($fp = @fopen($imagepath . '/test.image', 'wb')) {
        fclose($fp);
        if (!@unlink($imagepath . '/test.image')) {
            print_stop_message('test_file_write_failed', $imagepath);
        }
Exemplo n.º 23
0
$phrasegroups = array('user', 'cpuser');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once dirname(__FILE__) . '/global.php';
$assertor = vB::getDbAssertor();
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminusers')) {
    print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('usertitleid' => vB_Cleaner::TYPE_INT));
log_admin_action(!empty($vbulletin->GPC['usertitleid']) ? 'usertitle id = ' . $vbulletin->GPC['usertitleid'] : '');
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['user_title_manager_gcpuser']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
// ###################### Start add #######################
if ($_REQUEST['do'] == 'add') {
    print_form_header('usertitle', 'insert');
    print_table_header($vbphrase['add_new_user_title_gcpuser']);
    print_input_row($vbphrase['title'], 'title');
    print_input_row($vbphrase['minimum_posts'], 'minposts');
    print_submit_row($vbphrase['save']);
}
// ###################### Start insert #######################
if ($_POST['do'] == 'insert') {
    $vbulletin->input->clean_array_gpc('p', array('title' => vB_Cleaner::TYPE_STR, 'minposts' => vB_Cleaner::TYPE_UINT));
    if (empty($vbulletin->GPC['title'])) {
Exemplo n.º 24
0
require_once './global.php';
require_once DIR . '/includes/adminfunctions_attachment.php';
require_once DIR . '/includes/functions_file.php';
require_once DIR . '/packages/vbattach/attach.php';
vB_Router::setRelativePath('../');
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminthreads')) {
    print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('attachmentid' => TYPE_INT, 'extension' => TYPE_STR, 'attachpath' => TYPE_STR, 'dowhat' => TYPE_STR));
log_admin_action(iif($vbulletin->GPC['attachmentid'] != 0, 'attachment id = ' . $vbulletin->GPC['attachmentid'], iif(!empty($vbulletin->GPC['extension']), "extension = " . $vbulletin->GPC['extension'], '')));
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['attachment_manager']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'intro';
}
// ###################### Swap from database to file system and vice versa ##########
if ($_REQUEST['do'] == 'storage') {
    if ($vbulletin->options['attachfile']) {
        $options = array('FS_to_DB' => $vbphrase['move_items_from_filesystem_into_database'], 'FS_to_FS' => $vbphrase['move_items_to_a_different_directory']);
    } else {
        $options = array('DB_to_FS' => $vbphrase['move_items_from_database_into_filesystem']);
    }
    $i = 0;
    $dowhat = '';
    foreach ($options as $value => $text) {
        $dowhat .= "<label for=\"dw{$value}\"><input type=\"radio\" name=\"dowhat\" id=\"dw{$value}\" value=\"{$value}\"" . iif($i++ == 0, ' checked="checked"') . " />{$text}</label><br />";
    }
Exemplo n.º 25
0
// ########################## REQUIRE BACK-END ############################
require_once('./global.php');
require_once(DIR . '/includes/functions_banning.php');

// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('username' => TYPE_STR));
if ($_POST['do'] != 'doliftban')
{
	log_admin_action(!empty($vbulletin->GPC['username']) ? 'username = '******'username'] : '');
}

// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################

print_cp_header($vbphrase['user_banning']);
$canbanuser = ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] OR can_moderate(0, 'canbanusers')) ? true : false;
$canunbanuser = ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] OR can_moderate(0, 'canunbanusers')) ? true : false;

// check banning permissions
if (!$canbanuser AND !$canunbanuser)
{
	print_stop_message('no_permission_ban_users');
}

// set default action
if (empty($_REQUEST['do']))
{
	$_REQUEST['do'] = 'modify';
}
Exemplo n.º 26
0
require_once DIR . '/includes/adminfunctions_template.php';
// ############################# LOG ACTION ##############################
$vbulletin->input->clean_array_gpc('r', array('usertitleid' => TYPE_INT));
log_admin_action(!empty($vbulletin->GPC['usertitleid']) ? 'usertitle id = ' . $vbulletin->GPC['usertitleid'] : '');
// #######################################################################
// ######################### START MAIN SCRIPT ###########################
// #######################################################################
require_once DIR . '/includes/class_nntpgate_group_base.php';
$do = $_REQUEST['do'];
$this_script = 'nntp_groups';
$nntp_gate_ver = 1.0;
// ############## GET AVAILABLE PLUGINS LIST #############################
$plugins = array();
($hook = vBulletinHook::fetch_hook('nntp_gate_plugins')) ? eval($hook) : false;
// ############## START ##################################################
print_cp_header($vbphrase['nntp_groups']);
// ############## ADD NEW GROUP FORM AND EXISTING GROUPS LIST ############
if (empty($do) || $do == 'list') {
    ?>
<script type="text/javascript">
    function js_nntpgroup_jump(group_id, plugin, obj)
    {
        task = obj.options[obj.selectedIndex].value;
        switch (task)
        {
            case 'edit'   : window.location = "<?php 
    echo $this_script;
    ?>
.php?<?php 
    echo $vbulletin->session->vars['sessionurl_js'];
    ?>
Exemplo n.º 27
0
}
// #############################################################################
if ($vbulletin->GPC['bbcustomerid'] !== CUSTOMER_NUMBER) {
    global $stylevar;
    // set the style folder
    if (empty($vbulletin->options['cpstylefolder'])) {
        $vbulletin->options['cpstylefolder'] = 'vBulletin_3_Silver';
    }
    // set the forumhome script
    if (empty($vbulletin->options['forumhome'])) {
        $vbulletin->options['forumhome'] = 'index';
    }
    // set the version
    $vbulletin->options['templateversion'] = VERSION;
    define('NO_PAGE_TITLE', true);
    print_cp_header('Tools');
    ?>
	<form action="<?php 
    echo THIS_SCRIPT;
    ?>
?do=login" method="post">
	<input type="hidden" name="do" value="login" />
	<p>&nbsp;</p><p>&nbsp;</p>
	<table class="tborder" cellpadding="0" cellspacing="0" border="0" width="450" align="center"><tr><td>

		<!-- header -->
		<div class="tcat" style="padding:4px; text-align:center"><b>Enter Customer Number</b></div>
		<!-- /header -->

		<!-- logo and version -->
		<table cellpadding="4" cellspacing="0" border="0" width="100%" class="navbody">
Exemplo n.º 28
0
/**
* Halts execution and shows the specified message
*
* @param	string	Message to display
* @param	mixed	If specified, a redirect will be performed to the URL in this parameter
* @param	integer	If redirect is specified, this is the time in seconds to delay before redirect
* @param	string	If specified, will provide a specific URL for "Go Back". If empty, no button will be displayed!
* @param bool		If true along with redirect, 'CONTINUE' button will be used instead of automatic redirect
*/
function print_cp_message($text = '', $redirect = NULL, $delay = 1, $backurl = NULL, $continue = false)
{
    global $vbulletin, $vbphrase;
    if ($redirect and $vbulletin->session->vars['sessionurl']) {
        if (strpos($redirect, '?') === false) {
            $redirect .= '?';
        }
        $redirect .= '&' . $vbulletin->session->vars['sessionurl'];
    }
    if (!defined('DONE_CPHEADER')) {
        print_cp_header($vbphrase['vbulletin_message']);
    }
    echo '<p>&nbsp;</p><p>&nbsp;</p>';
    print_form_header('', '', 0, 1, 'messageform', '65%');
    print_table_header($vbphrase['vbulletin_message']);
    print_description_row("<blockquote><br />{$text}<br /><br /></blockquote>");
    if ($redirect and $redirect !== NULL) {
        // redirect to the new page
        if ($continue) {
            $continueurl = str_replace('&amp;', '&', $redirect);
            print_table_footer(2, construct_button_code($vbphrase['continue'], create_full_url($continueurl)));
        } else {
            print_table_footer();
            $redirect_click = create_full_url($redirect);
            $redirect_click = str_replace('"', '', $redirect_click);
            echo '<p align="center" class="smallfont">' . construct_phrase($vbphrase['if_you_are_not_automatically_redirected_click_here_x'], $redirect_click) . "</p>\n";
            print_cp_redirect($redirect, $delay);
        }
    } else {
        // end the table and halt
        if ($backurl === NULL) {
            $backurl = 'javascript:history.back(1)';
        }
        if (strpos($backurl, 'history.back(') !== false) {
            //if we are attempting to run a history.back(1), check we have a history to go back to, otherwise attempt to close the window.
            $back_button = '&nbsp;
				<input type="button" id="backbutton" class="button" value="' . $vbphrase['go_back'] . '" title="" tabindex="1" onclick="if (history.length) { history.back(1); } else { self.close(); }"/>
				&nbsp;
				<script type="text/javascript">
				<!--
				if (history.length < 1 || ((is_saf || is_moz) && history.length <= 1)) // safari + gecko start at 1
				{
					document.getElementById("backbutton").parentNode.removeChild(document.getElementById("backbutton"));
				}
				//-->
				</script>';
        } else {
            if ($backurl !== '') {
                // regular window.location=url call
                $backurl = create_full_url($backurl);
                $backurl = str_replace(array('"', "'"), '', $backurl);
                $back_button = '<input type="button" class="button" value="' . $vbphrase['go_back'] . '" title="" tabindex="1" onclick="window.location=\'' . $backurl . '\';"/>';
            } else {
                $back_button = '';
            }
        }
        print_table_footer(2, $back_button);
    }
    // and now terminate the script
    print_cp_footer();
}
Exemplo n.º 29
0
$phrasegroups = array();
$specialtemplates = array('bookmarksitecache');
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
require_once DIR . '/includes/adminfunctions_bookmarksite.php';
// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('bookmarksiteid' => TYPE_INT));
log_admin_action($vbulletin->GPC['bookmarksiteid'] != 0 ? "bookmark site id = " . $vbulletin->GPC['bookmarksiteid'] : '');
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminsettings')) {
    print_cp_no_permission();
}
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['social_bookmarking_manager']);
// default action
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
// ########################################################################
// when we want to add a new site from the site list page we need change the action before the main 'socialbookmarks_setpost' handler
// we came here if somebody press the add button in the sitelist edit/save form
if ($_POST['do'] == 'socialbookmarks_setpost' and $vbulletin->GPC['add']) {
    $_POST['do'] = 'add';
}
// ########################################################################
// confirmed delete, we shall do the delete from the database
if ($_POST['do'] == 'kill') {
    $vbulletin->input->clean_array_gpc('p', array('bookmarksiteid' => TYPE_UINT));
    if ($vbulletin->GPC['bookmarksiteid'] and $bookmarksite = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bookmarksite WHERE bookmarksiteid = " . $vbulletin->GPC['bookmarksiteid'])) {
Exemplo n.º 30
0
Arquivo: ad.php Projeto: Kheros/MMOver
define('CVS_REVISION', '$RCSfile$ - $Revision: 35402 $');
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('advertising', 'notice');
$specialtemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once './global.php';
// ############################# LOG ACTION ###############################
if (!can_administer('canadminads')) {
    print_cp_no_permission();
}
$vbulletin->input->clean_array_gpc('r', array('adid' => TYPE_UINT));
log_admin_action($vbulletin->GPC['adid'] != 0 ? "ad id = " . $vbulletin->GPC['adid'] : '');
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['advertising']);
if (!in_array($_REQUEST['do'], array('add', 'edit', 'update', 'delete', 'remove', 'locate', 'flipcoin'))) {
    if (!empty($_REQUEST['adid'])) {
        $_REQUEST['do'] = 'edit';
    } else {
        $_REQUEST['do'] = 'modify';
    }
}
// initialize some data storage
$ad_locations = array();
// $ad_locations[group_displayorder][group_key][location_displayorder][location_key][option(IE: cp_width, cp_height, etc.)] = value;
$ad_cache = array();
$ad_name_cache = array();
// we don't want this if we're in modify (the listing view), and maybe other views to come
if (in_array($_REQUEST['do'], array('add', 'edit', 'update', 'remove', 'locate'))) {
    require_once DIR . '/includes/class_xml.php';