Namespaces | Functions

modules/dateplaner/includes/inc.keywords.php File Reference

Go to the source code of this file.

Namespaces

namespace  dateplaner
 

dateplaner includes personal an group specific date management developt for ilias3 and adapted also to ilias2


Functions

 getKeywords ($DP_UId, $DB)
 function getKeywords()
 showKeywords ($S_Keywords, $DB)
 function showKeywords()

Function Documentation

getKeywords ( DP_UId,
DB 
)

function getKeywords()

get Content for the Week View from the sortdates functions

Parameters:
string DP_UId ( actual User ID )
DB $DB ( Object of class db )
Returns:
Array Keywords [][]

Definition at line 47 of file inc.keywords.php.

References $DB, and $DP_UId.

Referenced by showKeywords().

{

        $Keywords                       = $DB->getKeywords ($DP_UId);
        return $Keywords;
        
} // end func 

Here is the caller graph for this function:

showKeywords ( S_Keywords,
DB 
)

function showKeywords()

the Main function of the keyword function called from the executed file

Parameters:
Array S_Keywords ( control variable )
DB $DB ( Object of class db ) string DP_UId ( actual User ID ) Array DP_language ( include Languageproperties ) Array $_SESSION ( DP_Keywords = active Keywords )
Returns:
string keywords_float ( contains the output )

Definition at line 69 of file inc.keywords.php.

References $_SESSION, $DB, $DP_language, $DP_UId, and getKeywords().

{
        global $DP_UId, $_SESSION , $DP_language;
        
        $Keywords = getKeywords($DP_UId, $DB);
        $keywords_float = "<br>";

        $DP_Keywords = $_SESSION[DP_Keywords];

        $keywords_float = $keywords_float.'
                <form name="Keywords" action="" method="post">
                <select multiple size="6" style="width:150px;" name="S_Keywords[]">';

        if ($DP_Keywords[0] ==  "*" or !isset($DP_Keywords))
        {
                $DP_Keywords = array ("*");
                $keywords_float = $keywords_float.'<option value="*" selected >'.$DP_language[k_alldates].'</option>';
        }
        else
        {
                $keywords_float = $keywords_float.'<option value="*">'.$DP_language[k_alldates].'</option>';
        }

        for ($i=0;$i<count($Keywords);$i++)
        {
                $j = $i+1;
                if (@in_array ( $Keywords[$i][0] , $DP_Keywords))
                {
                        $keywords_float = $keywords_float.'<option value="'.$Keywords[$i][0].'" selected>'.$Keywords[$i][1].'</option>';
                }
                else
                {
                        $keywords_float = $keywords_float.'<option value="'.$Keywords[$i][0].'">'.$Keywords[$i][1].'</option>';
                }
        }
        $keywords_float = $keywords_float.'</select><br><br>';
        $keywords_float = $keywords_float.'<input class="submit" type="submit" value="OK">';
        $keywords_float = $keywords_float.'</form>';
        
        return $keywords_float;

} // end func

Here is the call graph for this function: