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


PHP updateUser函数代码示例

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


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

示例1: recruitSoldier

function recruitSoldier($id) {
	$com = getUserDetails($id, "commander");
	updateUser($id, " exp =exp+6,clicks=clicks+4");
	if ($com->commander AND $com->commander == $_SESSION['isLogined']) {
		updateUser($com->commander, " exp =exp+3,clicks=clicks+1,uu=uu+1");
	}
}
开发者ID:Naddiseo,项目名称:WW2Game,代码行数:7,代码来源:recruit.php

示例2: processRequest

/**
 * This file is a part of MyWebSQL package
 *
 * @file:      modules/usermanager.php
 * @author     Samnan ur Rehman
 * @copyright  (c) 2008-2014 Samnan ur Rehman
 * @web        http://mywebsql.net
 * @license    http://mywebsql.net/license
 */
function processRequest(&$db)
{
    $action = v($_REQUEST["id"]);
    include BASE_PATH . "/lib/usermanager.php";
    $legacyServer = Session::get('db', 'version') < 5;
    $editor = new userManager($db, $legacyServer);
    $message = '';
    if ($action != '') {
        if ($action == "add") {
            $result = addUser($db, v($_REQUEST["query"]), $editor);
        } else {
            if ($action == "delete") {
                $result = deleteUser($db, v($_REQUEST["query"]), $editor);
            } else {
                if ($action == "update") {
                    $result = updateUser($db, v($_REQUEST["query"]), $editor);
                }
            }
        }
        if ($result) {
            $db->flush('PRIVILEGES', true);
            $message = __('The command executed successfully');
        } else {
            $message = __('Error occurred while executing the query');
        }
    }
    displayUserForm($db, $editor, $message, $action);
}
开发者ID:guohuadeng,项目名称:stampApp,代码行数:37,代码来源:usermanager.php

示例3: commandRouter

function commandRouter($action)
{
    switch ($action) {
        case 'login':
            loginUser();
            break;
        case 'createUser':
            createUser();
            break;
        case 'getUser':
            getUser();
            break;
        case 'deleteUser':
            deleteUser();
            break;
        case 'updateUser':
            updateUser();
            break;
        case 'addTab':
            addTab();
            break;
        case 'delTab':
            delTab();
            break;
        case 'editTab':
            editTab();
            break;
        case 'getTabs':
            getTabs();
            break;
        case 'addNote':
            addNote();
            break;
        case 'delNote':
            delNote();
            break;
        case 'editNote':
            editNote();
            break;
        case 'getNotes':
            getNotes();
            break;
        default:
            break;
    }
}
开发者ID:harvPrentiss,项目名称:ToDo,代码行数:46,代码来源:dataRetriever.php

示例4: parseURI

function parseURI()
{
    parse_str($_SERVER['QUERY_STRING'], $params);
    $ustreamUID = $params['ustreamUID'] ? $params['ustreamUID'] : NULL;
    $longitude = $params['longitude'] ? $params['longitude'] : NULL;
    $latitude = $params['latitude'] ? $params['latitude'] : NULL;
    $event = $params['event'] ? $params['event'] : NULL;
    echo "uid: " . $ustreamUID . " latitude: " . $latitude . " longitude: " . $longitude . " event: " . $event . "<br/>";
    if ($ustreamUID && $longitude && $latitude && $event) {
        if (findUser($ustreamUID)) {
            updateUser($ustreamUID, $longitude, $latitude, $event);
        } else {
            insertUser($ustreamUID);
            updateUser($ustreamUID, $longitude, $latitude, $event);
        }
    }
}
开发者ID:nzukoski,项目名称:Misc,代码行数:17,代码来源:parser.php

示例5: commandRouter

