@@ -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 | |
@@ -192,16 +192,16 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | $ret = '<h4>' . $this->getTitle() . '</h4>' . $this->_permDesc . '<br>'; |
| 194 | 194 | $ret .= "<form name='" |
| 195 | - . $this->getName() |
|
| 196 | - . "' id='" |
|
| 197 | - . $this->getName() |
|
| 198 | - . "' action='" |
|
| 199 | - . $this->getAction() |
|
| 200 | - . "' method='" |
|
| 201 | - . $this->getMethod() |
|
| 202 | - . "'" |
|
| 203 | - . $this->getExtra() |
|
| 204 | - . ">\n<table width='100%' class='outer' cellspacing='1'>\n"; |
|
| 195 | + . $this->getName() |
|
| 196 | + . "' id='" |
|
| 197 | + . $this->getName() |
|
| 198 | + . "' action='" |
|
| 199 | + . $this->getAction() |
|
| 200 | + . "' method='" |
|
| 201 | + . $this->getMethod() |
|
| 202 | + . "'" |
|
| 203 | + . $this->getExtra() |
|
| 204 | + . ">\n<table width='100%' class='outer' cellspacing='1'>\n"; |
|
| 205 | 205 | $elements =& $this->getElements(); |
| 206 | 206 | foreach (array_keys($elements) as $i) { |
| 207 | 207 | if (!is_object($elements[$i])) { |
@@ -369,19 +369,19 @@ discard block |
||
| 369 | 369 | private function renderOptionTree(&$tree, $option, $prefix, $parentIds = array()) |
| 370 | 370 | { |
| 371 | 371 | $tree .= $prefix |
| 372 | - . '<input type="checkbox" name="' |
|
| 373 | - . $this->getName() |
|
| 374 | - . '[groups][' |
|
| 375 | - . $this->_groupId |
|
| 376 | - . '][' |
|
| 377 | - . $option['id'] |
|
| 378 | - . ']" id="' |
|
| 379 | - . $this->getName() |
|
| 380 | - . '[groups][' |
|
| 381 | - . $this->_groupId |
|
| 382 | - . '][' |
|
| 383 | - . $option['id'] |
|
| 384 | - . ']" onclick="'; |
|
| 372 | + . '<input type="checkbox" name="' |
|
| 373 | + . $this->getName() |
|
| 374 | + . '[groups][' |
|
| 375 | + . $this->_groupId |
|
| 376 | + . '][' |
|
| 377 | + . $option['id'] |
|
| 378 | + . ']" id="' |
|
| 379 | + . $this->getName() |
|
| 380 | + . '[groups][' |
|
| 381 | + . $this->_groupId |
|
| 382 | + . '][' |
|
| 383 | + . $option['id'] |
|
| 384 | + . ']" onclick="'; |
|
| 385 | 385 | // If there are parent elements, add javascript that will |
| 386 | 386 | // make them selecteded when this element is checked to make |
| 387 | 387 | // sure permissions to parent items are added as well. |
@@ -402,20 +402,20 @@ discard block |
||
| 402 | 402 | $tree .= ' checked'; |
| 403 | 403 | } |
| 404 | 404 | $tree .= ' />' |
| 405 | - . $option['name'] |
|
| 406 | - . '<input type="hidden" name="' |
|
| 407 | - . $this->getName() |
|
| 408 | - . '[parents][' |
|
| 409 | - . $option['id'] |
|
| 410 | - . ']" value="' |
|
| 411 | - . implode(':', $parentIds) |
|
| 412 | - . '" /><input type="hidden" name="' |
|
| 413 | - . $this->getName() |
|
| 414 | - . '[itemname][' |
|
| 415 | - . $option['id'] |
|
| 416 | - . ']" value="' |
|
| 417 | - . htmlspecialchars($option['name']) |
|
| 418 | - . "\" /><br>\n"; |
|
| 405 | + . $option['name'] |
|
| 406 | + . '<input type="hidden" name="' |
|
| 407 | + . $this->getName() |
|
| 408 | + . '[parents][' |
|
| 409 | + . $option['id'] |
|
| 410 | + . ']" value="' |
|
| 411 | + . implode(':', $parentIds) |
|
| 412 | + . '" /><input type="hidden" name="' |
|
| 413 | + . $this->getName() |
|
| 414 | + . '[itemname][' |
|
| 415 | + . $option['id'] |
|
| 416 | + . ']" value="' |
|
| 417 | + . htmlspecialchars($option['name']) |
|
| 418 | + . "\" /><br>\n"; |
|
| 419 | 419 | if (isset($option['children'])) { |
| 420 | 420 | foreach ($option['children'] as $child) { |
| 421 | 421 | array_push($parentIds, $option['id']); |
@@ -284,11 +284,11 @@ discard block |
||
| 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 | |
@@ -338,25 +338,25 @@ discard block |
||
| 338 | 338 | $categoryObj = $allCats[$faqsObj[$i]->categoryid()]; |
| 339 | 339 | |
| 340 | 340 | $modify = "<a href='question.php?op=mod&faqid=" |
| 341 | - . $faqsObj[$i]->faqid() |
|
| 342 | - . "'><img src='" |
|
| 343 | - . $pathIcon16 |
|
| 344 | - . '/edit.png' |
|
| 345 | - . "' title='" |
|
| 346 | - . _AM_SF_EDITART |
|
| 347 | - . "' alt='" |
|
| 348 | - . _AM_SF_EDITART |
|
| 349 | - . "'></a>"; |
|
| 341 | + . $faqsObj[$i]->faqid() |
|
| 342 | + . "'><img src='" |
|
| 343 | + . $pathIcon16 |
|
| 344 | + . '/edit.png' |
|
| 345 | + . "' title='" |
|
| 346 | + . _AM_SF_EDITART |
|
| 347 | + . "' alt='" |
|
| 348 | + . _AM_SF_EDITART |
|
| 349 | + . "'></a>"; |
|
| 350 | 350 | $delete = "<a href='question.php?op=del&faqid=" |
| 351 | - . $faqsObj[$i]->faqid() |
|
| 352 | - . "'><img src='" |
|
| 353 | - . $pathIcon16 |
|
| 354 | - . '/delete.png' |
|
| 355 | - . "' title='" |
|
| 356 | - . _AM_SF_DELETEART |
|
| 357 | - . "' alt='" |
|
| 358 | - . _AM_SF_DELETEART |
|
| 359 | - . "'></a>"; |
|
| 351 | + . $faqsObj[$i]->faqid() |
|
| 352 | + . "'><img src='" |
|
| 353 | + . $pathIcon16 |
|
| 354 | + . '/delete.png' |
|
| 355 | + . "' title='" |
|
| 356 | + . _AM_SF_DELETEART |
|
| 357 | + . "' alt='" |
|
| 358 | + . _AM_SF_DELETEART |
|
| 359 | + . "'></a>"; |
|
| 360 | 360 | |
| 361 | 361 | $requester = sf_getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']); |
| 362 | 362 | |
@@ -364,14 +364,14 @@ discard block |
||
| 364 | 364 | echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . '</td>'; |
| 365 | 365 | echo "<td class='even' align='left'>" . $categoryObj->name() . '</td>'; |
| 366 | 366 | echo "<td class='even' align='left'><a href='" |
| 367 | - . XOOPS_URL |
|
| 368 | - . '/modules/' |
|
| 369 | - . $xoopsModule->dirname() |
|
| 370 | - . '/answer.php?faqid=' |
|
| 371 | - . $faqsObj[$i]->faqid() |
|
| 372 | - . "'>" |
|
| 373 | - . $faqsObj[$i]->question(100) |
|
| 374 | - . '</a></td>'; |
|
| 367 | + . XOOPS_URL |
|
| 368 | + . '/modules/' |
|
| 369 | + . $xoopsModule->dirname() |
|
| 370 | + . '/answer.php?faqid=' |
|
| 371 | + . $faqsObj[$i]->faqid() |
|
| 372 | + . "'>" |
|
| 373 | + . $faqsObj[$i]->question(100) |
|
| 374 | + . '</a></td>'; |
|
| 375 | 375 | |
| 376 | 376 | echo "<td class='even' align='center'>" . $requester . '</td>'; |
| 377 | 377 | |
@@ -19,12 +19,12 @@ |
||
| 19 | 19 | |
| 20 | 20 | $pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32); |
| 21 | 21 | echo "<div class='adminfooter'>\n" |
| 22 | - . " <div style='text-align: center;'>\n" |
|
| 23 | - . " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" |
|
| 24 | - . " </div>\n" |
|
| 25 | - . ' ' |
|
| 26 | - . _AM_MODULEADMIN_ADMIN_FOOTER |
|
| 27 | - . "\n" |
|
| 28 | - . '</div>'; |
|
| 22 | + . " <div style='text-align: center;'>\n" |
|
| 23 | + . " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" |
|
| 24 | + . " </div>\n" |
|
| 25 | + . ' ' |
|
| 26 | + . _AM_MODULEADMIN_ADMIN_FOOTER |
|
| 27 | + . "\n" |
|
| 28 | + . '</div>'; |
|
| 29 | 29 | |
| 30 | 30 | xoops_cp_footer(); |
@@ -549,11 +549,11 @@ |
||
| 549 | 549 | $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0; |
| 550 | 550 | xoops_cp_header(); |
| 551 | 551 | xoops_confirm(array( |
| 552 | - 'op' => 'del', |
|
| 553 | - 'faqid' => $faqObj->faqid(), |
|
| 554 | - 'confirm' => 1, |
|
| 555 | - 'name' => $faqObj->question() |
|
| 556 | - ), 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
| 552 | + 'op' => 'del', |
|
| 553 | + 'faqid' => $faqObj->faqid(), |
|
| 554 | + 'confirm' => 1, |
|
| 555 | + 'name' => $faqObj->question() |
|
| 556 | + ), 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE); |
|
| 557 | 557 | xoops_cp_footer(); |
| 558 | 558 | } |
| 559 | 559 | |
@@ -82,15 +82,15 @@ |
||
| 82 | 82 | |
| 83 | 83 | $xoopsTpl->assign('xcodes', $faqObj->getVar('xcodes')); |
| 84 | 84 | $xoopsTpl->assign('mail_link', 'mailto:?subject=' |
| 85 | - . sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']) |
|
| 86 | - . '&body=' |
|
| 87 | - . sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']) |
|
| 88 | - . ': ' |
|
| 89 | - . XOOPS_URL |
|
| 90 | - . '/modules/' |
|
| 91 | - . $xoopsModule->dirname() |
|
| 92 | - . '/faq.php?faqid=' |
|
| 93 | - . $faqObj->getVar('faqid')); |
|
| 85 | + . sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']) |
|
| 86 | + . '&body=' |
|
| 87 | + . sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']) |
|
| 88 | + . ': ' |
|
| 89 | + . XOOPS_URL |
|
| 90 | + . '/modules/' |
|
| 91 | + . $xoopsModule->dirname() |
|
| 92 | + . '/faq.php?faqid=' |
|
| 93 | + . $faqObj->getVar('faqid')); |
|
| 94 | 94 | $xoopsTpl->assign('lang_printerpage', _MD_SF_PRINTERFRIENDLY); |
| 95 | 95 | $xoopsTpl->assign('lang_sendstory', _MD_SF_SENDSTORY); |
| 96 | 96 | $xoopsTpl->assign('faqid', $faqObj->getVar('faqid')); |
@@ -46,8 +46,8 @@ |
||
| 46 | 46 | 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>'; |
| 47 | 47 | } else { |
| 48 | 48 | echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' |
| 49 | - . sprintf(_AM_SF_IMPORT_MODULE_FOUND, $importFromModuleName, $totalCat, $totalFAQ) |
|
| 50 | - . '</span>'; |
|
| 49 | + . sprintf(_AM_SF_IMPORT_MODULE_FOUND, $importFromModuleName, $totalCat, $totalFAQ) |
|
| 50 | + . '</span>'; |
|
| 51 | 51 | |
| 52 | 52 | $form = new XoopsThemeForm(_AM_SF_IMPORT_SETTINGS, 'import_form', XOOPS_URL . '/modules/smartfaq/admin/' . $scriptname); |
| 53 | 53 | |
@@ -333,10 +333,10 @@ discard block |
||
| 333 | 333 | |
| 334 | 334 | if ($category->isNew()) { |
| 335 | 335 | $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'), |
| 336 | - $parentid, $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, time()); |
|
| 336 | + $parentid, $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, time()); |
|
| 337 | 337 | } else { |
| 338 | 338 | $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, |
| 339 | - $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, $created, $categoryid); |
|
| 339 | + $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, $created, $categoryid); |
|
| 340 | 340 | } |
| 341 | 341 | if (false !== $force) { |
| 342 | 342 | $result = $this->db->queryF($sql); |
@@ -520,10 +520,10 @@ discard block |
||
| 520 | 520 | $ret = array(); |
| 521 | 521 | $limit = $start = 0; |
| 522 | 522 | $sql = 'SELECT DISTINCT c.categoryid, c.parentid, c.name, c.description, c.total, c.weight, c.created FROM ' |
| 523 | - . $this->db->prefix('smartfaq_categories') |
|
| 524 | - . ' AS c INNER JOIN ' |
|
| 525 | - . $this->db->prefix('smartfaq_faq') |
|
| 526 | - . ' AS f ON c.categoryid = f.categoryid'; |
|
| 523 | + . $this->db->prefix('smartfaq_categories') |
|
| 524 | + . ' AS c INNER JOIN ' |
|
| 525 | + . $this->db->prefix('smartfaq_faq') |
|
| 526 | + . ' AS f ON c.categoryid = f.categoryid'; |
|
| 527 | 527 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
| 528 | 528 | $sql .= ' ' . $criteria->renderWhere(); |
| 529 | 529 | if ($criteria->getSort() != '') { |
@@ -472,10 +472,10 @@ |
||
| 472 | 472 | |
| 473 | 473 | if ($answerObj->isNew()) { |
| 474 | 474 | $sql = sprintf('INSERT INTO %s (answerid, `status`, faqid, answer, uid, datesub, notifypub) VALUES (NULL, %u, %u, %s, %u, %u, %u)', $this->db->prefix('smartfaq_answers'), $status, $faqid, |
| 475 | - $this->db->quoteString($answer), $uid, time(), $notifypub); |
|
| 475 | + $this->db->quoteString($answer), $uid, time(), $notifypub); |
|
| 476 | 476 | } else { |
| 477 | 477 | $sql = sprintf('UPDATE %s SET STATUS = %u, faqid = %s, answer = %s, uid = %u, datesub = %u, notifypub = %u WHERE answerid = %u', $this->db->prefix('smartfaq_answers'), $status, $faqid, |
| 478 | - $this->db->quoteString($answer), $uid, $datesub, $notifypub, $answerid); |
|
| 478 | + $this->db->quoteString($answer), $uid, $datesub, $notifypub, $answerid); |
|
| 479 | 479 | } |
| 480 | 480 | |
| 481 | 481 | if (false !== $force) { |