Skip to content
Browse files

views:

"<?=" -> "<?php echo"
"foreach(){}" -> "foreach(): endforeach;"
for better compatibility with php5
controllers,models:
all messages stores in /messages/msg
Signed-off-by:d1ffuz0r <ап@10.65.197.35>
  • Loading branch information...
1 parent 28ec331 commit da2fda3964f6acb8b1865128b60fb64f6bfc1586 d1ffuz0r committed
View
3 .htaccess
@@ -0,0 +1,3 @@
+RewriteEngine on
+RewriteCond $1 !^(index\.php|img|style\.css|jquery\.js|slider\.css|robots\.txt)
+RewriteRule ^(.*)$ /index.php/$1 [L]
View
2 application/bootstrap.php
@@ -76,7 +76,7 @@
*/
Kohana::modules(array(
// 'auth' => MODPATH.'auth', // Basic authentication
- // 'cache' => MODPATH.'cache', // Caching with multiple backends
+ 'cache' => MODPATH.'cache', // Caching with multiple backends
// 'codebench' => MODPATH.'codebench', // Benchmarking tool
'database' => MODPATH.'database', // Database access
// 'image' => MODPATH.'image', // Image manipulation
View
2 application/classes/controller/admin.php
@@ -24,7 +24,7 @@ public function action_index()
{
$this->template->title = __('Ошибка');
$this->template->content = View::factory('tpl/msg')
- ->set('msg','В этот раздел имеют доступ только пользователи с рангом: 1');
+ ->set('msg',Kohana::message('msg', 'no_access'));
}
}
}
View
2 application/classes/controller/auth.php
@@ -51,6 +51,6 @@ public function action_logout()
$this->template->title = __('До свидания');
$this->template->content = View::factory('tpl/msg')
- ->set('msg', 'До свидания! Приходите ещё!');
+ ->set('msg',Kohana::message('msg','bye'));
}
}
View
2 application/classes/controller/cashier.php
@@ -24,7 +24,7 @@ public function action_index()
{
$this->template->title = __('Ошибка');
$this->template->content = View::factory('tpl/msg')
- ->set('msg','В этот раздел имеют доступ только пользователи с рангом: 1');
+ ->set('msg',Kohana::message('msg', 'no_access'));
}
}
/**
View
2 application/classes/controller/page.php
@@ -73,7 +73,7 @@ public function action_kart()
{
$this->template->title = __('Ошибка');
$this->template->content = View::factory('tpl/msg')
- ->set('msg','Вы не авторизированы');
+ ->set('msg',Kohana::message('msg','not_login'));
}
}
/**
View
10 application/classes/controller/shop.php
@@ -27,7 +27,7 @@ public function action_new_order($id)
{
$this->template->title = __('Ошибка');
$this->template->content = View::factory('tpl/msg')
- ->set('msg', 'Вы не авторизированы');
+ ->set('msg',Kohana::message('msg','not_login'));
}
}
@@ -66,7 +66,7 @@ public function action_add_order()
{
$this->template->title = __('Ошибка');
$this->template->content = View::factory('tpl/msg')
- ->set('msg', 'Вы не заполнили все поля');
+ ->set('msg', Kohana::message('msg','empty_field'));
}
}
@@ -93,7 +93,7 @@ public function action_search()
{
$this->template->title = __('Ошибка');
$this->template->content = View::factory('tpl/msg')
- ->set('msg', 'Вы не заполнили поле поиска');
+ ->set('msg', Kohana::message('msg','not_search'));
}
}
@@ -107,7 +107,7 @@ public function action_order_y($id)
$order->set_status($id, 3);
$this->template->title = __('Подтверждено');
$this->template->content = View::factory('tpl/msg')
- ->set('msg', '<h2>Заказ принят</h2>');
+ ->set('msg', Kohana::message('msg','order_add'));
}
/**
@@ -120,7 +120,7 @@ public function action_order_n($id)
$order->set_status($id, 2);
$this->template->title = __('Подтверждено');
$this->template->content = View::factory('tpl/msg')
- ->set('msg', '<h2>Заказ отклонён</h2>');
+ ->set('msg', Kohana::message('msg','order_denied'));
}
}
View
3 application/classes/controller/view.php
@@ -25,6 +25,7 @@ public function action_cat($cat)
$per_page = $pagination->items_per_page;
$offset = $per_page * ($page-1);
$page_links = $pagination->render();
+
$this->template->title = __('Просмотр категории');
$this->template->content = View::factory('page/view/cat')
->set('id', $shop->view_category($cat,$offset))
@@ -37,8 +38,8 @@ public function action_cat($cat)
public function action_product($id)
{
$shop = Model::factory('shop');
- $this->template->title = __('Просмотр категории');
+ $this->template->title = __('Просмотр категории');
$this->template->content = View::factory('page/view/product')
->set('id',$shop->view_product($id));
}
View
6 application/classes/model/auth.php
@@ -24,11 +24,11 @@ public function login($login, $password)
Cookie::set('loged_in', TRUE);
Cookie::set('username', $login);
- return 'Вы авторизированы';
+ return Kohana::message('msg','auth_success');
}
else
{
- return 'Ошибка. введите правильный логин или пароль';
+ return Kohana::message('msg','auth_error');
}
}
@@ -46,7 +46,7 @@ public function register($login, $password, $email)
->execute();
if ($query->count()>=1)
{
- return 'Ошибка. такой логин уже существует';
+ return Kohana::message('msg', 'reg_error');
}
else
{
View
2 application/classes/model/order.php
@@ -87,7 +87,7 @@ public function add_order($array,$status)
$price
))
->execute();
- return '<h2>Ваш заказ добавлен.<br>№ заказа:' . $id . '<br>Просмотреть ваши заказы можно на странице <a href="/orders">Заказы</a></h2>';
+ return Kohana::message('msg','order_add');
}
/**
View
17 application/messages/msg.php
@@ -0,0 +1,17 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+return array(
+ 'no_access' => 'Ваш уровень доступа не позволяет просматрвать эту страницу',
+ 'bye' => 'До свидания!',
+ 'auth_success' => 'Добро пожаловать! Вы авторизированы.',
+ 'auth_error' => 'Ошибка. введите правильный логин или пароль',
+ 'reg_error' => 'Ошибка. такой логин уже существует',
+ 'reg_success' => 'Добро пожаловать! Вы зарегистрированы.',
+ 'not_login' => 'Ощибка. Вы не авторизованы!',
+ 'empty_field' => 'Вы не заполнили все поля',
+ 'empty_search' => 'Вы не заполнили поле поиска',
+ 'order_access' => 'Заказ принят',
+ 'order_denied' => 'Заказ отклонён',
+ 'order_add' => 'Ваш заказ принят.<br>Просмотреть заказы можно на странице <a href="/orders">Заказы</a>'
+
+);
View
4 application/views/cashier/index.php
@@ -2,8 +2,8 @@
<hr>
<table width="100%">
<tr align="center" height="150">
- <td width="50%"><a href="/cashier/order_manager"><img src="<?=Kohana::$base_url;?>img/order_manager.png" title="Менеджер заказов"></a></td>
- <td width="50%"><a href="/cashier/order_add"><img src="<?=Kohana::$base_url;?>img/order_add.png" title="Оформить заказ"></a></td>
+ <td width="50%"><a href="/cashier/order_manager"><img src="<?php echo Kohana::$base_url;?>img/order_manager.png" title="Менеджер заказов"></a></td>
+ <td width="50%"><a href="/cashier/order_add"><img src="<?php echo Kohana::$base_url;?>img/order_add.png" title="Оформить заказ"></a></td>
</tr>
<tr align="center">
<td>Менеджер заказов</td>
View
26 application/views/cashier/order_manager.php
@@ -1,19 +1,19 @@
<h1>Менеджер заказов</h1>
<hr>
<h2>
-<? foreach ($list as $l) { ?>
-id:<?=$l->ord_id ?> | дата:<?=$l->ord_date ?> | товар:<a href="/view/product/<?=$l->ord_product ?>"><?=$l->ord_product ?></a> сумма: <?=$l->ord_price?> р. | статус:<? if($l->ord_status == 1 ) { echo 'в рассмотрении'; } else {echo '<a style="color:red;">отказано</a>';}?><br>
+<? foreach ($list as $l) : ?>
+id:<?php echo $l->ord_id ?> | дата:<?php echo $l->ord_date ?> | товар:<a href="/view/product/<?php echo $l->ord_product ?>"><?php echo $l->ord_product ?></a> сумма: <?php echo $l->ord_price?> р. | статус:<? if($l->ord_status == 1 ) { echo 'в рассмотрении'; } else {echo '<a style="color:red;">отказано</a>';}?><br>
О заказщике:<br>
-Имя:<?=$l->ord_realname ?><br>
-Фамилия:<?=$l->ord_family ?><br>
-Отчество:<?=$l->ord_ot4estvo ?><br>
-Телефон:<?=$l->ord_telephone ?><br>
-e-mail:<?=$l->ord_email ?><br>
-Страна:<?=$l->ord_country ?><br>
-Регион:<?=$l->ord_region ?><br>
-Город:<?=$l->ord_city ?><br>
-Индекс:<?=$l->ord_postindex ?><br>
-<p align="right"><a href="/shop/order_y/<?=$l->ord_id ?>">принять</a> | <a href="/shop/order_n/<?=$l->ord_id ?>">отказать</a></p>
+Имя:<?php echo $l->ord_realname ?><br>
+Фамилия:<?php echo $l->ord_family ?><br>
+Отчество:<?php echo $l->ord_ot4estvo ?><br>
+Телефон:<?php echo $l->ord_telephone ?><br>
+e-mail:<?php echo $l->ord_email ?><br>
+Страна:<?php echo $l->ord_country ?><br>
+Регион:<?php echo $l->ord_region ?><br>
+Город:<?php echo $l->ord_city ?><br>
+Индекс:<?php echo $l->ord_postindex ?><br>
+<p align="right"><a href="/shop/order_y/<?php echo $l->ord_id ?>">принять</a> | <a href="/shop/order_n/<?php echo $l->ord_id ?>">отказать</a></p>
<hr>
-<? }?>
+<? endforeach; ?>
</h2>
View
2 application/views/page/auth/login.php
@@ -1,6 +1,6 @@
<h1>Вход</h1>
<center>
-<form action="<?=URL::base();?>auth/login" method="POST">
+<form action="<?php echo URL::base();?>auth/login" method="POST">
<h2>Логин:</h2>
<input type="text" name="login"><br/>
<h2>Пароль:</h2>
View
2 application/views/page/auth/reg.php
@@ -1,6 +1,6 @@
<h1>Регистрация</h1>
<center>
- <form action="<?=URL::base();?>auth/register" method="POST">
+ <form action="<?php echo URL::base();?>auth/register" method="POST">
<h2>Логин:</h2>
<input type="text" name="login"><br/>
<h2>Пароль:</h2>
View
36 application/views/page/index.php
@@ -57,12 +57,12 @@ function manageControls(position){
<tr>
<div id="slideshow">
<div id="slidesContainer">
-<? foreach($service as $serv) { ?>
+<? foreach($service as $serv) : ?>
<div class="slide">
- <a class="page_header_img"><img src="img/<?=$serv->image ?>" alt="<?=$serv->rusname ?>" /></a>
- <a class="page_header_text" style="font-size: 20px;"><?=$serv->text ?></a>
+ <a class="page_header_img"><img src="img/<?php echo $serv->image ?>" alt="<?php echo $serv->rusname ?>" /></a>
+ <a class="page_header_text" style="font-size: 20px;"><?php echo $serv->text ?></a>
</div>
-<? } ?>
+<? endforeach; ?>
</div>
</div>
</tr>
@@ -82,38 +82,38 @@ function manageControls(position){
<tr>
<? foreach($prodone as $desk){?>
<td class="page_center_button">
- <a class="page_center_buy" <? if(Cookie::get('loged_in') == TRUE) { ?> href="/shop/new_order/<?=$desk->p_id ?>" title="Оформить заказ"<? } ?> ><span>buy</span></a>
- <a class="page_center_info" href="/view/product/<?=$desk->p_id ?>" title="Просмотр"><span>more-info</span></a>
+ <a class="page_center_buy" <? if(Cookie::get('loged_in') == TRUE) { ?> href="/shop/new_order/<?php echo $desk->p_id ?>" title="Оформить заказ"<? } ?> ><span>buy</span></a>
+ <a class="page_center_info" href="/view/product/<?php echo $desk->p_id ?>" title="Просмотр"><span>more-info</span></a>
</td>
<td class="page_center_content">
<div class="page_center_text">
- <span class="blue2"><?=$desk->p_rusname ?></span><br/>
- <span class="gray"><?=$desk->p_desc ?></span><br/>
+ <span class="blue2"><?php echo $desk->p_rusname ?></span><br/>
+ <span class="gray"><?php echo $desk->p_desc ?></span><br/>
<span class="gray">Cras ut: ligula nec</span><br/>
<br/>
- <span class="green"><?=round($desk->p_price)?> руб</span><br/>
+ <span class="green"><?php echo round($desk->p_price)?> руб</span><br/>
</div>
</td>
-<td class="page_center_img"><img align="right" src="<?=Kohana::$base_url;?>img/<?=$desk->p_category ?>/<?=$desk->p_name ?>.png" alt="" /> </td>
+<td class="page_center_img"><img align="right" src="<?php echo Kohana::$base_url;?>img/<?php echo $desk->p_category ?>/<?php echo $desk->p_name ?>.png" alt="" /> </td>
<? } ?>
</tr>
<tr>
-<? foreach($prowthree as $desk){?>
+<? foreach($prowthree as $desk):?>
<td class="page_center_button">
- <a class="page_center_buy" <? if(Cookie::get('loged_in') == TRUE) { ?> href="/shop/new_order/<?=$desk->p_id ?>" title="Оформить заказ"><? } ?></a>
- <a class="page_center_info" href="/view/product/<?=$desk->p_id ?>" title="Просмотр"><span>more-info</span></a>
+ <a class="page_center_buy" <? if(Cookie::get('loged_in') == TRUE) { ?> href="/shop/new_order/<?php echo $desk->p_id ?>" title="Оформить заказ"><? } ?>></a>
+ <a class="page_center_info" href="/view/product/<?php echo $desk->p_id ?>" title="Просмотр"><span>more-info</span></a>
</td>
<td class="page_center_content">
<div class="page_center_text">
- <span class="blue2"><?=$desk->p_rusname ?></span><br/>
- <span class="gray"><?=$desk->p_desc ?></span><br/>
+ <span class="blue2"><?php echo $desk->p_rusname ?></span><br/>
+ <span class="gray"><?php echo $desk->p_desc ?></span><br/>
<span class="gray">Cras ut: ligula nec</span><br/>
<br/>
- <span class="green"><?=round($desk->p_price)?> руб</span><br/>
+ <span class="green"><?php echo round($desk->p_price)?> руб</span><br/>
</div>
</td>
-<td class="page_center_img"><img align="right" src="<?=Kohana::$base_url;?>img/<?=$desk->p_category ?>/<?=$desk->p_name ?>.png" alt="" /> </td>
-<? } ?>
+<td class="page_center_img"><img align="right" src="<?php echo Kohana::$base_url;?>img/<?php echo $desk->p_category ?>/<?php echo $desk->p_name ?>.png" alt="" /> </td>
+<? endforeach; ?>
</tr>
</table>
</div>
View
6 application/views/page/kart.php
@@ -1,8 +1,8 @@
<h1>Ваши покупки</h1>
<hr>
<h2>
-<? foreach ($list as $l) { ?>
-id:<?=$l->ord_id?> | дата:<?=$l->ord_date ?> | товар:<a href="/view/product/<?=$l->ord_product ?>"><?=$l->ord_product ?></a> | статус: <? if($l->ord_status == 3 ) echo 'принято';?>
+<? foreach ($list as $l) : ?>
+id:<?php echo $l->ord_id?> | дата:<?php echo $l->ord_date ?> | товар:<a href="/view/product/<?php echo $l->ord_product ?>"><?php echo $l->ord_product ?></a> | статус: <? if($l->ord_status == 3 ) echo 'принято';?>
<hr>
-<? }?>
+<? endforeach;?>
</h2>
View
6 application/views/page/orders.php
@@ -1,8 +1,8 @@
<h1>Ваши заказы</h1>
<hr>
<h2>
-<? foreach ($list as $l) { ?>
-id:<?=$l->ord_id ?> | дата:<?=$l->ord_date ?> | товар:<a href="/view/product/<?=$l->ord_product ?>"><?=$l->ord_product ?></a> | статус:<? if($l->ord_status == 1 ) { echo 'в рассмотрении'; } else {echo '<a style="color:red;">отказано</a>';}?>
+<? foreach ($list as $l) : ?>
+id:<?php echo $l->ord_id ?> | дата:<?php echo $l->ord_date ?> | товар:<a href="/view/product/<?php echo $l->ord_product ?>"><?php echo $l->ord_product ?></a> | статус:<? if($l->ord_status == 1 ) { echo 'в рассмотрении'; } else {echo '<a style="color:red;">отказано</a>';}?>
<hr>
-<? }?>
+<? endforeach; ?>
</h2>
View
18 application/views/page/shop/new_order.php
@@ -3,17 +3,17 @@
<h2>
<form action="/shop/add_order/now" method="POST">
<table>
- <? foreach ($product as $p) { ?>
+ <? foreach ($product as $p) : ?>
<tr>
<td width="120">
<label>Товар:</label>
</td>
<td>
- <?=$p->p_rusname ?>
+ <?php echo $p->p_rusname ?>
</td>
<td>
- <input type="hidden" name="ord_username" value="<?=Cookie::get('username');?>">
- <input type="hidden" name="ord_id" value="<?=$p->p_id ?>">
+ <input type="hidden" name="ord_username" value="<?php echo Cookie::get('username');?>">
+ <input type="hidden" name="ord_id" value="<?php echo $p->p_id ?>">
</td>
</tr>
<tr>
@@ -29,8 +29,8 @@
<label>Цена(с НДС):</label>
</td>
<td>
- <?=round($p->p_ndsprice) ?> р.
- <input type="hidden" name="ord_price" value="<?=round($p->p_ndsprice) ?>">
+ <?php echo round($p->p_ndsprice) ?> р.
+ <input type="hidden" name="ord_price" value="<?php echo round($p->p_ndsprice) ?>">
</td>
</tr>
<tr>
@@ -113,8 +113,8 @@
<label>Город(etc.):</label>
</td>
<td>
- <input type="hidden" name="ord_city" value="<?=Cookie::get('city')?>">
- <?=Cookie::get('r_city')?>
+ <input type="hidden" name="ord_city" value="<?php echo Cookie::get('city')?>">
+ <?php echo Cookie::get('r_city')?>
</td>
</tr>
<tr>
@@ -143,7 +143,7 @@
</td>
</tr>
</table>
- <? } ?>
+ <? endforeach; ?>
</form>
</h2>
<p style="color: red; float: right;">Все поля обязательны к заполнению</p>
View
14 application/views/page/view/cat.php
@@ -1,16 +1,16 @@
-<center><?=$pagination?></center>
+<center><?php echo $pagination?></center>
<hr>
<table width="100%">
-<? foreach($id as $desk){?>
+<? foreach($id as $desk):?>
<tr>
<h1><?=$desk->p_rusname ?></h1>
-<h2>Описание: <?=$desk->p_desc ?></h2><img src="<?=Kohana::$base_url;?>img/<?=$desk->p_category ?>/<?=$desk->p_name ?>.png" alt="" />
-<h2 style="color:red;">Цена: <?=round($desk->p_ndsprice)?> руб | <?=round($desk->p_kursprice,2);?> $</h2>
-<h3 align="right"><a href="/view/product/<?=$desk->p_id ?>">просмотр</a><? if(Cookie::get('loged_in') == TRUE) { ?> | <a href="/shop/new_order/<?=$desk->p_id ?>">оформить заказ</a><? } ?></h3>
+<h2>Описание: <?=$desk->p_desc ?></h2><img src="<?php echo Kohana::$base_url;?>img/<?php echo $desk->p_category ?>/<?php echo $desk->p_name ?>.png" alt="" />
+<h2 style="color:red;">Цена: <?php echo round($desk->p_ndsprice)?> руб | <?=round($desk->p_kursprice,2);?> $</h2>
+<h3 align="right"><a href="/view/product/<?php echo $desk->p_id ?>">просмотр</a><? if(Cookie::get('loged_in') == TRUE) { ?> | <a href="/shop/new_order/<?php echo $desk->p_id ?>">оформить заказ</a><? } ?></h3>
</tr>
<hr>
-<? } ?>
+<? endforeach; ?>
</table>
-<center><?=$pagination?></center>
+<center><?php echo $pagination?></center>
<hr>
<p align="right" style="color: red;">цены с учётом ндс</p>
View
4 application/views/page/view/product.php
@@ -1,9 +1,9 @@
<table width="100%">
-<? foreach($id as $desk){?>
+<? foreach($id as $desk):?>
<tr height="152">
<h1><?=$desk->p_rusname ?></h1>
<h2>Описание: <?=$desk->p_desc ?></h2><img src="<?=Kohana::$base_url;?>img/<?=$desk->p_category ?>/<?=$desk->p_name ?>.png" alt="" />
<h2 style="color:red;">Цена: <?=round($desk->p_ndsprice)?> руб | <?=round($desk->p_kursprice,2);?> $</h2><h2 align="right"><? if(Cookie::get('loged_in') == TRUE) { ?><a href="/shop/new_order/<?=$desk->p_id ?>">оформить заказ</a><? } ?></h2>
</tr>
-<? } ?>
+<? endforeach; ?>
</table>
View
14 application/views/page/view/search.php
@@ -1,16 +1,16 @@
<h1>Результат поиска</h1>
-Вы искали: <form action="/shop/search/q" method="POST"><input type="text" name="search_q" value="<?=$query['search_q'] ?>"><input type="submit" value="Искать"></form>
+Вы искали: <form action="/shop/search/q" method="POST"><input type="text" name="search_q" value="<?php echo $query['search_q'] ?>"><input type="submit" value="Искать"></form>
<hr>
<table width="100%">
-<? foreach($id as $desk){?>
+<? foreach($id as $desk):?>
<tr>
-<h1><?=$desk->p_rusname ?></h1>
-<h2>Описание: <?=$desk->p_desc ?></h2><img src="<?=Kohana::$base_url;?>img/<?=$desk->p_category ?>/<?=$desk->p_name ?>.png" alt="" />
-<h2 style="color:red;">Цена: <?=round($desk->p_price)?> руб</h2>
-<h3 align="right"><a href="/view/product/<?=$desk->p_id ?>">просмотр</a><? if(Cookie::get('loged_in') == TRUE) { ?> | <a href="/shop/new_order/<?=$desk->p_id ?>">оформить заказ</a><? } ?></h3>
+<h1><?php echo $desk->p_rusname ?></h1>
+<h2>Описание: <?php echo $desk->p_desc ?></h2><img src="<?php echo Kohana::$base_url;?>img/<?php echo $desk->p_category ?>/<?php echo $desk->p_name ?>.png" alt="" />
+<h2 style="color:red;">Цена: <?php echo round($desk->p_price)?> руб</h2>
+<h3 align="right"><a href="/view/product/<?php echo $desk->p_id ?>">просмотр</a><? if(Cookie::get('loged_in') == TRUE) { ?> | <a href="/shop/new_order/<?php echo $desk->p_id ?>">оформить заказ</a><? } ?></h3>
</tr>
<hr>
-<? } ?>
+<? endforeach; ?>
</table>
<hr>
<p align="right" style="color: red;">цены с учётом ндс</p>
View
18 application/views/page/view/user.php
@@ -1,13 +1,13 @@
<h1>Просмотр пользователя</h1>
<hr>
<h1>
-<? foreach ($desk as $user) { ?>
-Логин: <?=$user->u_name ?><br/>
-E-mail: <?=$user->u_email ?><br/>
-О себе: <?=$user->u_data ?><br/>
-Всего покупок: <?=$user->u_allprice ;?><br/>
-Ранг: <? if($user->u_rang ==1) { echo 'администратор'; }
- elseif($user->u_rang ==2){ echo 'продавец';}
- elseif($user->u_rang ==3){ echo'пользователь';}?><br/>
-<? } ?>
+<? foreach ($desk as $user) : ?>
+Логин: <?php echo $user->u_name ?><br/>
+E-mail: <?php echo $user->u_email ?><br/>
+О себе: <?php echo $user->u_data ?><br/>
+Всего покупок: <?php echo $user->u_allprice ;?><br/>
+Ранг: <? if($user->u_rang ==1 ) { echo 'администратор'; }
+ elseif($user->u_rang ==2 ) { echo 'продавец';}
+ elseif($user->u_rang ==3 ) { echo'пользователь';}?><br/>
+<? endforeach; ?>
</h1>
View
2 application/views/tpl/footer.php
@@ -1,6 +1,6 @@
<!--bottom panel-->
<div id="Bottom">
- <p class="down" align="right">Copyright &copy; 2011, <a href="/view/user/admin">Design by: <?=Kohana::config('site.copyright');?></a> </p>
+ <p class="down" align="right">Copyright &copy; 2011, <a href="/view/user/admin">Design by: <?php echo Kohana::config('site.copyright');?></a> </p>
<div class="down2"></div>
</div>
<!--end bottom panel-->
View
4 application/views/tpl/header.php
@@ -6,13 +6,13 @@
<? if(Cookie::get('loged_in') == FALSE) {?>
<a class="registration" href="/reg">РЕГИСТРАЦИЯ</a><a class="log-in" href="/login">ВХОД</a>
<? } else {?>
- <a class="registration" href="/view/user/<?=Cookie::get('username');?>">Привет <?=Cookie::get('username');?></a><a class="log-in" href="/auth/logout">Выход</a>
+ <a class="registration" href="/view/user/<?php echo Cookie::get('username');?>">Привет <?php echo Cookie::get('username');?></a><a class="log-in" href="/auth/logout">Выход</a>
<? } ?>
</div>
</div>
<div id="Head_right">
<div id="Logo">
- <div id="Name"><span class="blue"><?=Kohana::config('site.title');?></span></div>
+ <div id="Name"><span class="blue"><?php echo Kohana::config('site.title');?></span></div>
<div id="Informations"></div>
</div>
<div id="Top_menu">
View
10 application/views/tpl/left.php
@@ -6,9 +6,9 @@
<div class="menu_header_right"></div>
</div>
<div id="Menu_content">
- <? foreach ($category as $c) { ?>
- <a class="menu_item" href="/view/cat/<?=$c->c_name ?>"><span><?=$c->c_rusname ?></span></a><br/>
- <? } ?>
+ <? foreach ($category as $c) : ?>
+ <a class="menu_item" href="/view/cat/<?php echo $c->c_name ?>"><span><?php echo $c->c_rusname ?></span></a><br/>
+ <? endforeach; ?>
</div>
</div>
<!--search-->
@@ -33,7 +33,9 @@
<span class="poll_question">Выберите отделение</span><br/>
<form action="/changecity" method="POST">
<select name="region">
- <? foreach($regions as $r) {?><option value="<?=$r->name ?>"><?=$r->rusname ?></option><? } ?>
+ <? foreach($regions as $r) :?>
+ <option value="<?php echo $r->name ?>"><?php echo $r->rusname ?></option>
+ <? endforeach; ?>
<input type="submit" value="выбрать">
</select>
</form>
View
2 application/views/tpl/msg.php
@@ -1 +1 @@
-<?=$msg ?>
+<?php echo $msg ?>
View
18 application/views/tpl/template.php
@@ -1,28 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title><?=$title ?></title>
+ <title><?php echo $title ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <?=html::style('style.css'); ?>
- <?=html::style('slider.css'); ?>
- <?=html::script('jquery.js'); ?>
+ <?php echo html::style('style.css'); ?>
+ <?php echo html::style('slider.css'); ?>
+ <?php echo html::script('jquery.js'); ?>
</head>
<body>
<div id="WholePage">
<div id="Inner">
<div id="Container">
-<?=View::factory('tpl/header'); ?>
+<?php echo View::factory('tpl/header'); ?>
<div id="CentralPart">
-<?=View::factory('tpl/left')->set('category',$categories)->set('regions',$regions);?>
+<?php echo View::factory('tpl/left')->set('category',$categories)->set('regions',$regions);?>
<div id="RightPart">
<div id="Page">
-<?=$content ?>
+<?php echo $content ?>
</div>
</div>
<div class="cleaner"></div>
</div>
-<?=View::factory('tpl/footer'); ?>
-<?=View::factory('profiler/stats'); ?>
+<?php echo View::factory('tpl/footer'); ?>
+<?php echo View::factory('profiler/stats'); ?>
</div>
</div>
</div>

0 comments on commit da2fda3

Please sign in to comment.
Something went wrong with that request. Please try again.