$area = 'delcontents'; if ($prefs['feature_ticketlib2'] != 'y' or isset($_POST['daconfirm']) and isset($_SESSION["ticket_{$area}"])) { key_check($area); $dcslib->remove_contents($_REQUEST["remove"]); } else { key_get($area); } } $smarty->assign('description', ''); $smarty->assign('contentLabel', ''); $smarty->assign('contentId', 0); if (isset($_REQUEST["save"])) { check_ticket('list-contents'); $smarty->assign('description', $_REQUEST["description"]); $smarty->assign('contentLabel', $_REQUEST["contentLabel"]); $id = $dcslib->replace_content($_REQUEST["contentId"], $_REQUEST["description"], $_REQUEST["contentLabel"]); $smarty->assign('contentId', $id); } if (isset($_REQUEST["edit"])) { $info = $dcslib->get_content($_REQUEST["edit"]); $smarty->assign('contentId', $info["contentId"]); $smarty->assign('description', $info["description"]); $smarty->assign('contentLabel', $info["contentLabel"]); } if (!isset($_REQUEST["sort_mode"])) { $sort_mode = 'contentId_desc'; } else { $sort_mode = $_REQUEST["sort_mode"]; } $smarty->assign_by_ref('sort_mode', $sort_mode); // If offset is set use it if not then use offset =0