@@ -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 | ?> |
@@ -168,20 +168,20 @@ |
||
168 | 168 | <h5 class="<?= $complete ? 'text-success' : 'text-danger'; ?>"><?= $condition->name(); ?></h5> |
169 | 169 | <ul> |
170 | 170 | <?php |
171 | - foreach ($condition->items as $item) { |
|
172 | - $itemComplete = $item->checkComplete($userId); |
|
173 | - switch ($item->type) { |
|
174 | - case 'event': |
|
171 | + foreach ($condition->items as $item) { |
|
172 | + $itemComplete = $item->checkComplete($userId); |
|
173 | + switch ($item->type) { |
|
174 | + case 'event': |
|
175 | 175 | $name = \Events\Event::get($item->value, 'event')->name(); |
176 | - break; |
|
177 | - } |
|
178 | - ?> |
|
176 | + break; |
|
177 | + } |
|
178 | + ?> |
|
179 | 179 | <li> |
180 | 180 | <b class="<?= $itemComplete ? 'text-success' : 'text-danger'; ?>"><?= $name; ?> <?= $item->recivedCount($userId); ?></b>/<?= $item->count; ?> <br /> |
181 | 181 | </li> |
182 | 182 | <?php |
183 | - } |
|
184 | - ?> |
|
183 | + } |
|
184 | + ?> |
|
185 | 185 | </ul> |
186 | 186 | <?php |
187 | 187 | } |
@@ -24,20 +24,20 @@ |
||
24 | 24 | </div> |
25 | 25 | <div class="col-sm-9"> |
26 | 26 | <?php |
27 | - if (empty($activeSection) || empty($sections[$activeSection]['fullWidget'])) { |
|
28 | - foreach ($sections as $section) { |
|
29 | - if (!empty($section['smallWidget'])) { |
|
30 | - $widgetName = is_array($section['smallWidget']) ? $section['smallWidget']['widget'] : $section['smallWidget']; |
|
31 | - $widgetSize = !empty($section['smallWidget']['size']) ? $section['smallWidget']['size'] : 1; |
|
32 | - ?> |
|
27 | + if (empty($activeSection) || empty($sections[$activeSection]['fullWidget'])) { |
|
28 | + foreach ($sections as $section) { |
|
29 | + if (!empty($section['smallWidget'])) { |
|
30 | + $widgetName = is_array($section['smallWidget']) ? $section['smallWidget']['widget'] : $section['smallWidget']; |
|
31 | + $widgetSize = !empty($section['smallWidget']['size']) ? $section['smallWidget']['size'] : 1; |
|
32 | + ?> |
|
33 | 33 | <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $this->widget($widgetName); ?></div> |
34 | 34 | <?php |
35 | - } |
|
36 | - } |
|
37 | - } else { |
|
38 | - $this->widget($sections[$activeSection]['fullWidget']); |
|
39 | - } |
|
40 | - ?> |
|
35 | + } |
|
36 | + } |
|
37 | + } else { |
|
38 | + $this->widget($sections[$activeSection]['fullWidget']); |
|
39 | + } |
|
40 | + ?> |
|
41 | 41 | </div> |
42 | 42 | </div> |
43 | 43 | </div> |
44 | 44 | \ No newline at end of file |
@@ -8,10 +8,10 @@ discard block |
||
8 | 8 | <div class="form-group"> |
9 | 9 | <label>Регистрация через соц.сети</label><br /> |
10 | 10 | <?php |
11 | - foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) { |
|
12 | - echo "<a href = '/users/social/auth/{$social->code}'>{$social->name()}</a> "; |
|
13 | - } |
|
14 | - ?> |
|
11 | + foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) { |
|
12 | + echo "<a href = '/users/social/auth/{$social->code}'>{$social->name()}</a> "; |
|
13 | + } |
|
14 | + ?> |
|
15 | 15 | </div> |
16 | 16 | <?php |
17 | 17 | } |
@@ -27,15 +27,15 @@ discard block |
||
27 | 27 | <?php $form->input('date', 'user_birthday', 'Дата рождения'); ?> |
28 | 28 | <?php $form->input('text', 'user_city', 'Город'); ?> |
29 | 29 | <?php |
30 | - if (!empty(App::$cur->users->config['invites'])) { |
|
31 | - ?> |
|
30 | + if (!empty(App::$cur->users->config['invites'])) { |
|
31 | + ?> |
|
32 | 32 | <div class ='form-group'> |
33 | 33 | <label><?= !empty(App::$cur->users->config['invitesName']) ? App::$cur->users->config['invitesName'] : 'Код приглашения'; ?></label> |
34 | 34 | <input type ='text' name ='invite_code' class ='form-control' value ="<?= (isset($_POST['invite_code']) ? $_POST['invite_code'] : ((!empty($_COOKIE['invite_code']) ? $_COOKIE['invite_code'] : ((!empty($_GET['invite_code']) ? $_GET['invite_code'] : ''))))); ?>" /> |
35 | 35 | </div> |
36 | 36 | <?php |
37 | - } |
|
38 | - ?> |
|
37 | + } |
|
38 | + ?> |
|
39 | 39 | </div> |
40 | 40 | <div class="col-sm-6"> |
41 | 41 | <div class ='form-group'> |
@@ -6,7 +6,7 @@ |
||
6 | 6 | <div class="panel-heading">Пользователи</div> |
7 | 7 | <div class="panel-body"> |
8 | 8 | <p>Всего: <?= Users\User::getCount(); ?></p> |
9 | - <p>Новых сегодня: <?= Users\User::getCount(['where'=>['date_create',date('Y-m-d 00:00:00'),'>']]); ?></p> |
|
9 | + <p>Новых сегодня: <?= Users\User::getCount(['where'=>['date_create', date('Y-m-d 00:00:00'), '>']]); ?></p> |
|
10 | 10 | </div> |
11 | 11 | <div class="panel-footer"> |
12 | 12 | <a href ="/admin/users/User">Управление</a> |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = []) { |
|
3 | +return function($step = NULL, $params = []) { |
|
4 | 4 | |
5 | 5 | $groups = [ |
6 | 6 | [ |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | 'role_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'role'], |
38 | 38 | 'admin_text' => ['type' => 'html'], |
39 | 39 | 'activation' => ['type' => 'text'], |
40 | - 'blocked' => ['type' => 'bool',], |
|
40 | + 'blocked' => ['type' => 'bool', ], |
|
41 | 41 | 'date_last_active' => ['type' => 'dateTime'], |
42 | 42 | 'date_create' => ['type' => 'dateTime'] |
43 | 43 | ]; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | ] |
101 | 101 | ], |
102 | 102 | 'map' => [ |
103 | - ['login', 'mail',], |
|
103 | + ['login', 'mail', ], |
|
104 | 104 | ['group_id', 'role_id'], |
105 | 105 | ['userSearch', 'blocked'], |
106 | 106 | ['pass'], |
@@ -97,13 +97,13 @@ |
||
97 | 97 | if ($this->first_name . $this->last_name . $this->middle_name) { |
98 | 98 | $name = ''; |
99 | 99 | if ($this->first_name) { |
100 | - $name.=$this->first_name; |
|
100 | + $name .= $this->first_name; |
|
101 | 101 | } |
102 | 102 | if ($this->middle_name) { |
103 | - $name.=($name ? ' ' : '') . $this->middle_name; |
|
103 | + $name .= ($name ? ' ' : '') . $this->middle_name; |
|
104 | 104 | } |
105 | 105 | if ($this->last_name) { |
106 | - $name.=($name ? ' ' : '') . $this->last_name; |
|
106 | + $name .= ($name ? ' ' : '') . $this->last_name; |
|
107 | 107 | } |
108 | 108 | return $name; |
109 | 109 | } else { |
@@ -45,7 +45,7 @@ |
||
45 | 45 | static $forms = [ |
46 | 46 | 'manager' => [ |
47 | 47 | 'map' => [ |
48 | - ['code', 'type',], |
|
48 | + ['code', 'type', ], |
|
49 | 49 | ['user_id'], |
50 | 50 | ['limit', 'count'], |
51 | 51 | ] |