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
00040 include_once 'Services/Search/classes/class.ilUserFilter.php';
00041
00042
00043 class ilUserFilterGUI
00044 {
00045 var $usr_id = null;
00046 var $tpl = null;
00047 var $lng = null;
00048 var $ctrl = null;
00049
00050 function ilUserFilterGUI($a_usr_id)
00051 {
00052 global $lng,$ilCtrl,$tpl;
00053
00054 $this->ctrl =& $ilCtrl;
00055 $this->lng =& $lng;
00056 $this->lng->loadLanguageModule('trac');
00057 $this->tpl =& $tpl;
00058 $this->usr_id = $a_usr_id;
00059 $this->__initFilter();
00060 }
00061
00065 function &executeCommand()
00066 {
00067 switch($this->ctrl->getNextClass())
00068 {
00069 default:
00070 $cmd = $this->ctrl->getCmd() ? $this->ctrl->getCmd() : 'show';
00071 $this->$cmd();
00072
00073 }
00074 return true;
00075 }
00076
00077
00078 function getUserId()
00079 {
00080 return $this->usr_id;
00081 }
00082
00083
00084 function getHTML()
00085 {
00086 global $ilObjDataCache;
00087
00088 $tpl = new ilTemplate('tpl.search_user_filter.html',true,true,'Services/Search');
00089
00090 $tpl->setVariable("FILTER_ACTION",$this->ctrl->getFormAction($this));
00091 $tpl->setVariable("TBL_TITLE",$this->lng->txt('trac_lp_filter'));
00092 $tpl->setVariable("TXT_LOGIN",$this->lng->txt('login'));
00093 $tpl->setVariable("TXT_FIRSTNAME",$this->lng->txt('firstname'));
00094 $tpl->setVariable("TXT_LASTNAME",$this->lng->txt('lastname'));
00095 $tpl->setVariable("BTN_REFRESH",$this->lng->txt('trac_refresh'));
00096
00097 $tpl->setVariable("QUERY",ilUtil::prepareFormOutput($this->filter->getQueryString('login')));
00098 $tpl->setVariable("FIRSTNAME",ilUtil::prepareFormOutput($this->filter->getQueryString('firstname')));
00099 $tpl->setVariable("LASTNAME",ilUtil::prepareFormOutput($this->filter->getQueryString('lastname')));
00100
00101 return $tpl->get();
00102 }
00103
00104
00105
00106 function refresh()
00107 {
00108 $_GET['offset'] = 0;
00109 $this->ctrl->saveParameter($this,'offset');
00110 $this->filter->storeQueryStrings($_POST['filter']);
00111 $this->ctrl->returnToParent($this);
00112
00113 return true;
00114 }
00115
00116
00117
00118 function __initFilter()
00119 {
00120 global $ilUser;
00121
00122 $this->filter = new ilUserFilter($ilUser->getId());
00123 return true;
00124 }
00125 }
00126 ?>