本文整理汇总了PHP中__paramInit函数的典型用法代码示例。如果您正苦于以下问题:PHP __paramInit函数的具体用法?PHP __paramInit怎么用?PHP __paramInit使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了__paramInit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processRequest
public function processRequest()
{
$action = __paramInit('string', '', 'action');
switch ($action) {
case 'setpro':
$this->setProMonth();
break;
case 'setproWeek':
$this->setProWeek();
break;
case 'setAnswers':
$this->setAnswers();
break;
case 'setfp':
$this->setCatalogOrFpPlace();
break;
case 'setrb':
$this->setCatalogOrMainPageRoundabout();
break;
case 'set_upfp':
$this->setUpActionInCatalogOrFpPlace();
break;
case 'setim':
$this->setIMakeValues();
break;
default:
if ($this->session_fail) {
$this->jsonError("Вероятно, вы перелогинились на сайте в другой вкладке этого браузера.\nОбновите страницу");
}
}
}
示例2: saveRedirect
public static function saveRedirect()
{
$emp_redirect = __paramInit('link', 'emp_redirect');
if ($emp_redirect) {
$_SESSION['opauth_emp_redirect'] = $emp_redirect;
}
}
示例3: setValue
public function setValue($value)
{
$db_id_idx = $this->getName() . '_db_id';
$this->_db_id = __paramInit('int', $db_id_idx, $db_id_idx, 0);
$columns_id_idx = 'el-' . $this->getName() . '_columns';
$this->_columns = __paramInit('array_int', $columns_id_idx, $columns_id_idx, $this->_columns);
return parent::setValue($value);
}
示例4: init
public function init()
{
parent::init();
global $js_file;
$js_file['tservices_order_messages'] = 'tservices/tservices_order_messages.js';
$js_file['tservices_order_messages_attached'] = 'attachedfiles.js';
$this->is_scroll = __paramInit('bool', null, 'form-block', false);
}
示例5: YellowLine
function YellowLine($text, $search = FALSE)
{
if ($search === FALSE) {
$search = clearInputText(__paramInit('string', 'search', null, ''));
}
$s = preg_split('/[\\s]+/', $search);
for ($i = 0; $i < count($s); ++$i) {
if ($s[$i]) {
$text = preg_replace('/(' . preg_quote($s[$i]) . ')/i', "<span style='background-color: yellow; margin: 0;'>\$1</span>", $text);
}
}
return $text;
}
示例6: dav_file_upload_createDestName
/**
* @desc Транслитирует отображаемое имя файла ($_POST['filename']) и возвращает его с расширением загружаемого файла
* @param CFile $cfile
* @return string
*/
function dav_file_upload_createDestName($cfile)
{
$uploadFileName = $cfile->name;
$ext = preg_replace("#.*(\\.[0-9a-zA-Z]*)\$#", "\$1", $uploadFileName);
//ext = .*
$filename = __paramInit("string", null, "filename");
$pattern = '#\\' . $ext . '#';
$filename = preg_replace($pattern, '', $filename);
if (strlen($filename) == 0) {
$filename = preg_replace($pattern, '', $uploadFileName);
}
$filename = translit($filename) . $ext;
return $filename;
}
示例7: init
public function init($options = array())
{
if (isset($options['payments_exclude'])) {
foreach ($options['payments_exclude'] as $payment_type) {
unset($this->options['payments'][$payment_type]);
}
}
if (isset($this->options['payments'][self::PAYMENT_TYPE_PLATIPOTOM])) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/platipotom.php';
$platipotom = new platipotom();
$this->options['payments'][self::PAYMENT_TYPE_PLATIPOTOM]['data-maxprice'] = $platipotom->getMaxPrice();
}
$this->options['is_show'] = __paramInit('bool', $options['popup_id'], $options['popup_id'], false);
$this->options = array_merge($this->options, $options);
}
示例8: render
public function render($options = array())
{
$this->options['is_show'] = __paramInit('bool', $options['popup_id'], $options['popup_id'], false);
//@todo: неиспользуется?
$tservices_binds = new tservices_binds($this->options['kind']);
$is_prolong = (bool) $options['date_stop'];
$options['popup_title'] = $is_prolong ? 'Продление закрепления услуги' : 'Закрепление услуги';
$options['popup_subtitle'] = $is_prolong ? 'Срок продления услуги' : 'Срок закрепления услуги';
if ($is_prolong) {
$options['tservices'] = '{' . $options['tservices_cur'] . ':' . $options['tservices_cur_text'] . '}';
$options['disable_tservices'] = true;
}
$this->options = array_merge($this->options, $options);
return Template::render(ABS_PATH . self::TPL_MAIN_PATH . $this->buy_popup_tpl, $this->options);
}
示例9: init
public function init()
{
global $js_file;
$js_file['reserves_payout'] = 'reserves/reserves_payout.js';
$uid = get_uid(false);
$reqvs = ReservesHelper::getInstance()->getUserReqvs($uid);
$form_type = $reqvs['form_type'];
$rez_type = $reqvs['rez_type'];
$reqv = $reqvs[$form_type];
$payments = array(self::PAYMENT_TYPE_CARD => array('title' => 'Пластиковые<br/>карты', 'class' => 'b-button__pm_card', 'num' => @$reqv['el_ccard'], 'wait' => 'Идет выплата суммы.'), self::PAYMENT_TYPE_YA => array('title' => 'Яндекс.Деньги', 'class' => 'b-button__pm_yd', 'num' => @$reqv['el_yd'], 'wait' => 'Идет выплата суммы.'), self::PAYMENT_TYPE_BANK => array('title' => 'Банковский<br/>перевод', 'class' => 'b-button__pm_bank', 'num' => @$reqv['bank_rs'], 'wait' => 'Идет выплата суммы.'), self::PAYMENT_TYPE_RS => array('title' => 'Банковский<br/>перевод', 'class' => 'b-button__pm_bank', 'num' => @$reqv['bank_rs'], 'wait' => 'Идет выплата суммы.'));
$form_list = array(sbr::FT_PHYS => 'физическое лицо', sbr::FT_JURI => 'юридическое лицо');
$this->options['form_txt'] = @$form_list[$form_type];
$this->options['rez_txt'] = sbr::getRezTypeText($rez_type);
$allowed_payments = ReservesHelper::getInstance()->getAllowedPayoutTypes($form_type, $rez_type, $this->price);
$this->options['payments'] = array_intersect_key($payments, $allowed_payments);
$popup_id = self::getPopupId($this->options['idx']);
$this->options['is_show'] = __paramInit('bool', $popup_id, $popup_id, false);
}
示例10: action2
public function action2()
{
global $js_file;
require_once ABS_PATH . "/classes/professions.php";
$category = __paramInit('int', NULL, 'category', NULL);
$subcategory = __paramInit('int', NULL, 'subcategory', NULL);
if ($category > 0 && $subcategory > 0 && professions::isExistProfId($subcategory, $category)) {
$data = array();
$data['kind'] = 1;
//проект!
$data['pro_only'] = true;
$data['verify_only'] = false;
$data['categories'][] = array('category_id' => $category, 'subcategory_id' => $subcategory);
$_SESSION['customer_wizard'] = $data;
$this->redirect('/welcome/customer/3/');
}
$professions = professions::GetProfessionsAndGroup('g.cnt DESC, p.pcount DESC NULLS LAST');
$suffix = isset($_SESSION['pda']) && $_SESSION['pda'] == 1 ? '_pda' : '';
$js_file['ElementsFactory'] = 'form/ElementsFactory.js';
$js_file['ElementVerticalSelect'] = 'form/VerticalSelect.js';
$this->render("step2{$suffix}", array('professions' => $professions, 'default_group' => 2, 'default_spec' => 9));
}
示例11: init
public function init($options = array())
{
$this->options = array_merge($this->options, $options);
if (isset($options['payments_exclude'])) {
foreach ($options['payments_exclude'] as $payment_type) {
unset($this->options['payments'][$payment_type]);
}
}
if (isset($this->options['payments'][self::PAYMENT_TYPE_PLATIPOTOM])) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/platipotom.php';
$platipotom = new platipotom();
$this->options['payments'][self::PAYMENT_TYPE_PLATIPOTOM]['data-maxprice'] = $platipotom->getMaxPrice();
}
if (isset($_SESSION['ref_uri'])) {
$ref_uri = urldecode($_SESSION['ref_uri']);
$query = parse_url($ref_uri, PHP_URL_QUERY);
$toAppend = strpos($query, $this->options['popup_id']) === false;
if ($toAppend) {
$delimitter = $query ? '&' : '?';
$_SESSION['redirect_from_finance'] = urlencode($ref_uri . $delimitter . $this->options['popup_id'] . '=1');
}
}
$this->options['is_show'] = __paramInit('bool', $this->options['popup_id'], $this->options['popup_id'], false);
}
示例12: checkUtm
/**
* Проверяем фиксируем UTM метки.
*
* @return bool
*/
public function checkUtm()
{
$sess_id = session_id();
//После авторизации обновляем UID пользователя
if (!isset($_SESSION['ga_stat_updated']) && isset($_SESSION['uid']) && $_SESSION['uid'] > 0) {
$this->db()->update(self::TABLE, array('user_id' => $_SESSION['uid']), 'user_id IS NULL AND sess_id = ?', $sess_id);
$_SESSION['ga_stat_updated'] = true;
}
if (!isset($_GET['utm_source'], $_GET['utm_medium'], $_GET['utm_campaign'])) {
return false;
}
$utm_source = __paramInit('string', 'utm_source', null, null, 150);
$utm_medium = __paramInit('string', 'utm_medium', null, null, 150);
$utm_campaign = __paramInit('string', 'utm_campaign', null, null, 150);
if (empty($utm_source) && empty($utm_medium) && empty($utm_campaign)) {
return false;
}
//Хеш на ссылку живет 30 минут в течении жизни сессии
$hash = md5($_SERVER['REQUEST_URI'] . date('d.m.Y H') . (date('i') > 30));
//Не фиксируем метки на одинаковые страницы и исключаем накрутку
if (isset($_SESSION['ga_stat_url_hash'][$hash])) {
return false;
}
$_SESSION['ga_stat_url_hash'][$hash] = true;
//Храним максимум до 100 разных хеш-ссылок в сессии и старые выбрасываем
if (count($_SESSION['ga_stat_url_hash']) > 100) {
$_SESSION['ga_stat_url_hash'] = array_slice($_SESSION['ga_stat_url_hash'], -100);
}
//Фиксируем метку
$data = array('utm_source' => $utm_source, 'utm_medium' => $utm_medium, 'utm_campaign' => $utm_campaign, 'ip' => getRemoteIP(), 'url' => parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), 'sess_id' => $sess_id);
if (isset($_SESSION['uid']) && $_SESSION['uid'] > 0) {
$data['user_id'] = $_SESSION['uid'];
}
$ret = $this->db()->insert(self::TABLE, $data);
return $ret;
}
示例13: blogs
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/blogs.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/employer.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/freelancer.php";
$blog = new blogs();
$gr = intval(trim($_GET['gr']));
$login = trim($_GET['user']);
$t = trim(__paramInit('string', 't'));
if (!$t) {
$base = 0;
} else {
$base = 1;
}
$page = intval(trim($_GET['page']));
$from = intval(trim($_GET['from']));
$from = 0;
//а нафига вообще тут это нужно?
if (!$page) {
$page = 1;
}
if ($login) {
// Ћичный блог пользовател¤
$login = pg_escape_string($login);
$user = new users();
$user->GetUser($login);
if ($user->uid && !$user->is_banned) {
if (!is_emp($user->role)) {
$user = new freelancer();
$user->GetUser($login);
$is_visible = substr($user->tabs, 3, 1);
示例14: array
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/blogs.php';
$header = '../header.php';
//$additional_header = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Блоги на Free-lance.ru (".$gr_name.")\" href=\"/rss/blogs.php?gr=".$gr."&t=".$t."\" />";
$css_file = array('lenta.css', 'commune.css', '/css/nav.css');
$content = 'content.php';
$js_file = array('polls.js', 'commune.js');
$footer = '../footer.html';
$user_mod = commune::MOD_ADMIN * hasPermissions('communes');
$user_mod |= commune::MOD_PRO * (users::IsPro($uid, $e) ? 1 : 0);
$user_mod |= commune::MOD_EMPLOYER * (int) is_emp();
$user_mod |= commune::MOD_BANNED * is_banned($uid);
$page = __paramInit('int', 'page', 'page', 1);
$action = __paramInit('string', NULL, 'action');
switch ($action) {
case 'Save':
$has_lenta = __paramInit('bool', NULL, 'has_lenta', NULL);
$my_team = __paramInit('bool', NULL, 'my_team');
$all_profs = __paramInit('bool', NULL, 'all_profs');
$communes = __paramInit('array', NULL, 'commune_id');
$prof_groups = __paramInit('array', NULL, 'prof_group_id');
if (!lenta::SaveUserSettings($has_lenta, $uid, $my_team, $all_profs, $communes, $prof_groups)) {
}
// ошибка.
header('Location: /lenta/');
exit;
break;
default:
break;
}
include '../template2.php';
示例15: getFriendlyURL
<?php
echo $ban_count;
?>
</li>
<?php
}
}
} else {
if ($top['category_id'] && $top['category_name']) {
?>
<li class="b-post__links-item b-post__links-item_padright_10">
Раздел: <a class="b-post__link b-post__link_color_000" href="<?php
echo getFriendlyURL('commune_commune', $top['commune_id']);
?>
?om=<?php
echo __paramInit("int", "om") ? __paramInit("int", "om") : '0';
?>
&cat=<?php
echo $top['category_id'];
?>
"><?php
echo $top['category_name'];
?>
</a>
</li>
<?php
}
}
?>
</ul>