/** * Просмотр отзыва * @throws HTTP_Exception_404 * @return void */ public function action_view() { $service = ORM::factory('service', $this->request->param('service_id')); if (!$service->loaded()) { throw new HTTP_Exception_404('Такая компания не найдена'); } $review = $service->reviews->get_review($this->request->param('review_id')); if (!$review->loaded()) { throw new HTTP_Exception_404('Такой отзыв для компании ' . $service->name . ' не найден'); } $this->template->title = 'Отзыв к автосервису ' . $service->name . ' от ' . MyDate::show($review->date); $this->template->bc['services/' . $service->id] = $service->get_name(2); $this->template->bc['services/' . $service->id . '/reviews'] = 'Отзывы'; $this->template->bc['#'] = 'Отзыв от ' . MyDate::show($review->date); $this->view = View::factory('frontend/review/view')->set('review', $review); $this->template->content = $this->view; }
/** * Просмотр новости компании * @throws HTTP_Exception_404 */ public function action_view() { $service = ORM::factory('service', $this->request->param('service_id')); if (!$service->loaded()) { throw new HTTP_Exception_404('Такая компания не найдена'); } $news = $service->news->where('id', '=', $this->request->param('news_id'))->find(); if (!$news->loaded()) { throw new HTTP_Exception_404('Новость для компании ' . $service->name . ' не найдена'); } $this->template->title = $news->title; $this->view = View::factory('frontend/news/services/view')->set('news', $news); $this->template->bc['services/' . $service->id] = $service->get_name(2); $this->template->bc['services/' . $service->id . '/news'] = 'Новости'; $this->template->bc['#'] = 'Новость от ' . MyDate::show($news->date_create); //$this->template->bc['#'] = $this->template->title; $this->template->content = $this->view; }
/** * Просмотр акции автосервиса * @throws HTTP_Exception_404 * @return void */ public function action_view() { $service = ORM::factory('service', $this->request->param('service_id')); if (!$service->loaded()) { throw new HTTP_Exception_404('Такая компания не найдена'); } $stock = $service->stocks->get_stock($this->request->param('stock_id')); if (!$stock->loaded()) { throw new HTTP_Exception_404('Такая акция от компании ' . $service->name . ' не найдена'); } $this->template->title = 'Акция автосервиса ' . $service->name; if (trim($stock->title)) { $this->template->title .= ' ' . $stock->title; } $this->template->title .= ' от ' . MyDate::show($stock->date); $this->template->bc['services/' . $service->id] = $service->get_name(2); $this->template->bc['services/' . $service->id . '/stocks'] = 'Акции'; $this->template->bc['#'] = 'Акция ' . $stock->title . ' от ' . MyDate::show($stock->date); $this->view = View::factory('frontend/stock/view')->set('stock', $stock); $this->template->content = $this->view; }
<?php defined('SYSPATH') or die('No direct script access.'); ?> <div class="content-group"> <div class="header with-date"> <div class="title"><h1><?php echo __('review_title_company_' . $review->service->type, array(':company_name' => $review->service->name, ':date' => MyDate::show($review->date))); ?> </h1></div> <div class="date"><?php echo MyDate::show($review->date); ?> </div> </div> <div class="body"> <div class="text"> <?php echo $review->text; ?> </div> </div> </div>
foreach ($article->find_all() as $a) { ?> <?php if ($a->date_edited == '0000-00-00 00:00:00') { $a->date_edited = 'ни разу'; } else { $a->date_edited = MyDate::show($a->date_edited, TRUE); } ?> <tr> <td><?php echo $a->title; ?> </td> <td><?php echo MyDate::show($a->date_create, TRUE) . ' / ' . $a->date_edited; ?> </td> <td><?php echo HTML::activate_checker($a->id, $a->active, 'admin/content/article'); ?> </td> <td> <div class="btn-group"> <?php echo HTML::edit_button($a->id, 'admin/content/article'); ?> <?php echo HTML::delete_button($a->id, 'admin/content/article'); ?> </div>
<th style="width: 45px;"></th> </tr> </thead> <tbody> <?php foreach ($content->find_all() as $c) { ?> <tr> <td style="width: 300px;">Округ <?php echo $c->district->name . ' г.' . $c->district->city->genitive_name; ?> </td> <td><?php echo mb_strlen($c->text) > 0 ? Text::limit_words(strip_tags($c->text), 30) : 'Текст отсутствует'; ?> </td> <td><?php echo $c->date_edited != '0000-00-00 00:00:00' ? MyDate::show($c->date_edited, TRUE) : 'ни разу'; ?> </td> <td><?php echo HTML::edit_button($c->id, 'admin/content/district'); ?> </td> </tr> <?php } ?> </tbody> </table>
?> <div class="grid-row"> <?php $i = 1; foreach ($review as $r) { ?> <div class="content-group grid-3"> <div class="grid-content-block"> <div class="header with-date"> <div class="title"><?php echo HTML::anchor('services/' . $r->service->id, __('vacancies_news_reviews_title_company_name_' . $r->service->type, array(':genitive_city_name' => $r->service->city->genitive_name, ':company_name' => $r->service->name))); ?> </div> <div class="date"><?php echo MyDate::show($r->date); ?> </div> </div> <div class="body"> <div class="address"><i class="icon-map-marker"></i> <?php echo $r->service->get_address(); ?> </div> <noindex> <div class="text"> <?php echo Text::short_story($r->text); ?> <?php //= HTML::anchor('services/'.$r->service->id.'/reviews/'.$r->id, 'Подробнее');
echo HTML::anchor('cabinet/stock', __('cb_stocks')); ?> </div> <div class="text"> <?php if (count($stock->find_all()) > 0) { ?> <ul> <?php foreach ($stock->find_all() as $s) { ?> <li class="item"> <div> <div class="left"> <?php echo MyDate::show($s->date); ?> </div> <div class="right"> <?php echo HTML::anchor('cabinet/stock/edit/' . $s->id, HTML::image('assets/img/icons/pencil.png')) . HTML::anchor('cabinet/stock/delete/' . $s->id, HTML::image('assets/img/icons/del.png')); ?> </div> </div> <div style="clear: both;"> <?php echo HTML::anchor('services/' . $s->service->id, $s->service->name); ?> </div> <div> <?php
<div style="font-size: 20px; overflow: hidden; font-family: Times New Roman"> <?php echo HTML::image('assets/img/logo.png', array('width' => 130, 'align' => 'left', 'hspace' => 20)); ?> <div style="padding-top: 20px;"> <p style="margin-bottom: 10px;">Ассоциация Автосервисов <strong style="font-weight: normal;">www.as-avtoservice.ru</strong> </p> <p>Купон на скидку от <?php echo $type . ' ' . $service_name; ?> </p> </div> </div> <br /> <hr style="clear: both; margin-top: 5px; color: #e0e0e0;" /> <p align="right" style="font-size: 14px; ">Дата распечатки: <?php echo MyDate::show(Date::formatted_time(), TRUE); ?> </p> <p style="clear: both; font-size: 16px; font-family: Verdana; margin-top: 5px"><?php echo $text; ?> </p> <p class="button" align="center" style="margin-top: 20px;"> <a href="#" class="button_print"> <img src="http://www.as-avtoservice.ru/assets/img/print_cupon.png"> </a> </p> </div>
</thead> <tbody> <?php foreach ($task->order_by('status', 'ASC')->order_by('priority', 'DESC')->find_all() as $t) { ?> <?php $disputes_count = count($t->disputes->find_all()); $choose_statuses = array_diff_key($statuses, array($t->status => '')); ?> <tr> <td><?php echo $t->title; ?> </td> <td><?php echo MyDate::show($t->date_create, TRUE); ?> </td> <td><?php echo $disputes_count == 0 ? 'нет' : $disputes_count; ?> </td> <td><?php echo __('task_priority_' . $t->priority); ?> </td> <td><span class="<?php echo $statuses[$t->status]['css']; ?> "><?php echo __($statuses[$t->status]['i18n']);
<?php defined('SYSPATH') or die('No direct script access.'); ?> <div class="content"> <div class="content_title"> <div class="title"><h1><?php echo HTML::anchor('services/' . $news->service->id, $news->service->name); ?> | <?php echo $news->title; ?> </h1></div> <div class="date"><?php echo MyDate::show($news->date_create); ?> </div> </div> <div class="text"> <?php if ($news->image and file_exists($news->image)) { echo HTML::image($news->image, array('align' => 'left', 'style' => 'margin-top: 4px; margin-right: 6px;')); } ?> <?php echo $news->text; ?> </div> </div>
<?php defined('SYSPATH') or die('No direct script access.'); ?> <div class="content-group"> <div class="header with-date"> <div class="title"><h1><?php echo $article->title; ?> </h1></div> <div class="date"><?php echo MyDate::show($article->date_create); ?> </div> </div> <div class="body"> <div class="text"> <?php echo $article->text; ?> </div> </div> </div>
<h1 style="margin-bottom: 20px">Уведомления от администраци</h1> <?php foreach ($notice as $id => $value) { ?> <div class="content-group"> <div class="header with-date"> <div class="title" style="margin-bottom: 10px;">Сообщение для: <?php echo (isset($value['for']) and is_array($value['for'])) ? implode(', ', $value['for']) : 'пользователя'; ?> </div> <div class="date" style="margin-bottom: 10px;"> <?php if ($value['read'] == 'n') { echo '<strong style="background: #e5635f; color: #FFF; padding: 5px; margin-right: 5px;">Новое уведомление</strong>'; } echo MyDate::show($value['date']); ?> </div> </div> <div class="body"> <div class="text"> <p style="font-size: 14px; font-weight: bold;"><?php echo $value['title']; ?> </p> <?php echo str_replace('Login', $username, $value['text']); ?> </div> </div>
<?php defined('SYSPATH') or die('No direct script access.'); ?> <div class="qa_info"> <h1><?php echo 'Запрос на ' . $qa->carbrand->name . ' ' . $qa->model->name . ' ' . $qa->volume . ' ' . $qa->gearbox->name . ' ' . $qa->year; ?> </h1> <table> <tr> <td class="title">Дата запроса:</td> <td><?php echo MyDate::show($qa->date); ?> </td> </tr> <tr> <td class="title">Конт. лицо:</td> <td><?php echo $qa->contact; ?> </td> </tr> <?php if ($qa->vin != '') { ?> <tr> <td class="title">VIN:</td> <td><?php
<td></td> </tr> <?php foreach ($vacancy->find_all() as $n) { ?> <tr> <td><?php echo $n->service->name; ?> </td> <td><?php echo $n->title; ?> </td> <td><?php echo MyDate::show($n->date); ?> </td> <td><?php echo HTML::anchor('cabinet/vacancy/edit/' . $n->id, HTML::image('assets/img/icons/c_edit.png')); ?> <?php echo HTML::anchor('cabinet/vacancy/delete/' . $n->id, HTML::image('assets/img/icons/c_delete.png')); ?> </td> </tr> <?php } ?> <tr class="title"> <td>Компания</td>
?> </td> <td><?php echo $e->mail_to; ?> </td> <td><?php echo $e->title; ?> </td> <td><?php echo MyDate::show($e->date_create, TRUE); ?> </td> <td><?php echo $e->date_send == '0000-00-00 00:00:00' ? 'Неизвестно' : MyDate::show($e->date_send, TRUE); ?> </td> <td><?php echo $td_text; ?> </td> <td> <?php echo HTML::anchor('admin/email', 1); ?> </td> </tr> <?php } ?>
<?php echo $task->text; ?> </div> </div> <div class="row-fluid"> <h5>Дополнений: <?php echo count($task->disputes->find_all()); ?> </h5> <?php foreach ($task->disputes->find_all() as $d) { ?> <div class="row-fluid"> <div style="text-align: right;"><?php echo MyDate::show($d->date_create, TRUE) . ' ' . HTML::delete_button($d->id, 'admin/development/dispute'); ?> </div> <div><?php echo $d->text; ?> </div> </div> <hr /> <?php } ?> <?php echo FORM::open(NULL, array('class' => 'well')); ?>
<th>Статус</th> <th style="width: 72px;">Операции</th> </tr> </thead> <tbody> <?php foreach ($news->order_by('date', 'DESC')->find_all() as $c) { ?> <tr> <td><?php echo $c->title; ?> </td> <td><?php echo MyDate::show($c->date, TRUE); ?> </td> <td><?php echo HTML::activate_checker($c->id, $c->active, 'admin/news/world'); ?> </td> <td><?php echo HTML::edit_button($c->id, 'admin/news/world') . ' ' . HTML::delete_button($c->id, 'admin/news/world'); ?> </td> </tr> <?php } ?> </tbody>
</thead> <tbody> <?php foreach ($review->order_by('date', 'DESC')->find_all() as $c) { ?> <tr> <td><?php echo $c->service->name; ?> </td> <td><?php echo $c->email . ' <strong>' . $c->user->username . '</strong>'; ?> </td> <td><?php echo MyDate::show($c->date); ?> </td> <td><?php echo HTML::activate_checker($c->id, $c->active, 'admin/service/review'); ?> </td> <td><?php echo HTML::edit_button($c->id, 'admin/service/review') . HTML::delete_button($c->id, 'admin/service/review'); ?> </td> </tr> <?php } ?> </tbody>