本文整理汇总了PHP中account::addAttach2方法的典型用法代码示例。如果您正苦于以下问题:PHP account::addAttach2方法的具体用法?PHP account::addAttach2怎么用?PHP account::addAttach2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类account
的用法示例。
在下文中一共展示了account::addAttach2方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
$reqvs[$form_type]['validate_status'] = ($hasReserve)?1:0;
*/
//после успешного сохранения отправлям на модерацию
$reqvs[$form_type]['validate_status'] = 1;
unset($_SESSION['sms_accept_code']);
if (!isset($reqvs['is_activate_mob']) || !$reqvs['is_activate_mob'] || $reqvs['is_activate_mob'] == 'f' and !isset($_SESSION['sms_accept_phone']) || !isset($reqvs[$form_type]['phone']) || $_SESSION['sms_accept_phone'] != $reqvs[$form_type]['phone'] || !isset($_SESSION['sms_accept']) || $_SESSION['sms_accept'] !== true) {
$other_error['phone'] = true;
unset($_SESSION['sms_accept_phone'], $_SESSION['sms_accept'], $_SESSION['sms_accept_try']);
}
}
$error_file = array();
if ($form_type == sbr::FT_PHYS && !is_emp($u->role)) {
// сканы документов
$attachedFiles = new attachedfiles($_POST['attachedfiles_session']);
$attachedFiles_files = $attachedFiles->getFiles(array(1, 4));
$err = $account->addAttach2($attachedFiles_files);
// сохраняем файлы
$filesExists = count($attachedFiles->getFiles()) > 0;
$attachedFiles->clearBySession();
if ($err) {
$error_file['err_attach'] = $err;
} elseif (!$filesExists) {
$error_file['err_attach'] = "Необходимо загрузить скан одной или нескольких страниц паспорта.";
}
}
$required_error = sbr_meta::checkRequired($form_type, $rez_type, $reqvs[$form_type], is_emp($u->role));
$start_errors = array_merge($required_error, $error_file, $other_error);
if ($err = sbr_meta::setUserReqv($uid, $rez_type, $form_type, $reqvs[$form_type], $ft_disabled, $is_agree_view, $start_errors)) {
if (isset($err['mob_phone'])) {
$err['phone'] = $err['mob_phone'];
}
示例2: view_finance_popup
/**
* Функция для вывода и обработки редактирования финансов в попап окне
*
*/
public static function view_finance_popup($redirect_url = "")
{
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/account.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/smail.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/attachedfiles.php";
$action = __paramInit('string', NULL, 'action');
$sbr_id = __paramInit('int', 'id');
$account = new account();
$uid = $_SESSION['uid'];
$ok = $account->GetInfo($uid, true);
$reqvs = sbr_meta::getUserReqvs($uid);
$sbr = sbr_meta::getInstance();
$form_type = $reqvs['form_type'];
$rez_type = __paramInit('int', NULL, 'rez_type');
if ($rt_disabled = $sbr->checkChangeRT()) {
if (!($rez_type = $reqvs['rez_type'])) {
$rez_type = sbr::RT_RU;
}
$reqvs['rez_type'] = $rez_type;
}
if (!isset($rez_type)) {
$rez_type = $reqvs['rez_type'];
}
$reqvs['rez_type'] = $rez_type;
// !!!
if ($action == 'updfin') {
$popup_open = true;
$error = array();
$form_type = __paramInit('int', NULL, 'form_type');
if ($form_type || $rez_type || isset($_POST['ft' . $form_type])) {
if (!$ft_disabled) {
$reqvs['form_type'] = $form_type;
}
$reqvs[$form_type] = $_POST['ft' . $form_type];
//@todo: запрещаем изменять финансы в старой СБР #29196
$error['sbr'] = 'Прекращена поддержка СБР.';
//if ($err = sbr_meta::setUserReqv($uid, $rez_type, $form_type, $reqvs[$form_type], $ft_disabled))
// $error['sbr'] = $err;
}
// обработка загруженных и удаленных файлов
$attachedFiles = new attachedfiles($_POST['attachedfiles_session']);
$attachedFiles_files = $attachedFiles->getFiles(array(1, 4));
$err = $account->addAttach2($attachedFiles_files);
// сохраняем файлы
if ($err) {
$error['all']['err_attach'] = $err;
}
if (!$error) {
if ($stage) {
$stage->setPayoutSys((int) $_POST['credit_sys'], true);
}
//$_SESSION['users.setup.fin_success'] = 1;
if (!hasPermissions('users')) {
$smail = new smail();
$smail->FinanceChanged($login);
}
header_location_exit($redirect_url, 1);
}
$finance_error = $error;
}
$attach = $account->getAllAttach();
$prepared = sbr_meta::prepareFinanceFiles($attach);
$attachDoc = $prepared['attachDoc'];
$attachOther = $prepared['attachOther'];
$attachedFilesDoc = $prepared['attachedFilesDoc'];
$attachedFilesOther = $prepared['attachedFilesOther'];
include $_SERVER['DOCUMENT_ROOT'] . '/sbr/tpl.finance.php';
}