$exrates = new exrates(); if ($action == 'add') { $sLogin = $_POST['login']; $nSummR = floatval($_POST['summ']); $nStamp = strtotime($_POST['date'] . ' ' . $_POST['time']); $oUser = new users(); $oUser->GetUser($sLogin); if ($oUser->uid) { if ($nSummR > 0) { if (intval($nStamp)) { $nRate = $exrates->GetField(51, $err, 'val'); $nSummFM = round($nSummR, 2); $sAdmin = 'Запись добавил: ' . $_SESSION['login']; $comments = "Безналичный перевод для физ.лиц, логин {$oUser->login}, Альфа-банк"; $sDate = date('c', $nStamp); if ($account->GetInfo($oUser->uid, true) && !($err = $account->depositEx($account->id, $nSummFM, $sAdmin, $comments, 12, $nSummR, 11, $sDate))) { // ВРЕМЕННАЯ АКЦИЯ! ------------- // ВРЕМЕННАЯ ЗАКОМЕНТЕНО! :) ------------- // $account->alphaBankGift( $nSummR, $sDate, $oUser->uid, $oUser->login ); //------------------------------- // обновляем сессию юзера $session = new session(); $session->UpdateProEndingDate($oUser->login); $_SESSION['success'] = 'ok'; $sReferer = $_SERVER['HTTP_REFERER']; $sReferer = preg_match('~siteadmin/alpha~i', $sReferer) ? $sReferer : '/siteadmin/alpha/'; header('Location: ' . $sReferer); exit; } } else { $sError = 'Дата указана не верно';
//require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/mem_storage.php"); //------------------------------------------------------------------------------ $results = array(); //$profiler = new profiler(); //------------------------------------------------------------------------------ //$profiler->start('fill_frl_mem'); //------------------------------------------------------------------------------ //$results['test'] = 'test'; $uid = 6; $account = new account(); $ok = $account->GetInfo($uid, true); $results['GetInfo'] = (int) $ok; if ($ok) { $sum = -777; $scomment = 'Это описание перевода для системы'; $ucomment = 'Это описание перевода для "истории" в аккаунте юзера'; $trs_sum = $sum; $op_date = date('c'); //, strtotime($_POST['date'])); $results['depositEx'] = $account->depositEx($account->id, $sum, $scomment, $ucomment, 134, $trs_sum, NULL, $op_date); } //------------------------------------------------------------------------------ //$profiler->stop('fill_frl_mem'); //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ array_walk($results, function (&$value, $key) { $value = sprintf('%s = %s' . PHP_EOL, $key, $value); }); print_r(implode('', $results)); exit;
exit; break; case "modify": if (!is_release() || in_array($_SESSION['login'], $GLOBALS['balanceCanChangeAdmins'])) { $ucomment = trim($_POST['ucomment']); $scomment = trim($_POST['scomment']); $trs_sum = floatval($_POST['val']); $sum = floatval($_POST['val']); $op_type = floatval($_POST['op_type']); $for = floatval($_POST['for']); $fort = floatval($_POST['fort']); $nrid = floatval($_POST['nrid']); $op_date = date('c', strtotime($_POST['date'])); switch ($op_type) { case 0: $account->depositEx($account->id, $sum, $scomment, $ucomment, 13, $trs_sum, NULL, $op_date); break; case 1: if ($for && $fort) { $account->depositEx($account->id, $sum, $scomment, $ucomment, 12, $for, $fort, $op_date); } else { $error = "Укажите исходные валюты! Валюту в FM указывать не обязательно!"; } break; case 2: $account->depositBonusEx($account->id, $sum, $scomment, $ucomment, 13, $op_date); break; case 3: if ($for && $fort && $nrid) { $account->deposit($op_id, $account->id, $sum, $ucomment, $fort, $for, 36, $nrid, $op_date); } else {