function commandRouter($action)
{
    switch ($action) {
        case 'login':
            loginUser();
            break;
        case 'createUser':
            createUser();
            break;
        case 'getUser':
            getUser();
            break;
        case 'deleteUser':
            deleteUser();
            break;
        case 'updateUser':
            updateUser();
            break;
        case 'addInv':
            addToInv();
            break;
        case 'subInv':
            subFromInv();
            break;
        case 'getInv':
            getInventory();
            break;
        case 'getDecks':
            getDecks();
            break;
        case 'createDeck':
            createDeck();
            break;
        case 'updateDeck':
            updateDeck();
            break;
        case 'deleteDeck':
            deleteDeck();
            break;
        default:
            break;
    }
}
开发者ID:harvPrentiss,项目名称:Magic,代码行数:43,代码来源:dataRetriever.php

示例6: modifyUser

     //END-OF-FIX
 // END: HACK - ADVANCED USER MANAGER
 //END-OF-FIX
 case "modifyUser":
     //FIX:DOMSNITT
     // START: HACK - ADVANCED USER MANAGER
     //modifyUser($chng_uid);
     modifyUser($chng_uid, $viewmode, $sortorder, $start);
     // END: HACK - ADVANCED USER MANAGER
     //END-OF-FIX
     break;
 case "updateUser":
     //FIX:DOMSNITT
     // START: HACK - ADVANCED USER MANAGER
     //updateUser($chng_uid, $chng_uname, $chng_name, $chng_url, $chng_email, $chng_femail, $chng_user_icq, $chng_user_aim, $chng_user_yim, $chng_user_msnm, $chng_user_from, $chng_user_occ, $chng_user_intrest, $chng_user_viewemail, $chng_avatar, $chng_user_sig, $chng_pass, $chng_pass2, $chng_newsletter, $subscription, $subscription_expire, $reason);
     updateUser($chng_uid, $chng_uname, $chng_name, $chng_url, $chng_email, $chng_femail, $chng_user_icq, $chng_user_aim, $chng_user_yim, $chng_user_msnm, $chng_user_from, $chng_user_occ, $chng_user_intrest, $chng_user_viewemail, $chng_avatar, $chng_user_sig, $chng_pass, $chng_pass2, $chng_newsletter, $subscription, $subscription_expire, $reason, $viewmode, $sortorder, $start);
     // END: HACK - ADVANCED USER MANAGER
     //END-OF-FIX
     break;
 case "delUser":
     include "header.php";
     GraphicAdmin();
     OpenTable();
     echo "<center><font class=\"title\"><b>" . _USERADMIN . "</b></font></center>";
     CloseTable();
     echo "<br>";
     OpenTable();
     echo "<center><font class=\"option\"><b>" . _DELETEUSER . "</b></font><br><br>" . "" . _SURE2DELETE . " {$chng_uid}?<br><br>" . "";
     //FIX:DOMSNITT
     // START: HACK - ADVANCED USER MANAGER - One Line up
     //		."[ <a href=\"".$admin_file.".php?op=delUserConf&amp;del_uid=$chng_uid\">" . _YES . "</a> | <a href=\"".$admin_file.".php?op=mod_users\">" . _NO . "</a> ]</center>";
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:31,代码来源:index.php

示例7: while

    echo '{"result":1,"users":[';
    //start of json object
    while ($row) {
        echo json_encode($row);
        //convert the result array to json object
        $row = $obj->fetch();
        if ($row) {
            echo ",";
            //if there are more rows, add comma
        }
    }
    echo "]}";
    //end of json array and object
}
switch ($cmd) {
    case 1:
        addUser($_REQUEST['user_name'], $_REQUEST['user_id'], $_REQUEST['user_pass'], $_REQUEST['user_type']);
        break;
    case 2:
        updateUser($_REQUEST['user_id'], $_REQUEST['user_name'], $_REQUEST['user_pass'], $_REQUEST['user_type']);
        break;
    case 3:
        delete($_REQUEST['user_id']);
        break;
    case 4:
        searchUser();
        break;
    default:
        # code...
        break;
}
开发者ID:Wainaina3,项目名称:pos,代码行数:31,代码来源:userManipulation.php

示例8: header

<?php

