@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | * |
17 | 17 | ***************************************************************************/ |
18 | 18 | |
19 | -require __DIR__ . '/lib2/web.inc.php'; |
|
19 | +require __DIR__.'/lib2/web.inc.php'; |
|
20 | 20 | |
21 | 21 | $tpl->name = 'picture'; |
22 | 22 | $tpl->menuitem = MNU_CACHES_PICTURE; |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | if (isset($_REQUEST['ok'])) { // Ocprop |
76 | 76 | $bError = false; |
77 | 77 | |
78 | - $picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler'] == '1'); // Ocprop |
|
79 | - $picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay'] == '1') == false); // Ocprop |
|
78 | + $picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler'] == '1'); // Ocprop |
|
79 | + $picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay'] == '1') == false); // Ocprop |
|
80 | 80 | $picture->setMapPreview(isset($_REQUEST['mappreview']) && $_REQUEST['mappreview'] == '1'); |
81 | 81 | |
82 | - $title = isset($_REQUEST['title']) ? $_REQUEST['title'] : ''; // Ocprop |
|
82 | + $title = isset($_REQUEST['title']) ? $_REQUEST['title'] : ''; // Ocprop |
|
83 | 83 | if ($title == '' || ($picture->getObjectType() == OBJECT_CACHELOG && trim($title) == '')) { |
84 | 84 | $tpl->assign('errortitle', true); |
85 | 85 | $bError = true; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | } |
136 | 136 | } // try saving as jpg and shrinking if > PICTURE_MAX_LONG_SIDE file |
137 | 137 | else { |
138 | - $picture->setFilenames(mb_strtolower($fname) . '.jpg'); |
|
138 | + $picture->setFilenames(mb_strtolower($fname).'.jpg'); |
|
139 | 139 | if (!$picture->rotate_and_shrink($_FILES['file']['tmp_name'], PICTURE_MAX_LONG_SIDE)) { |
140 | 140 | $bError = true; |
141 | 141 | } |
@@ -34,10 +34,12 @@ discard block |
||
34 | 34 | |
35 | 35 | $uuid = isset($_REQUEST['uuid']) ? $_REQUEST['uuid'] : 0; |
36 | 36 | |
37 | -if ($action == 'add') { // Ocprop |
|
37 | +if ($action == 'add') { |
|
38 | +// Ocprop |
|
38 | 39 | $picture = new picture(); |
39 | 40 | |
40 | - if (isset($_REQUEST['cacheuuid'])) { // Ocprop |
|
41 | + if (isset($_REQUEST['cacheuuid'])) { |
|
42 | +// Ocprop |
|
41 | 43 | $cache = cache::fromUUID($_REQUEST['cacheuuid']); |
42 | 44 | if ($cache === null) { |
43 | 45 | $tpl->error(ERROR_CACHE_NOT_EXISTS); |
@@ -51,7 +53,8 @@ discard block |
||
51 | 53 | $picture->setObjectType(OBJECT_CACHE); |
52 | 54 | |
53 | 55 | $cache = null; |
54 | - } elseif (isset($_REQUEST['loguuid'])) {// Ocprop |
|
56 | + } elseif (isset($_REQUEST['loguuid'])) { |
|
57 | +// Ocprop |
|
55 | 58 | $cachelog = cachelog::fromUUID($_REQUEST['loguuid']); |
56 | 59 | if ($cachelog === null) { |
57 | 60 | $tpl->error(ERROR_CACHELOG_NOT_EXISTS); |
@@ -72,7 +75,8 @@ discard block |
||
72 | 75 | } |
73 | 76 | |
74 | 77 | // uploaded file ok? |
75 | - if (isset($_REQUEST['ok'])) { // Ocprop |
|
78 | + if (isset($_REQUEST['ok'])) { |
|
79 | +// Ocprop |
|
76 | 80 | $bError = false; |
77 | 81 | |
78 | 82 | $picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler'] == '1'); // Ocprop |
@@ -92,7 +96,8 @@ discard block |
||
92 | 96 | $tpl->redirect($picture->getPageLink()); |
93 | 97 | } |
94 | 98 | |
95 | - if (!isset($_FILES['file'])) { // Ocprop |
|
99 | + if (!isset($_FILES['file'])) { |
|
100 | +// Ocprop |
|
96 | 101 | $tpl->assign('errorfile', ERROR_UPLOAD_ERR_NO_FILE); |
97 | 102 | $bError = true; |
98 | 103 | } elseif ($_FILES['file']['error'] == UPLOAD_ERR_NO_FILE) { |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require __DIR__ . '/lib2/web.inc.php'; |
|
8 | +require __DIR__.'/lib2/web.inc.php'; |
|
9 | 9 | |
10 | 10 | $sUserCountry = $login->getUserCountry(); |
11 | 11 | |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | if ($isRedirect404) { |
28 | 28 | // check length |
29 | 29 | $uril = 70; |
30 | - $uri = 'http://' . strtolower($_SERVER['SERVER_NAME']) . $_SERVER['REQUEST_URI']; |
|
30 | + $uri = 'http://'.strtolower($_SERVER['SERVER_NAME']).$_SERVER['REQUEST_URI']; |
|
31 | 31 | // limit to $uril |
32 | 32 | if (strlen($uri) > $uril) { |
33 | - $uri = substr($uri, 0, $uril - 3) . '...'; |
|
33 | + $uri = substr($uri, 0, $uril - 3).'...'; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | // assign uri |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -$opt['rootpath'] = __DIR__ . '/../'; |
|
9 | -require $opt['rootpath'] . 'lib2/web.inc.php'; |
|
8 | +$opt['rootpath'] = __DIR__.'/../'; |
|
9 | +require $opt['rootpath'].'lib2/web.inc.php'; |
|
10 | 10 | |
11 | 11 | header('Content-type: text/plain; charset=utf-8'); |
12 | 12 | |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | ) { |
17 | 17 | $rs = sql('SELECT `user_id`, `email_problems` FROM `user` WHERE `email_problems`'); |
18 | 18 | while ($r = sql_fetch_assoc($rs)) { |
19 | - echo $r['user_id'] . ' ' . $r['email_problems'] . "\n"; |
|
19 | + echo $r['user_id'].' '.$r['email_problems']."\n"; |
|
20 | 20 | } |
21 | 21 | sql_free_result($rs); |
22 | 22 | } |
@@ -9,8 +9,8 @@ discard block |
||
9 | 9 | * replicated system than the XML interface. |
10 | 10 | ***************************************************************************/ |
11 | 11 | |
12 | -$opt['rootpath'] = __DIR__ . '/../'; |
|
13 | -require $opt['rootpath'] . 'lib2/web.inc.php'; |
|
12 | +$opt['rootpath'] = __DIR__.'/../'; |
|
13 | +require $opt['rootpath'].'lib2/web.inc.php'; |
|
14 | 14 | |
15 | 15 | header('Content-type: text/plain; charset=utf-8'); |
16 | 16 | |
@@ -24,5 +24,5 @@ discard block |
||
24 | 24 | ); |
25 | 25 | $wp_ocs = sql_fetch_column($rs); |
26 | 26 | foreach ($wp_ocs as $wp_oc) { |
27 | - echo $wp_oc . "\n"; |
|
27 | + echo $wp_oc."\n"; |
|
28 | 28 | } |
@@ -13,8 +13,8 @@ |
||
13 | 13 | * |
14 | 14 | ***************************************************************************/ |
15 | 15 | |
16 | -$opt['rootpath'] = __DIR__ . '/../'; |
|
17 | -require $opt['rootpath'] . 'lib2/web.inc.php'; |
|
16 | +$opt['rootpath'] = __DIR__.'/../'; |
|
17 | +require $opt['rootpath'].'lib2/web.inc.php'; |
|
18 | 18 | |
19 | 19 | if (isset($_REQUEST['report']) && $_REQUEST['report']) { |
20 | 20 | header('Content-type: text/plain'); |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | |
8 | 8 | header('Content-type: text/html; charset=utf-8'); |
9 | 9 | |
10 | -$opt['rootpath'] = __DIR__ . '/../../'; |
|
11 | -require $opt['rootpath'] . 'lib2/web.inc.php'; |
|
10 | +$opt['rootpath'] = __DIR__.'/../../'; |
|
11 | +require $opt['rootpath'].'lib2/web.inc.php'; |
|
12 | 12 | |
13 | 13 | $bFirstRow = true; |
14 | 14 | |
@@ -52,5 +52,5 @@ discard block |
||
52 | 52 | // renamed function from "str_getcsv" to avoid collision with PHP 5.3 str_getcsv() |
53 | 53 | function strGetCsv($str) |
54 | 54 | { |
55 | - return '"' . mb_ereg_replace('"', '\"', $str) . '"'; |
|
55 | + return '"'.mb_ereg_replace('"', '\"', $str).'"'; |
|
56 | 56 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * Unicode Reminder メモ |
8 | 8 | ***************************************************************************/ |
9 | 9 | |
10 | -require_once __DIR__ . '/lib/common.inc.php'; |
|
10 | +require_once __DIR__.'/lib/common.inc.php'; |
|
11 | 11 | |
12 | 12 | //Preprocessing |
13 | 13 | if ($error == false) { |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | tpl_set_var( |
33 | 33 | 'target', |
34 | 34 | htmlspecialchars( |
35 | - 'removedesc.php?cacheid=' . urlencode($cache_id) . '&desclang=' . urlencode($desclang), |
|
35 | + 'removedesc.php?cacheid='.urlencode($cache_id).'&desclang='.urlencode($desclang), |
|
36 | 36 | ENT_COMPAT, |
37 | 37 | 'UTF-8' |
38 | 38 | ) |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | if (mysql_num_rows($desc_rs) == 1) { |
57 | 57 | $desc_record = sql_fetch_array($desc_rs); |
58 | 58 | mysql_free_result($desc_rs); |
59 | - require $stylepath . '/removedesc.inc.php'; |
|
59 | + require $stylepath.'/removedesc.inc.php'; |
|
60 | 60 | |
61 | 61 | if ($desc_record['node'] != $oc_nodeid) { |
62 | 62 | tpl_errorMsg('removedesc', $error_wrong_node); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | // do not use slave server for the next time ... |
71 | 71 | db_slave_exclude(); |
72 | 72 | |
73 | - tpl_redirect('editcache.php?cacheid=' . urlencode($cache_id)); |
|
73 | + tpl_redirect('editcache.php?cacheid='.urlencode($cache_id)); |
|
74 | 74 | exit; |
75 | 75 | } else { |
76 | 76 | //commit the removement |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | header('Content-type: text/html; charset=utf-8'); |
9 | 9 | |
10 | 10 | $opt['rootpath'] = '../../'; |
11 | -require $opt['rootpath'] . 'lib2/web.inc.php'; |
|
11 | +require $opt['rootpath'].'lib2/web.inc.php'; |
|
12 | 12 | |
13 | 13 | $n = 1; |
14 | 14 | $rs = sql('SELECT `user`.`username`, `stat_user`.`found` |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | ORDER BY `stat_user`.`found` DESC |
19 | 19 | LIMIT 100'); |
20 | 20 | while ($r = sql_fetch_assoc($rs)) { |
21 | - echo $n . ' ' . $r['username'] . ': ' . $r['found'] . "\n"; |
|
22 | - $n ++; |
|
21 | + echo $n.' '.$r['username'].': '.$r['found']."\n"; |
|
22 | + $n++; |
|
23 | 23 | } |
24 | 24 | sql_free_result($rs); |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | header('Content-type: text/html; charset=utf-8'); |
9 | 9 | |
10 | 10 | $opt['rootpath'] = '../../'; |
11 | -require $opt['rootpath'] . 'lib2/web.inc.php'; |
|
11 | +require $opt['rootpath'].'lib2/web.inc.php'; |
|
12 | 12 | |
13 | 13 | echo "<h2>Top-Owner</h2>\n"; |
14 | 14 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | FROM `caches` |
29 | 29 | LEFT JOIN `user` ON `user`.`user_id`=`caches`.`user_id` |
30 | 30 | LEFT JOIN `caches_attributes` `ca` ON `ca`.`cache_id`=`caches`.`cache_id` AND `ca`.`attrib_id`=6 |
31 | - WHERE status=1 AND " . $condition . " |
|
31 | + WHERE status=1 AND " . $condition." |
|
32 | 32 | GROUP BY `caches`.`user_id` |
33 | 33 | HAVING COUNT(*) >= $limit |
34 | 34 | ORDER BY COUNT(*) DESC" |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $n = 1; |
38 | 38 | while ($r = sql_fetch_assoc($rs)) { |
39 | - echo " <tr><td style='text-align:right'> " . ($n ++) . ". </td><td style='text-align:right'>" . $r['count'] . "</td><td> " . $r['name'] . "</td></tr>\n"; |
|
39 | + echo " <tr><td style='text-align:right'> ".($n++).". </td><td style='text-align:right'>".$r['count']."</td><td> ".$r['name']."</td></tr>\n"; |
|
40 | 40 | } |
41 | 41 | sql_free_result($rs); |
42 | 42 |