• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

calendar/date.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                                                                                       |
00005         |       Dateplaner Modul - inbox                                                                                                  |                                                                                                     
00006         +-----------------------------------------------------------------------------+
00007         | Copyright (c) 2004 ILIAS open source & University of Applied Sciences Bremen|
00008         |                                                                             |
00009         | This program is free software; you can redistribute it and/or               |
00010         | modify it under the terms of the GNU General Public License                 |
00011         | as published by the Free Software Foundation; either version 2              |
00012         | of the License, or (at your option) any later version.                      |
00013         |                                                                             |
00014         | This program is distributed in the hope that it will be useful,             |
00015         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00016         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00017         | GNU General Public License for more details.                                |
00018         |                                                                             |
00019         | You should have received a copy of the GNU General Public License           |
00020         | along with this program; if not, write to the Free Software                 |
00021         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00022         +-----------------------------------------------------------------------------+
00023 */
00030 // include DP date functions
00031 include_once    ('.'.DATEPLANER_ROOT_DIR.'/includes/inc.dates.php');
00032 
00033 /* ------------------------------------  generate frames --------------------------- */
00034 // -----------------------------------------  fixed ---------------------------------//
00035 // the left frame is not used 
00036 $left   = '';
00037 
00038 // right frame is curently not used
00039 $right  = '';
00040 
00041 // the up frame is detect by the interface 
00042 
00043 // down frame is curently not used
00044 $downtext = '';
00045 // --------------------------------------  end fixed  -------------------------------//
00046 
00047 // kein Timpestamp vorhanden !
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 // aktionen
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         // neuer Termin soll eingetragen werden
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 // -----------------------------------------  fixed ---------------------------------//
00123 // frameset template not used
00124 // main template
00125 eval("doOutput(\"".$Gui->getTemplate("main")."\");"); 
00126 // --------------------------------------  end fixed --------------------------------//
00127 echo ("<noscript>".$DP_language[ERROR_JAVASCRIPT]." </noscript>");
00128 exit;
00129 ?>

Generated on Fri Dec 13 2013 17:56:47 for ILIAS Release_3_9_x_branch .rev 46835 by  doxygen 1.7.1