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