コード例 #1
0
 protected function _getTabTu($user, $page = 1)
 {
     require_once ABS_PATH . '/classes/tservices/tservices.php';
     require_once ABS_PATH . '/tu/models/TServiceItemIterator.php';
     $tab = null;
     $tservices = new tservices($user['uid']);
     $list = $tservices->setPage($this->limit, $page)->getShortList();
     if ($list) {
         $total = $tservices->getCount();
         $pages = ceil($total / $this->limit);
         $tab = array('elements' => new TServiceItemIterator($user, $list), 'pages' => $pages, 'page' => $page);
     }
     return $tab;
 }
コード例 #2
0
ファイル: index.php プロジェクト: kapai69/fl-ru-damp
        $js_file[] = 'tservices/tservices.js';
        require_once $_SERVER['DOCUMENT_ROOT'] . '/tu/yii/tinyyii.php';
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/tservices/functions.php';
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/tservices/tservices_helper.php';
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/tservices/tservices.php';
        require_once $_SERVER['DOCUMENT_ROOT'] . '/tu/widgets/TServiceOrderDebtMessage.php';
        $page = __paramInit('int', 'page', 'page', 1);
        if ($page <= 0) {
            $page = 1;
        }
        $is_owner = $user->uid == $uid;
        $is_perm = hasPermissions('tservices');
        $is_not_public = $is_owner || $is_perm;
        $tservices = new tservices($user->uid);
        $data = $tservices->setPage($on_page, $page)->getShortList(!$is_not_public);
        $cnt = $tservices->getCount(!$is_not_public);
        //Виджет для рендера сообщения о блокировки
        $tserviceOrderDebtMessageWidget = new TServiceOrderDebtMessage();
        $tserviceOrderDebtMessageWidget->init($user->uid);
        $inner = 'tu_inner.php';
        $activ_tab = 2;
        //SEO
        $page_title = 'Типовые услуги на FL.ru';
        //$page_descr = '';
        //$page_keyw = '';
        break;
}
if (!$user->login) {
    include ABS_PATH . '/404.php';
    exit;
}