public function run() { $user = $this->order[$this->is_emp ? 'freelancer' : 'employer']; //получаем общее кол-во отзывов $oplinks = NULL; $opcount = opinions::GetCounts($user['uid'], array('total')); if (array_sum($opcount['total']) > 0) { $oplinks = array('p' => getSortOpinionLinkEx('frl', "total", 1, $user['login'], zin($opcount['total']['p']), null, 0), 'n' => getSortOpinionLinkEx('frl', "total", 2, $user['login'], zin($opcount['total']['n']), null, 0), 'm' => getSortOpinionLinkEx('frl', "total", 3, $user['login'], zin($opcount['total']['m']), null, 0)); } //город юзера $city_id = $this->order['is_meet'] == 't' && $this->order['city'] > 0 ? $this->order['city'] : $user['city']; $user['place_title'] = ''; if ($city_id > 0) { $user['place_title'] = city::getCountryName($city_id) . ', ' . city::getCityName($city_id); } //собираем шаблон $this->render('t-service-order-user-profile', array('user' => $user, 'oplinks' => $oplinks)); }
/** * Проверка данных из формы. */ function tu_validation(&$tservice, $is_exist_feedbacks = 0) { require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/tservices/tservices_categories.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/tservices/validation.php'; $errors = array(); $validator = new validation(); $tservices_categories = new tservices_categories(); //--- //$tservice->title = trim(htmlspecialchars(InPost('title'),ENT_QUOTES,'cp1251')); //$tservice->title = antispam(__paramInit('string', NULL, 'name', NULL, 60, TRUE)); $tservice->title = sentence_case(__paramInit('html', null, 'title', null, 100, true)); $title = trim(stripslashes(InPost('title'))); if (!$validator->required($title)) { $errors['title'] = validation::VALIDATION_MSG_REQUIRED; } elseif (!$validator->symbols_interval($title, 4, 100)) { $errors['title'] = sprintf(validation::VALIDATION_MSG_SYMBOLS_INTERVAL, 4, 100); } //--- $tservice->price = intval(trim(InPost('price'))); if (!$validator->is_natural_no_zero($tservice->price)) { $errors['price'] = validation::VALIDATION_MSG_REQUIRED_PRICE; } elseif (!$validator->greater_than_equal_to($tservice->price, 300)) { $errors['price'] = sprintf(validation::VALIDATION_MSG_PRICE_GREATER_THAN_EQUAL_TO, '300 р.'); } elseif (!$validator->less_than_equal_to($tservice->price, 999999)) { $errors['price'] = sprintf(validation::VALIDATION_MSG_PRICE_LESS_THAN_EQUAL_TO, '999 999 р.'); } //--- $days_db_id = intval(trim(InPost('days_db_id'))); if (!$validator->is_natural_no_zero($days_db_id) || !in_array($days_db_id, array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 21, 30, 45, 60, 90))) { $errors['days'] = validation::VALIDATION_MSG_FROM_LIST; $days_db_id = 1; } $tservice->days = $days_db_id; //--- //Если есть отзывы то не даем изменить категорию if (!(InPost('action') == 'save' && $is_exist_feedbacks > 0)) { $category_id = intval(trim(InPost('category_db_id'))); $parent_category_id = $tservices_categories->getCategoryParentId($category_id); if ($parent_category_id === false) { $errors['category'] = validation::VALIDATION_MSG_CATEGORY_FROM_LIST; } else { $tservice->category_id = $category_id; //$this->property()->parent_category_id = $parent_category_id; } } //--- $str_tags = trim(preg_replace('/\\s+/s', ' ', strip_tags(InPost('tags')))); $tags = strlen($str_tags) > 0 ? array_unique(array_map('trim', explode(',', $str_tags))) : array(); $tags = array_filter($tags, function ($el) { $len = strlen(stripslashes($el)); return $len < 80 && $len > 2; }); $tags_cnt = count(array_unique(array_map('strtolower', $tags))); $tags = array_map(function ($value) { return htmlspecialchars($value, ENT_QUOTES, 'cp1251'); }, $tags); $tservice->tags = $tags; if (!$validator->required($str_tags)) { $errors['tags'] = validation::VALIDATION_MSG_REQUIRED; } elseif ($tags_cnt > 10) { $errors['tags'] = sprintf(validation::VALIDATION_MSG_MAX_TAGS, 10); } //--- $videos = __paramInit('array', null, 'videos', array()); $videos = is_array($videos) ? array_values($videos) : array(); if (count($videos)) { $tservice->videos = null; foreach ($videos as $key => $video) { if ($validator->required($video)) { $_video_data = array('url' => $video, 'video' => false, 'image' => false); //$_video = $validator->video_validate($video); $_video = $validator->video_validate($video); $is_error = true; if ($_video) { $_video_data['url'] = $_video; if ($_video_meta = $validator->video_validate_with_thumbs($_video, 0)) { $_video_data = array_merge($_video_data, $_video_meta); $is_error = false; } } if ($is_error) { $errors['videos'][$key] = validation::VALIDATION_MSG_BAD_LINK; } $tservice->videos[$key] = $_video_data; } } } //--- //$tservice->description = trim(htmlspecialchars(InPost('description'),ENT_QUOTES, "cp1251")); //$description = trim(InPost('description')); $tservice->description = trim(__paramInit('html', null, 'description', null, 5000, true)); $description = trim(stripslashes(InPost('description'))); if (!$validator->required($description)) { $errors['description'] = validation::VALIDATION_MSG_REQUIRED; } elseif (!$validator->symbols_interval($description, 4, 5000)) { $errors['description'] = sprintf(validation::VALIDATION_MSG_SYMBOLS_INTERVAL, 4, 5000); } //--- //$tservice->requirement = trim(htmlspecialchars(InPost('requirement'),ENT_QUOTES, "cp1251")); //$requirement = trim(InPost('requirement')); $tservice->requirement = trim(__paramInit('html', null, 'requirement', null, 5000, true)); $requirement = trim(stripslashes(InPost('requirement'))); if (!$validator->required($requirement)) { $errors['requirement'] = validation::VALIDATION_MSG_REQUIRED; } elseif (!$validator->symbols_interval($requirement, 4, 5000)) { $errors['requirement'] = sprintf(validation::VALIDATION_MSG_SYMBOLS_INTERVAL, 4, 5000); } //--- $extra = __paramInit('array', null, 'extra', array()); $extra = is_array($extra) ? array_values($extra) : array(); $total_extra_price = 0; if (count($extra)) { $key = 0; $tservice->extra = null; foreach ($extra as $el) { if (isset($el['title'], $el['price'], $el['days_db_id'])) { $el['title'] = stripslashes($el['title']); $title = trim(htmlspecialchars($el['title'], ENT_QUOTES, 'cp1251')); $title_native = trim($el['title']); $price = trim($el['price']); if (!$validator->required($title_native) && !$validator->required($price)) { continue; } $is_title = $validator->min_length($title_native, 4) && $validator->max_length($title_native, 255); $is_price = $validator->is_integer_no_zero($price) && $validator->numeric_interval($price, -999999, 999999); if (!$is_price) { $errors['extra'][$key]['price'] = validation::VALIDATION_MSG_REQUIRED_PRICE; } if (!$is_title) { $errors['extra'][$key]['title'] = sprintf(validation::VALIDATION_MSG_SYMBOLS_INTERVAL, 4, 255); } $days = trim($el['days_db_id']); $is_days = $validator->is_natural($days) && $validator->less_than_equal_to($days, 5); if (!$is_days) { $errors['extra'][$key]['days'] = sprintf(validation::VALIDATION_MSG_INTERVAL, '0', '5 дней'); $days = 1; } $price = intval($price); $days = intval($days); $tservice->extra[$key] = array('title' => $title, 'price' => $price, 'days' => $days); ++$key; if ($price < 0) { $total_extra_price += $price; } } } } //--- $tservice->is_express = 'f'; $tservice->express_price = 0; $tservice->express_days = 1; if (InPost('express_activate') == 1 && $tservice->days > 1) { $express = InPost('express'); $price = trim($express['price']); if (!$validator->is_natural_no_zero($price) || !$validator->less_than_equal_to($price, 999999)) { $errors['express']['price'] = validation::VALIDATION_MSG_REQUIRED_PRICE; } $days_db_id = intval(trim($express['days_db_id'])); if (!$validator->is_natural_no_zero($days_db_id) || !in_array($days_db_id, array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 21, 30, 45, 60, 90))) { $errors['express']['days'] = validation::VALIDATION_MSG_FROM_LIST; $days_db_id = 1; } $tservice->is_express = 't'; $tservice->express_price = intval($price); $tservice->express_days = $days_db_id; } //--- //Проверка общей суммы с учетом скидок, опций (срочность не учитываю так как она выбирается по желанию) if (!isset($errors['price']) && !$validator->greater_than_equal_to($tservice->price + $total_extra_price, 300)) { $errors['price'] = sprintf(validation::VALIDATION_MSG_PRICE_MIN_TOTAL, '300 р.'); } //--- //TODO: Есть проблема с контроллом выпадающего списка // он не отрабатывает новое значение укзанное по умолчанию if (!in_array(intval(InPost('distance')), array(1, 2))) { $errors['distance'] = validation::VALIDATION_MSG_FROM_RADIO; } elseif (intval(InPost('distance')) == 2) { $city_db_id = intval(InPost('city_db_id')); $city = new city(); if ($city_db_id <= 0 || !$city->getCityName($city_db_id)) { $errors['distance'] = validation::VALIDATION_MSG_CITY_FROM_LIST; } else { $tservice->city = intval(InPost('city_db_id')); $tservice->is_meet = 't'; } } else { $tservice->is_meet = 'f'; } //--- $tservice->agree = InPost('agree') == 1 ? 't' : 'f'; if ($tservice->agree === 'f') { $errors['agree'] = validation::VALIDATION_MSG_ONE_REQUIRED; } //--- if (in_array(InPost('active'), array(0, 1))) { $tservice->active = intval(InPost('active')) == 1 ? 't' : 'f'; if ($tservice->is_angry) { $tservice->active = 't'; } } //--- //Вырезаем слеши если ошибка if (count($errors) > 0) { $attrs = array('title', 'description', 'requirement', 'tags'); foreach ($attrs as $attr) { if (is_array($tservice->{$attr})) { foreach ($tservice->{$attr} as &$value) { $value = stripslashes($value); } } else { $tservice->{$attr} = stripslashes($tservice->{$attr}); } } } return $errors; }
echo $bill->user['email']; ?> "> </div> </div> </td> </tr> <tr class="b-layout__tr"> <td class="b-layout__td b-layout__td_padbot_20"> <div class="b-layout__txt b-layout__txt_fontsize_15 b-layout__txt_padtop_3">Город</div> </td> <td class="b-layout__td b-layout__td_padbot_20 b-layout__td_padleft_10"> <div class="b-combo"> <div class="b-combo__input b-combo__input_width_280"> <input class="b-combo__input-text" name="City" id="City" type="text" size="80" value="<?php echo $bill->user['city'] ? city::getCityName($bill->user['city']) : ""; ?> "> </div> </div> </td> </tr> <tr class="b-layout__tr"> <td class="b-layout__td b-layout__td_padbot_20"> <div class="b-layout__txt b-layout__txt_fontsize_15 b-layout__txt_padtop_3">Адрес</div> </td> <td class="b-layout__td b-layout__td_padbot_20 b-layout__td_padleft_10"> <div class="b-combo"> <div class="b-combo__input b-combo__input_width_280"> <input class="b-combo__input-text" name="Address" id="Address" type="text" size="80" value=""> </div>
/** * Возвращает название текущего населённого пункта. * * @return mixed */ public function getCityTitle() { if (is_null($this->_city)) { $this->_city = ''; if ($this->filter->city) { $cityModel = new city(); $this->_city = $cityModel->GetCountryName($this->filter->city) . ': ' . $cityModel->getCityName($this->filter->city); } } return $this->_city; }
$data['perplus_feedbacks'] = $plus > 0 ? round($plus * 100 / $total) : 0; } $feedbacks = $tservices->setPage(feedbacks_per_page)->getFeedbacks($data['id']); $is_feedbacks_paginator = $data['total_feedbacks'] > count($feedbacks); //------------------------------------------------------------------------------ //SEO SeoTags::getInstance()->initTServicesCard($data, $user_obj); $page_title = SeoTags::getInstance()->getTitle(); $page_descr = SeoTags::getInstance()->getDescription(); $page_keyw = SeoTags::getInstance()->getKeywords(); $canonical_url = $GLOBALS['host'] . tservices_helper::card_link($data['id'], $data['title']); //------------------------------------------------------------------------------ //Получение текстового наименования города возможной встречи if ($data['is_meet'] === 't') { $city = new city(); $data['location'] = 'г. ' . $city->getCityName($data['city']); } //------------------------------------------------------------------------------ //Виджет попап окошка при заказе услуги //непоказываем фрилансерам $tserviceOrderPopup = NULL; $is_frl = !is_emp() && get_uid(false); if (!$is_frl) { require_once $_SERVER['DOCUMENT_ROOT'] . '/tu/widgets/TServiceOrderPopup.php'; $tserviceOrderPopup = new TServiceOrderPopup(); $tserviceOrderPopup->init(array('title' => $data['title'], 'frl_fullname' => "{$user_obj->uname} {$user_obj->usurname} [{$user_obj->login}]", 'price' => $data['price'], 'days' => $data['days'], 'category_id' => $data['category_id'])); } //------------------------------------------------------------------------------ if (!$is_owner) { //Популярные услуги из этой же категории или пользователя если данная услуга закреплена require_once $_SERVER['DOCUMENT_ROOT'] . '/tu/widgets/TServicesPopular.php';
/** * Инициализируем тип оплаты на странице. * * @todo: более данный механизм не используется, хотя можно было на его базе попробовать использовать ЯДКассу * * @param string $type_payment Название тип оплаты (передается в $_GET['type']) */ public function setPaymentMethod($type_payment) { require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/exrates.php'; switch ($type_payment) { case 'sber_print': $this->payment_template = 'bank/tpl.bank_fiz_print.php'; $this->type_menu_block = 'bank'; $this->payment_type = exrates::BANK; break; case 'sber': require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/bank_payments.php'; $this->payment_template = 'bank/tpl.bank_fiz.php'; $this->type_menu_block = 'bank'; $this->payment_type = exrates::BANK; $this->pm = new bank_payments(); $this->pm->bank_code = __paramInit('int', null, 'bc', bank_payments::BC_SB); $this->pm->sum = __paramInit('float', null, 'Sum'); $bp_reqv = bank_payments::GetLastReqv($this->pm->bank_code, $this->user['uid']); $this->pm->fio = $bp_reqv['fio']; $this->pm->address = $bp_reqv['address']; if (!$this->pm->bill_num) { $this->pm->bill_num = bank_payments::GenBillNum($this->pm->bank_code, $this->user['uid'], $this->acc['id']); } if (isset($_POST['action']) && $_POST['action'] == 'payment') { $this->pm->fio = substr(__paramInit('string', null, 'fio'), 0, 128); $this->pm->is_gift = false; $this->pm->address = substr(__paramInit('string', null, 'address'), 0, 255); $this->pm->bank_code = __paramInit('int', null, 'bc'); $this->pm->sum = __paramInit('float', null, 'sum'); setlocale(LC_ALL, 'en_US.UTF-8'); // гребанная бета! (это не мое) $this->pm->fm_sum = $bp->sum / EXCH_TR; $id = __paramInit('int', null, 'id'); if ($this->pm->sum < 10) { $alert['sum'] = 'Минимальная сумма платежа 10 рублей'; } if (!$this->pm->fio) { $alert['fio'] = 'Поле заполнено некорректно.'; } if (!$this->pm->address) { $alert['address'] = 'Поле заполнено некорректно.'; } if (!$alert) { if ($id) { $this->pm->bank_code = null; $this->pm->Update($id, " AND user_id = {$this->user['uid']} AND accepted_time IS NULL"); } else { $this->pm->bill_num = bank_payments::GenBillNum($this->pm->bank_code, $this->user['uid'], $this->acc['id']); $this->pm->user_id = $this->user['uid']; $this->pm->op_code = 12; $id = $this->pm->Add($error, true); } if (!$error) { $prepare = $this->preparePayments($this->getTotalAmmountOrders()); if ($prepare) { header("Location: /bill/payment/print/?type=sber_print&id={$id}"); exit; } } } $this->error = $alert; } $this->bank = bank_payments::GetBank($bp->bank_code); break; case 'bank_print': require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/reqv.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/reqv_ordered.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/country.php'; if ($_GET['order'] > 0) { $this->payment_template = 'bank/tpl.bank_jur_transfer.php'; $this->tid = intval($_GET['order']); } else { $this->payment_template = 'bank/tpl.bank_jur_print.php'; } $this->type_menu_block = 'bank'; $this->payment_type = exrates::BANK; $this->bank_sum = $_SESSION['sum_bank_print']; $this->bank_id = $_SESSION['id_bank_print']; unset($_SESSION['sum_bank_print'], $_SESSION['id_bank_print']); break; case 'bank': require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/reqv.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/reqv_ordered.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/country.php'; $this->payment_template = 'bank/tpl.bank_jur.php'; $this->type_menu_block = 'bank'; $this->payment_type = exrates::BANK; $this->pm = new reqv(); $reqvByUid = $this->pm->GetByUid($this->user['uid']); $reqvs_ord = new reqv_ordered(); $this->pm->billNum = sizeof($reqvs_ord->GetByUid($this->user['uid'])); $this->pm->BindRequest($reqvByUid[0]); if (isset($_POST['action']) && $_POST['action'] == 'payment') { $_POST['country'] = country::getCountryName($_POST['country_db_id']); $_POST['city'] = city::getCityName($_POST['city_db_id']); $this->pm->BindRequest($_POST); $this->error = $this->pm->CheckInput(); if ($_POST['sum'] < 10) { $this->error['sum'] = 'Минимальная сумма платежа 10 рублей'; } if (!$this->error) { $this->pm->user_id = $this->user['uid']; if ($reqvByUid[0]['id'] > 0) { $id = $reqvByUid[0]['id']; $this->pm->Update($id, " AND user_id= {$this->user['uid']}"); } else { $id = $this->pm->Add($err, true); } $prepare = $this->preparePayments($this->getTotalAmmountOrders()); if ($prepare) { $_SESSION['id_bank_print'] = $id; $_SESSION['sum_bank_print'] = intval($_POST['sum']); header('Location: /bill/payment/print/?type=bank_print'); exit; } } } break; case 'alphabank': $this->payment_template = 'bank/tpl.alphabank.php'; $this->type_menu_block = 'bank'; $this->payment_type = exrates::BANK; if (isset($_POST['action']) && $_POST['action'] == 'reserve') { header('Location: /bill/'); exit; } break; case 'card': require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/settings.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/card_account.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/cardpay.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/sbr_meta.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/onlinedengi_cards.php'; $this->payment_template = 'card/tpl.card.php'; $this->type_menu_block = 'card'; $this->payment_type = exrates::CARD; $this->card_merchant = settings::GetVariable('billing', 'card_merchant'); if ($this->card_merchant) { $card_account = new card_account(); $card_account->account_id = $this->acc['id']; $this->pm = new onlinedengi_cards(); if (!$this->not_init_pm) { $this->pm->order_id = $card_account->Add(); } } else { $this->pm = new card_account(); $this->pm->account_id = $this->acc['id']; if (!$this->not_init_pm) { $this->pm->order_id = $this->pm->Add(); } $this->pm->reqv = sbr_meta::getUserReqvs($this->user['uid']); } break; case 'qiwi': $this->payment_template = 'terminal/tpl.qiwi.php'; case 'svyasnoy': $this->payment_template = $this->payment_template ? $this->payment_template : 'terminal/tpl.svyasnoy.php'; case 'euroset': $this->payment_template = $this->payment_template ? $this->payment_template : 'terminal/tpl.euroset.php'; $this->type_menu_block = 'terminal'; $this->payment_type = exrates::OSMP; if ($_POST['action'] == 'osmp') { $prepare = $this->preparePayments($this->getTotalAmmountOrders()); if (!$this->test && $prepare !== false) { header('Location: /bill/'); exit; } } else { $this->error = 'Ошибка создания списка оплаты'; } break; case 'megafon_mobile': $this->payment_template = 'mobile/tpl.m_megafon.php'; case 'beeline_mobile': $this->payment_template = $this->payment_template ? $this->payment_template : 'mobile/tpl.m_beeline.php'; case 'mts_mobile': $this->payment_template = $this->payment_template ? $this->payment_template : 'mobile/tpl.m_mts.php'; case 'matrix_mobile': $this->payment_template = $this->payment_template ? $this->payment_template : 'mobile/tpl.m_matrix.php'; $this->type_menu_block = 'mobilesys'; $this->payment_type = exrates::MOBILE; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/qiwipay.php'; $this->pm = new qiwipay($this->user['uid']); if ($_POST['operator'] == 'megafon' || $_POST['operator'] == 'beeline' || $_POST['operator'] == 'mts' || $_POST['operator'] == 'matrix') { $phone = __paramValue('string', $_POST['phone']); $phone = str_replace(array('+7', '+77'), '', $phone); $err = 0; switch ($_POST['operator']) { case 'megafon': if (!(strpos($phone, '34') === 0 || strpos($phone, '62') === 0 || strpos($phone, '82') === 0 || strpos($phone, '92') === 0 || strpos($phone, '35') === 0 || strpos($phone, '63') === 0 || strpos($phone, '83') === 0 || strpos($phone, '93') === 0 || strpos($phone, '69') === 0 || strpos($phone, '99') === 0)) { $this->error['phone'] = 'Проверьте, верно ли выбран оператор. Указанный номер не относится в сети Мегафон'; $err = 1; } break; case 'beeline': if (!(strpos($phone, '90') === 0 || strpos($phone, '96') === 0)) { $this->error['phone'] = 'Проверьте, верно ли выбран оператор. Указанный номер не относится в сети Beeline'; $err = 1; } break; case 'mts': if (!(strpos($phone, '91') === 0 || strpos($phone, '98') === 0)) { $this->error['phone'] = 'Проверьте, верно ли выбран оператор. Указанный номер не относится в сети МТС'; $err = 1; } break; case 'matrix': if (!(strpos($phone, '958') === 0)) { $this->error['phone'] = 'Проверьте, верно ли выбран оператор. Указанный номер не относится в сети Matrix'; $err = 1; } break; } if (!$err) { $sum = __paramValue('float', $_POST['sum']); $request = array('phone' => $phone, 'sum' => $sum, 'oper_code' => $_POST['operator']); $created = $this->pm->createBill($request); if (!$created) { $prepare = $this->preparePayments($this->getTotalAmmountOrders()); if (!$this->test && $prepare !== false) { header('Location: /bill/'); exit; } } else { $this->error = $created; } } } break; case 'webpay': $this->type_menu_block = 'psys'; $this->payment_type = exrates::WEBM; $this->payment_template = 'psys/tpl.webpay.php'; break; case 'qiwipurse': require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/qiwipay.php'; $this->pm = new qiwipay($this->user['uid']); $this->type_menu_block = 'psys'; $this->payment_type = exrates::QIWIPURSE; $this->payment_template = 'psys/tpl.qiwipurse.php'; if ($_POST['action'] == 'qiwipurse') { $phone = __paramValue('string', $_POST['phone']); $phone = str_replace(array('+7', '+77'), '', $phone); $sum = __paramValue('float', $_POST['sum']); $request = array('phone' => $phone, 'sum' => $sum); $created = $this->pm->createBill($request); if (!$created) { $prepare = $this->preparePayments($this->getTotalAmmountOrders()); if (!$this->test && $prepare !== false) { header('Location: /bill/'); exit; } } else { $this->error = $created; } } break; case 'yandex': $this->type_menu_block = 'psys'; $this->payment_type = exrates::YM; $this->payment_template = 'psys/tpl.yandex.php'; break; case 'webmoney': $this->type_menu_block = 'psys'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/pmpay.php'; $this->payment_type = exrates::WMR; $this->payment_template = 'psys/tpl.webmoney.php'; $this->pm = new pmpay(); break; case 'okpay': $this->type_menu_block = 'psys'; $this->payment_type = exrates::OKPAY; $this->payment_template = 'psys/tpl.okpay.php'; break; } $this->type_payment = $type_payment; }
$uploader_field_element = array(); if (count($tservice->images)) { foreach ($tservice->images as $key => $image) { $uploader_field_element[] = array('hash' => md5($solt . $image['id'] . $tuid . $uid), 'qquuid' => $image['id'], 'src' => WDCPREFIX . '/' . $image['path'] . $image['fname']); } } $sess = __paramInit('string', NULL, 'uploader_sess', NULL); if ($sess) { $files = uploader::sgetFiles($sess); if (count($files)) { foreach ($files as $file) { if (strpos($file['fname'], 'tiny_') === FALSE) { continue; } $uploader_field_element[] = array('qquuid' => $file['id'], 'src' => WDCPREFIX . '/' . $file['path'] . $file['fname']); } } } else { $sess = uploader::createResource('tservices'); } //------------------------------------------------------------------------------ $city = new city(); if (!$tservice->city) { $tservice->city = $user_obj->city > 0 ? $user_obj->city : 1; } $location_value = $city->getCountryName($tservice->city) . ": " . $city->getCityName($tservice->city); //------------------------------------------------------------------------------ $user_phone_tservice = user_phone::getInstance()->render(user_phone::PLACE_TSERVICE); $is_bg = true; $inner = 'tpl.form.php'; include "../template3.php";
// Плюс должны быть включены заранее все xajax функции, которые тут используются. if (!$uid || is_emp()) { if ($filter_page != 0) { return 0; } } require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/country.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/city.php"; $has_hidd = TRUE; $filter_categories = professions::GetAllGroupsLite(TRUE); //$filter_countries = country::GetCountries(); //if ($filter['country']) {$filter_cities = city::GetCities($filter['country']);} if ($filter['city']) { $location_selector = "drop_down_default_{$filter['city']} multi_drop_down_default_column_1"; $location_value = city::GetCountryName($filter['city']) . ": " . city::getCityName($filter['city']); } elseif ($filter['country']) { $location_selector = "drop_down_default_{$filter['country']} multi_drop_down_default_column_0"; $location_value = country::getCountryName($filter['country']) . ": Все города"; } if (!$_SESSION['ph'] && !$_SESSION['top_payed']) { $has_hidd = false; // скрываем блок если нечего скрывать } if (!$filter) { $filter = array('user_id' => $uid, 'cost_from' => '', 'cost_to' => '', 'currency' => 2, 'wo_cost' => 't', 'country' => 0, 'city' => 0, 'keywords' => '', 'categories' => array()); } if ($filter_params && is_array($filter_params)) { $filter_inputs = ''; $filter_query = ''; foreach ($filter_params as $pn => $pv) {