@@ -15,7 +15,7 @@ |
||
15 | 15 | define('_MYLANGADMIN_H3_MODULE', 'Módulo alvo'); |
16 | 16 | define('_MYLANGADMIN_MSG_D3LANGMANENABLED', 'O sistema de substituição está habilitado agora.'); |
17 | 17 | define('_MYLANGADMIN_MSG_HOWTOENABLED3LANGMAN4X2', |
18 | - 'O sistema de substituição não está funcionando com o núcleo desta versão do XOOPS Cube, exceto alguns módulos D3. Se você deseja habilitá-lo neste core, tente um hack como este:'); |
|
18 | + 'O sistema de substituição não está funcionando com o núcleo desta versão do XOOPS Cube, exceto alguns módulos D3. Se você deseja habilitá-lo neste core, tente um hack como este:'); |
|
19 | 19 | define('_MYLANGADMIN_MSG_NOTICE4ALREADYREAD', 'Desde que este arquivo já tenha sido lido pelo sistema, esta coluna significa o valor corrente'); |
20 | 20 | define('_MYLANGADMIN_NOTCREATED', 'Ainda não foi criado'); |
21 | 21 | define('_MYLANGADMIN_NOTE_ADDEDBYMYLANG', '(uma constante criada pelo utilizador)'); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | $adminmenu4altsys = [ |
44 | 44 | [ |
45 | - 'title' => 'ALTSYS ' . _PREFERENCES, |
|
45 | + 'title' => 'ALTSYS '._PREFERENCES, |
|
46 | 46 | 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mypreferences', |
47 | 47 | ], |
48 | 48 | ]; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -eval(' function xoops_module_uninstall_' . $mydirname . '( $module ) { return altsys_onuninstall_base( $module , "' . $mydirname . '" ) ; } '); |
|
3 | +eval(' function xoops_module_uninstall_'.$mydirname.'( $module ) { return altsys_onuninstall_base( $module , "'.$mydirname.'" ) ; } '); |
|
4 | 4 | |
5 | 5 | if (!function_exists('altsys_onuninstall_base')) { |
6 | 6 | /** |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | if (defined('XOOPS_CUBE_LEGACY')) { |
21 | 21 | $root = XCube_Root::getSingleton(); |
22 | 22 | |
23 | - $root->mDelegateManager->add('Legacy.Admin.Event.ModuleUninstall.' . ucfirst($mydirname) . '.Success', 'altsys_message_append_onuninstall'); |
|
23 | + $root->mDelegateManager->add('Legacy.Admin.Event.ModuleUninstall.'.ucfirst($mydirname).'.Success', 'altsys_message_append_onuninstall'); |
|
24 | 24 | |
25 | 25 | $ret = []; |
26 | 26 | } else { |
@@ -35,23 +35,23 @@ discard block |
||
35 | 35 | |
36 | 36 | // TABLES (loading mysql.sql) |
37 | 37 | |
38 | - $sql_file_path = __DIR__ . '/sql/mysql.sql'; |
|
38 | + $sql_file_path = __DIR__.'/sql/mysql.sql'; |
|
39 | 39 | |
40 | - $prefix_mod = $db->prefix() . '_' . $mydirname; |
|
40 | + $prefix_mod = $db->prefix().'_'.$mydirname; |
|
41 | 41 | |
42 | 42 | if (is_file($sql_file_path)) { |
43 | - $ret[] = 'SQL file found at <b>' . htmlspecialchars($sql_file_path, ENT_QUOTES | ENT_HTML5) . '</b>.<br /> Deleting tables...<br />'; |
|
43 | + $ret[] = 'SQL file found at <b>'.htmlspecialchars($sql_file_path, ENT_QUOTES | ENT_HTML5).'</b>.<br /> Deleting tables...<br />'; |
|
44 | 44 | |
45 | 45 | $sql_lines = file($sql_file_path); |
46 | 46 | |
47 | 47 | foreach ($sql_lines as $sql_line) { |
48 | 48 | if (preg_match('/^CREATE TABLE \`?([a-zA-Z0-9_-]+)\`? /i', $sql_line, $regs)) { |
49 | - $sql = 'DROP TABLE ' . addslashes($prefix_mod . '_' . $regs[1]); |
|
49 | + $sql = 'DROP TABLE '.addslashes($prefix_mod.'_'.$regs[1]); |
|
50 | 50 | |
51 | 51 | if (!$db->query($sql)) { |
52 | - $ret[] = '<span style="color:#ff0000;">ERROR: Could not drop table <b>' . htmlspecialchars($prefix_mod . '_' . $regs[1], ENT_QUOTES | ENT_HTML5) . '<b>.</span><br />'; |
|
52 | + $ret[] = '<span style="color:#ff0000;">ERROR: Could not drop table <b>'.htmlspecialchars($prefix_mod.'_'.$regs[1], ENT_QUOTES | ENT_HTML5).'<b>.</span><br />'; |
|
53 | 53 | } else { |
54 | - $ret[] = 'Table <b>' . htmlspecialchars($prefix_mod . '_' . $regs[1], ENT_QUOTES | ENT_HTML5) . '</b> dropped.<br />'; |
|
54 | + $ret[] = 'Table <b>'.htmlspecialchars($prefix_mod.'_'.$regs[1], ENT_QUOTES | ENT_HTML5).'</b> dropped.<br />'; |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | } |
@@ -435,18 +435,18 @@ discard block |
||
435 | 435 | } |
436 | 436 | |
437 | 437 | echo "<td class='{$evenodd}{$class}'>" |
438 | - . formatTimestamp($tpl['tpl_lastmodified'], 'm') |
|
439 | - . '<br />' |
|
440 | - . mb_substr($fingerprint, 0, 16) |
|
441 | - . "<br /><input type='checkbox' name='{$tplset4disp}_check[{$tpl_file}]' value='1' /> <a href='?mode=admin&lib=altsys&page=mytplsform&tpl_file=" |
|
442 | - . htmlspecialchars($tpl['tpl_file'], ENT_QUOTES) |
|
443 | - . '&tpl_tplset=' |
|
444 | - . htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES) |
|
445 | - . '&dirname=' |
|
446 | - . htmlspecialchars($target_dirname, ENT_QUOTES) |
|
447 | - . "'>" |
|
448 | - . _EDIT |
|
449 | - . "</a> ($numrows)</td>\n"; |
|
438 | + . formatTimestamp($tpl['tpl_lastmodified'], 'm') |
|
439 | + . '<br />' |
|
440 | + . mb_substr($fingerprint, 0, 16) |
|
441 | + . "<br /><input type='checkbox' name='{$tplset4disp}_check[{$tpl_file}]' value='1' /> <a href='?mode=admin&lib=altsys&page=mytplsform&tpl_file=" |
|
442 | + . htmlspecialchars($tpl['tpl_file'], ENT_QUOTES) |
|
443 | + . '&tpl_tplset=' |
|
444 | + . htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES) |
|
445 | + . '&dirname=' |
|
446 | + . htmlspecialchars($target_dirname, ENT_QUOTES) |
|
447 | + . "'>" |
|
448 | + . _EDIT |
|
449 | + . "</a> ($numrows)</td>\n"; |
|
450 | 450 | } |
451 | 451 | } |
452 | 452 | |
@@ -481,10 +481,10 @@ discard block |
||
481 | 481 | |
482 | 482 | echo "\t\t<td class='head'> |
483 | 483 | " . ('default' == $tplset && '_custom' != $target_dirname ? '' : "<input name='del_do[{$tplset4disp}]' type='submit' value='" |
484 | - . _DELETE |
|
485 | - . "' onclick='return altsys_mytpladmin_check_copy_submit(\"" |
|
486 | - . _MYTPLSADMIN_CNF_DELETE_SELECTED_TEMPLATES |
|
487 | - . "\", \"{$tplset4disp}_\", false);' /><br /><br />") . ' |
|
484 | + . _DELETE |
|
485 | + . "' onclick='return altsys_mytpladmin_check_copy_submit(\"" |
|
486 | + . _MYTPLSADMIN_CNF_DELETE_SELECTED_TEMPLATES |
|
487 | + . "\", \"{$tplset4disp}_\", false);' /><br /><br />") . ' |
|
488 | 488 | ' . _MYTPLSADMIN_CAPTION_COPYTO . ": |
489 | 489 | <select name='copy_to[{$tplset4disp}]'> |
490 | 490 | " . str_replace('<option value=\'' . $tplset4disp . '\'>' . $tplset4disp . '</option>', '', $tplset_options) . " |
@@ -5,10 +5,10 @@ discard block |
||
5 | 5 | // GIJOE <http://www.peak.ne.jp/> // |
6 | 6 | // ------------------------------------------------------------------------- // |
7 | 7 | |
8 | -require_once __DIR__ . '/class/AltsysBreadcrumbs.class.php'; |
|
9 | -include_once __DIR__ . '/include/gtickets.php'; |
|
10 | -include_once __DIR__ . '/include/altsys_functions.php'; |
|
11 | -include_once __DIR__ . '/include/tpls_functions.php'; |
|
8 | +require_once __DIR__.'/class/AltsysBreadcrumbs.class.php'; |
|
9 | +include_once __DIR__.'/include/gtickets.php'; |
|
10 | +include_once __DIR__.'/include/altsys_functions.php'; |
|
11 | +include_once __DIR__.'/include/tpls_functions.php'; |
|
12 | 12 | |
13 | 13 | // only groups have 'module_admin' of 'altsys' can do that. |
14 | 14 | $module_handler = xoops_getHandler('module'); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | // check $xoopsModule |
32 | 32 | if (!is_object($xoopsModule)) { |
33 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
33 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | // set target_module if specified by $_GET['dirname'] |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | $target_dirname4sql = addslashes($target_dirname); |
52 | 52 | |
53 | - $target_mname = $target_module->getVar('name') . ' ' . sprintf('(%2.2f)', $target_module->getVar('version') / 100.0); |
|
53 | + $target_mname = $target_module->getVar('name').' '.sprintf('(%2.2f)', $target_module->getVar('version') / 100.0); |
|
54 | 54 | |
55 | 55 | //$query4redirect = '?dirname='.urlencode(strip_tags($_GET['dirname'])) ; |
56 | 56 | } elseif ('_custom' == @$_GET['dirname']) { |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | // Ticket Check |
89 | 89 | |
90 | 90 | if (!$xoopsGTicket->check()) { |
91 | - redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors()); |
|
91 | + redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors()); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | $tplset_from = ($_POST['clone_tplset_from']); |
@@ -105,13 +105,13 @@ discard block |
||
105 | 105 | tplsadmin_die(_MYTPLSADMIN_ERR_INVALIDSETNAME, $target_dirname); |
106 | 106 | } |
107 | 107 | |
108 | - list($is_exist) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($tplset_to) . "'")); |
|
108 | + list($is_exist) = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('tplfile')." WHERE tpl_tplset='".addslashes($tplset_to)."'")); |
|
109 | 109 | |
110 | 110 | if ($is_exist) { |
111 | 111 | tplsadmin_die(_MYTPLSADMIN_ERR_DUPLICATEDSETNAME, $target_dirname); |
112 | 112 | } |
113 | 113 | |
114 | - list($is_exist) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('tplset') . " WHERE tplset_name='" . addslashes($tplset_to) . "'")); |
|
114 | + list($is_exist) = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('tplset')." WHERE tplset_name='".addslashes($tplset_to)."'")); |
|
115 | 115 | |
116 | 116 | if ($is_exist) { |
117 | 117 | tplsadmin_die(_MYTPLSADMIN_ERR_DUPLICATEDSETNAME, $target_dirname); |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | |
120 | 120 | // insert tplset table |
121 | 121 | |
122 | - $db->query('INSERT INTO ' . $db->prefix('tplset') . " SET tplset_name='" . addslashes($tplset_to) . "', tplset_desc='Created by tplsadmin', tplset_created=UNIX_TIMESTAMP()"); |
|
122 | + $db->query('INSERT INTO '.$db->prefix('tplset')." SET tplset_name='".addslashes($tplset_to)."', tplset_desc='Created by tplsadmin', tplset_created=UNIX_TIMESTAMP()"); |
|
123 | 123 | |
124 | 124 | tplsadmin_copy_templates_db2db($tplset_from, $tplset_to, "tpl_module='$target_dirname4sql'"); |
125 | 125 | |
126 | - redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $target_dirname, 1, _MYTPLSADMIN_DBUPDATED); |
|
126 | + redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$target_dirname, 1, _MYTPLSADMIN_DBUPDATED); |
|
127 | 127 | |
128 | 128 | exit; |
129 | 129 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | // Ticket Check |
136 | 136 | |
137 | 137 | if (!$xoopsGTicket->check()) { |
138 | - redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors()); |
|
138 | + redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors()); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | $tplset_from = ($tplset_from_tmp); |
@@ -157,10 +157,10 @@ discard block |
||
157 | 157 | |
158 | 158 | $tplfile = ($tplfile_tmp); |
159 | 159 | |
160 | - tplsadmin_copy_templates_db2db($tplset_from, $tplset_to, "tpl_file='" . addslashes($tplfile) . "'"); |
|
160 | + tplsadmin_copy_templates_db2db($tplset_from, $tplset_to, "tpl_file='".addslashes($tplfile)."'"); |
|
161 | 161 | } |
162 | 162 | |
163 | - redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $target_dirname, 1, _MYTPLSADMIN_DBUPDATED); |
|
163 | + redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$target_dirname, 1, _MYTPLSADMIN_DBUPDATED); |
|
164 | 164 | |
165 | 165 | exit; |
166 | 166 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | // Ticket Check |
173 | 173 | |
174 | 174 | if (!$xoopsGTicket->check()) { |
175 | - redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors()); |
|
175 | + redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors()); |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | if (empty($_POST['copyf2db_to'])) { |
@@ -192,10 +192,10 @@ discard block |
||
192 | 192 | |
193 | 193 | $tplfile = ($tplfile_tmp); |
194 | 194 | |
195 | - tplsadmin_copy_templates_f2db($tplset_to, "tpl_file='" . addslashes($tplfile) . "'"); |
|
195 | + tplsadmin_copy_templates_f2db($tplset_to, "tpl_file='".addslashes($tplfile)."'"); |
|
196 | 196 | } |
197 | 197 | |
198 | - redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $target_dirname, 1, _MYTPLSADMIN_DBUPDATED); |
|
198 | + redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$target_dirname, 1, _MYTPLSADMIN_DBUPDATED); |
|
199 | 199 | |
200 | 200 | exit; |
201 | 201 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | // Ticket Check |
208 | 208 | |
209 | 209 | if (!$xoopsGTicket->check()) { |
210 | - redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors()); |
|
210 | + redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors()); |
|
211 | 211 | } |
212 | 212 | |
213 | 213 | $tplset_from = ($tplset_from_tmp); |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | tplsadmin_die(_MYTPLSADMIN_ERR_NOTPLFILE, $target_dirname); |
221 | 221 | } |
222 | 222 | |
223 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
223 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
224 | 224 | |
225 | 225 | $tpl = new XoopsTpl(); |
226 | 226 | |
@@ -233,24 +233,24 @@ discard block |
||
233 | 233 | |
234 | 234 | $tplfile = ($tplfile_tmp); |
235 | 235 | |
236 | - $result = $db->query('SELECT tpl_id FROM ' . $db->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($tplset_from) . "' AND tpl_file='" . addslashes($tplfile) . "'"); |
|
236 | + $result = $db->query('SELECT tpl_id FROM '.$db->prefix('tplfile')." WHERE tpl_tplset='".addslashes($tplset_from)."' AND tpl_file='".addslashes($tplfile)."'"); |
|
237 | 237 | |
238 | 238 | while (list($tpl_id) = $db->fetchRow($result)) { |
239 | 239 | $tpl_id = (int)$tpl_id; |
240 | 240 | |
241 | - $db->query('DELETE FROM ' . $db->prefix('tplfile') . " WHERE tpl_id=$tpl_id"); |
|
241 | + $db->query('DELETE FROM '.$db->prefix('tplfile')." WHERE tpl_id=$tpl_id"); |
|
242 | 242 | |
243 | - $db->query('DELETE FROM ' . $db->prefix('tplsource') . " WHERE tpl_id=$tpl_id"); |
|
243 | + $db->query('DELETE FROM '.$db->prefix('tplsource')." WHERE tpl_id=$tpl_id"); |
|
244 | 244 | } |
245 | 245 | |
246 | 246 | // remove templates_c |
247 | 247 | |
248 | - $tpl->clear_cache('db:' . $tplfile); |
|
248 | + $tpl->clear_cache('db:'.$tplfile); |
|
249 | 249 | |
250 | - $tpl->clear_compiled_tpl('db:' . $tplfile); |
|
250 | + $tpl->clear_compiled_tpl('db:'.$tplfile); |
|
251 | 251 | } |
252 | 252 | |
253 | - redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $target_dirname, 1, _MYTPLSADMIN_DBUPDATED); |
|
253 | + redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$target_dirname, 1, _MYTPLSADMIN_DBUPDATED); |
|
254 | 254 | |
255 | 255 | exit; |
256 | 256 | } |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | // get tplsets |
294 | 294 | $tplset_handler = xoops_getHandler('tplset'); |
295 | 295 | $tplsets = array_keys($tplset_handler->getList()); |
296 | -$sql = 'SELECT DISTINCT tpl_tplset FROM ' . $db->prefix('tplfile') . " ORDER BY tpl_tplset='default' DESC,tpl_tplset"; |
|
296 | +$sql = 'SELECT DISTINCT tpl_tplset FROM '.$db->prefix('tplfile')." ORDER BY tpl_tplset='default' DESC,tpl_tplset"; |
|
297 | 297 | $srs = $db->query($sql); |
298 | 298 | while (list($tplset) = $db->fetchRow($srs)) { |
299 | 299 | if (!in_array($tplset, $tplsets, true)) { |
@@ -322,13 +322,13 @@ discard block |
||
322 | 322 | } |
323 | 323 | |
324 | 324 | // get tpl_file owned by the module |
325 | -$sql = 'SELECT tpl_file,tpl_desc,tpl_type,COUNT(tpl_id) FROM ' . $db->prefix('tplfile') . " WHERE tpl_module='$target_dirname4sql' GROUP BY tpl_file ORDER BY tpl_type, tpl_file"; |
|
325 | +$sql = 'SELECT tpl_file,tpl_desc,tpl_type,COUNT(tpl_id) FROM '.$db->prefix('tplfile')." WHERE tpl_module='$target_dirname4sql' GROUP BY tpl_file ORDER BY tpl_type, tpl_file"; |
|
326 | 326 | $frs = $db->query($sql); |
327 | 327 | |
328 | 328 | xoops_cp_header(); |
329 | 329 | |
330 | 330 | // css display |
331 | -require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
|
331 | +require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
332 | 332 | $tpl = new D3Tpl(); |
333 | 333 | echo '<style scoped="scoped">'; |
334 | 334 | $tpl->display('db:altsys_inc_mytplsadmin.css'); |
@@ -343,27 +343,27 @@ discard block |
||
343 | 343 | // breadcrumbs |
344 | 344 | $breadcrumbsObj = AltsysBreadcrumbs::getInstance(); |
345 | 345 | if ($breadcrumbsObj->hasPaths()) { |
346 | - $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=mytplsadmin', _MI_ALTSYS_MENU_MYTPLSADMIN); |
|
346 | + $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=mytplsadmin', _MI_ALTSYS_MENU_MYTPLSADMIN); |
|
347 | 347 | |
348 | 348 | $breadcrumbsObj->appendPath('', $target_mname); |
349 | 349 | } |
350 | 350 | |
351 | -echo "<h3 style='text-align:" . _GLOBAL_LEFT . ";'>" . _MYTPLSADMIN_H3_MODULE . " : $target_mname</h3>\n"; |
|
351 | +echo "<h3 style='text-align:"._GLOBAL_LEFT.";'>"._MYTPLSADMIN_H3_MODULE." : $target_mname</h3>\n"; |
|
352 | 352 | |
353 | 353 | // link to create a new custom template |
354 | 354 | if ('_custom' == $target_dirname) { |
355 | - echo "<a href='index.php?mode=admin&lib=altsys&page=mytplsform&tpl_tplset=default'>" . _MYTPLSADMIN_CREATENEWCUSTOMTEMPLATE . "</a>\n"; |
|
355 | + echo "<a href='index.php?mode=admin&lib=altsys&page=mytplsform&tpl_tplset=default'>"._MYTPLSADMIN_CREATENEWCUSTOMTEMPLATE."</a>\n"; |
|
356 | 356 | } |
357 | 357 | |
358 | 358 | // beggining of table & form |
359 | 359 | echo " |
360 | - <form name='MainForm' action='?mode=admin&lib=altsys&page=mytplsadmin&dirname=" . htmlspecialchars($target_dirname, ENT_QUOTES) . "' method='post'> |
|
361 | - " . $xoopsGTicket->getTicketHtml(__LINE__) . " |
|
360 | + <form name='MainForm' action='?mode=admin&lib=altsys&page=mytplsadmin&dirname=" . htmlspecialchars($target_dirname, ENT_QUOTES)."' method='post'> |
|
361 | + " . $xoopsGTicket->getTicketHtml(__LINE__)." |
|
362 | 362 | <table class='outer altsys_mytplsadmin'> |
363 | 363 | <tr> |
364 | - <th>" . _MYTPLSADMIN_TH_NAME . '</th> |
|
365 | - <th>' . _MYTPLSADMIN_TH_TYPE . "</th> |
|
366 | - <th><input type='checkbox' title=" . _MYTPLSADMIN_TITLE_CHECKALL . " onclick=\"with(document.MainForm){for(i=0;i<length;i++){if(elements[i].type==='checkbox'&&elements[i].name.indexOf('basecheck')>=0){elements[i].checked=this.checked;}}}\" />" . _MYTPLSADMIN_TH_FILE . "</th> |
|
364 | + <th>" . _MYTPLSADMIN_TH_NAME.'</th> |
|
365 | + <th>' . _MYTPLSADMIN_TH_TYPE."</th> |
|
366 | + <th><input type='checkbox' title=" . _MYTPLSADMIN_TITLE_CHECKALL." onclick=\"with(document.MainForm){for(i=0;i<length;i++){if(elements[i].type==='checkbox'&&elements[i].name.indexOf('basecheck')>=0){elements[i].checked=this.checked;}}}\" />"._MYTPLSADMIN_TH_FILE."</th> |
|
367 | 367 | $tplsets_th4disp |
368 | 368 | </tr>\n"; |
369 | 369 | |
@@ -382,11 +382,11 @@ discard block |
||
382 | 382 | <tr> |
383 | 383 | <td class='$evenodd'> |
384 | 384 | <dl> |
385 | - <dt>" . htmlspecialchars($tpl_file, ENT_QUOTES) . '</dt> |
|
386 | - <dd>' . htmlspecialchars($tpl_desc, ENT_QUOTES) . "</dd> |
|
385 | + <dt>".htmlspecialchars($tpl_file, ENT_QUOTES).'</dt> |
|
386 | + <dd>' . htmlspecialchars($tpl_desc, ENT_QUOTES)."</dd> |
|
387 | 387 | </dl> |
388 | 388 | </td> |
389 | - <td class='$evenodd'>" . $type . '<br />(' . $count . ")</td>\n"; |
|
389 | + <td class='$evenodd'>".$type.'<br />('.$count.")</td>\n"; |
|
390 | 390 | |
391 | 391 | // the base file template column |
392 | 392 | |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | |
398 | 398 | $fingerprints[$fingerprint] = ''; |
399 | 399 | |
400 | - echo "<td class='$evenodd'>" . formatTimestamp(filemtime($basefilepath), 'm') . '<br />' . mb_substr($fingerprint, 0, 16) . "<br /><input type='checkbox' name='basecheck[$tpl_file]' value='1' /></td>\n"; |
|
400 | + echo "<td class='$evenodd'>".formatTimestamp(filemtime($basefilepath), 'm').'<br />'.mb_substr($fingerprint, 0, 16)."<br /><input type='checkbox' name='basecheck[$tpl_file]' value='1' /></td>\n"; |
|
401 | 401 | |
402 | 402 | $fingerprint_class_count = 0; |
403 | 403 | } else { |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | |
414 | 414 | // query for templates in db |
415 | 415 | |
416 | - $drs = $db->query('SELECT * FROM ' . $db->prefix('tplfile') . ' f NATURAL LEFT JOIN ' . $db->prefix('tplsource') . " s WHERE tpl_file='" . addslashes($tpl_file) . "' AND tpl_tplset='" . addslashes($tplset) . "'"); |
|
416 | + $drs = $db->query('SELECT * FROM '.$db->prefix('tplfile').' f NATURAL LEFT JOIN '.$db->prefix('tplsource')." s WHERE tpl_file='".addslashes($tpl_file)."' AND tpl_tplset='".addslashes($tplset)."'"); |
|
417 | 417 | |
418 | 418 | $numrows = $db->getRowsNum($drs); |
419 | 419 | |
@@ -457,23 +457,23 @@ discard block |
||
457 | 457 | echo " |
458 | 458 | <tr> |
459 | 459 | <td class='head'> |
460 | - " . _MYTPLSADMIN_CREATE_NEW_TPLSET . ': <br /> |
|
461 | - ' . _MYTPLSADMIN_CAPTION_BASE . ": |
|
460 | + " . _MYTPLSADMIN_CREATE_NEW_TPLSET.': <br /> |
|
461 | + ' . _MYTPLSADMIN_CAPTION_BASE.": |
|
462 | 462 | <select name='clone_tplset_from'> |
463 | 463 | $tplset_options |
464 | - <option value='_blank_'>" . _MYTPLSADMIN_OPT_BLANKSET . '</option> |
|
464 | + <option value='_blank_'>"._MYTPLSADMIN_OPT_BLANKSET.'</option> |
|
465 | 465 | </select> |
466 | 466 | <br /> |
467 | - ' . _MYTPLSADMIN_CAPTION_SETNAME . ": <input type='text' name='clone_tplset_to' size='8' maxlength='16' /> <input type='submit' name='clone_tplset_do' value='" . _MYTPLSADMIN_BTN_NEWTPLSET . "' /> |
|
467 | + ' . _MYTPLSADMIN_CAPTION_SETNAME.": <input type='text' name='clone_tplset_to' size='8' maxlength='16' /> <input type='submit' name='clone_tplset_do' value='"._MYTPLSADMIN_BTN_NEWTPLSET."' /> |
|
468 | 468 | </td> |
469 | 469 | <td class='head'></td> |
470 | 470 | <td class='head'> |
471 | - " . _MYTPLSADMIN_CAPTION_COPYTO . ": |
|
471 | + " . _MYTPLSADMIN_CAPTION_COPYTO.": |
|
472 | 472 | <select name='copyf2db_to'> |
473 | 473 | $tplset_options |
474 | 474 | </select> |
475 | 475 | <br /> |
476 | - <input name='copyf2db_do' type='submit' value='" . _MYTPLSADMIN_BTN_COPY . "' onclick='return altsys_mytpladmin_check_copy_submit(\"" . _MYTPLSADMIN_CNF_COPY_SELECTED_TEMPLATES . "\", \"base\", true);' /> |
|
476 | + <input name='copyf2db_do' type='submit' value='"._MYTPLSADMIN_BTN_COPY."' onclick='return altsys_mytpladmin_check_copy_submit(\""._MYTPLSADMIN_CNF_COPY_SELECTED_TEMPLATES."\", \"base\", true);' /> |
|
477 | 477 | </td>\n"; |
478 | 478 | |
479 | 479 | foreach ($tplsets as $tplset) { |
@@ -484,12 +484,12 @@ discard block |
||
484 | 484 | . _DELETE |
485 | 485 | . "' onclick='return altsys_mytpladmin_check_copy_submit(\"" |
486 | 486 | . _MYTPLSADMIN_CNF_DELETE_SELECTED_TEMPLATES |
487 | - . "\", \"{$tplset4disp}_\", false);' /><br /><br />") . ' |
|
488 | - ' . _MYTPLSADMIN_CAPTION_COPYTO . ": |
|
487 | + . "\", \"{$tplset4disp}_\", false);' /><br /><br />").' |
|
488 | + ' . _MYTPLSADMIN_CAPTION_COPYTO.": |
|
489 | 489 | <select name='copy_to[{$tplset4disp}]'> |
490 | - " . str_replace('<option value=\'' . $tplset4disp . '\'>' . $tplset4disp . '</option>', '', $tplset_options) . " |
|
490 | + ".str_replace('<option value=\''.$tplset4disp.'\'>'.$tplset4disp.'</option>', '', $tplset_options)." |
|
491 | 491 | </select> |
492 | - <input name='copy_do[{$tplset4disp}]' type='submit' value='" . _MYTPLSADMIN_BTN_COPY . "' onclick='return altsys_mytpladmin_check_copy_submit(\"" . _MYTPLSADMIN_CNF_COPY_SELECTED_TEMPLATES . "\", \"{$tplset4disp}_\", true);' /> |
|
492 | + <input name='copy_do[{$tplset4disp}]' type='submit' value='"._MYTPLSADMIN_BTN_COPY."' onclick='return altsys_mytpladmin_check_copy_submit(\""._MYTPLSADMIN_CNF_COPY_SELECTED_TEMPLATES."\", \"{$tplset4disp}_\", true);' /> |
|
493 | 493 | </td>\n"; |
494 | 494 | } |
495 | 495 |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | // $Id: MyBlocksAdminForXCL21.class.php ,ver 0.0.7.1 2011/01/27 16:10:00 domifara Exp $ |
3 | 3 | |
4 | -require_once __DIR__ . '/MyBlocksAdmin.class.php'; |
|
4 | +require_once __DIR__.'/MyBlocksAdmin.class.php'; |
|
5 | 5 | |
6 | 6 | /** |
7 | 7 | * Class MyBlocksAdminForXCL21 |
@@ -73,6 +73,6 @@ discard block |
||
73 | 73 | |
74 | 74 | public function checkFck() |
75 | 75 | { |
76 | - return (!altsysUtils::isInstalledXclHtmleditor() && file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js')); |
|
76 | + return (!altsysUtils::isInstalledXclHtmleditor() && file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js')); |
|
77 | 77 | } |
78 | 78 | } |
@@ -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 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__ . '/MyBlocksAdmin.class.php'; |
|
3 | +require_once __DIR__.'/MyBlocksAdmin.class.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Class MyBlocksAdminForX25 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | { |
16 | 16 | parent::construct(); |
17 | 17 | |
18 | - @include_once XOOPS_ROOT_PATH . '/modules/system/language/' . $this->lang . '/admin/blocksadmin.php'; |
|
18 | + @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php'; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | //HACK by domifara for php5.3+ |
@@ -114,59 +114,59 @@ discard block |
||
114 | 114 | <tr> |
115 | 115 | <td rowspan='2'> |
116 | 116 | <div class='blockposition $scol0'> |
117 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_SIDEBLOCK_LEFT . "' class='blockposition' $ssel0 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_SIDEBLOCK_LEFT . ";' /> |
|
117 | + <input type='radio' name='sides[$bid]' value='".XOOPS_SIDEBLOCK_LEFT."' class='blockposition' $ssel0 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_SIDEBLOCK_LEFT.";' /> |
|
118 | 118 | </div> |
119 | - <div style='float:" . _GLOBAL_LEFT . ";'>-</div> |
|
119 | + <div style='float:" . _GLOBAL_LEFT.";'>-</div> |
|
120 | 120 | </td> |
121 | 121 | <td> |
122 | 122 | <div class='blockposition $scol3'> |
123 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_LEFT . "' class='blockposition' $ssel3 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_LEFT . ";' /> |
|
123 | + <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_LEFT."' class='blockposition' $ssel3 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_LEFT.";' /> |
|
124 | 124 | </div> |
125 | 125 | </td> |
126 | 126 | <td> |
127 | 127 | <div class='blockposition $scol5'> |
128 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_CENTER . "' class='blockposition' $ssel5 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_CENTER . ";' /> |
|
128 | + <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_CENTER."' class='blockposition' $ssel5 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_CENTER.";' /> |
|
129 | 129 | </div> |
130 | 130 | </td> |
131 | 131 | <td> |
132 | 132 | <div class='blockposition $scol4'> |
133 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_RIGHT . "' class='blockposition' $ssel4 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_RIGHT . ";' /> |
|
133 | + <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_RIGHT."' class='blockposition' $ssel4 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_RIGHT.";' /> |
|
134 | 134 | </div> |
135 | 135 | </td> |
136 | 136 | <td rowspan='2'> |
137 | - <div style='float:" . _GLOBAL_LEFT . ";'>-</div> |
|
137 | + <div style='float:" . _GLOBAL_LEFT.";'>-</div> |
|
138 | 138 | <div class='blockposition $scol1'> |
139 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_SIDEBLOCK_RIGHT . "' class='blockposition' $ssel1 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_SIDEBLOCK_RIGHT . ";' /> |
|
139 | + <input type='radio' name='sides[$bid]' value='".XOOPS_SIDEBLOCK_RIGHT."' class='blockposition' $ssel1 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_SIDEBLOCK_RIGHT.";' /> |
|
140 | 140 | </div> |
141 | 141 | </td> |
142 | 142 | </tr> |
143 | 143 | <tr> |
144 | 144 | <td> |
145 | 145 | <div class='blockposition $scol7'> |
146 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_BOTTOMLEFT . "' class='blockposition' $ssel7 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_BOTTOMLEFT . ";' /> |
|
146 | + <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOMLEFT."' class='blockposition' $ssel7 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_BOTTOMLEFT.";' /> |
|
147 | 147 | </div> |
148 | 148 | </td> |
149 | 149 | <td> |
150 | 150 | <div class='blockposition $scol9'> |
151 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_BOTTOM . "' class='blockposition' $ssel9 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_BOTTOM . ";' /> |
|
151 | + <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOM."' class='blockposition' $ssel9 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_BOTTOM.";' /> |
|
152 | 152 | </div> |
153 | 153 | </td> |
154 | 154 | <td> |
155 | 155 | <div class='blockposition $scol8'> |
156 | - <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_BOTTOMRIGHT . "' class='blockposition' $ssel8 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_BOTTOMRIGHT . ";' /> |
|
156 | + <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOMRIGHT."' class='blockposition' $ssel8 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_BOTTOMRIGHT.";' /> |
|
157 | 157 | </div> |
158 | 158 | |
159 | 159 | </td> |
160 | 160 | </tr> |
161 | 161 | <tr> |
162 | 162 | <td colspan='5'> |
163 | - <div style='float:" . _GLOBAL_LEFT . ";width:50px;' class='$stextbox'> |
|
164 | - <input type='text' name='extra_sides[$bid]' value='" . $value4extra_side . "' style='width:20px;' id='extra_side_$bid' /> |
|
163 | + <div style='float:" . _GLOBAL_LEFT.";width:50px;' class='$stextbox'> |
|
164 | + <input type='text' name='extra_sides[$bid]' value='".$value4extra_side."' style='width:20px;' id='extra_side_$bid' /> |
|
165 | 165 | </div> |
166 | 166 | <div class='blockposition $scoln'> |
167 | 167 | <input type='radio' name='sides[$bid]' value='-1' class='blockposition' $sseln onclick='document.getElementById(\"extra_side_$bid\").value=-1;' /> |
168 | 168 | </div> |
169 | - <div style='float:" . _GLOBAL_LEFT . ";'>" . _NONE . '</div> |
|
169 | + <div style='float:"._GLOBAL_LEFT.";'>"._NONE.'</div> |
|
170 | 170 | </td> |
171 | 171 | </tr> |
172 | 172 | </table> |
@@ -280,13 +280,13 @@ discard block |
||
280 | 280 | |
281 | 281 | // display |
282 | 282 | |
283 | - require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
|
283 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
284 | 284 | |
285 | 285 | $tpl = new D3Tpl(); |
286 | 286 | |
287 | 287 | //dhtml |
288 | 288 | |
289 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
289 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
290 | 290 | |
291 | 291 | if ('H' == $block_data['ctype'] || empty($block_data['ctype'])) { |
292 | 292 | $editor_configs = []; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | |
316 | 316 | $rendered = $form->render(); |
317 | 317 | |
318 | - $rendered = '<div id="textarea_content_bbcode_buttons_pre" style="display:block;">' . str_replace(['<textarea', '</textarea><br />'], ['</div><textarea', '</textarea><div id="textarea_content_bbcode_buttons_post" style="display:block;">'], $rendered) . '</div>'; |
|
318 | + $rendered = '<div id="textarea_content_bbcode_buttons_pre" style="display:block;">'.str_replace(['<textarea', '</textarea><br />'], ['</div><textarea', '</textarea><div id="textarea_content_bbcode_buttons_post" style="display:block;">'], $rendered).'</div>'; |
|
319 | 319 | |
320 | 320 | $tpl->assign('altsys_x25_dhtmltextarea', $rendered); |
321 | 321 | } |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | 'op' => $next_op, |
331 | 331 | 'form_title' => $form_title, |
332 | 332 | 'submit_button' => $button_value, |
333 | - 'common_fck_installed' => file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js'), |
|
333 | + 'common_fck_installed' => file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js'), |
|
334 | 334 | 'gticket_hidden' => $GLOBALS['xoopsSecurity']->getTokenHTML('myblocksadmin'), |
335 | 335 | ]); |
336 | 336 | |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | $c_type = $block_data['ctype']; |
418 | 418 | |
419 | 419 | if ('H' == $c_type) { |
420 | - $ret = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N')); |
|
420 | + $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N')); |
|
421 | 421 | } elseif ('P' == $c_type) { |
422 | 422 | ob_start(); |
423 | 423 | |
@@ -427,17 +427,17 @@ discard block |
||
427 | 427 | |
428 | 428 | ob_end_clean(); |
429 | 429 | |
430 | - $ret = str_replace('{X_SITEURL}', XOOPS_URL . '/', $content); |
|
430 | + $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $content); |
|
431 | 431 | } elseif ('S' == $c_type) { |
432 | 432 | (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
433 | 433 | |
434 | - $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N')); |
|
434 | + $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N')); |
|
435 | 435 | |
436 | 436 | $ret = $myts->displayTarea($content, 1, 1); |
437 | 437 | } else { |
438 | 438 | (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
439 | 439 | |
440 | - $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N')); |
|
440 | + $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N')); |
|
441 | 441 | |
442 | 442 | $ret = $myts->displayTarea($content, 1, 0); |
443 | 443 | } |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
4 | -require_once XOOPS_TRUST_PATH . '/libs/altsys/include/altsys_functions.php'; |
|
3 | +require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
4 | +require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php'; |
|
5 | 5 | |
6 | 6 | /** |
7 | 7 | * Class D3Tpl |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | parent::__construct(); |
22 | 22 | |
23 | 23 | if (in_array(altsys_get_core_type(), [ALTSYS_CORE_TYPE_X20S, ALTSYS_CORE_TYPE_X23P], true)) { |
24 | - array_unshift($this->plugins_dir, XOOPS_TRUST_PATH . '/libs/altsys/smarty_plugins'); |
|
24 | + array_unshift($this->plugins_dir, XOOPS_TRUST_PATH.'/libs/altsys/smarty_plugins'); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | // for RTL users |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -eval(' function xoops_module_install_' . $mydirname . '( $module ) { return altsys_oninstall_base( $module , "' . $mydirname . '" ) ; } '); |
|
3 | +eval(' function xoops_module_install_'.$mydirname.'( $module ) { return altsys_oninstall_base( $module , "'.$mydirname.'" ) ; } '); |
|
4 | 4 | |
5 | 5 | if (!function_exists('altsys_oninstall_base')) { |
6 | 6 | /** |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | if (defined('XOOPS_CUBE_LEGACY')) { |
21 | 21 | $root = XCube_Root::getSingleton(); |
22 | 22 | |
23 | - $root->mDelegateManager->add('Legacy.Admin.Event.ModuleInstall.' . ucfirst($mydirname) . '.Success', 'altsys_message_append_oninstall'); |
|
23 | + $root->mDelegateManager->add('Legacy.Admin.Event.ModuleInstall.'.ucfirst($mydirname).'.Success', 'altsys_message_append_oninstall'); |
|
24 | 24 | |
25 | 25 | $ret = []; |
26 | 26 | } else { |
@@ -37,25 +37,25 @@ discard block |
||
37 | 37 | |
38 | 38 | // set weight=0 |
39 | 39 | |
40 | - $db->queryF('UPDATE ' . $db->prefix('modules') . " SET weight=0 WHERE mid=$mid"); |
|
40 | + $db->queryF('UPDATE '.$db->prefix('modules')." SET weight=0 WHERE mid=$mid"); |
|
41 | 41 | |
42 | 42 | /*************** END ALTSYS SPECIFIC PART ******************/ |
43 | 43 | |
44 | 44 | // TABLES (loading mysql.sql) |
45 | 45 | |
46 | - $sql_file_path = __DIR__ . '/sql/mysql.sql'; |
|
46 | + $sql_file_path = __DIR__.'/sql/mysql.sql'; |
|
47 | 47 | |
48 | - $prefix_mod = $db->prefix() . '_' . $mydirname; |
|
48 | + $prefix_mod = $db->prefix().'_'.$mydirname; |
|
49 | 49 | |
50 | 50 | if (file_exists($sql_file_path)) { |
51 | - $ret[] = 'SQL file found at <b>' . htmlspecialchars($sql_file_path, ENT_QUOTES | ENT_HTML5) . '</b>.<br /> Creating tables...'; |
|
51 | + $ret[] = 'SQL file found at <b>'.htmlspecialchars($sql_file_path, ENT_QUOTES | ENT_HTML5).'</b>.<br /> Creating tables...'; |
|
52 | 52 | |
53 | - if (is_file(XOOPS_ROOT_PATH . '/class/database/oldsqlutility.php')) { |
|
54 | - include_once XOOPS_ROOT_PATH . '/class/database/oldsqlutility.php'; |
|
53 | + if (is_file(XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php')) { |
|
54 | + include_once XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php'; |
|
55 | 55 | |
56 | 56 | $sqlutil = new OldSqlUtility(); |
57 | 57 | } else { |
58 | - include_once XOOPS_ROOT_PATH . '/class/database/sqlutility.php'; |
|
58 | + include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php'; |
|
59 | 59 | |
60 | 60 | $sqlutil = new SqlUtility(); |
61 | 61 | } |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | $prefixed_query = $sqlutil->prefixQuery($piece, $prefix_mod); |
71 | 71 | |
72 | 72 | if (!$prefixed_query) { |
73 | - $ret[] = 'Invalid SQL <b>' . htmlspecialchars($piece, ENT_QUOTES | ENT_HTML5) . '</b><br />'; |
|
73 | + $ret[] = 'Invalid SQL <b>'.htmlspecialchars($piece, ENT_QUOTES | ENT_HTML5).'</b><br />'; |
|
74 | 74 | |
75 | 75 | return false; |
76 | 76 | } |
77 | 77 | |
78 | 78 | if (!$db->query($prefixed_query[0])) { |
79 | - $ret[] = '<b>' . htmlspecialchars($db->error(), ENT_QUOTES | ENT_HTML5) . '</b><br />'; |
|
79 | + $ret[] = '<b>'.htmlspecialchars($db->error(), ENT_QUOTES | ENT_HTML5).'</b><br />'; |
|
80 | 80 | |
81 | 81 | //var_dump( $db->error() ) ; |
82 | 82 | |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | if (!in_array($prefixed_query[4], $created_tables, true)) { |
87 | - $ret[] = 'Table <b>' . htmlspecialchars($prefix_mod . '_' . $prefixed_query[4], ENT_QUOTES | ENT_HTML5) . '</b> created.<br />'; |
|
87 | + $ret[] = 'Table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4], ENT_QUOTES | ENT_HTML5).'</b> created.<br />'; |
|
88 | 88 | |
89 | 89 | $created_tables[] = $prefixed_query[4]; |
90 | 90 | } else { |
91 | - $ret[] = 'Data inserted to table <b>' . htmlspecialchars($prefix_mod . '_' . $prefixed_query[4], ENT_QUOTES | ENT_HTML5) . '</b>.</br />'; |
|
91 | + $ret[] = 'Data inserted to table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4], ENT_QUOTES | ENT_HTML5).'</b>.</br />'; |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | } |
@@ -97,15 +97,15 @@ discard block |
||
97 | 97 | |
98 | 98 | $tplfile_handler = xoops_getHandler('tplfile'); |
99 | 99 | |
100 | - $tpl_path = __DIR__ . '/templates'; |
|
100 | + $tpl_path = __DIR__.'/templates'; |
|
101 | 101 | |
102 | - if ($handler = @opendir($tpl_path . '/')) { |
|
102 | + if ($handler = @opendir($tpl_path.'/')) { |
|
103 | 103 | while (false !== ($file = readdir($handler))) { |
104 | 104 | if ('.' == mb_substr($file, 0, 1)) { |
105 | 105 | continue; |
106 | 106 | } |
107 | 107 | |
108 | - $file_path = $tpl_path . '/' . $file; |
|
108 | + $file_path = $tpl_path.'/'.$file; |
|
109 | 109 | |
110 | 110 | if (is_file($file_path)) { |
111 | 111 | $mtime = (int)(@filemtime($file_path)); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | $tplfile->setVar('tpl_tplset', 'default'); |
120 | 120 | |
121 | - $tplfile->setVar('tpl_file', $mydirname . '_' . $file); |
|
121 | + $tplfile->setVar('tpl_file', $mydirname.'_'.$file); |
|
122 | 122 | |
123 | 123 | $tplfile->setVar('tpl_desc', '', true); |
124 | 124 | |
@@ -131,13 +131,13 @@ discard block |
||
131 | 131 | $tplfile->setVar('tpl_type', 'module'); |
132 | 132 | |
133 | 133 | if (!$tplfile_handler->insert($tplfile)) { |
134 | - $ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>' . htmlspecialchars($mydirname . '_' . $file, ENT_QUOTES | ENT_HTML5) . '</b> to the database.</span><br />'; |
|
134 | + $ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file, ENT_QUOTES | ENT_HTML5).'</b> to the database.</span><br />'; |
|
135 | 135 | } else { |
136 | 136 | $tplid = $tplfile->getVar('tpl_id'); |
137 | 137 | |
138 | - $ret[] = 'Template <b>' . htmlspecialchars($mydirname . '_' . $file, ENT_QUOTES | ENT_HTML5) . '</b> added to the database. (ID: <b>' . $tplid . '</b>)<br />'; |
|
138 | + $ret[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file, ENT_QUOTES | ENT_HTML5).'</b> added to the database. (ID: <b>'.$tplid.'</b>)<br />'; |
|
139 | 139 | |
140 | - require_once XOOPS_TRUST_PATH . '/libs/altsys/include/altsys_functions.php'; |
|
140 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php'; |
|
141 | 141 | |
142 | 142 | altsys_clear_templates_c(); |
143 | 143 | |
@@ -156,9 +156,9 @@ discard block |
||
156 | 156 | closedir($handler); |
157 | 157 | } |
158 | 158 | |
159 | - include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
159 | + include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
160 | 160 | |
161 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
161 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
162 | 162 | |
163 | 163 | xoops_template_clear_module_cache($mid); |
164 | 164 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | // language files (modinfo.php) |
21 | 21 | altsys_include_language_file('modinfo'); |
22 | 22 | |
23 | -include __DIR__ . '/admin_menu.php'; |
|
23 | +include __DIR__.'/admin_menu.php'; |
|
24 | 24 | |
25 | 25 | $adminmenu = array_merge($adminmenu, $adminmenu4altsys); |
26 | 26 | |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | // link conversion from relative to absolute |
58 | 58 | foreach (array_keys($adminmenu) as $i) { |
59 | 59 | if (false === mb_stristr($adminmenu[$i]['link'], XOOPS_URL)) { |
60 | - $adminmenu[$i]['link'] = XOOPS_URL . "/modules/$mydirname/" . $adminmenu[$i]['link']; |
|
60 | + $adminmenu[$i]['link'] = XOOPS_URL."/modules/$mydirname/".$adminmenu[$i]['link']; |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | |
64 | 64 | // display |
65 | -require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
|
65 | +require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
66 | 66 | $tpl = new D3Tpl(); |
67 | 67 | $tpl->assign([ |
68 | 68 | 'adminmenu' => $adminmenu, |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | |
72 | 72 | // submenu |
73 | 73 | $page = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['page']); |
74 | -if (file_exists(__DIR__ . '/mymenusub/' . $page . '.php')) { |
|
75 | - include __DIR__ . '/mymenusub/' . $page . '.php'; |
|
74 | +if (file_exists(__DIR__.'/mymenusub/'.$page.'.php')) { |
|
75 | + include __DIR__.'/mymenusub/'.$page.'.php'; |
|
76 | 76 | } |
@@ -65,8 +65,8 @@ |
||
65 | 65 | require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
66 | 66 | $tpl = new D3Tpl(); |
67 | 67 | $tpl->assign([ |
68 | - 'adminmenu' => $adminmenu, |
|
69 | - ]); |
|
68 | + 'adminmenu' => $adminmenu, |
|
69 | + ]); |
|
70 | 70 | $tpl->display('db:altsys_inc_mymenu.tpl'); |
71 | 71 | |
72 | 72 | // submenu |