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
00024
00039 include('.'.DATEPLANER_ROOT_DIR.'/config/conf.gui.php');
00040
00041 class Gui
00042 {
00043
00048 function Gui() {
00049 }
00050
00060 function getTemplate($template, $extension="htm") {
00061 global $templatefolder, $actualtemplate;
00062
00063 if(!$templatefolder) $templatefolder = "templates";
00064 return str_replace("\"","\\\"",implode("",file(".".DATEPLANER_ROOT_DIR.$templatefolder."/".$actualtemplate."/".$template.".".$extension)));
00065 }
00066
00074 function getLangArray($DP_Lang) {
00075 $array_tmp = file('.'.DATEPLANER_ROOT_DIR.'/lang/dp_'.$DP_Lang.'.lang');
00076 foreach($array_tmp as $v)
00077 {
00078 if ((substr(trim($v),0,13)=='dateplaner#:#') && (substr_count($v,'#:#')>=2))
00079 {
00080 $pos = strpos($v, '#:#', '13');
00081 $offset1 = strpos($v, '#:#', '13')-13;
00082 $offset2 = strpos($v, '###', '13')-$offset1-16;
00083 if($offset2 != (-$offset1-16)) {
00084 $DP_language[trim(substr($v,13,$offset1))] = trim(substr($v, $pos+3,$offset2));
00085 }
00086 else {
00087 $DP_language[trim(substr($v,13,$offset1))] = trim(substr($v, $pos+3));
00088 }
00089 }
00090 }
00091 unset($array_tmp);
00092
00093 return $DP_language;
00094 }
00095
00106 function setToolTip($starttime, $endtime, $shortext, $text, $id ) {
00107 $text = str_replace("\r\n","<br>" , $text);
00108 $headerText = $starttime.' - '.$endtime.' ['.$shortext.']';
00109 $float= "<div id='$id' style='position:absolute; top:400px; left:0px; width:250; visibility:hidden; z-index:1; background-color:white'>";
00110 $float.= '
00111 <table border="0" cellpadding="2" cellspacing="2" style="border-collapse: collapse" width="100%" height="100%">
00112 <tr>
00113 <td width="100%" bgcolor="#000080"><b><font color="#FFFFFF">'.$headerText.'</font></b> </td>
00114 </tr>
00115 <tr>
00116 <td width="100%" height="100%" valign="top" bgcolor="#FFFFFF" ><font color="#000000">'.$text.'</font></td>
00117 </tr>
00118 </table>
00119 </div>';
00120 Return $float;
00121
00122 }
00123
00124
00125 }
00126 ?>