当前位置: 首页>>代码示例>>PHP>>正文


PHP SaveSettings函数代码示例

本文整理汇总了PHP中SaveSettings函数的典型用法代码示例。如果您正苦于以下问题:PHP SaveSettings函数的具体用法?PHP SaveSettings怎么用?PHP SaveSettings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SaveSettings函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pivot_get_userid

/** 
 * Checks username and password, and return an array with
 * the userid (uid) and potentially an error (err).
 *
 * @param string $user
 * @param string $pass
 * @return array
 */
function pivot_get_userid($user, $pass)
{
    global $Cfg, $Users;
    if (!$Cfg['xmlrpc']) {
        debug("XML-RPC is disabled. Method call from " . $_SERVER['REMOTE_ADDR'] . " ignored.");
        return array('uid' => -1, 'err' => "XML-RPC is disabled.");
    }
    if ($Cfg['fl_' . $_SERVER['REMOTE_ADDR']] >= 10 && $Cfg['bn_' . $_SERVER['REMOTE_ADDR']] - time() < 60 * 60 * 12) {
        if (!isset($Cfg['bn_' . $_SERVER['REMOTE_ADDR']])) {
            $Cfg['bn_' . $_SERVER['REMOTE_ADDR']] = time();
        }
        SaveSettings();
        debug("IP is banned. Method call from " . $_SERVER['REMOTE_ADDR'] . " ignored.");
        return array('uid' => -1, 'err' => "IP is banned.");
    }
    if ($Users[$user]['pass'] == md5($pass)) {
        debug("User {$user} approved");
        return array('uid' => $user);
    } else {
        // add one to the failed login attempts.
        if (strlen($user) > 0) {
            $Cfg['fl_' . $_SERVER['REMOTE_ADDR']]++;
            SaveSettings();
        }
        debug("Wrong password/username ({$user})");
        return array('uid' => -1, 'err' => "Your password/username is incorrect.");
    }
}
开发者ID:wborbajr,项目名称:TecnodataApp,代码行数:36,代码来源:metaweblog.php

示例2: Do_Farm_Work_Plots