header('Content-Type: application/json; charset=utf-8');
/*
	---- VALUE ----
	.Get name
	.Get id
	Non obligatoire :
		.Get matiere
		.Get name
		.Get password
		.Get roles
*/
include 'co_Bdd.php';
echo "test";
$disp = updateUser();
echo $disp;
//echo json_encode($disp, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
echo "test";
function updateUser()
{
    /*
    	foreach ( $_GET as $key => $value )
    	{
     	   if(iconv_strlen($_GET[$key])==0) {
     	   		if($key == "matiere"){
     	   			//$_GET[$key] = actionArray($_GET[$key], $User[$key]);
     	   		}
     	   		$_GET[$key] = $User[$key];
     	   }
    	}
开发者ID:hugo082,项目名称:API_FamillyApp,代码行数:31,代码来源:test.php

示例9: saveCard

                    $creditCardId = saveCard($newCard);
                    $card = getCreditCard($creditCardId);
                }
            }
            // Update password if new password data has been provided
            if (isset($_POST['user']['password'])) {
                if ($_POST['user']['password'] == $_POST['user']['password_confirmation']) {
                    $newPassword = $_POST['user']['password'];
                } else {
                    $message = "The new password did not match your confirm password.";
                    $messageType = "error";
                }
            }
            // update credit card info OR/AND password in our database
            if (!isset($message) && (isset($newPassword) || isset($creditCardId))) {
                updateUser($_POST['user']['email'], $newPassword, $creditCardId);
                $message = "Your profile has been updated.";
                $messageType = "success";
            }
        } else {
            $message = "The current password that you provided is invalid.";
            $messageType = "error";
        }
    }
} catch (\PayPal\Exception\PPConnectionException $ex) {
    $message = parseApiError($ex->getData());
    $messageType = "error";
} catch (Exception $ex) {
    $message = $ex->getMessage();
    $messageType = "error";
}
开发者ID:18653675059,项目名称:rest-api-sample-app-php,代码行数:31,代码来源:profile.php

示例10: editUserForm

function editUserForm()
{
    if ($_POST['isPostback']) {
        // now we process the form
        $defaults = $_POST;
        // validation and trimming
        $_POST['tbPass'] = trim($_POST['tbPass']);
        $_POST['tbFirst'] = trim($_POST['tbFirst']);
        $_POST['tbLast'] = trim($_POST['tbLast']);
        $_POST['tbEmail'] = trim($_POST['tbEmail']);
        if (strlen($_POST['tbPass']) > 0 && strlen($_POST['tbPass']) < 4) {
            $errors[] = "Your password must be more than 4 characters long";
        }
        if (strlen($_POST['tbFirst']) == 0) {
            $errors[] = "You must enter a first name";
        }
        if (strlen($_POST['tbLast']) == 0) {
            $errors[] = "You must enter a last name";
        }
        if (!preg_match('/^[^@\\s]+@([-a-z0-9]+\\.)+[a-z]{2,}$/i', $_POST['tbEmail'])) {
            $errors[] = "You must enter a valid email address";
        }
        if (strlen(strval(intval($_POST['tbPhone1A'] . $_POST['tbPhone1B'] . $_POST['tbPhone1C']))) < 10) {
            $errors[] = "Please enter a valid primary phone number";
        }
        if (strlen($_POST['tbPhone2A'] . $_POST['tbPhone2B'] . $_POST['tbPhone2C'])) {
            if (strlen(strval(intval($_POST['tbPhone2A'] . $_POST['tbPhone2B'] . $_POST['tbPhone2C']))) < 10) {
                $errors[] = "Please enter a valid secondary phone number";
            }
        }
        if ($_POST['tbPay'] != strval(floatval($_POST['tbPay']))) {
            $errors[] = "You must enter a valid hourly rate";
        }
        if (!$errors) {
            // our input is clean, go ahead and submit
            $sInsertError = updateUser($_POST);
            redirect("myEmps.php");
        }
    } else {
        // get current details for user
        $aUserVals = getUserVals($_REQUEST['u_id']);
        $aPhone1 = formatPhoneNum($aUserVals->user_phone1);
        $aPhone2 = formatPhoneNum($aUserVals->user_phone2);
        $defaults['tbPass'] = $aUserVals->user_pass;
        $defaults['tbFirst'] = $aUserVals->user_first;
        $defaults['tbLast'] = $aUserVals->user_last;
        $defaults['tbEmail'] = $aUserVals->user_email;
        $defaults['tbPhone1A'] = $aPhone1[0];
        $defaults['tbPhone1B'] = $aPhone1[1];
        $defaults['tbPhone1C'] = $aPhone1[2];
        $defaults['tbPhone2A'] = $aPhone2[0];
        $defaults['tbPhone2B'] = $aPhone2[1];
        $defaults['tbPhone2C'] = $aPhone2[2];
        $defaults['tbPay'] = $aUserVals->user_pay_rate;
        $defaults['hdID'] = $aUserVals->user_id;
        $defaults['cbActive'] = $aUserVals->user_inactive;
    }
    // get the list of supervisors
    $aSupers = getSupervisors();
    // get employees supervisors
    $aEmpSupers = getEmpSupervisors($aUserVals->user_id);
    foreach ($aEmpSupers as $EmpSuper) {
        $aSelectedSupers[] = $EmpSuper->super_super;
    }
    // get the user types < the current user
    $aTypes = getUserTypes($_SESSION['USERTYPE']);
    ?>
<form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post" name="frmAddUser"><table width="100%"  border="0" cellpadding="0" cellspacing="0">
	<input name="hdID" type="hidden" value="<?php 
    echo $defaults['hdID'];
    ?>
">
  <tr>
    <td colspan="2"><strong>Edit User</strong></td>
  </tr>
  <?php 
    if (isset($sInsertError)) {
        print "<tr><td colspan=2><span class=errorMsg>{$sInsertError}</span></td></tr>";
    }
    if ($errors) {
        print "<tr><td colspan=2 class=errorMsg><strong>Please correct the following errors:</strong><br><ul><li>";
        print implode('</li><li>', $errors);
        print "</li></td></tr>";
    }
    ?>
  <tr class="evenRow">
    <td width="26%">Username </td>
    <td width="74%"><?php 
    echo $aUserVals->user_name;
    ?>
    </td>
  </tr>
  <tr>
    <td>User Password </td>
    <td><input name="tbPass" type="password" id="tbPass" size="10" maxlength="20"></td>
  </tr>
  <tr class="evenRow">
//.........这里部分代码省略.........
开发者ID:atrommer,项目名称:ESS,代码行数:101,代码来源:editUser.php

示例11: while

        if (!$deleted) {
            $msg = "Database Error: {$ax['usr_not_deleted']}";
            break;
        }
        $msg = $ax['usr_deleted'];
    } while (false);
    return $msg;
}
//Control logic
if ($privs >= 4) {
    //manager or admin
    $msg = '';
    if (isset($_POST['addExe'])) {
        $msg = addUser($user);
    } elseif (isset($_POST['updExe'])) {
        $msg = updateUser($user);
    } elseif (isset($_GET['delExe'])) {
        $msg = deleteUser($user);
    }
    echo "<p class='error'>{$msg}</p>\n\t\t<div class='scrollBoxAd'>\n\t\t<div class='centerBox'>\n";
    if (!$mode or isset($_POST["back"])) {
        showUsers();
        //no add / no edit
    } else {
        editUser($user);
        //add or edit
    }
    echo "</div>\n</div>\n";
} else {
    echo "<p class='error'>{$ax['no_way']}</p>\n";
}
开发者ID:sanluca,项目名称:py-acqua-hw,代码行数:31,代码来源:users.php

示例12: selectUser

        echo selectUser();
        break;
    case 'selectMates':
        echo selectMates();
        break;
    case 'selectTop3':
        echo selectTop3();
        break;
    case 'addUser':
        echo addUser();
        break;
    case 'addParticipation':
        echo addParticipation();
        break;
    case 'updateUser':
        echo updateUser();
        break;
    case 'updateShare':
        echo updateShare();
        break;
    default:
        $error = array("error" => "Undefined function.");
        echo json_encode($error);
        break;
}
$dbh = null;
function isXMLHTTPRequest()
{
    if (!sizeError($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
        return true;
    } else {
开发者ID:sylvhama,项目名称:summer2015,代码行数:31,代码来源:do.php

示例13: dbQuery

        }
        $result = dbQuery("UPDATE [db]users SET status = -1 WHERE user_id = {$uid}");
        if (!$result) {
            $msg = "Database Error: {$ax['usr_not_deleted']}";
            break;
        }
        $msg = $ax['usr_deleted'];
    } while (false);
    return $msg;
}
//Control logic
if ($privs >= 4) {
    //manager or admin
    $msg = '';
    if (isset($_POST['addExe'])) {
        $msg = addUser();
    } elseif (isset($_POST['updExe'])) {
        $msg = updateUser();
    } elseif (isset($_GET['delExe'])) {
        $msg = deleteUser();
    }
    echo "<p class='error'>{$msg}</p>\n\t\t<div class='scrollBoxAd'>\n\t\t<div class='centerBox'>\n";
    if ($editUser != 'y' or isset($_POST["back"])) {
        showUsers();
    } else {
        editUser($uid);
    }
    echo "</div>\n</div>\n";
} else {
    echo "<p class='error'>{$ax['no_way']}</p>\n";
}
开发者ID:krievley,项目名称:schedule,代码行数:31,代码来源:users.php

示例14: updateUser

<?php

if (isset($_GET['update']) && $_GET['update'] == "1") {
    $update = updateUser($manceUser['manceID']);
    if ($update) {
        ?>
<div class="alert alert-success alert-dismissible" role="alert" style="margin-top: 10px;"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button> Data updated for this user!</div>
<?php 
    } else {
        $steamidexists = updateSteam($manceUser['manceID']);
        if ($steamidexists == 1) {
            ?>
<div class="alert alert-success alert-dismissible" role="alert" style="margin-top: 10px;"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button> Data failed to update for this user, but steam updated his name!</div>
<?php 
        } else {
            if ($steamidexists === FALSE) {
                ?>
<div class="alert alert-danger alert-dismissible" role="alert" style="margin-top: 10px;"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button> Data failed to update for this user, and steam is not updating his name!</div>
<?php 
            } else {
                ?>
<div class="alert alert-danger alert-dismissible" role="alert" style="margin-top: 10px;"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button> Could not update your data. You must play at least one ranked game under your current Steam name in order to update</div>
<?php 
            }
        }
    }
}
$search = $db->query("SELECT * FROM log WHERE user='" . $manceUser['manceID'] . "' AND server='{$server}'");
?>
<script>
r(function() {
开发者ID:NiciusB,项目名称:Brawlmance,代码行数:31,代码来源:you.php

示例15: urldecode

require_once 'loader.php';
$Email = urldecode($_POST['Email']);
$Password = urldecode($_POST['Password']);
$Name = urldecode($_POST['Name']);
$Age = urldecode($_POST['Age']);
$Contact = urldecode($_POST['Contact']);
$City = urldecode($_POST['City']);
$State = urldecode($_POST['State']);
$sex = urldecode($_POST['sex']);
$GcmId = urldecode($_POST['GcmId']);
$profile_pic = urldecode($_POST['profile_pic']);
$facebook = false;
if (isset($_POST['Type'])) {
    $facebook = true;
}
$res = isUserExisted($Email);
if ($res) {
    if ($facebook) {
        updateUser($Email, $Password, $Name, $Age, $Contact, $City, $State, $sex, $GcmId, $profile_pic);
        getUserDetail($Email);
    } else {
        echo "user_exits";
    }
} else {
    if ($facebook) {
        $res = storeFacebookUser($Email, $Password, $Name, $Age, $Contact, $City, $State, $sex, $GcmId, $profile_pic);
    } else {
        $res = storeUser($Email, $Password, $Name, $Age, $Contact, $City, $State, $sex, $GcmId, $profile_pic);
    }
    getUserDetail($Email);
}
开发者ID:rakshithraj,项目名称:smart_complaint,代码行数:31,代码来源:register.php


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