• 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 */
00033 // include DP date functions
00034 include_once    ('.'.DATEPLANER_ROOT_DIR.'/includes/inc.dates.php');
00035 
00036 /* ------------------------------------  generate frames --------------------------- */
00037 // -----------------------------------------  fixed ---------------------------------//
00038 // the left frame is not used 
00039 $left   = '';
00040 
00041 // right frame is curently not used
00042 $right  = '';
00043 
00044 // the up frame is detect by the interface 
00045 
00046 // down frame is curently not used
00047 $downtext = '';
00048 // --------------------------------------  end fixed  -------------------------------//
00049 
00050 // kein Timpestamp vorhanden !
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 // aktionen
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         // neuer Termin soll eingetragen werden
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 // -----------------------------------------  fixed ---------------------------------//
00126 // frameset template not used
00127 // main template
00128 eval("doOutput(\"".$Gui->getTemplate("main")."\");"); 
00129 // --------------------------------------  end fixed --------------------------------//
00130 echo ("<noscript>".$DP_language[ERROR_JAVASCRIPT]." </noscript>");
00131 exit;
00132 ?>

Generated on Fri Dec 13 2013 13:52:06 for ILIAS Release_3_7_x_branch .rev 46817 by  doxygen 1.7.1