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

calendar/includes/inc.keywords.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 
00047 function getKeywords($DP_UId, $DB)
00048 {
00049 
00050         $Keywords                       = $DB->getKeywords ($DP_UId);
00051         return $Keywords;
00052         
00053 } // end func 
00054 
00055 
00069 function showKeywords($S_Keywords, $DB)
00070 {
00071         global $DP_UId, $_SESSION , $DP_language;
00072         
00073         $Keywords = getKeywords($DP_UId, $DB);
00074         $keywords_float = "<br>";
00075 
00076         $DP_Keywords = $_SESSION[DP_Keywords];
00077 
00078         $keywords_float = $keywords_float.'
00079                 <form name="Keywords" action="" method="post">
00080                 <select multiple size="6" style="width:150px;" name="S_Keywords[]">';
00081 
00082         if ($DP_Keywords[0] ==  "*" or !isset($DP_Keywords))
00083         {
00084                 $DP_Keywords = array ("*");
00085                 $keywords_float = $keywords_float.'<option value="*" selected >'.$DP_language[k_alldates].'</option>';
00086         }
00087         else
00088         {
00089                 $keywords_float = $keywords_float.'<option value="*">'.$DP_language[k_alldates].'</option>';
00090         }
00091 
00092         for ($i=0;$i<count($Keywords);$i++)
00093         {
00094                 $j = $i+1;
00095                 if (@in_array ( $Keywords[$i][0] , $DP_Keywords))
00096                 {
00097                         $keywords_float = $keywords_float.'<option value="'.$Keywords[$i][0].'" selected>'.$Keywords[$i][1].'</option>';
00098                 }
00099                 else
00100                 {
00101                         $keywords_float = $keywords_float.'<option value="'.$Keywords[$i][0].'">'.$Keywords[$i][1].'</option>';
00102                 }
00103         }
00104         $keywords_float = $keywords_float.'</select><br><br>';
00105         $keywords_float = $keywords_float.'<input class="submit" type="submit" value="OK">';
00106         $keywords_float = $keywords_float.'</form>';
00107         
00108         return $keywords_float;
00109 
00110 } // end func
00111 ?>

Generated on Fri Dec 13 2013 13:52:06 for ILIAS Release_3_7_x_branch .rev 46817 by  doxygen 1.7.1