$cat_from_id = -1; $categoryPath = array(0); if (is_numeric($id) && $id > 0) { $categoryRelations = new PMF_Category_Relations(); foreach ($categoryRelations->fetchAll() as $relation) { if ($relation->record_id == $id) { $cat_from_id = $relation->category_id; break; } } } if ($cat_from_id != -1 && $cat == 0) { $cat = $cat_from_id; } if ($cat != 0) { $categoryPath = $categoryData->getPath($cat); } /* @todo: Fix this old code if (isset($cat) && ($cat != 0) && ($id == '') && isset($category->categoryName[$cat]['name'])) { $title = ' - '.$category->categoryName[$cat]['name']; } */ // // Found an action request? // if (!isset($allowedVariables[$action])) { $action = 'main'; } // // Select the template for the requested page //
$catInfo .= $isBracketOpened ? ')' : ''; if ($cid != $old) { if ($old == 0) { printf('<a name="cat_%d"></a>', $cid); } else { print " </tbody>\n </table>\n </div>"; } ?> <div class="categorylisting"> <img src="../images/more.gif" width="11" height="11" alt="" /> <a href="javascript:void(0);" onclick="showhideCategory('category_<?php print $cid; ?> ');"> <?php print $categoryLayout->renderBreadcrumb($categoryData->getPath($cid)); ?> </a><?php print $catInfo; ?> </div> <div id="category_<?php print $cid; ?> " class="categorybox" style="display: <?php print $currentcategory == $cid ? 'block' : 'none'; ?> ;"> <table class="listrecords"> <thead> <tr>
}, 5000); }); //--> </script> <?php } else { print $PMF_LANG['ad_entry_savedfail'] . $db->error(); } } elseif (isset($submit['submit'][2]) && !is_null($question) && !is_null($categories)) { // Preview $categoryDataProvider = new PMF_Category_Tree_DataProvider_SingleQuery($LANGCODE); $categoryTree = new PMF_Category_Tree($categoryDataProvider); $categoryLayout = new PMF_Category_Layout(new PMF_Category_Tree_Helper($categoryTree)); $categorylist = ''; foreach ($categories['rubrik'] as $categoryId) { $categoryPath = $categoryDataProvider->getPath($categoryId); $categorylist .= $categoryLayout->renderBreadcrumb($categoryPath) . '<br />'; } ?> <h3><strong><em><?php print $categorylist; ?> </em> <?php print $question; ?> </strong></h3> <?php print html_entity_decode($content); ?> <p class="little"><?php
$faqRecord = new PMF_Faq_Record(); $faqRecord->setLanguage($LANGCODE); $faqData = $faqRecord->fetchAll(); ?> <h2><?php print $PMF_LANG["ad_rs"]; ?> </h2> <table id="tableUserRatings"> <?php foreach ($ratingdata as $data) { if ($data['category_id'] != $oldcategory) { ?> <tr> <th colspan="5"><strong><?php print $categoryLayout->renderBreadcrumb($categoryData->getPath($data['category_id'])); ?> </strong></th> </tr> <?php } ?> <tr> <td><?php print $data['id']; ?> </td> <td><?php print $data['lang']; ?> </td>
<td> <?php print PMF_Date::createIsoDate($question->date); ?> <br /> <a href="mailto:<?php print $question->email; ?> "><?php print $question->username; ?> </a> </td> <td> <?php print $categoryLayout->renderBreadcrumb($categoryData->getPath($question->category_id)); ?> :<br /> <?php print $question->question; ?> </td> <td> <a href="?action=question&id=<?php print $question->id; ?> &is_visible=toggle"> <?php print 'Y' == $question->is_visible ? $PMF_LANG['ad_gen_no'] : $PMF_LANG['ad_gen_yes']; ?> !</a>