@@ -19,22 +19,22 @@ discard block |
||
| 19 | 19 | <div class="filter"> |
| 20 | 20 | <label><?= $option->name; ?></label> |
| 21 | 21 | <?php |
| 22 | - switch ($option->type) { |
|
| 23 | - case 'radio': |
|
| 22 | + switch ($option->type) { |
|
| 23 | + case 'radio': |
|
| 24 | 24 | foreach ($option->items as $item) { |
| 25 | - $this->widget('Ui\Form/' . $option->type, [ |
|
| 26 | - 'label' => $item->name, |
|
| 27 | - 'name' => "filters[options][{$option->id}]", |
|
| 28 | - !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false, |
|
| 29 | - 'options' => [ |
|
| 30 | - 'value' => $item->id, |
|
| 31 | - ] |
|
| 32 | - ]); |
|
| 33 | - } |
|
| 34 | - break; |
|
| 35 | - case 'select': |
|
| 25 | + $this->widget('Ui\Form/' . $option->type, [ |
|
| 26 | + 'label' => $item->name, |
|
| 27 | + 'name' => "filters[options][{$option->id}]", |
|
| 28 | + !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false, |
|
| 29 | + 'options' => [ |
|
| 30 | + 'value' => $item->id, |
|
| 31 | + ] |
|
| 32 | + ]); |
|
| 33 | + } |
|
| 34 | + break; |
|
| 35 | + case 'select': |
|
| 36 | 36 | foreach ($option->items as $item) { |
| 37 | - ?> |
|
| 37 | + ?> |
|
| 38 | 38 | <div class="radio"> |
| 39 | 39 | <label> |
| 40 | 40 | <input type="radio" name = 'filters[options][<?= $option->id; ?>]' value ="<?= $item->id; ?>" <?= !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : ''; ?>> |
@@ -42,18 +42,18 @@ discard block |
||
| 42 | 42 | </label> |
| 43 | 43 | </div> |
| 44 | 44 | <?php |
| 45 | - } |
|
| 46 | - break; |
|
| 47 | - default: |
|
| 45 | + } |
|
| 46 | + break; |
|
| 47 | + default: |
|
| 48 | 48 | $this->widget('Ui\Form/' . $option->type, [ |
| 49 | - 'label' => $option->name, |
|
| 50 | - 'name' => "filters[options][{$option->id}]", |
|
| 51 | - 'options' => [ |
|
| 52 | - 'value' => !empty($_GET['filters']['options'][$option->id]) ? $_GET['filters']['options'][$option->id] : '', |
|
| 53 | - ] |
|
| 54 | - ]); |
|
| 55 | - } |
|
| 56 | - ?> |
|
| 49 | + 'label' => $option->name, |
|
| 50 | + 'name' => "filters[options][{$option->id}]", |
|
| 51 | + 'options' => [ |
|
| 52 | + 'value' => !empty($_GET['filters']['options'][$option->id]) ? $_GET['filters']['options'][$option->id] : '', |
|
| 53 | + ] |
|
| 54 | + ]); |
|
| 55 | + } |
|
| 56 | + ?> |
|
| 57 | 57 | </div> |
| 58 | 58 | <?php |
| 59 | 59 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | switch ($option->type) { |
| 23 | 23 | case 'radio': |
| 24 | 24 | foreach ($option->items as $item) { |
| 25 | - $this->widget('Ui\Form/' . $option->type, [ |
|
| 25 | + $this->widget('Ui\Form/'.$option->type, [ |
|
| 26 | 26 | 'label' => $item->name, |
| 27 | 27 | 'name' => "filters[options][{$option->id}]", |
| 28 | 28 | !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false, |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | break; |
| 47 | 47 | default: |
| 48 | - $this->widget('Ui\Form/' . $option->type, [ |
|
| 48 | + $this->widget('Ui\Form/'.$option->type, [ |
|
| 49 | 49 | 'label' => $option->name, |
| 50 | 50 | 'name' => "filters[options][{$option->id}]", |
| 51 | 51 | 'options' => [ |
@@ -5,15 +5,15 @@ |
||
| 5 | 5 | <h3>Вход</h3> |
| 6 | 6 | <div class="form-group"> |
| 7 | 7 | <?php |
| 8 | - $socials = Users\Social::getList(['where' => ['active', 1]]); |
|
| 9 | - if ($socials) { |
|
| 10 | - echo 'Войти через: '; |
|
| 11 | - foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) { |
|
| 12 | - $text = $social->image ? '<img src ="' . Statics::file($social->image->path, '25x25', 'q') . '">' : $social->name(); |
|
| 13 | - echo "<a href = '/users/social/auth/{$social->code}'>{$text}</a> "; |
|
| 14 | - } |
|
| 15 | - } |
|
| 16 | - ?> |
|
| 8 | + $socials = Users\Social::getList(['where' => ['active', 1]]); |
|
| 9 | + if ($socials) { |
|
| 10 | + echo 'Войти через: '; |
|
| 11 | + foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) { |
|
| 12 | + $text = $social->image ? '<img src ="' . Statics::file($social->image->path, '25x25', 'q') . '">' : $social->name(); |
|
| 13 | + echo "<a href = '/users/social/auth/{$social->code}'>{$text}</a> "; |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | + ?> |
|
| 17 | 17 | </div> |
| 18 | 18 | <form action = '' method = 'POST' > |
| 19 | 19 | <div class ='row'> |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | if ($socials) { |
| 10 | 10 | echo 'Войти через: '; |
| 11 | 11 | foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) { |
| 12 | - $text = $social->image ? '<img src ="' . Statics::file($social->image->path, '25x25', 'q') . '">' : $social->name(); |
|
| 12 | + $text = $social->image ? '<img src ="'.Statics::file($social->image->path, '25x25', 'q').'">' : $social->name(); |
|
| 13 | 13 | echo "<a href = '/users/social/auth/{$social->code}'>{$text}</a> "; |
| 14 | 14 | } |
| 15 | 15 | } |
@@ -25,9 +25,9 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | foreach ($reExchange->files as $reFile) { |
| 27 | 27 | if (strpos($reFile->name, '/')) { |
| 28 | - Tools::createDir($exchange->path . '/' . substr($reFile->name, 0, strrpos($reFile->name, '/'))); |
|
| 28 | + Tools::createDir($exchange->path.'/'.substr($reFile->name, 0, strrpos($reFile->name, '/'))); |
|
| 29 | 29 | } |
| 30 | - copy($reExchange->path . '/' . $reFile->name, $exchange->path . '/' . $reFile->name); |
|
| 30 | + copy($reExchange->path.'/'.$reFile->name, $exchange->path.'/'.$reFile->name); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | //Tools::copyFiles($reExchange->path, $exchange->path); |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | $log->query = $reLog->query; |
| 47 | 47 | $log->save(); |
| 48 | 48 | |
| 49 | - $modeClass = 'Exchange1c\Mode\\' . ucfirst(strtolower($log->info)); |
|
| 49 | + $modeClass = 'Exchange1c\Mode\\'.ucfirst(strtolower($log->info)); |
|
| 50 | 50 | if (!class_exists($modeClass)) { |
| 51 | 51 | $log->status = 'failure'; |
| 52 | - $log->info = 'mode class ' . $modeClass . ' not found'; |
|
| 52 | + $log->info = 'mode class '.$modeClass.' not found'; |
|
| 53 | 53 | $log->date_end = date('Y-m-d H:i:s'); |
| 54 | 54 | $log->save(); |
| 55 | 55 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $exchange->type = $_GET['type']; |
| 35 | 35 | $exchange->session = session_id(); |
| 36 | 36 | $exchange->save(); |
| 37 | - $exchange->path = App::$cur->path . '/tmp/Exchange1c/' . date('Y-m-d') . '/' . $exchange->id; |
|
| 37 | + $exchange->path = App::$cur->path.'/tmp/Exchange1c/'.date('Y-m-d').'/'.$exchange->id; |
|
| 38 | 38 | $exchange->save(); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -45,10 +45,10 @@ discard block |
||
| 45 | 45 | $log->status = 'process'; |
| 46 | 46 | $log->query = json_encode($_GET); |
| 47 | 47 | $log->save(); |
| 48 | - $modeClass = 'Exchange1c\Mode\\' . ucfirst(strtolower($_GET['mode'])); |
|
| 48 | + $modeClass = 'Exchange1c\Mode\\'.ucfirst(strtolower($_GET['mode'])); |
|
| 49 | 49 | if (!class_exists($modeClass)) { |
| 50 | 50 | $log->status = 'failure'; |
| 51 | - $log->info = 'mode class ' . $modeClass . ' not found'; |
|
| 51 | + $log->info = 'mode class '.$modeClass.' not found'; |
|
| 52 | 52 | $log->date_end = date('Y-m-d H:i:s'); |
| 53 | 53 | $log->save(); |
| 54 | 54 | } |
@@ -24,16 +24,16 @@ |
||
| 24 | 24 | |
| 25 | 25 | if (strpos($_GET['filename'], '/') !== false) { |
| 26 | 26 | $subDir = substr($_GET['filename'], 0, strrpos($_GET['filename'], "/") + 1); |
| 27 | - \Tools::createDir($dir . '/' . $subDir); |
|
| 27 | + \Tools::createDir($dir.'/'.$subDir); |
|
| 28 | 28 | } |
| 29 | 29 | $status = 'success'; |
| 30 | 30 | $text = ''; |
| 31 | - if (false === file_put_contents($dir . '/' . $_GET['filename'], file_get_contents("php://input"))) { |
|
| 31 | + if (false === file_put_contents($dir.'/'.$_GET['filename'], file_get_contents("php://input"))) { |
|
| 32 | 32 | $status = 'failure'; |
| 33 | - $text = 'Fail on save file: ' . $_GET['filename']; |
|
| 33 | + $text = 'Fail on save file: '.$_GET['filename']; |
|
| 34 | 34 | } |
| 35 | 35 | if (strpos($_GET['filename'], '1cbitrix') !== false) { |
| 36 | - $data = new \SimpleXMLElement(file_get_contents($dir . '/' . $_GET['filename'])); |
|
| 36 | + $data = new \SimpleXMLElement(file_get_contents($dir.'/'.$_GET['filename'])); |
|
| 37 | 37 | $orders = new \Exchange1c\Parser\Orders($data); |
| 38 | 38 | $orders->process(); |
| 39 | 39 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | public function process() |
| 17 | 17 | { |
| 18 | 18 | $_SESSION['auth'] = true; |
| 19 | - \App::$cur->exchange1c->response('success', session_name() . "\n" . session_id(), false); |
|
| 19 | + \App::$cur->exchange1c->response('success', session_name()."\n".session_id(), false); |
|
| 20 | 20 | $this->end(); |
| 21 | 21 | } |
| 22 | 22 | |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | header("Content-Type: text/xml"); |
| 27 | 27 | header("Expires: Thu, 19 Feb 1998 13:24:18 GMT"); |
| 28 | - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|
| 28 | + header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
|
| 29 | 29 | header("Cache-Control: no-cache, must-revalidate"); |
| 30 | 30 | header("Cache-Control: post-check=0,pre-check=0"); |
| 31 | 31 | header("Cache-Control: max-age=0"); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | { |
| 16 | 16 | public function process() |
| 17 | 17 | { |
| 18 | - \App::$cur->Migrations->startMigration(1, strpos($_GET['filename'], 'import') !== false ? 1 : 2, $this->exchange->path . '/' . $_GET['filename']); |
|
| 18 | + \App::$cur->Migrations->startMigration(1, strpos($_GET['filename'], 'import') !== false ? 1 : 2, $this->exchange->path.'/'.$_GET['filename']); |
|
| 19 | 19 | echo 'success'; |
| 20 | 20 | $this->end(); |
| 21 | 21 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | public function process() |
| 17 | 17 | { |
| 18 | 18 | echo "zip=no\n"; |
| 19 | - echo 'file_limit=' . \Tools::toBytes(ini_get('post_max_size')); |
|
| 19 | + echo 'file_limit='.\Tools::toBytes(ini_get('post_max_size')); |
|
| 20 | 20 | $this->end(); |
| 21 | 21 | } |
| 22 | 22 | |