@@ -5,14 +5,14 @@ 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 | $tpl->name = 'mywatches'; |
11 | 11 | $tpl->menuitem = MNU_MYPROFILE_WATCHES; |
12 | 12 | |
13 | 13 | $login->verify(); |
14 | 14 | if ($login->userid == 0) { |
15 | - $tpl->redirect('login.php?target=' . urlencode($tpl->target)); |
|
15 | + $tpl->redirect('login.php?target='.urlencode($tpl->target)); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | $action = isset($_REQUEST['action']) ? mb_strtolower($_REQUEST['action']) : ''; |
@@ -48,14 +48,14 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | $hours = array(); |
51 | - for ($i = 0; $i < 24; $i ++) { |
|
51 | + for ($i = 0; $i < 24; $i++) { |
|
52 | 52 | $hours[] = [ |
53 | 53 | 'value' => $i, |
54 | 54 | 'time' => mktime($i, 0, 0) |
55 | 55 | ]; |
56 | 56 | } |
57 | 57 | $weekdays = array(); |
58 | - for ($i = 1; $i <= 7; $i ++) { |
|
58 | + for ($i = 1; $i <= 7; $i++) { |
|
59 | 59 | $weekdays[] = array( |
60 | 60 | 'value' => $i, |
61 | 61 | 'time' => mktime(0, 0, 0, 0, $i + 5, 2000) |
@@ -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 | //get the article name to display |
11 | 11 | $article = ''; |
@@ -23,20 +23,20 @@ discard block |
||
23 | 23 | $tpl->redirect('index.php'); |
24 | 24 | } elseif (isset($_REQUEST['wiki'])) { |
25 | 25 | $tpl->redirect(helppageurl($article)); |
26 | -} elseif (!file_exists($opt['stylepath'] . '/articles/' . $language . '/' . $article . '.tpl')) { |
|
26 | +} elseif (!file_exists($opt['stylepath'].'/articles/'.$language.'/'.$article.'.tpl')) { |
|
27 | 27 | // does article exist in default-language? |
28 | - $file = $opt['stylepath'] . '/articles/' . $opt['template']['default']['article_locale'] . '/' . $article . '.tpl'; |
|
28 | + $file = $opt['stylepath'].'/articles/'.$opt['template']['default']['article_locale'].'/'.$article.'.tpl'; |
|
29 | 29 | if (file_exists($file)) { |
30 | 30 | $language = $opt['template']['default']['article_locale']; |
31 | - } elseif (file_exists($opt['stylepath'] . '/articles/EN/' . $article . '.tpl')) { |
|
31 | + } elseif (file_exists($opt['stylepath'].'/articles/EN/'.$article.'.tpl')) { |
|
32 | 32 | $language = 'EN'; |
33 | 33 | } else { |
34 | 34 | // use any |
35 | 35 | $language = false; |
36 | - if ($hDir = opendir($opt['stylepath'] . '/articles/')) { |
|
36 | + if ($hDir = opendir($opt['stylepath'].'/articles/')) { |
|
37 | 37 | while ((($sFile = readdir($hDir)) !== false) && ($language === false)) { |
38 | - if (($sFile != '.') && ($sFile != '..') && (is_dir($opt['stylepath'] . '/articles/' . $sFile))) { |
|
39 | - if (file_exists($opt['stylepath'] . '/articles/' . $sFile . '/' . $article . '.tpl')) { |
|
38 | + if (($sFile != '.') && ($sFile != '..') && (is_dir($opt['stylepath'].'/articles/'.$sFile))) { |
|
39 | + if (file_exists($opt['stylepath'].'/articles/'.$sFile.'/'.$article.'.tpl')) { |
|
40 | 40 | $language = $sFile; |
41 | 41 | } |
42 | 42 | } |
@@ -54,13 +54,13 @@ discard block |
||
54 | 54 | $tpl->name = 'articles'; |
55 | 55 | |
56 | 56 | $tpl->caching = true; |
57 | -$tpl->cache_id = 'articles|' . $language . '|' . $article; |
|
57 | +$tpl->cache_id = 'articles|'.$language.'|'.$article; |
|
58 | 58 | $tpl->cache_lifetime = 43200; |
59 | 59 | |
60 | 60 | $tpl->menuitem = sql_value( |
61 | 61 | "SELECT `id` FROM `sys_menu` WHERE `href`='&1' LIMIT 1", |
62 | 62 | 0, |
63 | - 'articles.php?page=' . urlencode($article) |
|
63 | + 'articles.php?page='.urlencode($article) |
|
64 | 64 | ); |
65 | 65 | if ($tpl->menuitem == 0) { |
66 | 66 | $tpl->redirect('index.php'); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | /* prepare smarty vars for special pages ... |
75 | 75 | */ |
76 | 76 | if ($article == 'cacheinfo') { |
77 | - require_once $opt['rootpath'] . 'lib2/logic/attribute.class.php'; |
|
77 | + require_once $opt['rootpath'].'lib2/logic/attribute.class.php'; |
|
78 | 78 | $attributes = attribute::getSelectableAttrbutesListArray(true); |
79 | 79 | $tpl->assign('attributes', $attributes); |
80 | 80 | } |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | 8 | $disable_verifyemail = true; |
9 | -require __DIR__ . '/lib2/web.inc.php'; |
|
9 | +require __DIR__.'/lib2/web.inc.php'; |
|
10 | 10 | |
11 | 11 | $tpl->name = 'activation'; |
12 | 12 | $tpl->menuitem = MNU_START_REGISTER_ACTIVATION; |
@@ -14,10 +14,8 @@ discard block |
||
14 | 14 | // We use short param codes 'u' and 'c' to generate short-enough activation |
15 | 15 | // url that will not be wrapped in plain-text emails. |
16 | 16 | |
17 | -$code = isset($_REQUEST['code']) ? trim($_REQUEST['code']) : |
|
18 | - (isset($_REQUEST['c']) ? trim($_REQUEST['c']) : ''); |
|
19 | -$email = isset($_REQUEST['email']) ? trim($_REQUEST['email']) : |
|
20 | - (isset($_REQUEST['e']) ? trim($_REQUEST['e']) : ''); |
|
17 | +$code = isset($_REQUEST['code']) ? trim($_REQUEST['code']) : (isset($_REQUEST['c']) ? trim($_REQUEST['c']) : ''); |
|
18 | +$email = isset($_REQUEST['email']) ? trim($_REQUEST['email']) : (isset($_REQUEST['e']) ? trim($_REQUEST['e']) : ''); |
|
21 | 19 | |
22 | 20 | $tpl->assign('errorEMail', false); |
23 | 21 | $tpl->assign('errorCode', false); |
@@ -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 | $tpl->name = 'addtolist'; |
11 | 11 | $tpl->menuitem = MNU_CACHES_ADDTOLIST; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $tpl->assign('cacheid', $cacheid); |
23 | 23 | |
24 | 24 | if (isset($_REQUEST['cancel'])) { |
25 | - $tpl->redirect('viewcache.php?cacheid=' . $cacheid); |
|
25 | + $tpl->redirect('viewcache.php?cacheid='.$cacheid); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | $newlist_name = isset($_REQUEST['newlist_name']) ? trim($_REQUEST['newlist_name']) : false; |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | $cachelist->watch(true); |
45 | 45 | } |
46 | 46 | } |
47 | - $tpl->redirect('viewcache.php?cacheid=' . $cacheid); |
|
47 | + $tpl->redirect('viewcache.php?cacheid='.$cacheid); |
|
48 | 48 | } |
49 | 49 | } else { |
50 | 50 | $cachelist = new cachelist($listid); |
51 | 51 | if ($cachelist->exist()) { |
52 | 52 | $cachelist->addCacheByID($cacheid); |
53 | 53 | } |
54 | - $tpl->redirect('viewcache.php?cacheid=' . $cacheid); |
|
54 | + $tpl->redirect('viewcache.php?cacheid='.$cacheid); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 |
@@ -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 | $add_where = ''; |
11 | 11 | $newLogsPerCountry = $opt['logic']['new_logs_per_country']; |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | $country = false; |
31 | 31 | $exclude_country = '*'; |
32 | 32 | $include_country = '%'; |
33 | - $add_where = "AND `caches`.`user_id`='" . sql_escape($ownerid) . "' "; |
|
33 | + $add_where = "AND `caches`.`user_id`='".sql_escape($ownerid)."' "; |
|
34 | 34 | if (!$show_own_logs) { |
35 | - $add_where .= "AND `cache_logs`.`user_id`<>'" . sql_escape($login->userid) . "' "; |
|
35 | + $add_where .= "AND `cache_logs`.`user_id`<>'".sql_escape($login->userid)."' "; |
|
36 | 36 | } |
37 | 37 | $tpl->caching = false; |
38 | 38 | $logcount = 100; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $country = false; |
50 | 50 | $exclude_country = '*'; |
51 | 51 | $include_country = '%'; |
52 | - $add_where = "AND `cache_logs`.`user_id`='" . sql_escape($userid) . "' "; |
|
52 | + $add_where = "AND `cache_logs`.`user_id`='".sql_escape($userid)."' "; |
|
53 | 53 | $tpl->caching = false; |
54 | 54 | $logcount = 100; |
55 | 55 | $paging = true; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $tpl->cache_lifetime = 900; |
70 | 70 | $tpl->cache_id = $exclude_country; |
71 | 71 | $logcount = 250; |
72 | - $paging = false; // paging would have poor performance for all logs |
|
72 | + $paging = false; // paging would have poor performance for all logs |
|
73 | 73 | $orderByDate = $logselection == 3 ? "{fromtable}.`order_date` DESC, " : ""; |
74 | 74 | } else { |
75 | 75 | // latest logs for all countries or for one country |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $tpl->cache_lifetime = 300; |
89 | 89 | $tpl->cache_id = $country; |
90 | 90 | $logcount = 250; |
91 | - $paging = false; // paging would have poor performance for all logs |
|
91 | + $paging = false; // paging would have poor performance for all logs |
|
92 | 92 | $orderByDate = $logselection == 3 ? "{fromtable}.`order_date` DESC, " : ""; |
93 | 93 | $optimize_for_latest_logs = ($country == '' || $country == $opt['page']['main_country']); |
94 | 94 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | if ($logselection == 1) { |
102 | 102 | $add_where .= "AND DATEDIFF(NOW(), {fromtable}.`date`) < 30 "; |
103 | 103 | } |
104 | -$tpl->cache_id .= "|" . $logselection; |
|
104 | +$tpl->cache_id .= "|".$logselection; |
|
105 | 105 | |
106 | 106 | $tpl->change_country_inpage = true; |
107 | 107 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | `needs_maintenance`, `listing_outdated`, `order_date` |
122 | 122 | FROM `cache_logs` |
123 | 123 | ORDER BY `date_created` DESC |
124 | - LIMIT " . (4 * $logcount) . ")" |
|
124 | + LIMIT " . (4 * $logcount).")" |
|
125 | 125 | ); |
126 | 126 | $fromtable = '`&loglist0`'; |
127 | 127 | } else { |
@@ -132,16 +132,16 @@ discard block |
||
132 | 132 | sql_temp_table_slave('loglist'); |
133 | 133 | sql_slave( |
134 | 134 | "CREATE TEMPORARY TABLE &loglist (`id` INT(11) PRIMARY KEY) |
135 | - SELECT " . ($paging ? "SQL_CALC_FOUND_ROWS" : "") . " " . $fromtable . ".`id` |
|
136 | - FROM " . $fromtable . " |
|
137 | - INNER JOIN `caches` ON " . $fromtable . ".`cache_id`=`caches`.`cache_id` |
|
135 | + SELECT " . ($paging ? "SQL_CALC_FOUND_ROWS" : "")." ".$fromtable.".`id` |
|
136 | + FROM " . $fromtable." |
|
137 | + INNER JOIN `caches` ON " . $fromtable.".`cache_id`=`caches`.`cache_id` |
|
138 | 138 | INNER JOIN `cache_status` ON `caches`.`status`=`cache_status`.`id` |
139 | - INNER JOIN `user` ON " . $fromtable . ".`user_id`=`user`.`user_id` |
|
139 | + INNER JOIN `user` ON " . $fromtable.".`user_id`=`user`.`user_id` |
|
140 | 140 | WHERE `cache_status`.`allow_user_view`=1 |
141 | 141 | AND `caches`.`country` LIKE '&1' |
142 | 142 | AND `caches`.`country`<>'&2' |
143 | - " . $add_where . " |
|
144 | - ORDER BY " . str_replace("{fromtable}", $fromtable, $orderByDate) . $fromtable . ".`date_created` DESC |
|
143 | + " . $add_where." |
|
144 | + ORDER BY " . str_replace("{fromtable}", $fromtable, $orderByDate).$fromtable.".`date_created` DESC |
|
145 | 145 | LIMIT &3, &4", |
146 | 146 | $include_country, |
147 | 147 | $exclude_country, |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | ON `caches_attributes`.`cache_id`=`caches`.`cache_id` |
203 | 203 | AND `caches_attributes`.`attrib_id`=6 |
204 | 204 | WHERE IFNULL(`cache_logs_restored`.`restored_by`,0)=0 |
205 | - ORDER BY " . $orderByCountry . str_replace("{fromtable}", "`cache_logs`", $orderByDate) . "`cache_logs`.`date_created` DESC", |
|
205 | + ORDER BY " . $orderByCountry.str_replace("{fromtable}", "`cache_logs`", $orderByDate)."`cache_logs`.`date_created` DESC", |
|
206 | 206 | $opt['template']['locale'] |
207 | 207 | ); |
208 | 208 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | } |
248 | 248 | sql_free_result($rsPic); |
249 | 249 | } |
250 | - $pics --; |
|
250 | + $pics--; |
|
251 | 251 | |
252 | 252 | $rLog['first'] = false; |
253 | 253 | if (isset($caches_logged)) { |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | |
302 | 302 | $tpl->assign('paging', $paging); |
303 | 303 | if ($paging) { |
304 | - $pager = new pager($_SERVER["SCRIPT_NAME"] . '?startat={offset}' . $urlparams); |
|
304 | + $pager = new pager($_SERVER["SCRIPT_NAME"].'?startat={offset}'.$urlparams); |
|
305 | 305 | $pager->make_from_offset($startat, $total_logs, $logcount); |
306 | 306 | } |
307 | 307 | } |
@@ -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 | $login->verify(); |
11 | 11 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ) == 0 |
42 | 42 | ) { |
43 | 43 | if ($debug == 1) { |
44 | - die('Debug: line ' . __LINE__); |
|
44 | + die('Debug: line '.__LINE__); |
|
45 | 45 | } else { |
46 | 46 | $tpl->redirect(thumbpath('extern', 1)); |
47 | 47 | } |
@@ -60,14 +60,14 @@ discard block |
||
60 | 60 | ) == 0 |
61 | 61 | ) { |
62 | 62 | if ($debug == 1) { |
63 | - die('Debug: line ' . __LINE__); |
|
63 | + die('Debug: line '.__LINE__); |
|
64 | 64 | } else { |
65 | 65 | $tpl->redirect(thumbpath('extern', 2)); |
66 | 66 | } |
67 | 67 | } |
68 | 68 | } else { |
69 | 69 | if ($debug == 1) { |
70 | - die('Debug: line ' . __LINE__); |
|
70 | + die('Debug: line '.__LINE__); |
|
71 | 71 | } else { |
72 | 72 | $tpl->redirect(thumbpath('intern', $default_object_type)); |
73 | 73 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | if ($r['local'] == 0) { |
77 | 77 | if ($debug == 1) { |
78 | - die('Debug: line ' . __LINE__); |
|
78 | + die('Debug: line '.__LINE__); |
|
79 | 79 | } else { |
80 | 80 | $tpl->redirect(thumbpath('extern', $r['object_type'])); |
81 | 81 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | if (($r['spoiler'] == 1) && ($showspoiler != 1)) { |
85 | 85 | if ($debug == 1) { |
86 | - die('Debug: line ' . __LINE__); |
|
86 | + die('Debug: line '.__LINE__); |
|
87 | 87 | } else { |
88 | 88 | $tpl->redirect(thumbpath('spoiler', $r['object_type'])); |
89 | 89 | } |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | $imgurl = $r['url']; |
93 | 93 | $urlparts = mb_split('/', $imgurl); |
94 | 94 | |
95 | - if (!file_exists($opt['logic']['pictures']['dir'] . '/' . $urlparts[count($urlparts) - 1])) { |
|
95 | + if (!file_exists($opt['logic']['pictures']['dir'].'/'.$urlparts[count($urlparts) - 1])) { |
|
96 | 96 | if ($debug == 1) { |
97 | - die('Debug: line ' . __LINE__); |
|
97 | + die('Debug: line '.__LINE__); |
|
98 | 98 | } else { |
99 | 99 | $tpl->redirect(thumbpath('intern', $r['object_type'])); |
100 | 100 | } |
@@ -107,11 +107,11 @@ discard block |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | if (!file_exists( |
110 | - $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr( |
|
110 | + $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr( |
|
111 | 111 | $urlparts[count($urlparts) - 1], |
112 | 112 | 0, |
113 | 113 | 1 |
114 | - ) . '/' . mb_substr($urlparts[count($urlparts) - 1], 1, 1) . '/' . $urlparts[count($urlparts) - 1] |
|
114 | + ).'/'.mb_substr($urlparts[count($urlparts) - 1], 1, 1).'/'.$urlparts[count($urlparts) - 1] |
|
115 | 115 | ) |
116 | 116 | ) { |
117 | 117 | $bGenerate = true; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | if ($bGenerate) { |
121 | 121 | if ($r['unknown_format'] == 1) { |
122 | 122 | if ($debug == 1) { |
123 | - die('Debug: line ' . __LINE__); |
|
123 | + die('Debug: line '.__LINE__); |
|
124 | 124 | } else { |
125 | 125 | $tpl->redirect(thumbpath('format', $r['object_type'])); |
126 | 126 | } |
@@ -131,11 +131,11 @@ discard block |
||
131 | 131 | $filenameparts = mb_split('\\.', $filename); |
132 | 132 | $extension = mb_strtolower($filenameparts[count($filenameparts) - 1]); |
133 | 133 | |
134 | - if (mb_strpos(';' . $opt['logic']['pictures']['extensions'] . ';', ';' . $extension . ';') === false) { |
|
134 | + if (mb_strpos(';'.$opt['logic']['pictures']['extensions'].';', ';'.$extension.';') === false) { |
|
135 | 135 | sql("UPDATE `pictures` SET `unknown_format`=1 WHERE `uuid`='&1'", $r['uuid']); |
136 | 136 | |
137 | 137 | if ($debug == 1) { |
138 | - die('Debug: line ' . __LINE__); |
|
138 | + die('Debug: line '.__LINE__); |
|
139 | 139 | } else { |
140 | 140 | $tpl->redirect(thumbpath('format', $r['object_type'])); |
141 | 141 | } |
@@ -146,20 +146,20 @@ discard block |
||
146 | 146 | } |
147 | 147 | switch ($extension) { |
148 | 148 | case 'jpg': |
149 | - $im = imagecreatefromjpeg($opt['logic']['pictures']['dir'] . '/' . $filename); |
|
149 | + $im = imagecreatefromjpeg($opt['logic']['pictures']['dir'].'/'.$filename); |
|
150 | 150 | break; |
151 | 151 | |
152 | 152 | case 'gif': |
153 | - $im = imagecreatefromgif($opt['logic']['pictures']['dir'] . '/' . $filename); |
|
153 | + $im = imagecreatefromgif($opt['logic']['pictures']['dir'].'/'.$filename); |
|
154 | 154 | break; |
155 | 155 | |
156 | 156 | case 'png': |
157 | - $im = imagecreatefrompng($opt['logic']['pictures']['dir'] . '/' . $filename); |
|
157 | + $im = imagecreatefrompng($opt['logic']['pictures']['dir'].'/'.$filename); |
|
158 | 158 | break; |
159 | 159 | |
160 | 160 | case 'bmp': |
161 | - require $opt['rootpath'] . 'lib2/imagebmp.inc.php'; |
|
162 | - $im = imagecreatefrombmp($opt['logic']['pictures']['dir'] . '/' . $filename); |
|
161 | + require $opt['rootpath'].'lib2/imagebmp.inc.php'; |
|
162 | + $im = imagecreatefrombmp($opt['logic']['pictures']['dir'].'/'.$filename); |
|
163 | 163 | break; |
164 | 164 | } |
165 | 165 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | sql("UPDATE `pictures` SET `unknown_format`=1 WHERE `uuid`='&1'", $r['uuid']); |
168 | 168 | |
169 | 169 | if ($debug == 1) { |
170 | - die('Debug: line ' . __LINE__); |
|
170 | + die('Debug: line '.__LINE__); |
|
171 | 171 | } else { |
172 | 172 | $tpl->redirect(thumbpath('format', $r['object_type'])); |
173 | 173 | } |
@@ -204,15 +204,15 @@ discard block |
||
204 | 204 | imagecopyresampled($thumbimage, $im, 0, 0, 0, 0, $thumbwidth, $thumbheight, $imwidth, $imheight); |
205 | 205 | |
206 | 206 | // Create directory |
207 | - if (!file_exists($opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1))) { |
|
208 | - mkdir($opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1)); |
|
207 | + if (!file_exists($opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1))) { |
|
208 | + mkdir($opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1)); |
|
209 | 209 | } |
210 | 210 | if (!file_exists( |
211 | - $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr($filename, 1, 1) |
|
211 | + $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr($filename, 1, 1) |
|
212 | 212 | ) |
213 | 213 | ) { |
214 | 214 | mkdir( |
215 | - $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr( |
|
215 | + $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr( |
|
216 | 216 | $filename, |
217 | 217 | 1, |
218 | 218 | 1 |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | ); |
221 | 221 | } |
222 | 222 | |
223 | - $savedir = $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr( |
|
223 | + $savedir = $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr( |
|
224 | 224 | $filename, |
225 | 225 | 1, |
226 | 226 | 1 |
@@ -228,42 +228,42 @@ discard block |
||
228 | 228 | |
229 | 229 | switch ($extension) { |
230 | 230 | case 'jpg': |
231 | - imagejpeg($thumbimage, $savedir . '/' . $filename); |
|
231 | + imagejpeg($thumbimage, $savedir.'/'.$filename); |
|
232 | 232 | break; |
233 | 233 | |
234 | 234 | case 'gif': |
235 | - imagegif($thumbimage, $savedir . '/' . $filename); |
|
235 | + imagegif($thumbimage, $savedir.'/'.$filename); |
|
236 | 236 | break; |
237 | 237 | |
238 | 238 | case 'png': |
239 | - imagepng($thumbimage, $savedir . '/' . $filename); |
|
239 | + imagepng($thumbimage, $savedir.'/'.$filename); |
|
240 | 240 | break; |
241 | 241 | |
242 | 242 | case 'bmp': |
243 | - imagebmp($thumbimage, $savedir . '/' . $filename); |
|
243 | + imagebmp($thumbimage, $savedir.'/'.$filename); |
|
244 | 244 | break; |
245 | 245 | } |
246 | 246 | |
247 | 247 | sql( |
248 | 248 | "UPDATE `pictures` SET `thumb_last_generated`=NOW(), `thumb_url`='&1' WHERE `uuid`='&2'", |
249 | - $opt['logic']['pictures']['thumb_url'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr( |
|
249 | + $opt['logic']['pictures']['thumb_url'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr( |
|
250 | 250 | $filename, |
251 | 251 | 1, |
252 | 252 | 1 |
253 | - ) . '/' . $filename, |
|
253 | + ).'/'.$filename, |
|
254 | 254 | $r['uuid'] |
255 | 255 | ); |
256 | 256 | |
257 | 257 | if ($debug == 1) { |
258 | - die($opt['logic']['pictures']['thumb_url'] . '/' . $filename); |
|
258 | + die($opt['logic']['pictures']['thumb_url'].'/'.$filename); |
|
259 | 259 | } else { |
260 | 260 | $tpl->redirect( |
261 | 261 | use_current_protocol( |
262 | - $opt['logic']['pictures']['thumb_url'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr( |
|
262 | + $opt['logic']['pictures']['thumb_url'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr( |
|
263 | 263 | $filename, |
264 | 264 | 1, |
265 | 265 | 1 |
266 | - ) . '/' . $filename |
|
266 | + ).'/'.$filename |
|
267 | 267 | ) |
268 | 268 | ); |
269 | 269 | } |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | } |
277 | 277 | } else { |
278 | 278 | if ($debug == 1) { |
279 | - die('Debug: line ' . __LINE__); |
|
279 | + die('Debug: line '.__LINE__); |
|
280 | 280 | } else { |
281 | 281 | $tpl->redirect(thumbpath('404', $default_object_type)); |
282 | 282 | } |
@@ -291,18 +291,18 @@ discard block |
||
291 | 291 | || ($object_type != 1 && $object_type != 2) |
292 | 292 | ) { |
293 | 293 | if ($debug == 1) { |
294 | - die('Debug: line ' . __LINE__); |
|
294 | + die('Debug: line '.__LINE__); |
|
295 | 295 | } else { |
296 | 296 | $name = 'intern'; |
297 | 297 | $object_type = $default_object_type; |
298 | 298 | } |
299 | 299 | } |
300 | 300 | |
301 | - $imgdir = 'resource2/' . $opt['template']['style'] . '/images/thumb/'; |
|
302 | - $filename = 'thumb' . $name . '_' . $object_type . '.gif'; |
|
303 | - $thumbpath = $imgdir . strtolower($opt['template']['locale']) . '/' . $filename; |
|
301 | + $imgdir = 'resource2/'.$opt['template']['style'].'/images/thumb/'; |
|
302 | + $filename = 'thumb'.$name.'_'.$object_type.'.gif'; |
|
303 | + $thumbpath = $imgdir.strtolower($opt['template']['locale']).'/'.$filename; |
|
304 | 304 | if (!file_exists($thumbpath)) { |
305 | - $thumbpath = $imgdir . 'en/' . $filename; |
|
305 | + $thumbpath = $imgdir.'en/'.$filename; |
|
306 | 306 | } |
307 | 307 | |
308 | 308 | return $thumbpath; |
@@ -8,4 +8,4 @@ |
||
8 | 8 | * downward compatibility |
9 | 9 | ***************************************************************************/ |
10 | 10 | |
11 | -require_once __DIR__ . '/../../util2/stats/rank.php'; |
|
11 | +require_once __DIR__.'/../../util2/stats/rank.php'; |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | |
8 | 8 | header('Content-type: text/html; charset=utf-8'); |
9 | 9 | |
10 | -$rootpath = __DIR__ . '/../../'; |
|
11 | -require_once $rootpath . 'lib/common.inc.php'; |
|
10 | +$rootpath = __DIR__.'/../../'; |
|
11 | +require_once $rootpath.'lib/common.inc.php'; |
|
12 | 12 | |
13 | 13 | $wp = isset($_REQUEST['wp']) ? $_REQUEST['wp'] : ''; |
14 | 14 | |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $attrs_set = isset($_REQUEST['cache_attribs']) ? $_REQUEST['cache_attribs'] : ''; |
17 | 17 | $attrs = mb_split(';', $attrs_set); |
18 | 18 | |
19 | - $cache_id = sqlValue("SELECT `cache_id` FROM `caches` WHERE `wp_oc`='" . sql_escape($wp) . "'", 0); |
|
19 | + $cache_id = sqlValue("SELECT `cache_id` FROM `caches` WHERE `wp_oc`='".sql_escape($wp)."'", 0); |
|
20 | 20 | if ($cache_id == 0) { |
21 | 21 | die('cache_id unknown'); |
22 | 22 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | if ($attr_js != '') { |
47 | 47 | $attr_js .= ','; |
48 | 48 | } |
49 | - $attr_js .= "new Array(" . $r['id'] . ", " . (isset($attrs[$r['id']]) ? 1 : 0) . ", '../../" . $r['icon_undef'] . "', '../../" . $r['icon_large'] . "')"; |
|
49 | + $attr_js .= "new Array(".$r['id'].", ".(isset($attrs[$r['id']]) ? 1 : 0).", '../../".$r['icon_undef']."', '../../".$r['icon_large']."')"; |
|
50 | 50 | } |
51 | 51 | mysql_free_result($rs); |
52 | 52 | ?> |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | <?php |
100 | 100 | $rs = sql("SELECT `id`, `icon_large`, `icon_undef` FROM `cache_attrib`"); |
101 | 101 | while ($r = sql_fetch_assoc($rs)) { |
102 | - echo '<img id="attr' . $r['id'] . '" onmousedown="toggleAttr(' . $r['id'] . ')" src="../../'; |
|
102 | + echo '<img id="attr'.$r['id'].'" onmousedown="toggleAttr('.$r['id'].')" src="../../'; |
|
103 | 103 | |
104 | 104 | if (isset($attrs[$r['id']])) { |
105 | 105 | echo $r['icon_large']; |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | |
8 | 8 | header('Content-type: text/html; charset=utf-8'); |
9 | 9 | |
10 | -$rootpath = __DIR__ . '/../../'; |
|
11 | -require_once $rootpath . 'lib/common.inc.php'; |
|
10 | +$rootpath = __DIR__.'/../../'; |
|
11 | +require_once $rootpath.'lib/common.inc.php'; |
|
12 | 12 | |
13 | 13 | ?> |
14 | 14 | <html> |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | AND ISNULL(`caches_attributes`.`cache_id`) ORDER BY `caches`.`wp_oc`' |
42 | 42 | ); |
43 | 43 | while ($rCache = sql_fetch_assoc($rsCaches)) { |
44 | - echo '<a href="javascript:select(\'' . $rCache['wp_oc'] . '\')">' . $rCache['wp_oc'] . '<br />'; |
|
44 | + echo '<a href="javascript:select(\''.$rCache['wp_oc'].'\')">'.$rCache['wp_oc'].'<br />'; |
|
45 | 45 | } |
46 | 46 | mysql_free_result($rsCaches); |
47 | 47 | ?> |