} 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 // use the maxRecords php variable to set the limit if (!isset($_REQUEST["offset"])) { $offset = 0; } else {
if (!isset($dcslib)) { $dcslib = new DCSLib; } $access->check_feature('feature_dynamic_content'); $access->check_permission('tiki_p_admin_dynamic'); if (!isset($_REQUEST["contentId"])) { $smarty->assign('msg', tra("No content id indicated")); $smarty->display("error.tpl"); die; } $smarty->assign('contentId', $_REQUEST["contentId"]); $smarty->assign('pId', 0); $info = $dcslib->get_content($_REQUEST["contentId"]); $smarty->assign('description', $info["description"]); if (isset($_REQUEST["remove"])) { $access->check_authenticity(); $dcslib->remove_programmed_content($_REQUEST["remove"]); } $smarty->assign('data', ''); $smarty->assign('publishDate', $tikilib->now); //Use 12- or 24-hour clock for $publishDate time selector based on admin and user preferences include_once ('lib/userprefs/userprefslib.php'); $smarty->assign('use_24hr_clock', $userprefslib->get_user_clock_pref($user)); $smarty->assign('actual', '');