Commit 9f4f2745 authored by Игорь's avatar Игорь
Browse files

init

parent a765cdc4
<?php
class armConfiguration extends sfApplicationConfiguration
{
public function configure()
{
$this->dispatcher->connect('admin.save_object', array('UserLog', 'saveObject'));
$this->dispatcher->connect('admin.delete_object', array('UserLog', 'deleteObject'));
}
}
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/09-Cache
default:
enabled: false
contextual: true
with_layout: false
lifetime: 86400
prod:
logger:
class: sfNoLogger
param:
level: err
loggers: ~
all:
storage:
param:
session_name: arm
mailer:
param:
delivery_strategy: realtime
transport:
class: Swift_SmtpTransport
param:
host: 127.0.0.1
port: 25
encryption: ~
username: ~
password: ~
routing:
class: sfPatternRouting
param:
generate_shortest_url: true
extra_parameters_as_query_string: true
lazy_routes_deserialize: true
view_cache_manager:
class: sfViewCacheManager
param:
cache_key_use_vary_headers: true
cache_key_use_host_name: true
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/12-Filters
rendering: ~
security: ~
remember_me:
class: doAuthRememberMeFilter
cache: ~
execution: ~
statistic:
class: sfDoctrineRouteCollection
options:
model: Export
module: statistic
prefix_path: /statistic
column: id
with_wildcard_routes: true
export:
class: sfDoctrineRouteCollection
options:
model: Export
module: export
prefix_path: /export
column: id
with_wildcard_routes: true
main_menu:
class: sfDoctrineRouteCollection
options:
model: MainMenu
module: main_menu
prefix_path: /main_menu
column: id
with_wildcard_routes: true
cat:
class: sfDoctrineRouteCollection
options:
model: Cat
module: cat
prefix_path: /cat
column: id
with_wildcard_routes: true
push_template:
class: sfDoctrineRouteCollection
options:
model: PushTemplate
module: push_template
prefix_path: /push_template
column: id
with_wildcard_routes: true
client_order_item:
class: sfDoctrineRouteCollection
options:
model: ClientOrderItem
module: client_order_item
prefix_path: /client_order_item
column: id
with_wildcard_routes: true
courier_money_out:
class: sfDoctrineRouteCollection
options:
model: CourierMoneyOut
module: courier_money_out
prefix_path: /courier_money_out
column: id
with_wildcard_routes: true
courier_money_out_edit:
url: /courier_money_out/:id/edit
class: sfDoctrineRoute
param: { module: courier_money_out, action: edit }
options:
model: CourierMoneyOut
type: object
blocking:
class: sfDoctrineRouteCollection
options:
model: Blocking
module: blocking
prefix_path: /blocking
column: id
with_wildcard_routes: true
client_problem:
class: sfDoctrineRouteCollection
options:
model: ClientProblem
module: client_problem
prefix_path: /client_problem
column: id
with_wildcard_routes: true
tutorial_client:
class: sfDoctrineRouteCollection
options:
model: TutorialClient
module: tutorial_client
prefix_path: /tutorial_client
column: id
with_wildcard_routes: true
courier_problem:
class: sfDoctrineRouteCollection
options:
model: CourierProblem
module: courier_problem
prefix_path: /courier_problem
column: id
with_wildcard_routes: true
callback:
class: sfDoctrineRouteCollection
options:
model: Callback
module: callback
prefix_path: /callback
column: id
with_wildcard_routes: true
problem:
class: sfDoctrineRouteCollection
options:
model: Problem
module: problem
prefix_path: /problem
column: id
with_wildcard_routes: true
client_order:
class: sfDoctrineRouteCollection
options:
model: ClientOrder
module: client_order
prefix_path: /client_order
column: id
with_wildcard_routes: true
promo_code:
class: sfDoctrineRouteCollection
options:
model: PromoCode
module: promo_code
prefix_path: /promo_code
column: id
with_wildcard_routes: true
tutorial_courier:
class: sfDoctrineRouteCollection
options:
model: TutorialCourier
module: tutorial_courier
prefix_path: /tutorial_courier
column: id
with_wildcard_routes: true
subscription:
class: sfDoctrineRouteCollection
options:
model: Subscription
module: subscription
prefix_path: /subscription
column: id
with_wildcard_routes: true
consume:
class: sfDoctrineRouteCollection
options:
model: Consume
module: consume
prefix_path: /consume
column: id
with_wildcard_routes: true
tutorial_un_auth:
class: sfDoctrineRouteCollection
options:
model: TutorialUnAuth
module: tutorial_un_auth
prefix_path: /tutorial_un_auth
column: id
with_wildcard_routes: true
tutorial_auth:
class: sfDoctrineRouteCollection
options:
model: TutorialAuth
module: tutorial_auth
prefix_path: /tutorial_auth
column: id
with_wildcard_routes: true
pay:
class: sfDoctrineRouteCollection
options:
model: Pay
module: pay
prefix_path: /pay
column: id
with_wildcard_routes: true
push_log:
class: sfDoctrineRouteCollection
options:
model: PushLog
module: push_log
prefix_path: /push_log
column: id
with_wildcard_routes: true
mail_template:
class: sfDoctrineRouteCollection
options:
model: MailTemplate
module: mail_template
prefix_path: /mail_template
column: id
with_wildcard_routes: true
seo:
class: sfDoctrineRouteCollection
options:
model: Seo
module: seo
prefix_path: /seo
column: id
with_wildcard_routes: true
user_log:
class: sfDoctrineRouteCollection
options:
model: UserLog
module: user_log
prefix_path: /user_log
column: id
with_wildcard_routes: true
user_group:
class: sfDoctrineRouteCollection
options:
model: UserGroup
module: user_group
prefix_path: /user_group
column: id
with_wildcard_routes: true
user:
class: sfDoctrineRouteCollection
options:
model: User
module: user
prefix_path: /user
column: id
with_wildcard_routes: true
permission:
class: sfDoctrineRouteCollection
options:
model: Permission
module: permission
prefix_path: /permission
column: id
with_wildcard_routes: true
page:
class: sfDoctrineRouteCollection
options:
model: Page
module: page
prefix_path: /page
column: id
with_wildcard_routes: true
uploader:
url: /uploader
param: { module: page, action: upload }
jcrop:
url: /jcrop
param: { module: page, action: jcrop }
signin:
url: /login
param: { module: baseAuth, action: signin }
signout:
url: /logout
param: { module: baseAuth, action: signout }
profile:
url: /profile
param: { module: main, action: profile }
version:
url: /version
param: { module: main, action: version }
homepage:
url: /
param: { module: main, action: index }
default_index:
url: /:module
param: { action: index }
default:
url: /:module/:action/*
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/08-Security
default:
is_secure: true
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/04-Settings
prod:
.settings:
logging_enabled: false
cache: true
min_view: false
dev:
.settings:
error_reporting: <?php echo ((E_ALL) ^ E_NOTICE ^ E_DEPRECATED ^ E_WARNING)."\n" ?>
web_debug: false
cache: false
logging_enabled: false
min_view: false
test:
.settings:
error_reporting: <?php echo ((E_ALL | E_STRICT) ^ E_NOTICE)."\n" ?>
cache: false
web_debug: false
all:
.settings:
csrf_secret: 2450ecb2853511b9f9137ee54890608d0b8c62dd
escaping_strategy: true
escaping_method: ESC_SPECIALCHARS
use_database: true
no_script_name: true
enabled_modules: [default, csSetting, baseAuth]
default_culture: ru_RU
standard_helpers: [Partial, Cache, I18N]
i18n: true
default_timezone: Europe/Moscow
.actions:
error_404_module: main
error_404_action: error404
login_module: baseAuth
login_action: signin
secure_module: baseAuth
secure_action: secure
default:
http_metas:
content-type: text/html
stylesheets:
- 'arm/g.css?deploy=1613032033'
- 'arm/p.css?deploy=1613032033'
- chosen.css
- arm/redactor.css
- 'arm/atma-struct.css?deploy=1613032033'
- jquery.Jcrop.css
- atma-charts.css
- atma-select.css
- fotorama.css
javascripts:
- jquery-2.1.4.min.js
- 'arm/redactor.js?deploy=1613032033'
- jquery.idle.min.js
- jquery.Jcrop.js
- arm/plugins.js
- perfect-scrollbar.min.js
- chosen.jquery.js
- arm/jquery.hideseek.js
- jquery.liteuploader.js
- sexypicker.js
- atmaUI.js
- stickyeah.js
- fotorama.js
- arm/jquery-ui.js
- arm/arm.js
- 'arm/atma-struct.js?deploy=1613032033'
- atma-charts.js
- atma-select.js
- 'arm/init.d.js?deploy=1613032033'
has_layout: true
layout: layout
<?php
class customListener extends Doctrine_EventListener
{
static protected
$lastQuery = null,
$lastIds = array();
public function preStmtExecute(Doctrine_Event $event)
{
self::$lastQuery = $event->getQuery();
self::$lastIds = $event->getParams();
}
public function preError(Doctrine_Event $event, Exception $e)
{
$error_info = $e->errorInfo;
if(is_array($error_info) && isset($error_info[1]) && $error_info[1] == 1451){
$context = sfContext::getInstance();
$request = $context->getRequest();
if($request->isXmlHttpRequest()){
$res = array(
'state' => 'error',
'message' => 'Удаление невозможно, имеются зависимые объекты',
'id' => $context->getModuleName() . '_' . $request->getParameter('id'));
echo json_encode($res);
die();
}else{
$context->getUser()->setFlash('error', 'Удаление невозможно, имеются зависимые объекты');
$context->getController()->getAction($context->getModuleName(), 'index')->redirect('@' . $context->getModuleName());
}
}
}
}
\ No newline at end of file
<?php
class myUser extends doAuthSecurityUser
{
}
\ No newline at end of file
<?php
require_once dirname(__FILE__).'/../lib/catGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/catGeneratorHelper.class.php';
/**
* cat actions.
*
* @package sf
* @subpackage cat
* @author Atma
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class catActions extends autoCatActions
{
}
generator:
class: sfDoctrineGenerator
param:
model_class: Cat
theme: admin
non_verbose_templates: true
with_show: false
singular: ~
plural: ~
route_prefix: cat
with_doctrine_route: true
actions_base_class: sfActions
order: 10
config:
actions: ~
fields:
id: {label: '№'}
title: {label: Название}
min_weight: {label: Минимальный вес}
price: {label: 'Стоимость кг'}
order_id: {label: 'Сортировка'}
created_at: {label: 'Дата добавления'}
updated_at: {label: 'Дата обновления'}
list:
layout: ~
title: 'Категории'
display: [title, _min_weight, _price, order_id]
max_per_page: 100
object_actions:
_delete: ~
_edit: ~
search:
fields: false
export: false
filter:
class: false
form: ~
edit:
title: Редактирование категории
new:
title: Новая категория
\ No newline at end of file
<?php
/**
* cat module configuration.
*
* @package sf
* @subpackage cat
* @author Atma
* @version SVN: $Id: configuration.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class catGeneratorConfiguration extends BaseCatGeneratorConfiguration
{
}
<?php
/**
* cat module helper.
*
* @package sf
* @subpackage cat
* @author Atma
* @version SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class catGeneratorHelper extends BaseCatGeneratorHelper
{
}
<?php
if(strpos($cat->getMinWeight(), '.') !== false){
$arr_mw = explode('.', $cat->getMinWeight());
if($arr_mw[1] > 0){
echo number_format($cat->getMinWeight(), 3, ',', ' ');
} else {
echo round($cat->getMinWeight());
}
} else {
echo $cat->getMinWeight();
}
<?php
echo Yavinesu::priceFormat($cat->getPrice());
\ No newline at end of file
<?php
require_once dirname(__FILE__).'/../lib/exportGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/exportGeneratorHelper.class.php';
/**
* export actions.
*
* @package sf
* @subpackage export
* @author Atma
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class exportActions extends autoExportActions
{
}
generator:
class: sfDoctrineGenerator
param:
model_class: Export
theme: admin
non_verbose_templates: true
with_show: false
singular: ~
plural: ~
route_prefix: export
with_doctrine_route: true
actions_base_class: sfActions
order: 30
config:
actions: ~
fields:
id: {label: '№'}
logic_type: {label: 'Тип заявки'}
cat_id: {label: 'Категория'}
weight: {label: 'Вес'}
sum: {label: 'Сумма'}
user_id: {label: 'Пользователь'}
created_at: {label: 'Дата создания'}
updated_at: {label: 'Дата'}
list:
layout: ~
title: 'Заявки'
display: [_logic_type, _cat_id, _weight, _sum, _user_id, updated_at ]
max_per_page: 100
object_actions:
_delete: ~
_edit: ~
search:
fields: false
export: false
filter:
class: ExportFormFilter
form: ~
edit:
title: Заявка
new:
title: Новая заявка
\ No newline at end of file
<?php
/**
* export module configuration.
*
* @package sf
* @subpackage export
* @author Atma
* @version SVN: $Id: configuration.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class exportGeneratorConfiguration extends BaseExportGeneratorConfiguration
{
}
<?php
/**
* export module helper.
*
* @package sf
* @subpackage export
* @author Atma
* @version SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class exportGeneratorHelper extends BaseExportGeneratorHelper
{
}
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