/** * Изменить Email пользователя. * * @param int $sUid UID пользователя * @param string $sEmail новый Email пользователя * * @return object xajaxResponse */ function updateEmail($sUid = 0, $sEmail = '') { session_start(); $objResponse = new xajaxResponse(); if (hasPermissions('users')) { require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php'; $res = users::ChangeMail(trim($sUid), trim($sEmail)); if ($res) { $objResponse->alert($res); } else { $sDisplay = trim($sEmail) ? '' : 'none'; $objResponse->assign("email_value{$sUid}", 'innerHTML', $sEmail); } $objResponse->script("\$('email_show{$sUid}').setStyle('display', '');"); $objResponse->script("\$('email_edit{$sUid}').setStyle('display', 'none');"); } return $objResponse; }
$domain_id = __paramInit('int', 'domain_id', null, 0); require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/account.php'; $users = account::GetUsersByAkOp($akop, $fdate, $tdate, $domain_id); foreach ($users as $value) { if ($akop == 1 && $value['op_code'] == 108) { $value['ammount'] = '-19.00'; } if ($akop == 73 && $value['op_code'] == 108) { $value['ammount'] = '-1.00'; } $history_bill[$value['uid']][] = array('ammount' => $value['ammount'], 'op_date' => $value['op_date'], 'comments' => $value['descr'] . ($value['comments'] ? " ({$value['comments']})" : '')); } $no_more = 1; break; case 'change_email': $res = users::ChangeMail(trim($_POST['uid']), trim($_POST['email'])); if ($res) { $_SESSION['a_alert_msg'] = $res; } ob_end_clean(); header('Location: ?type=' . $_POST['s_type'] . '&page=' . $_POST['s_page'] . '&search=' . $_POST['s_search'] . '&searchip=' . $_POST['s_searchip'] . '&action=' . $_POST['s_action'] . '#user_' . $_POST['uid']); exit; break; case 'change_safety_phone': $res = users::ChangeSafetyPhone(trim($_POST['uid']), $_POST['safety_phone'], $_POST['safety_only_phone']); if ($res) { $_SESSION['a_alert_msg'] = $res; } ob_end_clean(); header('Location: ?type=' . $_POST['s_type'] . '&page=' . $_POST['s_page'] . '&search=' . $_POST['s_search'] . '&searchip=' . $_POST['s_searchip'] . '&action=' . $_POST['s_action'] . '#user_' . $_POST['uid']); exit;
$domain_id = __paramInit('int', 'domain_id', null, 0); require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/account.php"; $users = account::GetUsersByAkOp($akop, $fdate, $tdate, $domain_id); foreach ($users as $value) { if ($akop == 1 && $value['op_code'] == 108) { $value['ammount'] = "-19.00"; } if ($akop == 73 && $value['op_code'] == 108) { $value['ammount'] = "-1.00"; } $history_bill[$value['uid']][] = array("ammount" => $value['ammount'], "op_date" => $value['op_date'], "comments" => $value['descr'] . ($value['comments'] ? " ({$value['comments']})" : "")); } $no_more = 1; break; case "change_email": $res = users::ChangeMail(trim($_POST["uid"]), trim($_POST["email"])); if ($res) { $_SESSION['a_alert_msg'] = $res; } ob_end_clean(); header('Location: ?type=' . $_POST['s_type'] . '&page=' . $_POST['s_page'] . '&search=' . $_POST['s_search'] . '&searchip=' . $_POST['s_searchip'] . '&action=' . $_POST['s_action'] . '#user_' . $_POST['uid']); exit; break; case "change_safety_phone": $res = users::ChangeSafetyPhone(trim($_POST["uid"]), $_POST["safety_phone"], $_POST['safety_only_phone']); if ($res) { $_SESSION['a_alert_msg'] = $res; } ob_end_clean(); header('Location: ?type=' . $_POST['s_type'] . '&page=' . $_POST['s_page'] . '&search=' . $_POST['s_search'] . '&searchip=' . $_POST['s_searchip'] . '&action=' . $_POST['s_action'] . '#user_' . $_POST['uid']); exit;