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

calendar/classes/class.Gui.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 
00036 include('.'.DATEPLANER_ROOT_DIR.'/config/conf.gui.php');
00037 
00038 class Gui
00039 {
00040 
00045         function Gui() {
00046         }
00047 
00057         function getTemplate($template, $extension="htm") {
00058         global $templatefolder, $actualtemplate;
00059 
00060         if(!$templatefolder) $templatefolder = "templates";
00061         return str_replace("\"","\\\"",implode("",file(".".DATEPLANER_ROOT_DIR.$templatefolder."/".$actualtemplate."/".$template.".".$extension)));
00062         }
00063 
00071         function getLangArray($DP_Lang) {
00072                 $array_tmp = file('.'.DATEPLANER_ROOT_DIR.'/lang/dp_'.$DP_Lang.'.lang');
00073                 foreach($array_tmp as $v)
00074                 {
00075                         if ((substr(trim($v),0,13)=='dateplaner#:#') && (substr_count($v,'#:#')>=2))
00076                         {//Line mustn't start with a ';' and must contain at least one '=' symbol.
00077                                 $pos            = strpos($v, '#:#', '13');
00078                                 $offset1        = strpos($v, '#:#', '13')-13;
00079                                 $offset2        = strpos($v, '###', '13')-$offset1-16;
00080                                 if($offset2 != (-$offset1-16)) {
00081                                         $DP_language[trim(substr($v,13,$offset1))] = trim(substr($v, $pos+3,$offset2));
00082                                 }
00083                                 else {
00084                                         $DP_language[trim(substr($v,13,$offset1))] = trim(substr($v, $pos+3));
00085                                 }
00086                         }
00087                 }
00088                 unset($array_tmp);
00089 
00090                 return $DP_language;
00091         }
00092 
00103         function setToolTip($starttime, $endtime, $shortext, $text, $id ) {
00104                 $text = str_replace("\r\n","<br>" , $text);
00105                 $headerText = $starttime.' -  '.$endtime.' ['.$shortext.']';
00106                 $float= "<div id='$id' style='position:absolute; top:400px; left:0px; width:250; visibility:hidden; z-index:1; background-color:white'>";
00107                 $float.= '
00108 <table border="0" cellpadding="2" cellspacing="2" style="border-collapse: collapse"  width="100%" height="100%">
00109   <tr>
00110     <td width="100%" bgcolor="#000080"><b><font color="#FFFFFF">'.$headerText.'</font></b> </td>
00111   </tr>
00112   <tr>
00113     <td width="100%" height="100%" valign="top" bgcolor="#FFFFFF" ><font color="#000000">'.$text.'</font></td>
00114   </tr>
00115 </table>
00116                                                 </div>';
00117                 Return $float;
00118 
00119         }
00120 
00121 
00122 } // end class
00123 ?>

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