function after() { $new_notice = ''; if (isset($this->template->notice_count['new']) and $this->template->notice_count['new'] > 0) { $new_notice = ' <span style="background-color: #d8a04b; color: #FFF; text-decoration: none; padding: 0 5px;">' . $this->template->notice_count['new'] . '</span>'; } $menu = array('main' => array('url' => 'cabinet', 'title' => 'Панель управления', 'icon' => 'assets/img/icons/home.png'), 'profile' => array('url' => 'cabinet/profile', 'title' => __('cb_profile'), 'icon' => 'assets/img/icons/profile_mini.png'), 'company' => array('url' => 'cabinet/company', 'title' => __('cb_companies'), 'icon' => 'assets/img/icons/services_mini.png'), 'statistics' => array('url' => 'cabinet/statistics', 'title' => 'Статистика', 'icon' => 'assets/img/icons/statistics.png'), 'gallery' => array('url' => 'cabinet/gallery', 'title' => 'Галерея', 'icon' => 'assets/img/icons/gallery.png'), 'news' => array('url' => 'cabinet/news', 'title' => __('cb_news'), 'icon' => 'assets/img/icons/news_mini.png'), 'vacancy' => array('url' => 'cabinet/vacancy', 'title' => __('cb_vacancies'), 'icon' => 'assets/img/icons/vacancies_mini.png'), 'stock' => array('url' => 'cabinet/stock', 'title' => __('cb_stocks'), 'icon' => 'assets/img/icons/stocks_mini.png'), 'qa' => array('url' => 'cabinet/qa', 'title' => __('cb_questions'), 'icon' => 'assets/img/icons/questions.png'), 'adv' => array('url' => 'cabinet/adv', 'title' => __('cb_adv'), 'icon' => 'assets/img/icons/adv_mini.png'), 'feedback' => array('url' => 'cabinet/feedback', 'title' => __('cb_feedback'), 'icon' => 'assets/img/icons/feedback.png'), 'notice' => array('url' => 'cabinet/notice', 'title' => __('cb_notice') . $new_notice, 'icon' => 'assets/img/icons/notices_mini.png'), 'payment' => array('url' => 'cabinet/payment/', 'title' => __('cb_payment'), 'icon' => 'assets/img/icons/ccard.png')); $cabinet_template = View::factory('templates/cabinet')->set('menu_items', $menu)->set('content', $this->template->content)->set('notice_count', $this->template->notice_count)->set('expires', empty($this->user->expires) ? null : MyDate::show_small($this->user->expires))->render(); $this->template->content = $cabinet_template; parent::after(); }
/ <?php echo HTML::anchor('admin/services/vacancies/' . $s->id, count($s->vacancies->find_all()), array('style' => 'color: #628ab4')); ?> / <?php echo HTML::anchor('admin/services/stocks/' . $s->id, count($s->stocks->find_all()), array('style' => 'color: #8a1f11;')); ?> / <?php echo HTML::anchor('admin/services/reviews/' . $s->id, count($s->reviews->find_all()), array('style' => 'color: #009900;')); ?> </td> <td><?php echo $s->date_create == '0000-00-00 00:00:00' ? 'Неизвестно' : MyDate::show_small($s->date_create); ?> / <?php echo $s->date_edited == '0000-00-00 00:00:00' ? 'Ни разу' : MyDate::show_small($s->date_edited); ?> / <?php echo $s->user->last_login != NULL ? date('d.m.Y', $s->user->last_login) : 'ни разу'; ?> </td> <td><?php echo HTML::activate_checker($s->id, $s->active, 'admin/services'); ?> </td> <td> <?php echo HTML::edit_button($s->id, 'admin/services') . HTML::delete_button($s->id, 'admin/services'); ?> </td>
<?php } else { ?> Неактивен <?php echo HTML::anchor('admin/users/activate/' . $u->id, HTML::image('assets/img/admin/active.png')); ?> <?php } ?> </td> <td><?php echo $company_count > 0 ? $company_count . HTML::anchor('admin/users/services/' . $u->id, ' просм.') : 'Не имеет компаний'; ?> </td> <td><?php echo MyDate::show_small($u->date_create); ?> / <?php echo $u->last_login != NULL ? date('d.m.Y H:i', $u->last_login) : 'ни разу'; ?> </td> <td><?php echo $u->expires != NULL ? Date::formatted_time($u->expires, 'd.m.Y') : ''; ?> </td> <td> <div class="btn-group"> <?php echo HTML::edit_button($u->id, 'admin/users/edit_info', TRUE) . HTML::delete_button($u->id, 'admin/users'); ?> </div>