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
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 {
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 }
00123 ?>