Public Member Functions

Gui Class Reference

Public Member Functions

 Gui ()
 constructor
 getTemplate ($template, $extension="htm")
 function gettemplate($template,$endung="htm") : get Inforamtion from a template File
 getLangArray ($DP_Lang)
 function gettemplate($template,$endung="htm") : get Inforamtion from a template File
 setToolTip ($starttime, $endtime, $shortext, $text, $id)
 function setToolTip($starttime, $endtime, $shortext, $text, $id) : set a mouse over tooltip to dates

Detailed Description

Definition at line 41 of file class.Gui.php.


Member Function Documentation

Gui::getLangArray ( DP_Lang  ) 

function gettemplate($template,$endung="htm") : get Inforamtion from a template File

Parameters:
string template
string extension ( means the extension of the Template files, eg. .htm )
Returns:
Sting

Definition at line 74 of file class.Gui.php.

References $DP_Lang, $DP_language, and $pos.

                                        {
                $array_tmp = file('.'.DATEPLANER_ROOT_DIR.'/lang/dp_'.$DP_Lang.'.lang');
                foreach($array_tmp as $v)
                {
                        if ((substr(trim($v),0,13)=='dateplaner#:#') && (substr_count($v,'#:#')>=2))
                        {//Line mustn't start with a ';' and must contain at least one '=' symbol.
                                $pos            = strpos($v, '#:#', '13');
                                $offset1        = strpos($v, '#:#', '13')-13;
                                $offset2        = strpos($v, '###', '13')-$offset1-16;
                                if($offset2 != (-$offset1-16)) {
                                        $DP_language[trim(substr($v,13,$offset1))] = trim(substr($v, $pos+3,$offset2));
                                }
                                else {
                                        $DP_language[trim(substr($v,13,$offset1))] = trim(substr($v, $pos+3));
                                }
                        }
                }
                unset($array_tmp);

                return $DP_language;
        }

Gui::getTemplate ( template,
extension = "htm" 
)

function gettemplate($template,$endung="htm") : get Inforamtion from a template File

Parameters:
string template
string extension ( means the extension of the Template files, eg. .htm ) string templatefolder string actualtemplate ( means the number of Template set eg. "default" )
Returns:
Sting

Definition at line 60 of file class.Gui.php.

References $actualtemplate, and $templatefolder.

                                                          {
        global $templatefolder, $actualtemplate;

        if(!$templatefolder) $templatefolder = "templates";
        return str_replace("\"","\\\"",implode("",file(".".DATEPLANER_ROOT_DIR.$templatefolder."/".$actualtemplate."/".$template.".".$extension)));
        }

Gui::Gui (  ) 

constructor

Definition at line 48 of file class.Gui.php.

                       {
        }

Gui::setToolTip ( starttime,
endtime,
shortext,
text,
id 
)

function setToolTip($starttime, $endtime, $shortext, $text, $id) : set a mouse over tooltip to dates

Parameters:
string starttime
string endtime
string shortext
string text
int id
Returns:
Sting float

Definition at line 106 of file class.Gui.php.

                                                                          {
                $text = str_replace("\r\n","<br>" , $text);
                $headerText = $starttime.' -  '.$endtime.' ['.$shortext.']';
                $float= "<div id='$id' style='position:absolute; top:400px; left:0px; width:250; visibility:hidden; z-index:1; background-color:white'>";
                $float.= '
<table border="0" cellpadding="2" cellspacing="2" style="border-collapse: collapse"  width="100%" height="100%">
  <tr>
    <td width="100%" bgcolor="#000080"><b><font color="#FFFFFF">'.$headerText.'</font></b> </td>
  </tr>
  <tr>
    <td width="100%" height="100%" valign="top" bgcolor="#FFFFFF" ><font color="#000000">'.$text.'</font></td>
  </tr>
</table>
                                                </div>';
                Return $float;

        }


The documentation for this class was generated from the following file: