@@ -2,27 +2,45 @@ |
||
2 | 2 | <form action = '' method = 'POST' enctype="multipart/form-data"> |
3 | 3 | <div class ="form-group"> |
4 | 4 | <label>Название сайта</label> |
5 | - <input class ="form-control" type = 'text' name = 'site_name' value = '<?php if (!empty(\App::$primary->config['site']['name'])) echo \App::$primary->config['site']['name']; ?>' /> |
|
5 | + <input class ="form-control" type = 'text' name = 'site_name' value = '<?php if (!empty(\App::$primary->config['site']['name'])) { |
|
6 | + echo \App::$primary->config['site']['name']; |
|
7 | +} |
|
8 | +?>' /> |
|
6 | 9 | </div> |
7 | 10 | <div class ="form-group"> |
8 | 11 | <label>Название компании</label> |
9 | - <input class ="form-control" type = 'text' name = 'company_name' value = '<?php if (!empty(\App::$primary->config['site']['company_name'])) echo \App::$primary->config['site']['company_name']; ?>' /> |
|
12 | + <input class ="form-control" type = 'text' name = 'company_name' value = '<?php if (!empty(\App::$primary->config['site']['company_name'])) { |
|
13 | + echo \App::$primary->config['site']['company_name']; |
|
14 | +} |
|
15 | +?>' /> |
|
10 | 16 | </div> |
11 | 17 | <div class ="form-group"> |
12 | 18 | <label>Основной домен</label> |
13 | - <input class ="form-control" type = 'text' name = 'site_domain' value = '<?php if (!empty(\App::$primary->config['site']['domain'])) echo \App::$primary->config['site']['domain']; ?>' /> |
|
19 | + <input class ="form-control" type = 'text' name = 'site_domain' value = '<?php if (!empty(\App::$primary->config['site']['domain'])) { |
|
20 | + echo \App::$primary->config['site']['domain']; |
|
21 | +} |
|
22 | +?>' /> |
|
14 | 23 | </div> |
15 | 24 | <div class ="form-group"> |
16 | 25 | <label>Контактный email</label> |
17 | - <input class ="form-control" type = 'text' name = 'site_email' value = '<?php if (!empty(\App::$primary->config['site']['email'])) echo \App::$primary->config['site']['email']; ?>' /> |
|
26 | + <input class ="form-control" type = 'text' name = 'site_email' value = '<?php if (!empty(\App::$primary->config['site']['email'])) { |
|
27 | + echo \App::$primary->config['site']['email']; |
|
28 | +} |
|
29 | +?>' /> |
|
18 | 30 | </div> |
19 | 31 | <div class ="form-group"> |
20 | 32 | <label>Ключевые слова</label> |
21 | - <input class ="form-control" type = 'text' name = 'site_keywords' value = '<?php if (!empty(\App::$primary->config['site']['keywords'])) echo \App::$primary->config['site']['keywords']; ?>' /> |
|
33 | + <input class ="form-control" type = 'text' name = 'site_keywords' value = '<?php if (!empty(\App::$primary->config['site']['keywords'])) { |
|
34 | + echo \App::$primary->config['site']['keywords']; |
|
35 | +} |
|
36 | +?>' /> |
|
22 | 37 | </div> |
23 | 38 | <div class ="form-group"> |
24 | 39 | <label>Краткое описание сайта</label> |
25 | - <input class ="form-control" type = 'text' name = 'site_description' value = '<?php if (!empty(\App::$primary->config['site']['description'])) echo \App::$primary->config['site']['description']; ?>' /> |
|
40 | + <input class ="form-control" type = 'text' name = 'site_description' value = '<?php if (!empty(\App::$primary->config['site']['description'])) { |
|
41 | + echo \App::$primary->config['site']['description']; |
|
42 | +} |
|
43 | +?>' /> |
|
26 | 44 | </div> |
27 | 45 | <?php |
28 | 46 | $form = new Ui\Form(); |
@@ -2,15 +2,15 @@ |
||
2 | 2 | <h4 class ='dashboard-widgets-welcome'>Добро Пожаловать в панель управления<?= class_exists('\Users\User') ? ', ' . \Users\User::$cur->name() : ''; ?></h4> |
3 | 3 | <div class = "row"> |
4 | 4 | <?php |
5 | - $rowSum = 0; |
|
6 | - foreach ($sections as $section) { |
|
7 | - if (empty($section['widget'])) { |
|
8 | - continue; |
|
9 | - } |
|
5 | + $rowSum = 0; |
|
6 | + foreach ($sections as $section) { |
|
7 | + if (empty($section['widget'])) { |
|
8 | + continue; |
|
9 | + } |
|
10 | 10 | |
11 | - $widgetSize = !empty($section['size']) ? $section['size'] : 1; |
|
12 | - $rowSum+=$widgetSize; |
|
13 | - ?> |
|
11 | + $widgetSize = !empty($section['size']) ? $section['size'] : 1; |
|
12 | + $rowSum+=$widgetSize; |
|
13 | + ?> |
|
14 | 14 | <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $section['widget'](); ?></div> |
15 | 15 | <?php |
16 | 16 | if ($rowSum >= 3) { |
@@ -9,7 +9,7 @@ |
||
9 | 9 | } |
10 | 10 | |
11 | 11 | $widgetSize = !empty($section['size']) ? $section['size'] : 1; |
12 | - $rowSum+=$widgetSize; |
|
12 | + $rowSum += $widgetSize; |
|
13 | 13 | ?> |
14 | 14 | <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $section['widget'](); ?></div> |
15 | 15 | <?php |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $root->setAttribute("xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9"); |
38 | 38 | $root = $xml->appendChild($root); |
39 | 39 | |
40 | - $addToXml = function ($xml, $parent, $nodeName, $text) { |
|
40 | + $addToXml = function($xml, $parent, $nodeName, $text) { |
|
41 | 41 | $node = $parent->appendChild($xml->createElement($nodeName)); |
42 | 42 | $node->appendChild($xml->createTextNode($text)); |
43 | 43 | return $node; |
@@ -1,14 +1,14 @@ |
||
1 | 1 | <h1>Установка модулей</h1> |
2 | 2 | <form> |
3 | 3 | <?php |
4 | - $config = Config::app(App::$primary ? App::$primary : App::$cur); |
|
5 | - $modules = array_flip(Module::getInstalled(App::$cur)); |
|
6 | - $systemModules = array_slice(scandir(INJI_SYSTEM_DIR . '/modules'), 2); |
|
7 | - foreach ($systemModules as $module) { |
|
8 | - $info = Module::getInfo($module); |
|
9 | - if (!$info || isset($modules[$module])) |
|
10 | - continue; |
|
11 | - ?> |
|
4 | + $config = Config::app(App::$primary ? App::$primary : App::$cur); |
|
5 | + $modules = array_flip(Module::getInstalled(App::$cur)); |
|
6 | + $systemModules = array_slice(scandir(INJI_SYSTEM_DIR . '/modules'), 2); |
|
7 | + foreach ($systemModules as $module) { |
|
8 | + $info = Module::getInfo($module); |
|
9 | + if (!$info || isset($modules[$module])) |
|
10 | + continue; |
|
11 | + ?> |
|
12 | 12 | <div class ="form-group"> |
13 | 13 | <div class="checkbox"> |
14 | 14 | <label> |
@@ -6,8 +6,9 @@ |
||
6 | 6 | $systemModules = array_slice(scandir(INJI_SYSTEM_DIR . '/modules'), 2); |
7 | 7 | foreach ($systemModules as $module) { |
8 | 8 | $info = Module::getInfo($module); |
9 | - if (!$info || isset($modules[$module])) |
|
10 | - continue; |
|
9 | + if (!$info || isset($modules[$module])) { |
|
10 | + continue; |
|
11 | + } |
|
11 | 12 | ?> |
12 | 13 | <div class ="form-group"> |
13 | 14 | <div class="checkbox"> |
@@ -13,12 +13,12 @@ |
||
13 | 13 | |
14 | 14 | class Reader extends \Object { |
15 | 15 | |
16 | - public $data = NULL; |
|
16 | + public $data = null; |
|
17 | 17 | public $source = ''; |
18 | 18 | |
19 | 19 | public function loadData($source = '') { |
20 | 20 | $this->source = $source; |
21 | - return FALSE; |
|
21 | + return false; |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | public function readPath($path = '/') { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $query->table = \Exchange1c\Exchange\File::table(); |
26 | 26 | $query->cols = \Exchange1c\Exchange\File::colPrefix() . 'id'; |
27 | 27 | $queryArr = $query->buildQuery(); |
28 | - $queryArr['query'].=' where `' . \Exchange1c\Exchange\File::colPrefix() . 'deleted` = 0 AND `' . \Exchange1c\Exchange\File::colPrefix() . 'date_create` < NOW() - INTERVAL ' . \App::$cur->exchange1c->config['maxSaveFilesInterval']; |
|
28 | + $queryArr['query'] .= ' where `' . \Exchange1c\Exchange\File::colPrefix() . 'deleted` = 0 AND `' . \Exchange1c\Exchange\File::colPrefix() . 'date_create` < NOW() - INTERVAL ' . \App::$cur->exchange1c->config['maxSaveFilesInterval']; |
|
29 | 29 | try { |
30 | 30 | $ids = array_keys($query->query($queryArr)->getArray(\Exchange1c\Exchange\File::colPrefix() . 'id')); |
31 | 31 | } catch (\PDOException $exc) { |
@@ -42,10 +42,10 @@ |
||
42 | 42 | <div class="col-lg-10"> |
43 | 43 | <select class="form-control" name = 'user_role_id'> |
44 | 44 | <?php |
45 | - foreach ($roles as $role) { |
|
46 | - echo "<option value = '{$role['role_id']}'>{$role['role_name']}</option>"; |
|
47 | - } |
|
48 | - ?> |
|
45 | + foreach ($roles as $role) { |
|
46 | + echo "<option value = '{$role['role_id']}'>{$role['role_name']}</option>"; |
|
47 | + } |
|
48 | + ?> |
|
49 | 49 | </select> |
50 | 50 | </div> |
51 | 51 | </div> |
@@ -41,14 +41,14 @@ |
||
41 | 41 | <div class="col-lg-10"> |
42 | 42 | <select class="form-control" name = 'user_role_id'> |
43 | 43 | <?php |
44 | - foreach ($roles as $role) { |
|
45 | - if ($role['role_id'] == $user->user_role_id) |
|
46 | - $selected = 'selected = "selected"'; |
|
47 | - else |
|
48 | - $selected = ''; |
|
49 | - echo "<option {$selected} value = '{$role['role_id']}'>{$role['role_name']}</option>"; |
|
50 | - } |
|
51 | - ?> |
|
44 | + foreach ($roles as $role) { |
|
45 | + if ($role['role_id'] == $user->user_role_id) |
|
46 | + $selected = 'selected = "selected"'; |
|
47 | + else |
|
48 | + $selected = ''; |
|
49 | + echo "<option {$selected} value = '{$role['role_id']}'>{$role['role_name']}</option>"; |
|
50 | + } |
|
51 | + ?> |
|
52 | 52 | </select> |
53 | 53 | </div> |
54 | 54 | </div> |
@@ -42,10 +42,11 @@ |
||
42 | 42 | <select class="form-control" name = 'user_role_id'> |
43 | 43 | <?php |
44 | 44 | foreach ($roles as $role) { |
45 | - if ($role['role_id'] == $user->user_role_id) |
|
46 | - $selected = 'selected = "selected"'; |
|
47 | - else |
|
48 | - $selected = ''; |
|
45 | + if ($role['role_id'] == $user->user_role_id) { |
|
46 | + $selected = 'selected = "selected"'; |
|
47 | + } else { |
|
48 | + $selected = ''; |
|
49 | + } |
|
49 | 50 | echo "<option {$selected} value = '{$role['role_id']}'>{$role['role_name']}</option>"; |
50 | 51 | } |
51 | 52 | ?> |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (App::$cur->users->config['invites']) { |
|
3 | +if (App::$cur->users->config['invites']) { |
|
4 | 4 | return [ |
5 | 5 | 'name' => 'Мои партнеры', |
6 | 6 | 'fullWidget' => 'Users\cabinet/usersTree' |