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

init

parent a765cdc4
<div class="max_width">
<div class="h">Вывод на карту</div>
<?php
if(isset($completed) && $completed){
?>
<div class="fs_20">Деньги отправлены на карту.<br>Время поступления зависит от&nbsp;банка, выпустившего&nbsp;карту</div><i class="br20"></i>
<a href="<?php echo url_for('@homepage');?>">На главную</a><i class="br10"></i>
<a href="<?php echo url_for('@signout');?>">Выйти</a>
<?php
}else{
?>
<form action="" method="post">
<?php
echo $form->renderGlobalErrors();
echo $form->renderHiddenFields();
echo '<div class="signin_form__field">' . $form['card']->render() . $form['card']->renderError() . '</div>';
?>
<button class="btn btn_out">Вывести на карту</button>
</form>
<?php
}
?>
</div>
\ No newline at end of file
<?php
class userActions extends sfActions
{
private function getAddBid($user_id, $cat_id, $weight, $export_id = null)
{
$resp = false;
$body_mail = array();
$cat = Doctrine::getTable("Cat")->findOneById($cat_id);
if($cat) {
if(!($export_id != null && $export_id != '')){
$export_q = Doctrine_Query::create()
->select("e.*")
->from("Export e")
->where("e.logic_type = 'wait'")
->andWhere("e.cat_id = ?", $cat->getId())
->andWhere("e.user_id = ?", $user_id)
->orderBy("e.weight DESC")
->fetchOne();
if(!$export_q){
$newExport = new Export();
$logic_type = 'bid';
if($weight < $cat->getMinWeight()){
$logic_type = 'wait';
}
$newExport->setLogicType($logic_type);
$newExport->setCatId($cat_id);
$newExport->setWeight($weight);
$newExport->setSum($weight * $cat->getPrice());
$newExport->setUserId($user_id);
$newExport->save();
$this->getUser()->setAttribute('cat_id', '');
$this->getUser()->setAttribute('weight', '');
if($newExport){
$resp = true;
if($newExport->getLogicType() != 'wait'){
$thisUser = $newExport->getUser();
$body_mail = array(
'cat' => $cat->getTitle(),
'weight' => Yavinesu::weightFormat($weight),
'sum' => Yavinesu::priceFormat($weight * $cat->getPrice()),
'name' => $thisUser->getName(),
'phone' => Page::maskPhone($thisUser->getUsername()),
'email' => $thisUser->getEmail(),
);
}
}
} else {
$total_weight = $export_q->getWeight() + $weight;
$logic_type = 'bid_after_wait';
if($total_weight < $cat->getMinWeight()){
$logic_type = 'wait';
} else{
$thisUser = $export_q->getUser();
$body_mail = array(
'cat' => $cat->getTitle(),
'weight' => Yavinesu::weightFormat($total_weight),
'sum' => Yavinesu::priceFormat($total_weight * $cat->getPrice()),
'name' => $thisUser->getName(),
'phone' => Page::maskPhone($thisUser->getUsername()),
'email' => $thisUser->getEmail(),
);
}
$export_q->setLogicType($logic_type);
$export_q->setWeight($total_weight);
$export_q->setSum($total_weight * $cat->getPrice());
$export_q->save();
$resp = true;
}
} else {
$export = Doctrine::getTable("Export")->findOneById($export_id);
if($export){
if($weight >= $cat->getMinWeight() && $export->getLogicType() == 'wait'){
$export->setLogicType('bid_after_wait');
$thisUser = $export->getUser();
$body_mail = array(
'cat' => $cat->getTitle(),
'weight' => Yavinesu::weightFormat($weight),
'sum' => Yavinesu::priceFormat($weight * $cat->getPrice()),
'name' => $thisUser->getName(),
'phone' => Page::maskPhone($thisUser->getUsername()),
'email' => $thisUser->getEmail(),
);
}
$export->setWeight($weight);
$export->setSum($weight * $cat->getPrice());
$export->save();
$resp = true;
}
$this->getUser()->setAttribute('cat_id', '');
$this->getUser()->setAttribute('weight', '');
}
}
if(count($body_mail) > 0){
$theme_mail = array();
$body_mail['logo'] = sfConfig::get('app_logo_mail');
MailTemplate::sendMailUser("bidExport", $body_mail, $theme_mail, csSettings::get('bid_email'));
}
return $resp;
}
public function executeAddBid(sfWebRequest $request)
{
$data = array('state' => 'error');
$cat_id = $request->getParameter('cat_id');
$weight = $request->getParameter('weight');
$bid_id = $request->getParameter('bid_id');
if($this->getUser()->isAuthenticated()){
$addBid = $this->getAddBid($this->getUser()->getAccount()->getId(), $cat_id, $weight, $bid_id);
if($addBid === true){
$data['state'] = 'ok';
}
} else {
$data['msg'] = 'Ошибка при добавлении заявки';
}
echo json_encode($data);
return sfView::NONE;
}
public function executeRemoveBid(sfWebRequest $request)
{
$data = array('state' => 'error');
$id = $request->getParameter('id');
if($id != null && $id != ''){
$export = Doctrine::getTable("Export")->findOneById($id);
if($export){
$export->delete();
$data['state'] = 'ok';
} else {
$data['msg'] = 'Запись не найдена';
}
} else {
$data['msg'] = 'Ошибка при удалении записи';
}
echo json_encode($data);
return sfView::NONE;
}
public function executeRecoveryForm(sfWebRequest $request)
{
$data = array('state' => 'error');
$email = trim($request->getParameter('email'));
if($email != null && $email != ''){
$user = Doctrine::getTable("User")->findOneByEmail($email);
if($user){
$user->setPasswordRecovery(ProjectUtils::generateUuid());
$user->save();
$link_part = 'change_psw=1&id=' . $user->getId() . '&secret=' . $user->getPasswordRecovery();
$message = Swift_Message::newInstance()
->setFrom(sfConfig::get('app_email_sender'))
->setTo($user->getEmail())
->setSubject("Восстановление пароля от личного кабинета " . sfConfig::get('app_www_title', false));
$message->setContentType('text/html; charset=UTF-8');
$mail_template = Doctrine::getTable('MailTemplate')->findOneByEvent('userRemindPassword');
if($mail_template){
$body = $mail_template->getBody();
$body = str_replace('#link_remid#', '<a href="https://' . $request->getHost() . '/?' . $link_part . '">https://' . $request->getHost() . '/?' . $link_part . '</a>', $body);
$body = str_replace('#logo#', sfConfig::get('app_logo_mail') , $body);
$message->setBody($body);
}
$this->getMailer()->send($message);
$data['state'] = 'ok';
} else {
$data['msg'] = 'Пользователь с таким электронным адресом не найден';
}
} else {
$data['msg'] = 'Укажите электронную почту';
}
echo json_encode($data);
return sfView::NONE;
}
public function executeChangePswForm(sfWebRequest $request)
{
$data = array('state' => 'error');
$psw = trim($request->getParameter('psw'));
$id = trim($request->getParameter('id'));
$secret = trim($request->getParameter('secret'));
if($psw != null && $psw != ''){
if($id != null && $id != '' && $secret != null && $secret != ''){
$user = Doctrine::getTable("User")->findOneByIdAndPasswordRecovery($id, $secret);
if($user){
$user->setPassword($psw);
$user->save();
$data['state'] = 'ok';
} else {
$data['msg'] = 'Не удалось найти пользователя';
}
} else {
$data['msg'] = 'Ссылка на восстановление неверная, попробуйте еще раз оправить письмо';
}
} else {
$data['msg'] = 'Укажите пароль';
}
echo json_encode($data);
return sfView::NONE;
}
public function executeEditProfile(sfWebRequest $request)
{
$data = array('state' => 'error');
$name = $request->getParameter('name');
$phone = preg_replace("/[^,.0-9]/", '', $request->getParameter('phone'));
$email = $request->getParameter('email');
$address = $request->getParameter('address');
$psw = $request->getParameter('psw');
if($this->getUser()->isAuthenticated()){
$user = Doctrine::getTable("User")->findOneById($this->getUser()->getAccount()->getId());
if($user){
$msg = '';
if($user->getName() != $name && $name != '' && $name != null){
$user->setName($name);
}
if($user->getPhone() != $phone && $phone != '' && $phone != null){
$user->setPhone($phone);
}
if($user->getUsername() != $phone && $phone != '' && $phone != null){
$user_count = Doctrine_Query::create()
->select("u.*")
->from("User u")
->where("u.username = ?", $phone)
->andWhere("u.id != ?", $user->getId())
->count();
if($user_count > 0){
$msg = 'Пользователь с таким номером телефона уже существует';
} else {
$user->setUsername($phone);
}
}
if($user->getEmail() != $email && $email != '' && $email != null){
$user->setEmail($email);
}
if($psw != '' && $psw != null){
$user->setPassword($psw);
}
if($user->getAddress() != $address && $address != '' && $address != null){
$user->setAddress($address);
}
if($msg == ''){
$user->save();
$data['state'] = 'ok';
}
} else {
$data['msg'] = 'Пользователь не найден';
}
} else {
$data['msg'] = 'Ошибка при добавлении заявки';
}
echo json_encode($data);
return sfView::NONE;
}
public function executeSignout(sfWebRequest $request)
{
if ($session = $this->getUser()->getSession()) {
$session->setUserId(null);
$session->save();
}
$this->getUser()->signOut();
$this->redirect('@homepage');
}
public function executeSignup(sfWebRequest $request)
{
if($request->hasParameter('cat_id') && $request->getParameter('cat_id') != '' && $request->getParameter('cat_id') != null){
$this->getUser()->setAttribute('cat_id', $request->getParameter('cat_id'));
}
if($request->hasParameter('weight') && $request->getParameter('weight') != '' && $request->getParameter('weight') != null){
$this->getUser()->setAttribute('weight', $request->getParameter('weight'));
}
if ($this->getUser()->isAuthenticated()) {
$this->redirect('@homepage');
}
if ($request->isMethod('post')) {
$cat_id = $this->getUser()->getAttribute('cat_id');
$weight = $this->getUser()->getAttribute('weight');
$name = $request->getParameter('name');
$phone = preg_replace("/[^,.0-9]/", '', $request->getParameter('phone'));
$psw = $request->getParameter('psw');
$email = $request->getParameter('email');
$address = $request->getParameter('address');
$user = Doctrine::getTable("User")->findOneByUsername($phone);
$msg = '';
if(!$user){
$newUser = new User();
$newUser->setUsername($phone);
$newUser->setPhone($phone);
$newUser->setName($name);
$newUser->setEmail($email);
$newUser->setAddress($address);
$newUser->setPassword($psw);
$newUser->setPasswordRecovery($psw);
$newUser->save();
if($newUser){
if($cat_id != '' && $cat_id != null && $weight != '' && $weight != null){
$addBid = $this->getAddBid($newUser->getId(), $cat_id, $weight);
}
$this->getUser()->signIn($newUser);
} else {
$msg = 'Ошибка регистрации';
}
} else {
$msg = 'Пользователь с таким номером уже существует';
}
$json = array();
if($msg != ''){
$json['state'] = 'error';
$json['msg'] = $msg;
} else {
$json['state'] = 'ok';
}
echo json_encode($json);
return sfView::NONE;
}
}
public function executeSignin(sfWebRequest $request)
{
if($request->hasParameter('cat_id') && $request->getParameter('cat_id') != '' && $request->getParameter('cat_id') != null){
$this->getUser()->setAttribute('cat_id', $request->getParameter('cat_id'));
}
if($request->hasParameter('weight') && $request->getParameter('weight') != '' && $request->getParameter('weight') != null){
$this->getUser()->setAttribute('weight', $request->getParameter('weight'));
}
if ($this->getUser()->isAuthenticated()) {
$this->redirect('@homepage');
}
if ($request->hasParameter('ok') && sfConfig::get('sf_environment') === 'dev') {
$ok_user = Doctrine::getTable("User")->find($request->getParameter('ok'));
if ($ok_user) {
if($this->getUser()->isAuthenticated()){
$this->getUser()->signOut();
}
$this->getUser()->signIn($ok_user);
die('success');
} else {
die('no_user');
}
}
$this->form = new cashSigninForm();
if ($request->isMethod('post')) {
$json = array();
if($request->hasParameter('is_json')){
$params = array(
'_csrf_token' => $request->getParameter('_csrf_token'),
'username' => $request->getParameter('phone'),
'password' => $request->getParameter('psw')
);
} else {
$params = $request->getparameter($this->form->getName());
//$tuser = Doctrine::getTable("User")->findOneByUsername($request->getParameter('phone'));
}
$this->form->bind($params);
if ($this->form->isValid()) {
//$this->getUser()->signIn($tuser);
$this->getUser()->signIn($this->form->getValue('user'));
if($this->getUser()->isAuthenticated()){
$cat_id = $this->getUser()->getAttribute('cat_id');
$weight = $this->getUser()->getAttribute('weight');
if($cat_id != '' && $cat_id != null && $weight != '' && $weight != null){
$addBid = $this->getAddBid($this->getUser()->getAccount()->getId(), $cat_id, $weight);
}
if($request->hasParameter('is_json')){
$json['state'] = 'ok';
} else {
$this->redirect('@homepage');
}
} else {
if($request->hasParameter('is_json')){
$json['state'] = 'error';
$json['msg'] = 'Не удалось авторизоваться';
}
}
if($request->hasParameter('is_json')){
$json['state'] = 'ok';
} else {
$this->redirect('@homepage');
}
} else {
if($request->hasParameter('is_json')){
$json['state'] = 'error';
$json['msg'] = 'Неверный логин или пароль';
}
}
if($request->hasParameter('is_json') && count($json) > 0){
echo json_encode($json);
return sfView::NONE;
}
}
}
}
\ No newline at end of file
<?php
class userComponents extends sfComponents
{
}
registration_token:
is_secure: false
recovery_password:
is_secure: false
registration:
is_secure: false
signout:
is_secure: true
signin_social:
is_secure: false
share:
is_secure: false
\ No newline at end of file
<table width="100%" height="100%" cellpadding="0" cellspacing="0">
<tr>
<td height="100%" valign="middle" align="center">
<form class="signin_form" action="" method="post">
<img style="border-radius:10%;margin-bottom: 50px;" src="/i/logo.svg" width="165" height="62" />
<?php
echo $form->renderGlobalErrors();
echo $form->renderHiddenFields();
echo '<div class="signin_form__field">' . $form['username']->render() . $form['username']->renderError() . '</div>';
echo '<div class="signin_form__field">' . $form['password']->render() . $form['password']->renderError() . '</div>';
?>
<button class="btn_out btn">Войти</button>
</form>
</td>
</tr>
</table>
\ No newline at end of file
<table width="100%" height="100%" cellpadding="0" cellspacing="0">
<tr>
<td height="100%" valign="middle" align="center">
<div class="signup_form">
<img style="border-radius:10%;margin-bottom: 50px;" src="/i/logo.svg" width="165" height="62" />
<?php
echo '<div class="signup_form__field"><input size="24" placeholder="Имя" autocomplete="off" type="text" name="signup[name]" id="signup_name"></div>';
echo '<div class="signup_form__field"><input size="24" placeholder="Телефон" autocomplete="off" autofocus="on" class="phone" type="text" name="signup[username]" id="signup_username"></div>';
echo '<div class="signup_form__field"><input size="24" placeholder="Пароль" autocomplete="off" type="password" name="signup[password]" id="signup_password"></div>';
echo '<div class="signup_form__field signup_form__field_last"><input size="24" placeholder="Повторите пароль" autocomplete="off" type="password" name="signup[password_repeat]" id="signup_password_repeat"></div>';
?>
<div class="signup_form__msg"></div>
<span class="btn_out btn btn_signup_form">Регистрироваться</span>
<a class="signin_link" href="<?php echo url_for('@signin') . ($sf_request->hasParameter('cat_id') && $sf_request->hasParameter('weight') ? '?cat_id=' . $sf_request->getParameter('cat_id') . '&weight=' . $sf_request->getParameter('weight') : '');?>">Уже зарегистрирован, войти</a>
</div>
</td>
</tr>
</table>
\ No newline at end of file
<div class="popup <?php echo ($sf_request->hasParameter('signup') || $sf_request->hasParameter('signin') || $sf_request->hasParameter('recovery') || $sf_request->hasParameter('change_psw')? 'show' : '')?>">
<div class="popup_wrap" onclick="event.cancelBubble = true">
<div class="popup_close" title="Закрыть" onclick="popup.close(event)"></div>
<?php if($sf_user->isAuthenticated()){
$account = $sf_user->getAccount();
?>
<div class="popup_item open_profile ">
<div class="popup_item__title">Редактирование профиля</div>
<div class="popup_item__form">
<div class="popup_item__row">
<input type="text" name="profile_name" autocomplete="off" id="profile_name" placeholder="Имя" value="<?php echo $account->getName();?>">
<input type="text" class="phone" name="profile_phone" autocomplete="off" id="profile_phone" placeholder="Телефон" value="<?php echo $account->getPhone();?>">
<input type="text" name="profile_email" autocomplete="off" id="profile_email" placeholder="Электронная почта" value="<?php echo $account->getEmail();?>">
<input type="text" name="profile_address" autocomplete="off" id="profile_address" placeholder="Адрес" value="<?php echo $account->getAddress();?>">
<input type="password" name="profile_password" autocomplete="off" id="profile_password" placeholder="Пароль">
<div class="popup_item__form__btns">
<button class="btn blue_btn popup_item__form__btn btn_edit_profile" onclick="popup.btnEditProfile(event);return false;">Сохранить</button>
<button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Отменить</button>
</div>
<div class="popup_item__form_msg"></div>
</div>
</div>
</div>
<?php } ?>
<div class="popup_item signup_form <?php echo ($sf_request->hasParameter('signup') ? 'active' : '')?>">
<div class="popup_item__title">Регистрация</div>
<a href="#" onclick="popup.open('signin_form');return false;">Уже зарегистрирован, войти</a>
<div class="popup_item__form">
<div class="popup_item__row">
<input type="text" name="signup_name" autocomplete="off" id="signup_name" placeholder="Имя">
<input type="text" class="phone" name="signup_phone" autocomplete="off" id="signup_phone" placeholder="Телефон">
<input type="text" name="signup_email" autocomplete="off" id="signup_email" placeholder="Электронная почта">
<input type="text" name="signup_address" autocomplete="off" id="signup_address" placeholder="Адрес">
<input type="password" name="signup_password" autocomplete="off" id="signup_password" placeholder="Пароль">
<div class="popup_item__form__btns">
<button class="btn blue_btn popup_item__form__btn" onclick="popup.btnSignup(event);return false;">Зарегистрироваться</button>
<button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Отменить</button>
</div>
<div class="popup_item__form_msg"></div>
</div>
</div>
</div>
<div class="popup_item signin_form <?php echo ($sf_request->hasParameter('signin') ? 'active' : '')?>">
<div class="popup_item__title">Авторизация</div>
<div class="popup_item__form">
<div class="popup_item__row">
<?php
$form = new cashSigninForm();
echo $form->renderHiddenFields();
?>
<input type="text" class="phone" name="signin_phone" autocomplete="off" id="signin_phone" placeholder="Телефон">
<input type="password" name="signin_password" autocomplete="off" id="signin_password" placeholder="Пароль">
<div>
<a href="#" onclick="popup.open('recovery_form');return false;">Не помню пароль</a>
</div>
<div class="popup_item__form__btns">
<button class="btn blue_btn popup_item__form__btn" onclick="popup.btnSignin(event);return false;">Войти</button>
<button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Отменить</button>
</div>
<div class="popup_item__form_msg"></div>
</div>
</div>
</div>
<div class="popup_item remove_bid_form ">
<div class="popup_item__title">Удалить запись?</div>
<div class="popup_item__form">
<div class="popup_item__row">
<div class="popup_item__form__btns">
<button class="btn blue_btn popup_item__form__btn" onclick="popup.btnRemBid(event);return false;">Удалить</button>
<button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Отменить</button>
</div>
<div class="popup_item__form_msg"></div>
</div>
</div>
</div>
<div class="popup_item recovery_form <?php echo ($sf_request->hasParameter('recovery') ? 'active' : '')?>">
<div class="popup_item__title">Отправить сообщение для восстановления?</div>
<div class="popup_item__form">
<div class="popup_item__row">
<input type="text" name="recovery_email" autocomplete="off" id="recovery_email" placeholder="Электронная почта">
<div class="popup_item__form__btns">
<button class="btn blue_btn popup_item__form__btn" onclick="popup.btnRecoveryPsw(event);return false;">Отправить</button>
<button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Отменить</button>
</div>
<div class="popup_item__form_msg"></div>
</div>
</div>
<div class="successfully_msg">
<div class="successfully_msg__text">На вашу электронную почту отправлено письмо, в котором написаны дальнейшие действия для восстановления пароля</div>
<button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Закрыть</button>
</div>
</div>
<div class="popup_item change_psw_form <?php echo ($sf_request->hasParameter('change_psw') ? 'active' : '')?>">
<div class="popup_item__title">Укажите новый пароль для входа</div>
<div class="popup_item__form">
<div class="popup_item__row" >
<input type="hidden" name="change_psw_id" autocomplete="off" id="change_psw_id" value="<?php echo ($sf_request->hasParameter('id') ? $sf_request->getParameter('id') : '');?>">
<input type="hidden" name="change_psw_secret" autocomplete="off" id="change_psw_secret" value="<?php echo ($sf_request->hasParameter('secret') ? $sf_request->getParameter('secret') : '');?>">
<input type="password" name="change_psw_password" autocomplete="off" id="change_psw_password" placeholder="Новый пароль">
<div class="popup_item__form__btns">
<button class="btn blue_btn popup_item__form__btn" onclick="popup.btnRemindPsw(event);return false;">Отправить</button>
<button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Отменить</button>
</div>
<div class="popup_item__form_msg"></div>
</div>
</div>
<div class="successfully_msg">
<div class="successfully_msg__text">Пароль успешно изменен, можете войти в личный кабинет с новым паролем</div>
<button class="btn blue_btn popup_item__form__btn" onclick="popup.open('signin_form');return false;">Войти</button>
<button class="btn white_btn popup_item__form__btn" onclick="popup.close(event)">Закрыть</button>
</div>
</div>
</div>
</div>
\ No newline at end of file
<!DOCTYPE html>
<html style="background-color: #fff;color: #000;">
<head><meta name="viewport" content="device-width, initial-scale=1, user-scalable=no"></head>
<body style="font-size:100%;line-height:120%;font-family:Arial;padding:4.2vw;margin:0;"><?php echo $sf_content;?></body>
</html>
\ No newline at end of file
<?php
if(sfConfig::get('sf_environment') === 'prod'){
?>
<script src="https://yastatic.net/browser-updater/v1/script.js" charset="utf-8"></script><script>var yaBrowserUpdater = new ya.browserUpdater.init({"lang":"ru","browsers":{"yabrowser":"16.12","chrome":"62","ie":"10","opera":"49","safari":"9.1","fx":"57","iron":"35","flock":"Infinity","palemoon":"25","camino":"Infinity","maxthon":"4.5","seamonkey":"2.3"},"theme":"red"});</script>
<?php
}
?>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<?php
include_http_metas();
include_metas();
?>
<title><?php echo get_slot('title', sfConfig::get('app_cash_title'));?></title>
<?php
include_stylesheets();
include_javascripts();
?>
</head>
<body>
\ No newline at end of file
<?php include(sfConfig::get('sf_app_template_dir') . '/header.php'); ?>
<?php include(sfConfig::get('sf_app_template_dir') . '/_popup.php');?>
<div class="body_wrapper_wrapper">
<table class="body_wrapper" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td height="100%" align="center">
<table class="root_table" width="100%" cellspacing="0" cellpadding="0" height="100%">
<?php
if($sf_user->isAuthenticated() || (!$sf_user->isAuthenticated() && $sf_request->getPathInfo() == '/')){
?>
<tr valign="top">
<td class="root_table__top" style="border-bottom: 1px solid #C5CBD6;" align="center" valign="top">
<div class="max_width" style="padding-top: 10px;padding-bottom: 10px;">
<a class="logo" href="<?php echo url_for('@homepage');?>"><img src="/i/logo.svg" width="140" height="50" /></a>
<?php
include_component('main', 'mainMenu', array('template' => 'mainMenu'));
if($sf_user->isAuthenticated()){
?>
<div class="profile">
<b><?php echo $sf_user->getAccount()->getName(); ?></b><i class="br10"></i>
<a href="<?php echo url_for('@signout');?>">Выйти</a>
</div>
<?php
} else {
?>
<div class="no_profile">
<a href="#" onclick="popup.open('signin_form');return false;">Войти</a>
</div>
<?php
}
?>
</div>
</td>
</tr>
<?php
}
?>
<tr valign="top">
<td class="root_table__middle" align="center" valign="top" height="100%">
<?php
echo $sf_content;
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<?php include(sfConfig::get('sf_app_template_dir') . '/footer.php'); ?>
\ No newline at end of file
<?php
if (!function_exists('hex2bin')) {
function hex2bin($data)
{
static $old;
if ($old === null) {
$old = version_compare(PHP_VERSION, '5.2', '<');
}
$isobj = false;
if (is_scalar($data) || (($isobj = is_object($data)) && method_exists($data, '__toString'))) {
if ($isobj && $old) {
ob_start();
echo $data;
$data = ob_get_clean();
} else {
$data = (string)$data;
}
} else {
trigger_error(__FUNCTION__ . '() expects parameter 1 to be string, ' . gettype($data) . ' given', E_USER_WARNING);
return;
}
$len = strlen($data);
if ($len % 2) {
trigger_error(__FUNCTION__ . '(): Hexadecimal input string must have an even length', E_USER_WARNING);
return false;
}
if (strspn($data, '0123456789abcdefABCDEF') != $len) {
trigger_error(__FUNCTION__ . '(): Input string must be hexadecimal string', E_USER_WARNING);
return false;
}
return pack('H*', $data);
}
}
require_once __DIR__ . '/../vendor/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->enablePlugins('sfDoctrinePlugin');
$this->enablePlugins('sfImageTransformPlugin');
$this->enablePlugins('sfCaptchaGDPlugin');
$this->enablePlugins('doAuthPlugin');
$this->enablePlugins('sfRUtilsPlugin');
$this->enablePlugins('sfSphinxPlugin');
$this->enablePlugins('csSettingsPlugin');
}
public function configureDoctrine(Doctrine_Manager $manager)
{
if(class_exists('customListener')){
$manager->setAttribute(Doctrine_Core::ATTR_THROW_EXCEPTIONS, false);
}
}
public function configureDoctrineConnection(Doctrine_Connection $connection)
{
$connection->exec("SET @@session.time_zone = '+03:00'");
if(class_exists('customListener')){
$connection->setEventListener(new customListener());
}
}
}
class ProjectUtils
{
public static function getVersion()
{
$version_file = sfConfig::get('sf_data_dir') . '/version.txt';
if (file_exists($version_file)) {
$version_content = file_get_contents(sfConfig::get('sf_data_dir') . '/version.txt');
$exp = explode("\n", $version_content);
return $exp[0];
}
return '';
}
public static function uuidToHex($uuid)
{
return str_replace('-', '', $uuid);
}
public static function hexToUuid($hex)
{
$regex = '/^([\da-f]{8})([\da-f]{4})([\da-f]{4})([\da-f]{4})([\da-f]{12})$/';
return preg_match($regex, $hex, $matches) ?
"{$matches[1]}-{$matches[2]}-{$matches[3]}-{$matches[4]}-{$matches[5]}" :
FALSE;
}
public static function hexToInteger($hex)
{
$bin = pack('h*', $hex);
return unpack('L*', $bin);
}
public static function integerToHex($integers)
{
$args[0] = $integers;
$args[1] = 'L*';
@ksort($args);
$bin = call_user_func_array('pack', $args);
$results = unpack('h*', $bin);
return $results[1];
}
public static function base64url_encode($data)
{
return exec("echo -n '" . $data . "' | openssl md5 -binary | openssl base64 | tr +/ -_ | tr -d =");
}
public static function nohup($file)
{
return exec('nohup ' . $file . ' > /dev/null 2>&1 &');
}
public static function nohup_task($task)
{
return ProjectUtils::nohup(sfConfig::get('sf_root_dir') . '/symfony ' . $task);
}
public static function get($url, $alwaysReturn = false, $headers = array())
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
if (count($headers) > 0) {
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
}
$r = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
return $info['http_code'] === 200 || $alwaysReturn ? $r : null;
}
public static function post($url, $data, $alwaysReturn = false, $headers = array())
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
if (count($headers) > 0) {
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
}
$r = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
return $info['http_code'] === 200 || $alwaysReturn ? $r : null;
}
public static function pushPost($data)
{
if (strpos($data["notification"]["title"], "debugDEV1") !== false || strpos($data["notification"]["body"], "debugDEV1") !== false) {
sfConfig::set('app_send_push', true);
}
if(!sfConfig::get('app_push_send')){
return 'send push off';
}
if(!sfConfig::get('app_push_fb_key')){
return 'fb_server_key not found';
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://fcm.googleapis.com/fcm/send');
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type:application/json", "Authorization:key=" . sfConfig::get('app_push_fb_key')));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$r = curl_exec($ch);
curl_close($ch);
return $r;
}
public static function wsPub($channel, $data)
{
if(sfConfig::has('app_ws_pub'))
{
self::post(sfConfig::get('app_ws_pub') . '?channel=' . $channel, json_encode($data));
}
}
public static function generateUuid()
{
mt_srand((double)microtime() * 10000);
$charid = strtolower(md5(uniqid(rand(), true)));
$hyphen = chr(45);
$uuid = substr($charid, 0, 8) . $hyphen . substr($charid, 8, 4) . $hyphen . substr($charid, 12, 4) . $hyphen . substr($charid, 16, 4) . $hyphen . substr($charid, 20, 12);
return $uuid;
}
public static function arrayKeysFilter($items = array(), $key = 'id')
{
$ret = array();
foreach ($items as $item) {
$ret[] = $item[$key];
}
return $ret;
}
public static function cubeRecreate()
{
exec('nohup ' . sfConfig::get('sf_root_dir') . '/symfony cube:recreate > /dev/null 2>&1 &');
}
static function smsSend($phone, $mes)
{
if(sfConfig::get("app_sms_send") && sfConfig::get("app_sms_url") && sfConfig::get("app_sms_login") && sfConfig::get("app_sms_password") && !in_array($phone, sfConfig::get('app_sms_phone_deny'))){
$data = array(
'login' => sfConfig::get("app_sms_login"),
'psw' => sfConfig::get("app_sms_password"),
'phones' => $phone,
'mes' => $mes
);
if(sfConfig::get("app_sms_sender")){
$data['sender'] = sfConfig::get("app_sms_sender");
}
$log_path = sfConfig::get('sf_log_dir') . '/sms/' . date('m_Y') . '.log';
LogUtils::logFile(print_r($data, true), $log_path);
$res = ProjectUtils::post(sfConfig::get("app_sms_url"), $data);
LogUtils::logFile($res, $log_path);
}
}
static function getType($mime)
{
$types = array(
'application/pdf' => 'pdf',
'application/vnd.ms-excel' => 'xlsx',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xls',
'application/msword' => 'docx',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'doc',
'application/vnd.ms-powerpoint' => 'ppt',
'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx',
'image/png' => 'png',
'image/jpeg' => 'jpg',
'image/svg+xml' => 'svg',
'audio/mpeg' => 'mp3',
'video/mp4' => 'mp4',
'video/mpeg' => 'mpeg',
'video/webm' => 'webm'
);
return isset($types[$mime]) ? $types[$mime] : null;
}
static function ymActive()
{
return (sfConfig::get('app_ym_status') === 'on' || (sfConfig::get('app_ym_status') === 'test') && ProjectUtils::ymParams('shop') && ProjectUtils::ymParams('key'));
}
static function ymParams($param = false)
{
if(!in_array(sfConfig::get('app_ym_status'), array('test', 'on'))){
return false;
}
if($param === 'shop'){
return sfConfig::get(sfConfig::get('app_ym_status') === 'on' ? 'app_ym_shopId' : 'app_ym_testShopId');
}else{
return sfConfig::get(sfConfig::get('app_ym_status') === 'on' ? 'app_ym_key' : 'app_ym_testKey');
}
}
static function rusDate($date, $format = 'd F Y')
{
$dt = sfRUtils::dt();
$params = new TimeParams();
$params->date = strtotime($date);
$params->format = $format;
$params->monthInflected = true;
return $dt->ruStrFTime($params);
}
}
class LogUtils
{
static function time($start = true)
{
static $time_start = null;
if($start){
$time_start = microtime(true);
}else{
return round((microtime(true) - $time_start) * 1000) . ' ms';
}
}
static function logFile($message, $filepath = null, $memory = true)
{
static $fix_filepath = null;
$message = ' [' . date('Y-m-d H:i:s') . ']' . ($memory ? ' (' . number_format(memory_get_usage() / 1024, 2, ',', ' ') . ' КБ' . ')' : '') . "\n" . $message;
if(!is_null($filepath)){
$fix_filepath = $filepath;
}
if($fix_filepath){
$dir = preg_replace('/(.*)\/.*$/', '$1', $fix_filepath);
if(!file_exists($dir)){
mkdir($dir, 0755, true);
}
file_put_contents($fix_filepath, $message . "\n", FILE_APPEND);
}
}
}
class Yavinesu
{
public static function getVersion()
{
$request = sfContext::getInstance()->getRequest();
$appversion = $request->getParameter('appversion', $request->getHttpHeader('appversion'));
return $appversion === null || !is_numeric($appversion) ? 0 : (int)$appversion;
}
public static function getFullUrl()
{
$request = sfContext::getInstance()->getRequest();
return 'http' . ($request->isSecure() ? 's' : '') . '://' . $request->getHost();
}
public static function getShortUrl($url)
{
return preg_replace("/^\/.{2}\/api\/" . "/iu", "", $url);
}
static function getImageInfo($image)
{
$path = sfConfig::get('sf_upload_dir') . '/f/' . $image;
if(file_exists($path)){
$size = getimagesize($path);
if(is_array($size) && $size[0] > 0 && $size[1] > 0){
$request = sfContext::getInstance()->getRequest();
return array(
'url' => Yavinesu::getFullUrl($request) . '/u/f/' . $image,
'width' => $size[0],
'height' => $size[1]
);
}
}
return null;
}
public static function simpleTime($old_time, $lang = 'ru')
{
$time = time();
$sec = $time - $old_time;
if($sec < 60){
if($lang === 'en'){
return 'Freshly';
}
return 'Только что';
}elseif($sec >= 60 && $sec < 120){
if($lang === 'en'){
return 'A minute ago';
}
return 'Минуту назад';
}elseif($sec >= 86400 && $sec < 172800){
if($lang === 'en'){
return 'Yesterday';
}
return 'Вчера';
}elseif($sec >= 172800 && $sec < 259200){
if($lang === 'en'){
return 'Two days ago';
}
return 'Позавчера';
}
$dt = sfRUtils::dt();
if($sec >= 259200){
if($lang === 'en'){
return preg_replace("/, " . date('Y') . "/u", "", date('j F, Y'));
}
$params = new TimeParams();
$params->date = $old_time;
$params->format = 'd F, Y';
$params->monthInflected = true;
return preg_replace("/, " . date('Y') . "/u", "", $dt->ruStrFTime($params));
}
if($lang === 'en'){
$old = DateTime::createFromFormat('U', $old_time);
$now = new DateTime();
$interval = $now->diff($old);
return $interval->format($sec < 3600 ? '%i minute(s)' : '%h hour(s)') . ' ago';
}else{
return $dt->distanceOfTimeInWords($old_time, $time, $sec < 3600 ? 5 : 4);
}
}
static function getErrorMessage($form)
{
$error = array();
if($form->hasGlobalErrors()){
foreach ($form->getGlobalErrors() as $name => $global_error){
$error[] = $global_error->getMessage();
}
}
foreach ($form as $name => $field){
if($field->hasError()){
$opts = $field->getWidget()->getOptions();
$repeat = false;
if(count($error) > 0){
foreach ($error as $key => $value){
if(trim(preg_replace('/^.*\:(.*)$/', '$1', $value)) === trim($field->getError())){
$error[$key] = preg_replace('/^(.*)\:.*$/', '$1', $value) . ', ' . ($opts['label'] ? $opts['label'] : $name) . ': ' . $field->getError();
$repeat = true;
break;
}
}
}
if(!$repeat){
$error[] = ($opts['label'] ? $opts['label'] : $name) . ': ' . $field->getError();
}
}
}
return implode(";\n", $error);
}
static function getFormErrors($form)
{
$errors = array();
foreach ($form as $name => $field) {
if ($field->hasError()) {
$errors[isset($form::$replace_names) && is_array($form::$replace_names) && isset($form::$replace_names[$name]) ? $form::$replace_names[$name] : $name] = (string)$field->getError();
}
}
$global_errors = null;
if($form->hasGlobalErrors()){
$global_errors = array();
foreach ($form->getGlobalErrors() as $globalError){
$global_errors[] = (string)$globalError;
}
$global_errors = implode(";\n", $global_errors);
}
return array(
'errors' => $errors,
'global_errors' => $global_errors
);
}
static function searchAddress($query = '')
{
$result = array(
'state' => 'error',
'code' => 'empty_query',
'message' => 'Пустая поисковая строка',
);
if($query){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
'query' => $query,
'locations' => array('region' => 'москва'/*'city' => 'уфа'*/)))
);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization: Token ' . sfConfig::get('app_dadata_key'),
'Content-Type: application/json'));
$r = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if($info['http_code'] === 200 && is_array($response = json_decode($r, true))){
$result = array(
'state' => 'success',
'data' => array()
);
if(isset($response['suggestions']) && is_array($response['suggestions']) && count($response['suggestions']) > 0){
foreach ($response['suggestions'] as $suggestion){
$good_address = $suggestion['data']['house'] && $suggestion['data']['street_with_type'] && $suggestion['data']['geo_lat'] && $suggestion['data']['geo_lon'];
$result['data'][] = array(
'title' => $suggestion['value'],
'streetHome' => $suggestion['data']['street_with_type'] . ' ' . $suggestion['data']['house'],
'coords' => $good_address ? ($suggestion['data']['geo_lat'] . ',' . $suggestion['data']['geo_lon']) : null
);
}
}
}elseif($info['http_code'] === 403){
$result['message'] = 'Техническая ошибка, попробуйте позднее';
}
}
return $result;
}
static function priceFormat($price)
{
return str_replace('.00', '', number_format($price, 2, '.', ''));
}
static function weightFormat($weight)
{
return str_replace('.000', '', number_format($weight, 3, '.', ''));
}
static function getUnitpaySignature($account, $currency, $desc, $sum, $secretKey)
{
$hashStr = $account . '{up}' . $currency . '{up}' . $desc . '{up}' . $sum . '{up}' . $secretKey;
return hash('sha256', $hashStr);
}
static function getCourierOutMin()
{
return csSettings::get('money_out_min') && is_numeric(csSettings::get('money_out_min')) && csSettings::get('money_out_min') > 0 ? (int)csSettings::get('money_out_min') : 1000;
}
}
class base64ImageUtils
{
public static function save($base64, $key)
{
$result = array('code' => 'Неправильный формат');
if(!file_exists(sfConfig::get('sf_upload_dir') . '/f/')){
mkdir(sfConfig::get('sf_upload_dir') . '/f/', 0755, true);
}
$filepath = sfConfig::get('sf_upload_dir') . '/f/' . ProjectUtils::generateUuid();
if ($image_base = base64_decode($base64)) {
if(file_put_contents($filepath, $image_base) !== false){
$type = str_replace('image/', '', mime_content_type($filepath));
if (in_array($type, array('jpeg', 'png')) && rename($filepath, $filepath . '.' . $type)) {
$filepath .= '.' . $type;
$upload_res = json_decode(Page::uploader($filepath, $key, 'path'), 'image');
if ($upload_res['state'] === 'success') {
$result['state'] = 'success';
$result['value'] = str_replace(sfConfig::get('sf_upload_dir') . '/f/', '', $upload_res['filename']);
unset($result['code']);
}else{
$result['code'] = $upload_res['errorTxt'];
}
}
}
}
return $result;
}
static function clean($images = array(), $size_key = false)
{
if(is_array($images) && count($images) > 0){
if($size_key){
$cfg_sizes = sfConfig::get('image_' . $size_key . '_sizes');
}
foreach ($images as $image_src) {
if($image_src){
if($size_key && is_array($cfg_sizes) && count($cfg_sizes) > 0){
foreach ($cfg_sizes as $cfg_size_name => $cfg_size){
if($cfg_size_name !== 'min'){
self::remove(sfConfig::get('sf_upload_dir') . '/f/' . Page::replaceImageSize($image_src, $cfg_size_name));
}
}
}else{
self::remove(sfConfig::get('sf_upload_dir') . '/f/' . $image_src);
}
}
}
}
}
static function remove($path)
{
if(file_exists($path)){
@unlink($path);
}
}
}
\ No newline at end of file
all:
email:
send: true
# sender: 'app@yavinesu.ru'
sender: 'igor@atmapro.ru'
dev: 'igor@atmapro.ru'
copy: ''
www_title: 'Накопитель'
arm_title: 'Накопитель - АРМ'
cash_title: 'Накопитель - cash'
host: ''
chef_map_distance_limit_km: 10000000
sphinx_index: index_yavinesu
push:
send: true
fb_key: 'AAAA0yLZOG0:APA91bFjsVgQpneKfZmkc90dBzgoq7XN8_jpnIkYU9yJfU9rW8Xd_WtOSbmsMsAiuD0kEouzm_nF0DknU5sE9Oysys4LSmpNlWfNG8wI_Wwyfk8rmXc3qgmviHwBcYhsUhokx42zrMki'
share:
as: 'https://apps.apple.com/ru/app/%D1%8F%D0%B2%D1%8B%D0%BD%D0%B5%D1%81%D1%83/id1546184717'
pm: 'https://play.google.com/store/apps/details?id=atma.company.yavynesu'
sms:
send: false
url: 'https://smsc.ru/sys/send.php'
login: ''
password: ''
sender: ''
phone_deny: []
dadata:
key: 'ddbd7999dae0a21cd7f25996fc6b0fc89198252e'
secret: '59cd7ba383a4dfd19f1d4497f023577f180327cf'
vk:
client_id: ''
client_secret: ''
redirect_uri: ''
google:
client_id: '906822760557-fn0oi7llnptd9lk42dd7g0k2gkb06f7k.apps.googleusercontent.com'
client_secret: 'cUTUWXe5LpJxWcGpakk92_by'
redirect_uri: 'https://app.yavinesu.ru/'
ym:
status: on
testShopId: '758731'
testKey: 'test_KJ8wdgevSGTLD47f1EJ8YiPraG7xkJe_SBqJvh1dSao'
shopId: '780486'
key: 'live_74qOrvfo3Q82mXq-4mjHfVG3BKduedxPKcNHK__L_kU'
out:
agentId: ''
key: ''
unitpay:
status: on
login: 'sergey@neftespecservis.ru'
projectId: 361581
publicKey: '361581-80d97'
secretKeyProject: 'b45afdcfd3a538e9bbe3dc38c3793ccb'
secretKeyUser: '74997ACB3A5-8F804FF80DD-571CAA02E3'
secretKeyTest: 'A89826403A6-DC60566A28D-EA43A2AC78'
doAuth:
algorithm_callable: sha1
check_password_callable: false
remember_cookie_name: doRemember
remember_cookie_expiration_age: 31536000
activation: true
reset_password_url: '@homepage'
signin_url: '@homepage'
signout_url: '@homepage'
routes_register: true
doAuth_register:
forward: ~
redirect_path: '@homepage'
signin: true
doAuth_email:
activation: true
registration: true
from: 'app@yavinesu.ru'
module: baseAuth
sf_captchagd:
image_width: 150
image_height: 45
chars: "123456789"
length: 5
font_size: 18
force_new_captcha: true
font_color: ["ACACAC"]
fonts: ["planet_benson/Planetbe.ttf"]
background_color: FFFFFF
border_color: FFFFFF
logo_mail: '<img style="width: 165px;height: 62px;" src="https://cash-vtorpoisk.atmadev.ru/i/logo.png" alt="логотип Накопитель" />'
\ No newline at end of file
all:
# sphinx:
# class: sfDoctrineDatabase
# profiler: false
# param:
# dsn: 'mysql:host=127.0.0.1;dbname=;port=9306'
# username:
# password:
doctrine:
class: sfDoctrineDatabase
param:
dsn: 'mysql:host=127.0.0.1;dbname=vtorpoisk'
username: root
password: h7!nIay6HUtu
\ No newline at end of file
Session:
columns:
id:
type: string(128)
primary: true
session_data:
type: text
session_time:
type: integer
user_id:
type: integer
token:
type: string(255)
device_id:
type: string(255)
relations:
User:
onDelete: CASCADE
local: user_id
foreign: id
Page:
actAs:
Timestampable: ~
columns:
title:
type: string(255)
notnull: true
alias:
type: string(255)
unique: true
body:
type: string(50000)
images:
type: text
is_activated:
type: boolean
notnull: true
default: true
Cat:
actAs:
Timestampable: ~
columns:
title:
type: string(1000)
notnull: true
min_weight:
type: float(10,3)
price:
type: float(10,2)
order_id:
type: integer
notnull: true
default: 0
Export:
actAs:
Timestampable: ~
columns:
logic_type:
type: enum
values: ['bid', 'wait', 'bid_after_wait']
notnull: true
cat_id:
type: integer
weight:
type: float(10,3)
sum:
type: float(10,2)
# name:
# type: string(50)
# phone:
# type: string(12)
user_id:
type: integer
relations:
Cat:
onDelete: CASCADE
local: cat_id
foreign: id
User:
onDelete: CASCADE
local: user_id
foreign: id
MainMenu:
columns:
title:
type: string(1000)
notnull: true
link:
type: string(1000)
notnull: true
is_activated:
type: boolean
notnull: true
default: true
order_id:
type: integer
notnull: true
default: 0
MailTemplate:
columns:
title:
type: string(255)
notnull: true
event:
type: string(255)
notnull: true
unique: true
theme:
type: string(1000)
notnull: true
copy:
type: string(1000)
params:
type: string(10000)
body:
type: text
notnull: true
\ No newline at end of file
all:
#*пример для поля в таблице*
# TableName_field_name: *соблюдение регистра обязательно*
# sizes:
# min:
# width: 1000
# height: 300
# S:
# width: 100
# height: 100
# thumbstyle: scale
# FHD:
# width: 1920
# height: 1080
# thumbstyle: scale
#*пример без подгрузки данных из таблицы*
# contact: *соблюдение регистра обязательно*
# sizes:
# min:
# width: 1000
# height: 500
# S:
# width: 270
# height: 170
# thumbstyle: center
# M:
# width: 270
# height: 170
# thumbstyle: center
# jcrop: true
# FHD:
# width: 1920
# height: 1080
# thumbstyle: scale
redactor:
sizes:
min:
width: 100
height: 100
FHD:
width: 1920
height: 1080
thumbstyle: scale
User_image:
sizes:
min:
width: 240
height: 240
S:
width: 150
height: 150
thumbstyle: center
M:
width: 48
height: 48
thumbstyle: center
XM:
width: 240
height: 240
thumbstyle: center
XL:
width: 144
height: 144
thumbstyle: center
FHD:
width: 1920
height: 1080
thumbstyle: scale
User_selfie_kitchen:
sizes:
min:
width: 100
height: 100
S:
width: 100
height: 100
thumbstyle: scale
FHD:
width: 1920
height: 1080
thumbstyle: scale
TutorialAuth_image:
sizes:
min:
width: 256
height: 256
S:
width: 256
height: 256
thumbstyle: center
jcrop: true
FHD:
width: 1920
height: 1080
thumbstyle: scale
TutorialUnAuth_image:
sizes:
min:
width: 1280
height: 900
S:
width: 1280
height: 900
thumbstyle: center
jcrop: true
FHD:
width: 1920
height: 1080
thumbstyle: scale
Consume_image:
sizes:
min:
width: 200
height: 200
S:
width: 200
height: 200
thumbstyle: scale
Subscription_image:
sizes:
min:
width: 270
height: 270
S:
width: 270
height: 270
thumbstyle: scale
FHD:
width: 1920
height: 1080
thumbstyle: scale
TutorialCourier_image:
sizes:
min:
width: 1280
height: 900
S:
width: 1280
height: 900
thumbstyle: center
jcrop: true
FHD:
width: 1920
height: 1080
thumbstyle: scale
Page_image:
sizes:
min:
width: 328
height: 140
S:
width: 328
height: 140
thumbstyle: center
jcrop: true
FHD:
width: 1920
height: 1080
thumbstyle: scale
Problem_images:
sizes:
min:
width: 100
height: 100
S:
width: 100
height: 100
thumbstyle: center
FHD:
width: 1920
height: 1080
thumbstyle: scale
order_item_image:
sizes:
min:
width: 100
height: 100
S:
width: 100
height: 100
thumbstyle: center
FHD:
width: 1920
height: 1080
thumbstyle: scale
\ No newline at end of file
[symfony]
name=sf
author=Atma
orm=Doctrine
[prod]
host=82.202.222.188
port=22
user=yavinesu.ru
dir=/www/yavinesu.ru/
type=rsync
\ No newline at end of file
/.idea
/idea/
/web/.well-known
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
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