本文整理汇总了PHP中update_user函数的典型用法代码示例。如果您正苦于以下问题:PHP update_user函数的具体用法?PHP update_user怎么用?PHP update_user使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了update_user函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: session
function session($user, $pass)
{
$user_file = 'config/users/' . $user . '.ini';
if (!file_exists($user_file)) {
return $str = '<li>Username not found in our record.</li>';
}
$user_enc = user('encryption', $user);
$user_pass = user('password', $user);
$user_role = user('role', $user);
if ($user_enc == "password_hash") {
if (password_verify($pass, $user_pass)) {
if (password_needs_rehash($user_pass, PASSWORD_DEFAULT)) {
update_user($user, $pass, $user_role);
}
$_SESSION[config("site.url")]['user'] = $user;
header('location: admin');
} else {
return $str = '<li>Your username and password mismatch.</li>';
}
} else {
if (old_password_verify($pass, $user_enc, $user_pass)) {
update_user($user, $pass, $user_role);
$_SESSION[config("site.url")]['user'] = $user;
header('location: admin');
} else {
return $str = '<li>Your username and password mismatch.</li>';
}
}
}
开发者ID:austinvernsonger,项目名称:htmly,代码行数:29,代码来源:admin.php
示例2: admin_test_main
function admin_test_main()
{
// Create user
echo '<br><h3>Creating User.</h3><br>';
$user_1 = user_1();
user\add_user($user_1);
echo '<br><h3>User created!</h3><br>';
// Verify
$user_1_db = user\authenticate_user($user_1['email_address'], $user_1['password']);
$user_1_id = $user_1_db['id'];
echo "<br><h3>User ID: {$user_1_id}</h3><br>";
// Update user
echo "<br><h3>Updating User.</h3><br>";
$user_1_db['email_address'] = '[email protected]';
$user_1_db['last_name'] = 'Two';
update_user($user_1_db);
echo "<br><h3>User Updated!</h3><br>";
// Verify
$user_2_db = user\authenticate_user('[email protected]', $user_1['password']);
$new_last_name = $user_2_db['last_name'];
echo "<br><h3>New User Last Name: {$user_2_db}";
// Delete user
echo "<br><h3>Deleting User.</h3><br>";
delete_user(array("user_id" => $user_1_id));
echo "<br><h3>User deleted!</h3><br>";
}
开发者ID:strall,项目名称:easy-ride,代码行数:26,代码来源:admin_test.php
示例3: set_cookie
function set_cookie($data)
{
//задаем cookie с уникальным идентификатором польз-ля
setcookie('user_id', $data['user_id'], time() + 3600 * 24 * 30);
//задаем cookie с хэш-строкой польз-ля
$hash_str = hash_gen(10);
update_user($data['user_id'], $hash_str);
setcookie('user_hash', $hash_str, time() + 3600 * 24 * 30);
header('Location: index.php');
exit;
}
开发者ID:davakir,项目名称:GeekBrainsPHP,代码行数:11,代码来源:login.php
示例4: recover
function recover($mode, $email)
{
$mode = sanitize($mode);
$email = sanitize($email);
$user_data = user_data(user_id_from_email($email), 'first_name', 'username');
if ($mode == 'username') {
email($email, 'Your username recvory', "Hello" . $user_data['first_name'] . ",\n\nYour username is:" . $user_data['username'] . "\n\n-stumbleupon");
} else {
if ($mode == 'password') {
$generated_password = substr(md5(rand(999, 999999)), 0, 8);
change_password($user_data['user_id'], $generated_password);
update_user($user_data['user_data'], array('password_recover' => '1'));
email($email, 'Your password recvory', "Hello" . $user_data['first_name'] . ",\n\nYour New Password is:" . $generated_password . "\n\n-StumbleUpon");
}
}
}
开发者ID:vimoxshah,项目名称:StumbleUpon,代码行数:16,代码来源:users.php
示例5: index
public function index()
{
$root = array();
$root['return'] = 1;
$email = addslashes($GLOBALS['request']['email']);
//用户名或邮箱
$pwd = addslashes($GLOBALS['request']['pwd']);
//密码
$user_info = user_check($email, $pwd);
$user_id = intval($user_info['id']);
if (!$user_info) {
$root['status'] = 0;
$root['message'] = "用户已失效,无法升级";
output($root);
} else {
$upd_user_name = addslashes($GLOBALS['request']['upd_user_name']);
$upd_password = addslashes($GLOBALS['request']['upd_password']);
$user_data = array('id' => $user_id, 'user_name' => $upd_user_name, 'user_pwd' => $upd_password, 'email' => $upd_user_name);
$res = update_user($user_id, $user_data);
//print_r($res);
if ($res['status'] == 1) {
$root['status'] = 1;
$root['uid'] = $user_id;
$root['user_name'] = $upd_user_name;
$root['password'] = md5($upd_password);
$root['is_account'] = 1;
output($root);
} else {
$error = $res['data'];
if (!$error['field_show_name']) {
$error['field_show_name'] = $GLOBALS['lang']['USER_TITLE_' . strtoupper($error['field_name'])];
}
if ($error['error'] == EMPTY_ERROR) {
$error_msg = sprintf($GLOBALS['lang']['EMPTY_ERROR_TIP'], $error['field_show_name']);
}
if ($error['error'] == FORMAT_ERROR) {
$error_msg = sprintf($GLOBALS['lang']['FORMAT_ERROR_TIP'], $error['field_show_name']);
}
if ($error['error'] == EXIST_ERROR) {
$error_msg = sprintf($GLOBALS['lang']['EXIST_ERROR_TIP'], $error['field_show_name']);
}
$root['status'] = 0;
$root['message'] = $error_msg;
output($root);
}
}
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:47,代码来源:updateaccount.action.php
示例6: author_save
/**
* Updates a user.
*/
function author_save()
{
global $txp_user;
require_privs('admin.edit');
extract(psa(array('privs', 'name', 'RealName', 'email')));
$privs = assert_int($privs);
if (!is_valid_email($email)) {
author_list(array(gTxt('email_required'), E_ERROR));
return;
}
$rs = update_user($name, $email, $RealName);
if ($rs && ($txp_user === $name || change_user_group($name, $privs))) {
author_list(gTxt('author_updated', array('{name}' => $RealName)));
return;
}
author_list(array(gTxt('author_save_failed'), E_ERROR));
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:20,代码来源:txp_admin.php
示例7: recover
function recover($mode, $email)
{
$user_data = user_data(user_id_from_email($email), 'user_id', 'first_name', 'username');
if ($mode == 'username') {
// recover username
email($email, 'Your username', "Hello " . $user_data['first_name'] . ",\n\nYour username is: " . $user_data['username'] . "\n\n-sparklet");
} else {
if ($mode == 'password') {
// recover password
$generated_password = substr(md5(rand(999, 999999)), 0, 8);
// die($generated_password);
change_password($user_data['user_id'], $generated_password);
update_user($user_data['user_id'], array('password_recover' => '1'));
email($email, 'Your password recovery', "Hello " . $user_data['first_name'] . ",\n\nYour new password is: " . $generated_password . "\n\n-sparklet");
}
}
}
开发者ID:stevensmetellus,项目名称:medium-clone,代码行数:17,代码来源:users.php
示例8: recover
function recover($mode, $email)
{
$mode = sanitize($mode);
$email = sanitize($email);
$user_data = user_data(user_id_from_email($email), 'user_id', 'first_name');
if ($mode == 'username') {
email($email, 'Your username', " Hello " . $userdata['first_name'] . ",\n\nYour username is : " . $user_data['username'] . "\n\n-Utkal Placement");
} else {
if ($mode == 'password') {
$temp_password = substr(md5(rand(9999, 999999)), 0, 8);
change_password($user_data['user_id'], $temp_password);
update_user($user_data['user_id'], array('password_recover' => '1'));
email($email, 'Your password Recovery', " Hello " . $userdata['first_name'] . ",\n\nYour new password is : " . $temp_password . "\n\nPlease log in to change this.\n\n-Utkal Placement");
}
}
//$temp_pass= md5($temp_pass);
//mysql_query("UPDATE `users` SET `pass_temp` = '$temp_pass' WHERE `email` = '$email'");
}
开发者ID:prabhat2233,项目名称:UtkalPortal,代码行数:18,代码来源:users.php
示例9: recover
function recover($mode, $email)
{
// recupereaza numele de utilizator sau parola - $mode poate lua valoarea de 'username' sau 'password'
include 'core/db/db_connection.php';
$mode = sanitize($mode);
$email = sanitize($email);
$user_data = user_data(get_user_id_from_email($email), 'user_id', 'first_name', 'username');
if ($mode == 'username') {
email($email, 'Your username', "\n\t\t\t\tHello " . $user_data['first_name'] . ", <br><br>\n\t\t\t\tYour username is " . $user_data['username'] . " <br><br>\n\t\t\t\t-worldtour team\n\t\t\t");
} else {
if ($mode == 'password') {
$generated_password = substr(md5(rand(777, 7777)), 0, 7);
// generam o parola random de 7 caractere pe care o criptam cu md5
change_password($user_data['user_id'], $generated_password);
update_user($user_data['user_id'], array('pwd_recovery' => '1'));
// folosim un 'flag' asupra contului pentru a forta utilizatorul sa-si schimbe parola generata de noi prima oara cand se logheaza
email($email, 'Password recovery', "\n\t\t\t\tHello " . $user_data['first_name'] . ", <br><br>\n\t\t\t\tYour new password is " . $generated_password . "<br><br>\n\t\t\t\tKindly note that this is a temporary password and you are required to change it on your first log in. <br><br>\n\t\t\t\t-worldtour team\n\t\t\t");
}
}
}
开发者ID:vpandichi,项目名称:worldtour_proiect,代码行数:20,代码来源:users.php
示例10: save_user
function save_user($entity)
{
if (!$entity->is_new()) {
return update_user($entity);
} else {
if ($entity->validate()) {
global $__db_conn;
$sql = "INSERT INTO user(created_at,updated_at,username,password,role) values (':created_at:',':updated_at:',':username:',':password:',':role:')";
$sql = str_replace(":created_at:", Date("Y-m-d"), $sql);
$sql = str_replace(":updated_at:", Date("Y-m-d"), $sql);
preg_match_all("/:([a-zA-Z_0-9]*):/", $sql, $matches);
foreach ($matches[1] as $attr) {
$sql = str_replace(":{$attr}:", $entity->{$attr}, $sql);
}
mysql_query($sql, $__db_conn);
$entity->id = mysql_insert_id($__db_conn);
return true;
} else {
return false;
}
}
}
开发者ID:quyen91,项目名称:lfpr,代码行数:22,代码来源:User.php
示例11: foreach
foreach ($bill_access_list as $ac) {
if ($ac == $bill['bill_id']) {
$done = 1;
}
}
if (!$done) {
echo "<option value='" . $bill['bill_id'] . "'>" . $bill['bill_name'] . "</option>";
}
}
echo "</select>\n </div>\n <button type='submit' class='btn btn-default' name='Submit' value='Add'>Add</button>\n </form>\n </div>";
} elseif ($vars['user_id'] && $vars['edit']) {
if (!empty($vars['new_level'])) {
if ($vars['can_modify_passwd'] == 'on') {
$vars['can_modify_passwd'] = '1';
}
update_user($vars['user_id'], $vars['new_realname'], $vars['new_level'], $vars['can_modify_passwd'], $vars['new_email']);
print_message("User has been updated");
}
if (can_update_users() == '1') {
$users_details = get_user($vars['user_id']);
if (!empty($users_details)) {
if (empty($vars['new_realname'])) {
$vars['new_realname'] = $users_details['realname'];
}
if (empty($vars['new_level'])) {
$vars['new_level'] = $users_details['level'];
}
if (empty($vars['can_modify_passwd'])) {
$vars['can_modify_passwd'] = $users_details['can_modify_passwd'];
} elseif ($vars['can_modify_passwd'] == 'on') {
$vars['can_modify_passwd'] = '1';
开发者ID:CumulusNetworks,项目名称:cldemo-archive,代码行数:31,代码来源:edituser.inc.php
示例12: handle_user_update
function handle_user_update(&$HTTP_VARS, &$errors)
{
$user_r = fetch_user_r($HTTP_VARS['user_id']);
if (is_not_empty_array($user_r)) {
if (validate_user_info($user_r, $HTTP_VARS, $address_attribs_provided, $errors)) {
if (update_user($HTTP_VARS['user_id'], $HTTP_VARS['fullname'], $HTTP_VARS['uid_language'], $HTTP_VARS['uid_theme'], $HTTP_VARS['email_addr'], $HTTP_VARS['user_role'])) {
return update_user_addresses($user_r, $address_provided_r, $HTTP_VARS, $errors);
} else {
$db_error = db_error();
$errors[] = array('error' => get_opendb_lang_var('user_not_updated', 'user_id', $HTTP_VARS['user_id']), 'detail' => $db_error);
return FALSE;
}
} else {
return FALSE;
}
} else {
$errors[] = array('error' => get_opendb_lang_var('user_not_found', 'user_id', $HTTP_VARS['user_id']));
return FALSE;
}
}
开发者ID:horrabin,项目名称:opendb,代码行数:20,代码来源:user_admin.php
示例13: get_action
} else {
return false;
}
}
function get_action($code)
{
global $ACTIONS;
return isset($ACTIONS[$code]) ? $ACTIONS[$code] : null;
}
function delete_action($code)
{
global $ACTIONS;
if (isset($ACTIONS[$code])) {
unset($ACTIONS[$code]);
return true;
} else {
return false;
}
}
function update_action($par)
{
if (isset($par['code']) && delete_action($par['code'])) {
add_action($par);
}
}
add_action(array('code' => 'track_activity', 'rule' => 'public', 'category' => 'all', 'zone' => 'before_template', 'priority' => 1000, 'function' => function () {
if (check_login()) {
$ID = current_user('ID');
update_user($ID, array('last_activity' => date('c'), 'last_place' => BASE_URL . $_SERVER['REQUEST_URI']));
}
}));
开发者ID:taqtaq11,项目名称:detemiro,代码行数:31,代码来源:basic-action-collector.php
示例14: update_user
// attributes associated with
// a user
// the caller wishes to update
// attributes associated with
// a user
case "update_user":
$uid = $_POST['ajax_uid'];
$fname = $_POST['ajax_fname'];
$lname = $_POST['ajax_lname'];
$email = $_POST['ajax_email'];
$active = $_POST['ajax_active'];
$new_passwd = "";
if (isset($_POST['ajax_newpasswd'])) {
$new_passwd = $_POST['ajax_newpasswd'];
}
update_user($uid, $new_passwd, $fname, $lname, $email, $active);
break;
// the caller wishes to add a new
// user to the db
// the caller wishes to add a new
// user to the db
case "add_user":
$uname = $_POST['ajax_uname'];
$passwd = $_POST['ajax_passwd'];
$fname = $_POST['ajax_fname'];
$lname = $_POST['ajax_lname'];
$email = $_POST['ajax_email'];
$active = $_POST['ajax_active'];
add_user($uname, $passwd, $fname, $lname, $email, $active);
// regenerate the user list
// and send back the new list
开发者ID:neskie,项目名称:Stewardship-Portal,代码行数:31,代码来源:tng_add_edit_user_code.php
示例15: foreach
if (false !== strpos(Session::allowedSensors($login), $sensor_ip)) {
if ($sensors == "") {
$sensors = $sensor_ip;
} else {
$sensors .= "," . $sensor_ip;
}
}
}
foreach ($ACL_MAIN_MENU as $mainmenu => $menus) {
foreach ($menus as $key => $menu) {
if ($gacl->acl_check($mainmenu, $key, ACL_DEFAULT_USER_SECTION, $login)) {
$perm_id = $permids[$mainmenu][$key];
if ($perm_id > 0) {
$perms[$perm_id] = true;
}
}
}
}
$template_id = insert_template($conn, $login . "_gacl", $nets, $sensors, $perms);
if ($template_id > 0) {
echo "Template '" . $login . "_gacl' ID{$template_id} successfully inserted into 'acl_templates'\n";
if (update_user($conn, $login, $template_id)) {
echo "...asigned to user {$login}\n\n";
} else {
echo "...not asigned to user {$login}. An error has occured\n\n";
}
} else {
echo "Error creating template '" . $login . "_gacl'\n";
}
}
$db->close();
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:multiclient_upgrade.php
示例16: md5
$data['surname'] = $this->input->post('surname');
if ($_POST['password'] != '') {
$data['password'] = md5($this->input->post('password'));
}
$data['role'] = $this->input->post('role');
// Have barcode?
$this->db->where('status', '1');
$this->db->where('email', $data['email']);
$this->db->where_not_in('id', $user['id']);
$query = $this->db->get('users')->result_array();
if ($query) {
alertbox('alert-danger', get_lang('E-mail address is registered.'));
$continue = false;
}
if ($continue) {
if (update_user($user['id'], $data)) {
alertbox('alert-success', get_lang('Operation is Successful'), '');
$user = get_user(array('id' => $user_id));
?>
<script>$(document).ready(function(){$('#page_title').html('<?php
echo $user['display_name'];
?>
'); });</script>
<?php
}
}
}
}
?>
开发者ID:husmen73,项目名称:on-muhasebe,代码行数:29,代码来源:user_view.php
示例17: delete_user
$password = $pass1;
} else {
$password = '';
}
//* if Delete User Checked
if ($deleteuser) {
$success = delete_user($seluserid);
optimizemysqltable('users');
if ($success) {
action_success('User Delete Success!');
} else {
action_failure('User Delete Failure!');
}
unset($seluserid);
} elseif ($seluserid && $username && $fullname && $localityid) {
$success = update_user($seluserid, $username, $password, $fullname, $email, $localityid);
if ($success) {
optimizemysqltable('users');
action_success('User Update Success!');
} else {
action_failure('User Update Failure!');
}
} elseif ($username && $password && $fullname && $localityid) {
$nextid = nextautoid('users');
$success = insert_user($seluserid, $username, $password, $fullname, $email, $localityid);
if ($success) {
action_success('User Insert Success!');
$seluserid = $nextid;
optimizemysqltable('adminusers');
} else {
action_failure('User Insert Failure!');
开发者ID:innova-market,项目名称:JobExpert,代码行数:31,代码来源:userpageadmin.php
示例18: syncUserToFA
protected function syncUserToFA($ldap, $username, $password, $primaryGroup)
{
// FIXME: these should probably be fetched from the configuration variables
// default user settings for LDAP-based users
$language = 'en_GB';
$profile = '';
$rep_popup = '1';
$pos = '1';
$isActive = '1';
$userArray = '';
// settings available from LDAP
$uid = $ldap->getAttribute('uid');
$name = $ldap->getAttribute('sn') . " " . $ldap->getAttribute('givenname');
$mobilephone = $ldap->getAttribute('mobile');
$email = $ldap->getAttribute('mail');
// connect to FA database
set_global_connection();
// get role ID from primary group
$map = $this->getConfigValue('group_role_map');
$userRole = $map[$primaryGroup];
// FIXME: should error if empty
$sql = "SELECT id FROM " . TB_PREF . "security_roles WHERE role = " . db_escape($userRole);
$query = db_query($sql, "could not get user role for {$userRole}");
$ret = db_fetch($query);
// FIXME: should error if empty
$role_id = $ret[0];
// check for existing user in FA
$user = get_user_by_login($username);
// if user exists
if ($user) {
// update FA user from LDAP
$dbid = $user[0];
// FIXME: LDAP attribute IDs could be supplied in config for site-specific LDAP compatibility
update_user($dbid, $uid, $name, $mobilephone, $email, $role_id, $language, $profile, $rep_popup, $pos);
// FIXME: update password hash? what about re-auth requests?
// else
} else {
// prepare to create FA user from LDAP
// FIXME: LDAP attribute IDs could be supplied in config for site-specific LDAP compatibility
add_user($uid, $name, md5($password), $mobilephone, $email, $role_id, $language, $profile, $rep_popup, $pos);
// endif
}
}
开发者ID:blestab,项目名称:frontaccounting,代码行数:43,代码来源:ldap_authenticator.php
示例19: update_user
echo "Invalid First name<br/>";
} else {
if (!valid_name($lastname)) {
echo "Invalid Last name<br/>";
} else {
if (!valid_address($address)) {
echo "Invalid Address name<br/>";
} else {
if (!ctype_digit($mobile)) {
echo "Invalid Mobile Number<br/>";
} else {
update_user($user_id, 'FirstName', $firstname);
update_user($user_id, 'LastName', $lastname);
update_user($user_id, 'Address', $address);
update_user($user_id, 'Gender', $gender);
update_user($user_id, 'Mobile', $mobile);
}
}
}
}
}
?>
<?php
$student = get_user_details($_SESSION['user_id']);
$fakes = array();
$fakes['Password'] = true;
$fakes['ID'] = true;
$fakes['AccountType'] = true;
$fakes['Username'] = true;
$fakes['Email'] = true;
开发者ID:Abdelhafiez,项目名称:Web-Project,代码行数:31,代码来源:editprofile.php
示例20: edituser
function edituser($dir)
{
// Edit User
$user = stripslashes($GLOBALS['__POST']["user"]);
$data = find_user($user, NULL);
if ($data == NULL) {
show_error($user . ": " . $GLOBALS["error_msg"]["miscnofinduser"]);
}
if ($self = $user == $GLOBALS['__SESSION']["s_user"]) {
$dir = "";
}
if (isset($GLOBALS['__POST']["confirm"]) && $GLOBALS['__POST']["confirm"] == "true") {
$nuser = stripslashes($GLOBALS['__POST']["nuser"]);
if ($nuser == "" || $GLOBALS['__POST']["home_dir"] == "") {
show_error($GLOBALS["error_msg"]["miscfieldmissed"]);
}
if (isset($GLOBALS['__POST']["chpass"]) && $GLOBALS['__POST']["chpass"] == "true") {
if ($GLOBALS['__POST']["pass1"] != $GLOBALS['__POST']["pass2"]) {
show_error($GLOBALS["error_msg"]["miscnopassmatch"]);
}
$pass = md5(stripslashes($GLOBALS['__POST']["pass1"]));
} else {
$pass = $data[1];
}
if ($self) {
$GLOBALS['__POST']["active"] = 1;
}
$data = array($nuser, $pass, stripslashes($GLOBALS['__POST']["home_dir"]), stripslashes($GLOBALS['__POST']["home_url"]), $GLOBALS['__POST']["show_hidden"], stripslashes($GLOBALS['__POST']["no_access"]), $GLOBALS['__POST']["permissions"], $GLOBALS['__POST']["active"]);
if (!update_user($user, $data)) {
show_error($user . ": " . $GLOBALS["error_msg"]["saveuser"]);
}
if ($self) {
activate_user($nuser, NULL);
}
header("location: " . make_link("admin", $dir, NULL));
return;
}
show_header($GLOBALS["messages"]["actadmin"] . ": " . sprintf($GLOBALS["messages"]["miscedituser"], $data[0]));
// Javascript functions:
include "./.include/js_admin3.php";
echo "<FORM name=\"edituser\" action=\"" . make_link("admin", $dir, NULL) . "&action2=edituser\" method=\"post\">\n";
echo "<INPUT type=\"hidden\" name=\"confirm\" value=\"true\"><INPUT type=\"hidden\" name=\"user\" value=\"" . $data[0] . "\">\n";
echo "<BR><TABLE width=\"450\">\n";
echo "<TR><TD>" . $GLOBALS["messages"]["miscusername"] . ":</TD>\n";
echo "<TD align=\"right\"><INPUT type\"text\" name=\"nuser\" size=\"30\" value=\"";
echo $data[0] . "\"></TD></TR>\n";
echo "<TR><TD>" . $GLOBALS["messages"]["miscconfpass"] . ":</TD>\n";
echo "<TD align=\"right\"><INPUT type=\"password\" name=\"pass1\" size=\"30\"></TD></TR>\n";
echo "<TR><TD>" . $GLOBALS["messages"]["miscconfnewpass"] . ":</TD>\n";
echo "<TD align=\"right\"><INPUT type=\"password\" name=\"pass2\" size=\"30\"></TD></TR>\n";
echo "<TR><TD>" . $GLOBALS["messages"]["miscchpass"] . ":</TD>\n";
echo "<TD align=\"right\"><INPUT type=\"checkbox\" name=\"chpass\" value=\"true\"></TD></TR>\n";
echo "<TR><TD>" . $GLOBALS["messages"]["mischomedir"] . ":</TD>\n";
echo "<TD align=\"right\"><INPUT type=\"text\" name=\"home_dir\" size=\"30\" value=\"";
echo $data[2] . "\"></TD></TR>\n";
echo "<TR><TD>" . $GLOBALS["messages"]["mischomeurl"] . ":</TD>\n";
echo "<TD align=\"right\"><INPUT type=\"text\" name=\"home_url\" size=\"30\" value=\"";
echo $data[3] . "\"></TD></TR>\n";
echo "<TR><TD>" . $GLOBALS["messages"]["miscshowhidden"] . ":</TD>";
echo "<TD align=\"right\"><SELECT name=\"show_hidden\">\n";
echo "<OPTION value=\"0\">" . $GLOBALS["messages"]["miscyesno"][1] . "</OPTION>";
echo "<OPTION value=\"1\"" . ($data[4] ? " selected " : "") . ">";
echo $GLOBALS["messages"]["miscyesno"][0] . "</OPTION>\n";
echo "</SELECT></TD></TR>\n";
echo "<TR><TD>" . $GLOBALS["messages"]["mischidepattern"] . ":</TD>\n";
echo "<TD align=\"right\"><INPUT type=\"text\" name=\"no_access\" size=\"30\" value=\"";
echo $data[5] . "\"></TD></TR>\n";
echo "<TR><TD>" . $GLOBALS["messages"]["miscperms"] . ":</TD><TD align=\"right\"><SELECT name=\"permissions\">\n";
$permvalues = array(0, 1, 2, 3, 7);
for ($i = 0; $i < count($GLOBALS["messages"]["miscpermnames"]); ++$i) {
echo "<OPTION value=\"" . $permvalues[$i] . "\"" . ($permvalues[$i] == $data[6] ? " selected " : "") . ">";
echo $GLOBALS["messages"]["miscpermnames"][$i] . "</OPTION>\n";
}
echo "</SELECT></TD></TR>\n";
echo "<TR><TD>" . $GLOBALS["messages"]["miscactive"] . ":</TD>";
echo "<TD align=\"right\"><SELECT name=\"active\"" . ($self ? " DISABLED " : "") . ">\n";
echo "<OPTION value=\"1\">" . $GLOBALS["messages"]["miscyesno"][0] . "</OPTION>";
echo "<OPTION value=\"0\"" . ($data[7] ? "" : " selected ") . ">";
echo $GLOBALS["messages"]["miscyesno"][1] . "</OPTION>\n";
echo "</SELECT></TD></TR>\n";
echo "<TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"" . $GLOBALS["messages"]["btnsave"];
echo "\" onClick=\"return check_pwd();\">\n<input type=\"button\" value=\"";
echo $GLOBALS["messages"]["btncancel"] . "\" onClick=\"javascript:location='";
echo make_link("admin", $dir, NULL) . "';\"></TD></TR></FORM></TABLE><BR>\n";
}
开发者ID:ZenaVault,项目名称:FreeNAS-Source,代码行数:85,代码来源:fun_admin.php
注:本文中的update_user函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论