当前位置: 首页>>代码示例>>PHP>>正文


PHP settings::GetVariable方法代码示例

本文整理汇总了PHP中settings::GetVariable方法的典型用法代码示例。如果您正苦于以下问题:PHP settings::GetVariable方法的具体用法?PHP settings::GetVariable怎么用?PHP settings::GetVariable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在settings的用法示例。


在下文中一共展示了settings::GetVariable方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Конструктор класса.
  *
  * @param integer $year год, для которого инициализируем данные
  *
  * @return void
  */
 public function __construct($year)
 {
     $this->regFromTm = strtotime($this->periods[$year][0]);
     $this->regToTm = strtotime($this->periods[$year][1]) + 24 * 3600;
     $this->year = $year;
     $status = settings::GetVariable('birthday' . $this->year, 'status');
     $this->isClosed = !$status && (time() < $this->regFromTm || time() > $this->regToTm) || $status == 'close';
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:15,代码来源:birthday.php

示例2: cardAction

 /**
  * Вывод страницы для оплаты пластиковыми картами.
  */
 public function cardAction()
 {
     front::og('tpl')->page = 'index';
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php';
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/card_account.php';
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/sbr.php';
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/sbr_meta.php';
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/settings.php';
     $user = new users();
     $user->GetUser($_SESSION['login']);
     $city = $user->city ? city::GetCityName($user->city) : '';
     $reqv = sbr_meta::getUserReqvs($user->uid);
     $card_account = new card_account();
     $card_account->account_id = $this->account->id;
     $order_id = $card_account->Add();
     $sum = round(trim($_REQUEST['sum']), 4);
     $merchant = settings::GetVariable('billing', 'card_merchant');
     front::og('tpl')->sum = $sum;
     front::og('tpl')->card_account = $card_account;
     front::og('tpl')->order_id = $order_id;
     front::og('tpl')->city = $city;
     front::og('tpl')->user = $user;
     front::og('tpl')->reqv = $reqv[sbr::FT_PHYS];
     front::og('tpl')->script = '/scripts/bill2.js';
     if ($order_id > 0) {
         $tpl_file = '';
         if ($merchant) {
             $tpl_file = '_dol';
         }
         front::og('tpl')->display("bill/bill_card_step2{$tpl_file}.tpl");
     }
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:36,代码来源:page_bill.class.php

示例3: trim

switch ($action) {
    case 'delete':
        $id = trim($_GET['id']);
        if ($id) {
            $error = birthday08::Delete($id);
        }
        break;
    case 'status':
        $msettings->SetVariable('birthday08', 'status', $_GET['value']);
}
$users = birthday08::GetAll();
?>
<script src="/scripts/warning.js" type="text/javascript"></script>

<?php 
if ($msettings->GetVariable('birthday08', 'status') == 'open') {
    ?>
		<B>Статус регистрации: Открыта</B> &nbsp;&nbsp;&nbsp; &raquo; <A href="./?action=status&value=close" class="blue">Закрыть</A>

<?php 
} else {
    ?>

		<B>Статус регистрации: Закрыта</B> &nbsp;&nbsp;&nbsp; &raquo; <A href="./?action=status&value=open" class="blue">Открыть</A>

<?php 
}
?>

<br><br><br>
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:30,代码来源:inner_index.php

示例4: settings

define('MAX_SIZE', 5 * 1024 * 1024);
//5Mb
$action = __paramInit('string', 'action', 'action');
$type = __paramInit('bool', 'type', 'type');
$type_prefix = $type == 1 ? 'emp_' : '';
$settings = new settings();
switch ($action) {
    case 'save':
        $uploaded_file = new CFile($_FILES['file']);
        $uploaded_file->server_root = 1;
        $uploaded_file->max_size = MAX_SIZE;
        $uploaded_file->allowed_ext = array('jpg', 'jpeg', 'gif', 'png');
        $filename = $uploaded_file->MoveUploadedFile(BANNER_PATH);
        if (!count($uploaded_file->error) && $filename) {
            $settings->AddVariable('newsletter', $type_prefix . 'banner_file', WDCPREFIX . '/' . $uploaded_file->path . $uploaded_file->name);
            $settings->AddVariable('newsletter', $type_prefix . 'banner_link', __paramInit('string', null, 'link'));
        }
        header_location_exit('./#' . ($type == 1 ? 'emp' : 'frl'));
        break;
    case 'delete':
        $settings->SetVariable('newsletter', $type_prefix . 'banner_file', null);
        $settings->SetVariable('newsletter', $type_prefix . 'banner_link', null);
        break;
}
$newsletter_banner_file = $settings->GetVariable('newsletter', 'banner_file');
$newsletter_banner_link = $settings->GetVariable('newsletter', 'banner_link');
$newsletter_emp_banner_file = $settings->GetVariable('newsletter', 'emp_banner_file');
$newsletter_emp_banner_link = $settings->GetVariable('newsletter', 'emp_banner_link');
$content = '../content.php';
$inner_page = 'inner_index.php';
include $rpath . 'template2.php';
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例5: setPaymentMethod


//.........这里部分代码省略.........
                         $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 = 'Ошибка создания списка оплаты';
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:67,代码来源:billing.php

示例6: NewProj2

 /**
  * @todo: замена NewProj
  * 
  * Рассылка о новых проектах за предыдущий день. Вызывается раз в день из hourly.php
  * 
  * @param array $uids - массив идентификаторов пользователей, которых нужно исключить
  *
  * @return int количество получивших рассылку
  */
 public function NewProj2($uids = array())
 {
     $show_pro_limit = 25;
     $show_limit = 25;
     $projects = projects::GetNewProjectsPreviousDay($error, true);
     $groups = professions::GetAllGroupsLite(true);
     $page = 0;
     $count = 0;
     $projects_count = count($projects);
     if (!$projects_count) {
         return false;
     }
     //Получаем баннеры
     $settings = new settings();
     $banner_file = $settings->GetVariable('newsletter', 'banner_file');
     $banner_link = $settings->GetVariable('newsletter', 'banner_link');
     $this->subject = 'Новые проекты на FL.ru';
     $this->message = Template::render($_SERVER['DOCUMENT_ROOT'] . '/templates/mail/new_projects/project_layout.tpl.php', array('projects' => '%MESSAGE%', 'host' => $GLOBALS['host'], 'title' => '%TITLE%', 'unsubscribe_url' => '%UNSUBSCRIBE_URL%', 'date' => strtotime('- 1 day'), 'track_url' => '%TRACK_URL%'));
     $this->recipient = '';
     $massId = $this->send('text/html');
     $project_ids = array();
     foreach ($projects as $i => $prj) {
         $descr = $prj['descr'];
         $descr = htmlspecialchars($descr, ENT_QUOTES, 'CP1251', false);
         $descr = reformat(LenghtFormatEx($descr, 180), 50, 0, 1);
         $price = $prj['cost'] ? CurToChar($prj['cost'], $prj['currency']) . getPricebyProject($prj['priceby']) : null;
         $projects[$i]['html'] = Template::render($_SERVER['DOCUMENT_ROOT'] . '/templates/mail/new_projects/project.tpl.php', array('url' => $GLOBALS['host'] . getFriendlyURL('project', array('id' => $prj['id'], 'name' => $prj['name'])), 'name' => $prj['name'] ? reformat(htmlspecialchars($prj['name'], ENT_QUOTES, 'CP1251', false), 50, 0, 1) : '', 'descr' => $descr, 'host' => $GLOBALS['host'], 'project_kind' => $prj['kind'], 'project_pro_only' => $prj['pro_only'] == 't', 'project_verify_only' => $prj['verify_only'] == 't', 'project_urgent' => $prj['urgent'] == 't', 'price' => $price, 'end_date' => $prj['end_date'], 'create_date' => $prj['create_date'], 'utm_param' => '%UTM_PARAM%'));
         $project_ids[] = $prj['id'];
     }
     //Собираем юзеров у которых есть ответы на новые проекты
     $offers_exist = array();
     $offers = projects_offers::AllFrlOffersByProjectIDs($project_ids);
     if (count($offers)) {
         foreach ($offers as $offer) {
             if (!isset($offers_exist[$offer['project_id']])) {
                 $offers_exist[$offer['project_id']] = array();
             }
             $offers_exist[$offer['project_id']][$offer['user_id']] = true;
         }
     }
     $strtotime_3y_ago = strtotime('- 3 year');
     $strtotime_1y_ago = strtotime('- 1 year');
     $strtotime_1w_ago = strtotime('- 1 week');
     $current_date = time();
     $current_date_sufix = '_' . date('dmy', $current_date);
     //format:_270314
     $statistics = array();
     while ($users = freelancer::GetPrjRecps($error, ++$page, 200, $uids)) {
         $this->recipient = array();
         foreach ($users as $user) {
             //Если ли у фрилансера уточнение по категориям
             $is_mailer_str = strlen($user['mailer_str']) > 0;
             $subj = array();
             if ($is_mailer_str) {
                 foreach ($groups as $group) {
                     if (freelancer::isSubmited($user['mailer_str'], array(array('category_id' => $group['id'])))) {
                         $subj[$group['id']] = $group['name'];
                     }
                 }
             }
             $message_pro = '';
             $cnt_pro = 0;
             $message = '';
             $cnt = 0;
             $cnt_submited = 0;
             $cnt_user_submited = 0;
             foreach ($projects as $prj) {
                 //Подписан ли фрилансер на специализацию к которой относится проект
                 if ($is_mailer_str && !freelancer::isSubmited($user['mailer_str'], $prj['specs'])) {
                     continue;
                 }
                 //Считаем все проекты по выбранным специализациям
                 ++$cnt_submited;
                 //Условия не попадания в письмо
                 if ($prj['is_blocked'] == 't' || $prj['closed'] == 't' || $prj['state'] == projects::STATE_MOVED_TO_VACANCY || $prj['kind'] == projects::KIND_PERSONAL) {
                     continue;
                 }
                 //Если у фрилансера ответ на проект то не добавляем его в рассылку
                 if (isset($offers_exist[$prj['id']][$user['uid']])) {
                     continue;
                 }
                 if ($prj['pro_only'] == 't') {
                     if ($cnt_pro < $show_pro_limit) {
                         $message_pro .= $prj['html'];
                         ++$cnt_pro;
                     }
                 } else {
                     if ($cnt < $show_limit) {
                         $message .= $prj['html'];
                         ++$cnt;
                     }
//.........这里部分代码省略.........
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:101,代码来源:smail.php


注:本文中的settings::GetVariable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。