//.........这里部分代码省略.........
        $amf->_bodys[0] = new MessageBody();
        $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';
        $amf->_bodys[0]->responseURI = '/1/onStatus';
        $amf->_bodys[0]->responseIndex = '/1';
        $amf->_bodys[0]->_value[0] = GetAMFHeaders();
        $amf->_bodys[0]->_value[2] = 0;
        $vCntSpeed = 0;
        while (count($plots) > 0 && $vCntSpeed < $px_Setopts['bot_speed'] && $fuel > 0) {
            $amf->_bodys[0]->_value[1][$vCntSpeed]['sequence'] = GetSequense();
            $amf->_bodys[0]->_value[1][$vCntSpeed]['functionName'] = "EquipmentWorldService.onUseEquipment";
            if ($action == 'tractor') {
                $amf->_bodys[0]->_value[1][$vCntSpeed]['params'][0] = 'plow';
            } else {
                $amf->_bodys[0]->_value[1][$vCntSpeed]['params'][0] = $action;
            }
            $amf->_bodys[0]->_value[1][$vCntSpeed]['params'][1]['id'] = -1;
            if ($action == 'harvest') {
                $amf->_bodys[0]->_value[1][$vCntSpeed]['params'][1]['key'] = 'V1:32';
            }
            # fully expanded harvester
            if ($action == 'tractor' || $action == 'plow') {
                $amf->_bodys[0]->_value[1][$vCntSpeed]['params'][1]['key'] = 'T1:32';
            }
            # fully expanded tractor
            if ($action == 'place') {
                $amf->_bodys[0]->_value[1][$vCntSpeed]['params'][1]['key'] = 'S1:32';
            }
            # fully expanded seeder
            $vCntEquip = 0;
            $vSeed = '';
            $vLastSeed = '';
            while (count($plots) > 0 && $vCntEquip < $vMaxEquip && $fuel > 0) {
                $vPlot = array_pop($plots);
                if ($action == 'place') {
                    $vSeed = $vPlot['itemName'];
                    if ($vLastSeed == '') {
                        $vLastSeed = $vSeed;
                    } elseif ($vLastSeed != $vSeed) {
                        array_push($plots, $vPlot);
                        break;
                    }
                }
                if (@(!$plotsstring)) {
                    $plotsstring = $vPlot['itemName'] . " " . GetPlotName($vPlot);
                } else {
                    $plotsstring = $plotsstring . ", " . $vPlot['itemName'] . " " . GetPlotName($vPlot);
                }
                if (@(!$OKstring)) {
                    $OKstring = $action . " " . $vPlot['itemName'] . " on plot " . GetPlotName($vPlot);
                } else {
                    $OKstring = $OKstring . "\r\n" . $action . " " . $vPlot['itemName'] . " on plot " . GetPlotName($vPlot);
                }
                $fuel--;
                if ($action == 'tractor') {
                    $vCnt63000++;
                    $vPlot['id'] = $vCnt63000;
                    $amf->_bodys[0]->_value[1][$vCntSpeed]['params'][2][$vCntEquip] = $vPlot;
                } else {
                    $amf->_bodys[0]->_value[1][$vCntSpeed]['params'][2][$vCntEquip]['id'] = $vPlot['id'];
                }
                $vCntEquip++;
            }
            if ($action == 'tractor' || $action == 'harvest' || $action == 'plow') {
                $amf->_bodys[0]->_value[1][$vCntSpeed]['params'][3] = 'plowed';
            }
            if ($action == 'place') {
                $amf->_bodys[0]->_value[1][$vCntSpeed]['params'][3] = $vSeed;
            }
            $vCntSpeed++;
        }
        AddLog2($action . " " . $plotsstring);
        $res = RequestAMF($amf);
        AddLog2("result {$res}");
        unset($amf->_bodys[0]->_value[1]);
        if ($res === 'OK') {
            AddLog($OKstring);
            $need_reload = true;
        } else {
            if ($res) {
                AddLog("Error: {$res} on " . $OKstring);
                if (intval($res) == 29 || strpos($res, 'BAD AMF') !== false) {
                    // Server sequence was reset
                    DoInit();
                }
            }
        }
        unset($plotsstring, $OKstring);
    }
    $px_Setopts = LoadSavedSettings();
    if ($action == 'plow' || $action == 'tractor') {
        $px_Setopts['fuel_plow'] = $fuel;
    }
    if ($action == 'place') {
        $px_Setopts['fuel_place'] = $fuel;
    }
    if ($action == 'harvest') {
        $px_Setopts['fuel_harvest'] = $fuel;
    }
    SaveSettings($px_Setopts);
}
开发者ID:RadicalLinux,项目名称:faceBot,代码行数:101,代码来源:fB_Farm.php

示例3: script

