Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00033
00034 include_once ('.'.DATEPLANER_ROOT_DIR.'/includes/inc.dates.php');
00035
00036
00037
00038
00039 $left = '';
00040
00041
00042 $right = '';
00043
00044
00045
00046
00047 $downtext = '';
00048
00049
00050
00051 $DateValues = $_REQUEST[DateValues];
00052 $DateValues[date2] = $_REQUEST["date2"] ;
00053 $DateValues[date4] = $_REQUEST["date4"] ;
00054 $DateValues[date6] = $_REQUEST["date6"] ;
00055 $DateValues[group_id] = $_REQUEST["DateValuesGroup_id"];
00056 $DateValues[rotation] = $_REQUEST["DateValuesRotation"];
00057 $DateValues[whole_day] = $_REQUEST["DateValuesWhole_day"];
00058
00059
00060 if($_REQUEST["dateaction"]) {
00061 switch($_REQUEST["dateaction"]) {
00062 case 'insert':
00063 $msg = setInsertAction($_REQUEST["date2"], $_REQUEST["date4"], $_REQUEST["date6"], $DateValues, $DB);
00064 if($msg) {
00065 eval ("\$dateContent = \"".$Gui->getTemplate("date_msg")."\";");
00066 }else {
00067 echo '<script language=JavaScript> opener.location.reload(); window.close(); </script>';
00068 }
00069 break;
00070 case $DP_language[dv_button_update]:
00071 $msg = setUpdateAction($_REQUEST["date2"], $_REQUEST["date4"], $_REQUEST["date6"], $DateValues, $DB);
00072 if($msg) {
00073 eval ("\$dateContent = \"".$Gui->getTemplate("date_msg")."\";");
00074 }else {
00075 echo '<script language=JavaScript> opener.location.reload(); window.close(); </script>';
00076 }
00077
00078 break;
00079 case $DP_language[dv_button_delete]:
00080 $msg = setDeleteAction($DateValues, $DB);
00081 if($msg) {
00082 eval ("\$dateContent = \"".$Gui->getTemplate("date_msg")."\";");
00083 }else {
00084 echo '<script language=JavaScript> opener.location.reload(); window.close(); </script>';
00085 }
00086 break;
00087 }
00088 }else {
00089 if ((!$_REQUEST["date_id"] and !$DateValues[date_id]) or $_REQUEST["dateview"] == "insert" )
00090
00091 {
00092 if($_REQUEST["dateview"] == "freetime") {
00093 if($timestamp != "") {
00094 $ttd = new TimestampToDate;
00095 $ttd->ttd($timestamp);
00096 $DateValues[date2] = $DateValues[date4] = $ttd->day_of_month."/".$ttd->monthnumber_long."/".$ttd->year_long ;
00097 $DateValues[begin_h] = $DateValues[end_h] = $ttd->hour_long ;
00098 $DateValues[begin_min] = $DateValues[end_min] = $ttd->minutes ;
00099 }
00100 }
00101 if (!$timestamp = $_REQUEST["timestamp"] ) $timestamp = (int)mktime(0,0,0);
00102 $dateContent = setInsertDate($timestamp, $DateValues, $DB);
00103 $jscriptboddy = "onLoad=\"HideElements('textOne','textTwo','textThree', 'textFour'); HideThingsRotation(); HideThingsGroup()\"";
00104 }else
00105 {
00106 if (!$timestamp ) $timestamp = (int)mktime(0,0,0);
00107 $DateArray[old_keyword_id] = $DateArray[keyword_id];
00108 $dateContent = setUpdateDeleteDate($timestamp, $date_id, $DateArray, $DateValues, $DB );
00109
00110 if($js != "ro")
00111 {
00112 $jscriptboddy = "onLoad=\"HideElements('textOne','textTwo','textThree', 'textFour'); HideThingsRotation()\"";
00113 }
00114 else
00115 {
00116 $jscriptboddy = "";
00117 }
00118
00119
00120 }
00121 }
00122
00123 eval ("\$main = \"".$Gui->getTemplate("date_main")."\";");
00124
00125
00126
00127
00128 eval("doOutput(\"".$Gui->getTemplate("main")."\");");
00129
00130 echo ("<noscript>".$DP_language[ERROR_JAVASCRIPT]." </noscript>");
00131 exit;
00132 ?>