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

two

parent 48680c56
......@@ -11,7 +11,7 @@
?>
<title><?php include_slot('title', sfConfig::get('app_www_title')); ?></title>
</head>
<body <?php echo ($sf_request->hasParameter('url') ? 'class="scroll_hidden overlay_discount_active"' : '')?>>
<body>
<script type="text/javascript">
var culture = '<?php echo $sf_user->getCulture();?>';
</script>
\ No newline at end of file
......@@ -15,4 +15,3 @@
<?php include(sfConfig::get('sf_app_template_dir') . '/bottom.php'); ?>
<?php include(sfConfig::get('sf_app_template_dir') . '/footer.php'); ?>
\ No newline at end of file
......@@ -5,13 +5,6 @@
?>
</div>
</div>
<?php
if ($sf_request->hasParameter('url')) {
echo '<div class="overlay_discount overlay_discount_active" onclick="discount.close();"><div class="overlay_discount__item" onclick="event.stopPropagation();">';
include_component('discount','form');
echo '</div></div>';
}
?>
<div id="panel"></div>
<div class="search_overlay" onclick="search.close();">
<div class="search_overlay__line" onclick="event.stopPropagation();">
......
......@@ -24,15 +24,15 @@
<?php
/*<div class="region"><a href="" class="green_link bbs_d">Уфа, Респ. Башкортостан</a></div>*/
if (csSettings::get('phone')) {
echo '<div class="header__phone">' . __('Телефон') . ':&nbsp;<a href="tel:' . preg_replace('/[^+0-9]/', '', csSettings::get('phone')) . '">' . csSettings::get('phone') . '</a></div>';
echo '<div class="header__phone">' . __('Телефон') . ':&nbsp;<a href="tel:' . preg_replace('/[^+0-9]/', '', csSettings::get('phone')) . '" onclick="yaCounter48466937.reachGoal(\'PHONE\');">' . csSettings::get('phone') . '</a></div>';
}
if (csSettings::get('email')) {
echo '<div><nobr>' . __('Эл. почта') . '</nobr>:&nbsp;<a href="mailto:' . csSettings::get('email') . '">' . csSettings::get('email') . '</a></div>';
echo '<div><nobr>' . __('Эл. почта') . '</nobr>:&nbsp;<a href="mailto:' . csSettings::get('email') . '" onclick="yaCounter48466937.reachGoal(\'POST\'); return true;">' . csSettings::get('email') . '</a></div>';
}
?>
</td>
<td class="top_right">
<a href="" class="callback_open_link green_link bbs_d" onclick="callback.open();return false;"><?php echo __('Заказать звонок');?></a>
<a href="" class="callback_open_link green_link bbs_d" onclick="callback.open();yaCounter48466937.reachGoal('CALL');return false;"><?php echo __('Заказать звонок');?></a>
</td>
</tr>
</table>
......@@ -45,9 +45,6 @@
<table class="second_floor__table" style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
<tr>
<?php
if ($sf_user->hasAttribute('active_discount') && $sf_user->getAttribute('active_discount') != false) {
$active_discount = $sf_user->getAttribute('active_discount');
}
$module_action = $sf_request->getParameter('module') . '_' . $sf_request->getParameter('action');
echo '<td width="100' . ($module_action == 'basket_complete' ? '%' : '') . '" align="center">';
$logo = '<img width="100" height="51" src="/i/logo.svg" />';
......@@ -57,7 +54,7 @@
echo '<td class="top_menu">';
include_component('main', 'menu');
echo '</td>';
echo '<td style="position: relative;" class="top_right ' . ($module_action == 'basket_index' ? (isset($active_discount) ? 'discount_basket' : '') : (isset($active_discount) ? 'discount d' . $active_discount : '') ) . '">';
echo '<td class="top_right">';
if($module_action != 'search_search'){
echo '<div class="search_btn" onclick="search._show();"></div>';
}
......
<?php
if ($sf_user->hasAttribute('active_discount') && $sf_user->getAttribute('active_discount') != false) {
$discount = $sf_user->getAttribute('active_discount');
} else {
$discount = false;
}
?>
<div class="header_mobile mobile <?php echo ($discount ? 'discount d' . $discount : '' )?>">
<div class="header_mobile mobile">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody align="left" valign="middle">
<tr>
<td colspan="2">
<?php echo csSettings::get('phone') ? '<a href="tel:'. csSettings::get('phone') .'" class="header_mobile__phone_link">'. csSettings::get('phone') .'</a>' : ''; ?>
<?php echo csSettings::get('phone') ? '<a href="tel:'. csSettings::get('phone') .'" class="header_mobile__phone_link" onclick="yaCounter48466937.reachGoal(\'PHONE\');">'. csSettings::get('phone') .'</a>' : ''; ?>
</td>
<td width="1" align="right">
......@@ -43,13 +36,13 @@ if ($sf_user->hasAttribute('active_discount') && $sf_user->getAttribute('active_
</ul>
<div class="burder__contacts">
<?php if (csSettings::get('phone')) {
echo __('Телефон') . ':&nbsp;<a href="tel:' . preg_replace('/[^+0-9]/', '', csSettings::get('phone')) . '" class="anb">' . csSettings::get('phone') . '</a><i class="br10"></i>';
echo __('Телефон') . ':&nbsp;<a href="tel:' . preg_replace('/[^+0-9]/', '', csSettings::get('phone')) . '" class="anb" onclick="yaCounter48466937.reachGoal(\'PHONE\');">' . csSettings::get('phone') . '</a><i class="br10"></i>';
}
if (csSettings::get('email')) {
echo __('Эл. почта') . '</nobr>:&nbsp;<a href="mailto:' . csSettings::get('email') . '">' . csSettings::get('email') . '</a>';
echo __('Эл. почта') . '</nobr>:&nbsp;<a href="mailto:' . csSettings::get('email') . '" onclick="yaCounter48466937.reachGoal(\'POST\');return true;">' . csSettings::get('email') . '</a>';
} ?>
</div>
<a href="" class="btn white_b_btn burder__callback_link" onclick="callback.open();return false;">Заказать звонок</a>
<a href="" class="btn white_b_btn burder__callback_link" onclick="callback.open();yaCounter48466937.reachGoal('CALL');return false;">Заказать звонок</a>
</div>
......
......@@ -3,7 +3,7 @@ all:
arm_title: 'Иди в баню - АРМ'
seo_header_sepr: ' - '
email_order: 'ufaros@gmail.com'
email_from: 'noreply@stone-dev.atmadev.ru'
email_from: 'noreply@idivbanu.ru'
secret_key: '2R]btNuO%c/L!}}[v"tY!pWX2JZ{03;!'
default_culture: ru_RU
import_auth_user: bath
......
......@@ -2,6 +2,6 @@ all:
doctrine:
class: sfDoctrineDatabase
param:
dsn: 'mysql:host=127.0.0.1;dbname=stone_dev'
dsn: 'mysql:host=127.0.0.1;dbname=idivbanu'
username: root
password: h7!nIay6HUtu
......@@ -481,9 +481,6 @@ Offer:
sort:
type: integer
default: 0
discount_available:
type: boolean
default: false
relations:
Product:
onDelete: CASCADE
......@@ -546,11 +543,6 @@ BasketOrder:
type: boolean
notnull: true
default: false
relations:
DiscountPhone:
onDelete: SET NULL
local: id
foreign: order_id
BasketOffer:
columns:
......@@ -625,47 +617,3 @@ Callback:
offer_id:
type: text
notnull: false
\ No newline at end of file
Discount:
actAs:
Timestampable: ~
columns:
title:
type: string(255)
notnull: true
utm:
type: string(255)
notnull: true
comment:
type: string(1000)
notnull: false
url:
type: string(20)
DiscountPhone:
actAs:
Timestampable: ~
columns:
phone:
type: string(20)
notnull: true
discount_id:
type: integer
notnull: true
order_id:
type: string(255)
notnull: false
default: null
active_discount:
type: integer
notnull: true
default: 3
relations:
BasketOrder:
onDelete: SET NULL
local: order_id
foreign: id
Discount:
onDelete: CASCADE
local: discount_id
foreign: id
\ No newline at end of file
......@@ -6,7 +6,7 @@
host=192.168.2.7
port=22
user=root
dir=/www/idivbanu.ru/
dir=/www/stone-dev.atmadev.ru/
type=rsync
[stone]
host=192.168.2.7
......
......@@ -4,21 +4,6 @@
/.ramcache
/.ramcache/*
/config/databases.yml
/symfony
/test
/upload
/data/exchange
/log
/.ramcache
/.idea
/.git
/config/databases.yml
/config/app.yml
/data
/apps/www/config/factories.yml
/apps/arm/config/factories.yml
/symfony
\ No newline at end of file
/web/index.php
/web/a.php
/web/u
/config/properties.ini
/config/rsync_exclude.txt
\ No newline at end of file
<?php
/**
* Discount filter form.
*
* @package sf
* @subpackage filter
* @author Atma
* @version SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class DiscountFormFilter extends BaseDiscountFormFilter
{
public function configure()
{
}
}
<?php
/**
* DiscountPhone filter form.
*
* @package sf
* @subpackage filter
* @author Atma
* @version SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class DiscountPhoneFormFilter extends BaseDiscountPhoneFormFilter
{
public function configure()
{
$this->disableLocalCSRFProtection();
}
}
<?php
/**
* OfferTranslation filter form.
*
* @package sf
* @subpackage filter
* @author Atma
* @version SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class OfferTranslationFormFilter extends BaseOfferTranslationFormFilter
{
public function configure()
{
}
}
<?php
/**
* Discount filter form base class.
*
* @package sf
* @subpackage filter
* @author Atma
* @version SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
*/
abstract class BaseDiscountFormFilter extends BaseFormFilterDoctrine
{
public function setup()
{
$this->setWidgets(array(
'title' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'utm' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'comment' => new sfWidgetFormFilterInput(),
'url' => new sfWidgetFormFilterInput(),
'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
));
$this->setValidators(array(
'title' => new sfValidatorPass(array('required' => false)),
'utm' => new sfValidatorPass(array('required' => false)),
'comment' => new sfValidatorPass(array('required' => false)),
'url' => new sfValidatorPass(array('required' => false)),
'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
));
$this->widgetSchema->setNameFormat('discount_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
public function getModelName()
{
return 'Discount';
}
public function getFields()
{
return array(
'id' => 'Number',
'title' => 'Text',
'utm' => 'Text',
'comment' => 'Text',
'url' => 'Text',
'created_at' => 'Date',
'updated_at' => 'Date',
);
}
}
<?php
/**
* DiscountPhone filter form base class.
*
* @package sf
* @subpackage filter
* @author Atma
* @version SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
*/
abstract class BaseDiscountPhoneFormFilter extends BaseFormFilterDoctrine
{
public function setup()
{
$this->setWidgets(array(
'phone' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'discount_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Discount'), 'add_empty' => true)),
'order_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('BasketOrder'), 'add_empty' => true)),
'active_discount' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
));
$this->setValidators(array(
'phone' => new sfValidatorPass(array('required' => false)),
'discount_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Discount'), 'column' => 'id')),
'order_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('BasketOrder'), 'column' => 'id')),
'active_discount' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
));
$this->widgetSchema->setNameFormat('discount_phone_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
public function getModelName()
{
return 'DiscountPhone';
}
public function getFields()
{
return array(
'id' => 'Number',
'phone' => 'Text',
'discount_id' => 'ForeignKey',
'order_id' => 'ForeignKey',
'active_discount' => 'Number',
'created_at' => 'Date',
'updated_at' => 'Date',
);
}
}
......@@ -21,7 +21,6 @@ abstract class BaseOfferFormFilter extends BaseFormFilterDoctrine
'is_delete' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
'is_wholesale' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
'sort' => new sfWidgetFormFilterInput(),
'discount_available' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
));
......@@ -35,7 +34,6 @@ abstract class BaseOfferFormFilter extends BaseFormFilterDoctrine
'is_delete' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
'is_wholesale' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
'sort' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'discount_available' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
));
......@@ -66,7 +64,6 @@ abstract class BaseOfferFormFilter extends BaseFormFilterDoctrine
'is_delete' => 'Boolean',
'is_wholesale' => 'Boolean',
'sort' => 'Number',
'discount_available' => 'Boolean',
'created_at' => 'Date',
'updated_at' => 'Date',
);
......
<?php
/**
* OfferTranslation filter form base class.
*
* @package sf
* @subpackage filter
* @author Atma
* @version SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
*/
abstract class BaseOfferTranslationFormFilter extends BaseFormFilterDoctrine
{
public function setup()
{
$this->setWidgets(array(
'title' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'quantity_type' => new sfWidgetFormFilterInput(array('with_empty' => false)),
));
$this->setValidators(array(
'title' => new sfValidatorPass(array('required' => false)),
'quantity_type' => new sfValidatorPass(array('required' => false)),
));
$this->widgetSchema->setNameFormat('offer_translation_filters[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
$this->setupInheritance();
parent::setup();
}
public function getModelName()
{
return 'OfferTranslation';
}
public function getFields()
{
return array(
'id' => 'Number',
'title' => 'Text',
'quantity_type' => 'Text',
'lang' => 'Text',
);
}
}
<?php
/**
* offerTranslation filter form base class.
* OfferTranslation filter form base class.
*
* @package sf
* @subpackage filter
* @author Atma
* @version SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
*/
abstract class BaseofferTranslationFormFilter extends BaseFormFilterDoctrine
abstract class BaseOfferTranslationFormFilter extends BaseFormFilterDoctrine
{
public function setup()
{
$this->setWidgets(array(
'title' => new sfWidgetFormFilterInput(),
'title' => new sfWidgetFormFilterInput(array('with_empty' => false)),
'quantity_type' => new sfWidgetFormFilterInput(array('with_empty' => false)),
));
$this->setValidators(array(
'title' => new sfValidatorPass(array('required' => false)),
'quantity_type' => new sfValidatorPass(array('required' => false)),
));
$this->widgetSchema->setNameFormat('offer_translation_filters[%s]');
......@@ -31,7 +33,7 @@ abstract class BaseofferTranslationFormFilter extends BaseFormFilterDoctrine
public function getModelName()
{
return 'offerTranslation';
return 'OfferTranslation';
}
public function getFields()
......@@ -39,6 +41,7 @@ abstract class BaseofferTranslationFormFilter extends BaseFormFilterDoctrine
return array(
'id' => 'Number',
'title' => 'Text',
'quantity_type' => 'Text',
'lang' => 'Text',
);
}
......
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