include_once 'ressources/class.ldap.inc';
include_once 'ressources/class.users.menus.inc';
include_once 'ressources/class.artica.inc';
include_once 'ressources/class.user.inc';
include_once 'ressources/class.mimedefang.inc';
include_once 'ressources/class.ini.inc';
if (isset($_GET["script"])) {
    script();
    exit;
}
if (isset($_GET["step"])) {
    step();
    exit;
}
if (isset($_GET["SaveSettings"])) {
    SaveSettings();
    exit;
}
if (isset($_GET["Cancel"])) {
    Cancel();
    exit;
}
function Cancel()
{
    $sock = new sockets();
    $sock->SET_INFO("SmtpWizardFinish", 1);
}
function page_0()
{
    $html = "\n\t<p class=caption>{wizard_smtp_intro}</p>";
    echo BuildPage('{welcome_first_wizard}', $html);
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:wizard.smtp.php

示例4: CreateDefaultSettings

function CreateDefaultSettings()
{
    $dset = array();
    $dset['version'] = FB_SETTINGS_VER;
    $dset['e_gzip'] = 1;
    $dset['farm_server'] = 0;
    $dset['bot_speed'] = 8;
    $dset['not_plugin'] = '';
    $dset['lonlyanimals'] = 1;
    $dset['acceptneighborhelp'] = 1;
    SaveSettings($dset);
    return $dset;
}
开发者ID:RadicalLinux,项目名称:faceBot,代码行数:13,代码来源:fB_Utils.php

示例5: CheckLogin

/**
 * This function is always called. It checks if:
 * - A user just logged in
 * - A user is logged in, or
 * - A 'persistent login' cookie is set
 *
 * If either of these is true, a new session is started, or an old session is revived.
 * If it's not right, the user is booted to the login screen.
 *
 * @see Login(), NewSession(), ReviveSession()
 *
 */
function CheckLogin()
{
    global $Users, $Pivot_Vars, $Cfg, $Paths;
    // User is banned..
    if (isset($Cfg['bn_' . $_SERVER['REMOTE_ADDR']])) {
        Login(1, 1, "User is banned");
    }
    // added to not check for referers if no session id is given..
    if (!isset($Pivot_Vars['session'])) {
        $uri = 'http://' . $Pivot_Vars['HTTP_HOST'] . $Pivot_Vars['SCRIPT_NAME'];
        if (strpos($Pivot_Vars['HTTP_REFERER'], $uri) != 0) {
            $Pivot_Vars['user'] = '';
            Login(0, 2, "No session active.");
        }
    }
    // If we selected logout from the menu..
    if (isset($Pivot_Vars['func']) && $Pivot_Vars['func'] == 'login' && isset($Pivot_Vars['do']) && $Pivot_Vars['do'] == 'logout') {
        setcookie('user', '', -9999, $Paths['cookie_url']);
        setcookie('pass', '', -9999, $Paths['cookie_url']);
        setcookie('mode', 'nothing', -9999, $Paths['cookie_url']);
        unset($Users[$Cfg['tempsessions'][$Pivot_Vars['session']][0]]['session']);
        unset($Cfg['tempsessions'][$Pivot_Vars['session']]);
        SaveSettings();
        login(0, 3, "User logged off");
    }
    // if the user has cookies set, but no session is active yet..
    if (isset($_COOKIE['user']) && isset($_COOKIE['hash']) && $_COOKIE['mode'] == 'stayloggedin' && (!isset($Pivot_Vars['session']) || $Pivot_Vars['session'] == "")) {
        debug("attempted ReviveSession..");
        // Try to revive an old Session..
        ReviveSession();
    } else {
        if ($Pivot_Vars['func'] == 'login' || $Pivot_Vars['do'] == 'login') {
            // if we've just logged in, reset the cookies, if necesary and start a new session..
            debug("attempted login..");
            if ($Users[$Pivot_Vars['user']]['pass'] == md5($Pivot_Vars['pass']) && $Users[$Pivot_Vars['user']]['userlevel'] > 0) {
                NewSession($Pivot_Vars['user']);
            } else {
                // add one to the failed login attempts.
                if (strlen($Pivot_Vars['user']) > 0) {
                    $Cfg['fl_' . $_SERVER['REMOTE_ADDR']]++;
                }
                Login(1, 4, "Incorrect username or password");
            }
        } else {
            // when running normally, the session stuff is updated.
            $Pivot_Vars['user'] = $Cfg['tempsessions'][$Pivot_Vars['session']][0];
            $ip = substr($_SERVER['REMOTE_ADDR'], 0, strrpos($_SERVER['REMOTE_ADDR'], "."));
            // calculated locally: user's pass + current session + ip we got from user
            $hash1 = md5(md5($Users[$Pivot_Vars['user']]['pass'] . $Pivot_Vars['session']) . $ip);
            // stored hash
            $hash2 = $Cfg['tempsessions'][$Pivot_Vars['session']][1];
            // we check if the two hash matches with the one that was stored
            if ($hash1 != $hash2) {
                // if this is the case, something's not ok, so go back to login..
                Login(0, 0, "No hacking, please");
            }
        }
    }
    // If by this point no session is set, we will show the login screen..
    if (strlen($Pivot_Vars['session']) == 0) {
        Login(0, 8, "Please log on. (if you keep getting this message, delete the cookies for this site)");
    }
    // Update the timer, so we can keep the user logged in.
    if ($Cfg['tempsessions'][$Pivot_Vars['session']][2] - time() <= $Cfg['session_length'] / 4) {
        $Cfg['tempsessions'][$Pivot_Vars['session']][2] = $Cfg['tempsessions'][$Pivot_Vars['session']][2] + $Cfg['session_length'];
    }
}
开发者ID:wborbajr,项目名称:TecnodataApp,代码行数:79,代码来源:pv_core.php

示例6: GetGeneralSettings

 * I AM SORRY FOR MY BAD CODING STYLE :(
 * YOUR CONTRIBUTION WILL BE A GREAT GIFT FOR PLAYSCRIPT
 * LICENSE: OPEN-SOURCE
 * PROJECT HOMEPAGE: http://playscript.prijm.com
 * YOU CAN RICH ME(INITIAL DEVELOPER) AT http://twitter.com/rakibtg FEEL FREE TO TWEET OR MESSAGE YOUR QUERY
 * PLEASE SHARE <PlayScript/> IN YOUR SOCIAL MEDIA
 * <PlayScript/> IS AN OPEN-SOURCE BROWSER BASED APP
 * THANKYOU, HAVE A NICE DAY
 * © 2015 prijm.com
 *
 */
require_once "includes/php/header_files.php";
if ($_POST['functionName'] === "SaveSettings") {
    $saved = GetGeneralSettings();
    if (!isset($_POST['theme'])) {
        $theme = $saved->theme;
    } else {
        $theme = $_POST['theme'];
    }
    if (!isset($_POST['fontsize'])) {
        $fontsize = $saved->fontsize;
    } else {
        $fontsize = $_POST['fontsize'];
    }
    if (!isset($_POST['language'])) {
        $language = $saved->language;
    } else {
        $language = $_POST['language'];
    }
    SaveSettings($theme, $fontsize, $language);
}
开发者ID:ert0kied,项目名称:playscript,代码行数:31,代码来源:ajax_save.php

示例7: getURL

    $MenuSection = "settings";
    $ProgPath[0]['Name'] = $Lang['MSettings'];
    $ProgPath[0]['Url'] = getURL("settings", "CpId={$CpId}", "admin");
} else {
    $MenuSection = "admin";
    $ProgPath[0]['Name'] = $Lang['Administr'];
    $ProgPath[0]['Url'] = getURL("admin", "", "admin");
}
$PageTitle .= $Lang['Title'];
$ProgPath[1]['Name'] = $Lang['Title'];
$ProgPath[1]['Url'] = getURL("stat_config", "CpId={$CpId}", "admin");
/////////////////////////////////////////////
///////// call any process functions
if (!$nsUser->DEMO) {
    if (ValidArr($SaveSet)) {
        SaveSettings($SaveSet);
    }
}
/////////////////////////////////////////////
///////// display section here
include $nsTemplate->Inc();
/////////////////////////////////////////////
///////// process functions here
function SaveSettings($SaveSet)
{
    global $Db, $Logs, $Lang, $CpId, $nsProduct;
    $KeepPath = '2';
    $KeepNoRef = '2';
    foreach ($SaveSet as $CP => $Arr) {
        foreach ($Arr as $SiteId => $SubArr) {
            extract($SubArr);
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:admin.stat_config.php

示例8: getURL

$PageTitle = $Lang['Title'];
$nsLang->TplInc("inc/user_welcome");
$ProgPath[0]['Name'] = $Lang['Administr'];
$ProgPath[0]['Url'] = getURL("admin", "", "admin");
$ProgPath[1]['Name'] = $Lang['Title'];
$ProgPath[1]['Url'] = getURL("misc_config", "", "admin");
$MenuSection = "admin";
$Query = "SELECT * FROM " . PFX . "_tracker_config WHERE COMPANY_ID=0 AND SITE_ID=0";
$Settings = $Db->Select($Query);
$P3P = GetParam("P3P", "STRVAL");
$P3P_REF = GetParam("P3P_REF", "STRVAL");
/////////////////////////////////////////////
///////// call any process functions
if (!$nsUser->DEMO) {
    if (ValidArr($EditArr)) {
        SaveSettings($EditArr);
    }
}
/////////////////////////////////////////////
///////// display section here
$SkinsArr = array();
$Path = SELF . "/skins";
clearstatcache();
$Dir = @opendir($Path);
while ($Row = @readdir($Dir)) {
    if ($Row == "." || $Row == ".." || $Row == "CVS") {
        continue;
    }
    if (is_file($Row)) {
        continue;
    }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:admin.misc_config.php

示例9: new_user_save

/**
 * Store the new user and display all users again
 */
function new_user_save()
{
    global $Pivot_Vars, $Cfg, $Users;
    // check against unauthorised direct access.
    check_csrf();
    $userfields = get_userfields(1);
    if (CheckInput($Pivot_Vars['username'], 2, 0) == 1) {
        $userfields[0][2] = lang('userinfo', 'username_too_short');
        $Piverr++;
    } elseif (CheckInput($Pivot_Vars['username'], 2, 0) == 0) {
        $userfields[0][2] = lang('userinfo', 'username_not_valid');
        $Piverr++;
    }
    if (isset($Users[$Pivot_Vars['username']])) {
        $userfields[0][2] = lang('userinfo', 'username_in_use');
        $Piverr++;
    }
    if (ltrim(rtrim(strtolower($Pivot_Vars['pass1']))) != ltrim(rtrim(strtolower($Pivot_Vars['pass2'])))) {
        $userfields[2][2] = lang('userinfo', 'pass_dont_match');
        $Piverr++;
    }
    if (CheckInput($Pivot_Vars['pass1'], 4, 0) == 1) {
        $userfields[1][2] = lang('userinfo', 'pass_too_short');
        $Piverr++;
    }
    if ($Piverr > 0) {
        $userfields[0][4] = $Pivot_Vars['username'];
        $userfields[3][6] = $Pivot_Vars['userlevel'];
        new_user(1, $userfields);
    } else {
        if ($Pivot_Vars['userlevel'] == 3 && $Pivot_Vars['confirmed'] != 1) {
            $vars = array('username', $Pivot_Vars['username'], 'pass1', $Pivot_Vars['pass1'], 'pass2', $Pivot_Vars['pass2'], 'email', $Pivot_Vars['email'], 'userlevel', $Pivot_Vars['userlevel']);
            ConfirmPage(lang('userinfo', 'c_admin_title'), $vars, sprintf(lang('userinfo', 'c_admin_message'), $Pivot_Vars['username']));
        } elseif ($Pivot_Vars['userlevel'] < 3 || $Pivot_Vars['confirmed'] == 1) {
            $Users[$Pivot_Vars['username']]['pass'] = md5($Pivot_Vars['pass1']);
            $Users[$Pivot_Vars['username']]['email'] = $Pivot_Vars['email'];
            $Users[$Pivot_Vars['username']]['userlevel'] = $Pivot_Vars['userlevel'];
            $Users[$Pivot_Vars['username']]['language'] = $Pivot_Vars['language'];
            $Users[$Pivot_Vars['username']]['wysiwyg'] = $Pivot_Vars['wysiwyg'];
            $Users[$Pivot_Vars['username']]['username'] = $Pivot_Vars['username'];
            $Users[$Pivot_Vars['username']]['nick'] = $Pivot_Vars['username'];
            $Users[$Pivot_Vars['username']]['view'] = $Pivot_Vars['view'];
            $Cfg['users'] .= '|' . $Pivot_Vars['username'];
            // set the categories.,
            $cats = cfg_cats();
            foreach ($cats as $category) {
                $allowed_users = explode("|", $Cfg['cat-' . $category['name']]);
                if (isset($Pivot_Vars['allowed'][urlencode($category['name'])])) {
                    // add the user (and ensure it's only added once) ..
                    $allowed_users[] = $Pivot_Vars['username'];
                    $allowed_users = array_unique($allowed_users);
                } else {
                    // remove the user (in case the same name have been used and
                    // assigned to this category before)
                    if (in_array($Pivot_Vars['username'], $allowed_users)) {
                        foreach ($allowed_users as $key => $user) {
                            if ($user == $Pivot_Vars['username']) {
                                unset($allowed_users[$key]);
                            }
                        }
                    }
                }
                $Cfg['cat-' . $category['name']] = implode("|", $allowed_users);
            }
            SaveSettings();
            see_users();
        }
    }
}
开发者ID:wborbajr,项目名称:TecnodataApp,代码行数:72,代码来源:pv_admin.php

示例10: foreach

                        }
                    }
                }
            }
        }
    }
    $changed_settings = true;
    if (isset($_POST['del_account']) && is_array($_POST['acct_list'])) {
        $del_accts = @$_POST['acct_list'];
        foreach ($del_accts as $acct) {
            $uSQL = 'DELETE FROM userids WHERE userid = ' . $acct . ';';
            $_SESSION['vDataStoreDB']->exec($uSQL);
        }
    }
    if ($changed_settings) {
        SaveSettings($px_Setopts);
    }
    //header("Location: index.php?userId=" . $_SESSION['userId']);
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/fBSettings.css" />
<style type="text/css">
body {

	background-color: #FFFFFF;

}
</style>
</head>
开发者ID:RadicalLinux,项目名称:faceBot,代码行数:31,代码来源:index.php

示例11: session_start

<?php
session_start();
	include_once('ressources/class.templates.inc');
	include_once('ressources/class.main_cf.inc');
	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');
	include_once('ressources/class.artica.inc');
	include_once('ressources/class.user.inc');
	include_once('ressources/class.mimedefang.inc');
	include_once('ressources/class.ini.inc');	

if(isset($_GET["script"])){script();exit;}
if(isset($_GET["step"])){step();exit;}
if(isset($_GET["SaveSettings"])){SaveSettings();exit;}
if(isset($_GET["Cancel"])){Cancel();exit;}



function Cancel(){
	$sock=new sockets();
	$sock->SET_INFO("SmtpWizardFinish",1);		
	
}


function page_0(){
	$html="
	<p class=caption>{wizard_smtp_intro}</p>";
	echo BuildPage('{welcome_first_wizard}',$html);
	
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:31,代码来源:wizard.smtp.php

示例12: libsave_change_user


//.........这里部分代码省略.........
                $Piverr++;
            }
        }
        if ($Piverr == 0) {
            // make sure the superadmin doesn't demote himsef/herself..
            if ($Users[$theuser]['userlevel'] == 4) {
                $Pivot_Vars['userlevel'] = 4;
            }
            // get confirmation if user gets admin rights
            if ($Pivot_Vars['userlevel'] == 3 && $Users[$theuser]['userlevel'] < 3 && $Pivot_Vars['confirmed'] != 1) {
                $vars = array();
                $arraycount = Count($userfields);
                for ($i = 0; $i < $arraycount; $i++) {
                    array_push($vars, $userfields[$i][0], $Pivot_Vars[$userfields[$i][0]]);
                }
                ConfirmPage(lang('userinfo', 'c_admin_title'), $vars, sprintf(lang('userinfo', 'c_admin_message'), $theuser));
            } else {
                //it's all good.
                if (strlen($Pivot_Vars['pass1']) >= 6) {
                    $Users[$theuser]['pass'] = md5($Pivot_Vars['pass1']);
                    if ($_COOKIE['mode'] == 'stayloggedin' && $Pivot_Vars['user'] == $theuser) {
                        setcookie('pass', md5($Pivot_Vars['pass1']), time() + $Cfg['cookie_length'], $Paths['cookie_url']);
                    }
                    //change the session key too..
                    $Cfg['tempsessions'][$Pivot_Vars['session']][1] = md5($Pivot_Vars['pass1']);
                }
                for ($i = 0; $i < $arraycount; $i++) {
                    if ($userfields[$i][0] != 'heading' && $userfields[$i][0] != 'pass1' && $userfields[$i][0] != 'pass2') {
                        $Users[$theuser][$userfields[$i][0]] = $Pivot_Vars[$userfields[$i][0]];
                    }
                }
                // set the categories..
                if ($Users[$Pivot_Vars['user']]['userlevel'] > 2) {
                    foreach (explode("|", $Cfg['cats']) as $category) {
                        $allowed_users = explode("|", $Cfg['cat-' . $category]);
                        if (isset($Pivot_Vars['allowed'][urlencode($category)])) {
                            // add the user..
                            if (!in_array($theuser, $allowed_users)) {
                                $allowed_users[] = $theuser;
                            }
                        } else {
                            // remove the user..
                            if (in_array($theuser, $allowed_users)) {
                                foreach ($allowed_users as $key => $user) {
                                    if ($user == $theuser) {
                                        unset($allowed_users[$key]);
                                    }
                                }
                            }
                        }
                        $Cfg['cat-' . $category] = implode("|", $allowed_users);
                    }
                }
                /**
                 * Rather crude check to prevent corrupting the file:
                 * if $Users[$theuser]['username'] is empty, we refuse to save.
                 */
                if ($Users[$theuser]['username'] != "") {
                    debug("changes saved for " . $theuser);
                    SaveSettings();
                } else {
                    // not right..
                    debug("Changes not saved..");
                }
                //so we can reload the languages and such
                if ($admin == 1) {
                    redirect('index.php?session=' . $Pivot_Vars['session'] . '&amp;menu=admin&amp;func=admin&do=seeusers');
                    die;
                } else {
                    redirect('index.php?session=' . $Pivot_Vars['session'] . '&amp;menu=userinfo&amp;func=u_settings');
                    die;
                }
            }
        } else {
            //reshow the spage
            $Pivot_Vars['edituser'] = $Pivot_Vars['username'];
            //regroup the old settings.
            for ($i = 0; $i < $arraycount; $i++) {
                if ($userfields[$i][3] == 0) {
                    $userfields[$i][4] = $Pivot_Vars[$userfields[$i][0]];
                } elseif ($userfields[$i][3] == 3) {
                    $userfields[$i][6] = $Pivot_Vars[$userfields[$i][0]];
                }
            }
        }
        if ($Users[$theuser]['userlevel'] > 3) {
            //ARGHH!!!!!!
            $unf[0] = $userfields[4][6];
            $unf[1] = 'disabled';
            unset($userfields[4][6]);
            $userfields[4][6] = $unf;
        }
        if ($admin == 1) {
            change_user(1, $userfields);
        } else {
            u_settings_screen(1, $userfields);
        }
    }
    PutUserInfo();
}
开发者ID:wborbajr,项目名称:TecnodataApp,代码行数:101,代码来源:pvlib.php

