|
12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
-
- require_once(dirname(__FILE__)."/config.php");
-
- $dopost = isset($dopost) ? $dopost : "";
- if (!isset($backurl)) {
- $backurl = 'edit_email.php';
- }
- if ($dopost == 'save') {
- if (!empty($cfg_ml->fields['email']) || $cfg_ml->fields['checkmail'] != -1) {
- ShowMsg('Email已经设置,无需重复提交', '-1');
- exit();
- }
-
- CheckCSRF();
- if (!CheckEmail($email)) {
- ShowMsg('Email格式不正确', '-1');
- exit();
- }
- $email = HtmlReplace($email, -1);
-
- $query = "UPDATE `#@__member` SET `email` = '$email' WHERE mid='{$cfg_ml->M_ID}' ";
- $dsql->ExecuteNoneQuery($query);
-
- $cfg_ml->DelCache($cfg_ml->M_ID);
- ShowMsg('成功更新邮箱信息', $backurl);
- exit();
- }
- $email = $cfg_ml->fields['email'];
- include(DEDEMEMBER."/templets/edit_email.htm");
- exit();
|