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

calendar/classes/class.ilCalendarGUI.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                                                                                       |
00005         |       Dateplaner Modul                                                                                                                  |                                                                                                     
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 */
00024 
00051         $modulDir = "/calendar";
00052 
00059 // get ilias connectivity 
00060 require_once    ('./include/inc.header.php');
00061 
00062 // catch hack attempts
00063 if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID)
00064 {
00065         $ilias->raiseError($lng->txt("msg_not_available_for_anon"),$ilias->error_obj->MESSAGE);
00066 }
00067 
00068 //
00069 // main
00070 //
00071 
00072 /*static variables */
00073 define("DATEPLANER_ROOT_DIR", $modulDir ); /* relative path to the dateplaner directory */
00074         
00075 /*dynamic variables and interface connection to ilias*/
00076 require_once    ('.'.DATEPLANER_ROOT_DIR.'/classes/class.ilCalInterface.php');
00077         $Interface              = new ilCalInterface($ilias);
00078 
00079         /* if the gui used without frames */
00080         if(!$uptext) {
00081                 $uptext                 = $Interface->getFrameDec();
00082         }
00083         
00084 
00085         /* load language strings into private array for the tateplaner*/
00086         $lng->loadLanguageModule("dateplaner"); 
00087         $DP_language    = $lng->text;
00088 
00089         /* other dynamic variables used in the dateplaner */
00090         $DP_UId                 = $Interface->getUId();                         // UserID
00091         $DP_Lang                = $Interface->getLang();                        // language, selected by the user
00092         $DP_Skin                = $Interface->getSkin();                        // style(-sheet)-name, selected by the user 
00093         $DP_Style               = $Interface->getStyle();                       // skin-name, selected by the user 
00094         $DP_StyleFname  = $Interface->getStyleFname();          // style(-sheet)-name including path, selected by the user 
00095         $DP_GroupIds    = $Interface->getGroupIds();            // GroupIDs of the current UserID (stub)
00096         $DP_dlI                 = $Interface->getDpDBHandler ();        // dateplaner database handler
00097         $app                    = $_REQUEST["app"];                                     // dateplaner application
00098         
00099                 /*
00100 
00101                 $tpl->addBlockFile("LOCATOR","locator","tpl.locator.html");
00102                 $tpl->setCurrentBlock("locator_item");
00103                 $tpl->setVariable("LINK_ITEM","./search.php");
00104                 $tpl->setVariable("LINK_TARGET","bottom");
00105                 $tpl->setVariable("ITEM",$lng->txt("mail_search_word"));
00106                 $tpl->parseCurrentBlock();
00107 
00108                 $tpl->setCurrentBlock("locator");
00109                 $tpl->setVariable("TXT_LOCATOR",$lng->txt("locator"));
00110                 $tpl->parseCurrentBlock();*/
00111 
00112 header('Content-type: text/html; charset=UTF-8');
00113 
00114 // include DP Header 
00115 require ('.'.DATEPLANER_ROOT_DIR.'/includes/inc.dp.header.php');
00116 // include DP Output functions 
00117 require ('.'.DATEPLANER_ROOT_DIR.'/includes/inc.output.php');
00118 
00119 /* ----------------  session initialisation -----------------------*/
00120 include_once    ('.'.DATEPLANER_ROOT_DIR.'/includes/inc.session.php');
00121 // uncoment for ilias 2.3.8 Session Handler 
00122 //db_session_write(session_id(),session_encode());
00123 /* --------------  end session initialisation ---------------------*/
00124 
00125 /*dateplaner functions*/
00126 
00127 include ('.'.DATEPLANER_ROOT_DIR.'/classes/class.ilMiniCal.php');
00128 
00129 
00130 if (!$_GET["month"])
00131 {
00132         $month = date(m);
00133         $year = date(Y);
00134 }
00135 else
00136 {
00137         $month = $_GET["month"];        
00138         $year = $_GET["year"];
00139 }
00140 $MiniCal = new ilMiniCal();
00141 
00142 $CALENDAR = $MiniCal->show($month, $year, $MiniCal);
00143 
00144 
00145 switch($_REQUEST["app"]) {
00146         case False :
00147         case 'inbox':
00148                         
00149                 $PAGETITLE      = $DP_language[app_.$_REQUEST["app"]];  
00150                                                                                 // set page titel
00151                 $locator                = $Interface->showLocator($tpl, $lng,$app); // Locate for ilias3
00152                 include ('.'.DATEPLANER_ROOT_DIR.'/inbox.php');                                                                                         // include specific datplaner function
00153                                 
00154                 
00155                 break;
00156         case 'date':
00157                 
00158                 if ($_REQUEST["date_id"]){
00159                         $DateArray              = $DB->getDate ($_REQUEST["date_id"], $DP_UId);
00160                         $PAGETITLE              = $DP_language[app_.$_REQUEST["app"]]." : ".$DateArray[8];              // set page titel
00161                 } else {
00162                         $PAGETITLE              = $DP_language[app_.$_REQUEST["app"]]." : ".@$DateValues[shorttext];    // set page titel
00163                 }
00164 
00165                 include ('.'.DATEPLANER_ROOT_DIR.'/date.php');                                                                                          // include specific datplaner function
00166                 
00167                 break;
00168         default :
00169         
00170                 $PAGETITLE      = $DP_language[app_.$_REQUEST["app"]];                                                                                  // set page titel
00171                 $locator                = $Interface->showLocator($tpl, $lng,$app); // Locate for ilias3
00172                 include ('.'.DATEPLANER_ROOT_DIR.'/'.$_REQUEST["app"].'.php');  
00173                 
00174                                                         // include specific datplaner function
00175 }
00176 
00177 ?>
00178 

Generated on Fri Dec 13 2013 11:57:53 for ILIAS Release_3_6_x_branch .rev 46809 by  doxygen 1.7.1