$content = $_REQUEST['data'];
	}

	if (!empty($_REQUEST['Time_Meridian'])) {
		$_REQUEST['Time_Hour'] = date('H', strtotime($_REQUEST['Time_Hour'] . ':00 ' . $_REQUEST['Time_Meridian']));
	}
	$publishDate = TikiLib::make_time(
					$_REQUEST["Time_Hour"], 
					$_REQUEST["Time_Minute"],
					0, 
					$_REQUEST["Date_Month"], 
					$_REQUEST["Date_Day"], 
					$_REQUEST["Date_Year"]
	);

	$id = $dcslib->replace_programmed_content($_REQUEST["pId"], $_REQUEST["contentId"], $publishDate, $content, $_REQUEST['content_type']);
	$smarty->assign('data', $_REQUEST["data"]);
	$smarty->assign('publishDate', $publishDate);
	$smarty->assign('pId', $id);

	$_REQUEST['edit'] = $id;
}

if (isset($_REQUEST["edit"])) {
	$info = $dcslib->get_programmed_content($_REQUEST["edit"]);

	$actual = $dcslib->get_actual_content_date($_REQUEST["contentId"]);
	$smarty->assign('info', $info);
	$smarty->assign('actual', $actual);
	$smarty->assign('data', $info["data"]);
	$smarty->assign('publishDate', $info["publishDate"]);
    $area = 'deldyncontent';
    if ($feature_ticketlib2 != 'y' or isset($_POST['daconfirm']) and isset($_SESSION["ticket_{$area}"])) {
        key_check($area);
        $dcslib->remove_programmed_content($_REQUEST["remove"]);
    } else {
        key_get($area);
    }
}
$now = date("U");
$smarty->assign('data', '');
$smarty->assign('publishDate', $now);
$smarty->assign('actual', '');
if (isset($_REQUEST["save"])) {
    check_ticket('edit-programmed-content');
    $publishDate = mktime($_REQUEST["Time_Hour"], $_REQUEST["Time_Minute"], 0, $_REQUEST["Date_Month"], $_REQUEST["Date_Day"], $_REQUEST["Date_Year"]);
    $id = $dcslib->replace_programmed_content($_REQUEST["pId"], $_REQUEST["contentId"], $publishDate, $_REQUEST["data"]);
    $smarty->assign('data', $_REQUEST["data"]);
    $smarty->assign('publishDate', $publishDate);
    $smarty->assign('pId', $id);
}
if (isset($_REQUEST["edit"])) {
    $info = $dcslib->get_programmed_content($_REQUEST["edit"]);
    $actual = $dcslib->get_actual_content_date($_REQUEST["contentId"]);
    $smarty->assign('actual', $actual);
    $smarty->assign('data', $info["data"]);
    $smarty->assign('publishDate', $info["publishDate"]);
    $smarty->assign('pId', $info["pId"]);
}
$actual = $dcslib->get_actual_content_date($_REQUEST["contentId"]);
$smarty->assign('actual', $actual);
// This script can receive the thresold