@@ -184,16 +184,16 @@ |
||
184 | 184 | } |
185 | 185 | |
186 | 186 | $sql = 'INSERT INTO ' |
187 | - . $db->prefix('tplfile') |
|
188 | - . " SET tpl_file='" |
|
189 | - . addslashes(($_POST['tpl_file'])) |
|
190 | - . "',tpl_refid=0,tpl_module='" |
|
191 | - . addslashes($tpl['tpl_module']) |
|
192 | - . "',tpl_tplset='" |
|
193 | - . addslashes($tpl['tpl_tplset']) |
|
194 | - . "',tpl_lastmodified=UNIX_TIMESTAMP(),tpl_type='" |
|
195 | - . addslashes($tpl['tpl_type']) |
|
196 | - . "'"; |
|
187 | + . $db->prefix('tplfile') |
|
188 | + . " SET tpl_file='" |
|
189 | + . addslashes(($_POST['tpl_file'])) |
|
190 | + . "',tpl_refid=0,tpl_module='" |
|
191 | + . addslashes($tpl['tpl_module']) |
|
192 | + . "',tpl_tplset='" |
|
193 | + . addslashes($tpl['tpl_tplset']) |
|
194 | + . "',tpl_lastmodified=UNIX_TIMESTAMP(),tpl_type='" |
|
195 | + . addslashes($tpl['tpl_type']) |
|
196 | + . "'"; |
|
197 | 197 | |
198 | 198 | if (!$db->query($sql)) { |
199 | 199 | die('SQL Error' . __LINE__); |
@@ -100,14 +100,14 @@ discard block |
||
100 | 100 | // get tplfile and tplsource |
101 | 101 | |
102 | 102 | $result = $db->query("SELECT tpl_refid,tpl_module,'" |
103 | - . addslashes($tplset_to) |
|
104 | - . "',tpl_file,tpl_desc,tpl_lastmodified,tpl_lastimported,tpl_type,tpl_source FROM " |
|
105 | - . $db->prefix('tplfile') |
|
106 | - . ' NATURAL LEFT JOIN ' |
|
107 | - . $db->prefix('tplsource') |
|
108 | - . " WHERE tpl_tplset='" |
|
109 | - . addslashes($tplset_from) |
|
110 | - . "' AND ($whr_append)"); |
|
103 | + . addslashes($tplset_to) |
|
104 | + . "',tpl_file,tpl_desc,tpl_lastmodified,tpl_lastimported,tpl_type,tpl_source FROM " |
|
105 | + . $db->prefix('tplfile') |
|
106 | + . ' NATURAL LEFT JOIN ' |
|
107 | + . $db->prefix('tplsource') |
|
108 | + . " WHERE tpl_tplset='" |
|
109 | + . addslashes($tplset_from) |
|
110 | + . "' AND ($whr_append)"); |
|
111 | 111 | |
112 | 112 | while (false !== ($row = $db->fetchArray($result))) { |
113 | 113 | $tpl_source = array_pop($row); |
@@ -135,18 +135,18 @@ discard block |
||
135 | 135 | // UPDATE mode |
136 | 136 | |
137 | 137 | $db->query('UPDATE ' |
138 | - . $db->prefix('tplfile') |
|
139 | - . " SET tpl_refid='" |
|
140 | - . addslashes($row['tpl_refid']) |
|
141 | - . "',tpl_desc='" |
|
142 | - . addslashes($row['tpl_desc']) |
|
143 | - . "',tpl_lastmodified='" |
|
144 | - . addslashes($row['tpl_lastmodified']) |
|
145 | - . "',tpl_lastimported='" |
|
146 | - . addslashes($row['tpl_lastimported']) |
|
147 | - . "',tpl_type='" |
|
148 | - . addslashes($row['tpl_type']) |
|
149 | - . "' WHERE tpl_id='$tpl_id'"); |
|
138 | + . $db->prefix('tplfile') |
|
139 | + . " SET tpl_refid='" |
|
140 | + . addslashes($row['tpl_refid']) |
|
141 | + . "',tpl_desc='" |
|
142 | + . addslashes($row['tpl_desc']) |
|
143 | + . "',tpl_lastmodified='" |
|
144 | + . addslashes($row['tpl_lastmodified']) |
|
145 | + . "',tpl_lastimported='" |
|
146 | + . addslashes($row['tpl_lastimported']) |
|
147 | + . "',tpl_type='" |
|
148 | + . addslashes($row['tpl_type']) |
|
149 | + . "' WHERE tpl_id='$tpl_id'"); |
|
150 | 150 | |
151 | 151 | $db->query('UPDATE ' . $db->prefix('tplsource') . " SET tpl_source='" . addslashes($tpl_source) . "' WHERE tpl_id='$tpl_id'"); |
152 | 152 | |
@@ -181,22 +181,22 @@ discard block |
||
181 | 181 | // INSERT mode |
182 | 182 | |
183 | 183 | $sql = 'INSERT INTO ' |
184 | - . $db->prefix('tplfile') |
|
185 | - . " SET tpl_refid='" |
|
186 | - . addslashes($row['tpl_refid']) |
|
187 | - . "',tpl_desc='" |
|
188 | - . addslashes($row['tpl_desc']) |
|
189 | - . "',tpl_lastmodified='" |
|
190 | - . addslashes($lastmodified) |
|
191 | - . "',tpl_type='" |
|
192 | - . addslashes($row['tpl_type']) |
|
193 | - . "',tpl_tplset='" |
|
194 | - . addslashes($tplset_to) |
|
195 | - . "',tpl_file='" |
|
196 | - . addslashes($row['tpl_file']) |
|
197 | - . "',tpl_module='" |
|
198 | - . addslashes($row['tpl_module']) |
|
199 | - . "'"; |
|
184 | + . $db->prefix('tplfile') |
|
185 | + . " SET tpl_refid='" |
|
186 | + . addslashes($row['tpl_refid']) |
|
187 | + . "',tpl_desc='" |
|
188 | + . addslashes($row['tpl_desc']) |
|
189 | + . "',tpl_lastmodified='" |
|
190 | + . addslashes($lastmodified) |
|
191 | + . "',tpl_type='" |
|
192 | + . addslashes($row['tpl_type']) |
|
193 | + . "',tpl_tplset='" |
|
194 | + . addslashes($tplset_to) |
|
195 | + . "',tpl_file='" |
|
196 | + . addslashes($row['tpl_file']) |
|
197 | + . "',tpl_module='" |
|
198 | + . addslashes($row['tpl_module']) |
|
199 | + . "'"; |
|
200 | 200 | |
201 | 201 | $db->query($sql); |
202 | 202 |
@@ -321,18 +321,18 @@ |
||
321 | 321 | } |
322 | 322 | |
323 | 323 | $tpl->assign([ |
324 | - 'target_dirname' => $this->target_dirname, |
|
325 | - 'target_mname' => $this->target_mname, |
|
326 | - 'language' => $this->lang, |
|
327 | - 'cachetime_options' => $this->cachetime_options, |
|
328 | - 'ctype_options' => $this->ctype_options, |
|
329 | - 'block' => $block4assign, |
|
330 | - 'op' => $next_op, |
|
331 | - 'form_title' => $form_title, |
|
332 | - 'submit_button' => $button_value, |
|
333 | - 'common_fck_installed' => file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js'), |
|
334 | - 'gticket_hidden' => $GLOBALS['xoopsSecurity']->getTokenHTML('myblocksadmin'), |
|
335 | - ]); |
|
324 | + 'target_dirname' => $this->target_dirname, |
|
325 | + 'target_mname' => $this->target_mname, |
|
326 | + 'language' => $this->lang, |
|
327 | + 'cachetime_options' => $this->cachetime_options, |
|
328 | + 'ctype_options' => $this->ctype_options, |
|
329 | + 'block' => $block4assign, |
|
330 | + 'op' => $next_op, |
|
331 | + 'form_title' => $form_title, |
|
332 | + 'submit_button' => $button_value, |
|
333 | + 'common_fck_installed' => file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js'), |
|
334 | + 'gticket_hidden' => $GLOBALS['xoopsSecurity']->getTokenHTML('myblocksadmin'), |
|
335 | + ]); |
|
336 | 336 | |
337 | 337 | //HACK by domifara |
338 | 338 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
53 | 53 | $tpl = new D3Tpl(); |
54 | 54 | $tpl->assign([ |
55 | - 'adminmenu' => $adminmenu, |
|
56 | - 'mypage' => 'mytplsadmin', |
|
57 | - ]); |
|
55 | + 'adminmenu' => $adminmenu, |
|
56 | + 'mypage' => 'mytplsadmin', |
|
57 | + ]); |
|
58 | 58 | $tpl->display('db:altsys_inc_mymenusub.tpl'); |
@@ -59,7 +59,7 @@ |
||
59 | 59 | require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
60 | 60 | $tpl = new D3Tpl(); |
61 | 61 | $tpl->assign([ |
62 | - 'adminmenu' => $adminmenu, |
|
63 | - 'mypage' => 'myblocksadmin', |
|
64 | - ]); |
|
62 | + 'adminmenu' => $adminmenu, |
|
63 | + 'mypage' => 'myblocksadmin', |
|
64 | + ]); |
|
65 | 65 | $tpl->display('db:altsys_inc_mymenusub.tpl'); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
33 | 33 | $tpl = new D3Tpl(); |
34 | 34 | $tpl->assign([ |
35 | - 'adminmenu' => $adminmenu, |
|
36 | - 'mypage' => 'mylangadmin', |
|
37 | - ]); |
|
35 | + 'adminmenu' => $adminmenu, |
|
36 | + 'mypage' => 'mylangadmin', |
|
37 | + ]); |
|
38 | 38 | $tpl->display('db:altsys_inc_mymenusub.tpl'); |
@@ -339,24 +339,24 @@ |
||
339 | 339 | require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
340 | 340 | $tpl = new D3Tpl(); |
341 | 341 | $tpl->assign([ |
342 | - 'target_dirname' => $target_dirname, |
|
343 | - 'target_mname' => $target_mname, |
|
344 | - 'target_lang' => $target_lang, |
|
345 | - 'languages' => $languages, |
|
346 | - 'languages4disp' => $languages4disp, |
|
347 | - 'target_file' => $target_file, |
|
348 | - 'lang_files' => $lang_files, |
|
349 | - 'langfile_constants' => $langfile_constants, |
|
350 | - 'mylang_constants' => $mylang_constants, |
|
351 | - 'use_my_language' => mb_strlen($langman->my_language) > 0, |
|
352 | - 'mylang_file_name' => htmlspecialchars($mylang_unique_path, ENT_QUOTES | ENT_HTML5), |
|
353 | - 'cache_file_name' => htmlspecialchars($cache_file_name, ENT_QUOTES | ENT_HTML5), |
|
354 | - 'cache_file_mtime' => (int) $cache_file_mtime, |
|
355 | - 'timezone_offset' => xoops_getUserTimestamp(0), |
|
356 | - 'notice' => $notice4disp, |
|
357 | - 'already_read' => $already_read, |
|
358 | - 'gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'altsys'), |
|
359 | - ]); |
|
342 | + 'target_dirname' => $target_dirname, |
|
343 | + 'target_mname' => $target_mname, |
|
344 | + 'target_lang' => $target_lang, |
|
345 | + 'languages' => $languages, |
|
346 | + 'languages4disp' => $languages4disp, |
|
347 | + 'target_file' => $target_file, |
|
348 | + 'lang_files' => $lang_files, |
|
349 | + 'langfile_constants' => $langfile_constants, |
|
350 | + 'mylang_constants' => $mylang_constants, |
|
351 | + 'use_my_language' => mb_strlen($langman->my_language) > 0, |
|
352 | + 'mylang_file_name' => htmlspecialchars($mylang_unique_path, ENT_QUOTES | ENT_HTML5), |
|
353 | + 'cache_file_name' => htmlspecialchars($cache_file_name, ENT_QUOTES | ENT_HTML5), |
|
354 | + 'cache_file_mtime' => (int) $cache_file_mtime, |
|
355 | + 'timezone_offset' => xoops_getUserTimestamp(0), |
|
356 | + 'notice' => $notice4disp, |
|
357 | + 'already_read' => $already_read, |
|
358 | + 'gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'altsys'), |
|
359 | + ]); |
|
360 | 360 | $tpl->display('db:altsys_main_mylangadmin.tpl'); |
361 | 361 | |
362 | 362 | xoops_cp_footer(); |
@@ -444,18 +444,18 @@ discard block |
||
444 | 444 | } |
445 | 445 | |
446 | 446 | echo "<td class='{$evenodd}{$class}'>" |
447 | - . formatTimestamp($tpl['tpl_lastmodified'], 'm') |
|
448 | - . '<br>' |
|
449 | - . mb_substr($fingerprint, 0, 16) |
|
450 | - . "<br><input type='checkbox' name='{$tplset4disp}_check[{$tpl_file}]' value='1'> <a href='?mode=admin&lib=altsys&page=mytplsform&tpl_file=" |
|
451 | - . htmlspecialchars($tpl['tpl_file'], ENT_QUOTES | ENT_HTML5) |
|
452 | - . '&tpl_tplset=' |
|
453 | - . htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES | ENT_HTML5) |
|
454 | - . '&dirname=' |
|
455 | - . htmlspecialchars($target_dirname, ENT_QUOTES | ENT_HTML5) |
|
456 | - . "'>" |
|
457 | - . _EDIT |
|
458 | - . "</a> ($numrows)</td>\n"; |
|
447 | + . formatTimestamp($tpl['tpl_lastmodified'], 'm') |
|
448 | + . '<br>' |
|
449 | + . mb_substr($fingerprint, 0, 16) |
|
450 | + . "<br><input type='checkbox' name='{$tplset4disp}_check[{$tpl_file}]' value='1'> <a href='?mode=admin&lib=altsys&page=mytplsform&tpl_file=" |
|
451 | + . htmlspecialchars($tpl['tpl_file'], ENT_QUOTES | ENT_HTML5) |
|
452 | + . '&tpl_tplset=' |
|
453 | + . htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES | ENT_HTML5) |
|
454 | + . '&dirname=' |
|
455 | + . htmlspecialchars($target_dirname, ENT_QUOTES | ENT_HTML5) |
|
456 | + . "'>" |
|
457 | + . _EDIT |
|
458 | + . "</a> ($numrows)</td>\n"; |
|
459 | 459 | } |
460 | 460 | } |
461 | 461 | |
@@ -490,10 +490,10 @@ discard block |
||
490 | 490 | |
491 | 491 | echo "\t\t<td class='head'> |
492 | 492 | " . ('default' == $tplset && '_custom' != $target_dirname ? '' : "<input name='del_do[{$tplset4disp}]' type='submit' value='" |
493 | - . _DELETE |
|
494 | - . "' onclick='return altsys_mytpladmin_check_copy_submit(\"" |
|
495 | - . _MYTPLSADMIN_CNF_DELETE_SELECTED_TEMPLATES |
|
496 | - . "\", \"{$tplset4disp}_\", false);'><br><br>") . ' |
|
493 | + . _DELETE |
|
494 | + . "' onclick='return altsys_mytpladmin_check_copy_submit(\"" |
|
495 | + . _MYTPLSADMIN_CNF_DELETE_SELECTED_TEMPLATES |
|
496 | + . "\", \"{$tplset4disp}_\", false);'><br><br>") . ' |
|
497 | 497 | ' . _MYTPLSADMIN_CAPTION_COPYTO . ": |
498 | 498 | <select name='copy_to[{$tplset4disp}]'> |
499 | 499 | " . str_replace('<option value=\'' . $tplset4disp . '\'>' . $tplset4disp . '</option>', '', $tplset_options) . " |
@@ -162,7 +162,7 @@ |
||
162 | 162 | { |
163 | 163 | if (is_array(@$GLOBALS['ret'])) { |
164 | 164 | foreach ($GLOBALS['ret'] as $message) { |
165 | - $log->add( strip_tags( (string) $message ) ); |
|
165 | + $log->add( strip_tags( (string) $message ) ); |
|
166 | 166 | } |
167 | 167 | } |
168 | 168 |