예제 #1
0
    $redirect = preg_replace('#&amp%3B#i', '&', $redirect);
    print_cp_header($vbphrase['redirecting_please_wait'], '', "<meta http-equiv=\"Refresh\" content=\"0; URL={$redirect}\" />");
    echo "<p>&nbsp;</p><blockquote><p>{$vbphrase['redirecting_please_wait']}</p></blockquote>";
    print_cp_footer();
    exit;
}
// #############################################################################
// ############################### LOG OUT OF CP ###############################
// #############################################################################
if ($_REQUEST['do'] == 'cplogout') {
    vbsetcookie('cpsession', '', false, true, true);
    $assertor->delete('cpsession', array('userid' => vB::getCurrentSession()->get('userid'), 'hash' => $vbulletin->GPC[COOKIE_PREFIX . 'cpsession']));
    vbsetcookie('customerid', '', 0);
    $args = array();
    parse_str(vB::getCurrentSession()->get('sessionurl_js'), $args);
    exec_header_redirect2('index', $args);
}
// #############################################################################
// ################################# SAVE NOTES ################################
// #############################################################################
if ($_POST['do'] == 'notes') {
    $vbulletin->input->clean_array_gpc('p', array('notes' => vB_Cleaner::TYPE_STR));
    $admindm =& datamanager_init('Admin', $vbulletin, vB_DataManager_Constants::ERRTYPE_CP);
    $admindm->set_existing($vbulletin->userinfo);
    $admindm->set('notes', $vbulletin->GPC['notes']);
    $admindm->save();
    unset($admindm);
    $vbulletin->userinfo['notes'] = htmlspecialchars_uni($vbulletin->GPC['notes']);
    $_REQUEST['do'] = 'home';
}
// #############################################################################
예제 #2
0
// #############################################################################
if ($_POST['do'] == 'updatestatus') {
    $vbulletin->input->clean_gpc('p', 'enabled', vB_Cleaner::TYPE_ARRAY_UINT);
    $feeds_result = $assertor->getRows('vBForum:rssfeed', array(), 'title');
    $options = vB::getDatastore()->getValue('bf_misc_feedoptions');
    foreach ($feeds_result as $feed) {
        $old = $feed['options'] & $options['enabled'] ? 1 : 0;
        $new = $vbulletin->GPC['enabled']["{$feed['rssfeedid']}"] ? 1 : 0;
        if ($old != $new) {
            $feeddata =& datamanager_init('RSSFeed', $vbulletin, vB_DataManager_Constants::ERRTYPE_ARRAY);
            $feeddata->set_existing($feed);
            $feeddata->set_bitfield('options', 'enabled', $new);
            $feeddata->save();
        }
    }
    exec_header_redirect2('rssposter');
}
print_cp_header($vbphrase['rss_feed_manager']);
// #############################################################################
if ($_POST['do'] == 'kill') {
    $vbulletin->input->clean_gpc('p', 'rssfeedid', vB_Cleaner::TYPE_UINT);
    if ($vbulletin->GPC['rssfeedid'] and $feed = $assertor->getRow('vBForum:rssfeed', array('rssfeedid' => $vbulletin->GPC['rssfeedid']))) {
        $feeddata =& datamanager_init('RSSFeed', $vbulletin, vB_DataManager_Constants::ERRTYPE_ARRAY);
        $feeddata->set_existing($feed);
        $feeddata->delete();
        print_stop_message2(array('deleted_rssfeed_x_successfully', $feeddata->fetch_field('title')), 'rssposter');
    } else {
        echo "Kill oops";
    }
}
// #############################################################################
예제 #3
0
    }
    $users = vB_Api::instanceInternal('User')->find($vbulletin->GPC['user'], $vbulletin->GPC['profile'], $vbulletin->GPC['orderby'], $vbulletin->GPC['direction'], $vbulletin->GPC['limitstart'], $vbulletin->GPC['limitnumber']);
    if (empty($users) or $users['count'] == 0) {
        // no users found!
        print_stop_message2('no_users_matched_your_query');
    }
    $countusers = $users['count'];
    if ($users['count'] == 1) {
        // show a user if there is just one found
        $user = current($users['users']);
        $args = array();
        parse_str(vB::getCurrentSession()->get('sessionurl'), $args);
        $args['do'] = 'edit';
        $args['u'] = $user['userid'];
        // instant redirect
        exec_header_redirect2('user', $args);
    }
    define('DONEFIND', true);
    $_REQUEST['do'] = 'find2';
}
// #############################################################################
print_cp_header($vbphrase['user_manager']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
// ###################### Start email password #######################
if ($_REQUEST['do'] == 'emailpassword') {
    $vbulletin->input->clean_array_gpc('r', array('email' => vB_Cleaner::TYPE_STR, 'userid' => vB_Cleaner::TYPE_UINT));
    print_form_header('user', 'do_emailpassword');
    construct_hidden_code('email', $vbulletin->GPC['email']);
    construct_hidden_code('url', "admincp/user.php?do=find&user[email]=" . urlencode($vbulletin->GPC['email']));
예제 #4
0
vB::getDatastore()->getValue('banemail');
$userContext = vB::getUserContext();
// intercept direct call to do=options with $varname specified instead of $dogroup
if ($_REQUEST['do'] == 'options' and !empty($vbulletin->GPC['varname'])) {
    if ($vbulletin->GPC['varname'] == '[all]') {
        // go ahead and show all settings
        $vbulletin->GPC['dogroup'] = '[all]';
    } else {
        if ($group = vB::getDbAssertor()->getRow('setting', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_SELECT, 'varname' => $vbulletin->GPC['varname']))) {
            $args = array();
            parse_str(vB::getCurrentSession()->get('sessionurl_js'), $args);
            $args['do'] = 'options';
            $args['dogroup'] = $group['grouptitle'];
            $args['#'] = $group['varname'];
            // redirect to show the correct group and use and anchor to jump to the correct variable
            exec_header_redirect2('options', $args);
        }
    }
}
require_once DIR . '/includes/adminfunctions_options.php';
require_once DIR . '/includes/functions_misc.php';
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminsettings') and !vB::getUserContext()->hasAdminPermission('canadminsettingsall') and !vB::getUserContext()->hasAdminPermission('cansetserverconfig')) {
    print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
log_admin_action();
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
$assertor = vB::getDbAssertor();
예제 #5
0
    $vbulletin->input->clean_array_gpc('p', array('replace' => vB_Cleaner::TYPE_ARRAY_UINT, 'searchstring' => vB_Cleaner::TYPE_STR, 'replacestring' => vB_Cleaner::TYPE_STR, 'languageid' => vB_Cleaner::TYPE_INT));
    if (empty($vbulletin->GPC['replace'])) {
        print_stop_message2('please_complete_required_fields');
    }
    $products_to_export = vB_Api::instanceInternal('phrase')->replace(array_keys($vbulletin->GPC['replace']), $vbulletin->GPC['searchstring'], $vbulletin->GPC['replacestring'], $vbulletin->GPC['languageid']);
    if (defined('DEV_AUTOEXPORT') and DEV_AUTOEXPORT and !empty($products_to_export)) {
        require_once DIR . '/includes/functions_filesystemxml.php';
        foreach ($products_to_export as $product) {
            autoexport_write_language($vbulletin->GPC['languageid'], $product);
        }
    }
    $args = array();
    parse_str(vB::getCurrentSession()->get('sessionurl'), $args);
    $args['do'] = 'rebuild';
    $args['goto'] = urlencode("phrase.php?" . vB::getCurrentSession()->get('sessionurl') . "do=search");
    exec_header_redirect2('language', $args);
}
// #############################################################################
if ($_POST['do'] == 'replace') {
    $vbulletin->input->clean_array_gpc('p', array('searchstring' => vB_Cleaner::TYPE_STR, 'replacestring' => vB_Cleaner::TYPE_STR, 'languageid' => vB_Cleaner::TYPE_INT));
    if (empty($vbulletin->GPC['searchstring']) or empty($vbulletin->GPC['replacestring'])) {
        print_stop_message2('please_complete_required_fields');
    }
    // do a rather clever query to find what phrases to display
    $phrases = vB::getDbAssertor()->assertQuery('fetchPhrasesForDisplay', array('searchstring' => $vbulletin->GPC['searchstring'], 'languageid' => $vbulletin->GPC['languageid']));
    $phrasearray = array();
    foreach ($phrases as $phrase) {
        $phrasearray["{$phrase['fieldname']}"]["{$phrase['varname']}"]["{$phrase['languageid']}"] = $phrase;
    }
    unset($phrase);
    if (empty($phrasearray)) {
예제 #6
0
$vbulletin->input->clean_array_gpc('r', array('group' => vB_Cleaner::TYPE_INT, 'dostyleid' => vB_Cleaner::TYPE_INT, 'dowhat' => vB_Cleaner::TYPE_NOCLEAN));
$userContext = vB::getUserContext();
// redirect back to template editor if required
if ($_REQUEST['do'] == 'edit' and $vbulletin->GPC['dowhat'] == 'templateeditor') {
    $args = array();
    parse_str(vB::getCurrentSession()->get('sessionurl_js'), $args);
    $args['do'] = 'modify';
    $args['group'] = $vbulletin->GPC['group'];
    $args['expandset'] = $vbulletin->GPC['dostyleid'];
    exec_header_redirect2('template', $args);
}
if ($_REQUEST['do'] == 'edit' and $vbulletin->GPC['dowhat'] == 'stylevar') {
    $args = array();
    parse_str(vB::getCurrentSession()->get('sessionurl_js'), $args);
    $args['dostyleid'] = $vbulletin->GPC['dostyleid'];
    exec_header_redirect2('stylevar', $args);
}
// ######################## CHECK ADMIN PERMISSIONS #######################
if (!can_administer('canadminstyles') and !$userContext->hasAdminPermission('canadmintemplates')) {
    print_cp_no_permission();
}
// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('dostyleid' => vB_Cleaner::TYPE_INT));
log_admin_action(iif($vbulletin->GPC['dostyleid'] != 0, "style id = " . $vbulletin->GPC['dostyleid']));
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
$vb5_config =& vB::getConfig();
print_cp_header($vbphrase['style_manager_gstyle'], iif($_REQUEST['do'] == 'edit' or $_REQUEST['do'] == 'doedit', 'init_color_preview()'));
?>
<script type="text/javascript" src="<?php