public function init($uid, $type_place = 0)
 {
     $promoCodes = new PromoCodes();
     $options = array('popup_title' => 'Размещение в Карусели', 'items_title' => 'Параметры объявления', 'payments_exclude' => array(self::PAYMENT_TYPE_BANK), 'price' => pay_place::getPrice(), 'promo_code' => $promoCodes->render(PromoCodes::SERVICE_CARUSEL));
     $this->addWaitMessageForAll();
     $form = new CaruselForm();
     //Если уже размещался то поумолчанию заполняем тексты
     $payPlace = new pay_place($type_place);
     $data = $payPlace->getUserRequest($uid);
     if ($data) {
         $form->setDefaults(array('title' => $data['ad_header'], 'description' => $data['ad_text']));
     }
     $this->setContent($form->render());
     parent::init($options);
     $this->options['payments'][self::PAYMENT_TYPE_PLATIPOTOM]['content_after'] = sprintf($this->options['payments'][self::PAYMENT_TYPE_PLATIPOTOM]['content_after'], 'карусель');
 }
Ejemplo n.º 2
0
<?php

if (isset($is_show_tizer) && $is_show_tizer == true) {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/quick_payment/quickPaymentPopupCarusel.php";
    require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/pay_place.php";
    $popupId = quickPaymentPopupCarusel::getInstance()->getPopupId();
    $payPlace = new pay_place($catalog);
    $payPlaceUserRequest = $payPlace->getUserRequest($uid);
    $pos = array_search($uid, $pp_uids);
    ?>
        <li id="carusel_tizer" class="b-carusel__item">
             <div class="b-pay-tu b-pay-tu_car">
               <a id="carusel_tizer_close" class="b-pay-tu__close" href="javascript:void(0);"></a>
               <a class="b-pay-tu__link b-pay-tu__link_color_6db335" data-popup="<?php 
    echo $popupId;
    ?>
" href="javascript:void(0);">
                   <?php 
    if (@$payPlaceUserRequest['num'] == 0 && ($pos === false || $pos >= 5)) {
        ?>
                   <span class="b-pay-tu__decor">Добавьте рекламу своих услуг</span><br/>и заявите о себе за <?php 
        echo pay_place::getPrice();
        ?>
 руб.
                   <?php 
    } elseif ($payPlaceUserRequest['num'] == 0 && $pos < 5) {
        ?>
                   <span class="b-pay-tu__decor">Купите несколько объявлений</span><br/>
                   размещайтесь автоматически
                   <?php 
    } else {