@@ -12,13 +12,13 @@ discard block |
||
12 | 12 | <h3>Уровни начислений</h3> |
13 | 13 | <ul> |
14 | 14 | <?php |
15 | - foreach ($reward->levels(['order' => ['level', 'asc']]) as $level) { |
|
16 | - ?> |
|
15 | + foreach ($reward->levels(['order' => ['level', 'asc']]) as $level) { |
|
16 | + ?> |
|
17 | 17 | |
18 | 18 | <li><?= !$level->level ? 'Личный' : $level->level; ?>. <?= $types[$level->type]['viewer']($level); ?></li> |
19 | 19 | <?php |
20 | - } |
|
21 | - ?> |
|
20 | + } |
|
21 | + ?> |
|
22 | 22 | |
23 | 23 | </ul> |
24 | 24 | </div> |
@@ -34,20 +34,20 @@ discard block |
||
34 | 34 | <h4 class="<?= $complete ? 'text-success' : 'text-danger'; ?>"><?= $condition->name(); ?></h4> |
35 | 35 | <ul> |
36 | 36 | <?php |
37 | - foreach ($condition->items as $item) { |
|
38 | - $itemComplete = $item->checkComplete(); |
|
39 | - switch ($item->type) { |
|
40 | - case 'event': |
|
37 | + foreach ($condition->items as $item) { |
|
38 | + $itemComplete = $item->checkComplete(); |
|
39 | + switch ($item->type) { |
|
40 | + case 'event': |
|
41 | 41 | $name = \Events\Event::get($item->value, 'event')->name(); |
42 | - break; |
|
43 | - } |
|
44 | - ?> |
|
42 | + break; |
|
43 | + } |
|
44 | + ?> |
|
45 | 45 | <li> |
46 | 46 | <b class="<?= $itemComplete ? 'text-success' : 'text-danger'; ?>"><?= $name; ?> <?= $item->recivedCount(); ?></b>/<?= $item->count; ?> <br /> |
47 | 47 | </li> |
48 | 48 | <?php |
49 | - } |
|
50 | - ?> |
|
49 | + } |
|
50 | + ?> |
|
51 | 51 | </ul> |
52 | 52 | <?php |
53 | 53 | } |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <h3>Мои кошельки</h3> |
2 | 2 | <div class="row"> |
3 | 3 | <?php |
4 | - $blocked = App::$cur->money->getUserBlocks(); |
|
5 | - $wallets = App::$cur->money->getUserWallets(); |
|
6 | - $rates = Money\Currency\ExchangeRate::getList(); |
|
7 | - foreach ($wallets as $wallet) { |
|
8 | - ?> |
|
4 | + $blocked = App::$cur->money->getUserBlocks(); |
|
5 | + $wallets = App::$cur->money->getUserWallets(); |
|
6 | + $rates = Money\Currency\ExchangeRate::getList(); |
|
7 | + foreach ($wallets as $wallet) { |
|
8 | + ?> |
|
9 | 9 | <div class="col-sm-4"> |
10 | 10 | <h4><?= $wallet->currency->name(); ?></h4> |
11 | 11 | <b><?= $wallet->showAmount(); ?></b> <?= $wallet->currency->acronym(); ?><br /> |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | ?> |
31 | 31 | </div> |
32 | 32 | <?php |
33 | - } |
|
34 | - ?> |
|
33 | + } |
|
34 | + ?> |
|
35 | 35 | </div> |
36 | 36 | <?php |
37 | 37 | $transfers = Money\Transfer::getList(['where' => [ |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = array()) { |
|
3 | +return function($step = NULL, $params = array()) { |
|
4 | 4 | App::$cur->db->createTable('notifications_notification', [ |
5 | 5 | 'notification_id' => 'pk', |
6 | 6 | 'notification_chanel_id' => 'int(11) UNSIGNED NOT NULL', |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | 'subscriber_device_subscriber_id' => 'int(11) UNSIGNED NOT NULL', |
30 | 30 | 'subscriber_device_date_last_check' => 'timestamp NOT NULL DEFAULT 0', |
31 | 31 | 'subscriber_device_date_create' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP', |
32 | - ],[ |
|
32 | + ], [ |
|
33 | 33 | 'UNIQUE INDEX ' . App::$cur->db->table_prefix . 'notifications_subscriber_device_subscriber_device_key (subscriber_device_key)' |
34 | 34 | ]); |
35 | 35 | App::$cur->db->createTable('notifications_subscribe', [ |
@@ -27,19 +27,19 @@ |
||
27 | 27 | ?> |
28 | 28 | <div class="item <?= !$i ? 'active' : ''; ?>"> |
29 | 29 | <?php |
30 | - if ($item->link) { |
|
31 | - echo "<a href = '{$item->link}' style = 'display:inline-block;'>"; |
|
32 | - } |
|
33 | - ?> |
|
30 | + if ($item->link) { |
|
31 | + echo "<a href = '{$item->link}' style = 'display:inline-block;'>"; |
|
32 | + } |
|
33 | + ?> |
|
34 | 34 | <img src="<?= Statics::file($item->image->path); ?>" alt="<?= $item->name; ?>"> |
35 | 35 | <div class="carousel-caption"> |
36 | 36 | <?= $item->description; ?> |
37 | 37 | </div> |
38 | 38 | <?php |
39 | - if ($item->link) { |
|
40 | - echo "</a>"; |
|
41 | - } |
|
42 | - ?> |
|
39 | + if ($item->link) { |
|
40 | + echo "</a>"; |
|
41 | + } |
|
42 | + ?> |
|
43 | 43 | </div> |
44 | 44 | <?php |
45 | 45 | $i++; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $type = substr($path, 0, strpos($path, '/')); |
53 | 53 | switch ($type) { |
54 | 54 | case 'libs': |
55 | - return App::$cur->Libs->getPath(array_slice(explode('/', $path),2)); |
|
55 | + return App::$cur->Libs->getPath(array_slice(explode('/', $path), 2)); |
|
56 | 56 | break; |
57 | 57 | case 'templates': |
58 | 58 | $path = substr($path, strpos($path, '/') + 1); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | |
189 | 189 | $fileName = $fileinfo['filename'] . '.' . $fileinfo['extension']; |
190 | 190 | if (App::$cur->db->connect) { |
191 | - $fileObj = Files\File::get([ 'path', '%/' . $fileinfo['filename'] . '.' . $fileinfo['extension'], 'LIKE']); |
|
191 | + $fileObj = Files\File::get(['path', '%/' . $fileinfo['filename'] . '.' . $fileinfo['extension'], 'LIKE']); |
|
192 | 192 | if ($fileObj) { |
193 | 193 | $fileName = $fileObj->original_name; |
194 | 194 | } |
@@ -112,10 +112,11 @@ discard block |
||
112 | 112 | |
113 | 113 | $sizes = explode('x', $_GET['resize']); |
114 | 114 | $sizes[0] = intval($sizes[0]); |
115 | - if (isset($sizes[1])) |
|
116 | - $sizes[1] = intval($sizes[1]); |
|
117 | - else |
|
118 | - $sizes[1] = 0; |
|
115 | + if (isset($sizes[1])) { |
|
116 | + $sizes[1] = intval($sizes[1]); |
|
117 | + } else { |
|
118 | + $sizes[1] = 0; |
|
119 | + } |
|
119 | 120 | |
120 | 121 | if (!$sizes[0] || !$sizes[1]) { |
121 | 122 | header('HTTP/1.1 404 Not Found'); |
@@ -127,15 +128,16 @@ discard block |
||
127 | 128 | $dir = App::$primary->path; |
128 | 129 | |
129 | 130 | if (!empty($_GET['resize_crop'])) { |
130 | - if (in_array($_GET['resize_crop'], array('q', 'c'))) |
|
131 | - $crop = $_GET['resize_crop']; |
|
132 | - else |
|
133 | - $crop = 'c'; |
|
131 | + if (in_array($_GET['resize_crop'], array('q', 'c'))) { |
|
132 | + $crop = $_GET['resize_crop']; |
|
133 | + } else { |
|
134 | + $crop = 'c'; |
|
135 | + } |
|
136 | + } elseif (!empty($_GET['resize_quadro'])) { |
|
137 | + $crop = 'q'; |
|
138 | + } else { |
|
139 | + $crop = ''; |
|
134 | 140 | } |
135 | - elseif (!empty($_GET['resize_quadro'])) |
|
136 | - $crop = 'q'; |
|
137 | - else |
|
138 | - $crop = ''; |
|
139 | 141 | $pos = 'center'; |
140 | 142 | if (!empty($_GET['resize_pos']) && in_array($_GET['resize_pos'], array('top', 'center'))) { |
141 | 143 | $pos = $_GET['resize_pos']; |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Text blocks module |
|
4 | - * |
|
5 | - * @author Alexey Krupskiy <[email protected]> |
|
6 | - * @link http://inji.ru/ |
|
7 | - * @copyright 2015 Alexey Krupskiy |
|
8 | - * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE |
|
9 | - */ |
|
3 | + * Text blocks module |
|
4 | + * |
|
5 | + * @author Alexey Krupskiy <[email protected]> |
|
6 | + * @link http://inji.ru/ |
|
7 | + * @copyright 2015 Alexey Krupskiy |
|
8 | + * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE |
|
9 | + */ |
|
10 | 10 | class TextBlocks extends Module |
11 | 11 | { |
12 | 12 | function init() |
@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | ]]); |
59 | 59 | ?>)</h3> |
60 | 60 | <?php |
61 | - foreach (\Dashboard\Comment::getList([ 'where' => [ |
|
62 | - ['item_id', $item->id], |
|
63 | - ['model', $modelName], |
|
64 | - ], 'order' => ['date', 'desc']]) as $comment) { |
|
65 | - ?> |
|
61 | + foreach (\Dashboard\Comment::getList([ 'where' => [ |
|
62 | + ['item_id', $item->id], |
|
63 | + ['model', $modelName], |
|
64 | + ], 'order' => ['date', 'desc']]) as $comment) { |
|
65 | + ?> |
|
66 | 66 | <div class="row"> |
67 | 67 | <div class="col-sm-3" style="max-width: 300px;"> |
68 | 68 | <a href='/admin/Users/view/User/<?= $comment->user->pk(); ?>'><?= $comment->user->name(); ?></a><br /> |
@@ -73,14 +73,14 @@ discard block |
||
73 | 73 | </div> |
74 | 74 | </div> |
75 | 75 | <?php |
76 | - } |
|
77 | - ?> |
|
76 | + } |
|
77 | + ?> |
|
78 | 78 | </div> |
79 | 79 | <div> |
80 | 80 | <?php |
81 | - $form = new \Ui\Form(); |
|
82 | - $form->begin(); |
|
83 | - $form->input('textarea', 'comment', 'Комментарий'); |
|
84 | - $form->end(); |
|
85 | - ?> |
|
81 | + $form = new \Ui\Form(); |
|
82 | + $form->begin(); |
|
83 | + $form->input('textarea', 'comment', 'Комментарий'); |
|
84 | + $form->end(); |
|
85 | + ?> |
|
86 | 86 | </div> |
@@ -58,7 +58,7 @@ |
||
58 | 58 | ]]); |
59 | 59 | ?>)</h3> |
60 | 60 | <?php |
61 | - foreach (\Dashboard\Comment::getList([ 'where' => [ |
|
61 | + foreach (\Dashboard\Comment::getList(['where' => [ |
|
62 | 62 | ['item_id', $item->id], |
63 | 63 | ['model', $modelName], |
64 | 64 | ], 'order' => ['date', 'desc']]) as $comment) { |
@@ -34,10 +34,11 @@ |
||
34 | 34 | $this->params['page'] = 1; |
35 | 35 | if (!empty($this->data['page'])) { |
36 | 36 | $this->params['page'] = (int) $this->data['page']; |
37 | - if ($this->params['page'] <= 0) |
|
38 | - $this->params['page'] = 1; |
|
39 | - elseif ($this->params['page'] > ceil($this->options['count'] / $this->params['limit'])) |
|
40 | - $this->params['page'] = ceil($this->options['count'] / $this->params['limit']); |
|
37 | + if ($this->params['page'] <= 0) { |
|
38 | + $this->params['page'] = 1; |
|
39 | + } elseif ($this->params['page'] > ceil($this->options['count'] / $this->params['limit'])) { |
|
40 | + $this->params['page'] = ceil($this->options['count'] / $this->params['limit']); |
|
41 | + } |
|
41 | 42 | } |
42 | 43 | |
43 | 44 | $this->params['start'] = $this->params['page'] * $this->params['limit'] - $this->params['limit']; |
@@ -23,13 +23,13 @@ |
||
23 | 23 | ?> |
24 | 24 | <ul class="nav nav-list-categorys" data-col='tree_path'> |
25 | 25 | <?php |
26 | - $class = get_class($objectRoot); |
|
27 | - $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()]]); |
|
28 | - $count += count($items); |
|
29 | - foreach ($items as $objectChild) { |
|
30 | - $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc); |
|
31 | - } |
|
32 | - ?> |
|
26 | + $class = get_class($objectRoot); |
|
27 | + $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()]]); |
|
28 | + $count += count($items); |
|
29 | + foreach ($items as $objectChild) { |
|
30 | + $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc); |
|
31 | + } |
|
32 | + ?> |
|
33 | 33 | </ul> |
34 | 34 | <?php |
35 | 35 | return $count; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()]]); |
28 | 28 | $count += count($items); |
29 | 29 | foreach ($items as $objectChild) { |
30 | - $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc); |
|
30 | + $count += static::showLi($objectChild, 1, $maxDeep, $hrefFunc); |
|
31 | 31 | } |
32 | 32 | ?> |
33 | 33 | </ul> |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | <ul class='nav nav-list nav-left-ml'> |
56 | 56 | <?php |
57 | 57 | } |
58 | - $count+=static::showLi($objectChild, $deep + 1, $maxDeep,$hrefFunc); |
|
58 | + $count += static::showLi($objectChild, $deep + 1, $maxDeep, $hrefFunc); |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | if ($isset) { |