本文整理汇总了PHP中__paramValue函数的典型用法代码示例。如果您正苦于以下问题:PHP __paramValue函数的具体用法?PHP __paramValue怎么用?PHP __paramValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了__paramValue函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addNewSession
/**
* Добавляем сессию.
*
* @param $session
*/
public function addNewSession($session = false)
{
if (!$session) {
$session = $this->createSessionID();
}
array_push($this->session, __paramValue('string', $session));
}
示例2: savewysiwygAction
function savewysiwygAction()
{
$db = front::og("db");
$alias = front::$_req["alias"];
// проверяем права (могут быть разные для разных страниц)
switch ($alias) {
default:
$permission = null;
}
if (!$permission || !hasPermissions($permission)) {
return;
}
$text = front::$_req["form"]["n_text"];
$text = iconv('UTF-8', 'CP1251', $text);
$text = __paramValue('ckedit', $text);
$title = front::$_req["form"]["title"];
$title = iconv('UTF-8', 'CP1251', $title);
$title = __paramValue('string', $title);
$save = array("title" => $title, "n_text" => $text);
if ($alias) {
$aff = $db->update("UPDATE static_pages SET ?s WHERE (alias = ?)", $save, $alias);
if (!$aff) {
$save["alias"] = $alias;
$db->insert("static_pages", $save, false);
}
}
echo json_encode(array("success" => true, "alias" => $alias));
}
示例3: savewysiwygAction
public function savewysiwygAction()
{
$db = front::og('db');
$alias = front::$_req['alias'];
// проверяем права (могут быть разные для разных страниц)
switch ($alias) {
default:
$permission = null;
}
if (!$permission || !hasPermissions($permission)) {
return;
}
$text = front::$_req['form']['n_text'];
$text = iconv('UTF-8', 'CP1251', $text);
$text = __paramValue('ckedit', $text);
$title = front::$_req['form']['title'];
$title = iconv('UTF-8', 'CP1251', $title);
$title = __paramValue('string', $title);
$save = array('title' => $title, 'n_text' => $text);
if ($alias) {
$aff = $db->update('UPDATE static_pages SET ?s WHERE (alias = ?)', $save, $alias);
if (!$aff) {
$save['alias'] = $alias;
$db->insert('static_pages', $save, false);
}
}
echo json_encode(array('success' => true, 'alias' => $alias));
}
示例4: initBlock
/**
* Инициализация блока.
*
* @param string $name @see self::$name
* @param string $link @see self::$name
* @param string $text @see self::$name
*/
public function initBlock($name = null, $link = null, $text = null)
{
$this->name = stripcslashes(__paramValue('string', $name));
$this->link = stripslashes(__paramValue('string', $link));
$this->text = stripcslashes(__paramValue($this->isWysiwyg() ? 'ckeditor' : 'html', $text));
if (!$this->validateLink()) {
$this->_error['link'] = true;
}
}
示例5: listener
/**
* Прослушиваем входящие запросы
* В настоящий момент входящий запрос один.
*
* @param type $request
*/
public function listener($request)
{
if ($request['msisdn'] == '') {
header('HTTP/1.0 400 Bad Request');
exit;
}
$insert = array('msisdn' => __paramValue('string', $request['msisdn']), 'data' => __paramValue('string', $request['data']), 'dlr_status' => sms_gate::STATUS_DELIVERED);
$sms_id = $this->_db->insert('sms_gate_server', $insert, 'id');
echo $sms_id;
// $params = array(
// 'sms_id' => $sms_id,
// 'dlr_status' => $insert['dlr_status']
// );
// $this->report($params, 'dlr');
}
示例6: SendComplain
/**
* Добавляет жалобу на проект.
*
* @param integer $project_id ID проекта
* @param integer $user_id ID пользователя
* @param integer $type тип жалобы
* @param string $msg текст жалобы
* @param string $files имена загруженных скриншотов
*
* @return xajax responce
*/
function SendComplain($project_id, $type, $msg, $files)
{
global $session;
session_start();
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/uploader/uploader.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects_complains.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/userecho.php';
$objResponse = new xajaxResponse();
$project_id = (int) $project_id;
$user_id = get_uid(false);
$type = (int) $type;
$msg = __paramValue('htmltext', $msg);
$error = false;
$project = new projects();
$prj = $project->GetPrj(0, $project_id, 1);
$file_list = array();
if ($files != '') {
$files = uploader::sgetFiles($files);
if (!empty($files)) {
$emp = new users();
$emp->GetUser($emp->GetField($prj['user_id'], $ee, 'login'));
$dir = 'users/' . substr($emp->login, 0, 2) . '/' . $emp->login . '/upload/';
foreach ($files as $file) {
$copy = uploader::remoteCopy($file['id'], 'file_projects', $dir);
$rfiles[] = $copy->name;
$file_list[] = array('name' => $copy->original_name, 'link' => WDCPREFIX . '/' . $copy->path . $copy->name);
}
$files = implode(',', $rfiles);
} else {
$files = '';
}
}
if (!$files) {
$files = '';
}
if (projects::IsHaveComplainType($project_id, $user_id, $type)) {
// Уже жаловался
return $objResponse;
}
$projects_complains = new projects_complains();
$type_name = $projects_complains->GetComplainType($type);
$project_url = getAbsUrl(getFriendlyURL('project', $project_id));
$is_moder = $projects_complains->isComplainTypeModer($type);
if ($is_moder) {
$userEcho = new UserEcho();
$topic_message = $userEcho->constructMessage($project_url, $prj['name'], $msg, $file_list);
$topicUrl = $userEcho->newTopicComplain($type_name, $topic_message, $file_list);
if ($topicUrl) {
messages::sendProjectComplain($user_id, $project_url, $prj['name'], $msg, $topicUrl);
} else {
$error = true;
}
}
if (!$error) {
$error = projects::AddComplain($project_id, $user_id, $type, $msg, $files, $is_moder && $topicUrl);
}
if ($error) {
$objResponse->script("\$('abuse_project_popup').toggleClass('b-shadow_hide');");
if ($is_moder) {
$objResponse->script("\$('abuse-cause-error').removeClass('b-layout__txt_hide'); abuseResetSelection();");
} else {
$objResponse->script("\$\$('.abuse-btn-send').removeClass('b-button_rectangle_color_disable')");
}
} else {
$upl = array('umask' => uploader::umask('prj_abuse'), 'validation' => array('allowedExtensions' => array('jpg', 'gif', 'png', 'jpeg'), 'restrictedExtensions' => array()), 'text' => array('uploadButton' => iconv('cp1251', 'utf8', 'Прикрепить файлы')));
$objResponse->script("\n \$('abuse{$type}').addClass('abuse-checked');\n \$('abuse{$type}').getChildren().each(function(el) { \$(el).addClass('abuse-checked'); });\n ");
$objResponse->script("uploader.create('abuse_uploader', " . json_encode($upl) . ');');
$objResponse->script("\$('prj_abuse_msg').set('value', '')");
$objResponse->script("\$\$('.abuse-btn-send').removeClass('b-button_disabled')");
$objResponse->script("\$('abuse_project_popup').toggleClass('b-shadow_hide');");
$objResponse->script("\$('project_abuse_success').removeClass('b-layout__txt_hide');");
$objResponse->script("\$('form_abuse').hide();");
$objResponse->script("setTimeout(\"\$('project_abuse_success').addClass('b-layout__txt_hide')\", 5000);");
if ($is_moder) {
$objResponse->script("\$('abuse-cause-error').addClass('b-layout__txt_hide');");
}
}
return $objResponse;
}
示例7: actionProcessingPortfolio
/**
* Обработка данных в шаге порфтоило
*
* @return string
*/
public function actionProcessingPortfolio()
{
$error = array();
$type = __paramInit('int', null, 'spec_column_id');
$spec = __paramInit('int', null, 'spec_db_id');
$spec_name = __paramInit('string', null, 'spec');
if ($type == 0) {
$error['spec'] = 'Вы должны выбрать свою специализацию';
} else {
$data['spec_orig'] = professions::GetProfessionOrigin($spec);
}
$data['spec'] = $spec;
$data['exp'] = __paramInit('int', null, 'exp');
$data['cost_hour'] = __paramInit('float', null, 'cost_hour');
$data['cost_type_hour'] = __paramInit('int', null, 'currency_hour_db_id');
$curr_hour_name = __paramInit('string', null, 'currency_hour');
$data['cost_month'] = __paramInit('float', null, 'cost_month');
$data['cost_type_month'] = __paramInit('int', null, 'currency_month_db_id');
$curr_month_name = __paramInit('string', null, 'currency_month');
$data['resume'] = __paramInit('int', null, 'resume_id');
$data['info'] = stripslashes(__paramInit('string', null, 'info', ''));
if (strlen($data['info']) > 4000) {
$error['info'] = 'Исчерпан лимит символов для этого поля (4000 символов)';
}
$data['in_office'] = $_POST['in_office'] == 1 ? 1 : 0;
if ($data['resume'] > 0) {
$resume = new CFile($data['resume']);
}
if ($data['exp'] < 0 || $data['exp'] > step_freelancer::MAX_YEAR_VALUE) {
$error['exp'] = 'Недопустимое значение. Опыт работы должен быть в пределе от 0 до ' . step_freelancer::MAX_YEAR_VALUE . '.';
}
if ($data['cost_hour'] < 0 || $data['cost_hour'] > $this->MAX_COST_HOUR[$data['cost_type_hour']]) {
$error['cost_hour'] = 'Недопустимое значение. Стоимость часа работы должна быть в пределе ' . view_range_cost2(0, $this->MAX_COST_HOUR[$data['cost_type_hour']], '', '', false, $data['cost_type_hour'] . '.');
}
if ($data['cost_month'] < 0 || $data['cost_month'] > $this->MAX_COST_MONTH[$data['cost_type_month']]) {
$error['cost_month'] = 'Недопустимое значение. Стоимость месяца работы должна быть в пределе ' . view_range_cost2(0, $this->MAX_COST_MONTH[$data['cost_type_month']], '', '', false, $data['cost_type_month']) . '.';
}
if (count($error) <= 0) {
$insert['portfolio'] = serialize($data);
$this->parent->saveFieldsInfo($insert);
}
// Обрабатываем порфтолио
if (is_array($_POST['name'])) {
foreach ($_POST['name'] as $k => $value) {
$value = __paramValue('string', stripslashes($value));
$descr = __paramValue('string', stripslashes($_POST['descr'][$k]));
$id = __paramValue('int', $_POST['id'][$k]);
// id работы, если он есть
$link = __paramValue('string', stripslashes($_POST['link'][$k]));
$link = preg_replace("/^http:\\/\\//", "", trim($link));
if ($value == '' && $descr == '' && $link == '' && empty($_POST['pict_id'][$k])) {
continue;
}
if (is_empty_html($value)) {
$error['portf' . $k]['name'] = "Введите название работы";
}
if (strlen($descr) > 1500) {
$error['descr' . $k]['name'] = "Исчерпан лимит символов для этого поля (1500 символов)";
}
if ($link != '' && !url_validate($link)) {
$error['portf' . $k]['link'] = "Поле заполнено некорректно";
}
$portf_insert[] = array("name" => $value, "pict_id" => $_POST['pict_id'][$k] > 0 ? intval($_POST['pict_id'][$k]) : null, "link" => $link, "prof_id" => $spec, "wiz_uid" => $this->getWizardUserID(), "descr" => $descr, "id" => $id);
}
}
if (count($error) <= 0) {
if (count($portf_insert) > 0) {
$ids = $this->createWorks($portf_insert);
}
$this->parent->setCompliteStep(true);
$this->parent->setNextStep($this->parent->getPosition() + 1);
header("Location: /wizard/registration/");
exit;
}
$this->request = $data;
$this->portf_insert = $portf_insert;
return $error;
}
示例8: _admEditCommunityPostSaveForm
/**
* Сохранение поста в сообществах
*
* @param object $objResponse xajaxResponse
* @param string $rec_id идентификатор записи
* @param string $rec_type тип записи
* @param array $aForm массив данных
* @param string $sDrawFunc имя функции для выполнения после сохранения
*/
function _admEditCommunityPostSaveForm(&$objResponse, $rec_id = '', $rec_type = '', $aForm = array(), $sDrawFunc = '')
{
// инициализация
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/commune.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/attachedfiles.php';
$aForm['title'] = antispam(change_q_x($aForm['title'], true, false));
$aForm['title'] = substr($aForm['title'], 0, 256);
$aForm['title'] = $aForm['title'] === false ? '' : $aForm['title'];
$aForm['youtube_link'] = change_q_x($aForm['youtube_link'], false, true, null, false, false);
$aForm['question'] = trim(change_q_x($aForm['question'], true));
$aForm['close_comments'] = isset($aForm['close_comments']) ? $aForm['close_comments'] : 0;
$aForm['is_private'] = isset($aForm['is_private']) ? $aForm['is_private'] : 0;
$aForm['answers'] = is_array($aForm['answers']) ? $aForm['answers'] : array();
$aForm['answers_exists'] = is_array($aForm['answers_exists']) ? $aForm['answers_exists'] : array();
$question = change_q_x_a(antispam(preg_replace('/&/', '&', $aForm['question'])), false, false, '');
$multiple = (bool) $aForm['multiple'];
$answers = array();
$answers_exists = array();
$acount = 0;
$alert = array();
$attachedfiles = new attachedfiles($aForm['attachedfiles_session']);
if (commune::IS_NEW_WYSIWYG) {
$aForm['msgtext'] = __paramValue('ckedit', antispam($aForm['msgtext']));
$aForm['msgtext'] = stripslashes($aForm['msgtext']);
} else {
$aForm['msgtext'] = __paramValue('wysiwyg_tidy', antispam($aForm['msgtext']));
}
if ($aForm['answers'] && is_array($aForm['answers'])) {
foreach ($aForm['answers'] as $key => $answer) {
if (($t = substr_entity(change_q_x_a(antispam(preg_replace('/&/', '&', trim((string) $answer))), false, false, ''), 0, commune::POLL_ANSWER_CHARS_MAX * 2, true)) != '') {
$answers[] = $t;
++$acount;
} else {
unset($aForm['answers'][$key]);
}
}
}
if ($aForm['answers_exists'] && is_array($aForm['answers_exists'])) {
foreach ($aForm['answers_exists'] as $key => $answer) {
if (intval($key) && ($t = substr_entity(change_q_x_a(antispam(preg_replace('/&/', '&', trim((string) $answer))), false, false, ''), 0, commune::POLL_ANSWER_CHARS_MAX * 2, true)) != '') {
$answers_exists[intval($key)] = $t;
++$acount;
}
}
}
if (strlen_real($question) > commune::POLL_QUESTION_CHARS_MAX) {
$len = strlen($question);
$rlen = strlen_real($question);
$question = substr($question, 0, $len - ($rlen - commune::POLL_QUESTION_CHARS_MAX));
}
// валидация
if (strlen($_POST['title']) > commune::MSG_TITLE_MAX_LENGTH) {
$alert[1] = 'Количество символов превышает допустимое (' . commune::MSG_TITLE_MAX_LENGTH . ')';
}
if ($aForm['youtube_link'] != '') {
if ($video = video_validate($aForm['youtube_link'])) {
$aForm['youtube_link'] = $video;
} else {
$alert[2] = 'Неверная ссылка';
}
}
if ($acount > 0 && $question == '') {
$alert[3] = 'Введите текст вопроса';
} elseif ($acount > commune::POLL_ANSWERS_MAX && $question != '') {
$alert[3] = 'Вы можете указать максимум ' . commune::POLL_ANSWERS_MAX . ' ответов';
} elseif ($acount < 2 && $question != '') {
$alert[3] = 'Нужно указать минимум 2 варианта ответа';
}
$files_info = $attachedfiles->calcFiles();
if (is_empty_html($aForm['msgtext']) && $question == '' && empty($alert) && !$files_info['count'] && $aForm['youtube_link'] == '') {
$alert[4] = 'Поле заполнено некорректно';
$aForm['msgtext'] = '';
} elseif (strlen($aForm['msgtext']) > commune::MSG_TEXT_MAX_LENGTH) {
$alert[4] = 'Количество символов превышает допустимое';
}
if (!$alert) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/messages.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/user_content.php';
commune::CreateMessage($aForm, $aForm['commune_id'], $_SESSION['uid'], $rec_id, null, $question, $answers, $answers_exists, $multiple);
commune::DeleteMarkedAttach($rec_id);
// прикрепленные файлы
$attachedfiles_files = $attachedfiles->getFiles(array(1, 3, 4));
commune::addAttachedFiles($attachedfiles_files, $rec_id, $aForm['user_login'], false);
$attachedfiles->clear();
// !!!TODO: https://beta.free-lance.ru/mantis/view.php?id=19174
$sReason = _parseReason($aForm['user_id'], $aForm['adm_edit_text']);
messages::communityModifiedNotification($rec_id, $rec_type, $aForm['user_login'], $aForm['user_uname'], $aForm['user_usurname'], $sReason);
$content_id = user_content::MODER_COMMUNITY;
_admEditAfterAll($objResponse, $content_id, $rec_id, $rec_type, $sDrawFunc, $aForm);
} else {
_setErrors($objResponse, $alert, array(1 => 'title', 2 => 'youtube_link', 3 => 'question', 4 => 'msg'), $sDrawFunc);
//.........这里部分代码省略.........
示例9: curl_setopt
curl_setopt($ch, CURLOPT_USERPWD, BASIC_AUTH);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
ob_start();
$res = curl_exec($ch);
$complete = ob_get_clean();
header('Location: /bill/');
exit;
}
$_SESSION['post_payment'] = $_POST;
$_SESSION['referer'] = $_SERVER['HTTP_REFERER'];
?>
<h2>Тестовая оплата Веб.Кошелек</h2>
<p>
Оплата услуг аккаунт <?php
echo __paramValue('string', $_POST['nickname']);
?>
, сумма оплаты <?php
echo to_money($_POST['amount'], 2);
?>
рублей
</p>
<form method="POST" />
<input type="submit" name="success" value="Оплатить" />
<input type="submit" name="cancel" value="Отмена" />
<input type="hidden" name="u_token_key" value="<?php
echo $_SESSION['rand'];
?>
"/>
</form>
示例10: MsgDelFile
function MsgDelFile($cid, $file_id)
{
session_start();
$cid = __paramValue('int', $cid);
$file_id = __paramValue('int', $file_id);
// if(!isset($_SESSION['uid'])) return;
$objResponse = new xajaxResponse();
if ($result = commune::DeleteAttach($cid, $file_id, true)) {
$uploaded = commune::GetAttach($cid, true);
$mess['user_login'] = $_SESSION['login'];
$page = TPL_COMMUNE_PATH . '/uploaded_files.php';
ob_start();
include $page;
$html = ob_get_contents();
ob_end_clean();
$objResponse->assign('uploaded_list', 'innerHTML', $html);
$objResponse->script('$("files_block").style.display = "block"');
}
// $objResponse->assign('uploaded_list', 'innerHTML', $error);
return $objResponse;
}
示例11: prepareRequest
public function prepareRequest($params)
{
foreach ($params as $name => $value) {
switch ($name) {
case 'portf_text':
$params[$name] = __paramValue('html_save_ul_li_b_p_i', trim($params['portf_text']));
break;
case 'old_portf_text':
$params[$name] = __paramValue('html_save_ul_li_b_p_i', trim($params['old_portf_text']));
break;
case 'prof_cost_type_hour_db_id':
case 'prof_cost_type_db_id':
case 'prof_time_type_db_id':
case 'prof_time_from':
case 'prof_time_to':
case 'on_preview':
$params[$name] = intval($value);
break;
case 'prof_cost_hour':
case 'prof_cost_to':
case 'prof_cost_from':
case 'prof_cost1000':
$params[$name] = intval($value * 100) / 100;
break;
}
}
return $params;
}
示例12: _new_preMsgSql
/**
* Преобработка данных, которые будут использоваться в запросе добавления/редактирования комментария.
*
* @return array
*/
function _new_preMsgSql()
{
$msg = $this->post_msg;
$msg['id'] = intvalPgSql($msg['id']);
$msg['msgtext'] = pg_escape_string(__paramValue('ckeditor', $msg['msgtext']));
//pg_escape_string(change_q_x($msg['msgtext'], false, false, 'b|br|i|p|s|ul|li|h[1-6]')); // !!! вернуть все теги потом.
$msg['yt_link'] = pg_escape_string(change_q_x($msg['yt_link'], true, false));
$msg['parent_id'] = (int) $msg['parent_id'] ? (int) $msg['parent_id'] : 'NULL';
return $msg;
}
示例13: validateContacts
/**
* Проверяем контакты введенные пользователем.
*
* @param type $post_contacts
* @param type $contacts
*
* @return string
*/
public static function validateContacts($post_contacts, &$contacts)
{
$error = array();
foreach ($post_contacts as $name => $value) {
if (!isset($contacts[$name])) {
continue;
}
switch ($name) {
case 'phone':
// if (!preg_match('/^[+]*?[0-9\\s]{9,17}$/', $value) && trim($value) != '') {
// $error["contact_{$name}"] = 'Поле заполнено некорректно';
// }
break;
case 'site':
if (!url_validate(ltrim(ltrim($value, 'http://'), 'https://')) && trim($value) != '') {
$error["contact_{$name}"] = 'Поле заполнено некорректно';
}
if (strpos($value, 'htt') === false && trim($value) != '') {
$value = 'http://' . $value;
}
break;
case 'email':
if (!is_email($value) && trim($value) != '') {
$error["contact_{$name}"] = 'Поле заполнено некорректно';
}
break;
}
$contacts[$name]['value'] = __paramValue('htmltext', stripslashes($value));
}
return $error;
}
示例14: initPost
/**
* Обработка входящих данных на запись рассылки
*
* @param array $post Входящие данные $_POST
* @return array Обработканные данные для записи array(name=>value) где name - имя поля в таблице value - значение поля
*/
public function initPost($post)
{
$insert = array();
if ($post['attachedfiles_session']) {
$attachedfiles = new attachedfiles($post['attachedfiles_session']);
$attachedfiles_files = $attachedfiles->getFiles(array(1, 3, 4));
if (count($attachedfiles_files) > 0) {
$insert['is_attached'] = true;
$_POST['attachedfiles_files'] = $attachedfiles_files;
} else {
$insert['is_attached'] = false;
}
}
$insert['in_draft'] = (int) $post['in_draft'] == 0 ? 'false' : 'true';
if (isset($post['status_sending'])) {
$insert['status_sending'] = (int) $post['status_sending'];
}
if (isset($post['status_message'])) {
$insert['status_message'] = (int) $post['status_message'];
}
if (!is_empty_html($post['subject'])) {
$insert['subject'] = __paramValue('string', addslashes($post['subject']));
} else {
$insert['subject'] = 'Рассылка Free-lance.ru';
//$this->error['subject'] = 'Введите заголовок письма';
}
if (!is_empty_html($post['message'])) {
//$insert['message'] = addslashes(__paramValue('ckedit', stripslashes($post['message']) ));
$insert['message'] = $post['message'];
} else {
$this->error['message'] = 'Введите текст письма';
}
if ($post['type_sending']) {
$post['type_sending'] = array_map('intval', $post['type_sending']);
$insert['type_sending'] = (string) implode("", array((int) $post['type_sending'][0], (int) $post['type_sending'][1]));
}
if ($post['type_regular']) {
$insert['type_regular'] = __paramValue('int', $post['type_regular']);
}
if ($post['type_send_regular']) {
$insert['type_send_regular'] = __paramValue('int', $post['type_send_regular']);
}
if (!is_empty_html($post['time_sending'])) {
$time = __paramValue('string', $post['time_sending']) . ":00";
if (is_empty_html($post['date_sending'])) {
$insert['date_sending'] = date('Y-m-d ' . $time);
}
} elseif ($insert['type_regular'] == 2) {
$this->error['time_sending'] = 'Введите время отправки рассылки';
}
if (!is_empty_html($post['date_sending'])) {
$time = "00:00";
if (!is_empty_html($post['time_sending'])) {
$time = __paramValue('string', $post['time_sending']) . ":00";
}
$insert['date_sending'] = date('Y-m-d ' . $time, strtotime($post['date_sending']));
} elseif ($insert['type_regular'] != 2) {
$this->error['date_sending'] = 'Введите дату отправки рассылки';
}
// Обработка фильтра Работодателя
if ($post['filter_emp']) {
// Записываем фильтр
$insert['filter_emp'] = $this->initPostEmpFilter($post);
}
if ($post['filter_frl']) {
// Записываем фильтр
$insert['filter_frl'] = $this->initPostFrlFilter($post);
}
if ($post['filter_file']) {
$insert['filter_file'] = true;
} else {
$insert['filter_file'] = '';
}
$insert['user_id'] = get_uid();
//$insert['count_recipients'] = 0;
return $insert;
}
示例15: define
<?php
define('NO_CSRF', true);
$post = $_POST;
$get = $_GET;
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/stdf.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/pskb.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/log.php";
$src = __paramValue('int', $get['res']);
$state = __paramValue('int', $post['state']);
$lc_id = __paramValue('int', $post['account']);
$log_data = array('GET' => $get, 'POST' => $post);
if (!pskb::validateCardRequest($post)) {
$src = 2;
$state = -999;
$log_data['err'] = array('src' => $src, 'state' => $state);
}
$log = new log("pskb_cards/income-" . SERVER . '-%d%m%Y.log', 'a', '%d.%m.%Y %H:%M:%S : ' . $_SERVER['REMOTE_ADDR'] . ' : ');
$log->writevar($log_data);
$pskb = new pskb();
$_lc = $pskb->getLCbyLCId($lc_id);
$err_msg = "Неизвестная ошибка";
if ($src == 2) {
if ($state && in_array($state, array_keys(pskb::$card_messages))) {
$err_msg = pskb::$card_messages[$state];
}
if (!in_array($state, array(2, -999))) {
$pskb->upLC(array('state' => 'err', 'stateReason' => $err_msg), $_lc['lc_id']);
}
}
if ($src === 1 && defined('PSKB_TEST_MODE')) {