public function init()
 {
     parent::init();
     stat_collector::setStamp();
     // stamp
     $this->uid = get_uid();
     $this->is_adm = hasPermissions('tservices');
     // разметка страницы с левым сайдбаром
     $this->layout = '//layouts/content-with-right-sidebar';
     // в сайдбаре вывести фильтр с учётом текущей категории
     $this->getClips()->add('sidebar', $this->widget('TServiceFilter', array(), true));
     // чтобы отрисовать фильтр и опции
     # TODO добиться, чтобы $this->widget('TServiceFilter') и $this->createWidget($this,'TServiceFilter') возвращал один и тот же объект
     $this->filter_widget = $this->createWidget($this, 'TServiceFilter', array());
     // копия, чтобы узнать, какие опции были выбраны
     $prof_id = $this->filter_widget->filter->category ? $this->filter_widget->filter->category : $this->filter_widget->filter->category_group;
     //----------------------------------------------------------------------
     //@todo: возможно нужно общее хранилище собираемых данных
     //в течении работы скрипта с последующей передачей в GA и Adriver?
     GaJsHelper::getInstance()->setTuCategories($this->filter_widget->filter->category_group, $this->filter_widget->filter->category);
     adriver::getInstance()->setTuCategories($this->filter_widget->filter->category_group, $this->filter_widget->filter->category);
     //----------------------------------------------------------------------
     SeoTags::getInstance()->initTserviceList($prof_id, $this->filter_widget->filter->category > 0);
     $this->getClips()->add('header', $this->widget('TServiceNavigation', array('category_group' => $this->filter_widget->filter->category_group, 'category' => $this->filter_widget->filter->category, 'filter_get_params' => $this->filter_widget->getUserFriendlyUrl(false)), true));
     $this->getClips()->add('content_top', $this->widget('TServiceCatalogHeader', array(), true));
     $this->getClips()->add('categories', $this->widget('TServiceCatalogCategories', array('category_group' => $this->filter_widget->filter->category_group, 'filter_get_params' => $this->filter_widget->getUserFriendlyUrl(false)), true));
     // в футере каталога вывести список специализаций фрилансеров
     $this->getClips()->add('footer', $this->widget('TServiceFreelancersCategories', array(), true));
     $tserviceModel = TServiceModel::model();
     $this->counter_users = $tserviceModel->countUsers();
     $this->counter_tu = $tserviceModel->countTservices();
 }
예제 #2
0
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/stdf.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/freelancer.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/freelancers_filter.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/country.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/city.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/kwords.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/stat_collector.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/seo/SeoTags.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/freelancer_binds.php";
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/quick_payment/quickPaymentPopupFrlbind.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/quick_payment/quickPaymentPopupFrlbindup.php';
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/FreelancerCatalog.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/firstpage.php";
session_start();
stat_collector::setStamp();
// stamp
$uid = get_uid();
//------------------------------------------------------------------------------
//@todo Ссылки должны изначально передавать такие параметры вместо word
$word = __paramInit('string', 'word');
if ($word) {
    $link = "/freelancers/?action=search&search_string={$word}";
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: {$link}");
    exit(0);
}
//------------------------------------------------------------------------------
$prof_id = 0;
$prof_group_id = 0;
$prof_group_parent_id = 0;