代码拉取完成,页面将自动刷新
同步操作将从 foru/ForU CMS 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
$c_main = 0;
include './library/inc.php';
include './language/common.php';
// 用户状态
user_state();
// 验证参数
$act = isset($act) && !empty($act) ? $act : 'welcome';
$user_id = $_COOKIE['cms']['user_id'];
if ($act == 'welcome') {
setcookie('cms[url_back]', get_url());
$user_infor = $db->getRow("SELECT * FROM cms_user WHERE id = '" . $user_id . "'");
$user_infor[LIB_UNAME] = stripslashes($user_infor[LIB_UNAME]);
include $t_path . 'uc_welcome.php';
}
elseif ($act == 'infor') {
setcookie('cms[url_back]', get_url());
$user_infor = $db->getRow("SELECT * FROM cms_user WHERE id = '" . $user_id . "'");
$user_infor[LIB_UNAME] = stripslashes($user_infor[LIB_UNAME]);
include $t_path . 'uc_infor.php';
}
elseif ($act == 'edit_infor') {
$arr[LIB_UNAME] = isset($_POST[LIB_UNAME]) ? $_POST[LIB_UNAME] : '';
$u_psw = iss{et($_POST[LIB_UPSW]) ? $_POST[LIB_UPSW] : '';
// 判断是否为密码赋值,如没有则不更新该项
if ($u_psw) {
$arr[LIB_UPSW] = md5($u_psw);
}
$arr[LIB_UTNAME] = isset($_POST[LIB_UTNAME]) ? $_POST[LIB_UTNAME] : '';
$arr[LIB_UMOBI] = isset($_POST[LIB_UMOBI]) ? $_POST[LIB_UMOBI] : '';
$arr[LIB_UPROV] = isset($_POST[LIB_UPROV]) ? $_POST[LIB_UPROV] : '';
$arr[LIB_UCITY] = isset($_POST[LIB_UCITY]) ? $_POST[LIB_UCITY] : '';
$arr[LIB_UCOUNTY] = isset($_POST[LIB_UCOUNTY]) ? $_POST[LIB_UCOUNTY] : '';
$arr[LIB_UADDR] = isset($_POST[LIB_UADDR]) ? $_POST[LIB_UADDR] : '';
$arr[LIB_UPOST] = isset($_POST[LIB_UPOST]) ? $_POST[LIB_UPOST] : '';
if ($db->getRow("SELECT * FROM cms_user WHERE u_name = '" . $arr[LIB_UNAME] . "' AND id <> " . $user_id)) {
alert_back($_lang['reg']['id_existing']);
} else {
$set_str = "u_name = '" . $arr[LIB_UNAME] . "'";
}
if ($u_psw) {
$set_str .= ",u_psw = '" . $arr[LIB_UPSW] . "'";
}
$set_str .= ",u_tname = '" . $arr[LIB_UTNAME] . "'";
$set_str .= ",u_mobile = '" . $arr[LIB_UMOBI] . "'";
$set_str .= ",u_province = '" . $arr[LIB_UPROV] . "'";
$set_str .= ",u_city = '" . $arr[LIB_UCITY] . "'";
$set_str .= ",u_county = '" . $arr[LIB_UCOUNTY] . "'";
$set_str .= ",u_addr = '" . $arr[LIB_UADDR] . "'";
$set_str .= ",u_post = '" . $arr[LIB_UPOST] . "'";
if ($db->query("UPDATE cms_user SET " . $set_str . " WHERE id = " . $user_id)) {
url_back($_lang['uc']['userinfor']['success']);
} else {
url_back($_lang['tryagain']);
}
unset($arr);
}
else {
alert_href($_lang['illegal'], 'index.php');
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。