@@ -12,12 +12,12 @@ discard block |
||
| 12 | 12 | // GIJOE <http://www.peak.ne.jp/> // |
| 13 | 13 | // ------------------------------------------------------------------------- // |
| 14 | 14 | |
| 15 | -include_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 16 | -include_once __DIR__ . '/mygrouppermform.php'; |
|
| 17 | -include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
| 18 | -include_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->dirname() . '/include/functions.php'; |
|
| 15 | +include_once __DIR__.'/../../../include/cp_header.php'; |
|
| 16 | +include_once __DIR__.'/mygrouppermform.php'; |
|
| 17 | +include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
| 18 | +include_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->dirname().'/include/functions.php'; |
|
| 19 | 19 | |
| 20 | -$xoops_system_path = XOOPS_ROOT_PATH . '/modules/system'; |
|
| 20 | +$xoops_system_path = XOOPS_ROOT_PATH.'/modules/system'; |
|
| 21 | 21 | |
| 22 | 22 | // language files |
| 23 | 23 | $language = $xoopsConfig['language']; |
@@ -27,10 +27,10 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | // to prevent from notice that constants already defined |
| 29 | 29 | $error_reporting_level = error_reporting(0); |
| 30 | -include_once __DIR__ . '/../../system/constants.php'; |
|
| 31 | -include_once __DIR__ . "/../../language/$language/admin.php"; |
|
| 32 | -include_once __DIR__ . "/../../language/$language/admin/blocksadmin.php"; |
|
| 33 | -include_once __DIR__ . '/../include/functions.php'; |
|
| 30 | +include_once __DIR__.'/../../system/constants.php'; |
|
| 31 | +include_once __DIR__."/../../language/$language/admin.php"; |
|
| 32 | +include_once __DIR__."/../../language/$language/admin/blocksadmin.php"; |
|
| 33 | +include_once __DIR__.'/../include/functions.php'; |
|
| 34 | 34 | error_reporting($error_reporting_level); |
| 35 | 35 | |
| 36 | 36 | $group_defs = file("$xoops_system_path/language/$language/admin/groups.php"); |
@@ -42,13 +42,13 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | // check $xoopsModule |
| 44 | 44 | if (!is_object($xoopsModule)) { |
| 45 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
| 45 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | // check access right (needs system_admin of BLOCK) |
| 49 | 49 | $syspermHandler = xoops_getHandler('groupperm'); |
| 50 | 50 | if (!$syspermHandler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) { |
| 51 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
| 51 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | // get blocks owned by the module |
@@ -75,20 +75,20 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | // displaying TH |
| 77 | 77 | sf_collapsableBar('toptable', 'toptableicon'); |
| 78 | - echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_BLOCKS . '</h3>'; |
|
| 78 | + echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_BLOCKS.'</h3>'; |
|
| 79 | 79 | echo "<div id='toptable'>"; |
| 80 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_BLOCKSTXT . '</span>'; |
|
| 80 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_BLOCKSTXT.'</span>'; |
|
| 81 | 81 | |
| 82 | 82 | echo " |
| 83 | 83 | <form action='admin.php' name='blockadmin' method='post'> |
| 84 | 84 | <table width='100%' class='outer' cellpadding='4' cellspacing='1'> |
| 85 | 85 | <tr valign='middle'> |
| 86 | - <th>" . _AM_TITLE . "</th> |
|
| 87 | - <th align='center' nowrap='nowrap'>" . _AM_SF_POSITION . "</th> |
|
| 88 | - <th align='center'>" . _AM_WEIGHT . "</th> |
|
| 89 | - <th align='center'>" . _AM_VISIBLEIN . "</th> |
|
| 90 | - <th align='center'>" . _AM_BCACHETIME . "</th> |
|
| 91 | - <th align='center'>" . _AM_ACTION . "</th> |
|
| 86 | + <th>" . _AM_TITLE."</th> |
|
| 87 | + <th align='center' nowrap='nowrap'>" . _AM_SF_POSITION."</th> |
|
| 88 | + <th align='center'>" . _AM_WEIGHT."</th> |
|
| 89 | + <th align='center'>" . _AM_VISIBLEIN."</th> |
|
| 90 | + <th align='center'>" . _AM_BCACHETIME."</th> |
|
| 91 | + <th align='center'>" . _AM_ACTION."</th> |
|
| 92 | 92 | </tr>\n"; |
| 93 | 93 | |
| 94 | 94 | // blocks displaying loop |
@@ -138,10 +138,10 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | // target modules |
| 140 | 140 | $db = XoopsDatabaseFactory::getDatabaseConnection(); |
| 141 | - $result = $db->query('SELECT module_id FROM ' . $db->prefix('block_module_link') . " WHERE block_id='$bid'"); |
|
| 141 | + $result = $db->query('SELECT module_id FROM '.$db->prefix('block_module_link')." WHERE block_id='$bid'"); |
|
| 142 | 142 | $selected_mids = array(); |
| 143 | 143 | while (list($selected_mid) = $db->fetchRow($result)) { |
| 144 | - $selected_mids[] = (int)$selected_mid; |
|
| 144 | + $selected_mids[] = (int) $selected_mid; |
|
| 145 | 145 | } |
| 146 | 146 | /** @var XoopsModuleHandler $moduleHandler */ |
| 147 | 147 | $moduleHandler = xoops_getHandler('module'); |
@@ -155,9 +155,9 @@ discard block |
||
| 155 | 155 | $myts = MyTextSanitizer::getInstance(); |
| 156 | 156 | foreach ($module_list as $mid => $mname) { |
| 157 | 157 | if (in_array($mid, $selected_mids)) { |
| 158 | - $module_options .= "<option value='$mid' selected>" . $myts->displayTarea($mname) . "</option>\n"; |
|
| 158 | + $module_options .= "<option value='$mid' selected>".$myts->displayTarea($mname)."</option>\n"; |
|
| 159 | 159 | } else { |
| 160 | - $module_options .= "<option value='$mid'>" . $myts->displayTarea($mname) . "</option>\n"; |
|
| 160 | + $module_options .= "<option value='$mid'>".$myts->displayTarea($mname)."</option>\n"; |
|
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | 163 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | <td class='foot' align='center' colspan='6'> |
| 218 | 218 | <input type='hidden' name='fct' value='blocksadmin' /> |
| 219 | 219 | <input type='hidden' name='op' value='order' /> |
| 220 | - <input type='submit' name='submit' value='" . _SUBMIT . "' /> |
|
| 220 | + <input type='submit' name='submit' value='" . _SUBMIT."' /> |
|
| 221 | 221 | </td> |
| 222 | 222 | </tr> |
| 223 | 223 | </table> |
@@ -245,8 +245,8 @@ discard block |
||
| 245 | 245 | . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
| 246 | 246 | . _AM_SF_GROUPSINFO |
| 247 | 247 | . '</span>'); |
| 248 | - $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACTIVERIGHTS); |
|
| 249 | - $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACCESSRIGHTS); |
|
| 248 | + $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name().' '._AM_ACTIVERIGHTS); |
|
| 249 | + $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name().' '._AM_ACCESSRIGHTS); |
|
| 250 | 250 | foreach ($item_list as $item_id => $item_name) { |
| 251 | 251 | $form->addItem($item_id, $myts->displayTarea($item_name)); |
| 252 | 252 | } |
@@ -255,14 +255,14 @@ discard block |
||
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | if (!empty($_POST['submit'])) { |
| 258 | - include __DIR__ . '/mygroupperm.php'; |
|
| 258 | + include __DIR__.'/mygroupperm.php'; |
|
| 259 | 259 | include_once "$xoops_system_path/language/$language/admin.php"; |
| 260 | - redirect_header(XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/admin/myblocksadmin.php', 1, _AM_DBUPDATED); |
|
| 260 | + redirect_header(XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/admin/myblocksadmin.php', 1, _AM_DBUPDATED); |
|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | xoops_cp_header(); |
| 264 | 264 | if (file_exists('./mymenu.php')) { |
| 265 | - include __DIR__ . '/mymenu.php'; |
|
| 265 | + include __DIR__.'/mymenu.php'; |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | list_blocks(); |
@@ -28,47 +28,47 @@ discard block |
||
| 28 | 28 | if (empty($fct)) { |
| 29 | 29 | $fct = 'preferences'; |
| 30 | 30 | } |
| 31 | -include __DIR__ . '/../../../mainfile.php'; |
|
| 32 | -include XOOPS_ROOT_PATH . '/include/cp_functions.php'; |
|
| 31 | +include __DIR__.'/../../../mainfile.php'; |
|
| 32 | +include XOOPS_ROOT_PATH.'/include/cp_functions.php'; |
|
| 33 | 33 | |
| 34 | -include_once XOOPS_ROOT_PATH . '/kernel/module.php'; |
|
| 34 | +include_once XOOPS_ROOT_PATH.'/kernel/module.php'; |
|
| 35 | 35 | |
| 36 | 36 | $admintest = 0; |
| 37 | 37 | |
| 38 | 38 | if (is_object($xoopsUser)) { |
| 39 | 39 | $xoopsModule = XoopsModule::getByDirname('system'); |
| 40 | 40 | if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
| 41 | - redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM); |
|
| 41 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
| 42 | 42 | } |
| 43 | 43 | $admintest = 1; |
| 44 | 44 | } else { |
| 45 | - redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM); |
|
| 45 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | // include system category definitions |
| 49 | -include_once XOOPS_ROOT_PATH . '/modules/system/constants.php'; |
|
| 49 | +include_once XOOPS_ROOT_PATH.'/modules/system/constants.php'; |
|
| 50 | 50 | $error = false; |
| 51 | 51 | if ($admintest != 0) { |
| 52 | 52 | if (isset($fct) && $fct != '') { |
| 53 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php')) { |
|
| 54 | - include_once XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin.php'; |
|
| 53 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php')) { |
|
| 54 | + include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$xoopsConfig['language'].'/admin.php'; |
|
| 55 | 55 | |
| 56 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin/' . $fct . '.php')) { |
|
| 57 | - include XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin/' . $fct . '.php'; |
|
| 58 | - } elseif (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/english/admin/' . $fct . '.php')) { |
|
| 59 | - include XOOPS_ROOT_PATH . '/modules/system/language/english/admin/' . $fct . '.php'; |
|
| 56 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/language/'.$xoopsConfig['language'].'/admin/'.$fct.'.php')) { |
|
| 57 | + include XOOPS_ROOT_PATH.'/modules/system/language/'.$xoopsConfig['language'].'/admin/'.$fct.'.php'; |
|
| 58 | + } elseif (file_exists(XOOPS_ROOT_PATH.'/modules/system/language/english/admin/'.$fct.'.php')) { |
|
| 59 | + include XOOPS_ROOT_PATH.'/modules/system/language/english/admin/'.$fct.'.php'; |
|
| 60 | 60 | } |
| 61 | - include XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php'; |
|
| 61 | + include XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php'; |
|
| 62 | 62 | $syspermHandler = xoops_getHandler('groupperm'); |
| 63 | - $category = !empty($modversion['category']) ? (int)$modversion['category'] : 0; |
|
| 63 | + $category = !empty($modversion['category']) ? (int) $modversion['category'] : 0; |
|
| 64 | 64 | unset($modversion); |
| 65 | 65 | if ($category > 0) { |
| 66 | - $groups =& $xoopsUser->getGroups(); |
|
| 66 | + $groups = & $xoopsUser->getGroups(); |
|
| 67 | 67 | if (in_array(XOOPS_GROUP_ADMIN, $groups) |
| 68 | 68 | || false !== $syspermHandler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid')) |
| 69 | 69 | ) { |
| 70 | 70 | if (file_exists("../include/{$fct}.inc.php")) { |
| 71 | - include_once __DIR__ . "/../include/{$fct}.inc.php"; |
|
| 71 | + include_once __DIR__."/../include/{$fct}.inc.php"; |
|
| 72 | 72 | } else { |
| 73 | 73 | $error = true; |
| 74 | 74 | } |
@@ -76,8 +76,8 @@ discard block |
||
| 76 | 76 | $error = true; |
| 77 | 77 | } |
| 78 | 78 | } elseif ($fct === 'version') { |
| 79 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php')) { |
|
| 80 | - include_once XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php'; |
|
| 79 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php')) { |
|
| 80 | + include_once XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php'; |
|
| 81 | 81 | } else { |
| 82 | 82 | $error = true; |
| 83 | 83 | } |
@@ -101,22 +101,22 @@ discard block |
||
| 101 | 101 | $all_ok = false; |
| 102 | 102 | if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { |
| 103 | 103 | $syspermHandler = xoops_getHandler('groupperm'); |
| 104 | - $ok_syscats =& $syspermHandler->getItemIds('system_admin', $groups); |
|
| 104 | + $ok_syscats = & $syspermHandler->getItemIds('system_admin', $groups); |
|
| 105 | 105 | } else { |
| 106 | 106 | $all_ok = true; |
| 107 | 107 | } |
| 108 | - $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin'; |
|
| 108 | + $admin_dir = XOOPS_ROOT_PATH.'/modules/system/admin'; |
|
| 109 | 109 | $handle = opendir($admin_dir); |
| 110 | 110 | $counter = 0; |
| 111 | 111 | $class = 'even'; |
| 112 | 112 | while ($file = readdir($handle)) { |
| 113 | - if (strtolower($file) !== 'cvs' && !preg_match('/[.]/', $file) && is_dir($admin_dir . '/' . $file)) { |
|
| 114 | - include $admin_dir . '/' . $file . '/xoops_version.php'; |
|
| 113 | + if (strtolower($file) !== 'cvs' && !preg_match('/[.]/', $file) && is_dir($admin_dir.'/'.$file)) { |
|
| 114 | + include $admin_dir.'/'.$file.'/xoops_version.php'; |
|
| 115 | 115 | if ($modversion['hasAdmin']) { |
| 116 | - $category = isset($modversion['category']) ? (int)$modversion['category'] : 0; |
|
| 116 | + $category = isset($modversion['category']) ? (int) $modversion['category'] : 0; |
|
| 117 | 117 | if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) { |
| 118 | 118 | echo "<td class='$class' align='center' valign='bottom' width='19%'>"; |
| 119 | - echo "<a href='" . XOOPS_URL . '/modules/system/admin.php?fct=' . $file . "'><b>" . trim($modversion['name']) . "</b></a>\n"; |
|
| 119 | + echo "<a href='".XOOPS_URL.'/modules/system/admin.php?fct='.$file."'><b>".trim($modversion['name'])."</b></a>\n"; |
|
| 120 | 120 | echo '</td>'; |
| 121 | 121 | ++$counter; |
| 122 | 122 | $class = ($class === 'even') ? 'odd' : 'even'; |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | while ($counter < 5) { |
| 134 | - echo '<td class="' . $class . '"> </td>'; |
|
| 134 | + echo '<td class="'.$class.'"> </td>'; |
|
| 135 | 135 | $class = ($class === 'even') ? 'odd' : 'even'; |
| 136 | 136 | ++$counter; |
| 137 | 137 | } |
@@ -6,17 +6,17 @@ |
||
| 6 | 6 | * Licence: GNU |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -include_once __DIR__ . '/../../../mainfile.php'; |
|
| 10 | -include_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 11 | -include_once XOOPS_ROOT_PATH . '/kernel/module.php'; |
|
| 12 | -include_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; |
|
| 13 | -include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
| 14 | -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 15 | -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 9 | +include_once __DIR__.'/../../../mainfile.php'; |
|
| 10 | +include_once __DIR__.'/../../../include/cp_header.php'; |
|
| 11 | +include_once XOOPS_ROOT_PATH.'/kernel/module.php'; |
|
| 12 | +include_once XOOPS_ROOT_PATH.'/class/xoopstree.php'; |
|
| 13 | +include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
| 14 | +include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 15 | +include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 16 | 16 | |
| 17 | -include_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
| 18 | -include_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/category.php'; |
|
| 19 | -include_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/faq.php'; |
|
| 20 | -include_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/answer.php'; |
|
| 17 | +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
| 18 | +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/category.php'; |
|
| 19 | +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/faq.php'; |
|
| 20 | +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/answer.php'; |
|
| 21 | 21 | |
| 22 | 22 | $myts = MyTextSanitizer::getInstance(); |
@@ -17,12 +17,12 @@ 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 | |
| 25 | -$adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 25 | +$adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 26 | 26 | |
| 27 | 27 | //---------------------- |
| 28 | 28 | |
@@ -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'; |
|
@@ -6,16 +6,16 @@ discard block |
||
| 6 | 6 | * Licence: GNU |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -include_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 9 | +include_once __DIR__.'/../../../include/cp_header.php'; |
|
| 10 | 10 | |
| 11 | -$op = 'go';//'start'; |
|
| 11 | +$op = 'go'; //'start'; |
|
| 12 | 12 | |
| 13 | 13 | if (isset($HTTP_POST_VARS['op']) && ($HTTP_POST_VARS['op'] === 'go')) { |
| 14 | 14 | $op = $HTTP_POST_VARS['op']; |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | if ($op === 'start') { |
| 18 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 18 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 19 | 19 | |
| 20 | 20 | xoops_cp_header(); |
| 21 | 21 | |
@@ -44,15 +44,15 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | echo " <title>{module title}</title>\r\n"; |
| 46 | 46 | |
| 47 | - $resultC = $xoopsDB->query('SELECT * FROM ' . $xoopsDB->prefix('smartfaq_categories')); |
|
| 47 | + $resultC = $xoopsDB->query('SELECT * FROM '.$xoopsDB->prefix('smartfaq_categories')); |
|
| 48 | 48 | while ($arrC = $xoopsDB->fetchArray($resultC)) { |
| 49 | 49 | extract($arrC, EXTR_PREFIX_ALL, 'c'); |
| 50 | 50 | |
| 51 | 51 | echo " <qandadiv ID=\"c$c_categoryid\" Revision=\"$c_created\">\r\n"; |
| 52 | - echo ' <title>' . encodeText($c_name) . "</title>\r\n"; |
|
| 53 | - echo ' <para>' . encodeText($c_description) . "</para>\r\n"; |
|
| 52 | + echo ' <title>'.encodeText($c_name)."</title>\r\n"; |
|
| 53 | + echo ' <para>'.encodeText($c_description)."</para>\r\n"; |
|
| 54 | 54 | |
| 55 | - $resultQ = $xoopsDB->query('select * from ' . $xoopsDB->prefix('smartfaq_faq') . " where categoryid=$c_categoryid"); |
|
| 55 | + $resultQ = $xoopsDB->query('select * from '.$xoopsDB->prefix('smartfaq_faq')." where categoryid=$c_categoryid"); |
|
| 56 | 56 | while ($arrQ = $xoopsDB->fetchArray($resultQ)) { |
| 57 | 57 | extract($arrQ, EXTR_PREFIX_ALL, 'q'); |
| 58 | 58 | |
@@ -60,27 +60,27 @@ discard block |
||
| 60 | 60 | . getUserFullName($q_uid) |
| 61 | 61 | . "\">\r\n"; |
| 62 | 62 | echo " <question>\r\n"; |
| 63 | - echo ' <para>' . encodeText($q_question) . "</para>\r\n"; |
|
| 63 | + echo ' <para>'.encodeText($q_question)."</para>\r\n"; |
|
| 64 | 64 | if (!empty($q_howdoi)) { |
| 65 | 65 | echo " <note Conformance=\"howdoi\">\r\n"; |
| 66 | 66 | echo " <title>{'How do I' from language file}</title>\r\n"; |
| 67 | - echo ' <para>' . encodeText($q_howdoi) . "</para>\r\n"; |
|
| 67 | + echo ' <para>'.encodeText($q_howdoi)."</para>\r\n"; |
|
| 68 | 68 | echo " </note>\r\n"; |
| 69 | 69 | } |
| 70 | 70 | if (!empty($q_diduno)) { |
| 71 | 71 | echo " <note Conformance=\"diduno\">\r\n"; |
| 72 | 72 | echo " <title>{'Did you know' from language file}</title>\r\n"; |
| 73 | - echo ' <para>' . encodeText($q_diduno) . "</para>\r\n"; |
|
| 73 | + echo ' <para>'.encodeText($q_diduno)."</para>\r\n"; |
|
| 74 | 74 | echo " </note>\r\n"; |
| 75 | 75 | } |
| 76 | 76 | echo " </question>\r\n"; |
| 77 | 77 | |
| 78 | - $resultA = $xoopsDB->query('select * from ' . $xoopsDB->prefix('smartfaq_answers') . " where answerid=$q_answerid"); |
|
| 78 | + $resultA = $xoopsDB->query('select * from '.$xoopsDB->prefix('smartfaq_answers')." where answerid=$q_answerid"); |
|
| 79 | 79 | while ($arrA = $xoopsDB->fetchArray($resultA)) { |
| 80 | 80 | extract($arrA, EXTR_PREFIX_ALL, 'a'); |
| 81 | 81 | |
| 82 | - echo " <answer ID=\"a$a_answerid\" Revision=\"$a_datesub\" Vendor=\"" . getUserFullName($a_uid) . "\">\r\n"; |
|
| 83 | - echo ' <para>' . encodeText($a_answer) . "</para>\r\n"; |
|
| 82 | + echo " <answer ID=\"a$a_answerid\" Revision=\"$a_datesub\" Vendor=\"".getUserFullName($a_uid)."\">\r\n"; |
|
| 83 | + echo ' <para>'.encodeText($a_answer)."</para>\r\n"; |
|
| 84 | 84 | echo " </answer>\r\n"; |
| 85 | 85 | } |
| 86 | 86 | $xoopsDB->freeRecordSet($resultA); |
@@ -6,8 +6,8 @@ discard block |
||
| 6 | 6 | * Licence: GNU |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -require_once __DIR__ . '/admin_header.php'; |
|
| 10 | -include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; |
|
| 9 | +require_once __DIR__.'/admin_header.php'; |
|
| 10 | +include_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); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | default: |
| 29 | 29 | global $xoopsDB, $xoopsModule; |
| 30 | 30 | |
| 31 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 31 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 32 | 32 | xoops_cp_header(); |
| 33 | 33 | $adminObject->displayNavigation(basename(__FILE__)); |
| 34 | 34 | // View Categories permissions |
@@ -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,12 +24,12 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 26 | 26 | |
| 27 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelement.php'; |
|
| 28 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhidden.php'; |
|
| 29 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhiddentoken.php'; |
|
| 30 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formbutton.php'; |
|
| 31 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelementtray.php'; |
|
| 32 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/form.php'; |
|
| 27 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php'; |
|
| 28 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhidden.php'; |
|
| 29 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhiddentoken.php'; |
|
| 30 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formbutton.php'; |
|
| 31 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelementtray.php'; |
|
| 32 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/form.php'; |
|
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * Renders a form for setting module specific group permissions |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | { |
| 81 | 81 | // $this->XoopsForm($title, 'groupperm_form', XOOPS_URL.'/modules/system/admin/groupperm.php', 'post'); GIJ |
| 82 | 82 | parent::__construct($title, 'groupperm_form', '', 'post'); |
| 83 | - $this->_modid = (int)$modid; |
|
| 83 | + $this->_modid = (int) $modid; |
|
| 84 | 84 | $this->_permName = $permname; |
| 85 | 85 | $this->_permDesc = $permdesc; |
| 86 | 86 | $this->addElement(new XoopsFormHidden('modid', $this->_modid)); |
@@ -159,11 +159,11 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | $gpermHandler = xoops_getHandler('groupperm'); |
| 161 | 161 | $memberHandler = xoops_getHandler('member'); |
| 162 | - $glist =& $memberHandler->getGroupList(); |
|
| 162 | + $glist = & $memberHandler->getGroupList(); |
|
| 163 | 163 | foreach (array_keys($glist) as $i) { |
| 164 | 164 | // get selected item id(s) for each group |
| 165 | 165 | $selected = $gpermHandler->getItemIds($this->_permName, $i, $this->_modid); |
| 166 | - $ele = new MyXoopsGroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected); |
|
| 166 | + $ele = new MyXoopsGroupFormCheckBox($glist[$i], 'perms['.$this->_permName.']', $i, $selected); |
|
| 167 | 167 | $ele->setOptionTree($this->_itemTree); |
| 168 | 168 | |
| 169 | 169 | foreach ($this->_appendix as $key => $append) { |
@@ -190,8 +190,8 @@ discard block |
||
| 190 | 190 | $tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
| 191 | 191 | $this->addElement($tray); |
| 192 | 192 | |
| 193 | - $ret = '<h4>' . $this->getTitle() . '</h4>' . $this->_permDesc . '<br>'; |
|
| 194 | - $ret .= "<form name='" |
|
| 193 | + $ret = '<h4>'.$this->getTitle().'</h4>'.$this->_permDesc.'<br>'; |
|
| 194 | + $ret .= "<form name='" |
|
| 195 | 195 | . $this->getName() |
| 196 | 196 | . "' id='" |
| 197 | 197 | . $this->getName() |
@@ -202,16 +202,16 @@ discard block |
||
| 202 | 202 | . "'" |
| 203 | 203 | . $this->getExtra() |
| 204 | 204 | . ">\n<table width='100%' class='outer' cellspacing='1'>\n"; |
| 205 | - $elements =& $this->getElements(); |
|
| 205 | + $elements = & $this->getElements(); |
|
| 206 | 206 | foreach (array_keys($elements) as $i) { |
| 207 | 207 | if (!is_object($elements[$i])) { |
| 208 | 208 | $ret .= $elements[$i]; |
| 209 | 209 | } elseif (!$elements[$i]->isHidden()) { |
| 210 | - $ret .= "<tr valign='top' align='left'><td class='head'>" . $elements[$i]->getCaption(); |
|
| 210 | + $ret .= "<tr valign='top' align='left'><td class='head'>".$elements[$i]->getCaption(); |
|
| 211 | 211 | if ($elements[$i]->getDescription() != '') { |
| 212 | - $ret .= '<br><br><span style="font-weight: normal;">' . $elements[$i]->getDescription() . '</span>'; |
|
| 212 | + $ret .= '<br><br><span style="font-weight: normal;">'.$elements[$i]->getDescription().'</span>'; |
|
| 213 | 213 | } |
| 214 | - $ret .= "</td>\n<td class='even'>\n" . $elements[$i]->render() . "\n</td></tr>\n"; |
|
| 214 | + $ret .= "</td>\n<td class='even'>\n".$elements[$i]->render()."\n</td></tr>\n"; |
|
| 215 | 215 | } else { |
| 216 | 216 | $ret .= $elements[$i]->render(); |
| 217 | 217 | } |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | */ |
| 298 | 298 | public function setOptionTree(&$optionTree) |
| 299 | 299 | { |
| 300 | - $this->_optionTree =& $optionTree; |
|
| 300 | + $this->_optionTree = & $optionTree; |
|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | /** |
@@ -322,34 +322,34 @@ discard block |
||
| 322 | 322 | $ret = ''; |
| 323 | 323 | |
| 324 | 324 | if (count($this->_appendix) > 0) { |
| 325 | - $ret .= '<table class="outer"><tr>'; |
|
| 325 | + $ret .= '<table class="outer"><tr>'; |
|
| 326 | 326 | $cols = 1; |
| 327 | 327 | foreach ($this->_appendix as $append) { |
| 328 | 328 | if ($cols > 4) { |
| 329 | - $ret .= '</tr><tr>'; |
|
| 329 | + $ret .= '</tr><tr>'; |
|
| 330 | 330 | $cols = 1; |
| 331 | 331 | } |
| 332 | 332 | $checked = $append['selected'] ? 'checked' : ''; |
| 333 | - $name = 'perms[' . $append['permname'] . ']'; |
|
| 333 | + $name = 'perms['.$append['permname'].']'; |
|
| 334 | 334 | $itemid = $append['itemid']; |
| 335 | 335 | $itemid = $append['itemid']; |
| 336 | - $ret .= "<td class=\"odd\"><input type=\"checkbox\" name=\"{$name}[groups][$this->_groupId][$itemid]\" id=\"{$name}[groups][$this->_groupId][$itemid]\" value=\"1\" $checked />{$append['itemname']}<input type=\"hidden\" name=\"{$name}[parents][$itemid]\" value=\"\" /><input type=\"hidden\" name=\"{$name}[itemname][$itemid]\" value=\"{$append['itemname']}\" /><br></td>"; |
|
| 336 | + $ret .= "<td class=\"odd\"><input type=\"checkbox\" name=\"{$name}[groups][$this->_groupId][$itemid]\" id=\"{$name}[groups][$this->_groupId][$itemid]\" value=\"1\" $checked />{$append['itemname']}<input type=\"hidden\" name=\"{$name}[parents][$itemid]\" value=\"\" /><input type=\"hidden\" name=\"{$name}[itemname][$itemid]\" value=\"{$append['itemname']}\" /><br></td>"; |
|
| 337 | 337 | ++$cols; |
| 338 | 338 | } |
| 339 | 339 | $ret .= '</tr></table>'; |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | - $ret .= '<table class="outer"><tr>'; |
|
| 342 | + $ret .= '<table class="outer"><tr>'; |
|
| 343 | 343 | $cols = 1; |
| 344 | 344 | foreach ($this->_optionTree[0]['children'] as $topitem) { |
| 345 | 345 | if ($cols > 4) { |
| 346 | - $ret .= '</tr><tr>'; |
|
| 346 | + $ret .= '</tr><tr>'; |
|
| 347 | 347 | $cols = 1; |
| 348 | 348 | } |
| 349 | 349 | $tree = '<td class="odd">'; |
| 350 | 350 | $prefix = ''; |
| 351 | 351 | $this->renderOptionTree($tree, $this->_optionTree[$topitem], $prefix); |
| 352 | - $ret .= $tree . '</td>'; |
|
| 352 | + $ret .= $tree.'</td>'; |
|
| 353 | 353 | ++$cols; |
| 354 | 354 | } |
| 355 | 355 | $ret .= '</tr></table>'; |
@@ -386,16 +386,16 @@ discard block |
||
| 386 | 386 | // make them selecteded when this element is checked to make |
| 387 | 387 | // sure permissions to parent items are added as well. |
| 388 | 388 | foreach ($parentIds as $pid) { |
| 389 | - $parent_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $pid . ']'; |
|
| 390 | - $tree .= "var ele = xoopsGetElementById('" . $parent_ele . "'); if (ele.checked !== true) {ele.checked = this.checked;}"; |
|
| 389 | + $parent_ele = $this->getName().'[groups]['.$this->_groupId.']['.$pid.']'; |
|
| 390 | + $tree .= "var ele = xoopsGetElementById('".$parent_ele."'); if (ele.checked !== true) {ele.checked = this.checked;}"; |
|
| 391 | 391 | } |
| 392 | 392 | // If there are child elements, add javascript that will |
| 393 | 393 | // make them unchecked when this element is unchecked to make |
| 394 | 394 | // sure permissions to child items are not added when there |
| 395 | 395 | // is no permission to this item. |
| 396 | 396 | foreach ($option['allchild'] as $cid) { |
| 397 | - $child_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $cid . ']'; |
|
| 398 | - $tree .= "var ele = xoopsGetElementById('" . $child_ele . "'); if (this.checked !== true) {ele.checked = false;}"; |
|
| 397 | + $child_ele = $this->getName().'[groups]['.$this->_groupId.']['.$cid.']'; |
|
| 398 | + $tree .= "var ele = xoopsGetElementById('".$child_ele."'); if (this.checked !== true) {ele.checked = false;}"; |
|
| 399 | 399 | } |
| 400 | 400 | $tree .= '" value="1"'; |
| 401 | 401 | if (isset($this->_value) && in_array($option['id'], $this->_value)) { |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | if (isset($option['children'])) { |
| 420 | 420 | foreach ($option['children'] as $child) { |
| 421 | 421 | array_push($parentIds, $option['id']); |
| 422 | - $this->renderOptionTree($tree, $this->_optionTree[$child], $prefix . ' -', $parentIds); |
|
| 422 | + $this->renderOptionTree($tree, $this->_optionTree[$child], $prefix.' -', $parentIds); |
|
| 423 | 423 | } |
| 424 | 424 | } |
| 425 | 425 | } |
@@ -18,45 +18,45 @@ |
||
| 18 | 18 | } |
| 19 | 19 | $adminObject = \Xmf\Module\Admin::getInstance(); |
| 20 | 20 | |
| 21 | -$pathIcon32 = \Xmf\Module\Admin::menuIconPath(''); |
|
| 21 | +$pathIcon32 = \Xmf\Module\Admin::menuIconPath(''); |
|
| 22 | 22 | //$pathModIcon32 = $moduleHelper->getModule()->getInfo('modicons32'); |
| 23 | 23 | |
| 24 | 24 | $moduleHelper->loadLanguage('modinfo'); |
| 25 | 25 | |
| 26 | -$adminObject = array(); |
|
| 26 | +$adminObject = array(); |
|
| 27 | 27 | $i = 0; |
| 28 | 28 | $adminmenu[$i]['title'] = _AM_MODULEADMIN_HOME; |
| 29 | 29 | $adminmenu[$i]['link'] = 'admin/index.php'; |
| 30 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/home.png'; |
|
| 30 | +$adminmenu[$i]['icon'] = $pathIcon32.'/home.png'; |
|
| 31 | 31 | ++$i; |
| 32 | 32 | $adminmenu[$i]['title'] = _MI_SF_ADMENU1; |
| 33 | 33 | $adminmenu[$i]['link'] = 'admin/main.php'; |
| 34 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/manage.png'; |
|
| 34 | +$adminmenu[$i]['icon'] = $pathIcon32.'/manage.png'; |
|
| 35 | 35 | |
| 36 | 36 | ++$i; |
| 37 | 37 | $adminmenu[$i]['title'] = _MI_SF_ADMENU2; |
| 38 | 38 | $adminmenu[$i]['link'] = 'admin/category.php'; |
| 39 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/category.png'; |
|
| 39 | +$adminmenu[$i]['icon'] = $pathIcon32.'/category.png'; |
|
| 40 | 40 | ++$i; |
| 41 | 41 | $adminmenu[$i]['title'] = _MI_SF_ADMENU3; |
| 42 | 42 | $adminmenu[$i]['link'] = 'admin/faq.php'; |
| 43 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/search.png'; |
|
| 43 | +$adminmenu[$i]['icon'] = $pathIcon32.'/search.png'; |
|
| 44 | 44 | ++$i; |
| 45 | 45 | $adminmenu[$i]['title'] = _MI_SF_ADMENU4; |
| 46 | 46 | $adminmenu[$i]['link'] = 'admin/question.php'; |
| 47 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/faq.png'; |
|
| 47 | +$adminmenu[$i]['icon'] = $pathIcon32.'/faq.png'; |
|
| 48 | 48 | ++$i; |
| 49 | 49 | $adminmenu[$i]['title'] = _MI_SF_ADMENU5; |
| 50 | 50 | $adminmenu[$i]['link'] = 'admin/permissions.php'; |
| 51 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/permissions.png'; |
|
| 51 | +$adminmenu[$i]['icon'] = $pathIcon32.'/permissions.png'; |
|
| 52 | 52 | ++$i; |
| 53 | 53 | $adminmenu[$i]['title'] = _MI_SF_ADMENU8; |
| 54 | 54 | $adminmenu[$i]['link'] = 'admin/import.php'; |
| 55 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/download.png'; |
|
| 55 | +$adminmenu[$i]['icon'] = $pathIcon32.'/download.png'; |
|
| 56 | 56 | ++$i; |
| 57 | 57 | $adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT; |
| 58 | 58 | $adminmenu[$i]['link'] = 'admin/about.php'; |
| 59 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/about.png'; |
|
| 59 | +$adminmenu[$i]['icon'] = $pathIcon32.'/about.png'; |
|
| 60 | 60 | //++$i; |
| 61 | 61 | //$adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT; |
| 62 | 62 | //$adminmenu[$i]["link"] = "admin/about2.php"; |
@@ -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 | // Creating the faq handler object |
| 12 | 12 | $faqHandler = sf_gethandler('faq'); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | // Where shall we start? |
| 26 | -$startfaq = isset($_GET['startfaq']) ? (int)$_GET['startfaq'] : 0; |
|
| 26 | +$startfaq = isset($_GET['startfaq']) ? (int) $_GET['startfaq'] : 0; |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * @param bool $showmenu |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | { |
| 34 | 34 | global $faqHandler, $categoryHandler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts; |
| 35 | 35 | |
| 36 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 36 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 37 | 37 | // If there is a parameter, and the id exists, retrieve data: we're editing a faq |
| 38 | 38 | if ($faqid != -1) { |
| 39 | 39 | // Creating the FAQ object |
@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | echo "<br>\n"; |
| 67 | 67 | sf_collapsableBar('bottomtable', 'bottomtableicon'); |
| 68 | - echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . $collapsableBar_title . '</h3>'; |
|
| 68 | + echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> ".$collapsableBar_title.'</h3>'; |
|
| 69 | 69 | echo "<div id='bottomtable'>"; |
| 70 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $collapsableBar_info . '</span>'; |
|
| 70 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$collapsableBar_info.'</span>'; |
|
| 71 | 71 | } else { |
| 72 | 72 | // there's no parameter, so we're adding a faq |
| 73 | 73 | $faqObj = $faqHandler->create(); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $button_caption = _AM_SF_CREATE; |
| 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')); |
@@ -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'); |
@@ -180,11 +180,11 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 183 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 184 | 184 | xoops_cp_header(); |
| 185 | 185 | |
| 186 | 186 | $adminObject->displayNavigation(basename(__FILE__)); |
| 187 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 187 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 188 | 188 | |
| 189 | 189 | editfaq(true, $faqid); |
| 190 | 190 | break; |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | $uid = $xoopsUser->uid(); |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | - $faqid = isset($_POST['faqid']) ? (int)$_POST['faqid'] : -1; |
|
| 205 | + $faqid = isset($_POST['faqid']) ? (int) $_POST['faqid'] : -1; |
|
| 206 | 206 | |
| 207 | 207 | // Creating the FAQ |
| 208 | 208 | if ($faqid != -1) { |
@@ -213,9 +213,9 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | // Putting the values in the FAQ object |
| 215 | 215 | $faqObj->setGroups_read(isset($_POST['groups']) ? $_POST['groups'] : array()); |
| 216 | - $faqObj->setVar('categoryid', isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0); |
|
| 216 | + $faqObj->setVar('categoryid', isset($_POST['categoryid']) ? (int) $_POST['categoryid'] : 0); |
|
| 217 | 217 | $faqObj->setVar('question', $_POST['question']); |
| 218 | - $faqObj->setVar('status', isset($_POST['status']) ? (int)$_POST['status'] : _SF_STATUS_ASKED); |
|
| 218 | + $faqObj->setVar('status', isset($_POST['status']) ? (int) $_POST['status'] : _SF_STATUS_ASKED); |
|
| 219 | 219 | |
| 220 | 220 | $notifToDo = null; |
| 221 | 221 | |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | |
| 248 | 248 | // Storing the FAQ |
| 249 | 249 | if (!$faqObj->store()) { |
| 250 | - redirect_header('javascript:history.go(-1)', 3, _AM_SF_ERROR . sf_formatErrors($faqObj->getErrors())); |
|
| 250 | + redirect_header('javascript:history.go(-1)', 3, _AM_SF_ERROR.sf_formatErrors($faqObj->getErrors())); |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | // Send notifications |
@@ -265,8 +265,8 @@ discard block |
||
| 265 | 265 | $module_id = $xoopsModule->getVar('mid'); |
| 266 | 266 | $gpermHandler = xoops_getHandler('groupperm'); |
| 267 | 267 | |
| 268 | - $faqid = isset($_POST['faqid']) ? (int)$_POST['faqid'] : 0; |
|
| 269 | - $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : $faqid; |
|
| 268 | + $faqid = isset($_POST['faqid']) ? (int) $_POST['faqid'] : 0; |
|
| 269 | + $faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : $faqid; |
|
| 270 | 270 | |
| 271 | 271 | $faqObj = new sfFaq($faqid); |
| 272 | 272 | |
@@ -281,14 +281,14 @@ discard block |
||
| 281 | 281 | redirect_header('question.php', 2, sprintf(_AM_SF_QUESTIONISDELETED, $faqObj->question())); |
| 282 | 282 | } else { |
| 283 | 283 | // no confirm: show deletion condition |
| 284 | - $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0; |
|
| 284 | + $faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : 0; |
|
| 285 | 285 | xoops_cp_header(); |
| 286 | 286 | xoops_confirm(array( |
| 287 | 287 | 'op' => 'del', |
| 288 | 288 | 'faqid' => $faqObj->faqid(), |
| 289 | 289 | 'confirm' => 1, |
| 290 | 290 | 'name' => $faqObj->question() |
| 291 | - ), 'question.php', _AM_SF_DELETETHISQUESTION . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
| 291 | + ), 'question.php', _AM_SF_DELETETHISQUESTION." <br>'".$faqObj->question()."'. <br> <br>", _AM_SF_DELETE); |
|
| 292 | 292 | xoops_cp_footer(); |
| 293 | 293 | } |
| 294 | 294 | |
@@ -297,12 +297,12 @@ discard block |
||
| 297 | 297 | |
| 298 | 298 | case 'default': |
| 299 | 299 | default: |
| 300 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 300 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 301 | 301 | xoops_cp_header(); |
| 302 | 302 | $adminObject->displayNavigation(basename(__FILE__)); |
| 303 | 303 | |
| 304 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 305 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 304 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 305 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 306 | 306 | |
| 307 | 307 | global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $smartModuleConfig; |
| 308 | 308 | |
@@ -310,9 +310,9 @@ discard block |
||
| 310 | 310 | |
| 311 | 311 | sf_collapsableBar('toptable', 'toptableicon'); |
| 312 | 312 | |
| 313 | - echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_OPENED_TITLE . '</h3>'; |
|
| 313 | + echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a> "._AM_SF_OPENED_TITLE.'</h3>'; |
|
| 314 | 314 | echo "<div id='toptable'>"; |
| 315 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_OPENED_DSC . '</span>'; |
|
| 315 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_OPENED_DSC.'</span>'; |
|
| 316 | 316 | |
| 317 | 317 | // Get the total number of published FAQs |
| 318 | 318 | $totalfaqs = $faqHandler->getFaqsCount(-1, array(_SF_STATUS_OPENED)); |
@@ -322,14 +322,14 @@ discard block |
||
| 322 | 322 | $allCats = $categoryHandler->getObjects(null, true); |
| 323 | 323 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
| 324 | 324 | echo '<tr>'; |
| 325 | - echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . '</b></td>'; |
|
| 326 | - echo "<th width='20%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>'; |
|
| 327 | - echo "<th class='bg3' align='left'><b>" . _AM_SF_QUESTION . '</b></td>'; |
|
| 325 | + echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_ARTID.'</b></td>'; |
|
| 326 | + echo "<th width='20%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME.'</b></td>'; |
|
| 327 | + echo "<th class='bg3' align='left'><b>"._AM_SF_QUESTION.'</b></td>'; |
|
| 328 | 328 | |
| 329 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . '</b></td>'; |
|
| 329 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED.'</b></td>'; |
|
| 330 | 330 | |
| 331 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . '</b></td>'; |
|
| 332 | - echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
| 331 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED.'</b></td>'; |
|
| 332 | + echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>'; |
|
| 333 | 333 | echo '</tr>'; |
| 334 | 334 | //var_dump( $faqsObj); |
| 335 | 335 | if ($totalfaqs > 0) { |
@@ -361,8 +361,8 @@ discard block |
||
| 361 | 361 | $requester = sf_getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']); |
| 362 | 362 | |
| 363 | 363 | echo '<tr>'; |
| 364 | - echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . '</td>'; |
|
| 365 | - echo "<td class='even' align='left'>" . $categoryObj->name() . '</td>'; |
|
| 364 | + echo "<td class='head' align='center'>".$faqsObj[$i]->faqid().'</td>'; |
|
| 365 | + echo "<td class='even' align='left'>".$categoryObj->name().'</td>'; |
|
| 366 | 366 | echo "<td class='even' align='left'><a href='" |
| 367 | 367 | . XOOPS_URL |
| 368 | 368 | . '/modules/' |
@@ -373,23 +373,23 @@ discard block |
||
| 373 | 373 | . $faqsObj[$i]->question(100) |
| 374 | 374 | . '</a></td>'; |
| 375 | 375 | |
| 376 | - echo "<td class='even' align='center'>" . $requester . '</td>'; |
|
| 376 | + echo "<td class='even' align='center'>".$requester.'</td>'; |
|
| 377 | 377 | |
| 378 | - echo "<td class='even' align='center'>" . $faqsObj[$i]->datesub('s') . '</td>'; |
|
| 378 | + echo "<td class='even' align='center'>".$faqsObj[$i]->datesub('s').'</td>'; |
|
| 379 | 379 | echo "<td class='even' align='center'> $modify $delete </td>"; |
| 380 | 380 | echo '</tr>'; |
| 381 | 381 | } |
| 382 | 382 | } else { |
| 383 | 383 | $faqid = -1; |
| 384 | 384 | echo '<tr>'; |
| 385 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOQUEUED . '</td>'; |
|
| 385 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOQUEUED.'</td>'; |
|
| 386 | 386 | echo '</tr>'; |
| 387 | 387 | } |
| 388 | 388 | echo "</table>\n"; |
| 389 | 389 | echo "<br>\n"; |
| 390 | 390 | |
| 391 | 391 | $pagenav = new XoopsPageNav($totalfaqs, $xoopsModuleConfig['perpage'], $startfaq, 'startfaq'); |
| 392 | - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
| 392 | + echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
| 393 | 393 | echo '</div>'; |
| 394 | 394 | |
| 395 | 395 | $totalcategories = $categoryHandler->getCategoriesCount(-1); |
@@ -400,4 +400,4 @@ discard block |
||
| 400 | 400 | break; |
| 401 | 401 | } |
| 402 | 402 | |
| 403 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 403 | +require_once __DIR__.'/admin_footer.php'; |
|