@@ -6,17 +6,17 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/../../../mainfile.php'; |
|
10 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
11 | -require_once XOOPS_ROOT_PATH . '/kernel/module.php'; |
|
12 | -require_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
13 | -require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
14 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
15 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
9 | +require_once __DIR__.'/../../../mainfile.php'; |
|
10 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
11 | +require_once XOOPS_ROOT_PATH.'/kernel/module.php'; |
|
12 | +require_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
13 | +require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
14 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
15 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
16 | 16 | |
17 | -require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
18 | -require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/category.php'; |
|
19 | -require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/faq.php'; |
|
20 | -require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/answer.php'; |
|
17 | +require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
18 | +require_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/category.php'; |
|
19 | +require_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/faq.php'; |
|
20 | +require_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/answer.php'; |
|
21 | 21 | |
22 | 22 | $myts = MyTextSanitizer::getInstance(); |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/admin_header.php'; |
|
9 | +require_once __DIR__.'/admin_header.php'; |
|
10 | 10 | |
11 | 11 | $op = 'none'; |
12 | 12 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | case 'importExecute': |
24 | 24 | |
25 | 25 | $importfile = isset($_POST['importfile']) ? $_POST['importfile'] : 'nonselected'; |
26 | - $importfile_path = XOOPS_ROOT_PATH . '/modules/smartfaq/admin/' . $importfile . '.php'; |
|
26 | + $importfile_path = XOOPS_ROOT_PATH.'/modules/smartfaq/admin/'.$importfile.'.php'; |
|
27 | 27 | if (!file_exists($importfile_path)) { |
28 | 28 | $errs[] = sprintf(_AM_SF_IMPORT_FILE_NOT_FOUND, $importfile_path); |
29 | 29 | $error = true; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | require_once $importfile_path; |
32 | 32 | } |
33 | 33 | foreach ($msgs as $m) { |
34 | - echo $m . '<br>'; |
|
34 | + echo $m.'<br>'; |
|
35 | 35 | } |
36 | 36 | echo '<br>'; |
37 | 37 | $endMsg = _AM_SF_IMPORT_SUCCESS; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | echo $endMsg; |
43 | 43 | echo '<br><br>'; |
44 | - echo "<a href='import.php'>" . _AM_SF_IMPORT_BACK . '</a>'; |
|
44 | + echo "<a href='import.php'>"._AM_SF_IMPORT_BACK.'</a>'; |
|
45 | 45 | echo '<br><br>'; |
46 | 46 | break; |
47 | 47 | |
@@ -53,13 +53,13 @@ discard block |
||
53 | 53 | xoops_cp_header(); |
54 | 54 | |
55 | 55 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
56 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_IMPORT_TITLE . '</h3>'; |
|
56 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_IMPORT_TITLE.'</h3>'; |
|
57 | 57 | echo "<div id='bottomtable'>"; |
58 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_IMPORT_INFO . '</span>'; |
|
58 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_IMPORT_INFO.'</span>'; |
|
59 | 59 | |
60 | 60 | global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts; |
61 | 61 | |
62 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
62 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
63 | 63 | |
64 | 64 | /** @var XoopsModuleHandler $moduleHandler */ |
65 | 65 | $moduleHandler = xoops_getHandler('module'); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $sform->display(); |
100 | 100 | unset($hidden); |
101 | 101 | } else { |
102 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-weight: bold; font-size: small; display: block; ">' . _AM_SF_IMPORT_NO_MODULE . '</span>'; |
|
102 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-weight: bold; font-size: small; display: block; ">'._AM_SF_IMPORT_NO_MODULE.'</span>'; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | // End of collapsable bar |
@@ -108,4 +108,4 @@ discard block |
||
108 | 108 | break; |
109 | 109 | } |
110 | 110 | |
111 | -require_once __DIR__ . '/admin_footer.php'; |
|
111 | +require_once __DIR__.'/admin_footer.php'; |
@@ -17,11 +17,11 @@ |
||
17 | 17 | * @author XOOPS Development Team |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/admin_header.php'; |
|
20 | +require_once __DIR__.'/admin_header.php'; |
|
21 | 21 | xoops_cp_header(); |
22 | 22 | |
23 | 23 | $adminObject->displayNavigation(basename(__FILE__)); |
24 | 24 | $adminObject->setPaypal('[email protected]'); |
25 | 25 | $adminObject->displayAbout(false); |
26 | 26 | |
27 | -require_once __DIR__ . '/admin_footer.php'; |
|
27 | +require_once __DIR__.'/admin_footer.php'; |
@@ -17,8 +17,8 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
21 | -require_once __DIR__ . '/admin_header.php'; |
|
20 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
21 | +require_once __DIR__.'/admin_header.php'; |
|
22 | 22 | |
23 | 23 | xoops_cp_header(); |
24 | 24 | |
@@ -72,34 +72,34 @@ discard block |
||
72 | 72 | $adminObject->addInfoBox(_AM_SF_INVENTORY); |
73 | 73 | |
74 | 74 | if ($totalcategories > 0) { |
75 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="category.php">' . _AM_SF_TOTALCAT . '</a><b>' . '</infolabel>', $totalcategories), '', 'Green'); |
|
75 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="category.php">'._AM_SF_TOTALCAT.'</a><b>'.'</infolabel>', $totalcategories), '', 'Green'); |
|
76 | 76 | } else { |
77 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALCAT . '</infolabel>', $totalcategories), '', 'Green'); |
|
77 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALCAT.'</infolabel>', $totalcategories), '', 'Green'); |
|
78 | 78 | } |
79 | 79 | if ($totalasked > 0) { |
80 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="main.php">' . _AM_SF_TOTALASKED . '</a><b>' . '</infolabel>', $totalasked), '', 'Green'); |
|
80 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="main.php">'._AM_SF_TOTALASKED.'</a><b>'.'</infolabel>', $totalasked), '', 'Green'); |
|
81 | 81 | } else { |
82 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALASKED . '</infolabel>', $totalasked), '', 'Green'); |
|
82 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALASKED.'</infolabel>', $totalasked), '', 'Green'); |
|
83 | 83 | } |
84 | 84 | if ($totalopened > 0) { |
85 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="question.php">' . _AM_SF_TOTALOPENED . '</a><b>' . '</infolabel>', $totalopened), '', 'Red'); |
|
85 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="question.php">'._AM_SF_TOTALOPENED.'</a><b>'.'</infolabel>', $totalopened), '', 'Red'); |
|
86 | 86 | } else { |
87 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALOPENED . '</infolabel>', $totalopened), '', 'Green'); |
|
87 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALOPENED.'</infolabel>', $totalopened), '', 'Green'); |
|
88 | 88 | } |
89 | 89 | if ($totalsubmitted > 0) { |
90 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="category.php">' . _AM_SF_TOTALSUBMITTED . '</a><b>' . '</infolabel>', $totalsubmitted), '', 'Green'); |
|
90 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="category.php">'._AM_SF_TOTALSUBMITTED.'</a><b>'.'</infolabel>', $totalsubmitted), '', 'Green'); |
|
91 | 91 | } else { |
92 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALSUBMITTED . '</infolabel>', $totalsubmitted), '', 'Green'); |
|
92 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALSUBMITTED.'</infolabel>', $totalsubmitted), '', 'Green'); |
|
93 | 93 | } |
94 | 94 | if ($totalpublished > 0) { |
95 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="faq.php">' . _AM_SF_TOTALPUBLISHED . '</a><b>' . '</infolabel>', $totalpublished), '', 'Green'); |
|
95 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="faq.php">'._AM_SF_TOTALPUBLISHED.'</a><b>'.'</infolabel>', $totalpublished), '', 'Green'); |
|
96 | 96 | } else { |
97 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALPUBLISHED . '</infolabel>', $totalpublished), '', 'Green'); |
|
97 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALPUBLISHED.'</infolabel>', $totalpublished), '', 'Green'); |
|
98 | 98 | } |
99 | 99 | if ($totalnewanswers > 0) { |
100 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="main.php">' . _AM_SF_TOTALNEWANSWERS . '</a><b>' . '</infolabel>', $totalnewanswers), '', 'Red'); |
|
100 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="main.php">'._AM_SF_TOTALNEWANSWERS.'</a><b>'.'</infolabel>', $totalnewanswers), '', 'Red'); |
|
101 | 101 | } else { |
102 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALNEWANSWERS . '</infolabel>', $totalnewanswers), '', 'Green'); |
|
102 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALNEWANSWERS.'</infolabel>', $totalnewanswers), '', 'Green'); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | //---------------------- |
@@ -107,4 +107,4 @@ discard block |
||
107 | 107 | $adminObject->displayNavigation(basename(__FILE__)); |
108 | 108 | $adminObject->displayIndex(); |
109 | 109 | |
110 | -require_once __DIR__ . '/admin_footer.php'; |
|
110 | +require_once __DIR__.'/admin_footer.php'; |
@@ -59,14 +59,14 @@ |
||
59 | 59 | echo $form_view->render(); |
60 | 60 | } else { |
61 | 61 | echo "<img id='toptableicon' src=" |
62 | - . XOOPS_URL |
|
63 | - . '/modules/' |
|
64 | - . $xoopsModule->dirname() |
|
65 | - . "/assets/images/icon/close12.gif alt=''></a> " |
|
66 | - . _AM_SF_PERMISSIONSVIEWMAN |
|
67 | - . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
68 | - . _AM_SF_NOPERMSSET |
|
69 | - . '</span>'; |
|
62 | + . XOOPS_URL |
|
63 | + . '/modules/' |
|
64 | + . $xoopsModule->dirname() |
|
65 | + . "/assets/images/icon/close12.gif alt=''></a> " |
|
66 | + . _AM_SF_PERMISSIONSVIEWMAN |
|
67 | + . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
68 | + . _AM_SF_NOPERMSSET |
|
69 | + . '</span>'; |
|
70 | 70 | } |
71 | 71 | echo '</div>'; |
72 | 72 |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/admin_header.php'; |
|
10 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; |
|
9 | +require_once __DIR__.'/admin_header.php'; |
|
10 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php'; |
|
11 | 11 | |
12 | 12 | if (!sf_userIsAdmin()) { |
13 | 13 | redirect_header('javascript:history.go(-1)', 1, _NOPERM); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ; |
38 | 38 | sf_collapsableBar('toptable', 'toptableicon'); |
39 | 39 | |
40 | - $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' '); |
|
40 | + $result_view = $xoopsDB->query('SELECT categoryid, name FROM '.$xoopsDB->prefix('smartfaq_categories').' '); |
|
41 | 41 | if ($xoopsDB->getRowsNum($result_view)) { |
42 | 42 | while ($myrow_view = $xoopsDB->fetcharray($result_view)) { |
43 | 43 | $item_list_view['cid'] = $myrow_view['categoryid']; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
52 | 52 | . _AM_SF_VIEW_CATS |
53 | 53 | . '</span>', 'admin/permissions.php'); |
54 | - $block_view[] = $item_list_view; |
|
54 | + $block_view[] = $item_list_view; |
|
55 | 55 | foreach ($block_view as $itemlists) { |
56 | 56 | $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title'])); |
57 | 57 | } |
@@ -73,4 +73,4 @@ discard block |
||
73 | 73 | echo "<br>\n"; |
74 | 74 | } |
75 | 75 | |
76 | -require_once __DIR__ . '/admin_footer.php'; |
|
76 | +require_once __DIR__.'/admin_footer.php'; |
@@ -24,53 +24,53 @@ |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | switch ($op) { |
27 | - case 'default': |
|
28 | - default: |
|
29 | - global $xoopsDB, $xoopsModule; |
|
27 | + case 'default': |
|
28 | + default: |
|
29 | + global $xoopsDB, $xoopsModule; |
|
30 | 30 | |
31 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
32 | - xoops_cp_header(); |
|
33 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
34 | - // View Categories permissions |
|
35 | - $item_list_view = []; |
|
36 | - $block_view = []; |
|
37 | - // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ; |
|
38 | - sf_collapsableBar('toptable', 'toptableicon'); |
|
31 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
32 | + xoops_cp_header(); |
|
33 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
34 | + // View Categories permissions |
|
35 | + $item_list_view = []; |
|
36 | + $block_view = []; |
|
37 | + // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ; |
|
38 | + sf_collapsableBar('toptable', 'toptableicon'); |
|
39 | 39 | |
40 | - $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' '); |
|
41 | - if ($xoopsDB->getRowsNum($result_view)) { |
|
42 | - while ($myrow_view = $xoopsDB->fetcharray($result_view)) { |
|
43 | - $item_list_view['cid'] = $myrow_view['categoryid']; |
|
44 | - $item_list_view['title'] = $myrow_view['name']; |
|
45 | - $form_view = new XoopsGroupPermForm('', $xoopsModule->getVar('mid'), 'category_read', "<img id='toptableicon' src=" |
|
46 | - . XOOPS_URL |
|
47 | - . '/modules/' |
|
48 | - . $xoopsModule->dirname() |
|
49 | - . "/assets/images/icon/close12.gif alt=''></a> " |
|
50 | - . _AM_SF_PERMISSIONSVIEWMAN |
|
51 | - . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
52 | - . _AM_SF_VIEW_CATS |
|
53 | - . '</span>', 'admin/permissions.php'); |
|
54 | - $block_view[] = $item_list_view; |
|
55 | - foreach ($block_view as $itemlists) { |
|
56 | - $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title'])); |
|
40 | + $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' '); |
|
41 | + if ($xoopsDB->getRowsNum($result_view)) { |
|
42 | + while ($myrow_view = $xoopsDB->fetcharray($result_view)) { |
|
43 | + $item_list_view['cid'] = $myrow_view['categoryid']; |
|
44 | + $item_list_view['title'] = $myrow_view['name']; |
|
45 | + $form_view = new XoopsGroupPermForm('', $xoopsModule->getVar('mid'), 'category_read', "<img id='toptableicon' src=" |
|
46 | + . XOOPS_URL |
|
47 | + . '/modules/' |
|
48 | + . $xoopsModule->dirname() |
|
49 | + . "/assets/images/icon/close12.gif alt=''></a> " |
|
50 | + . _AM_SF_PERMISSIONSVIEWMAN |
|
51 | + . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
52 | + . _AM_SF_VIEW_CATS |
|
53 | + . '</span>', 'admin/permissions.php'); |
|
54 | + $block_view[] = $item_list_view; |
|
55 | + foreach ($block_view as $itemlists) { |
|
56 | + $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title'])); |
|
57 | + } |
|
57 | 58 | } |
59 | + echo $form_view->render(); |
|
60 | + } else { |
|
61 | + echo "<img id='toptableicon' src=" |
|
62 | + . XOOPS_URL |
|
63 | + . '/modules/' |
|
64 | + . $xoopsModule->dirname() |
|
65 | + . "/assets/images/icon/close12.gif alt=''></a> " |
|
66 | + . _AM_SF_PERMISSIONSVIEWMAN |
|
67 | + . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
68 | + . _AM_SF_NOPERMSSET |
|
69 | + . '</span>'; |
|
58 | 70 | } |
59 | - echo $form_view->render(); |
|
60 | - } else { |
|
61 | - echo "<img id='toptableicon' src=" |
|
62 | - . XOOPS_URL |
|
63 | - . '/modules/' |
|
64 | - . $xoopsModule->dirname() |
|
65 | - . "/assets/images/icon/close12.gif alt=''></a> " |
|
66 | - . _AM_SF_PERMISSIONSVIEWMAN |
|
67 | - . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
68 | - . _AM_SF_NOPERMSSET |
|
69 | - . '</span>'; |
|
70 | - } |
|
71 | - echo '</div>'; |
|
71 | + echo '</div>'; |
|
72 | 72 | |
73 | - echo "<br>\n"; |
|
73 | + echo "<br>\n"; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | require_once __DIR__ . '/admin_footer.php'; |
@@ -6,5 +6,5 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
10 | -require_once XOOPS_ROOT_PATH . '/include/comment_post.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | +require_once XOOPS_ROOT_PATH.'/include/comment_post.php'; |
@@ -9,9 +9,9 @@ |
||
9 | 9 | |
10 | 10 | global $_POST; |
11 | 11 | |
12 | -require_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
13 | -require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
14 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
12 | +require_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
13 | +require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
14 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
15 | 15 | |
16 | 16 | $form = new XoopsThemeForm(_MD_SF_REQUEST, 'form', xoops_getenv('PHP_SELF'), 'post', true); |
17 | 17 | // CATEGORY |
@@ -70,18 +70,18 @@ |
||
70 | 70 | $myblock->setVar('title', $myts->stripSlashesGPC($btitle)); |
71 | 71 | $myblock->setVar('content', $myts->stripSlashesGPC($bcontent)); |
72 | 72 | $dummyhtml = '<html><head><meta http-equiv="content-type" content="text/html; charset=' |
73 | - . _CHARSET |
|
74 | - . '"><meta http-equiv="content-language" content="' |
|
75 | - . _LANGCODE |
|
76 | - . '"><title>' |
|
77 | - . $xoopsConfig['sitename'] |
|
78 | - . '</title><link rel="stylesheet" type="text/css" media="all" href="' |
|
79 | - . getcss($xoopsConfig['theme_set']) |
|
80 | - . '"></head><body><table><tr><th>' |
|
81 | - . $myblock->getVar('title') |
|
82 | - . '</th></tr><tr><td>' |
|
83 | - . $myblock->getContent('S', $bctype) |
|
84 | - . '</td></tr></table></body></html>'; |
|
73 | + . _CHARSET |
|
74 | + . '"><meta http-equiv="content-language" content="' |
|
75 | + . _LANGCODE |
|
76 | + . '"><title>' |
|
77 | + . $xoopsConfig['sitename'] |
|
78 | + . '</title><link rel="stylesheet" type="text/css" media="all" href="' |
|
79 | + . getcss($xoopsConfig['theme_set']) |
|
80 | + . '"></head><body><table><tr><th>' |
|
81 | + . $myblock->getVar('title') |
|
82 | + . '</th></tr><tr><td>' |
|
83 | + . $myblock->getContent('S', $bctype) |
|
84 | + . '</td></tr></table></body></html>'; |
|
85 | 85 | |
86 | 86 | $dummyfile = '_dummyfile_' . time() . '.html'; |
87 | 87 | $fp = fopen(XOOPS_CACHE_PATH . '/' . $dummyfile, 'w'); |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) { |
29 | 29 | exit('Access Denied'); |
30 | 30 | } |
31 | -require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
32 | -include XOOPS_ROOT_PATH . '/modules/system/admin/blocksadmin/blocksadmin.php'; |
|
31 | +require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
32 | +include XOOPS_ROOT_PATH.'/modules/system/admin/blocksadmin/blocksadmin.php'; |
|
33 | 33 | |
34 | 34 | $op = 'list'; |
35 | 35 | if (isset($HTTP_POST_VARS)) { |
@@ -43,13 +43,13 @@ discard block |
||
43 | 43 | || 'clone' === $HTTP_GET_VARS['op'] |
44 | 44 | || 'previewpopup' === $HTTP_GET_VARS['op']) { |
45 | 45 | $op = $HTTP_GET_VARS['op']; |
46 | - $bid = isset($HTTP_GET_VARS['bid']) ? (int)$HTTP_GET_VARS['bid'] : 0; |
|
46 | + $bid = isset($HTTP_GET_VARS['bid']) ? (int) $HTTP_GET_VARS['bid'] : 0; |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | |
50 | 50 | if (isset($previewblock)) { |
51 | 51 | xoops_cp_header(); |
52 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
52 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
53 | 53 | $xoopsTpl = new XoopsTpl(); |
54 | 54 | $xoopsTpl->xoops_setCaching(0); |
55 | 55 | if (isset($bid)) { |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | . $myblock->getContent('S', $bctype) |
84 | 84 | . '</td></tr></table></body></html>'; |
85 | 85 | |
86 | - $dummyfile = '_dummyfile_' . time() . '.html'; |
|
87 | - $fp = fopen(XOOPS_CACHE_PATH . '/' . $dummyfile, 'w'); |
|
86 | + $dummyfile = '_dummyfile_'.time().'.html'; |
|
87 | + $fp = fopen(XOOPS_CACHE_PATH.'/'.$dummyfile, 'w'); |
|
88 | 88 | fwrite($fp, $dummyhtml); |
89 | 89 | fclose($fp); |
90 | 90 | $block['edit_form'] = false; |
@@ -95,24 +95,24 @@ discard block |
||
95 | 95 | $block['visible'] = $bvisible; |
96 | 96 | $block['title'] = $myblock->getVar('title', 'E'); |
97 | 97 | $block['content'] = $myblock->getVar('content', 'E'); |
98 | - $block['modules'] =& $bmodule; |
|
98 | + $block['modules'] = & $bmodule; |
|
99 | 99 | $block['ctype'] = isset($bctype) ? $bctype : $myblock->getVar('c_type'); |
100 | 100 | $block['is_custom'] = true; |
101 | - $block['cachetime'] = (int)$bcachetime; |
|
102 | - echo '<a href="admin.php?fct=blocksadmin">' . _AM_BADMIN . '</a> <span style="font-weight:bold;">»»</span> ' . $block['form_title'] . '<br><br>'; |
|
103 | - include XOOPS_ROOT_PATH . '/modules/system/admin/blocksadmin/blockform.php'; |
|
101 | + $block['cachetime'] = (int) $bcachetime; |
|
102 | + echo '<a href="admin.php?fct=blocksadmin">'._AM_BADMIN.'</a> <span style="font-weight:bold;">»»</span> '.$block['form_title'].'<br><br>'; |
|
103 | + include XOOPS_ROOT_PATH.'/modules/system/admin/blocksadmin/blockform.php'; |
|
104 | 104 | $form->display(); |
105 | 105 | xoops_cp_footer(); |
106 | 106 | echo '<script type="text/javascript"> |
107 | 107 | <!--// |
108 | - preview_window = openWithSelfMain("' . XOOPS_URL . '/modules/system/admin.php?fct=blocksadmin&op=previewpopup&file=' . $dummyfile . '", "popup", 250, 200); |
|
108 | + preview_window = openWithSelfMain("' . XOOPS_URL.'/modules/system/admin.php?fct=blocksadmin&op=previewpopup&file='.$dummyfile.'", "popup", 250, 200); |
|
109 | 109 | //--> |
110 | 110 | </script>'; |
111 | 111 | exit(); |
112 | 112 | } |
113 | 113 | |
114 | 114 | if ('previewpopup' === $op) { |
115 | - $file = str_replace('..', '', XOOPS_CACHE_PATH . '/' . trim($HTTP_GET_VARS['file'])); |
|
115 | + $file = str_replace('..', '', XOOPS_CACHE_PATH.'/'.trim($HTTP_GET_VARS['file'])); |
|
116 | 116 | if (file_exists($file)) { |
117 | 117 | include $file; |
118 | 118 | @unlink($file); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | |
152 | 152 | if ('update' === $op) { |
153 | - $bcachetime = isset($bcachetime) ? (int)$bcachetime : 0; |
|
153 | + $bcachetime = isset($bcachetime) ? (int) $bcachetime : 0; |
|
154 | 154 | $options = isset($options) ? $options : []; |
155 | 155 | $bcontent = isset($bcontent) ? $bcontent : ''; |
156 | 156 | $bctype = isset($bctype) ? $bctype : ''; |
@@ -251,27 +251,27 @@ discard block |
||
251 | 251 | $sql = sprintf('DELETE FROM %s WHERE block_id = %u', $db->prefix('block_module_link'), $bid); |
252 | 252 | $db->query($sql); |
253 | 253 | foreach ($bmodule as $bmid) { |
254 | - $sql = sprintf('INSERT INTO %s (block_id, module_id) VALUES (%u, %d)', $db->prefix('block_module_link'), $bid, (int)$bmid); |
|
254 | + $sql = sprintf('INSERT INTO %s (block_id, module_id) VALUES (%u, %d)', $db->prefix('block_module_link'), $bid, (int) $bmid); |
|
255 | 255 | $db->query($sql); |
256 | 256 | } |
257 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
257 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
258 | 258 | $xoopsTpl = new XoopsTpl(); |
259 | 259 | $xoopsTpl->xoops_setCaching(2); |
260 | 260 | if ('' != $myblock->getVar('template')) { |
261 | - if ($xoopsTpl->is_cached('db:' . $myblock->getVar('template'))) { |
|
262 | - if (!$xoopsTpl->clear_cache('db:' . $myblock->getVar('template'))) { |
|
263 | - $msg = 'Unable to clear cache for block ID' . $bid; |
|
261 | + if ($xoopsTpl->is_cached('db:'.$myblock->getVar('template'))) { |
|
262 | + if (!$xoopsTpl->clear_cache('db:'.$myblock->getVar('template'))) { |
|
263 | + $msg = 'Unable to clear cache for block ID'.$bid; |
|
264 | 264 | } |
265 | 265 | } |
266 | 266 | } else { |
267 | - if ($xoopsTpl->is_cached('db:system_dummy.tpl', 'block' . $bid)) { |
|
268 | - if (!$xoopsTpl->clear_cache('db:system_dummy.tpl', 'block' . $bid)) { |
|
269 | - $msg = 'Unable to clear cache for block ID' . $bid; |
|
267 | + if ($xoopsTpl->is_cached('db:system_dummy.tpl', 'block'.$bid)) { |
|
268 | + if (!$xoopsTpl->clear_cache('db:system_dummy.tpl', 'block'.$bid)) { |
|
269 | + $msg = 'Unable to clear cache for block ID'.$bid; |
|
270 | 270 | } |
271 | 271 | } |
272 | 272 | } |
273 | 273 | } else { |
274 | - $msg = 'Failed update of block. ID:' . $bid; |
|
274 | + $msg = 'Failed update of block. ID:'.$bid; |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | return $msg; // GIJ + |
@@ -9,9 +9,9 @@ |
||
9 | 9 | |
10 | 10 | global $_POST; |
11 | 11 | |
12 | -require_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
13 | -require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
14 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
12 | +require_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
13 | +require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
14 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
15 | 15 | //require_once __DIR__ . '/functions.php'; |
16 | 16 | |
17 | 17 | $mytree = new XoopsTree($xoopsDB->prefix('smartfaq_categories'), 'categoryid', 'parentid'); |