@@ -7,12 +7,9 @@ |
||
| 7 | 7 | namespace okapi\services\logs\images; |
| 8 | 8 | |
| 9 | 9 | use Exception; |
| 10 | -use okapi\Okapi; |
|
| 11 | 10 | use okapi\Db; |
| 12 | -use okapi\OkapiRequest; |
|
| 13 | 11 | use okapi\InvalidParam; |
| 14 | 12 | use okapi\Settings; |
| 15 | -use okapi\BadRequest; |
|
| 16 | 13 | |
| 17 | 14 | |
| 18 | 15 | class LogImagesCommon |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | Db::execute('lock tables pictures write'); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - $log_images_count = Db::select_value(" |
|
| 104 | + $log_images_count = Db::select_value(" |
|
| 105 | 105 | select count(*) |
| 106 | 106 | from pictures |
| 107 | 107 | where object_type = 1 and object_id = '".Db::escape_string($log_internal_id)."' |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | from pictures |
| 134 | 134 | where object_type = 1 and object_id = '".Db::escape_string($log_internal_id)."' |
| 135 | 135 | order by seq |
| 136 | - limit ".($position+0).", 1 |
|
| 136 | + limit ".($position + 0).", 1 |
|
| 137 | 137 | "); |
| 138 | 138 | } |
| 139 | 139 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | if (!isset($counter[$name])) { |
| 33 | 33 | $counter[$name] = 0; |
| 34 | 34 | } |
| 35 | - $counter[$name] ++; |
|
| 35 | + $counter[$name]++; |
|
| 36 | 36 | |
| 37 | 37 | if ($smarty->_cache_including) { |
| 38 | 38 | $param = isset($smarty->_cache_info['cached_vars'][$name][$counter[$name]]) ? $smarty->_cache_info['cached_vars'][$name][$counter[$name]] : []; |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | ]; |
| 81 | 81 | |
| 82 | 82 | $nTimestamp = time(); |
| 83 | - for ($nIndex = 0; $nIndex < count($seasons); $nIndex ++) { |
|
| 83 | + for ($nIndex = 0; $nIndex < count($seasons); $nIndex++) { |
|
| 84 | 84 | if (strtotime($seasons[$nIndex][0]) > $nTimestamp) { |
| 85 | 85 | return $params['winter']; |
| 86 | 86 | } //''; |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | |
| 48 | 48 | function imageBrowser(field_name, url, type, win) |
| 49 | 49 | { |
| 50 | - window.open('../../../../imagebrowser.php?logid=<?php echo isset($_REQUEST['logid']) ? ($_REQUEST['logid']+0) : 0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent'); |
|
| 50 | + window.open('../../../../imagebrowser.php?logid=<?php echo isset($_REQUEST['logid']) ? ($_REQUEST['logid'] + 0) : 0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent'); |
|
| 51 | 51 | fileBrowserWin = win; |
| 52 | 52 | fileBrowserFieldName = field_name; |
| 53 | 53 | } |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | |
| 54 | 54 | function imageBrowser(field_name, url, type, win) |
| 55 | 55 | { |
| 56 | - window.open('../../../../imagebrowser.php?cacheid=<?php echo $cacheID+0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent'); |
|
| 56 | + window.open('../../../../imagebrowser.php?cacheid=<?php echo $cacheID + 0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent'); |
|
| 57 | 57 | fileBrowserWin = win; |
| 58 | 58 | fileBrowserFieldName = field_name; |
| 59 | 59 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | // number of points in the polygon |
| 30 | 30 | $n = count($polygon); |
| 31 | 31 | $poly1 = $polygon[0]; |
| 32 | - for ($i = 1; $i <= $n; $i ++) { |
|
| 32 | + for ($i = 1; $i <= $n; $i++) { |
|
| 33 | 33 | $poly1XY = explode(' ', $poly1); |
| 34 | 34 | $poly1x = $poly1XY[0]; |
| 35 | 35 | $poly1y = $poly1XY[1]; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | if ($poly1y != $poly2y) { |
| 45 | 45 | $xinters = ($py - $poly1y) * ($poly2x - $poly1x) / ($poly2y - $poly1y) + $poly1x; |
| 46 | 46 | if ($poly1x == $poly2x || $px <= $xinters) { |
| 47 | - $counter ++; |
|
| 47 | + $counter++; |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | // min. 4 different chars |
| 36 | 36 | $chars = array(); |
| 37 | - for ($i = 0; $i < mb_strlen($pw); $i ++) { |
|
| 37 | + for ($i = 0; $i < mb_strlen($pw); $i++) { |
|
| 38 | 38 | $chars[mb_substr($pw, $i, 1)] = true; |
| 39 | 39 | } |
| 40 | 40 | |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | $to_page = min($last_page, max($first_page, $current_page - $lrspan) + $this->max_pages_shown - 1); |
| 60 | 60 | $from_page = max($first_page, $to_page - $this->max_pages_shown + 1); |
| 61 | 61 | |
| 62 | - for ($page = $from_page; $page <= $to_page; $page ++) { |
|
| 62 | + for ($page = $from_page; $page <= $to_page; $page++) { |
|
| 63 | 63 | if ($page == $current_page) { |
| 64 | 64 | $pages[$page] = false; |
| 65 | 65 | } else { |
@@ -20,13 +20,13 @@ |
||
| 20 | 20 | * |
| 21 | 21 | ***************************************************************************/ |
| 22 | 22 | |
| 23 | -define('LOGIN_UNKNOWN_ERROR', - 1); // unkown error occured |
|
| 24 | -define('LOGIN_OK', 0); // login succeeded |
|
| 25 | -define('LOGIN_BADUSERPW', 1); // bad username or password |
|
| 26 | -define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time |
|
| 27 | -define('LOGIN_USERNOTACTIVE', 3); // the useraccount locked |
|
| 23 | +define('LOGIN_UNKNOWN_ERROR', - 1); // unkown error occured |
|
| 24 | +define('LOGIN_OK', 0); // login succeeded |
|
| 25 | +define('LOGIN_BADUSERPW', 1); // bad username or password |
|
| 26 | +define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time |
|
| 27 | +define('LOGIN_USERNOTACTIVE', 3); // the useraccount locked |
|
| 28 | 28 | define('LOGIN_EMPTY_USERPASSWORD', 4); // given username/password was empty |
| 29 | -define('LOGIN_LOGOUT_OK', 5); // logout was successfull |
|
| 29 | +define('LOGIN_LOGOUT_OK', 5); // logout was successfull |
|
| 30 | 30 | |
| 31 | 31 | // login times in seconds |
| 32 | 32 | define('LOGIN_TIME', 60 * 60); |