@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | if (isset($HTTP_GET_VARS['fct'])) { |
37 | 37 | $fct = trim($HTTP_GET_VARS['fct']); |
38 | 38 | } |
39 | -if (empty($fct)) $fct = 'preferences' ; |
|
40 | -include dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; |
|
39 | +if (empty($fct)) $fct = 'preferences'; |
|
40 | +include dirname(dirname(dirname(__DIR__))).'/mainfile.php'; |
|
41 | 41 | include XOOPS_ROOT_PATH."/include/cp_functions.php"; |
42 | 42 | |
43 | 43 | include_once XOOPS_ROOT_PATH."/kernel/module.php"; |
@@ -45,14 +45,14 @@ discard block |
||
45 | 45 | $admintest = 0; |
46 | 46 | |
47 | 47 | if (is_object($xoopsUser)) { |
48 | - $xoopsModule =& XoopsModule::getByDirname("system"); |
|
49 | - if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { |
|
50 | - redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); |
|
48 | + $xoopsModule = & XoopsModule::getByDirname("system"); |
|
49 | + if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
|
50 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
51 | 51 | exit(); |
52 | 52 | } |
53 | - $admintest=1; |
|
53 | + $admintest = 1; |
|
54 | 54 | } else { |
55 | - redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); |
|
55 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
56 | 56 | exit(); |
57 | 57 | } |
58 | 58 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | if (isset($fct) && $fct != '') { |
64 | 64 | if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) { |
65 | 65 | |
66 | - include_once( XOOPS_ROOT_PATH."/modules/system/language/" . $xoopsConfig['language'] . "/admin.php" ) ; |
|
66 | + include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php"); |
|
67 | 67 | |
68 | 68 | if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) { |
69 | 69 | include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php"; |
@@ -71,14 +71,14 @@ discard block |
||
71 | 71 | include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php"; |
72 | 72 | } |
73 | 73 | include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php"; |
74 | - $sysperm_handler =& xoops_gethandler('groupperm'); |
|
75 | - $category = !empty($modversion['category'])? intval($modversion['category']) : 0; |
|
74 | + $sysperm_handler = & xoops_gethandler('groupperm'); |
|
75 | + $category = !empty($modversion['category']) ? intval($modversion['category']) : 0; |
|
76 | 76 | unset($modversion); |
77 | 77 | if ($category > 0) { |
78 | - $groups =& $xoopsUser->getGroups(); |
|
78 | + $groups = & $xoopsUser->getGroups(); |
|
79 | 79 | if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) { |
80 | 80 | if (file_exists("../include/{$fct}.inc.php")) { |
81 | - include_once "../include/{$fct}.inc.php" ; |
|
81 | + include_once "../include/{$fct}.inc.php"; |
|
82 | 82 | } else { |
83 | 83 | $error = true; |
84 | 84 | } |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | $groups = $xoopsUser->getGroups(); |
111 | 111 | $all_ok = false; |
112 | 112 | if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { |
113 | - $sysperm_handler =& xoops_gethandler('groupperm'); |
|
114 | - $ok_syscats =& $sysperm_handler->getItemIds('system_admin', $groups); |
|
113 | + $sysperm_handler = & xoops_gethandler('groupperm'); |
|
114 | + $ok_syscats = & $sysperm_handler->getItemIds('system_admin', $groups); |
|
115 | 115 | } else { |
116 | 116 | $all_ok = true; |
117 | 117 | } |
@@ -123,13 +123,13 @@ discard block |
||
123 | 123 | if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) { |
124 | 124 | include $admin_dir.'/'.$file.'/xoops_version.php'; |
125 | 125 | if ($modversion['hasAdmin']) { |
126 | - $category = isset($modversion['category'])? intval($modversion['category']) : 0; |
|
126 | + $category = isset($modversion['category']) ? intval($modversion['category']) : 0; |
|
127 | 127 | if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) { |
128 | 128 | echo "<td class='$class' align='center' valign='bottom' width='19%'>"; |
129 | - echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n"; |
|
129 | + echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>".trim($modversion['name'])."</b></a>\n"; |
|
130 | 130 | echo "</td>"; |
131 | 131 | ++$counter; |
132 | - $class = ($class == 'even')? 'odd' : 'even'; |
|
132 | + $class = ($class == 'even') ? 'odd' : 'even'; |
|
133 | 133 | } |
134 | 134 | if ($counter > 4) { |
135 | 135 | $counter = 0; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | } |
143 | 143 | while ($counter < 5) { |
144 | 144 | echo '<td class="'.$class.'"> </td>'; |
145 | - $class = ($class == 'even')? 'odd' : 'even'; |
|
145 | + $class = ($class == 'even') ? 'odd' : 'even'; |
|
146 | 146 | ++$counter; |
147 | 147 | } |
148 | 148 | echo '</tr></table>'; |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | * Licence: GNU |
8 | 8 | */ |
9 | 9 | |
10 | -include_once __DIR__ . '/admin_header.php'; |
|
11 | -include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; |
|
10 | +include_once __DIR__.'/admin_header.php'; |
|
11 | +include_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php'; |
|
12 | 12 | |
13 | 13 | if (!sf_userIsAdmin()) { |
14 | 14 | redirect_header("javascript:history.go(-1)", 1, _NOPERM); |
@@ -40,12 +40,12 @@ discard block |
||
40 | 40 | // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ; |
41 | 41 | sf_collapsableBar('toptable', 'toptableicon'); |
42 | 42 | |
43 | - $result_view = $xoopsDB->query("SELECT categoryid, name FROM " . $xoopsDB->prefix("smartfaq_categories") . " "); |
|
43 | + $result_view = $xoopsDB->query("SELECT categoryid, name FROM ".$xoopsDB->prefix("smartfaq_categories")." "); |
|
44 | 44 | if ($xoopsDB->getRowsNum($result_view)) { |
45 | 45 | while ($myrow_view = $xoopsDB->fetcharray($result_view)) { |
46 | 46 | $item_list_view['cid'] = $myrow_view['categoryid']; |
47 | 47 | $item_list_view['title'] = $myrow_view['name']; |
48 | - $form_view = new XoopsGroupPermForm("", $xoopsModule->getVar('mid'), "category_read", "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_PERMISSIONSVIEWMAN . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" . _AM_SF_VIEW_CATS . "</span>",'admin/permissions.php'); |
|
48 | + $form_view = new XoopsGroupPermForm("", $xoopsModule->getVar('mid'), "category_read", "<img id='toptableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_PERMISSIONSVIEWMAN."</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"._AM_SF_VIEW_CATS."</span>", 'admin/permissions.php'); |
|
49 | 49 | $block_view[] = $item_list_view; |
50 | 50 | foreach ($block_view as $itemlists) { |
51 | 51 | $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title'])); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | } |
54 | 54 | echo $form_view->render(); |
55 | 55 | } else { |
56 | - echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_PERMISSIONSVIEWMAN . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" . _AM_SF_NOPERMSSET . "</span>"; |
|
56 | + echo "<img id='toptableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_PERMISSIONSVIEWMAN."</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"._AM_SF_NOPERMSSET."</span>"; |
|
57 | 57 | |
58 | 58 | } |
59 | 59 | echo "</div>"; |
@@ -61,4 +61,4 @@ discard block |
||
61 | 61 | echo "<br />\n"; |
62 | 62 | } |
63 | 63 | |
64 | -include_once __DIR__ . '/admin_footer.php'; |
|
64 | +include_once __DIR__.'/admin_footer.php'; |
@@ -7,26 +7,26 @@ discard block |
||
7 | 7 | * Licence: GNU |
8 | 8 | */ |
9 | 9 | |
10 | -include_once __DIR__ . '/admin_header.php'; |
|
10 | +include_once __DIR__.'/admin_header.php'; |
|
11 | 11 | |
12 | 12 | // Creating the faq handler object |
13 | -$faq_handler =& sf_gethandler('faq'); |
|
13 | +$faq_handler = & sf_gethandler('faq'); |
|
14 | 14 | |
15 | 15 | // Creating the category handler object |
16 | -$category_handler =& sf_gethandler('category'); |
|
16 | +$category_handler = & sf_gethandler('category'); |
|
17 | 17 | |
18 | 18 | $op = ''; |
19 | 19 | if (isset($_GET['op'])) $op = $_GET['op']; |
20 | 20 | if (isset($_POST['op'])) $op = $_POST['op']; |
21 | 21 | |
22 | 22 | // Where shall we start? |
23 | -$startfaq = isset($_GET['startfaq'])? intval($_GET['startfaq']) : 0; |
|
23 | +$startfaq = isset($_GET['startfaq']) ? intval($_GET['startfaq']) : 0; |
|
24 | 24 | |
25 | 25 | function editfaq($showmenu = false, $faqid = -1) |
26 | 26 | { |
27 | 27 | global $faq_handler, $category_handler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts; |
28 | 28 | |
29 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
29 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
30 | 30 | // If there is a parameter, and the id exists, retrieve data: we're editing a faq |
31 | 31 | if ($faqid != -1) { |
32 | 32 | // Creating the FAQ object |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | switch ($faqObj->status()) { |
40 | 40 | |
41 | 41 | case _SF_STATUS_ASKED : |
42 | - $breadcrumb_action = _AM_SF_APPROVING; |
|
42 | + $breadcrumb_action = _AM_SF_APPROVING; |
|
43 | 43 | $collapsableBar_title = _AM_SF_QUESTION_APPROVING; |
44 | 44 | $collapsableBar_info = _AM_SF_QUESTION_APPROVING_INFO; |
45 | 45 | $button_caption = _AM_SF_QUEUE; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | case "default" : |
49 | 49 | default : |
50 | - $breadcrumb_action = _AM_SF_EDITING; |
|
50 | + $breadcrumb_action = _AM_SF_EDITING; |
|
51 | 51 | $collapsableBar_title = _AM_SF_EDITQUES; |
52 | 52 | $collapsableBar_info = _AM_SF_EDITING_INFO; |
53 | 53 | $button_caption = _AM_SF_MODIFY; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | // Creating the category of this FAQ |
58 | - $categoryObj =& $category_handler->get($faqObj->categoryid()); |
|
58 | + $categoryObj = & $category_handler->get($faqObj->categoryid()); |
|
59 | 59 | |
60 | 60 | if ($showmenu) { |
61 | 61 | //sf_adminMenu(3, _AM_SF_OPEN_QUESTIONS . " > " . $breadcrumb_action); |
@@ -63,14 +63,14 @@ discard block |
||
63 | 63 | |
64 | 64 | echo "<br />\n"; |
65 | 65 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
66 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . $collapsableBar_title . "</h3>"; |
|
66 | + echo "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> ".$collapsableBar_title."</h3>"; |
|
67 | 67 | echo "<div id='bottomtable'>"; |
68 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . $collapsableBar_info . "</span>"; |
|
68 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">".$collapsableBar_info."</span>"; |
|
69 | 69 | } else { |
70 | 70 | // there's no parameter, so we're adding a faq |
71 | - $faqObj =& $faq_handler->create(); |
|
71 | + $faqObj = & $faq_handler->create(); |
|
72 | 72 | $faqObj->setVar('uid', $xoopsUser->getVar('uid')); |
73 | - $categoryObj =& $category_handler->create(); |
|
73 | + $categoryObj = & $category_handler->create(); |
|
74 | 74 | |
75 | 75 | $breadcrumb_action = _AM_SF_CREATINGNEW; |
76 | 76 | $button_caption = _AM_SF_CREATE; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | //sf_adminMenu(3, _AM_SF_OPEN_QUESTIONS . " > " . $breadcrumb_action); |
79 | 79 | } |
80 | 80 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
81 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_CREATEQUESTION . "</h3>"; |
|
81 | + echo "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_CREATEQUESTION."</h3>"; |
|
82 | 82 | echo "<div id='bottomtable'>"; |
83 | 83 | } |
84 | 84 | $sform = new XoopsThemeForm(_AM_SF_OPEN_QUESTION, "op", xoops_getenv('PHP_SELF')); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * Last one is not set as we do not have sub menus in Smartfaq |
96 | 96 | */ |
97 | 97 | |
98 | - $mytree = new XoopsTree($xoopsDB->prefix("smartfaq_categories"), "categoryid" , "parentid"); |
|
98 | + $mytree = new XoopsTree($xoopsDB->prefix("smartfaq_categories"), "categoryid", "parentid"); |
|
99 | 99 | ob_start(); |
100 | 100 | $mytree->makeMySelBox("name", "weight", $categoryObj->categoryid()); |
101 | 101 | $sform->addElement(new XoopsFormLabel(_AM_SF_CATEGORY_QUESTION, ob_get_contents())); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $button_tray->addElement($butt_create); |
153 | 153 | |
154 | 154 | $butt_edit = new XoopsFormButton('', '', _AM_SF_OPEN_QUESTION_EDIT, 'button'); |
155 | - $butt_edit->setExtra("onclick=\"location='faq.php?op=mod&faqid=" . $faqid . "'\""); |
|
155 | + $butt_edit->setExtra("onclick=\"location='faq.php?op=mod&faqid=".$faqid."'\""); |
|
156 | 156 | $button_tray->addElement($butt_edit); |
157 | 157 | |
158 | 158 | $butt_cancel = new XoopsFormButton('', '', _AM_SF_CANCEL, 'button'); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | case "mod": |
172 | 172 | |
173 | 173 | Global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $modify, $myts; |
174 | - $faqid = (isset($_GET['faqid']))? $_GET['faqid'] : -1; |
|
174 | + $faqid = (isset($_GET['faqid'])) ? $_GET['faqid'] : -1; |
|
175 | 175 | |
176 | 176 | if ($faqid == -1) { |
177 | 177 | $totalcategories = $category_handler->getCategoriesCount(-1); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | xoops_cp_header(); |
186 | 186 | |
187 | 187 | echo $indexAdmin->addNavigation('question.php'); |
188 | - include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; |
|
188 | + include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; |
|
189 | 189 | |
190 | 190 | editfaq(true, $faqid); |
191 | 191 | break; |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | $uid = $xoopsUser->uid(); |
205 | 205 | } |
206 | 206 | |
207 | - $faqid = (isset($_POST['faqid']))? intval($_POST['faqid']) : -1; |
|
207 | + $faqid = (isset($_POST['faqid'])) ? intval($_POST['faqid']) : -1; |
|
208 | 208 | |
209 | 209 | // Creating the FAQ |
210 | 210 | if ($faqid != -1) { |
@@ -214,10 +214,10 @@ discard block |
||
214 | 214 | } |
215 | 215 | |
216 | 216 | // Putting the values in the FAQ object |
217 | - $faqObj->setGroups_read(isset($_POST['groups'])? $_POST['groups'] : array()); |
|
218 | - $faqObj->setVar('categoryid', (isset($_POST['categoryid']))? intval($_POST['categoryid']) : 0); |
|
217 | + $faqObj->setGroups_read(isset($_POST['groups']) ? $_POST['groups'] : array()); |
|
218 | + $faqObj->setVar('categoryid', (isset($_POST['categoryid'])) ? intval($_POST['categoryid']) : 0); |
|
219 | 219 | $faqObj->setVar('question', $_POST['question']); |
220 | - $faqObj->setVar('status', (isset($_POST['status']))? intval($_POST['status']) : _SF_STATUS_ASKED); |
|
220 | + $faqObj->setVar('status', (isset($_POST['status'])) ? intval($_POST['status']) : _SF_STATUS_ASKED); |
|
221 | 221 | |
222 | 222 | $notifToDo = null; |
223 | 223 | |
@@ -248,8 +248,8 @@ discard block |
||
248 | 248 | $faqObj->setVar('status', $status); |
249 | 249 | |
250 | 250 | // Storing the FAQ |
251 | - if ( !$faqObj->store() ) { |
|
252 | - redirect_header("javascript:history.go(-1)", 3, _AM_SF_ERROR . sf_formatErrors($faqObj->getErrors())); |
|
251 | + if (!$faqObj->store()) { |
|
252 | + redirect_header("javascript:history.go(-1)", 3, _AM_SF_ERROR.sf_formatErrors($faqObj->getErrors())); |
|
253 | 253 | exit; |
254 | 254 | } |
255 | 255 | |
@@ -269,16 +269,16 @@ discard block |
||
269 | 269 | $module_id = $xoopsModule->getVar('mid'); |
270 | 270 | $gperm_handler = &xoops_gethandler('groupperm'); |
271 | 271 | |
272 | - $faqid = (isset($_POST['faqid']))? intval($_POST['faqid']) : 0; |
|
273 | - $faqid = (isset($_GET['faqid']))? intval($_GET['faqid']) : $faqid; |
|
272 | + $faqid = (isset($_POST['faqid'])) ? intval($_POST['faqid']) : 0; |
|
273 | + $faqid = (isset($_GET['faqid'])) ? intval($_GET['faqid']) : $faqid; |
|
274 | 274 | |
275 | 275 | $faqObj = new sfFaq($faqid); |
276 | 276 | |
277 | - $confirm = (isset($_POST['confirm']))? $_POST['confirm'] : 0; |
|
278 | - $question = (isset($_POST['question']))? $_POST['question'] : ''; |
|
277 | + $confirm = (isset($_POST['confirm'])) ? $_POST['confirm'] : 0; |
|
278 | + $question = (isset($_POST['question'])) ? $_POST['question'] : ''; |
|
279 | 279 | |
280 | 280 | if ($confirm) { |
281 | - if ( !$faq_handler->delete($faqObj)) { |
|
281 | + if (!$faq_handler->delete($faqObj)) { |
|
282 | 282 | redirect_header("question.php", 2, _AM_SF_FAQ_DELETE_ERROR); |
283 | 283 | exit; |
284 | 284 | } |
@@ -287,9 +287,9 @@ discard block |
||
287 | 287 | exit(); |
288 | 288 | } else { |
289 | 289 | // no confirm: show deletion condition |
290 | - $faqid = (isset($_GET['faqid']))? intval($_GET['faqid']) : 0; |
|
290 | + $faqid = (isset($_GET['faqid'])) ? intval($_GET['faqid']) : 0; |
|
291 | 291 | xoops_cp_header(); |
292 | - xoops_confirm(array('op' => 'del', 'faqid' => $faqObj->faqid(), 'confirm' => 1, 'name' => $faqObj->question()), 'question.php', _AM_SF_DELETETHISQUESTION . " <br />'" . $faqObj->question() . "'. <br /> <br />", _AM_SF_DELETE); |
|
292 | + xoops_confirm(array('op' => 'del', 'faqid' => $faqObj->faqid(), 'confirm' => 1, 'name' => $faqObj->question()), 'question.php', _AM_SF_DELETETHISQUESTION." <br />'".$faqObj->question()."'. <br /> <br />", _AM_SF_DELETE); |
|
293 | 293 | xoops_cp_footer(); |
294 | 294 | } |
295 | 295 | |
@@ -304,8 +304,8 @@ discard block |
||
304 | 304 | |
305 | 305 | //sf_adminMenu(3, _AM_SF_OPEN_QUESTIONS); |
306 | 306 | |
307 | - include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; |
|
308 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
307 | + include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; |
|
308 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
309 | 309 | |
310 | 310 | global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $smartModuleConfig; |
311 | 311 | |
@@ -313,9 +313,9 @@ discard block |
||
313 | 313 | |
314 | 314 | sf_collapsableBar('toptable', 'toptableicon'); |
315 | 315 | |
316 | - echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_OPENED_TITLE . "</h3>"; |
|
316 | + echo "<img id='toptableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_OPENED_TITLE."</h3>"; |
|
317 | 317 | echo "<div id='toptable'>"; |
318 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_OPENED_DSC . "</span>"; |
|
318 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_SF_OPENED_DSC."</span>"; |
|
319 | 319 | |
320 | 320 | // Get the total number of published FAQs |
321 | 321 | $totalfaqs = $faq_handler->getFaqsCount(-1, array(_SF_STATUS_OPENED)); |
@@ -325,48 +325,48 @@ discard block |
||
325 | 325 | $allcats = $category_handler->getObjects(null, true); |
326 | 326 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
327 | 327 | echo "<tr>"; |
328 | - echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . "</b></td>"; |
|
329 | - echo "<th width='20%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . "</b></td>"; |
|
330 | - echo "<th class='bg3' align='left'><b>" . _AM_SF_QUESTION . "</b></td>"; |
|
328 | + echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_ARTID."</b></td>"; |
|
329 | + echo "<th width='20%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME."</b></td>"; |
|
330 | + echo "<th class='bg3' align='left'><b>"._AM_SF_QUESTION."</b></td>"; |
|
331 | 331 | |
332 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . "</b></td>"; |
|
332 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED."</b></td>"; |
|
333 | 333 | |
334 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . "</b></td>"; |
|
335 | - echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . "</b></td>"; |
|
334 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED."</b></td>"; |
|
335 | + echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION."</b></td>"; |
|
336 | 336 | echo "</tr>"; |
337 | 337 | //var_dump( $faqsObj); |
338 | 338 | if ($totalfaqs > 0) { |
339 | 339 | global $pathIcon16; |
340 | - foreach ( array_keys($faqsObj) as $i) { |
|
341 | - $categoryObj =& $allcats[$faqsObj[$i]->categoryid()]; |
|
340 | + foreach (array_keys($faqsObj) as $i) { |
|
341 | + $categoryObj = & $allcats[$faqsObj[$i]->categoryid()]; |
|
342 | 342 | |
343 | - $modify = "<a href='question.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='". $pathIcon16 .'/edit.png'."' title='" . _AM_SF_EDITART . "' alt='" . _AM_SF_EDITART . "'></a>"; |
|
344 | - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='". $pathIcon16 .'/delete.png'."' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
343 | + $modify = "<a href='question.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_EDITART."' alt='"._AM_SF_EDITART."'></a>"; |
|
344 | + $delete = "<a href='question.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
345 | 345 | |
346 | - $requester= sf_getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']); |
|
346 | + $requester = sf_getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']); |
|
347 | 347 | |
348 | 348 | echo "<tr>"; |
349 | - echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . "</td>"; |
|
350 | - echo "<td class='even' align='left'>" . $categoryObj->name() . "</td>"; |
|
351 | - echo "<td class='even' align='left'><a href='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/answer.php?faqid=" . $faqsObj[$i]->faqid() . "'>" . $faqsObj[$i]->question(100) . "</a></td>"; |
|
349 | + echo "<td class='head' align='center'>".$faqsObj[$i]->faqid()."</td>"; |
|
350 | + echo "<td class='even' align='left'>".$categoryObj->name()."</td>"; |
|
351 | + echo "<td class='even' align='left'><a href='".XOOPS_URL."/modules/".$xoopsModule->dirname()."/answer.php?faqid=".$faqsObj[$i]->faqid()."'>".$faqsObj[$i]->question(100)."</a></td>"; |
|
352 | 352 | |
353 | - echo "<td class='even' align='center'>" . $requester . "</td>"; |
|
353 | + echo "<td class='even' align='center'>".$requester."</td>"; |
|
354 | 354 | |
355 | - echo "<td class='even' align='center'>" . $faqsObj[$i]->datesub('s') . "</td>"; |
|
355 | + echo "<td class='even' align='center'>".$faqsObj[$i]->datesub('s')."</td>"; |
|
356 | 356 | echo "<td class='even' align='center'> $modify $delete </td>"; |
357 | 357 | echo "</tr>"; |
358 | 358 | } |
359 | 359 | } else { |
360 | 360 | $faqid = -1; |
361 | 361 | echo "<tr>"; |
362 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOQUEUED . "</td>"; |
|
362 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOQUEUED."</td>"; |
|
363 | 363 | echo "</tr>"; |
364 | 364 | } |
365 | 365 | echo "</table>\n"; |
366 | 366 | echo "<br />\n"; |
367 | 367 | |
368 | 368 | $pagenav = new XoopsPageNav($totalfaqs, $xoopsModuleConfig['perpage'], $startfaq, 'startfaq'); |
369 | - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
369 | + echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
370 | 370 | echo "</div>"; |
371 | 371 | |
372 | 372 | $totalcategories = $category_handler->getCategoriesCount(-1); |
@@ -377,4 +377,4 @@ discard block |
||
377 | 377 | break; |
378 | 378 | } |
379 | 379 | |
380 | -include_once __DIR__ . '/admin_footer.php'; |
|
380 | +include_once __DIR__.'/admin_footer.php'; |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * |
12 | 12 | */ |
13 | 13 | |
14 | -include_once __DIR__ . '/admin_header.php'; |
|
14 | +include_once __DIR__.'/admin_header.php'; |
|
15 | 15 | |
16 | 16 | $importFromModuleName = 'WF-FAQ'; |
17 | 17 | $scriptname = 'wffaq.php'; |
@@ -26,61 +26,61 @@ discard block |
||
26 | 26 | include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
27 | 27 | xoops_cp_header(); |
28 | 28 | //sf_adminMenu(-1, _AM_SF_IMPORT); |
29 | - $result = $xoopsDB->query ("select count(*) from ".$xoopsDB->prefix("faqcategories")); |
|
30 | - list ($totalCat) = $xoopsDB->fetchRow ($result); |
|
29 | + $result = $xoopsDB->query("select count(*) from ".$xoopsDB->prefix("faqcategories")); |
|
30 | + list ($totalCat) = $xoopsDB->fetchRow($result); |
|
31 | 31 | |
32 | 32 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
33 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName) . "</h3>"; |
|
33 | + echo "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> ".sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName)."</h3>"; |
|
34 | 34 | echo "<div id='bottomtable'>"; |
35 | 35 | |
36 | 36 | if ($totalCat == 0) { |
37 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_IMPORT_NO_CATEGORY . "</span>"; |
|
37 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_SF_IMPORT_NO_CATEGORY."</span>"; |
|
38 | 38 | } else { |
39 | - include_once XOOPS_ROOT_PATH . "/class/xoopstree.php"; |
|
39 | + include_once XOOPS_ROOT_PATH."/class/xoopstree.php"; |
|
40 | 40 | |
41 | - $result = $xoopsDB->query ("select count(*) from ".$xoopsDB->prefix("faqtopics")); |
|
42 | - list ($totalFAQ) = $xoopsDB->fetchRow ($result); |
|
41 | + $result = $xoopsDB->query("select count(*) from ".$xoopsDB->prefix("faqtopics")); |
|
42 | + list ($totalFAQ) = $xoopsDB->fetchRow($result); |
|
43 | 43 | |
44 | 44 | if ($totalFAQ == 0) { |
45 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . sprintf(_AM_SF_IMPORT_MODULE_FOUND_NO_FAQ, $importFromModuleName, $totalCat) . "</span>"; |
|
45 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">".sprintf(_AM_SF_IMPORT_MODULE_FOUND_NO_FAQ, $importFromModuleName, $totalCat)."</span>"; |
|
46 | 46 | } else { |
47 | 47 | |
48 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . sprintf(_AM_SF_IMPORT_MODULE_FOUND, $importFromModuleName, $totalCat, $totalFAQ) . "</span>"; |
|
48 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">".sprintf(_AM_SF_IMPORT_MODULE_FOUND, $importFromModuleName, $totalCat, $totalFAQ)."</span>"; |
|
49 | 49 | |
50 | - $form = new XoopsThemeForm (_AM_SF_IMPORT_SETTINGS, 'import_form', XOOPS_URL. "/modules/smartfaq/admin/" . $scriptname); |
|
50 | + $form = new XoopsThemeForm(_AM_SF_IMPORT_SETTINGS, 'import_form', XOOPS_URL."/modules/smartfaq/admin/".$scriptname); |
|
51 | 51 | |
52 | 52 | // Categories to be imported |
53 | - $cat_cbox = new XoopsFormCheckBox (sprintf(_AM_SF_IMPORT_CATEGORIES, $importFromModuleName), 'import_category', -1); |
|
54 | - $result = $xoopsDB->query ("select c.catID, c.name, count(t.topicID) from ".$xoopsDB->prefix("faqcategories")." as c, ".$xoopsDB->prefix("faqtopics")." as t where c.catID=t.catID group by t.catID order by c.weight"); |
|
55 | - while (list ($cid, $cat_title, $count) = $xoopsDB->fetchRow ($result)) { |
|
56 | - $cat_cbox->addOption ($cid, "$cat_title ($count)<br\>"); |
|
53 | + $cat_cbox = new XoopsFormCheckBox(sprintf(_AM_SF_IMPORT_CATEGORIES, $importFromModuleName), 'import_category', -1); |
|
54 | + $result = $xoopsDB->query("select c.catID, c.name, count(t.topicID) from ".$xoopsDB->prefix("faqcategories")." as c, ".$xoopsDB->prefix("faqtopics")." as t where c.catID=t.catID group by t.catID order by c.weight"); |
|
55 | + while (list ($cid, $cat_title, $count) = $xoopsDB->fetchRow($result)) { |
|
56 | + $cat_cbox->addOption($cid, "$cat_title ($count)<br\>"); |
|
57 | 57 | } |
58 | - $form->addElement ($cat_cbox); |
|
58 | + $form->addElement($cat_cbox); |
|
59 | 59 | |
60 | 60 | // SmartFAQ parent category |
61 | 61 | $mytree = new XoopsTree($xoopsDB->prefix("smartfaq_categories"), "categoryid", "parentid"); |
62 | 62 | ob_start(); |
63 | - $mytree->makeMySelBox("name", "weight", $preset_id=0, $none=1, $sel_name="parent_category"); |
|
63 | + $mytree->makeMySelBox("name", "weight", $preset_id = 0, $none = 1, $sel_name = "parent_category"); |
|
64 | 64 | $form->addElement(new XoopsFormLabel(_AM_SF_IMPORT_PARENT_CATEGORY, ob_get_contents())); |
65 | 65 | ob_end_clean(); |
66 | 66 | |
67 | 67 | // Auto-Approve |
68 | - $form->addElement(new XoopsFormRadioYN(_AM_SF_IMPORT_AUTOAPPROVE, 'autoaprove', 1, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . '')); |
|
68 | + $form->addElement(new XoopsFormRadioYN(_AM_SF_IMPORT_AUTOAPPROVE, 'autoaprove', 1, ' '._AM_SF_YES.'', ' '._AM_SF_NO.'')); |
|
69 | 69 | |
70 | 70 | // Submitted and answered by |
71 | - $member_handler =& xoops_gethandler ('member'); |
|
72 | - $user_select = new XoopsFormSelect (_AM_SF_IMPORTED_USER, 'uid', 0); |
|
73 | - $user_select->addOption (0, '----'); |
|
71 | + $member_handler = & xoops_gethandler('member'); |
|
72 | + $user_select = new XoopsFormSelect(_AM_SF_IMPORTED_USER, 'uid', 0); |
|
73 | + $user_select->addOption(0, '----'); |
|
74 | 74 | //$criteria = new CriteriaCompo (); |
75 | 75 | //$criteria->setSort ('uname'); |
76 | 76 | //$criteria->setOrder ('ASC'); |
77 | - $user_select->addOptionArray ($member_handler->getUserList()); |
|
78 | - $form->addElement ($user_select); |
|
77 | + $user_select->addOptionArray($member_handler->getUserList()); |
|
78 | + $form->addElement($user_select); |
|
79 | 79 | |
80 | 80 | // Q&As can be commented? |
81 | - $form->addElement(new XoopsFormRadioYN(_AM_SF_IMPORT_ALLOWCOMMENTS, 'cancomment', 1, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . '')); |
|
81 | + $form->addElement(new XoopsFormRadioYN(_AM_SF_IMPORT_ALLOWCOMMENTS, 'cancomment', 1, ' '._AM_SF_YES.'', ' '._AM_SF_NO.'')); |
|
82 | 82 | $group_list = &$member_handler->getGroupList(); |
83 | - $groups_selected = array (); |
|
83 | + $groups_selected = array(); |
|
84 | 84 | $groups_checkbox = new XoopsFormCheckBox(_AM_SF_IMPORT_PERMISSIONS, 'groups_read'); |
85 | 85 | foreach ($group_list as $group_id => $group_name) { |
86 | 86 | if ($group_id != XOOPS_GROUP_ADMIN) { |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | $groups_checkbox->addOption($group_id, $group_name); |
89 | 89 | } |
90 | 90 | } |
91 | - $groups_checkbox->setValue ($groups_selected); |
|
91 | + $groups_checkbox->setValue($groups_selected); |
|
92 | 92 | $form->addElement($groups_checkbox); |
93 | 93 | |
94 | - $form->addElement (new XoopsFormHidden('op', 'go')); |
|
95 | - $form->addElement (new XoopsFormButton ('', 'import', _AM_SF_IMPORT, 'submit')); |
|
94 | + $form->addElement(new XoopsFormHidden('op', 'go')); |
|
95 | + $form->addElement(new XoopsFormButton('', 'import', _AM_SF_IMPORT, 'submit')); |
|
96 | 96 | |
97 | 97 | $form->display(); |
98 | 98 | } |
@@ -102,39 +102,39 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | if ($op == 'go') { |
105 | - $import_category = (isset($_POST['import_category'])? ($_POST['import_category']) : null); |
|
105 | + $import_category = (isset($_POST['import_category']) ? ($_POST['import_category']) : null); |
|
106 | 106 | if (!$import_category) { |
107 | 107 | redirect_header($scriptname, 2, _AM_SF_NOCATSELECTED); |
108 | 108 | exit; |
109 | 109 | } |
110 | 110 | |
111 | - include_once __DIR__ . '/admin_header.php'; |
|
111 | + include_once __DIR__.'/admin_header.php'; |
|
112 | 112 | xoops_cp_header(); |
113 | 113 | //sf_adminMenu(-1, _AM_SF_IMPORT); |
114 | 114 | |
115 | 115 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
116 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName) . "</h3>"; |
|
116 | + echo "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> ".sprintf(_AM_SF_IMPORT_FROM, $importFromModuleName)."</h3>"; |
|
117 | 117 | echo "<div id='bottomtable'>"; |
118 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_IMPORT_RESULT . "</span>"; |
|
118 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_SF_IMPORT_RESULT."</span>"; |
|
119 | 119 | |
120 | 120 | $cnt_imported_cat = 0; |
121 | 121 | $cnt_imported_faq = 0; |
122 | 122 | |
123 | 123 | $parentId = $_POST['parent_category']; |
124 | - $groups_read = isset($_POST['groups_read'])? $_POST['groups_read'] : array(); |
|
125 | - $uid = !empty($_POST['uid'])? $_POST['uid'] : 0; |
|
124 | + $groups_read = isset($_POST['groups_read']) ? $_POST['groups_read'] : array(); |
|
125 | + $uid = !empty($_POST['uid']) ? $_POST['uid'] : 0; |
|
126 | 126 | $cancomment = $_POST['cancomment']; |
127 | 127 | $autoaprove = $_POST['autoaprove']; |
128 | 128 | |
129 | - if (is_array ($_POST['import_category'])) { |
|
130 | - $import_category_list = implode (',', $_POST['import_category']); |
|
129 | + if (is_array($_POST['import_category'])) { |
|
130 | + $import_category_list = implode(',', $_POST['import_category']); |
|
131 | 131 | } else { |
132 | 132 | $import_category_list = $_POST['import_category']; |
133 | 133 | } |
134 | 134 | |
135 | - $category_handler =& sf_gethandler('category'); |
|
136 | - $faq_handler =& sf_gethandler('faq'); |
|
137 | - $answer_handler =& sf_gethandler('answer'); |
|
135 | + $category_handler = & sf_gethandler('category'); |
|
136 | + $faq_handler = & sf_gethandler('faq'); |
|
137 | + $answer_handler = & sf_gethandler('answer'); |
|
138 | 138 | |
139 | 139 | /*echo "Parent Category ID: $parentId<br/>"; |
140 | 140 | echo "Groups Read: " . implode (",", $groups_read) . "<br/>"; |
@@ -143,22 +143,22 @@ discard block |
||
143 | 143 | echo "Can Comment: $cancomment<br/>"; |
144 | 144 | echo "Auto aprove: $autoaprove<br/>";*/ |
145 | 145 | |
146 | - $resultCat = $xoopsDB->query ("select * from ".$xoopsDB->prefix("faqcategories")." where catID in ($import_category_list) order by weight"); |
|
146 | + $resultCat = $xoopsDB->query("select * from ".$xoopsDB->prefix("faqcategories")." where catID in ($import_category_list) order by weight"); |
|
147 | 147 | |
148 | - while ($arrCat = $xoopsDB->fetchArray ($resultCat)) { |
|
149 | - extract ($arrCat, EXTR_PREFIX_ALL, 'wfc'); |
|
148 | + while ($arrCat = $xoopsDB->fetchArray($resultCat)) { |
|
149 | + extract($arrCat, EXTR_PREFIX_ALL, 'wfc'); |
|
150 | 150 | |
151 | 151 | // insert category into SmartFAQ |
152 | 152 | $categoryObj = $category_handler->create(); |
153 | 153 | |
154 | - $categoryObj->setVar ('parentid', $parentId); |
|
155 | - $categoryObj->setVar ('weight', $wfc_weight); |
|
156 | - $categoryObj->setGroups_read (explode (" ", trim ($wfc_groupid))); |
|
157 | - $categoryObj->setVar ('name', $wfc_name); |
|
158 | - $categoryObj->setVar ('description', $wfc_description); |
|
154 | + $categoryObj->setVar('parentid', $parentId); |
|
155 | + $categoryObj->setVar('weight', $wfc_weight); |
|
156 | + $categoryObj->setGroups_read(explode(" ", trim($wfc_groupid))); |
|
157 | + $categoryObj->setVar('name', $wfc_name); |
|
158 | + $categoryObj->setVar('description', $wfc_description); |
|
159 | 159 | |
160 | 160 | if (!$categoryObj->store(false)) { |
161 | - echo sprintf(_AM_SF_IMPORT_CATEGORY_ERROR, $xcat_name) . "<br/>"; |
|
161 | + echo sprintf(_AM_SF_IMPORT_CATEGORY_ERROR, $xcat_name)."<br/>"; |
|
162 | 162 | continue; |
163 | 163 | } |
164 | 164 | |
@@ -166,11 +166,11 @@ discard block |
||
166 | 166 | |
167 | 167 | ++$cnt_imported_cat; |
168 | 168 | |
169 | - echo sprintf(_AM_SF_IMPORT_CATEGORY_SUCCESS, $wfc_name) . "<br\>"; |
|
169 | + echo sprintf(_AM_SF_IMPORT_CATEGORY_SUCCESS, $wfc_name)."<br\>"; |
|
170 | 170 | |
171 | - $resultFAQ = $xoopsDB->query ("select * from ".$xoopsDB->prefix("faqtopics")." where catID=$wfc_catID order by weight"); |
|
172 | - while ($arrFAQ = $xoopsDB->fetchArray ($resultFAQ)) { |
|
173 | - extract ($arrFAQ, EXTR_PREFIX_ALL, 'wft'); |
|
171 | + $resultFAQ = $xoopsDB->query("select * from ".$xoopsDB->prefix("faqtopics")." where catID=$wfc_catID order by weight"); |
|
172 | + while ($arrFAQ = $xoopsDB->fetchArray($resultFAQ)) { |
|
173 | + extract($arrFAQ, EXTR_PREFIX_ALL, 'wft'); |
|
174 | 174 | |
175 | 175 | if ($autoaprove) { |
176 | 176 | if ($wft_submit) { |
@@ -183,10 +183,10 @@ discard block |
||
183 | 183 | } |
184 | 184 | |
185 | 185 | // insert question into SmartFAQ |
186 | - $faqObj =& $faq_handler->create(); |
|
187 | - $answerObj =& $answer_handler->create(); |
|
186 | + $faqObj = & $faq_handler->create(); |
|
187 | + $answerObj = & $answer_handler->create(); |
|
188 | 188 | |
189 | - $faqObj->setGroups_read (explode (" ", trim ($wft_groupid))); |
|
189 | + $faqObj->setGroups_read(explode(" ", trim($wft_groupid))); |
|
190 | 190 | $faqObj->setVar('categoryid', $categoryObj->categoryid()); |
191 | 191 | $faqObj->setVar('question', $wft_question); |
192 | 192 | $faqObj->setVar('uid', $wft_uid); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | $faqObj->setVar('exacturl', 0); |
201 | 201 | |
202 | 202 | if (!$faqObj->store(false)) { |
203 | - echo sprintf(" " . _AM_SF_IMPORT_FAQ_ERROR, $wft_question) . "<br/>"; |
|
203 | + echo sprintf(" "._AM_SF_IMPORT_FAQ_ERROR, $wft_question)."<br/>"; |
|
204 | 204 | continue; |
205 | 205 | } else { |
206 | 206 | $answerObj->setVar('faqid', $faqObj->faqid()); |
@@ -209,10 +209,10 @@ discard block |
||
209 | 209 | $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); |
210 | 210 | |
211 | 211 | if (!$answerObj->store()) { |
212 | - echo sprintf(" " . _AM_SF_IMPORT_FAQ_ERROR) . "<br/>"; |
|
212 | + echo sprintf(" "._AM_SF_IMPORT_FAQ_ERROR)."<br/>"; |
|
213 | 213 | continue; |
214 | 214 | } else { |
215 | - echo " " . sprintf(_AM_SF_IMPORTED_QUESTION, $faqObj->question(50)) . "<br />"; |
|
215 | + echo " ".sprintf(_AM_SF_IMPORTED_QUESTION, $faqObj->question(50))."<br />"; |
|
216 | 216 | ++$cnt_imported_faq; |
217 | 217 | } |
218 | 218 | } |
@@ -222,8 +222,8 @@ discard block |
||
222 | 222 | } |
223 | 223 | |
224 | 224 | echo "Done.<br/>"; |
225 | - echo sprintf(_AM_SF_IMPORTED_CATEGORIES, $cnt_imported_cat) . "<br/>"; |
|
226 | - echo sprintf(_AM_SF_IMPORTED_QUESTIONS, $cnt_imported_faq) . "<br/>"; |
|
225 | + echo sprintf(_AM_SF_IMPORTED_CATEGORIES, $cnt_imported_cat)."<br/>"; |
|
226 | + echo sprintf(_AM_SF_IMPORTED_QUESTIONS, $cnt_imported_faq)."<br/>"; |
|
227 | 227 | |
228 | 228 | exit (); |
229 | 229 | } |
@@ -7,10 +7,10 @@ discard block |
||
7 | 7 | * Licence: GNU |
8 | 8 | */ |
9 | 9 | |
10 | -include_once __DIR__ . '/admin_header.php'; |
|
10 | +include_once __DIR__.'/admin_header.php'; |
|
11 | 11 | |
12 | 12 | // Creating the category handler object |
13 | -$category_handler =& sf_gethandler('category'); |
|
13 | +$category_handler = & sf_gethandler('category'); |
|
14 | 14 | |
15 | 15 | $op = ''; |
16 | 16 | |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | if (isset($_POST['op'])) $op = $_POST['op']; |
19 | 19 | |
20 | 20 | // Where do we start? |
21 | -$startcategory = isset($_GET['startcategory'])? intval($_GET['startcategory']) : 0; |
|
21 | +$startcategory = isset($_GET['startcategory']) ? intval($_GET['startcategory']) : 0; |
|
22 | 22 | |
23 | 23 | function displayCategory($categoryObj, $level = 0) |
24 | 24 | { |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | $description = $categoryObj->description(); |
27 | 27 | if (!XOOPS_USE_MULTIBYTES) { |
28 | 28 | if (strlen($description) >= 100) { |
29 | - $description = substr($description, 0, (100 -1)) . "..."; |
|
29 | + $description = substr($description, 0, (100-1))."..."; |
|
30 | 30 | } |
31 | 31 | } |
32 | - $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->categoryid() . "'><img src='". $pathIcon16 .'/edit.png'."' title='" . _AM_SF_EDITCOL . "' alt='" . _AM_SF_EDITCOL . "' /></a>"; |
|
33 | - $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->categoryid() . "'><img src='". $pathIcon16 .'/delete.png'."' title='" . _AM_SF_DELETECOL . "' alt='" . _AM_SF_DELETECOL . "' /></a>"; |
|
32 | + $modify = "<a href='category.php?op=mod&categoryid=".$categoryObj->categoryid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_EDITCOL."' alt='"._AM_SF_EDITCOL."' /></a>"; |
|
33 | + $delete = "<a href='category.php?op=del&categoryid=".$categoryObj->categoryid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETECOL."' alt='"._AM_SF_DELETECOL."' /></a>"; |
|
34 | 34 | |
35 | 35 | $spaces = ''; |
36 | 36 | for ($j = 0; $j < $level; ++$j) { |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | echo "<tr>"; |
41 | - echo "<td class='even' align='lefet'>" . $spaces . "<a href='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/category.php?categoryid=" . $categoryObj->categoryid() . "'><img src='" . XOOPS_URL . "/modules/smartfaq/assets/images/icon/subcat.gif' alt='' /> " . $categoryObj->name() . "</a></td>"; |
|
42 | - echo "<td class='even' align='left'>" . $description . "</td>"; |
|
43 | - echo "<td class='even' align='center'>" . $categoryObj->weight() . "</td>"; |
|
41 | + echo "<td class='even' align='lefet'>".$spaces."<a href='".XOOPS_URL."/modules/".$xoopsModule->dirname()."/category.php?categoryid=".$categoryObj->categoryid()."'><img src='".XOOPS_URL."/modules/smartfaq/assets/images/icon/subcat.gif' alt='' /> ".$categoryObj->name()."</a></td>"; |
|
42 | + echo "<td class='even' align='left'>".$description."</td>"; |
|
43 | + echo "<td class='even' align='center'>".$categoryObj->weight()."</td>"; |
|
44 | 44 | echo "<td class='even' align='center'> $modify $delete </td>"; |
45 | 45 | echo "</tr>"; |
46 | 46 | $subCategoriesObj = $category_handler->getCategories(0, 0, $categoryObj->categoryid()); |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | { |
58 | 58 | //$moderators = array(); // just to define the variable |
59 | 59 | //$allmods = array(); |
60 | - $startfaq = isset($_GET['startfaq'])? intval($_GET['startfaq']) : 0; |
|
60 | + $startfaq = isset($_GET['startfaq']) ? intval($_GET['startfaq']) : 0; |
|
61 | 61 | Global $category_handler, $xoopsUser, $xoopsUser, $myts, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $_GET; |
62 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
62 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
63 | 63 | |
64 | 64 | // Creating the faq handler object |
65 | - $faq_handler =& sf_gethandler('faq'); |
|
65 | + $faq_handler = & sf_gethandler('faq'); |
|
66 | 66 | |
67 | 67 | echo "<script type=\"text/javascript\" src=\"funcs.js\"></script>"; |
68 | 68 | echo "<style>"; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | exit(); |
86 | 86 | } |
87 | 87 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
88 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_EDITCOL . "</h3>"; |
|
88 | + echo "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_EDITCOL."</h3>"; |
|
89 | 89 | echo "<div id='bottomtable'>"; |
90 | 90 | } else { |
91 | 91 | $categoryObj = $category_handler->create(); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | echo "<br />\n"; |
96 | 96 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
97 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_CATEGORY_CREATE . "</h3>"; |
|
97 | + echo "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_CATEGORY_CREATE."</h3>"; |
|
98 | 98 | echo "<div id='bottomtable'>"; |
99 | 99 | } |
100 | 100 | // Start category form |
@@ -105,12 +105,12 @@ discard block |
||
105 | 105 | $sform->addElement(new XoopsFormText(_AM_SF_CATEGORY, 'name', 50, 255, $categoryObj->name('e')), true); |
106 | 106 | |
107 | 107 | // Parent Category |
108 | - $mytree = new XoopsTree( $xoopsDB -> prefix( "smartfaq_categories" ), "categoryid", "parentid" ); |
|
108 | + $mytree = new XoopsTree($xoopsDB -> prefix("smartfaq_categories"), "categoryid", "parentid"); |
|
109 | 109 | ob_start(); |
110 | - $mytree -> makeMySelBox( "name", "weight", $categoryObj->parentid(), 1, 'parentid' ); |
|
110 | + $mytree -> makeMySelBox("name", "weight", $categoryObj->parentid(), 1, 'parentid'); |
|
111 | 111 | |
112 | 112 | //makeMySelBox($title,$order="",$preset_id=0, $none=0, $sel_name="", $onchange="") |
113 | - $sform -> addElement( new XoopsFormLabel( _AM_SF_PARENT_CATEGORY_EXP, ob_get_contents() ) ); |
|
113 | + $sform -> addElement(new XoopsFormLabel(_AM_SF_PARENT_CATEGORY_EXP, ob_get_contents())); |
|
114 | 114 | ob_end_clean(); |
115 | 115 | |
116 | 116 | /* $mytree = new XoopsTree($xoopsDB->prefix("smartfaq_categories"), "categoryid" , "parentid"); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } |
140 | 140 | $sform->addElement($groups_read_checkbox); |
141 | 141 | // Apply permissions on all faqs |
142 | - $addapplyall_radio = new XoopsFormRadioYN(_AM_SF_PERMISSIONS_APPLY_ON_FAQS, 'applyall', 0, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . ''); |
|
142 | + $addapplyall_radio = new XoopsFormRadioYN(_AM_SF_PERMISSIONS_APPLY_ON_FAQS, 'applyall', 0, ' '._AM_SF_YES.'', ' '._AM_SF_NO.''); |
|
143 | 143 | $sform->addElement($addapplyall_radio); |
144 | 144 | // MODERATORS |
145 | 145 | //$moderators_tray = new XoopsFormElementTray(_AM_SF_MODERATORS_DEF, ''); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | $sform->addElement($moderators_tray); |
164 | 164 | */ |
165 | - $sform -> addElement( new XoopsFormHidden( 'categoryid', $categoryid ) ); |
|
165 | + $sform -> addElement(new XoopsFormHidden('categoryid', $categoryid)); |
|
166 | 166 | |
167 | 167 | // Action buttons tray |
168 | 168 | $button_tray = new XoopsFormElementTray('', ''); |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | echo "</div>"; |
205 | 205 | |
206 | 206 | if ($categoryid) { |
207 | - include_once XOOPS_ROOT_PATH . "/modules/smartfaq/include/displayfaqs.php"; |
|
207 | + include_once XOOPS_ROOT_PATH."/modules/smartfaq/include/displayfaqs.php"; |
|
208 | 208 | } |
209 | 209 | |
210 | 210 | unset($hidden); |
@@ -212,8 +212,8 @@ discard block |
||
212 | 212 | |
213 | 213 | switch ($op) { |
214 | 214 | case "mod": |
215 | - $categoryid = isset($_GET['categoryid'])? intval($_GET['categoryid']) : 0 ; |
|
216 | - $destList = isset($_POST['destList'])? $_POST['destList'] : ''; |
|
215 | + $categoryid = isset($_GET['categoryid']) ? intval($_GET['categoryid']) : 0; |
|
216 | + $destList = isset($_POST['destList']) ? $_POST['destList'] : ''; |
|
217 | 217 | $indexAdmin = new ModuleAdmin(); |
218 | 218 | xoops_cp_header(); |
219 | 219 | |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | case "addcategory": |
225 | 225 | global $_POST, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $modify, $myts, $categoryid; |
226 | 226 | |
227 | - $categoryid = (isset($_POST['categoryid']))? intval($_POST['categoryid']) : 0; |
|
227 | + $categoryid = (isset($_POST['categoryid'])) ? intval($_POST['categoryid']) : 0; |
|
228 | 228 | |
229 | 229 | if ($categoryid != 0) { |
230 | 230 | $categoryObj = new sfCategory($categoryid); |
@@ -235,9 +235,9 @@ discard block |
||
235 | 235 | //if (isset($_POST['allmods'])) $allmods = $_POST['allmods']; |
236 | 236 | //if (isset($_POST['moderators'])) $moderators = $_POST['moderators']; |
237 | 237 | |
238 | - $categoryObj->setVar('parentid', (isset($_POST['parentid']))? intval($_POST['parentid']) : 0); |
|
239 | - $applyall = (isset($_POST['applyall']))? intval($_POST['applyall']) : 0; |
|
240 | - $categoryObj->setVar('weight', (isset($_POST['weight']))? intval($_POST['weight']) : 1); |
|
238 | + $categoryObj->setVar('parentid', (isset($_POST['parentid'])) ? intval($_POST['parentid']) : 0); |
|
239 | + $applyall = (isset($_POST['applyall'])) ? intval($_POST['applyall']) : 0; |
|
240 | + $categoryObj->setVar('weight', (isset($_POST['weight'])) ? intval($_POST['weight']) : 1); |
|
241 | 241 | |
242 | 242 | // Groups and permissions |
243 | 243 | if (isset($_POST['groups_read'])) { |
@@ -259,8 +259,8 @@ discard block |
||
259 | 259 | $redirect_to = 'category.php'; |
260 | 260 | } |
261 | 261 | |
262 | - if ( !$categoryObj->store() ) { |
|
263 | - redirect_header("javascript:history.go(-1)", 3, _AM_SF_CATEGORY_SAVE_ERROR . sf_formatErrors($categoryObj->getErrors())); |
|
262 | + if (!$categoryObj->store()) { |
|
263 | + redirect_header("javascript:history.go(-1)", 3, _AM_SF_CATEGORY_SAVE_ERROR.sf_formatErrors($categoryObj->getErrors())); |
|
264 | 264 | exit; |
265 | 265 | } |
266 | 266 | // TODO : put this function in the category class |
@@ -283,16 +283,16 @@ discard block |
||
283 | 283 | $module_id = $xoopsModule->getVar('mid'); |
284 | 284 | $gperm_handler = &xoops_gethandler('groupperm'); |
285 | 285 | |
286 | - $categoryid = (isset($_POST['categoryid']))? intval($_POST['categoryid']) : 0; |
|
287 | - $categoryid = (isset($_GET['categoryid']))? intval($_GET['categoryid']) : $categoryid; |
|
286 | + $categoryid = (isset($_POST['categoryid'])) ? intval($_POST['categoryid']) : 0; |
|
287 | + $categoryid = (isset($_GET['categoryid'])) ? intval($_GET['categoryid']) : $categoryid; |
|
288 | 288 | |
289 | 289 | $categoryObj = new sfCategory($categoryid); |
290 | 290 | |
291 | - $confirm = (isset($_POST['confirm']))? $_POST['confirm'] : 0; |
|
292 | - $name = (isset($_POST['name']))? $_POST['name'] : ''; |
|
291 | + $confirm = (isset($_POST['confirm'])) ? $_POST['confirm'] : 0; |
|
292 | + $name = (isset($_POST['name'])) ? $_POST['name'] : ''; |
|
293 | 293 | |
294 | 294 | if ($confirm) { |
295 | - if ( !$category_handler->delete($categoryObj)) { |
|
295 | + if (!$category_handler->delete($categoryObj)) { |
|
296 | 296 | redirect_header("category.php", 1, _AM_SF_DELETE_CAT_ERROR); |
297 | 297 | exit; |
298 | 298 | } |
@@ -301,9 +301,9 @@ discard block |
||
301 | 301 | exit(); |
302 | 302 | } else { |
303 | 303 | // no confirm: show deletion condition |
304 | - $categoryid = (isset($_GET['categoryid']))? intval($_GET['categoryid']) : 0; |
|
304 | + $categoryid = (isset($_GET['categoryid'])) ? intval($_GET['categoryid']) : 0; |
|
305 | 305 | xoops_cp_header(); |
306 | - xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br /> <br />" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
306 | + xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_SF_DELETECOL." '".$categoryObj->name()."'. <br /> <br />"._AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
307 | 307 | xoops_cp_footer(); |
308 | 308 | } |
309 | 309 | exit(); |
@@ -328,16 +328,16 @@ discard block |
||
328 | 328 | $categoriesObj = $category_handler->getCategories($xoopsModuleConfig['perpage'], $startcategory, 0); |
329 | 329 | |
330 | 330 | sf_collapsableBar('toptable', 'toptableicon'); |
331 | - echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_CATEGORIES_TITLE . "</h3>"; |
|
331 | + echo "<img id='toptableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_CATEGORIES_TITLE."</h3>"; |
|
332 | 332 | echo "<div id='toptable'>"; |
333 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_CATEGORIES_DSC . "</span>"; |
|
333 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_SF_CATEGORIES_DSC."</span>"; |
|
334 | 334 | |
335 | 335 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
336 | 336 | echo "<tr>"; |
337 | - echo "<th width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . "</b></td>"; |
|
338 | - echo "<th class='bg3' align='left'><b>" . _AM_SF_DESCRIP . "</b></td>"; |
|
339 | - echo "<th class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . "</b></td>"; |
|
340 | - echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . "</b></td>"; |
|
337 | + echo "<th width='35%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME."</b></td>"; |
|
338 | + echo "<th class='bg3' align='left'><b>"._AM_SF_DESCRIP."</b></td>"; |
|
339 | + echo "<th class='bg3' width='65' align='center'><b>"._AM_SF_WEIGHT."</b></td>"; |
|
340 | + echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION."</b></td>"; |
|
341 | 341 | echo "</tr>"; |
342 | 342 | $totalCategories = $category_handler->getCategoriesCount(0); |
343 | 343 | if (count($categoriesObj) > 0) { |
@@ -347,14 +347,14 @@ discard block |
||
347 | 347 | } |
348 | 348 | } else { |
349 | 349 | echo "<tr>"; |
350 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . "</td>"; |
|
350 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOCAT."</td>"; |
|
351 | 351 | echo "</tr>"; |
352 | 352 | $categoryid = '0'; |
353 | 353 | } |
354 | 354 | echo "</table>\n"; |
355 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
355 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
356 | 356 | $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory'); |
357 | - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
357 | + echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
358 | 358 | echo "</div>"; |
359 | 359 | |
360 | 360 | editcat(false); |
@@ -362,4 +362,4 @@ discard block |
||
362 | 362 | break; |
363 | 363 | } |
364 | 364 | |
365 | -include_once __DIR__ . '/admin_footer.php'; |
|
365 | +include_once __DIR__.'/admin_footer.php'; |
@@ -22,7 +22,7 @@ |
||
22 | 22 | ." <div style='text-align: center;'>\n" |
23 | 23 | ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" |
24 | 24 | ." </div>\n" |
25 | - ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" |
|
25 | + ." "._AM_MODULEADMIN_ADMIN_FOOTER."\n" |
|
26 | 26 | ."</div>"; |
27 | 27 | |
28 | 28 | xoops_cp_footer(); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | // GIJOE <http://www.peak.ne.jp/> // |
14 | 14 | // ------------------------------------------------------------------------- // |
15 | 15 | |
16 | -include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
16 | +include_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
17 | 17 | include_once 'mygrouppermform.php'; |
18 | 18 | include_once(XOOPS_ROOT_PATH."/class/xoopsblock.php"); |
19 | 19 | include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->dirname()."/include/functions.php"; |
@@ -21,44 +21,44 @@ discard block |
||
21 | 21 | $xoops_system_path = XOOPS_ROOT_PATH."/modules/system"; |
22 | 22 | |
23 | 23 | // language files |
24 | -$language = $xoopsConfig['language'] ; |
|
24 | +$language = $xoopsConfig['language']; |
|
25 | 25 | if (!file_exists("$xoops_system_path/language/$language/admin/blocksadmin.php")) $language = 'english'; |
26 | 26 | |
27 | 27 | // to prevent from notice that constants already defined |
28 | 28 | $error_reporting_level = error_reporting(0); |
29 | -include_once( "$xoops_system_path/constants.php" ) ; |
|
30 | -include_once( "$xoops_system_path/language/$language/admin.php" ) ; |
|
31 | -include_once( "$xoops_system_path/language/$language/admin/blocksadmin.php" ) ; |
|
32 | -include_once XOOPS_ROOT_PATH . "/modules/smartfaq/include/functions.php"; |
|
33 | -error_reporting( $error_reporting_level ) ; |
|
29 | +include_once("$xoops_system_path/constants.php"); |
|
30 | +include_once("$xoops_system_path/language/$language/admin.php"); |
|
31 | +include_once("$xoops_system_path/language/$language/admin/blocksadmin.php"); |
|
32 | +include_once XOOPS_ROOT_PATH."/modules/smartfaq/include/functions.php"; |
|
33 | +error_reporting($error_reporting_level); |
|
34 | 34 | |
35 | -$group_defs = file( "$xoops_system_path/language/$language/admin/groups.php" ) ; |
|
35 | +$group_defs = file("$xoops_system_path/language/$language/admin/groups.php"); |
|
36 | 36 | foreach ($group_defs as $def) { |
37 | - if ( strstr( $def , '_AM_ACCESSRIGHTS' ) || strstr( $def , '_AM_ACTIVERIGHTS' ) ) eval( $def ) ; |
|
37 | + if (strstr($def, '_AM_ACCESSRIGHTS') || strstr($def, '_AM_ACTIVERIGHTS')) eval($def); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | // check $xoopsModule |
41 | -if ( ! is_object( $xoopsModule ) ) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; |
|
41 | +if (!is_object($xoopsModule)) redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
42 | 42 | |
43 | 43 | // check access right (needs system_admin of BLOCK) |
44 | -$sysperm_handler =& xoops_gethandler('groupperm'); |
|
45 | -if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; |
|
44 | +$sysperm_handler = & xoops_gethandler('groupperm'); |
|
45 | +if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
46 | 46 | |
47 | 47 | // get blocks owned by the module |
48 | -$block_arr =& XoopsBlock::getByModule( $xoopsModule->mid() ) ; |
|
48 | +$block_arr = & XoopsBlock::getByModule($xoopsModule->mid()); |
|
49 | 49 | |
50 | 50 | function list_blocks() |
51 | 51 | { |
52 | - global $block_arr, $xoopsModule ; |
|
52 | + global $block_arr, $xoopsModule; |
|
53 | 53 | |
54 | 54 | // cachetime options |
55 | 55 | $cachetimes = array('0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH); |
56 | 56 | |
57 | 57 | // displaying TH |
58 | 58 | sf_collapsableBar('toptable', 'toptableicon'); |
59 | - echo "<img id='toptableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_BLOCKS . "</h3>"; |
|
59 | + echo "<img id='toptableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_BLOCKS."</h3>"; |
|
60 | 60 | echo "<div id='toptable'>"; |
61 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_BLOCKSTXT . "</span>"; |
|
61 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">"._AM_SF_BLOCKSTXT."</span>"; |
|
62 | 62 | |
63 | 63 | echo " |
64 | 64 | <form action='admin.php' name='blockadmin' method='post'> |
@@ -73,69 +73,69 @@ discard block |
||
73 | 73 | </tr>\n" ; |
74 | 74 | |
75 | 75 | // blocks displaying loop |
76 | - $class = 'even' ; |
|
77 | - foreach ( array_keys( $block_arr ) as $i ) { |
|
76 | + $class = 'even'; |
|
77 | + foreach (array_keys($block_arr) as $i) { |
|
78 | 78 | $sseln = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = ""; |
79 | 79 | |
80 | - $weight = $block_arr[$i]->getVar("weight") ; |
|
81 | - $title = $block_arr[$i]->getVar("title") ; |
|
82 | - $name = $block_arr[$i]->getVar("name") ; |
|
83 | - $bcachetime = $block_arr[$i]->getVar("bcachetime") ; |
|
84 | - $bid = $block_arr[$i]->getVar("bid") ; |
|
80 | + $weight = $block_arr[$i]->getVar("weight"); |
|
81 | + $title = $block_arr[$i]->getVar("title"); |
|
82 | + $name = $block_arr[$i]->getVar("name"); |
|
83 | + $bcachetime = $block_arr[$i]->getVar("bcachetime"); |
|
84 | + $bid = $block_arr[$i]->getVar("bid"); |
|
85 | 85 | |
86 | 86 | // visible and side |
87 | - if ( $block_arr[$i]->getVar("visible") != 1 ) { |
|
87 | + if ($block_arr[$i]->getVar("visible") != 1) { |
|
88 | 88 | $sseln = " checked='checked' style='background-color:#FF0000;'"; |
89 | - } else switch ( $block_arr[$i]->getVar("side") ) { |
|
89 | + } else switch ($block_arr[$i]->getVar("side")) { |
|
90 | 90 | default : |
91 | 91 | case XOOPS_SIDEBLOCK_LEFT : |
92 | 92 | $ssel0 = " checked='checked' style='background-color:#00FF00;'"; |
93 | - break ; |
|
93 | + break; |
|
94 | 94 | case XOOPS_SIDEBLOCK_RIGHT : |
95 | 95 | $ssel1 = " checked='checked' style='background-color:#00FF00;'"; |
96 | - break ; |
|
96 | + break; |
|
97 | 97 | case XOOPS_CENTERBLOCK_LEFT : |
98 | 98 | $ssel2 = " checked='checked' style='background-color:#00FF00;'"; |
99 | - break ; |
|
99 | + break; |
|
100 | 100 | case XOOPS_CENTERBLOCK_RIGHT : |
101 | 101 | $ssel4 = " checked='checked' style='background-color:#00FF00;'"; |
102 | - break ; |
|
102 | + break; |
|
103 | 103 | case XOOPS_CENTERBLOCK_CENTER : |
104 | 104 | $ssel3 = " checked='checked' style='background-color:#00FF00;'"; |
105 | - break ; |
|
105 | + break; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | // bcachetime |
109 | - $cachetime_options = '' ; |
|
109 | + $cachetime_options = ''; |
|
110 | 110 | foreach ($cachetimes as $cachetime => $cachetime_name) { |
111 | 111 | if ($bcachetime == $cachetime) { |
112 | - $cachetime_options .= "<option value='$cachetime' selected='selected'>$cachetime_name</option>\n" ; |
|
112 | + $cachetime_options .= "<option value='$cachetime' selected='selected'>$cachetime_name</option>\n"; |
|
113 | 113 | } else { |
114 | - $cachetime_options .= "<option value='$cachetime'>$cachetime_name</option>\n" ; |
|
114 | + $cachetime_options .= "<option value='$cachetime'>$cachetime_name</option>\n"; |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
118 | 118 | // target modules |
119 | - $db =& XoopsDatabaseFactory::getDatabaseConnection(); |
|
120 | - $result = $db->query( "SELECT module_id FROM ".$db->prefix('block_module_link')." WHERE block_id='$bid'" ) ; |
|
119 | + $db = & XoopsDatabaseFactory::getDatabaseConnection(); |
|
120 | + $result = $db->query("SELECT module_id FROM ".$db->prefix('block_module_link')." WHERE block_id='$bid'"); |
|
121 | 121 | $selected_mids = array(); |
122 | - while ( list( $selected_mid ) = $db->fetchRow( $result ) ) { |
|
123 | - $selected_mids[] = intval( $selected_mid ) ; |
|
122 | + while (list($selected_mid) = $db->fetchRow($result)) { |
|
123 | + $selected_mids[] = intval($selected_mid); |
|
124 | 124 | } |
125 | - $module_handler =& xoops_gethandler('module'); |
|
125 | + $module_handler = & xoops_gethandler('module'); |
|
126 | 126 | $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); |
127 | 127 | $criteria->add(new Criteria('isactive', 1)); |
128 | - $module_list =& $module_handler->getList($criteria); |
|
128 | + $module_list = & $module_handler->getList($criteria); |
|
129 | 129 | $module_list[-1] = _AM_TOPPAGE; |
130 | 130 | $module_list[0] = _AM_ALLPAGES; |
131 | 131 | ksort($module_list); |
132 | - $module_options = '' ; |
|
132 | + $module_options = ''; |
|
133 | 133 | $myts = &MyTextSanitizer::getInstance(); |
134 | 134 | foreach ($module_list as $mid => $mname) { |
135 | - if ( in_array( $mid , $selected_mids ) ) { |
|
136 | - $module_options .= "<option value='$mid' selected='selected'>" . $myts->displayTarea($mname) . "</option>\n" ; |
|
135 | + if (in_array($mid, $selected_mids)) { |
|
136 | + $module_options .= "<option value='$mid' selected='selected'>".$myts->displayTarea($mname)."</option>\n"; |
|
137 | 137 | } else { |
138 | - $module_options .= "<option value='$mid'>" . $myts->displayTarea($mname) . "</option>\n" ; |
|
138 | + $module_options .= "<option value='$mid'>".$myts->displayTarea($mname)."</option>\n"; |
|
139 | 139 | } |
140 | 140 | } |
141 | 141 | |
@@ -171,9 +171,9 @@ discard block |
||
171 | 171 | <a href='admin.php?fct=blocksadmin&op=edit&bid=$bid'>"._EDIT."</a> |
172 | 172 | <input type='hidden' name='bid[$bid]' value='$bid' /> |
173 | 173 | </td> |
174 | - </tr>\n" ; |
|
174 | + </tr>\n"; |
|
175 | 175 | |
176 | - $class = ( $class == 'even' )? 'odd' : 'even' ; |
|
176 | + $class = ($class == 'even') ? 'odd' : 'even'; |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | echo " |
@@ -191,35 +191,35 @@ discard block |
||
191 | 191 | |
192 | 192 | function list_groups() |
193 | 193 | { |
194 | - global $xoopsModule , $block_arr ; |
|
194 | + global $xoopsModule, $block_arr; |
|
195 | 195 | $myts = &MyTextSanitizer::getInstance(); |
196 | 196 | |
197 | 197 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
198 | 198 | |
199 | - foreach ( array_keys( $block_arr ) as $i ) { |
|
200 | - $item_list[ $block_arr[$i]->getVar("bid") ] = $block_arr[$i]->getVar("title") ; |
|
199 | + foreach (array_keys($block_arr) as $i) { |
|
200 | + $item_list[$block_arr[$i]->getVar("bid")] = $block_arr[$i]->getVar("title"); |
|
201 | 201 | } |
202 | 202 | |
203 | - $form = new MyXoopsGroupPermForm('' , 1 , 'block_read' , "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_GROUPS . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" . _AM_SF_GROUPSINFO . "</span>") ; |
|
204 | - $form->addAppendix('module_admin',$xoopsModule->mid(),$xoopsModule->name().' '._AM_ACTIVERIGHTS); |
|
205 | - $form->addAppendix('module_read',$xoopsModule->mid(),$xoopsModule->name().' '._AM_ACCESSRIGHTS); |
|
203 | + $form = new MyXoopsGroupPermForm('', 1, 'block_read', "<img id='bottomtableicon' src=".XOOPS_URL."/modules/".$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_GROUPS."</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"._AM_SF_GROUPSINFO."</span>"); |
|
204 | + $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name().' '._AM_ACTIVERIGHTS); |
|
205 | + $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name().' '._AM_ACCESSRIGHTS); |
|
206 | 206 | foreach ($item_list as $item_id => $item_name) { |
207 | - $form->addItem( $item_id , $myts->displayTarea($item_name) ) ; |
|
207 | + $form->addItem($item_id, $myts->displayTarea($item_name)); |
|
208 | 208 | } |
209 | - echo $form->render() ; |
|
209 | + echo $form->render(); |
|
210 | 210 | echo "</div>"; |
211 | 211 | } |
212 | 212 | |
213 | 213 | if (!empty($_POST['submit'])) { |
214 | - include __DIR__ . '/mygroupperm.php' ; |
|
215 | - include_once( "$xoops_system_path/language/$language/admin.php" ) ; |
|
216 | - redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/myblocksadmin.php" , 1 , _AM_DBUPDATED ); |
|
214 | + include __DIR__.'/mygroupperm.php'; |
|
215 | + include_once("$xoops_system_path/language/$language/admin.php"); |
|
216 | + redirect_header(XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/myblocksadmin.php", 1, _AM_DBUPDATED); |
|
217 | 217 | } |
218 | 218 | |
219 | -xoops_cp_header() ; |
|
219 | +xoops_cp_header(); |
|
220 | 220 | if (file_exists('./mymenu.php')) include('./mymenu.php'); |
221 | 221 | //sf_adminMenu(5, _AM_SF_BLOCKSANDGROUPS); |
222 | 222 | |
223 | -list_blocks() ; |
|
224 | -list_groups() ; |
|
225 | -xoops_cp_footer() ; |
|
223 | +list_blocks(); |
|
224 | +list_groups(); |
|
225 | +xoops_cp_footer(); |
@@ -7,9 +7,9 @@ discard block |
||
7 | 7 | * Licence: GNU |
8 | 8 | */ |
9 | 9 | |
10 | -include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
10 | +include_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
11 | 11 | |
12 | -$op = 'go';//'start'; |
|
12 | +$op = 'go'; //'start'; |
|
13 | 13 | |
14 | 14 | if (isset($HTTP_POST_VARS['op']) && ($HTTP_POST_VARS['op'] == 'go')) { |
15 | 15 | $op = $HTTP_POST_VARS['op']; |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | if ($op == 'start') { |
19 | 19 | include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
20 | 20 | |
21 | - xoops_cp_header (); |
|
21 | + xoops_cp_header(); |
|
22 | 22 | |
23 | - xoops_cp_footer (); |
|
23 | + xoops_cp_footer(); |
|
24 | 24 | exit (); |
25 | 25 | } |
26 | 26 | |
@@ -45,48 +45,48 @@ discard block |
||
45 | 45 | |
46 | 46 | echo " <title>{module title}</title>\r\n"; |
47 | 47 | |
48 | - $resultC = $xoopsDB->query ("select * from ".$xoopsDB->prefix("smartfaq_categories")); |
|
49 | - while ($arrC = $xoopsDB->fetchArray ($resultC)) { |
|
50 | - extract ($arrC, EXTR_PREFIX_ALL, 'c'); |
|
48 | + $resultC = $xoopsDB->query("select * from ".$xoopsDB->prefix("smartfaq_categories")); |
|
49 | + while ($arrC = $xoopsDB->fetchArray($resultC)) { |
|
50 | + extract($arrC, EXTR_PREFIX_ALL, 'c'); |
|
51 | 51 | |
52 | 52 | echo " <qandadiv ID=\"c$c_categoryid\" Revision=\"$c_created\">\r\n"; |
53 | - echo " <title>".encodeText ($c_name)."</title>\r\n"; |
|
54 | - echo " <para>".encodeText ($c_description)."</para>\r\n"; |
|
53 | + echo " <title>".encodeText($c_name)."</title>\r\n"; |
|
54 | + echo " <para>".encodeText($c_description)."</para>\r\n"; |
|
55 | 55 | |
56 | - $resultQ = $xoopsDB->query ("select * from ".$xoopsDB->prefix("smartfaq_faq")." where categoryid=$c_categoryid"); |
|
57 | - while ($arrQ = $xoopsDB->fetchArray ($resultQ)) { |
|
58 | - extract ($arrQ, EXTR_PREFIX_ALL, 'q'); |
|
56 | + $resultQ = $xoopsDB->query("select * from ".$xoopsDB->prefix("smartfaq_faq")." where categoryid=$c_categoryid"); |
|
57 | + while ($arrQ = $xoopsDB->fetchArray($resultQ)) { |
|
58 | + extract($arrQ, EXTR_PREFIX_ALL, 'q'); |
|
59 | 59 | |
60 | - echo " <qandaentry ID=\"q$q_faqid\" Revision=\"$q_datesub\" Condition=\"$q_html $q_smiley $q_xcodes\" XrefLabel=\"$q_modulelink $q_contextpage\" Vendor=\"".getUserFullName ($q_uid)."\">\r\n"; |
|
60 | + echo " <qandaentry ID=\"q$q_faqid\" Revision=\"$q_datesub\" Condition=\"$q_html $q_smiley $q_xcodes\" XrefLabel=\"$q_modulelink $q_contextpage\" Vendor=\"".getUserFullName($q_uid)."\">\r\n"; |
|
61 | 61 | echo " <question>\r\n"; |
62 | - echo " <para>".encodeText ($q_question)."</para>\r\n"; |
|
62 | + echo " <para>".encodeText($q_question)."</para>\r\n"; |
|
63 | 63 | if (!empty ($q_howdoi)) { |
64 | 64 | echo " <note Conformance=\"howdoi\">\r\n"; |
65 | 65 | echo " <title>{'How do I' from language file}</title>\r\n"; |
66 | - echo " <para>".encodeText ($q_howdoi)."</para>\r\n"; |
|
66 | + echo " <para>".encodeText($q_howdoi)."</para>\r\n"; |
|
67 | 67 | echo " </note>\r\n"; |
68 | 68 | } |
69 | 69 | if (!empty ($q_diduno)) { |
70 | 70 | echo " <note Conformance=\"diduno\">\r\n"; |
71 | 71 | echo " <title>{'Did you know' from language file}</title>\r\n"; |
72 | - echo " <para>".encodeText ($q_diduno)."</para>\r\n"; |
|
72 | + echo " <para>".encodeText($q_diduno)."</para>\r\n"; |
|
73 | 73 | echo " </note>\r\n"; |
74 | 74 | } |
75 | 75 | echo " </question>\r\n"; |
76 | 76 | |
77 | - $resultA = $xoopsDB->query ("select * from ".$xoopsDB->prefix("smartfaq_answers")." where answerid=$q_answerid"); |
|
78 | - while ($arrA = $xoopsDB->fetchArray ($resultA)) { |
|
79 | - extract ($arrA, EXTR_PREFIX_ALL, 'a'); |
|
77 | + $resultA = $xoopsDB->query("select * from ".$xoopsDB->prefix("smartfaq_answers")." where answerid=$q_answerid"); |
|
78 | + while ($arrA = $xoopsDB->fetchArray($resultA)) { |
|
79 | + extract($arrA, EXTR_PREFIX_ALL, 'a'); |
|
80 | 80 | |
81 | - echo " <answer ID=\"a$a_answerid\" Revision=\"$a_datesub\" Vendor=\"".getUserFullName ($a_uid)."\">\r\n"; |
|
82 | - echo " <para>".encodeText ($a_answer)."</para>\r\n"; |
|
81 | + echo " <answer ID=\"a$a_answerid\" Revision=\"$a_datesub\" Vendor=\"".getUserFullName($a_uid)."\">\r\n"; |
|
82 | + echo " <para>".encodeText($a_answer)."</para>\r\n"; |
|
83 | 83 | echo " </answer>\r\n"; |
84 | 84 | } |
85 | - mysql_free_result ($resultA); |
|
85 | + mysql_free_result($resultA); |
|
86 | 86 | |
87 | 87 | echo " </qandaentry>\r\n"; |
88 | 88 | } |
89 | - mysql_free_result ($resultQ); |
|
89 | + mysql_free_result($resultQ); |
|
90 | 90 | |
91 | 91 | echo " </qandadiv>\r\n"; |
92 | 92 | } |
@@ -96,12 +96,12 @@ discard block |
||
96 | 96 | exit(); |
97 | 97 | } |
98 | 98 | |
99 | -function encodeText ( $text ) |
|
99 | +function encodeText($text) |
|
100 | 100 | { |
101 | - return utf8_encode (htmlspecialchars ($text)); |
|
101 | + return utf8_encode(htmlspecialchars($text)); |
|
102 | 102 | } |
103 | 103 | |
104 | -function getUserFullName ( $uid ) |
|
104 | +function getUserFullName($uid) |
|
105 | 105 | { |
106 | 106 | global $xoopsDB; |
107 | 107 |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * Licence: GNU |
8 | 8 | */ |
9 | 9 | |
10 | -include_once __DIR__ . '/admin_header.php'; |
|
10 | +include_once __DIR__.'/admin_header.php'; |
|
11 | 11 | $myts = &MyTextSanitizer::getInstance(); |
12 | 12 | |
13 | 13 | Global $xoopsModule; |
@@ -41,46 +41,46 @@ discard block |
||
41 | 41 | echo "</table>"; |
42 | 42 | */ |
43 | 43 | // Left headings... |
44 | -echo "<img src='" . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/" . $versioninfo->getInfo('image') . "' alt='' hspace='0' vspace='0' align='left' style='margin-right: 10px;'/></a>"; |
|
45 | -echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " version " . $versioninfo->getInfo('version') . " (" . $versioninfo->getInfo('status_version') . ")</div>"; |
|
44 | +echo "<img src='".XOOPS_URL."/modules/".$xoopsModule->getVar('dirname')."/".$versioninfo->getInfo('image')."' alt='' hspace='0' vspace='0' align='left' style='margin-right: 10px;'/></a>"; |
|
45 | +echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>".$versioninfo->getInfo('name')." version ".$versioninfo->getInfo('version')." (".$versioninfo->getInfo('status_version').")</div>"; |
|
46 | 46 | if ($versioninfo->getInfo('author_realname') != '') { |
47 | - $author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; |
|
47 | + $author_name = $versioninfo->getInfo('author')." (".$versioninfo->getInfo('author_realname').")"; |
|
48 | 48 | } else { |
49 | 49 | $author_name = $versioninfo->getInfo('author'); |
50 | 50 | } |
51 | 51 | |
52 | -echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>" . _AM_SF_BY . " " . $author_name; |
|
52 | +echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>"._AM_SF_BY." ".$author_name; |
|
53 | 53 | echo "</div>"; |
54 | -echo "<div style = 'line-height: 16px; display: block;'>" . $versioninfo->getInfo('license') . "</div>\n"; |
|
54 | +echo "<div style = 'line-height: 16px; display: block;'>".$versioninfo->getInfo('license')."</div>\n"; |
|
55 | 55 | |
56 | 56 | // Developers Information |
57 | 57 | echo "<br /><table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
58 | 58 | echo "<tr>"; |
59 | -echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_AUTHOR_INFO . "</b></td>"; |
|
59 | +echo "<td colspan='2' class='bg3' align='left'><b>"._MI_SF_AUTHOR_INFO."</b></td>"; |
|
60 | 60 | echo "</tr>"; |
61 | 61 | |
62 | 62 | if ($versioninfo->getInfo('developer_lead') != '') { |
63 | 63 | echo "<tr>"; |
64 | - echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_LEAD . "</td>"; |
|
65 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_lead') . "</td>"; |
|
64 | + echo "<td class='head' width = '150px' align='left'>"._MI_SF_DEVELOPER_LEAD."</td>"; |
|
65 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('developer_lead')."</td>"; |
|
66 | 66 | echo "</tr>"; |
67 | 67 | } |
68 | 68 | if ($versioninfo->getInfo('developer_contributor') != '') { |
69 | 69 | echo "<tr>"; |
70 | - echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_CONTRIBUTOR . "</td>"; |
|
71 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_contributor') . "</td>"; |
|
70 | + echo "<td class='head' width = '150px' align='left'>"._MI_SF_DEVELOPER_CONTRIBUTOR."</td>"; |
|
71 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('developer_contributor')."</td>"; |
|
72 | 72 | echo "</tr>"; |
73 | 73 | } |
74 | 74 | if ($versioninfo->getInfo('developer_website_url') != '') { |
75 | 75 | echo "<tr>"; |
76 | - echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_WEBSITE . "</td>"; |
|
77 | - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('developer_website_url') . "' target='blank'>" . $versioninfo->getInfo('developer_website_name') . "</a></td>"; |
|
76 | + echo "<td class='head' width = '150px' align='left'>"._MI_SF_DEVELOPER_WEBSITE."</td>"; |
|
77 | + echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('developer_website_url')."' target='blank'>".$versioninfo->getInfo('developer_website_name')."</a></td>"; |
|
78 | 78 | echo "</tr>"; |
79 | 79 | } |
80 | 80 | if ($versioninfo->getInfo('developer_email') != '') { |
81 | 81 | echo "<tr>"; |
82 | - echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_EMAIL . "</td>"; |
|
83 | - echo "<td class='even' align='left'><a href='mailto:" . $versioninfo->getInfo('developer_email') . "'>" . $versioninfo->getInfo('developer_email') . "</a></td>"; |
|
82 | + echo "<td class='head' width = '150px' align='left'>"._MI_SF_DEVELOPER_EMAIL."</td>"; |
|
83 | + echo "<td class='even' align='left'><a href='mailto:".$versioninfo->getInfo('developer_email')."'>".$versioninfo->getInfo('developer_email')."</a></td>"; |
|
84 | 84 | echo "</tr>"; |
85 | 85 | } |
86 | 86 | |
@@ -89,47 +89,47 @@ discard block |
||
89 | 89 | // Module Developpment information |
90 | 90 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
91 | 91 | echo "<tr>"; |
92 | -echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_MODULE_INFO . "</b></td>"; |
|
92 | +echo "<td colspan='2' class='bg3' align='left'><b>"._MI_SF_MODULE_INFO."</b></td>"; |
|
93 | 93 | echo "</tr>"; |
94 | 94 | |
95 | 95 | if ($versioninfo->getInfo('date') != '') { |
96 | 96 | echo "<tr>"; |
97 | - echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_RELEASE_DATE . "</td>"; |
|
98 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('date') . "</td>"; |
|
97 | + echo "<td class='head' width = '200' align='left'>"._MI_SF_MODULE_RELEASE_DATE."</td>"; |
|
98 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('date')."</td>"; |
|
99 | 99 | echo "</tr>"; |
100 | 100 | } |
101 | 101 | |
102 | 102 | if ($versioninfo->getInfo('status') != '') { |
103 | 103 | echo "<tr>"; |
104 | - echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_STATUS . "</td>"; |
|
105 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('status') . "</td>"; |
|
104 | + echo "<td class='head' width = '200' align='left'>"._MI_SF_MODULE_STATUS."</td>"; |
|
105 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('status')."</td>"; |
|
106 | 106 | echo "</tr>"; |
107 | 107 | } |
108 | 108 | |
109 | 109 | if ($versioninfo->getInfo('demo_site_url') != '') { |
110 | 110 | echo "<tr>"; |
111 | - echo "<td class='head' align='left'>" . _MI_SF_MODULE_DEMO . "</td>"; |
|
112 | - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('demo_site_url') . "' target='blank'>" . $versioninfo->getInfo('demo_site_name') . "</a></td>"; |
|
111 | + echo "<td class='head' align='left'>"._MI_SF_MODULE_DEMO."</td>"; |
|
112 | + echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('demo_site_url')."' target='blank'>".$versioninfo->getInfo('demo_site_name')."</a></td>"; |
|
113 | 113 | echo "</tr>"; |
114 | 114 | } |
115 | 115 | |
116 | 116 | if ($versioninfo->getInfo('support_site_url') != '') { |
117 | 117 | echo "<tr>"; |
118 | - echo "<td class='head' align='left'>" . _MI_SF_MODULE_SUPPORT . "</td>"; |
|
119 | - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('support_site_url') . "' target='blank'>" . $versioninfo->getInfo('support_site_name') . "</a></td>"; |
|
118 | + echo "<td class='head' align='left'>"._MI_SF_MODULE_SUPPORT."</td>"; |
|
119 | + echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('support_site_url')."' target='blank'>".$versioninfo->getInfo('support_site_name')."</a></td>"; |
|
120 | 120 | echo "</tr>"; |
121 | 121 | } |
122 | 122 | |
123 | 123 | if ($versioninfo->getInfo('submit_bug') != '') { |
124 | 124 | echo "<tr>"; |
125 | - echo "<td class='head' align='left'>" . _MI_SF_MODULE_BUG . "</td>"; |
|
126 | - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_bug') . "' target='blank'>" . "Submit a Bug in SmartFAQ Bug Tracker" . "</a></td>"; |
|
125 | + echo "<td class='head' align='left'>"._MI_SF_MODULE_BUG."</td>"; |
|
126 | + echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('submit_bug')."' target='blank'>"."Submit a Bug in SmartFAQ Bug Tracker"."</a></td>"; |
|
127 | 127 | echo "</tr>"; |
128 | 128 | } |
129 | 129 | if ($versioninfo->getInfo('submit_feature') != '') { |
130 | 130 | echo "<tr>"; |
131 | - echo "<td class='head' align='left'>" . _MI_SF_MODULE_FEATURE . "</td>"; |
|
132 | - echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_feature') . "' target='blank'>" . "Request a feature in the SmartFAQ Feature Tracker" . "</a></td>"; |
|
131 | + echo "<td class='head' align='left'>"._MI_SF_MODULE_FEATURE."</td>"; |
|
132 | + echo "<td class='even' align='left'><a href='".$versioninfo->getInfo('submit_feature')."' target='blank'>"."Request a feature in the SmartFAQ Feature Tracker"."</a></td>"; |
|
133 | 133 | echo "</tr>"; |
134 | 134 | } |
135 | 135 | |
@@ -139,11 +139,11 @@ discard block |
||
139 | 139 | echo "<br />\n"; |
140 | 140 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
141 | 141 | echo "<tr>"; |
142 | - echo "<td class='bg3' align='left'><b>" . _MI_SF_MODULE_DISCLAIMER . "</b></td>"; |
|
142 | + echo "<td class='bg3' align='left'><b>"._MI_SF_MODULE_DISCLAIMER."</b></td>"; |
|
143 | 143 | echo "</tr>"; |
144 | 144 | |
145 | 145 | echo "<tr>"; |
146 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('warning') . "</td>"; |
|
146 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('warning')."</td>"; |
|
147 | 147 | echo "</tr>"; |
148 | 148 | |
149 | 149 | echo "</table>"; |
@@ -153,11 +153,11 @@ discard block |
||
153 | 153 | echo "<br />\n"; |
154 | 154 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
155 | 155 | echo "<tr>"; |
156 | - echo "<td class='bg3' align='left'><b>" . _MI_SF_AUTHOR_WORD . "</b></td>"; |
|
156 | + echo "<td class='bg3' align='left'><b>"._MI_SF_AUTHOR_WORD."</b></td>"; |
|
157 | 157 | echo "</tr>"; |
158 | 158 | |
159 | 159 | echo "<tr>"; |
160 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('author_word') . "</td>"; |
|
160 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('author_word')."</td>"; |
|
161 | 161 | echo "</tr>"; |
162 | 162 | |
163 | 163 | echo "</table>"; |
@@ -168,11 +168,11 @@ discard block |
||
168 | 168 | echo "<br />\n"; |
169 | 169 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
170 | 170 | echo "<tr>"; |
171 | - echo "<td class='bg3' align='left'><b>" . _MI_SF_VERSION_HISTORY . "</b></td>"; |
|
171 | + echo "<td class='bg3' align='left'><b>"._MI_SF_VERSION_HISTORY."</b></td>"; |
|
172 | 172 | echo "</tr>"; |
173 | 173 | |
174 | 174 | echo "<tr>"; |
175 | - echo "<td class='even' align='left'>" . $versioninfo->getInfo('version_history') . "</td>"; |
|
175 | + echo "<td class='even' align='left'>".$versioninfo->getInfo('version_history')."</td>"; |
|
176 | 176 | echo "</tr>"; |
177 | 177 | |
178 | 178 | echo "</table>"; |
@@ -182,4 +182,4 @@ discard block |
||
182 | 182 | //$modfooter = sf_modFooter(); |
183 | 183 | //echo "<div align='center'>" . $modfooter . "</div>"; |
184 | 184 | //xoops_cp_footer(); |
185 | -include_once __DIR__ . '/admin_footer.php'; |
|
185 | +include_once __DIR__.'/admin_footer.php'; |