// // ------------------------------------------------------------------------- // // Original Author: Nobse // Author Website : http://www.e-xoops.de // License Type : GPL: See /manual/LICENSES/GPL.txt // ------------------------------------------------------------------------- // include("header.php"); function remindadd() { global $_GET, $db, $bcoosConfig; $tid = $_GET['id']; $month = $_GET['month']; $year = $_GET['year']; $query = $db->query("SELECT * FROM ".$db->prefix("ecal")." WHERE id = $tid"); $row = $db->fetchArray($query); $tagebis = strtotime($row['stamp']) - time(); $tagebis = date("d",$tagebis); $datum = strftime(_EVEDATESHORT,strtotime($row['stamp'])); include(XOOPS_ROOT_PATH."/header.php"); OpenTable(); include ("include/nav.php"); echo ""; echo ""; echo "
"._CAL_DATE."".$datum.""._TITLE.':'." ".$row['subject']."
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"._CAL_REMIND."
"._CAL_REMIND_TEXT."
"; form_ret_ecal($month,$year); echo "
"; CloseTable(); include(XOOPS_ROOT_PATH."/footer.php"); } //*******************************************************+ function remindsave() { global $_POST, $xoopsUser, $db, $bcoosConfig; $tid = $_POST['tid']; $stamp = strtotime($_POST['stamp']); $remindday = $_POST['remindday']; $remindday = strtotime("-$remindday Day",$stamp); $userid = $xoopsUser->getvar("uid"); $newid = $db->genId($db->prefix('ecal_remind')."_id_seq"); $temp = $db->query("INSERT INTO ".$db->prefix("ecal_remind")." SET id=$newid, tid=$tid, uid = $userid, date= $remindday "); redirect_header("index.php",1,_CAL_REMIND_ADD); } //*************************************+ $op = !empty($_POST['op']) ? $_POST['op'] : $_GET['op']; if ($xoopsUser) { switch ($op) { case "remindsave": remindsave(); break; case "remindadd": remindadd(); break; default: redirect_header("index.php"); break; } } else { redirect_header("../../user.php",1,_NOACTION); } ?>