switch ($_GET['task']) { case 'getmenu': getmenu(); break; case 'savecontent': savecontent($_POST); break; case 'history': history($_GET); break; case 'suche': suche($_GET['wort'], $_GET['kat']); break; case 'newcat': newcat($_GET); break; case 'editcat': editcat($_GET['id']); break; case 'filesearch': filesearch(); break; case 'edit': getonecontent($_GET['id'], $_GET['edit']); break; case 'neu': neucontent(); break; default: echo $_GET['task'] . ' nicht erlaubt'; }
break; case 7: if (!isset($parent)) { $parent = ""; } $message = addcat($category, $parent); list_cats(0, 0, "evrow", $message); break; case categories: list_cats(0, 0, "evrow", ""); break; case edit_cat: editcatform($cat_id); break; case 10: $message = editcat($cat_id, $category); list_cats(0, 0, "evrow", $message); break; case 11: deletecat($cat_id); list_cats(0, 0, "evrow"); break; case 14: clearBestMedia(); break; case 15: $back = "1"; cleanKeywords($back); break; case 16: $back = "1";
} if ($year) { cat($id, $catcolor, $secondcatcolor, $year, $sort, $cuser, $limit); } else { cat($id, $catcolor, $secondcatcolor, $y, $sort, $cuser, $limit); } break; // add new category // add new category case "addcat": addcat($cat); break; // edit category // edit category case "editcat": editcat($id); break; // update category // update category case "updatecat": updatecat($cat, $id); break; // delete cat: question // delete cat: question case "delcat": delcat($id); break; // confirmation of delete cat // confirmation of delete cat case "delcatok": delcatok($id);
} break; /*** * Categories */ /*** * Categories */ case "listcats": listcats($cat_id[0], $cat_parent, $option); break; case "newcat": editcat(0, $cat_parent, $option); break; case "editcat": editcat($cat_id[0], $cat_parent, $option); break; case "editcat_browse_cat": editcat_browse_cat($option, 0); break; case "editcat_add_relcat": editcat_browse_cat($option, 1); break; case "editcat_remove_relcat": editcat_browse_cat($option, -1); break; case "applycat": case "savecat": $cache->clean(); savecat($option); break;
break; //Added by fx2024 //Added by fx2024 case "addsubcats": $categoryid = 0; $nb_subcats = intval($_POST['nb_subcats']) + $_POST['nb_sub_yet']; smartsection_xoops_cp_header(); $categoryObj =& $smartsection_category_handler->create(); $categoryObj->setVar('name', $_POST['name']); $categoryObj->setVar('description', $_POST['description']); $categoryObj->setVar('weight', $_POST['weight']); $categoryObj->setGroups_read(isset($_POST['groups_read']) ? $_POST['groups_read'] : array()); if (isset($parentCat)) { $categoryObj->setVar('parentid', $parentCat); } editcat(true, $categoryid, $nb_subcats, $categoryObj); exit; break; //end of fx2024 code //end of fx2024 code case "cancel": redirect_header("category.php", 1, sprintf(_AM_SSECTION_BACK2IDX, '')); exit; case "default": default: smartsection_xoops_cp_header(); smartsection_adminMenu(1, _AM_SSECTION_CATEGORIES); echo "<br />\n"; echo "<form><div style=\"margin-bottom: 12px;\">"; echo "<input type='button' name='button' onclick=\"location='category.php?op=mod'\" value='" . _AM_SSECTION_CATEGORY_CREATE . "'> "; //echo "<input type='button' name='button' onclick=\"location='item.php?op=mod'\" value='" . _AM_SSECTION_CREATEITEM . "'> ";
$mytree->makeMySelBox("name", "catid"); $sform->addElement(new XoopsFormLabel(_AM_MODIFYTHISCAT, ob_get_contents())); ob_end_clean(); $button_tray = new XoopsFormElementTray('', ''); $hidden = new XoopsFormHidden('modify', 1); $hidden = new XoopsFormHidden('op', 'mod'); $button_tray->addElement($hidden); $button_tray->addElement(new XoopsFormButton('', 'mod', _AM_MODIFY, 'submit')); $sform->addElement($button_tray); $sform->display(); //Delete Category $mytree2 = new XoopsTree($xoopsDB->prefix("faqcategories"), "catid", "0"); $dform = new XoopsThemeForm(_AM_DELCAT, "storyform", xoops_getenv('PHP_SELF')); ob_start(); $dform->addElement(new XoopsFormHidden('catid', '')); $mytree2->makeMySelBox("name", "catid"); $dform->addElement(new XoopsFormLabel(_AM_DELETETHISCAT, ob_get_contents())); ob_end_clean(); $button_tray = new XoopsFormElementTray('', ''); $hidden = new XoopsFormHidden('modify', 1); $hidden = new XoopsFormHidden('op', 'del'); $button_tray->addElement($hidden); $button_tray->addElement(new XoopsFormButton('', 'mod', _AM_DELETE, 'submit')); $dform->addElement($button_tray); $dform->display(); } editcat(); break; } wffaqfooter(); xoops_cp_footer();
$button_tray->addElement($butt_create); $butt_cancel = new XoopsFormButton('', '', _AM_SMEDIA_CANCEL, 'button'); $butt_cancel->setExtra('onclick="history.go(-1)"'); $button_tray->addElement($butt_cancel); } $sform->addElement($button_tray); $sform->display(); echo "</div>"; unset($hidden); } switch ($op) { // Displaying the form to edit or add a category case "mod": $categoryid = isset($_GET['categoryid']) ? intval($_GET['categoryid']) : 0; xoops_cp_header(); editcat(true, $categoryid); break; // Displaying the form to edit a category language info // Displaying the form to edit a category language info case "modtext": $categoryid = isset($_GET['categoryid']) ? intval($_GET['categoryid']) : 0; $languageid = isset($_GET['languageid']) ? $_GET['languageid'] : 'new'; xoops_cp_header(); editcat_text(true, $categoryid, $languageid); break; // Adding or editing a category in the db // Adding or editing a category in the db case "addcategory": addCategory(false); break; // Adding or editing a category language info in the db
echo "<div id='toptable'>"; echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_CATEGORIES_DSC . "</span>"; echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; echo "<tr>"; echo "<td width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . "</b></td>"; echo "<td class='bg3' align='left'><b>" . _AM_SF_DESCRIP . "</b></td>"; echo "<td class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . "</b></td>"; echo "<td width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . "</b></td>"; echo "</tr>"; $totalCategories = $category_handler->getCategoriesCount(0); if (count($categoriesObj) > 0) { foreach ($categoriesObj as $key => $thiscat) { displayCategory($thiscat); } } else { echo "<tr>"; echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . "</td>"; echo "</tr>"; $categoryid = '0'; } echo "</table>\n"; include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory'); echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; echo "</div>"; editcat(false); break; } $modfooter = sf_modFooter(); echo "<div align='center'>" . $modfooter . "</div>"; xoops_cp_footer();