@@ -35,7 +35,7 @@ |
||
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | -require_once( INJI_SYSTEM_DIR . '/init.php' ); |
|
| 38 | +require_once(INJI_SYSTEM_DIR . '/init.php'); |
|
| 39 | 39 | /** |
| 40 | 40 | * System error messages |
| 41 | 41 | */ |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $html = "<{$tag}"; |
| 25 | 25 | if ($attributes && is_array($attributes)) { |
| 26 | 26 | foreach ($attributes as $key => $value) { |
| 27 | - $html .=" {$key} = '"; |
|
| 27 | + $html .= " {$key} = '"; |
|
| 28 | 28 | if (!is_array($value)) { |
| 29 | 29 | $html .= addcslashes($value, "'"); |
| 30 | 30 | } else { |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | echo "<tr><td>{$log['name']}</td><td" . (round(($log['end'] - $log['start']), 5) > 0.1 ? ' class ="danger"' : '') . ">" . round(($log['end'] - $log['start']), 5) . "</td></tr>"; |
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | - echo '<tr><th>Summary</th><th>' . round(( microtime(true) - $this->startTime), 5) . '</th></tr>'; |
|
| 89 | + echo '<tr><th>Summary</th><th>' . round((microtime(true) - $this->startTime), 5) . '</th></tr>'; |
|
| 90 | 90 | echo '<tr><th>Memory</th><th>' . $this->convertSize(memory_get_peak_usage()) . ' of ' . ini_get('memory_limit') . '</th></tr></table></div>'; |
| 91 | 91 | } |
| 92 | 92 | |
@@ -1035,7 +1035,7 @@ |
||
| 1035 | 1035 | } else { |
| 1036 | 1036 | $cols .= '*'; |
| 1037 | 1037 | } |
| 1038 | - $cols .=') as `count`' . (!empty($options['cols']) ? ',' . $options['cols'] : ''); |
|
| 1038 | + $cols .= ') as `count`' . (!empty($options['cols']) ? ',' . $options['cols'] : ''); |
|
| 1039 | 1039 | App::$cur->db->cols = $cols; |
| 1040 | 1040 | if (!empty($options['group'])) { |
| 1041 | 1041 | App::$cur->db->group($options['group']); |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | if (!empty($_SESSION['_INJI_MSG'])) { |
| 23 | 23 | foreach ($_SESSION['_INJI_MSG'] as $key => $msg) { |
| 24 | 24 | if ($msg['text'] == $text) { |
| 25 | - $msg['count'] ++; |
|
| 25 | + $msg['count']++; |
|
| 26 | 26 | return true; |
| 27 | 27 | } |
| 28 | 28 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | static function uriParse($uri) |
| 39 | 39 | { |
| 40 | 40 | $answerPos = strpos($uri, '?'); |
| 41 | - $params = array_slice(explode('/', substr($uri, 0, $answerPos ? $answerPos : strlen($uri) )), 1); |
|
| 41 | + $params = array_slice(explode('/', substr($uri, 0, $answerPos ? $answerPos : strlen($uri))), 1); |
|
| 42 | 42 | |
| 43 | 43 | foreach ($params as $key => $param) { |
| 44 | 44 | if ($param != '') { |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | static function resizeImage($img_path, $max_width = 1000, $max_height = 1000, $crop = false, $pos = 'center') |
| 86 | 86 | { |
| 87 | 87 | ini_set("gd.jpeg_ignore_warning", 1); |
| 88 | - list( $img_width, $img_height, $img_type, $img_tag ) = getimagesize($img_path); |
|
| 88 | + list($img_width, $img_height, $img_type, $img_tag) = getimagesize($img_path); |
|
| 89 | 89 | switch ($img_type) { |
| 90 | 90 | case 1: |
| 91 | 91 | $img_type = 'gif'; |
@@ -108,14 +108,14 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | if ($crop === true || $crop == 'q') { |
| 110 | 110 | if ($img_width > $img_height) { |
| 111 | - $imgX = floor(( $img_width - $img_height ) / 2); |
|
| 111 | + $imgX = floor(($img_width - $img_height) / 2); |
|
| 112 | 112 | $imgY = 0; |
| 113 | 113 | $img_width = $img_height; |
| 114 | 114 | $new_width = $max_width; |
| 115 | 115 | $new_height = $max_height; |
| 116 | 116 | } else { |
| 117 | 117 | $imgX = 0; |
| 118 | - $imgY = floor(( $img_height - $img_width ) / 2); |
|
| 118 | + $imgY = floor(($img_height - $img_width) / 2); |
|
| 119 | 119 | $img_height = $img_width; |
| 120 | 120 | $new_width = $max_width; |
| 121 | 121 | $new_height = $max_height; |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | $new_width = $max_width; |
| 137 | 137 | $new_height = $max_height; |
| 138 | 138 | //Находим начальные координаты (центрируем новое изображение) |
| 139 | - $imgX = (int) (($ow / 2) - ($img_width / 2) ); |
|
| 139 | + $imgX = (int) (($ow / 2) - ($img_width / 2)); |
|
| 140 | 140 | if ($pos == 'center') { |
| 141 | 141 | $imgY = (int) (($oh / 2) - ($img_height / 2)); |
| 142 | 142 | } else { |
@@ -307,7 +307,7 @@ |
||
| 307 | 307 | if (is_array($counts)) { |
| 308 | 308 | $sum = 0; |
| 309 | 309 | foreach ($counts as $count) { |
| 310 | - $sum +=$count['count']; |
|
| 310 | + $sum += $count['count']; |
|
| 311 | 311 | } |
| 312 | 312 | return $sum; |
| 313 | 313 | } |
@@ -268,7 +268,7 @@ |
||
| 268 | 268 | $result->send(); |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | - $item->sales ++; |
|
| 271 | + $item->sales++; |
|
| 272 | 272 | $item->save(); |
| 273 | 273 | |
| 274 | 274 | if (empty($_GET['count'])) |
@@ -72,12 +72,12 @@ |
||
| 72 | 72 | { |
| 73 | 73 | $warehouse = Offer\Warehouse::get([['count', '0', '>'], ['item_offer_id', $this->id]]); |
| 74 | 74 | if ($warehouse) { |
| 75 | - $warehouse->count +=(float) $count; |
|
| 75 | + $warehouse->count += (float) $count; |
|
| 76 | 76 | $warehouse->save(); |
| 77 | 77 | } else { |
| 78 | 78 | $warehouse = Offer\Warehouse::get([['item_offer_id', $this->id]]); |
| 79 | 79 | if ($warehouse) { |
| 80 | - $warehouse->count +=(float) $count; |
|
| 80 | + $warehouse->count += (float) $count; |
|
| 81 | 81 | $warehouse->save(); |
| 82 | 82 | } |
| 83 | 83 | } |