public function readFolder() { $folder = $this->customer->getFolderName(); $dir = DIR_IMAGE . "catalog/" . $folder; $allfiles = scandir($dir); $img_links = array(); $counting = 0; foreach ($allfiles as $image) { //if the file is not hidden get the the URI if (substr($image, 0, 1) != '.') { //Once we get certified the config.php needs to be modified. $modify_image = new Image(DIR_IMAGE . "catalog/" . $folder . "/" . $image); // $mark = new Image(DIR_IMAGE. "logo.png"); $width = $modify_image->getWidth() * 0.2; $height = $modify_image->getHeight() * 0.2; // $mark->resize($width, $height); // $modify_image->watermark($mark); $size = $width * $height; $modify_image->save($modify_image->getFile()); $img_links[$counting]['source'] = HTTPS_SERVER . "/image/catalog/" . $folder . "/" . $image; $img_links[$counting]['width'] = $modify_image->getWidth(); $img_links[$counting]['height'] = $modify_image->getHeight(); $counting++; } } return $img_links; }
public function run() { if ($image = CUploadedFile::getInstanceByName($this->field)) { // Валидация по форме $v = new ImageForm(); $v->image = true; $v->image_file = $image; if ($v->validate()) { $preid = Yii::app()->request->getPost('preid', date('Ymd')); $tmp = pathinfo($image->name); $filename = EString::strtolower(EFile::sanitize($tmp['filename']) . '_' . uniqid() . '.' . $tmp['extension']); $path = Yii::getPathOfAlias($this->folder . '.' . $this->field) . DIRECTORY_SEPARATOR . $preid . DIRECTORY_SEPARATOR; $result = Image::addFile($image, $filename, $path, $this->sizes, $preid, null, $this->watermark ? Yii::app()->params['watermark'] : false); echo '"' . Image::getFile($result, 'normal') . '"'; } else { echo '{"error":"Файл не проходит валидацию, выберите другой."}'; } } else { echo '{"error":"Ошибка загрузки файла."}'; } }
<?php $this->breadcrumbs = array('Каталог шин' => array('tyres/index'), $producer->title => array('tyres/viewProducer', 'alias' => $producer->alias)); ?> <div class='span-18'> <h2 class="title1"><span><span>Каталог шин</span></span></h2> <ul> <?php foreach ($producer->tyres as $model) { $photo = $model->photo ? Image::getFile($model->photo, 'small') : null; ?> <li> <?php echo CHtml::link(CHtml::image($photo, $producer->title . ' ' . $model->title), array('tyres/viewModel', 'alias' => $model->alias, 'producerAlias' => $producer->alias)); ?> <?php echo CHtml::link($model->title, array('tyres/viewModel', 'alias' => $model->alias, 'producerAlias' => $producer->alias)); ?> </li> <?php } ?> </ul> </div> <div class='span-8 last'> <h2 class="title1"><span><span>Подбор шин</span></span></h2> <?php $this->widget('widgets.producers.tyresWidget', array('model' => $tyreSelection)); ?>
<?php $this->breadcrumbs = array('Диски' => array('index'), $model->title); $this->menu = array(array('label' => 'Обзор дисков', 'url' => array('index')), array('label' => 'Добавить диск', 'url' => array('create')), array('label' => 'Обновить диск', 'url' => array('update', 'id' => $model->id)), array('label' => 'Удалить диск', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Вы уверены что хотите удалить диск?')), array('label' => 'Управление дисками', 'url' => array('admin'))); ?> <h1>Подробнее о диске #<?php echo $model->id; ?> </h1> <?php Yii::import('autocatalog.models.*'); $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', array('name' => 'producer_id', 'type' => 'html', 'value' => CHtml::link($model->producer->title, array('disks/producers/view', 'id' => $model->producer_id))), 'title', 'alias', array('name' => 'photo', 'type' => 'image', 'value' => Image::getFile($model->photo, 'big')), 'description_marked:html', array('name' => 'new', 'value' => L::ruitem('boolean', $model->new)), array('name' => 'sale', 'value' => L::ruitem('boolean', $model->sale)), array('name' => 'construction_type', 'value' => L::item('diskConstructionType', $model->construction_type)), array('name' => 'color', 'value' => L::item('color', $model->color)), array('name' => 'model_id', 'type' => 'html', 'value' => $model->model ? CHtml::link($model->model->title, array('autocatalog/models/view', 'id' => $model->model_id)) : null), array('name' => 'sizes', 'type' => 'html', 'value' => $this->renderPartial('_sizes', array('sizes' => $model->sizes), true)))));
?> <br /> <b><?php echo CHtml::encode($data->getAttributeLabel('title')); ?> :</b> <?php echo CHtml::encode($data->title); ?> <br /> <b><?php echo CHtml::encode($data->getAttributeLabel('alias')); ?> :</b> <?php echo CHtml::encode($data->alias); ?> <br /> <b><?php echo CHtml::encode($data->getAttributeLabel('logo')); ?> :</b> <?php echo CHtml::image(Image::getFile($data->logo, 'normal')); ?> <br /> </div>
if (!empty($models) && count($models) > 0) { ?> <ul class='main-page-line'> <?php foreach ($models as $model) { ?> <li> <?php if ($model->photo) { ?> <a href='<?php echo $model->url; ?> '> <img src='<?php echo ($tmp = Image::getFile($model->photo, 'normal')) ? $tmp : 'http://carclub.ru' . $model->photo; ?> ' title='<?php echo $model->title; ?> ' alt='Картинка: <?php echo $model->title; ?> ' align='left' /> </a> <?php } ?> <h3><?php echo CHtml::link($model->title, $model->url); ?>
<?php $params = array('catalog/tyres', 'aliasProducer' => $data->producer->alias, 'aliasModel' => $data->alias); !empty($season) ? $params['season'] = $season : false; !empty($stud) ? $params['stud'] = $stud : false; echo CHtml::image(Image::getFile($data->photo, 'small')); echo CHtml::link($data->title, $params); ?> <Br />
<?php $this->breadcrumbs = array('Шины' => array('index'), $model->title); $this->menu = array(array('label' => 'Обзор шин', 'url' => array('index')), array('label' => 'Добавить шину', 'url' => array('create')), array('label' => 'Обновить шину', 'url' => array('update', 'id' => $model->id)), array('label' => 'Удалить шину', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Вы уверены что хотите удалить шину?')), array('label' => 'Управление шинами', 'url' => array('admin'))); ?> <h1>Подробнее о шине #<?php echo $model->id; ?> </h1> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', array('name' => 'producer_id', 'type' => 'html', 'value' => CHtml::link($model->producer->title, array('producers/tyres/view', 'id' => $model->producer_id))), 'title', 'alias', array('name' => 'photo', 'type' => 'image', 'value' => Image::getFile($model->photo, 'big')), 'description_marked:html', array('name' => 'new', 'value' => L::ruitem('boolean', $model->new)), array('name' => 'sale', 'value' => L::ruitem('boolean', $model->sale)), array('name' => 'currency', 'value' => L::item('tyreCurrency', $model->currency)), array('name' => 'season', 'value' => L::item('tyreSeason', $model->season)), array('name' => 'stud', 'value' => L::ruitem('boolean', $model->stud)), array('name' => 'construction_type', 'value' => L::item('tyreConstructionType', $model->construction_type)), array('name' => 'runflat_type', 'value' => L::ruitem('boolean', $model->runflat_type)), array('name' => 'sizes', 'type' => 'html', 'value' => $this->renderPartial('_sizes', array('sizes' => $model->sizes), true)))));
</div> <div class="row"> <?php echo $form->labelEx($model, 'alias'); ?> <?php echo $form->textField($model, 'alias', array('size' => 45, 'maxlength' => 45)); ?> <?php echo $form->error($model, 'alias'); ?> </div> <?php $this->widget('ext.uploader.uploader', array('model' => $model, 'name' => 'logo', 'options' => array('skin' => 'simple', 'allowDelete' => false, 'preview' => Image::getFile($model->logo, 'normal')))); ?> <div class="row"> <?php echo $form->labelEx($model, 'archive'); ?> <?php echo $form->dropDownList($model, 'archive', L::items('ArchiveStatus')); ?> <?php echo $form->error($model, 'archive'); ?> </div> <!--
$params = array('catalog/tyres', 'aliasProducer' => $data->alias); !empty($season) ? $params['season'] = $season : false; !empty($stud) ? $params['stud'] = $stud : false; ?> <h3 class='grid_4 <?php echo $index % 2 ? 'omega' : 'alpha'; ?> tcenter catalog-producers'> <?php if (!empty($data->logo)) { ?> <div><a href='<?php echo CHtml::normalizeUrl($params); ?> '><?php echo CHtml::image(Image::getFile($data->logo), 'Логотип производителя шин ' . $data->title, array('title' => 'Производитель шин ' . $data->title)); ?> </a></div> <?php } else { ?> <?php echo CHtml::link($data->title, $params); ?> <?php } ?> </h3> <?php echo $index % 2 ? '<div class="clear"></div>' : '';
echo $this->id; ?> '> <?php echo CHtml::activeFileField($this->model, $this->field, array('id' => $this->id . $this->field)); ?> <?php if ($this->allowDelete && !empty($this->model->{$this->field})) { ?> <input type='button' value='Удалить' onclick='$("#<?php echo CHtml::ID_PREFIX; echo $this->id . $this->field; ?> ").val("delete");$("#img<?php echo $this->id . $this->field; ?> ").remove();'> <?php } ?> <?php if (!empty($this->model->{$this->field})) { ?> <p><?php echo CHtml::image(Image::getFile($this->model->{$this->field}, $this->defaultPreviewSize), '', array('id' => 'img' . $this->id . $this->field)); ?> </p> <?php } ?> </div>
echo $model->id; ?> --> <h2><?php echo $model->title; ?> </h2> <?php echo EString::getBackTime($model->publicated); $this->widget('widgets.comments.commentsCount', array('model' => $model)); ?> <hr /> <?php echo $model->photo ? CHtml::image(Image::getFile($model->photo, 'main'), $model->title) : ''; echo $model->preamble_marked; ?> <hr /> <?php echo $model->text_marked; ?> <hr /> <?php $this->widget('widgets.socials.socials', array('model' => $model, 'options' => array('title' => $model->title, 'url' => CHtml::normalizeUrl(array('articles/view', 'alias' => $model->alias)), 'description' => CHtml::encode($model->preamble), 'printUrl' => CHtml::normalizeUrl(array('articles/print', 'alias' => $model->alias))))); ?> <hr /> <?php $this->widget('widgets.comments.comments', array('model' => $model));
<?php $this->pageTitle = Yii::app()->name . ' - Каталог - Шины - ' . CHtml::encode($model->tyre->producer->title) . ' - ' . CHtml::encode($model->tyre->title) . ' - ' . CHtml::encode($model->size); $this->breadcrumbs = array('Каталог' => array('catalog/index'), 'Шины' => array('catalog/tyres'), $model->tyre->producer->title => array('catalog/tyres', 'aliasProducer' => $model->tyre->producer->alias), $model->tyre->title => array('catalog/tyres', 'aliasProducer' => $model->tyre->producer->alias, 'aliasModel' => $model->tyre->alias), $model->size); ?> <div class='grid_8 alpha catalog-card'> <h2 class="title1"><span><span>Каталог шин</span></span></h2> <div class='grid_2 alpha'> <?php $small = Image::getFile($model->tyre->photo, 'small'); $small = CHtml::image($small, 'Шина ' . CHtml::encode($model->tyre->producer->title . ' ' . $model->tyre->title)); if ($big = Image::getFile($model->tyre->photo, 'big')) { echo CHtml::link($small, $big, array('class' => 'fancybox', 'title' => 'Шина ' . CHtml::encode($model->tyre->producer->title . ' ' . $model->tyre->title))); } else { echo $small; } ?> </div> <div class='grid_6 omega item'> <h3><?php echo CHtml::encode($model->tyre->producer->title . ' ' . $model->tyre->title); ?> </h3> <div class='description'><?php echo $model->tyre->description_marked; ?> </div> <?php $this->widget('widgets.socials.socials', array('model' => $model, 'options' => array('title' => $model->title, 'url' => CHtml::normalizeUrl(array('articles/view', 'alias' => $model->alias)), 'description' => CHtml::encode($model->tyre->description), 'printUrl' => CHtml::normalizeUrl(array('articles/print', 'alias' => $model->alias)))));
<?php $this->breadcrumbs = array('Менеджеры' => array('index'), $model->username); $this->menu = array(array('label' => 'Добавить менеджера', 'url' => array('create')), array('label' => 'Обновить менеджера', 'url' => array('update', 'id' => $model->username)), array('label' => 'Удалить менеджера', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->username), 'confirm' => 'Вы уверены что хотите удалить менеджера?')), array('label' => 'Управление менеджерами', 'url' => array('index'))); ?> <h1>Подробнее о менеджере #<?php echo $model->username; ?> </h1> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('username', 'phone', 'email:email', 'priority', array('name' => 'avatar', 'type' => 'image', 'value' => $model->avatar ? Image::getFile($model->avatar) : null), 'online')));
<?php $this->pageTitle = Yii::app()->name . ' - Каталог - Диски - ' . CHtml::encode($model->disk->producer->title) . ' - ' . CHtml::encode($model->disk->title) . ' - ' . CHtml::encode($model->size); $this->breadcrumbs = array('Каталог' => array('catalog/index'), 'Диски' => array('catalog/disks'), $model->disk->producer->title => array('catalog/disks', 'aliasProducer' => $model->disk->producer->alias), $model->disk->title => array('catalog/disks', 'aliasProducer' => $model->disk->producer->alias, 'aliasModel' => $model->disk->alias), $model->size); ?> <div class='grid_8 alpha catalog-card'> <h2 class="title2"><span><span>Каталог дисков</span></span></h2> <div class='grid_2 alpha'> <?php $small = Image::getFile($model->disk->photo, 'small'); $small = CHtml::image($small, 'Шина ' . CHtml::encode($model->disk->producer->title . ' ' . $model->disk->title)); if ($big = Image::getFile($model->disk->photo, 'big')) { echo CHtml::link($small, $big, array('class' => 'fancybox', 'title' => 'Шина ' . CHtml::encode($model->disk->producer->title . ' ' . $model->disk->title))); } else { echo $small; } ?> </div> <div class='grid_6 omega item'> <h3><?php echo CHtml::encode($model->disk->producer->title . ' ' . $model->disk->title); ?> </h3> <div class='description'><?php echo $model->disk->description_marked; ?> </div> <?php $this->widget('widgets.socials.socials', array('model' => $model, 'options' => array('title' => $model->title, 'url' => CHtml::normalizeUrl(array('articles/view', 'alias' => $model->alias)), 'description' => CHtml::encode($model->disk->description), 'printUrl' => CHtml::normalizeUrl(array('articles/print', 'alias' => $model->alias)))));
<?php $this->pageTitle = Yii::app()->name . ' - Профиль'; $this->breadcrumbs = array('Профиль'); ?> <div class='controls'> <?php echo CHtml::link('Редактировать профиль', array('users/edit', 'username' => $model->username)); ?> | <?php echo CHtml::link('Заказы', array('users/orders', 'username' => $model->username)); ?> </div> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('username', 'email', array('name' => 'status', 'value' => L::ruitem('UserStatus', $model->status)), 'client.card', array('name' => 'client.discount', 'type' => 'raw', 'value' => $model->client ? ($model->client->discount ? $model->client->discount : '0') . '%' : null), array('name' => 'avatar', 'type' => 'image', 'value' => $model->avatar ? Image::getFile($model->avatar) : null), 'name', 'created', 'activated', 'birthday', array('name' => 'gender', 'value' => isset($model->gender) ? L::ruitem('gender', $model->gender) : null), 'last_login', 'client.phone', 'client.city', 'client.address')));
<?php $this->breadcrumbs = array('Производители шин' => array('index'), $model->title); $this->menu = array(array('label' => 'Обзор производителей шин', 'url' => array('index')), array('label' => 'Добавить производителя шин', 'url' => array('create')), array('label' => 'Обновить производителя шин', 'url' => array('update', 'id' => $model->id)), array('label' => 'Удалить производителя шин', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Вы уверены что хотите удалить производителя шин?')), array('label' => 'Управление производителями шин', 'url' => array('admin'))); ?> <h1>Подробнее о производителе шин #<?php echo $model->id; ?> </h1> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', 'title', 'alias', array('name' => 'logo', 'type' => 'image', 'value' => Image::getFile($model->logo, 'big')), 'description_marked:html', array('name' => 'tyres', 'type' => 'html', 'value' => $this->renderPartial('_tyres', array('tyres' => $model->tyres), true)))));
<?php $this->pageTitle = Yii::app()->name . ' - Каталог - Диски - ' . CHtml::encode($dataProvider->data[0]->disk->producer->title) . ' - ' . CHtml::encode($dataProvider->data[0]->disk->title); $this->breadcrumbs = array('Каталог' => array('catalog/index'), 'Диски' => array('catalog/disks'), $dataProvider->data[0]->disk->producer->title => array('catalog/disks', 'aliasProducer' => $dataProvider->data[0]->disk->producer->alias), $dataProvider->data[0]->disk->title => array('catalog/disks', 'aliasProducer' => $dataProvider->data[0]->disk->producer->alias, 'aliasModel' => $dataProvider->data[0]->disk->alias)); ?> <?php echo CHtml::image(Image::getFile($dataProvider->data[0]->disk->photo, 'big')); ?> <?php $this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'itemView' => 'disks/_size', 'ajaxUpdate' => false, 'viewData' => array('construct' => $construct))); ?> <?php $this->widget('widgets.socials.socials', array('model' => $model, 'options' => array('title' => $model->title, 'url' => CHtml::normalizeUrl(array('articles/view', 'alias' => $model->alias)), 'description' => CHtml::encode($model->description), 'printUrl' => CHtml::normalizeUrl(array('articles/print', 'alias' => $model->alias))))); ?> <hr /> <?php $this->widget('widgets.comments.comments', array('model' => $model));
<?php $this->breadcrumbs = array('Каталог шин'); ?> <div class='span-18 catalog producers'> <h2 class="title1"><span><span>Каталог шин</span></span></h2> <ul> <?php foreach ($models as $model) { $logo = $model->logo ? Image::getFile($model->logo, 'big') : null; ?> <li> <?php echo CHtml::link($model->title, array('tyres/viewProducer', 'alias' => $model->alias)); ?> </li> <?php } ?> </ul> </div> <div class='span-8 last'> <h2 class="title1"><span><span>Подбор шин</span></span></h2> <?php $this->widget('widgets.producers.tyresWidget', array('model' => $tyreSelection)); ?> </div> <hr class='space' />
<?php $this->breadcrumbs = array('Статьи' => array('index'), $model->title); $this->menu = array(array('label' => 'Обзор статей', 'url' => array('index')), array('label' => 'Добавить статью', 'url' => array('create')), array('label' => 'Обновить статью', 'url' => array('update', 'id' => $model->id)), array('label' => 'Удалить статью', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Вы уверены что хотите удалить статью?')), array('label' => 'Управление статьями', 'url' => array('admin'))); ?> <h1>Подробнее о статье #<?php echo $model->id; ?> </h1> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', array('name' => 'status', 'value' => L::item('publicationStatus', $model->status)), 'title', 'alias', array('name' => 'url', 'type' => 'html', 'value' => CHtml::link($model->url, $model->url)), array('name' => 'photo', 'type' => 'image', 'value' => Image::getFile($model->photo, 'normal')), 'author', 'publicated', 'preamble_marked:html', 'text_marked:html', 'source', 'source_link')));
<?php $tb = Image::getFile($data->disk->photo, 'small'); $s = $data->size; ?> <div class='item'> <ul> <li class='grid_2 alpha photo tcenter'> <a href='<?php echo CHtml::normalizeUrl(array('catalog/disks', 'aliasProducer' => $data->disk->producer->alias, 'aliasModel' => $data->disk->alias, 'aliasSize' => $data->alias)); ?> '><div class='tb tcenter'><?php echo CHtml::image($tb ? $tb : Yii::app()->params['disk.emptyPhoto.tb'], $data->disk->producer->title . ' ' . $data->disk->title . ' ' . $s, array('title' => $data->disk->producer->title . ' ' . $data->disk->title . ' ' . $s)); ?> </div></a> </li> <li class='grid_4'> <h3><i><?php echo CHtml::link($data->disk->producer->title, array('catalog/disks', 'aliasProducer' => $data->disk->producer->alias)); ?> </i> <?php echo CHtml::link($data->disk->title, array('catalog/disks', 'aliasProducer' => $data->disk->producer->alias, 'aliasModel' => $data->disk->alias)); ?> </h3> <b class='size'><?php echo CHtml::link($data->size, array('catalog/disks', 'aliasProducer' => $data->disk->producer->alias, 'aliasModel' => $data->disk->alias, 'aliasSize' => $data->alias)); ?> </b> <a class='short_info' href='<?php echo CHtml::normalizeUrl(array('catalog/disks', 'aliasProducer' => $data->disk->producer->alias, 'aliasModel' => $data->disk->alias, 'aliasSize' => $data->alias)); ?>
public function uploadAll() { $this->load->language('common/filemanager'); $error = array(); $extension = array("jpeg", "jpg", "png", "gif", "JPG", "bmp"); // Make sure we have the correct directory if (isset($this->request->get['directory'])) { $directory = rtrim(DIR_IMAGE . 'catalog/' . str_replace(array('../', '..\\', '..'), '', $this->request->get['directory']), '/'); } else { $directory = DIR_IMAGE . 'catalog'; } // Check it's a directory if (!is_dir($directory)) { $json['error'] = $this->language->get('error_directory'); } $clientFolder = $this->request->get['directory']; foreach ($this->request->files["file"]["tmp_name"] as $key => $tmp_name) { $file_name = $this->request->files["file"]["name"][$key]; $file_name = str_replace(" ", "_", $file_name); $file_tmp = $this->request->files["file"]["tmp_name"][$key]; $ext = pathinfo($file_name, PATHINFO_EXTENSION); //Contruct the image object for modification $new_image = new Image($file_tmp); $w = $new_image->getWidth(); $h = $new_image->getHeight(); $size = $w * $h; $new_image->resize($w * 0.5, $h * 0.5); if (in_array($ext, $extension)) { if (!file_exists($directory . "/" . $file_name)) { //move_uploaded_file($file_tmp = $this->request->files["file"]["tmp_name"][$key], $directory . "/" . $file_name); move_uploaded_file($new_image->getFile(), $directory . "/" . $file_name); $json['success'] = 'Files are uploaded'; } else { $json['error'] = 'Duplicate file error'; } } else { array_push($error, "{$file_name}, "); $json['error'] = $this->language->get('error_upload'); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); }
<?php $tb = Image::getFile($data->tyre->photo, 'small'); $s = $data->width . '/' . $data->height . 'R' . $data->diameter . ' ' . $data->load_index . $data->speed_rating; ?> <div class='item'> <ul> <li class='grid_2 alpha photo tcenter'> <a href='<?php echo CHtml::normalizeUrl(array('catalog/tyres', 'aliasProducer' => $data->tyre->producer->alias, 'aliasModel' => $data->tyre->alias, 'aliasSize' => $data->alias)); ?> '><div class='tb tcenter'><?php echo CHtml::image($tb ? $tb : Yii::app()->params['tyre.emptyPhoto.tb'], $data->tyre->producer->title . ' ' . $data->tyre->title . ' ' . $s, array('title' => $data->tyre->producer->title . ' ' . $data->tyre->title . ' ' . $s)); ?> </div></a> </li> <li class='grid_4'> <h3><i><?php echo CHtml::link($data->tyre->producer->title, array('catalog/tyres', 'aliasProducer' => $data->tyre->producer->alias)); ?> </i> <?php echo CHtml::link($data->tyre->title, array('catalog/tyres', 'aliasProducer' => $data->tyre->producer->alias, 'aliasModel' => $data->tyre->alias)); ?> </h3> <b class='size'><?php echo CHtml::link($data->size, array('catalog/tyres', 'aliasProducer' => $data->tyre->producer->alias, 'aliasModel' => $data->tyre->alias, 'aliasSize' => $data->alias)); ?> </b> <span class='<?php echo L::item('tyreSeason', $data->tyre->season); ?>
<?php $this->pageTitle = Yii::app()->name . ' - Каталог - Шины - ' . CHtml::encode($dataProvider->data[0]->tyre->producer->title) . ' - ' . CHtml::encode($dataProvider->data[0]->tyre->title); $this->breadcrumbs = array('Каталог' => array('catalog/index'), 'Шины' => array('catalog/tyres'), $dataProvider->data[0]->tyre->producer->title => array('catalog/tyres', 'aliasProducer' => $dataProvider->data[0]->tyre->producer->alias), $dataProvider->data[0]->tyre->title); ?> <div class='grid_8 alpha catalog-card'> <h2 class="title1"><span><span>Каталог шин</span></span></h2> <div class='grid_2 alpha'> <?php $small = Image::getFile($dataProvider->data[0]->tyre->photo, 'small'); $small = CHtml::image($small, 'Шина ' . CHtml::encode($dataProvider->data[0]->tyre->producer->title . ' ' . $dataProvider->data[0]->tyre->title)); if ($big = Image::getFile($dataProvider->data[0]->tyre->photo, 'big')) { echo CHtml::link($small, $big, array('class' => 'fancybox', 'title' => 'Шина ' . CHtml::encode($dataProvider->data[0]->tyre->producer->title . ' ' . $dataProvider->data[0]->tyre->title))); } else { echo $small; } ?> </div> <div class='grid_6 omega item'> <h3><?php echo CHtml::encode($dataProvider->data[0]->tyre->producer->title . ' ' . $dataProvider->data[0]->tyre->title); ?> </h3> <div class='description'><?php echo $dataProvider->data[0]->tyre->description_marked; ?> </div> <?php $this->widget('widgets.socials.socials', array('model' => $model, 'options' => array('title' => $model->title, 'url' => CHtml::normalizeUrl(array('articles/view', 'alias' => $model->alias)), 'description' => CHtml::encode($model->description), 'printUrl' => CHtml::normalizeUrl(array('articles/print', 'alias' => $model->alias)))));
<div class='container_12 selection-result'> <?php if (!empty($model)) { ?> <div class='grid_8 alpha'> <?php foreach ($model as $size) { $tb = Image::getFile($size->disk->photo, 'small'); ?> <div class='item'> <ul> <li> <a href='<?php echo $tb ? Image::getFile($size->disk->photo, 'big') : CHtml::normalizeUrl(array('catalog/disks', 'aliasProducer' => $size->disk->producer->alias, 'aliasModel' => $size->disk->alias, 'aliasSize' => $size->alias)); ?> '><div class='tb'><?php echo CHtml::image($tb ? $tb : Yii::app()->params['disk.emptyPhoto.tb'], $size->title, array('title' => $size->title, 'width' => 120, 'height' => 120)); ?> </div></a> </li> <li> <h3><i><?php echo CHtml::link($size->disk->producer->title, array('catalog/disks', 'aliasProducer' => $size->disk->producer->alias)); ?> </i> <?php echo CHtml::link($size->disk->title, array('catalog/disks', 'aliasProducer' => $size->disk->producer->alias, 'aliasModel' => $size->disk->alias)); ?> </h3> <b class='size'><?php
?> <!-- id <?php echo $model->id; ?> --> <h2><?php echo $model->title; ?> </h2> <?php echo EString::getBackTime($model->publicated); ?> <hr class='space'/> <?php echo $model->photo ? CHtml::image(Image::getFile($model->photo, 'main'), $model->title, array('align' => 'left', 'style' => 'margin-right:1em;border:1px solid #eee;')) : ''; echo $model->preamble_marked; $this->widget('widgets.socials.socials', array('model' => $model, 'options' => array('title' => $model->title, 'url' => CHtml::normalizeUrl(array('articles/view', 'alias' => $model->alias)), 'description' => CHtml::encode($model->preamble), 'printUrl' => CHtml::normalizeUrl(array('articles/print', 'alias' => $model->alias))))); ?> <hr class='space clear' /> <?php echo $model->text_marked; ?> <hr class='space clear'/> <?php $this->widget('widgets.comments.comments', array('model' => $model));
<?php $this->breadcrumbs = array('Brands' => array('index'), $model->title); $this->menu = array(array('label' => 'Управление', 'url' => array('admin')), array('label' => 'Добавить', 'url' => array('create')), array('label' => 'Подробнее', 'url' => array('view', 'id' => $model->id)), array('label' => 'Обновить', 'url' => array('update', 'id' => $model->id)), array('label' => 'Удалить', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Вы уверены что хотите удалить эту запись?'))); ?> <h1>Просмотр бренда <?php echo $model->title; ?> </h1> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', 'title', 'alias', array('name' => 'logo', 'type' => 'image', 'value' => Image::getFile($model->logo, 'big')), array('name' => 'archive', 'value' => L::item('ArchiveStatus', $model->archive)), 'country', 'description_marked:html')));