|
@@ 35-44 (lines=10) @@
|
| 32 |
|
|
| 33 |
|
global $xoopsDB; |
| 34 |
|
|
| 35 |
|
if ($category === 'category') { |
| 36 |
|
// Assume we have a valid category id |
| 37 |
|
$sql = 'SELECT name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' WHERE categoryid = ' . $item_id; |
| 38 |
|
$result = $xoopsDB->query($sql); // TODO: error check |
| 39 |
|
$result_array = $xoopsDB->fetchArray($result); |
| 40 |
|
$item['name'] = $result_array['name']; |
| 41 |
|
$item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/category.php?categoryid=' . $item_id; |
| 42 |
|
|
| 43 |
|
return $item; |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
if ($category === 'faq') { |
| 47 |
|
// Assume we have a valid story id |
|
@@ 46-55 (lines=10) @@
|
| 43 |
|
return $item; |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
if ($category === 'faq') { |
| 47 |
|
// Assume we have a valid story id |
| 48 |
|
$sql = 'SELECT question FROM ' . $xoopsDB->prefix('smartfaq_faq') . ' WHERE faqid = ' . $item_id; |
| 49 |
|
$result = $xoopsDB->query($sql); // TODO: error check |
| 50 |
|
$result_array = $xoopsDB->fetchArray($result); |
| 51 |
|
$item['name'] = $result_array['question']; |
| 52 |
|
$item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/faq.php?faqid=' . $item_id; |
| 53 |
|
|
| 54 |
|
return $item; |
| 55 |
|
} |
| 56 |
|
} |
| 57 |
|
|