Commit 48680c56 authored by Яков's avatar Яков
Browse files

first

parents
<script type="text/javascript">
/*
var video = {
video_link_pattern: /:\/\/www\.youtube\.com.*v=([a-zA-Z0-9\-_]+)/,
video_link_pattern__vk: /vk.com\/video_ext\.php\?(.*)" width/,
overlay: null,
video_by_link_val: null,
video_by_link: function(el){
var v = $.trim(el.val());
if(v != '' && v != video.video_by_link_val && (video.video_link_pattern.test(v) || video.video_link_pattern__vk.test(v))){
var id = video.video_link_pattern.test(v) ? video.video_link_pattern.exec(v) : video.video_link_pattern__vk.exec(v);
video.overlay = sOverlay($('form'));
$.ajax({
url: '/a/video/gdata?id=' + id[1].replace(/=/gi, ':').replace(/&/gi, ';') + '&type=' + (video.video_link_pattern.test(v) ? 'youtube' : 'vk'),
dataType: 'json',
success: function(json){
var parent = $('#video_cover_widget_form_photo_upload');
var hidden = parent.find('input[type="hidden"]');
parent.removeClass('no_image');
parent.css('background-image', 'url(' + json.image.filelink + ')');
parent.find('.uploader_messages').html('');
hidden.val(json.image.filename);
$('#video_vid').val(id[1]);
$('#video_ru_title').val(json.title);
$('#video_en_title').val(json.title);
el.attr('disabled', false);
video.overlay.remove();
}
});
video.video_by_link_val = v;
}
},
init_link: function(){
$('#video_vid').on({
change: function(){video.video_by_link($(this));},
keyup: function(){video.video_by_link($(this));},
keydown: function(){video.video_by_link($(this));}
});
video.video_by_link_val = $.trim($('#video_yt_vid').val());
},
play: function(){
$('#select_modal').html('<iframe width="760" height="463" src="http://www.youtube.com/embed/' + $('#video_url_id').val() + '" frameborder="0" allowfullscreen></iframe>');
$('#select_modal').modal();
}
};
$(document).ready(function(){
video.init_link();
});
*/
</script>
<?php
include_partial('main/title', array('elem' => $video));
?>
\ No newline at end of file
<?php
$available = $video->getTranslation()->en->available;
if($available)
{
echo $video->getTranslation()->en->title;
}
else
{
echo '<div class="notActive">Не активно</div>';
}
\ No newline at end of file
<?php
$available = $video->getTranslation()->ru->available;
if($available)
{
echo $video->getTranslation()->ru->title;
}
else
{
echo '<div class="notActive">Не активно</div>';
}
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php include_slot('title', sfConfig::get('app_arm_title')); ?></title>
<?php
// <link rel="shortcut icon" href="/i/favicon.ico" type="image/x-icon"/>
?>
<script type="text/javascript">
var sf_app = '<?php echo sfConfig::get('sf_app');?>';
var sf_prefix = '<?php echo isset($_SERVER['PATH_PREFIX']) ? $_SERVER['PATH_PREFIX'] : '';?>';
var sf_user = <?php echo $sf_user->isAuthenticated() ? $sf_user->getUserId() : 'false';?>;
var sf_user_root = <?php echo ($sf_user->isAuthenticated() ? ($sf_user->getUsername() == 'root' ? 'true' : 'false') : 'false');?>;
var sf_ws_pub = '<?php echo sfConfig::get('app_ws_pub');?>';
</script>
<?php
include_http_metas();
include_stylesheets();
include_javascripts();
$module_image_sizes = sfConfig::get('app_' . $this->getModuleName() . '_sizes');
if(is_array($module_image_sizes) && count($module_image_sizes) > 0 && $this->getModuleName() != 'cat'){
unset($module_image_sizes['min']);
foreach ($module_image_sizes as $size_key => $size){
$module_image_size = $size_key;
}
if($module_image_size == 'S' || isset($module_image_sizes['equal'])){
$module_image_size = '';
}
}
if(isset($module_image_size)){
echo '<script type="text/javascript">ftm.openSize = \'' . $module_image_size . '\';</script>';
}
?>
<link rel="icon" href="/i/favicon.png" type="image/x-icon">
</head>
<body>
<div class="lui__root">
<div class="ftm_wrap ftm" onclick="$(this).hide();">
<div class="ftm__actions">
<div class="ftm__close"></div>
<div class="ftm__rotate" title="Повернуть по часовой стрелке" onclick="ftm.rotate(this);event.stopPropagation();return false;"></div>
</div>
<table width="100%" height="100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" align="center">
<div class="fotorama" data-auto="false" onclick="event.stopPropagation();"></div>
</td>
</tr>
</table>
</div>
<?php
if (!$sf_user->isAuthenticated()) {
echo $sf_content;
} else {
?>
<table class="lui__desktop" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="lui__desktop_left invert" style="padding-top:20px;">
<div class="lui__desktop_left__wrapper">
<a href="/" target="_blank"><img class="logo__full" src="/i/logo.svg" hspace="20" width="100" height="51" style="margin: 0 auto; display: block;"/></a>
<i class="br20" style="border-bottom:1px solid #393f41"></i>
<b class="br20"></b>
<div class="lui__nav__wrapper" style="position:relative;">
<ul class="lui__nav">
<?php
function menu_cmp($a, $b)
{
if ($a['order'] == $b['order']) {
return 0;
}
return ($a['order'] < $b['order']) ? -1 : 1;
}
$parser = new sfYamlParser();
$modules = glob(sfConfig::get('sf_app_module_dir') . '/*');
$links = array();
foreach ($modules as $k => $v) {
if (file_exists($v . '/config/generator.yml')) {
$p = $parser->parse(file_get_contents($v . '/config/generator.yml'));
$module = basename($v);
if (!$sf_user->hasCredential($module . '_index') || @$p['generator']['param']['skip'] || @$p['generator']['param']['config']['list']['title'] == '') {
continue;
}
if ($sf_user->getUsername() != 'root' && basename($v) == 'manager') {
continue;
}
$model = str_replace(' ', '', ucwords(str_replace('_', ' ', $module)));
$count = '';
if (class_exists($model) && method_exists($model, 'getMenuCount')) {
$countc = $module::getMenuCount($sf_user);
if ($countc > 0) {
$count = '&nbsp;<span class="lui__nav_menu__count">' . $countc . '</span>';
}
}
$links[] = array(
'm' => $module,
'title' => $p['generator']['param']['config']['list']['title'] . $count,
'order' => isset($p['generator']['param']['order']) ? $p['generator']['param']['order'] : 0,
'group' => isset($p['generator']['param']['group']) ? $p['generator']['param']['group'] : false,
'add' => isset($p['generator']['param']['add']) ? $p['generator']['param']['add'] : true,
'hr' => isset($p['generator']['param']['hr']),
);
}
}
usort($links, 'menu_cmp');
foreach ($links as $k => $v) {
if ($sf_user->hasCredential($v['m'] . '_index')) {
if ($v['group']) {
echo '<i class="br10"></i>';
if ($v['group'] != '-') {
echo '<li><b>' . $v['group'] . '</b></li>';
}
}
echo '<li' . ($this->getModuleName() == $v['m'] ? ' class="current"' : '') . '>';
echo '<a class="lui__nav_a_' . $v['m'] . '" href="' . url_for('@' . $v['m']) . '">' . $v['title'] . '</a>';
echo '</li>';
if ($v['hr'] && $k != count($links) - 1) {
echo '<i class="hr20" style="margin:10px 0;background:#2d3436;"></i>';
}
}
}
echo '</ul>';
echo '</div>';
echo '<div class="fixed_user_menu">';
echo '<a href="' . url_for('@cs_setting') . '" class="sprite_link sprite_link_settings">Настройки</a><i class="br10"></i>';
echo '<a href="' . url_for('@signout') . '" class="sprite_link sprite_link_logout">Выйти</a>';
echo '</div>';
?>
</div>
</td>
<td width="100%" class="lui__desktop_right" height="100%">
<div class="lui__desktop_right__wrapper <?php echo sfConfig::get('sf_app') . '_' . $this->getModuleName(); ?>">
<?php
echo $sf_content;
?>
</div>
</td>
</tr>
</table>
<?php
}
?>
</div>
<script type="text/javascript">
$(document).ready(function () {
var calc_lui__nav__wrapper = function () {
$('.lui__nav__wrapper').height($(window).height() - 200);
$('.lui__nav__wrapper').perfectScrollbar('update');
};
$('.lui__nav__wrapper').perfectScrollbar();
$('.lui__nav__wrapper').scroll(function () {
var top = $(this).scrollTop();
var bottom = $('.lui__nav').outerHeight() - $(this).outerHeight();
$(this).removeClass('lui__nav__wrapper__sh_top');
$(this).removeClass('lui__nav__wrapper__sh_bottom');
$(this).removeClass('lui__nav__wrapper__sh_bottom_top');
if (bottom < 0) {
return false;
}
if (top == 0) {
$(this).addClass('lui__nav__wrapper__sh_bottom');
} else if (top == bottom) {
$(this).addClass('lui__nav__wrapper__sh_top');
} else {
$(this).addClass('lui__nav__wrapper__sh_bottom_top');
}
}).scroll();
$(window).resize(function () {
calc_lui__nav__wrapper();
$('.lui__nav__wrapper').scroll();
}).resize();
});
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript">
var sf_app = '<?php echo sfConfig::get('sf_app');?>/';
var sf_prefix = '<?php echo isset($_SERVER['PATH_PREFIX']) ? $_SERVER['PATH_PREFIX'] : '';?>';
</script>
<?php
include_http_metas();
include_stylesheets();
include_javascripts();
?>
<title><?php include_slot('title', 'АРМ');?></title>
</head>
<body>
<div class="lui__root" style="padding:20px;">
<?php
echo $sf_content;
?>
</div>
<script type="text/javascript">
$(document).ready(function() {
});
</script>
</body>
</html>
\ No newline at end of file
default:
enabled: false
with_layout: false
lifetime: 2592000
\ No newline at end of file
prod:
logger:
class: sfNoLogger
param:
level: err
loggers: ~
all:
mailer:
param:
delivery_strategy: realtime
transport:
class: Swift_SmtpTransport
param:
host: localhost
port: 25
encryption: ~
username: ~
password: ~
storage:
class: sfSessionStorage
param:
session_name: om
session_cookie_lifetime: 2592000
routing:
class: sfPatternRouting
param:
generate_shortest_url: true
extra_parameters_as_query_string: true
view_cache:
class: sfFileCache
param:
automatic_cleaning_factor: 0
view_cache_manager:
class: sfViewCacheManager
param:
cache_key_use_vary_headers: true
cache_key_use_host_name: true
user:
class: myUser
param:
timeout: 604800
\ No newline at end of file
rendering: ~
security: ~
remember_me:
class: doAuthRememberMeFilter
cache: ~
execution: ~
\ No newline at end of file
detect_lang:
url: /
param: { module: user, action: detect_lang }
homepage:
url: /:sf_culture/
param: { module: main, action: index }
requirements:
sf_culture: (?:ru|en)
homepage_discount:
url: /:sf_culture/discount/:url/
param: { module: main, action: index }
search:
url: /:sf_culture/search/
param: { module: search, action: search }
article:
url: /:sf_culture/article/
param: { module: article, action: index }
article_show:
url: /:sf_culture/article/:alias/
param: { module: article, action: show }
review:
url: /:sf_culture/review/
param: { module: review, action: index }
discount:
url: /:sf_culture/discount/
param: { module: discount, action: index }
catalog:
url: /:sf_culture/catalog/
param: { module: catalog, action: index }
catalog_show:
url: /:sf_culture/catalog/:alias/
class: sfDoctrineRoute
options: { model: Cat, type: object }
param: { module: catalog, action: show }
product_show:
url: /:sf_culture/product/:alias/
class: sfDoctrineRoute
options: { model: Product, type: object }
param: { module: product, action: show }
basket:
url: /:sf_culture/basket/
param: { module: basket, action: index}
basket_complete:
url: /:sf_culture/basket/complete/
param: { module: basket, action: complete }
basket_check_discount:
url: /:sf_culture/basket/check_discount/
param: { module: discount, action: check_discount }
catalog_show_cat:
url: /catalog/:alias/
param: { module: catalog, action: show_cat }
basket_ajax:
url: /basket/ajax/
param: { module: basket, action: ajax }
catalog_show_prod:
url: /product/:alias/
param: { module: catalog, action: show_prod }
feedback:
url: /feedback/
param: { module: user, action: feedback }
exchange:
url: /exchange/
param: { module: exchange, action: exchange }
video:
url: /:sf_culture/video/
param: { module: video, action: index}
download:
url: /download/:type/:id/
param: { module: main, action: dl}
callback:
url: /callback/
param: { module: callback, action: new}
uploader:
url: /uploader/
param: { module: main, action: uploader }
check_discount_term:
url: /check_discount_term/
param: { module: discount, action: check_discount_term }
page_show:
url: /:sf_culture/:alias/
class: sfDoctrineRoute
options: { model: Page, type: object }
param: { module: pages, action: show }
sitemap:
url: /sitemap.xml
param: { module: pages, action: sitemap }
\ No newline at end of file
default:
is_secure: false
prod:
.settings:
logging_enabled: true
cache: true
dev:
.settings:
error_reporting: <?php echo (E_ALL | E_STRICT)."\n" ?>
web_debug: true
cache: true
etag: false
logging_enabled: false
all:
.settings:
csrf_secret: 2450ecb2853511b9f9137ee54890608d0b8c62dd
escaping_strategy: true
escaping_method: ESC_SPECIALCHARS
use_database: true
no_script_name: true
enabled_modules: [default, csSetting, sfCaptchaGD]
default_culture: ru_RU
standard_helpers: [Partial, Cache, I18N]
i18n: true
.actions:
error_404_module: pages
error_404_action: error404
login_module: personal_area #user
login_action: login #signin
secure_module: user
secure_action: secure
\ No newline at end of file
default:
http_metas:
content-type: text/html
metas:
robots: 'index, follow'
stylesheets:
- 'fonts.css?deploy=1519103092'
- 'g.css?deploy=1519103094'
- 'p.css?deploy=1519103095'
- 'a.css?deploy=1519103092'
- 'nouislider.css?deploy=1519103100'
javascripts:
- 'jquery-2.1.4.min.js?deploy=1519103092'
- 'jquery.plugins.js?deploy=1519103092'
- 'jquery.cycle2.min.js?deploy=1519103092'
- 'jquery.cycle2.swipe.js?deploy=1519103092'
- 'jquery.cycle2.carousel.min.js'
- 'nouislider.js?deploy=1519103092'
- 'init.d.js?deploy=1519103092'
has_layout: true
layout: layout
<?php
class wwwConfiguration extends sfApplicationConfiguration
{
public function configure()
{
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN" "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd">
<xliff version="1.0">
<file source-language="EN" target-language="en" datatype="plaintext" original="messages" date="2011-11-02T09:15:11Z" product-name="messages">
<header/>
<body>
<trans-unit id="1">
<source>You don't have the required permission to access this page.</source>
<target/>
</trans-unit>
<trans-unit id="2">
<source>О комбинате</source>
<target>About</target>
</trans-unit>
<trans-unit id="3">
<source>История</source>
<target>History</target>
</trans-unit>
<trans-unit id="4">
<source>Лицензии и сертификаты</source>
<target>Accreditation</target>
</trans-unit>
<trans-unit id="5">
<source>Партнеры</source>
<target>Partners</target>
</trans-unit>
<trans-unit id="6">
<source>Клиенты</source>
<target>Clients</target>
</trans-unit>
<trans-unit id="7">
<source>Филиалы</source>
<target>Branches</target>
</trans-unit>
<trans-unit id="8">
<source>Профессии</source>
<target>Professions</target>
</trans-unit>
<trans-unit id="9">
<source>Курсы</source>
<target>Courses</target>
</trans-unit>
<trans-unit id="10">
<source>Расписание</source>
<target>Curriculum</target>
</trans-unit>
<trans-unit id="11">
<source>Анкета абитуриента</source>
<target>Application form</target>
</trans-unit>
<trans-unit id="12">
<source>Документация</source>
<target>Documentation</target>
</trans-unit>
<trans-unit id="13">
<source>Фотогалерея</source>
<target>Photos</target>
</trans-unit>
<trans-unit id="14">
<source>Статьи</source>
<target>Articles</target>
</trans-unit>
<trans-unit id="15">
<source>Адреса и телефоны</source>
<target>Addresses and phones</target>
</trans-unit>
<trans-unit id="16">
<source>Выйти</source>
<target>Signout</target>
</trans-unit>
<trans-unit id="17">
<source>Анкеты соискателей</source>
<target>Surveys of candidates</target>
</trans-unit>
<trans-unit id="18">
<source>Анкеты абитуриентов</source>
<target>Surveys of applicants</target>
</trans-unit>
<trans-unit id="19">
<source>Админ</source>
<target>Admin</target>
</trans-unit>
<trans-unit id="20">
<source>Войти</source>
<target>Signin</target>
</trans-unit>
<trans-unit id="21">
<source>Найти</source>
<target>Search</target>
</trans-unit>
<trans-unit id="22">
<source>Фотоальбомы</source>
<target>Photos</target>
</trans-unit>
<trans-unit id="23">
<source>г. Уфа</source>
<target>Ufa</target>
</trans-unit>
<trans-unit id="24">
<source>ул. Ульяновых, д. 65</source>
<target>65, Ulyanovyh St.</target>
</trans-unit>
<trans-unit id="25">
<source>Учебный комбинат «Башнефтехим»</source>
<target>Additional Vocational Training «Bashneftehim»</target>
</trans-unit>
<trans-unit id="26">
<source>Филиал</source>
<target>Branche</target>
</trans-unit>
<trans-unit id="27">
<source>Адрес</source>
<target>Address</target>
</trans-unit>
<trans-unit id="28">
<source>Тел./факс</source>
<target>Tel./fax</target>
</trans-unit>
<trans-unit id="29">
<source>Тел.</source>
<target>Tel.</target>
</trans-unit>
<trans-unit id="30">
<source>Факс</source>
<target>Fax</target>
</trans-unit>
<trans-unit id="31">
<source>Код</source>
<target>Code</target>
</trans-unit>
<trans-unit id="32">
<source>Название</source>
<target>Name</target>
</trans-unit>
<trans-unit id="33">
<source>Всего часов</source>
<target>Total hours</target>
</trans-unit>
<trans-unit id="34">
<source>Часов ТО</source>
<target>Theory hours</target>
</trans-unit>
<trans-unit id="35">
<source>Часов ПО</source>
<target>Practice hours</target>
</trans-unit>
<trans-unit id="36">
<source>Режим обучения</source>
<target>Training mode</target>
</trans-unit>
<trans-unit id="37">
<source>Цена</source>
<target>Price</target>
</trans-unit>
<trans-unit id="38">
<source>по согласованию</source>
<target>as agreed</target>
</trans-unit>
<trans-unit id="39">
<source>Цена для юридических лиц</source>
<target>The price for legal persons</target>
</trans-unit>
<trans-unit id="40">
<source>руб.</source>
<target>RUB</target>
</trans-unit>
<trans-unit id="41">
<source>Цена для физических лиц</source>
<target>The price for individuals</target>
</trans-unit>
<trans-unit id="42">
<source>разряды</source>
<target>levels</target>
</trans-unit>
<trans-unit id="43">
<source>разряд</source>
<target>level</target>
</trans-unit>
<trans-unit id="44">
<source>Анкета соискателя</source>
<target>The questionnaire of the applicant</target>
</trans-unit>
<trans-unit id="45">
<source>Весь сайт</source>
<target>The entire site</target>
</trans-unit>
<trans-unit id="46">
<source>Поиск</source>
<target>Site search</target>
</trans-unit>
<trans-unit id="47">
<source>экзамен</source>
<target>exam</target>
</trans-unit>
<trans-unit id="48">
<source>группа</source>
<target>group</target>
</trans-unit>
<trans-unit id="49">
<source>Найдено</source>
<target>Found</target>
</trans-unit>
<trans-unit id="50">
<source>Ничего не найдено</source>
<target>Nothing is found</target>
</trans-unit>
<trans-unit id="51">
<source>Расписание курсов для</source>
<target>Schedule of courses for</target>
</trans-unit>
<trans-unit id="52">
<source>Пн</source>
<target>Mo</target>
</trans-unit>
<trans-unit id="53">
<source>Вт</source>
<target>Tu</target>
</trans-unit>
<trans-unit id="54">
<source>Ср</source>
<target>We</target>
</trans-unit>
<trans-unit id="55">
<source>Чт</source>
<target>Th</target>
</trans-unit>
<trans-unit id="56">
<source>Пт</source>
<target>Fr</target>
</trans-unit>
<trans-unit id="57">
<source>Сб</source>
<target>Sa</target>
</trans-unit>
<trans-unit id="58">
<source>Вс</source>
<target>Su</target>
</trans-unit>
<trans-unit id="59">
<source>Серия</source>
<target>Series </target>
</trans-unit>
<trans-unit id="60">
<source>Фамилия *</source>
<target>Last name *</target>
</trans-unit>
<trans-unit id="61">
<source>Имя *</source>
<target>First name *</target>
</trans-unit>
<trans-unit id="62">
<source>Отчество *</source>
<target>Middle name *</target>
</trans-unit>
<trans-unit id="63">
<source>ИНН *</source>
<target>Tax reference number *</target>
</trans-unit>
<trans-unit id="64">
<source>Номер ПФР *</source>
<target>Pension Fund of the Russian Federation *</target>
</trans-unit>
<trans-unit id="65">
<source>Год рождения *</source>
<target>Year of birth *</target>
</trans-unit>
<trans-unit id="66">
<source>Пол *</source>
<target>Gender *</target>
</trans-unit>
<trans-unit id="67">
<source>Образование *</source>
<target>Education *</target>
</trans-unit>
<trans-unit id="68">
<source>Стаж работы (лет)</source>
<target>Employment history (years)</target>
</trans-unit>
<trans-unit id="69">
<source>Место работы</source>
<target>Place of employment</target>
</trans-unit>
<trans-unit id="70">
<source>Профессия *</source>
<target>Profession *</target>
</trans-unit>
<trans-unit id="71">
<source>Телефон *</source>
<target>Phone number *</target>
</trans-unit>
<trans-unit id="72">
<source>Адрес *</source>
<target>Address *</target>
</trans-unit>
<trans-unit id="73">
<source>Общий</source>
<target>general</target>
</trans-unit>
<trans-unit id="74">
<source>По профессии</source>
<target>by profession</target>
</trans-unit>
<trans-unit id="75">
<source>Разряд</source>
<target>Level</target>
</trans-unit>
<trans-unit id="76">
<source>Отправить анкету</source>
<target>Send form</target>
</trans-unit>
<trans-unit id="77">
<source>Вопросы и ответы</source>
<target>Questions and answers</target>
</trans-unit>
<trans-unit id="78">
<source>Задать вопрос</source>
<target>Ask a question</target>
</trans-unit>
<trans-unit id="79">
<source>Отправить вопрос</source>
<target>Send</target>
</trans-unit>
<trans-unit id="80">
<source>Главная</source>
<target>Main</target>
</trans-unit>
<trans-unit id="81">
<source>Читать</source>
<target>Read</target>
</trans-unit>
<trans-unit id="82">
<source>Отзывы</source>
<target>Reviews</target>
</trans-unit>
<trans-unit id="83">
<source>Доставка</source>
<target>Delivery</target>
</trans-unit>
<trans-unit id="84">
<source>Каталог</source>
<target>Catalog</target>
</trans-unit>
<trans-unit id="85">
<source>История камня</source>
<target>History of stone</target>
</trans-unit>
<trans-unit id="86">
<source>Смотреть</source>
<target>Watch</target>
</trans-unit>
<trans-unit id="87">
<source>Телефон</source>
<target>Phone number</target>
</trans-unit>
<trans-unit id="88">
<source>Эл. почта</source>
<target>Email</target>
</trans-unit>
<trans-unit id="89">
<source>Отзывы клиентов</source>
<target>Reviews</target>
</trans-unit>
<trans-unit id="90">
<source>Видео</source>
<target>Video</target>
</trans-unit>
<trans-unit id="91">
<source>Отзывы</source>
<target>Reviews</target>
</trans-unit>
<trans-unit id="92">
<source>Корзина</source>
<target>Basket</target>
</trans-unit>
<trans-unit id="93">
<source>Корзина пуста</source>
<target>Basket is empty</target>
</trans-unit>
<trans-unit id="94">
<source>Наименование</source>
<target>Name</target>
</trans-unit>
<trans-unit id="95">
<source>Количество</source>
<target>The number</target>
</trans-unit>
<trans-unit id="96">
<source>Очистить</source>
<target>Clean</target>
</trans-unit>
<trans-unit id="97">
<source>Только число</source>
<target>Only the number</target>
</trans-unit>
<trans-unit id="98">
<source>Описание</source>
<target>Description</target>
</trans-unit>
<trans-unit id="99">
<source>Характеристики</source>
<target>Features</target>
</trans-unit>
<trans-unit id="100">
<source>Сертификат</source>
<target>Certificate</target>
</trans-unit>
<trans-unit id="101">
<source>В корзину</source>
<target>In the basket</target>
</trans-unit>
<trans-unit id="102">
<source>Я даю своё согласие на обработку персональных данных</source>
<target>I give my consent to the processing of personal data</target>
</trans-unit>
<trans-unit id="103">
<source>Отправить</source>
<target>Send</target>
</trans-unit>
<trans-unit id="104">
<source>Оставьте свой отзыв</source>
<target>Leave your review</target>
</trans-unit>
<trans-unit id="105">
<source>Отзыв отправлен</source>
<target>Review sent</target>
</trans-unit>
<trans-unit id="106">
<source>Как к вам обращаться</source>
<target>How to contact you</target>
</trans-unit>
<trans-unit id="107">
<source>Текст отзыва</source>
<target>Text</target>
</trans-unit>
<trans-unit id="108">
<source>Номер телефона</source>
<target>The phone number</target>
</trans-unit>
<trans-unit id="109">
<source>Наши партнёры</source>
<target>Our partners</target>
</trans-unit>
<trans-unit id="110">
<source>Готово</source>
<target>Done</target>
</trans-unit>
<trans-unit id="111">
<source>Ваш заказ</source>
<target>Your order</target>
</trans-unit>
<trans-unit id="112">
<source>отправлен на обработку</source>
<target>submitted for processing</target>
</trans-unit>
<trans-unit id="113">
<source>Вы сможете забрать свой заказ по адресу</source>
<target>You can pick up your order at</target>
</trans-unit>
<trans-unit id="114">
<source>Доставка по адресу</source>
<target>Delivery</target>
</trans-unit>
<trans-unit id="115">
<source>Вы заказали на сумму</source>
<target>Have you ordered in the amount of</target>
</trans-unit>
<trans-unit id="116">
<source>Все права защищены</source>
<target>All rights reserved</target>
</trans-unit>
<trans-unit id="117">
<source>Пустой поисковый запрос</source>
<target>Empty search query</target>
</trans-unit>
<trans-unit id="118">
<source>Товары</source>
<target>Products</target>
</trans-unit>
<trans-unit id="119">
<source>Категории</source>
<target>Category</target>
</trans-unit>
<trans-unit id="120">
<source>лист</source>
<target>sheet</target>
</trans-unit>
<trans-unit id="121">
<source>Товар</source>
<target>Product</target>
</trans-unit>
<trans-unit id="122">
<source>Статья</source>
<target>Article</target>
</trans-unit>
<trans-unit id="123">
<source>Контактные данные</source>
<target>Contact details</target>
</trans-unit>
<trans-unit id="124">
<source>Как получить товар</source>
<target>How to get the goods</target>
</trans-unit>
<trans-unit id="125">
<source>Вы можете забрать товар по адресу</source>
<target>Pickup address</target>
</trans-unit>
<trans-unit id="126">
<source>Пожелание к заказу</source>
<target>Wish to order</target>
</trans-unit>
<trans-unit id="127">
<source>Оформить заказ</source>
<target>To order</target>
</trans-unit>
<trans-unit id="128">
<source>Общая сумма заказа</source>
<target>The total amount of the order</target>
</trans-unit>
<trans-unit id="129">
<source>Итого</source>
<target>Total</target>
</trans-unit>
<trans-unit id="130">
<source>Самовывоз</source>
<target>Pickup</target>
</trans-unit>
<trans-unit id="131">
<source>Заказать звонок</source>
<target>Callback</target>
</trans-unit>
<trans-unit id="132">
<source>Закажите звонок</source>
<target>Request a call</target>
</trans-unit>
<trans-unit id="133">
<source>Сколько камней нужно в баню</source>
<target>How many gems you need in the bath</target>
</trans-unit>
<trans-unit id="134">
<source>Длина</source>
<target>Length</target>
</trans-unit>
<trans-unit id="135">
<source>Ширина</source>
<target>Width</target>
</trans-unit>
<trans-unit id="136">
<source>Высота</source>
<target>Height</target>
</trans-unit>
<trans-unit id="137">
<source>Размер помещения</source>
<target>The size of the room</target>
</trans-unit>
<trans-unit id="138">
<source>Нужно камней</source>
<target>Need stones</target>
</trans-unit>
<trans-unit id="139">
<source>На сумму</source>
<target>Amount</target>
</trans-unit>
<trans-unit id="140">
<source>Расчёт носит рекомендательный характер</source>
<target>The calculation is a recommendation</target>
</trans-unit>
<trans-unit id="141">
<source>кг</source>
<target>kg</target>
</trans-unit>
<trans-unit id="142">
<source>м</source>
<target>m</target>
</trans-unit>
</body>
</file>
</xliff>
<?php
/**
* Created by IntelliJ IDEA.
* User: victor
* Date: 08.11.17
* Time: 13:36
*/
class LangHelper
{
public static function urlOtherLang($culture)
{
$other_lang = $culture === 'ru' ? 'en' : 'ru';
return str_replace(
'/'.$culture . '/',
'/'.$other_lang.'/',
sfContext::getInstance()->getRequest()->getUri()
);
}
}
\ No newline at end of file
<?php
class StrHelper
{
static function normalize($str)
{
return trim(preg_replace('/\s\s+/', ' ', htmlspecialchars($str)));
}
}
\ No newline at end of file
<?php
class myUser extends doAuthSecurityUser
{
static private
$basket_info = array(),
$basket = false;
public function isFirstRequest($boolean = null)
{
if (is_null($boolean))
{
return $this->getAttribute('first_request', true);
}
$this->setAttribute('first_request', $boolean);
}
public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array())
{
parent::initialize($dispatcher, $storage, $options);
$r = sfContext::getInstance()->getRequest();
$culture = $r->getParameter('sf_culture');
if(!$culture){
$culture = $r->getParameter('lang');
}
if ($culture) {
if (in_array($culture, array('ru', 'en'))) {
$this->setCulture($culture);
sfContext::getInstance()->getResponse()->addHttpMeta('language', $this->getCulture(), true);
} else {
header('Location: /404.html');
die();
}
}
}
public function getBasket()
{
if(!self::$basket){
$basket = false;
if ($this->getAttribute('basket_id')) {
$basket = Doctrine_Query::create()
->from("Basket")
->where("id = ?", $this->getAttribute('basket_id'))
->andWhere("basket_order_id IS NULL")
->fetchOne();
}
if (!$basket) {
$basket = new Basket();
$basket->save();
$this->setAttribute('basket_id', $basket->getId());
}
self::$basket = $basket;
}
return self::$basket;
}
public function getBasketInfo()
{
if(count(self::$basket_info) == 0){
$info = Doctrine_Query::create()
->select("COUNT(*) as offer_count, SUM(b.price) as price_sum")
->from("BasketOffer b")
->innerJoin("b.Offer o WITH o.is_delete = 0")
->where("basket_id = ?", $this->getBasket()->getId())
->fetchOne();
self::$basket_info = array(
'offerCount' => $info['offer_count'],
'offerCountText' => $info['offer_count'] . ' ' . (!in_array('en', array(sfContext::getInstance()->getRequest()->getParameter('lang'), $this->getCulture())) ? 'товар' . Page::niceRusEnds($info['offer_count'], '', 'а', 'ов') : ('product' . ($info['offer_count'] == 1 ? '' : 's'))),
'price' => $info['price_sum'],
'priceText' => number_format($info['price_sum'], 0, ',', ' ')
);
}
return self::$basket_info;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment