@@ -110,18 +110,18 @@ |
||
| 110 | 110 | foreach ($proposed_answers as $proposed_answer) { |
| 111 | 111 | if ($faqObj->status() == _SF_STATUS_NEW_ANSWER) { |
| 112 | 112 | $merge = "<a href='faq.php?op=merge&faqid=" |
| 113 | - . $faqObj->faqid() |
|
| 114 | - . '&answerid=' |
|
| 115 | - . $proposed_answer->answerid() |
|
| 116 | - . "'><img src='" |
|
| 117 | - . XOOPS_URL |
|
| 118 | - . '/modules/' |
|
| 119 | - . $xoopsModule->dirname() |
|
| 120 | - . "/assets/images/icon/merge.gif' title='" |
|
| 121 | - . _AM_SF_FAQ_MERGE |
|
| 122 | - . "' alt='" |
|
| 123 | - . _AM_SF_FAQ_MERGE |
|
| 124 | - . "'></a> "; |
|
| 113 | + . $faqObj->faqid() |
|
| 114 | + . '&answerid=' |
|
| 115 | + . $proposed_answer->answerid() |
|
| 116 | + . "'><img src='" |
|
| 117 | + . XOOPS_URL |
|
| 118 | + . '/modules/' |
|
| 119 | + . $xoopsModule->dirname() |
|
| 120 | + . "/assets/images/icon/merge.gif' title='" |
|
| 121 | + . _AM_SF_FAQ_MERGE |
|
| 122 | + . "' alt='" |
|
| 123 | + . _AM_SF_FAQ_MERGE |
|
| 124 | + . "'></a> "; |
|
| 125 | 125 | $approve = "<a href='answer.php?op=selectanswer&faqid=" . $faqid . '&answerid=' . $proposed_answer->answerid() . "'><img src='" . $pathIcon16 . '/on.png' . "' title='" . _AM_SF_FAQ_APPROVE_NEW_ANSWER . "' alt='" . _AM_SF_APPROVESUB . "'></a>"; |
| 126 | 126 | } |
| 127 | 127 | $modify = "<a href='faq.php?op=mod&faqid=" . $faqObj->faqid() . '&answerid=' . $proposed_answer->answerid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_FAQ_REVIEW . "' alt='" . _AM_SF_FAQ_REVIEW . "'></a> "; |
@@ -46,18 +46,18 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | echo '<tr>'; |
| 48 | 48 | echo "<td class='even' align='lefet'>" |
| 49 | - . $spaces |
|
| 50 | - . "<a href='" |
|
| 51 | - . XOOPS_URL |
|
| 52 | - . '/modules/' |
|
| 53 | - . $xoopsModule->dirname() |
|
| 54 | - . '/category.php?categoryid=' |
|
| 55 | - . $categoryObj->categoryid() |
|
| 56 | - . "'><img src='" |
|
| 57 | - . XOOPS_URL |
|
| 58 | - . "/modules/smartfaq/assets/images/icon/subcat.gif' alt=''> " |
|
| 59 | - . $categoryObj->name() |
|
| 60 | - . '</a></td>'; |
|
| 49 | + . $spaces |
|
| 50 | + . "<a href='" |
|
| 51 | + . XOOPS_URL |
|
| 52 | + . '/modules/' |
|
| 53 | + . $xoopsModule->dirname() |
|
| 54 | + . '/category.php?categoryid=' |
|
| 55 | + . $categoryObj->categoryid() |
|
| 56 | + . "'><img src='" |
|
| 57 | + . XOOPS_URL |
|
| 58 | + . "/modules/smartfaq/assets/images/icon/subcat.gif' alt=''> " |
|
| 59 | + . $categoryObj->name() |
|
| 60 | + . '</a></td>'; |
|
| 61 | 61 | echo "<td class='even' align='left'>" . $description . '</td>'; |
| 62 | 62 | echo "<td class='even' align='center'>" . $categoryObj->weight() . '</td>'; |
| 63 | 63 | echo "<td class='even' align='center'> $modify $delete </td>"; |
@@ -314,11 +314,11 @@ discard block |
||
| 314 | 314 | $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
| 315 | 315 | xoops_cp_header(); |
| 316 | 316 | xoops_confirm(array( |
| 317 | - 'op' => 'del', |
|
| 318 | - 'categoryid' => $categoryObj->categoryid(), |
|
| 319 | - 'confirm' => 1, |
|
| 320 | - 'name' => $categoryObj->name() |
|
| 321 | - ), 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
| 317 | + 'op' => 'del', |
|
| 318 | + 'categoryid' => $categoryObj->categoryid(), |
|
| 319 | + 'confirm' => 1, |
|
| 320 | + 'name' => $categoryObj->name() |
|
| 321 | + ), 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
| 322 | 322 | xoops_cp_footer(); |
| 323 | 323 | } |
| 324 | 324 | exit(); |
@@ -227,149 +227,149 @@ |
||
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | switch ($op) { |
| 230 | - case 'mod': |
|
| 231 | - $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
| 232 | - $destList = isset($_POST['destList']) ? $_POST['destList'] : ''; |
|
| 233 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 234 | - xoops_cp_header(); |
|
| 235 | - |
|
| 236 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
| 237 | - editcat(true, $categoryid); |
|
| 238 | - break; |
|
| 230 | + case 'mod': |
|
| 231 | + $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
| 232 | + $destList = isset($_POST['destList']) ? $_POST['destList'] : ''; |
|
| 233 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 234 | + xoops_cp_header(); |
|
| 239 | 235 | |
| 240 | - case 'addcategory': |
|
| 241 | - global $_POST, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $modify, $myts, $categoryid; |
|
| 236 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
| 237 | + editcat(true, $categoryid); |
|
| 238 | + break; |
|
| 242 | 239 | |
| 243 | - $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0; |
|
| 240 | + case 'addcategory': |
|
| 241 | + global $_POST, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $modify, $myts, $categoryid; |
|
| 244 | 242 | |
| 245 | - if ($categoryid != 0) { |
|
| 246 | - $categoryObj = new sfCategory($categoryid); |
|
| 247 | - } else { |
|
| 248 | - $categoryObj = $categoryHandler->create(); |
|
| 249 | - } |
|
| 243 | + $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0; |
|
| 250 | 244 | |
| 251 | - //if (isset($_POST['allmods'])) $allmods = $_POST['allmods']; |
|
| 252 | - //if (isset($_POST['moderators'])) $moderators = $_POST['moderators']; |
|
| 245 | + if ($categoryid != 0) { |
|
| 246 | + $categoryObj = new sfCategory($categoryid); |
|
| 247 | + } else { |
|
| 248 | + $categoryObj = $categoryHandler->create(); |
|
| 249 | + } |
|
| 253 | 250 | |
| 254 | - $categoryObj->setVar('parentid', isset($_POST['parentid']) ? (int)$_POST['parentid'] : 0); |
|
| 255 | - $applyall = isset($_POST['applyall']) ? (int)$_POST['applyall'] : 0; |
|
| 256 | - $categoryObj->setVar('weight', isset($_POST['weight']) ? (int)$_POST['weight'] : 1); |
|
| 251 | + //if (isset($_POST['allmods'])) $allmods = $_POST['allmods']; |
|
| 252 | + //if (isset($_POST['moderators'])) $moderators = $_POST['moderators']; |
|
| 257 | 253 | |
| 258 | - // Groups and permissions |
|
| 259 | - if (isset($_POST['groups_read'])) { |
|
| 260 | - $categoryObj->setGroups_read($_POST['groups_read']); |
|
| 261 | - } else { |
|
| 262 | - $categoryObj->setGroups_read(); |
|
| 263 | - } |
|
| 264 | - // $groups_admin = isset($_POST['groups_admin'])? $_POST['groups_admin'] : array(); |
|
| 265 | - // $mod_perms = isset($_POST['mod_perms'])? $_POST['mod_perms'] : array(); |
|
| 266 | - |
|
| 267 | - $categoryObj->setVar('name', $_POST['name']); |
|
| 268 | - |
|
| 269 | - $categoryObj->setVar('description', $_POST['description']); |
|
| 270 | - if ($categoryObj->isNew()) { |
|
| 271 | - $redirect_msg = _AM_SF_CATCREATED; |
|
| 272 | - $redirect_to = 'category.php?op=mod'; |
|
| 273 | - } else { |
|
| 274 | - $redirect_msg = _AM_SF_COLMODIFIED; |
|
| 275 | - $redirect_to = 'category.php'; |
|
| 276 | - } |
|
| 254 | + $categoryObj->setVar('parentid', isset($_POST['parentid']) ? (int)$_POST['parentid'] : 0); |
|
| 255 | + $applyall = isset($_POST['applyall']) ? (int)$_POST['applyall'] : 0; |
|
| 256 | + $categoryObj->setVar('weight', isset($_POST['weight']) ? (int)$_POST['weight'] : 1); |
|
| 277 | 257 | |
| 278 | - if (!$categoryObj->store()) { |
|
| 279 | - redirect_header('javascript:history.go(-1)', 3, _AM_SF_CATEGORY_SAVE_ERROR . sf_formatErrors($categoryObj->getErrors())); |
|
| 280 | - } |
|
| 281 | - // TODO : put this function in the category class |
|
| 282 | - sf_saveCategory_Permissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read'); |
|
| 283 | - //sf_saveCategory_Permissions($groups_admin, $categoriesObj->categoryid(), 'category_admin'); |
|
| 258 | + // Groups and permissions |
|
| 259 | + if (isset($_POST['groups_read'])) { |
|
| 260 | + $categoryObj->setGroups_read($_POST['groups_read']); |
|
| 261 | + } else { |
|
| 262 | + $categoryObj->setGroups_read(); |
|
| 263 | + } |
|
| 264 | + // $groups_admin = isset($_POST['groups_admin'])? $_POST['groups_admin'] : array(); |
|
| 265 | + // $mod_perms = isset($_POST['mod_perms'])? $_POST['mod_perms'] : array(); |
|
| 266 | + |
|
| 267 | + $categoryObj->setVar('name', $_POST['name']); |
|
| 268 | + |
|
| 269 | + $categoryObj->setVar('description', $_POST['description']); |
|
| 270 | + if ($categoryObj->isNew()) { |
|
| 271 | + $redirect_msg = _AM_SF_CATCREATED; |
|
| 272 | + $redirect_to = 'category.php?op=mod'; |
|
| 273 | + } else { |
|
| 274 | + $redirect_msg = _AM_SF_COLMODIFIED; |
|
| 275 | + $redirect_to = 'category.php'; |
|
| 276 | + } |
|
| 284 | 277 | |
| 285 | - if ($applyall) { |
|
| 278 | + if (!$categoryObj->store()) { |
|
| 279 | + redirect_header('javascript:history.go(-1)', 3, _AM_SF_CATEGORY_SAVE_ERROR . sf_formatErrors($categoryObj->getErrors())); |
|
| 280 | + } |
|
| 286 | 281 | // TODO : put this function in the category class |
| 287 | - sf_overrideFaqsPermissions($categoryObj->getGroups_read(), $categoryObj->categoryid()); |
|
| 288 | - } |
|
| 282 | + sf_saveCategory_Permissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read'); |
|
| 283 | + //sf_saveCategory_Permissions($groups_admin, $categoriesObj->categoryid(), 'category_admin'); |
|
| 289 | 284 | |
| 290 | - redirect_header($redirect_to, 2, $redirect_msg); |
|
| 291 | - break; |
|
| 285 | + if ($applyall) { |
|
| 286 | + // TODO : put this function in the category class |
|
| 287 | + sf_overrideFaqsPermissions($categoryObj->getGroups_read(), $categoryObj->categoryid()); |
|
| 288 | + } |
|
| 292 | 289 | |
| 293 | - case 'del': |
|
| 294 | - global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $_GET; |
|
| 290 | + redirect_header($redirect_to, 2, $redirect_msg); |
|
| 291 | + break; |
|
| 295 | 292 | |
| 296 | - $module_id = $xoopsModule->getVar('mid'); |
|
| 297 | - $gpermHandler = xoops_getHandler('groupperm'); |
|
| 293 | + case 'del': |
|
| 294 | + global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $_GET; |
|
| 298 | 295 | |
| 299 | - $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0; |
|
| 300 | - $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : $categoryid; |
|
| 296 | + $module_id = $xoopsModule->getVar('mid'); |
|
| 297 | + $gpermHandler = xoops_getHandler('groupperm'); |
|
| 301 | 298 | |
| 302 | - $categoryObj = new sfCategory($categoryid); |
|
| 299 | + $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0; |
|
| 300 | + $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : $categoryid; |
|
| 303 | 301 | |
| 304 | - $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0; |
|
| 305 | - $name = isset($_POST['name']) ? $_POST['name'] : ''; |
|
| 302 | + $categoryObj = new sfCategory($categoryid); |
|
| 306 | 303 | |
| 307 | - if ($confirm) { |
|
| 308 | - if (!$categoryHandler->delete($categoryObj)) { |
|
| 309 | - redirect_header('category.php', 1, _AM_SF_DELETE_CAT_ERROR); |
|
| 304 | + $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0; |
|
| 305 | + $name = isset($_POST['name']) ? $_POST['name'] : ''; |
|
| 306 | + |
|
| 307 | + if ($confirm) { |
|
| 308 | + if (!$categoryHandler->delete($categoryObj)) { |
|
| 309 | + redirect_header('category.php', 1, _AM_SF_DELETE_CAT_ERROR); |
|
| 310 | + } |
|
| 311 | + redirect_header('category.php', 1, sprintf(_AM_SF_COLISDELETED, $name)); |
|
| 312 | + } else { |
|
| 313 | + // no confirm: show deletion condition |
|
| 314 | + $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
| 315 | + xoops_cp_header(); |
|
| 316 | + xoops_confirm(array( |
|
| 317 | + 'op' => 'del', |
|
| 318 | + 'categoryid' => $categoryObj->categoryid(), |
|
| 319 | + 'confirm' => 1, |
|
| 320 | + 'name' => $categoryObj->name() |
|
| 321 | + ), 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
| 322 | + xoops_cp_footer(); |
|
| 310 | 323 | } |
| 311 | - redirect_header('category.php', 1, sprintf(_AM_SF_COLISDELETED, $name)); |
|
| 312 | - } else { |
|
| 313 | - // no confirm: show deletion condition |
|
| 314 | - $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
| 324 | + exit(); |
|
| 325 | + break; |
|
| 326 | + |
|
| 327 | + case 'cancel': |
|
| 328 | + redirect_header('category.php', 1, sprintf(_AM_SF_BACK2IDX, '')); |
|
| 329 | + break; |
|
| 330 | + case 'default': |
|
| 331 | + default: |
|
| 332 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 315 | 333 | xoops_cp_header(); |
| 316 | - xoops_confirm(array( |
|
| 317 | - 'op' => 'del', |
|
| 318 | - 'categoryid' => $categoryObj->categoryid(), |
|
| 319 | - 'confirm' => 1, |
|
| 320 | - 'name' => $categoryObj->name() |
|
| 321 | - ), 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE); |
|
| 322 | - xoops_cp_footer(); |
|
| 323 | - } |
|
| 324 | - exit(); |
|
| 325 | - break; |
|
| 326 | - |
|
| 327 | - case 'cancel': |
|
| 328 | - redirect_header('category.php', 1, sprintf(_AM_SF_BACK2IDX, '')); |
|
| 329 | - break; |
|
| 330 | - case 'default': |
|
| 331 | - default: |
|
| 332 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 333 | - xoops_cp_header(); |
|
| 334 | - |
|
| 335 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
| 336 | - echo "<br>\n"; |
|
| 337 | 334 | |
| 338 | - // Creating the objects for top categories |
|
| 339 | - $categoriesObj = $categoryHandler->getCategories($xoopsModuleConfig['perpage'], $startcategory, 0); |
|
| 340 | - |
|
| 341 | - sf_collapsableBar('toptable', 'toptableicon'); |
|
| 342 | - echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_CATEGORIES_TITLE . '</h3>'; |
|
| 343 | - echo "<div id='toptable'>"; |
|
| 344 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_CATEGORIES_DSC . '</span>'; |
|
| 345 | - |
|
| 346 | - echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
|
| 347 | - echo '<tr>'; |
|
| 348 | - echo "<th width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>'; |
|
| 349 | - echo "<th class='bg3' align='left'><b>" . _AM_SF_DESCRIP . '</b></td>'; |
|
| 350 | - echo "<th class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . '</b></td>'; |
|
| 351 | - echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
| 352 | - echo '</tr>'; |
|
| 353 | - $totalCategories = $categoryHandler->getCategoriesCount(0); |
|
| 354 | - if (count($categoriesObj) > 0) { |
|
| 355 | - foreach ($categoriesObj as $key => $thiscat) { |
|
| 356 | - displayCategory($thiscat); |
|
| 357 | - } |
|
| 358 | - } else { |
|
| 335 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
| 336 | + echo "<br>\n"; |
|
| 337 | + |
|
| 338 | + // Creating the objects for top categories |
|
| 339 | + $categoriesObj = $categoryHandler->getCategories($xoopsModuleConfig['perpage'], $startcategory, 0); |
|
| 340 | + |
|
| 341 | + sf_collapsableBar('toptable', 'toptableicon'); |
|
| 342 | + echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_CATEGORIES_TITLE . '</h3>'; |
|
| 343 | + echo "<div id='toptable'>"; |
|
| 344 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_CATEGORIES_DSC . '</span>'; |
|
| 345 | + |
|
| 346 | + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
|
| 359 | 347 | echo '<tr>'; |
| 360 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . '</td>'; |
|
| 348 | + echo "<th width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>'; |
|
| 349 | + echo "<th class='bg3' align='left'><b>" . _AM_SF_DESCRIP . '</b></td>'; |
|
| 350 | + echo "<th class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . '</b></td>'; |
|
| 351 | + echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
| 361 | 352 | echo '</tr>'; |
| 362 | - $categoryid = '0'; |
|
| 363 | - } |
|
| 364 | - echo "</table>\n"; |
|
| 365 | - require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 366 | - $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory'); |
|
| 367 | - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
| 368 | - echo '</div>'; |
|
| 353 | + $totalCategories = $categoryHandler->getCategoriesCount(0); |
|
| 354 | + if (count($categoriesObj) > 0) { |
|
| 355 | + foreach ($categoriesObj as $key => $thiscat) { |
|
| 356 | + displayCategory($thiscat); |
|
| 357 | + } |
|
| 358 | + } else { |
|
| 359 | + echo '<tr>'; |
|
| 360 | + echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . '</td>'; |
|
| 361 | + echo '</tr>'; |
|
| 362 | + $categoryid = '0'; |
|
| 363 | + } |
|
| 364 | + echo "</table>\n"; |
|
| 365 | + require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 366 | + $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory'); |
|
| 367 | + echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
| 368 | + echo '</div>'; |
|
| 369 | 369 | |
| 370 | - editcat(false); |
|
| 370 | + editcat(false); |
|
| 371 | 371 | |
| 372 | - break; |
|
| 372 | + break; |
|
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | require_once __DIR__ . '/admin_footer.php'; |
@@ -171,22 +171,22 @@ discard block |
||
| 171 | 171 | </td> |
| 172 | 172 | <td class='$class' align='center' nowrap='nowrap'> |
| 173 | 173 | <input type='radio' name='side[$bid]' value='" |
| 174 | - . XOOPS_SIDEBLOCK_LEFT |
|
| 175 | - . "'$ssel0>-<input type='radio' name='side[$bid]' value='" |
|
| 176 | - . XOOPS_CENTERBLOCK_LEFT |
|
| 177 | - . "'$ssel2><input type='radio' name='side[$bid]' value='" |
|
| 178 | - . XOOPS_CENTERBLOCK_CENTER |
|
| 179 | - . "'$ssel3><input type='radio' name='side[$bid]' value='" |
|
| 180 | - . XOOPS_CENTERBLOCK_RIGHT |
|
| 181 | - . "'$ssel4>-<input type='radio' name='side[$bid]' value='" |
|
| 182 | - . XOOPS_SIDEBLOCK_RIGHT |
|
| 183 | - . "'$ssel1> |
|
| 174 | + . XOOPS_SIDEBLOCK_LEFT |
|
| 175 | + . "'$ssel0>-<input type='radio' name='side[$bid]' value='" |
|
| 176 | + . XOOPS_CENTERBLOCK_LEFT |
|
| 177 | + . "'$ssel2><input type='radio' name='side[$bid]' value='" |
|
| 178 | + . XOOPS_CENTERBLOCK_CENTER |
|
| 179 | + . "'$ssel3><input type='radio' name='side[$bid]' value='" |
|
| 180 | + . XOOPS_CENTERBLOCK_RIGHT |
|
| 181 | + . "'$ssel4>-<input type='radio' name='side[$bid]' value='" |
|
| 182 | + . XOOPS_SIDEBLOCK_RIGHT |
|
| 183 | + . "'$ssel1> |
|
| 184 | 184 | <br> |
| 185 | 185 | <br> |
| 186 | 186 | <input type='radio' name='side[$bid]' value='-1'$sseln> |
| 187 | 187 | " |
| 188 | - . _NONE |
|
| 189 | - . " |
|
| 188 | + . _NONE |
|
| 189 | + . " |
|
| 190 | 190 | </td> |
| 191 | 191 | <td class='$class' align='center'> |
| 192 | 192 | <input type='text' name=weight[$bid] value='$weight' size='5' maxlength='5' style='text-align:right;'> |
@@ -203,8 +203,8 @@ discard block |
||
| 203 | 203 | </td> |
| 204 | 204 | <td class='$class' align='center'> |
| 205 | 205 | <a href='admin.php?fct=blocksadmin&op=edit&bid=$bid'>" |
| 206 | - . _EDIT |
|
| 207 | - . "</a> |
|
| 206 | + . _EDIT |
|
| 207 | + . "</a> |
|
| 208 | 208 | <input type='hidden' name='bid[$bid]' value='$bid'> |
| 209 | 209 | </td> |
| 210 | 210 | </tr>\n"; |
@@ -237,14 +237,14 @@ discard block |
||
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | $form = new MyXoopsGroupPermForm('', 1, 'block_read', "<img id='bottomtableicon' src=" |
| 240 | - . XOOPS_URL |
|
| 241 | - . '/modules/' |
|
| 242 | - . $xoopsModule->dirname() |
|
| 243 | - . "/assets/images/icon/close12.gif alt=''></a> " |
|
| 244 | - . _AM_SF_GROUPS |
|
| 245 | - . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
| 246 | - . _AM_SF_GROUPSINFO |
|
| 247 | - . '</span>'); |
|
| 240 | + . XOOPS_URL |
|
| 241 | + . '/modules/' |
|
| 242 | + . $xoopsModule->dirname() |
|
| 243 | + . "/assets/images/icon/close12.gif alt=''></a> " |
|
| 244 | + . _AM_SF_GROUPS |
|
| 245 | + . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
| 246 | + . _AM_SF_GROUPSINFO |
|
| 247 | + . '</span>'); |
|
| 248 | 248 | $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACTIVERIGHTS); |
| 249 | 249 | $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACCESSRIGHTS); |
| 250 | 250 | foreach ($item_list as $item_id => $item_name) { |
@@ -284,11 +284,11 @@ |
||
| 284 | 284 | $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0; |
| 285 | 285 | xoops_cp_header(); |
| 286 | 286 | xoops_confirm(array( |
| 287 | - 'op' => 'del', |
|
| 288 | - 'faqid' => $faqObj->faqid(), |
|
| 289 | - 'confirm' => 1, |
|
| 290 | - 'name' => $faqObj->question() |
|
| 291 | - ), 'question.php', _AM_SF_DELETETHISQUESTION . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
| 287 | + 'op' => 'del', |
|
| 288 | + 'faqid' => $faqObj->faqid(), |
|
| 289 | + 'confirm' => 1, |
|
| 290 | + 'name' => $faqObj->question() |
|
| 291 | + ), 'question.php', _AM_SF_DELETETHISQUESTION . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
| 292 | 292 | xoops_cp_footer(); |
| 293 | 293 | } |
| 294 | 294 | |
@@ -379,20 +379,20 @@ |
||
| 379 | 379 | $tree .= ' checked'; |
| 380 | 380 | } |
| 381 | 381 | $tree .= '>' |
| 382 | - . $option['name'] |
|
| 383 | - . '<input type="hidden" name="' |
|
| 384 | - . $this->getName() |
|
| 385 | - . '[parents][' |
|
| 386 | - . $option['id'] |
|
| 387 | - . ']" value="' |
|
| 388 | - . implode(':', $parentIds) |
|
| 389 | - . '"><input type="hidden" name="' |
|
| 390 | - . $this->getName() |
|
| 391 | - . '[itemname][' |
|
| 392 | - . $option['id'] |
|
| 393 | - . ']" value="' |
|
| 394 | - . htmlspecialchars($option['name']) |
|
| 395 | - . "\"><br>\n"; |
|
| 382 | + . $option['name'] |
|
| 383 | + . '<input type="hidden" name="' |
|
| 384 | + . $this->getName() |
|
| 385 | + . '[parents][' |
|
| 386 | + . $option['id'] |
|
| 387 | + . ']" value="' |
|
| 388 | + . implode(':', $parentIds) |
|
| 389 | + . '"><input type="hidden" name="' |
|
| 390 | + . $this->getName() |
|
| 391 | + . '[itemname][' |
|
| 392 | + . $option['id'] |
|
| 393 | + . ']" value="' |
|
| 394 | + . htmlspecialchars($option['name']) |
|
| 395 | + . "\"><br>\n"; |
|
| 396 | 396 | if (isset($option['children'])) { |
| 397 | 397 | foreach ($option['children'] as $child) { |
| 398 | 398 | array_push($parentIds, $option['id']); |
@@ -59,14 +59,14 @@ |
||
| 59 | 59 | echo $form_view->render(); |
| 60 | 60 | } else { |
| 61 | 61 | echo "<img id='toptableicon' src=" |
| 62 | - . XOOPS_URL |
|
| 63 | - . '/modules/' |
|
| 64 | - . $xoopsModule->dirname() |
|
| 65 | - . "/assets/images/icon/close12.gif alt=''></a> " |
|
| 66 | - . _AM_SF_PERMISSIONSVIEWMAN |
|
| 67 | - . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
| 68 | - . _AM_SF_NOPERMSSET |
|
| 69 | - . '</span>'; |
|
| 62 | + . XOOPS_URL |
|
| 63 | + . '/modules/' |
|
| 64 | + . $xoopsModule->dirname() |
|
| 65 | + . "/assets/images/icon/close12.gif alt=''></a> " |
|
| 66 | + . _AM_SF_PERMISSIONSVIEWMAN |
|
| 67 | + . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
| 68 | + . _AM_SF_NOPERMSSET |
|
| 69 | + . '</span>'; |
|
| 70 | 70 | } |
| 71 | 71 | echo '</div>'; |
| 72 | 72 | |
@@ -24,53 +24,53 @@ |
||
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | switch ($op) { |
| 27 | - case 'default': |
|
| 28 | - default: |
|
| 29 | - global $xoopsDB, $xoopsModule; |
|
| 27 | + case 'default': |
|
| 28 | + default: |
|
| 29 | + global $xoopsDB, $xoopsModule; |
|
| 30 | 30 | |
| 31 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 32 | - xoops_cp_header(); |
|
| 33 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
| 34 | - // View Categories permissions |
|
| 35 | - $item_list_view = array(); |
|
| 36 | - $block_view = array(); |
|
| 37 | - // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ; |
|
| 38 | - sf_collapsableBar('toptable', 'toptableicon'); |
|
| 31 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 32 | + xoops_cp_header(); |
|
| 33 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
| 34 | + // View Categories permissions |
|
| 35 | + $item_list_view = array(); |
|
| 36 | + $block_view = array(); |
|
| 37 | + // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ; |
|
| 38 | + sf_collapsableBar('toptable', 'toptableicon'); |
|
| 39 | 39 | |
| 40 | - $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' '); |
|
| 41 | - if ($xoopsDB->getRowsNum($result_view)) { |
|
| 42 | - while ($myrow_view = $xoopsDB->fetcharray($result_view)) { |
|
| 43 | - $item_list_view['cid'] = $myrow_view['categoryid']; |
|
| 44 | - $item_list_view['title'] = $myrow_view['name']; |
|
| 45 | - $form_view = new XoopsGroupPermForm('', $xoopsModule->getVar('mid'), 'category_read', "<img id='toptableicon' src=" |
|
| 46 | - . XOOPS_URL |
|
| 47 | - . '/modules/' |
|
| 48 | - . $xoopsModule->dirname() |
|
| 49 | - . "/assets/images/icon/close12.gif alt=''></a> " |
|
| 50 | - . _AM_SF_PERMISSIONSVIEWMAN |
|
| 51 | - . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
| 52 | - . _AM_SF_VIEW_CATS |
|
| 53 | - . '</span>', 'admin/permissions.php'); |
|
| 54 | - $block_view[] = $item_list_view; |
|
| 55 | - foreach ($block_view as $itemlists) { |
|
| 56 | - $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title'])); |
|
| 40 | + $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' '); |
|
| 41 | + if ($xoopsDB->getRowsNum($result_view)) { |
|
| 42 | + while ($myrow_view = $xoopsDB->fetcharray($result_view)) { |
|
| 43 | + $item_list_view['cid'] = $myrow_view['categoryid']; |
|
| 44 | + $item_list_view['title'] = $myrow_view['name']; |
|
| 45 | + $form_view = new XoopsGroupPermForm('', $xoopsModule->getVar('mid'), 'category_read', "<img id='toptableicon' src=" |
|
| 46 | + . XOOPS_URL |
|
| 47 | + . '/modules/' |
|
| 48 | + . $xoopsModule->dirname() |
|
| 49 | + . "/assets/images/icon/close12.gif alt=''></a> " |
|
| 50 | + . _AM_SF_PERMISSIONSVIEWMAN |
|
| 51 | + . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
| 52 | + . _AM_SF_VIEW_CATS |
|
| 53 | + . '</span>', 'admin/permissions.php'); |
|
| 54 | + $block_view[] = $item_list_view; |
|
| 55 | + foreach ($block_view as $itemlists) { |
|
| 56 | + $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title'])); |
|
| 57 | + } |
|
| 57 | 58 | } |
| 59 | + echo $form_view->render(); |
|
| 60 | + } else { |
|
| 61 | + echo "<img id='toptableicon' src=" |
|
| 62 | + . XOOPS_URL |
|
| 63 | + . '/modules/' |
|
| 64 | + . $xoopsModule->dirname() |
|
| 65 | + . "/assets/images/icon/close12.gif alt=''></a> " |
|
| 66 | + . _AM_SF_PERMISSIONSVIEWMAN |
|
| 67 | + . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
| 68 | + . _AM_SF_NOPERMSSET |
|
| 69 | + . '</span>'; |
|
| 58 | 70 | } |
| 59 | - echo $form_view->render(); |
|
| 60 | - } else { |
|
| 61 | - echo "<img id='toptableicon' src=" |
|
| 62 | - . XOOPS_URL |
|
| 63 | - . '/modules/' |
|
| 64 | - . $xoopsModule->dirname() |
|
| 65 | - . "/assets/images/icon/close12.gif alt=''></a> " |
|
| 66 | - . _AM_SF_PERMISSIONSVIEWMAN |
|
| 67 | - . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
| 68 | - . _AM_SF_NOPERMSSET |
|
| 69 | - . '</span>'; |
|
| 70 | - } |
|
| 71 | - echo '</div>'; |
|
| 71 | + echo '</div>'; |
|
| 72 | 72 | |
| 73 | - echo "<br>\n"; |
|
| 73 | + echo "<br>\n"; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | require_once __DIR__ . '/admin_footer.php'; |
@@ -70,18 +70,18 @@ |
||
| 70 | 70 | $myblock->setVar('title', $myts->stripSlashesGPC($btitle)); |
| 71 | 71 | $myblock->setVar('content', $myts->stripSlashesGPC($bcontent)); |
| 72 | 72 | $dummyhtml = '<html><head><meta http-equiv="content-type" content="text/html; charset=' |
| 73 | - . _CHARSET |
|
| 74 | - . '"><meta http-equiv="content-language" content="' |
|
| 75 | - . _LANGCODE |
|
| 76 | - . '"><title>' |
|
| 77 | - . $xoopsConfig['sitename'] |
|
| 78 | - . '</title><link rel="stylesheet" type="text/css" media="all" href="' |
|
| 79 | - . getcss($xoopsConfig['theme_set']) |
|
| 80 | - . '"></head><body><table><tr><th>' |
|
| 81 | - . $myblock->getVar('title') |
|
| 82 | - . '</th></tr><tr><td>' |
|
| 83 | - . $myblock->getContent('S', $bctype) |
|
| 84 | - . '</td></tr></table></body></html>'; |
|
| 73 | + . _CHARSET |
|
| 74 | + . '"><meta http-equiv="content-language" content="' |
|
| 75 | + . _LANGCODE |
|
| 76 | + . '"><title>' |
|
| 77 | + . $xoopsConfig['sitename'] |
|
| 78 | + . '</title><link rel="stylesheet" type="text/css" media="all" href="' |
|
| 79 | + . getcss($xoopsConfig['theme_set']) |
|
| 80 | + . '"></head><body><table><tr><th>' |
|
| 81 | + . $myblock->getVar('title') |
|
| 82 | + . '</th></tr><tr><td>' |
|
| 83 | + . $myblock->getContent('S', $bctype) |
|
| 84 | + . '</td></tr></table></body></html>'; |
|
| 85 | 85 | |
| 86 | 86 | $dummyfile = '_dummyfile_' . time() . '.html'; |
| 87 | 87 | $fp = fopen(XOOPS_CACHE_PATH . '/' . $dummyfile, 'w'); |
@@ -768,12 +768,12 @@ |
||
| 768 | 768 | |
| 769 | 769 | if ($faq->isNew()) { |
| 770 | 770 | $sql = sprintf('INSERT INTO "%s" (faqid, categoryid, question, howdoi, diduno, uid, datesub, `status`, counter, weight, html, smiley, xcodes, cancomment, comments, notifypub, modulelink, contextpage, exacturl, partialview) VALUES (NULL, %u, %s, %s, %s, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %s, %s, %u, %u)', |
| 771 | - $this->db->prefix('smartfaq_faq'), $categoryid, $this->db->quoteString($question), $this->db->quoteString($howdoi), $this->db->quoteString($diduno), $uid, time(), $status, $counter, $weight, $html, $smiley, $xcodes, $cancomment, $comments, $notifypub, |
|
| 772 | - $this->db->quoteString($modulelink), $this->db->quoteString($contextpage), $exacturl, $partialview); |
|
| 771 | + $this->db->prefix('smartfaq_faq'), $categoryid, $this->db->quoteString($question), $this->db->quoteString($howdoi), $this->db->quoteString($diduno), $uid, time(), $status, $counter, $weight, $html, $smiley, $xcodes, $cancomment, $comments, $notifypub, |
|
| 772 | + $this->db->quoteString($modulelink), $this->db->quoteString($contextpage), $exacturl, $partialview); |
|
| 773 | 773 | } else { |
| 774 | 774 | $sql = sprintf('UPDATE "%s" SET categoryid = "%u", question = "%s", howdoi = "%s", diduno = "%s", uid = "%u", datesub = "%u", `status` = "%u", counter = "%u", weight = "%u", html = "%u", smiley = "%u", xcodes = "%u", cancomment = "%u", comments = "%u", notifypub = "%u", modulelink = "%s", contextpage = "%s", exacturl = "%u", partialview = "%u" WHERE faqid = "%u"', |
| 775 | - $this->db->prefix('smartfaq_faq'), $categoryid, $this->db->quoteString($question), $this->db->quoteString($howdoi), $this->db->quoteString($diduno), $uid, $datesub, $status, $counter, $weight, $html, $smiley, $xcodes, $cancomment, $comments, $notifypub, |
|
| 776 | - $this->db->quoteString($modulelink), $this->db->quoteString($contextpage), $exacturl, $partialview, $faqid); |
|
| 775 | + $this->db->prefix('smartfaq_faq'), $categoryid, $this->db->quoteString($question), $this->db->quoteString($howdoi), $this->db->quoteString($diduno), $uid, $datesub, $status, $counter, $weight, $html, $smiley, $xcodes, $cancomment, $comments, $notifypub, |
|
| 776 | + $this->db->quoteString($modulelink), $this->db->quoteString($contextpage), $exacturl, $partialview, $faqid); |
|
| 777 | 777 | } |
| 778 | 778 | if (false !== $force) { |
| 779 | 779 | $result = $this->db->queryF($sql); |
@@ -334,10 +334,10 @@ |
||
| 334 | 334 | |
| 335 | 335 | if ($category->isNew()) { |
| 336 | 336 | $sql = sprintf('INSERT INTO %s (categoryid, parentid, name, description, total, weight, created) VALUES (NULL, %u, %s, %s, %u, %u, %u)', $this->db->prefix('smartfaq_categories'), |
| 337 | - $parentid, $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, time()); |
|
| 337 | + $parentid, $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, time()); |
|
| 338 | 338 | } else { |
| 339 | 339 | $sql = sprintf('UPDATE %s SET parentid = %u, name = %s, description = %s, total = %s, weight = %u, created = %u WHERE categoryid = %u', $this->db->prefix('smartfaq_categories'), $parentid, |
| 340 | - $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, $created, $categoryid); |
|
| 340 | + $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, $created, $categoryid); |
|
| 341 | 341 | } |
| 342 | 342 | if (false !== $force) { |
| 343 | 343 | $result = $this->db->queryF($sql); |