@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | $inputs = json_decode($params[0]->fr_data, true); |
4 | 4 | foreach ($params[0]->form->inputs as $input) { |
5 | - if (isset($inputs['input' . $input->fi_id])) { |
|
6 | - echo "{$input->fi_label}: " . htmlspecialchars($inputs['input' . $input->fi_id]) . "<br />"; |
|
5 | + if (isset($inputs['input'.$input->fi_id])) { |
|
6 | + echo "{$input->fi_label}: ".htmlspecialchars($inputs['input'.$input->fi_id])."<br />"; |
|
7 | 7 | } |
8 | 8 | } |
@@ -24,13 +24,13 @@ discard block |
||
24 | 24 | $data = []; |
25 | 25 | $error = false; |
26 | 26 | foreach ($form->inputs as $input) { |
27 | - if (isset($inputs['input' . $input->id])) { |
|
28 | - $data['input' . $input->id] = htmlspecialchars($inputs['input' . $input->id]); |
|
27 | + if (isset($inputs['input'.$input->id])) { |
|
28 | + $data['input'.$input->id] = htmlspecialchars($inputs['input'.$input->id]); |
|
29 | 29 | } elseif ($input->required) { |
30 | 30 | $error = true; |
31 | - Msg::add('Вы не заполнили поле: ' . $input->label); |
|
31 | + Msg::add('Вы не заполнили поле: '.$input->label); |
|
32 | 32 | } else { |
33 | - $data['input' . $input->id] = ''; |
|
33 | + $data['input'.$input->id] = ''; |
|
34 | 34 | } |
35 | 35 | } |
36 | 36 | if (!$error) { |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | if (!$error && !empty(App::$cur->config['site']['email'])) { |
43 | 43 | $text = ''; |
44 | 44 | foreach ($form->inputs as $input) { |
45 | - if (isset($inputs['input' . $input->id])) { |
|
46 | - $text .="<b>{$input->label}:</b> " . htmlspecialchars($inputs['input' . $input->id]) . "<br />"; |
|
45 | + if (isset($inputs['input'.$input->id])) { |
|
46 | + $text .= "<b>{$input->label}:</b> ".htmlspecialchars($inputs['input'.$input->id])."<br />"; |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | if ($text) { |
50 | - $text = 'Дата получения по серверному времени: ' . date('Y-m-d H:i:s') . '<br />Заполненые поля:<br />' . $text; |
|
51 | - Tools::sendMail('noreply@' . INJI_DOMAIN_NAME, App::$cur->config['site']['email'], $form->name, $text); |
|
50 | + $text = 'Дата получения по серверному времени: '.date('Y-m-d H:i:s').'<br />Заполненые поля:<br />'.$text; |
|
51 | + Tools::sendMail('noreply@'.INJI_DOMAIN_NAME, App::$cur->config['site']['email'], $form->name, $text); |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | Tools::redirect($_SERVER['REQUEST_URI'], 'Ваша форма была успешно отправлена', 'success'); |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | $inputs = json_decode($item->data, true); |
61 | 61 | $text = ''; |
62 | 62 | foreach ($item->form->inputs as $input) { |
63 | - if (isset($inputs['input' . $input->id])) { |
|
64 | - $text .= "{$input->label}: " . htmlspecialchars($inputs['input' . $input->id]) . "<br />"; |
|
63 | + if (isset($inputs['input'.$input->id])) { |
|
64 | + $text .= "{$input->label}: ".htmlspecialchars($inputs['input'.$input->id])."<br />"; |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 | return $text; |
@@ -79,7 +79,7 @@ |
||
79 | 79 | |
80 | 80 | public function name() |
81 | 81 | { |
82 | - return $this->code ? $this->code : $this->id . ' - ' . $this->user->name(); |
|
82 | + return $this->code ? $this->code : $this->id.' - '.$this->user->name(); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | } |
@@ -112,17 +112,17 @@ discard block |
||
112 | 112 | { |
113 | 113 | |
114 | 114 | if ($this->id) { |
115 | - $this->search_index = $this->name . ' '; |
|
115 | + $this->search_index = $this->name.' '; |
|
116 | 116 | if ($this->category) { |
117 | - $this->search_index .= $this->category->name . ' '; |
|
117 | + $this->search_index .= $this->category->name.' '; |
|
118 | 118 | } |
119 | 119 | if ($this->options) { |
120 | 120 | foreach ($this->options as $option) { |
121 | 121 | if ($option->item_option_searchable && $option->value) { |
122 | 122 | if ($option->item_option_type != 'select') { |
123 | - $this->search_index .= $option->value . ' '; |
|
123 | + $this->search_index .= $option->value.' '; |
|
124 | 124 | } elseif (!empty($option->option->items[$option->value])) { |
125 | - $option->option->items[$option->value]->value . ' '; |
|
125 | + $option->option->items[$option->value]->value.' '; |
|
126 | 126 | } |
127 | 127 | } |
128 | 128 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | 'col' => 'item_id', |
145 | 145 | //'resultKey' => 'code', |
146 | 146 | 'resultKey' => 'item_option_id', |
147 | - 'join' => [Item\Option::table(), Item\Option::index() . ' = ' . Item\Param::colPrefix() . Item\Option::index()] |
|
147 | + 'join' => [Item\Option::table(), Item\Option::index().' = '.Item\Param::colPrefix().Item\Option::index()] |
|
148 | 148 | ], |
149 | 149 | 'offers' => [ |
150 | 150 | 'type' => 'many', |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $curPrice = $price; |
182 | 182 | } elseif ( |
183 | 183 | (!$price->type->roles && !$curPrice) || |
184 | - ($price->type->roles && !$curPrice && strpos($price->type->roles, "|" . \Users\User::$cur->role_id . "|") !== false) |
|
184 | + ($price->type->roles && !$curPrice && strpos($price->type->roles, "|".\Users\User::$cur->role_id."|") !== false) |
|
185 | 185 | ) { |
186 | 186 | $curPrice = $price; |
187 | 187 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | $event->save(); |
32 | 32 | } |
33 | 33 | if ($cur->count != $this->count) { |
34 | - $event = new Event(['cart_id' => $this->cart->cart_id, 'user_id' => \Users\User::$cur->id, 'cart_event_type_id' => 4, 'info' => $this->item_offer_price_id . "|" . ($this->count - $cur->count)]); |
|
34 | + $event = new Event(['cart_id' => $this->cart->cart_id, 'user_id' => \Users\User::$cur->id, 'cart_event_type_id' => 4, 'info' => $this->item_offer_price_id."|".($this->count - $cur->count)]); |
|
35 | 35 | $event->save(); |
36 | 36 | } |
37 | 37 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | foreach ($managers as $manager) { |
8 | 8 | $dataManager = new Ui\DataManager($manager); |
9 | 9 | $dataManagers[$manager] = $dataManager; |
10 | - $code = 'tab_' . str_replace('\\', '_', $manager); |
|
10 | + $code = 'tab_'.str_replace('\\', '_', $manager); |
|
11 | 11 | echo "<li role='presentation'><a href='#{$code}' aria-controls='{$code}' role='tab' data-toggle='tab'>{$dataManager->name}</a></li>"; |
12 | 12 | } |
13 | 13 | ?> |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | </div> |
55 | 55 | <?php |
56 | 56 | foreach ($dataManagers as $manager => $dataManager) { |
57 | - $code = 'tab_' . str_replace('\\', '_', $manager); |
|
57 | + $code = 'tab_'.str_replace('\\', '_', $manager); |
|
58 | 58 | ?> |
59 | 59 | <div role="tabpanel" class="tab-pane fade" id="<?= $code; ?>"> |
60 | 60 | <?php |
@@ -74,8 +74,8 @@ |
||
74 | 74 | unset($items[$key]); |
75 | 75 | unset($item); |
76 | 76 | } |
77 | - echo 'Происходит процесс индексации: проиндексировано ' . $i * $count; |
|
78 | - Tools::redirect('/admin/ecommerce/reSearchIndex/' . $i); |
|
77 | + echo 'Происходит процесс индексации: проиндексировано '.$i * $count; |
|
78 | + Tools::redirect('/admin/ecommerce/reSearchIndex/'.$i); |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $warecount = $cartitem->price->offer->warehouseCount($cart->id); |
63 | 63 | if ($cartitem->count > $warecount) { |
64 | 64 | $error = true; |
65 | - Msg::add('Вы заказали <b>' . $cartitem->item->name . '</b> больше чем есть на складе. на складе: <b>' . $warecount . '</b>', 'danger'); |
|
65 | + Msg::add('Вы заказали <b>'.$cartitem->item->name.'</b> больше чем есть на складе. на складе: <b>'.$warecount.'</b>', 'danger'); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | foreach ($deliverys[$cart->delivery_id]->fields as $field) { |
75 | 75 | if (empty($_POST['deliveryFields'][$field->id]) && $field->required) { |
76 | 76 | $error = 1; |
77 | - Msg::add('Вы не указали: ' . $field->name); |
|
77 | + Msg::add('Вы не указали: '.$field->name); |
|
78 | 78 | } |
79 | 79 | } |
80 | 80 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | foreach (\Ecommerce\UserAdds\Field::getList() as $field) { |
91 | 91 | if (empty($_POST['userAdds']['fields'][$field->id]) && $field->required) { |
92 | 92 | $error = 1; |
93 | - Msg::add('Вы не указали: ' . $field->name); |
|
93 | + Msg::add('Вы не указали: '.$field->name); |
|
94 | 94 | } |
95 | 95 | } |
96 | 96 | if (!empty($_POST['discounts']['card_item_id'])) { |
@@ -127,13 +127,13 @@ discard block |
||
127 | 127 | } |
128 | 128 | $cart = \Ecommerce\Cart::get($cart->id); |
129 | 129 | if (!empty(\App::$cur->ecommerce->config['notify_mail'])) { |
130 | - $text = 'Перейдите в админ панель чтобы просмотреть новый заказ <a href = "http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/admin/ecommerce/Cart">Админ панель</a>'; |
|
131 | - $title = 'Новый заказ в интернет магазине на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME); |
|
132 | - \Tools::sendMail('noreply@' . INJI_DOMAIN_NAME, \App::$cur->ecommerce->config['notify_mail'], $title, $text); |
|
130 | + $text = 'Перейдите в админ панель чтобы просмотреть новый заказ <a href = "http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/admin/ecommerce/Cart">Админ панель</a>'; |
|
131 | + $title = 'Новый заказ в интернет магазине на сайте '.idn_to_utf8(INJI_DOMAIN_NAME); |
|
132 | + \Tools::sendMail('noreply@'.INJI_DOMAIN_NAME, \App::$cur->ecommerce->config['notify_mail'], $title, $text); |
|
133 | 133 | } |
134 | 134 | if ($this->notifications) { |
135 | 135 | $notification = new Notifications\Notification(); |
136 | - $notification->name = 'Новый заказ в интернет магазине на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME); |
|
136 | + $notification->name = 'Новый заказ в интернет магазине на сайте '.idn_to_utf8(INJI_DOMAIN_NAME); |
|
137 | 137 | $notification->text = 'Перейдите в админ панель чтобы просмотреть новый заказ'; |
138 | 138 | $notification->chanel_id = $this->notifications->getChanel('Ecommerce-orders')->id; |
139 | 139 | $notification->save(); |
@@ -179,10 +179,10 @@ discard block |
||
179 | 179 | 'href' => '/ecommerce/cart' |
180 | 180 | ]; |
181 | 181 | $bread[] = [ |
182 | - 'text' => 'Заказ: №' . $cart->id, |
|
183 | - 'href' => '/ecommerce/cart/orderDetail/' . $cart->id |
|
182 | + 'text' => 'Заказ: №'.$cart->id, |
|
183 | + 'href' => '/ecommerce/cart/orderDetail/'.$cart->id |
|
184 | 184 | ]; |
185 | - $this->view->setTitle('Заказ №' . $cart->id); |
|
185 | + $this->view->setTitle('Заказ №'.$cart->id); |
|
186 | 186 | $this->view->page(['data' => compact('cart', 'bread')]); |
187 | 187 | } |
188 | 188 | |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | $result->send(); |
276 | 276 | } |
277 | 277 | |
278 | - $item->sales ++; |
|
278 | + $item->sales++; |
|
279 | 279 | $item->save(); |
280 | 280 | |
281 | 281 | if (empty($_GET['count'])) |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | |
289 | 289 | if (empty($this->module->config['sell_over_warehouse']) && $price->offer->warehouseCount() < $count) { |
290 | 290 | $result->success = false; |
291 | - $result->content = 'На складе недостаточно товара! Доступно: ' . $price->offer->warehouseCount(); |
|
291 | + $result->content = 'На складе недостаточно товара! Доступно: '.$price->offer->warehouseCount(); |
|
292 | 292 | $result->send(); |
293 | 293 | } |
294 | 294 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | $cart->addItem($price->id, $count); |
306 | 306 | } |
307 | 307 | $cart->calc(); |
308 | - $result->successMsg = '<a href="/ecommerce/view/' . $item->id . '">' . $item->name() . ($price->offer->name() ? ' (' . $price->offer->name() . ')' : '') . '</a> добавлен <a href="/ecommerce/cart">в корзину покупок</a>!'; |
|
308 | + $result->successMsg = '<a href="/ecommerce/view/'.$item->id.'">'.$item->name().($price->offer->name() ? ' ('.$price->offer->name().')' : '').'</a> добавлен <a href="/ecommerce/cart">в корзину покупок</a>!'; |
|
309 | 309 | $result->send(); |
310 | 310 | } |
311 | 311 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | <td class="text-left" style="width: 50%;"> |
17 | 17 | <?php |
18 | 18 | foreach ($orderDeatilCols as $col => $label) { |
19 | - echo "<b>{$label}</b> " . $cart->$col . "<br>"; |
|
19 | + echo "<b>{$label}</b> ".$cart->$col."<br>"; |
|
20 | 20 | } |
21 | 21 | ?> |
22 | 22 | </td> |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | <?php |
40 | 40 | if ($cart->infos) { |
41 | 41 | foreach ($cart->infos as $info) { |
42 | - echo "<b>{$info->field->name()}</b> " . $info->value . "<br>"; |
|
42 | + echo "<b>{$info->field->name()}</b> ".$info->value."<br>"; |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 | ?> |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | if (App::$cur->money) { |
124 | 124 | $currency = Money\Currency::get($currency_id); |
125 | 125 | if ($currency) { |
126 | - echo ' ' . $currency->acronym(); |
|
126 | + echo ' '.$currency->acronym(); |
|
127 | 127 | } else { |
128 | 128 | echo ' руб.'; |
129 | 129 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | if (App::$cur->money) { |
167 | 167 | $currency = Money\Currency::get($currency_id); |
168 | 168 | if ($currency) { |
169 | - echo ' ' . $currency->acronym(); |
|
169 | + echo ' '.$currency->acronym(); |
|
170 | 170 | } else { |
171 | 171 | echo ' руб.'; |
172 | 172 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | case'2': |
206 | 206 | $price = Ecommerce\Item\Offer\Price::get($status->info); |
207 | 207 | if ($price) { |
208 | - echo "<a href = '/ecommerce/view/{$item->id}'>" . $price->offer->item->name() . "</a>"; |
|
208 | + echo "<a href = '/ecommerce/view/{$item->id}'>".$price->offer->item->name()."</a>"; |
|
209 | 209 | } else { |
210 | 210 | echo 'Товар удален'; |
211 | 211 | } |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | $info = explode('|', $status->info); |
215 | 215 | $price = Ecommerce\Item\Offer\Price::get($info[0]); |
216 | 216 | if ($price) { |
217 | - echo "<a href = '/ecommerce/view/{$item->id}'>" . $price->offer->item->name() . "</a> " . ($info[1] > 0 ? '+' . $info[1] : $info[1]); |
|
217 | + echo "<a href = '/ecommerce/view/{$item->id}'>".$price->offer->item->name()."</a> ".($info[1] > 0 ? '+'.$info[1] : $info[1]); |
|
218 | 218 | } else { |
219 | 219 | echo 'Товар удален'; |
220 | 220 | } |