示例13:

if($usersmenus->AsArticaAdministrator==false){header('location:users.index.php');exit;}


if(isset($_POST["DenyMiniWebFromStandardPort"])){js_web_miniadm_save();exit;}
if(isset($_POST["LighttpdArticaDisableSSLv2"])){js_LighttpdArticaDisableSSLv2_save();exit;}


if(isset($_GET["lighttpd_procs"])){HTTPS_PROCESSES_SAVE();exit;}
if(isset($_GET["LighttpdArticaDisabled"])){LighttpdArticaDisabled();exit;}
if(isset($_POST["ChangeSuperSuser"])){ChangeUserPassword();exit();}
if(isset($_GET["section"])){page_switch();exit;}
if(isset($_GET["GroupBehavior"])){GroupBehavior();exit;}
if(isset($_GET["SaveGroupBehavior"])){SaveGroupBehavior();exit;}
if(isset($_GET["SaveRelayBehavior"])){SaveRelayBehavior();exit;}
if(isset($_GET["RelayBehavior"])){RelayBehavior();exit;}
if(isset($_GET["ARTICA_FILTER_QUEUE_PATH"])){SaveSettings();}
if(isset($_GET["ArticaWebRootURI"])){SaveArticaWebRootURI();exit;}
if(isset($_GET["status"])){main_status();exit;}
if(isset($_GET["ArticaProxyServerEnabled"])){SaveProxySettings();exit;}
if(isset($_GET["ArticaMailAddonsLevel_switch"])){echo SMTP_PERFORMANCES_EXPLAIN($_GET["ArticaMailAddonsLevel_switch"]);exit;}
if(isset($_GET["ArticaMailAddonsLevel_save"])){SMTP_PERFORMANCES_SAVE();exit;}
if(isset($_GET["MysqlMaxEventsLogs"])){SaveSqlSettings();exit();}
if(isset($_GET["http_settings"])){HTTPS_PORT_SAVE();exit;}
if(isset($_GET["advlighttp"])){HTTPS_PROCESSES();exit;}

if(isset($_GET["smtp_notifications"])){SMTP_NOTIFICATIONS_SAVE();exit;}
if(isset($_GET["testnotif"])){SMTP_NOTIFICATIONS_NOTIF();exit;}
if(isset($_GET["smtp-notifs-tab"])){SMTP_NOTIFICATIONS_SWITCH();exit;}
if(isset($_GET["SMTP_NOTIFICATIONS_ADD_CC"])){SMTP_NOTIFICATIONS_ADD_CC();exit;}
if(isset($_GET["SMTP_NOTIFICATIONS_DEL_CC"])){SMTP_NOTIFICATIONS_DEL_CC();exit;}
if(isset($_GET["SMTP_NOTIFICATIONS_LIST_CC"])){echo SMTP_NOTIFICATIONS_CCLIST();exit;}
开发者ID:rsd,项目名称:artica-1.5,代码行数:31,代码来源:artica.settings.php


注:本文中的SaveSettings函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。