12include_once 
'./Services/Payment/classes/class.ilPaymentTrustees.php';
 
   13include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
   14include_once 
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
 
   15include_once 
'./Services/Payment/classes/class.ilShopTableGUI.php';
 
   25                parent::__construct();
 
   29                $this->lng->loadLanguageModule(
'crs');
 
   31                $this->ctrl->saveParameter($this, 
'baseClass');
 
   38                parent::prepareOutput();
 
   40                $ilTabs->setTabActive(
'paya_header');
 
   41                $ilTabs->setSubTabActive(
'paya_trustees');
 
   46                $cmd = $this->ctrl->getCmd();
 
   47                switch ($this->ctrl->getNextClass($this))
 
   50                                if(!
$cmd = $this->ctrl->getCmd())
 
   52                                        $cmd = 
'showTrustees';
 
   75                $actions = array(0      => $this->lng->txt(
"paya_disabled"),
 
   76                                                 1      => $this->lng->txt(
"paya_enabled"));
 
   78                include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
   80                $ul->setDataSource($this->ctrl->getLinkTarget($this, 
"performSearch", 
"", 
true));
 
   82                $ilToolbar->addInputItem($ul, 
true);
 
   83                $ilToolbar->addFormButton($this->lng->txt(
"add"), 
"performSearch");
 
   84                $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
 
   86                $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.main_view.html',
'Services/Payment');
 
   93                        $oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this,
"performDeleteTrustee"));
 
   94                        $oConfirmationGUI->setHeaderText($this->lng->txt(
"paya_sure_delete_selected_trustees"));
 
   95                        $oConfirmationGUI->setCancel($this->lng->txt(
"cancel"), 
"cancelDelete");
 
   96                        $oConfirmationGUI->setConfirm($this->lng->txt(
"confirm"), 
"performDeleteTrustee");                      
 
   98                        foreach($this->trustee_obj->getTrustees() as $trustee)
 
  101                                if(in_array($trustee[
'trustee_id'],
$_POST[
'trustee']))
 
  105                                                $delete_row     = $tmp_obj->getLogin().
' -> '.$tmp_obj->getFirstname().
' '.$tmp_obj->getLastname();
 
  109                                $oConfirmationGUI->addItem(
'',$delete_row, $delete_row);
 
  112                        $this->tpl->setVariable(
"CONFIRMATION",$oConfirmationGUI->getHTML());   
 
  116                if(!count($this->trustee_obj->getTrustees()))
 
  125                require_once 
'Services/Mail/classes/class.ilMailFormCall.php';
 
  126                foreach($this->trustee_obj->getTrustees() as $trustee)
 
  133                                                                                                                           $trustee[
'trustee_id']);
 
  134                                $f_result[$counter][
'login']    = $tmp_obj->getLogin();
 
  135                                $f_result[$counter][
'firstname']        = $tmp_obj->getFirstname();
 
  136                                $f_result[$counter][
'lastname'] = $tmp_obj->getLastname();
 
  139                                                                                                                         'perm_stat['.$trustee[
'trustee_id'].
']',
 
  145                                                                                                                         'perm_obj['.$trustee[
'trustee_id'].
']',
 
  150                                $f_result[$counter][
'perm_coupons']     = 
ilUtil::formSelect((
int) $trustee[
'perm_coupons'],
 
  151                                                                                                                         'perm_coupons['.$trustee[
'trustee_id'].
']',
 
  156#                               $link_mail = "<a target=\"_blank\" href=\"./ilias.php?baseClass=ilMailGUI&type=new&rcp_to=".
 
  157#                                       $tmp_obj->getLogin()."\"".$img_mail."</a>";                
 
  159                                $link_mail = 
"<div class=\"il_ContainerItemCommands\"><a class=\"il_ContainerItemCommand\" href=\"".
 
  160                                        $url_mail.
"\">".$this->lng->txt(
"mail").
"</a></div>";
 
  162                                $f_result[$counter][
'options']  = $link_mail;
 
  173                if(!is_array(
$_POST[
'trustee']))
 
  188                if(is_array(
$_SESSION[
'paya_delete_trustee']))
 
  190                        foreach(
$_SESSION[
'paya_delete_trustee'] as $id)
 
  192                                $this->trustee_obj->setTrusteeId($id);
 
  193                                $this->trustee_obj->delete();
 
  205                foreach($this->trustee_obj->getTrustees() as $trustee)
 
  207                        $this->trustee_obj->setTrusteeId($trustee[
'trustee_id']);
 
  208                        $this->trustee_obj->toggleStatisticPermission(
$_POST[
'perm_stat'][
"$trustee[trustee_id]"]);
 
  209                        $this->trustee_obj->toggleObjectPermission(
$_POST[
'perm_obj'][
"$trustee[trustee_id]"]);
 
  210                        $this->trustee_obj->toggleCouponsPermission(
$_POST[
'perm_coupons'][
"$trustee[trustee_id]"]);                    
 
  211                        $this->trustee_obj->modify();
 
  236                $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.main_view.html",
'Services/Payment');
 
  246                        $f_result[$counter][
'login'] = $tmp_obj->getLogin();
 
  247                        $f_result[$counter][
'firstname'] = $tmp_obj->getFirstname();
 
  248                        $f_result[$counter][
'lastname'] = $tmp_obj->getLastname();
 
  259                if(!is_array(
$_POST[
"user"]))
 
  266                if(in_array($this->user_obj->getId(),
$_POST[
'user']))
 
  276                foreach(
$_POST[
'user'] as $user_id)
 
  278                        if($this->trustee_obj->isTrustee($user_id))
 
  282                        $this->trustee_obj->setTrusteeId($user_id);
 
  283                        $this->trustee_obj->toggleStatisticPermission(
false);
 
  284                        $this->trustee_obj->toggleObjectPermission(
true);
 
  285                        $this->trustee_obj->toggleCouponsPermission(
true);
 
  286                        $this->trustee_obj->add();
 
  308                if(!
$_POST[
'trustee_login'])
 
  322                if($this->trustee_obj->isTrustee($user_id))
 
  329                if($user_id == $this->user_obj->getId())
 
  338                $this->trustee_obj->setTrusteeId($user_id);
 
  339                $this->trustee_obj->toggleObjectPermission(
true);
 
  340                $this->trustee_obj->toggleStatisticPermission(
true);
 
  341                $this->trustee_obj->toggleCouponsPermission(
true);
 
  342                $this->trustee_obj->add();
 
  354                include_once(
"./Services/Search/classes/class.ilSearch.php");
 
  356                $this->lng->loadLanguageModule(
"content");
 
  358                $search = 
new ilSearch($this->user_obj->getId());
 
  359                $search->setPerformUpdate(
false);
 
  361                $search->setCombination(
"and");
 
  362                $search->setSearchFor(array(0 => 
'usr'));
 
  363                $search->setSearchType(
'new');
 
  365                if($search->validate($message))
 
  367                        $search->performSearch();
 
  372                        $this->ctrl->redirect($this,
"searchUser");
 
  374                return $search->getResultByType(
'usr');
 
  380                $tbl->setTitle($this->lng->txt(
"paya_trustee_table"));
 
  381                $tbl->setId(
'tbl_search_user_trustee');
 
  382                $tbl->setRowTemplate(
"tpl.shop_users_row.html", 
"Services/Payment");
 
  384                $tbl->addColumn(
' ', 
'trustee_id', 
'1%', 
true);
 
  385                $tbl->addColumn($this->lng->txt(
'login'), 
'login', 
'10%');
 
  386                $tbl->addColumn($this->lng->txt(
'firstname'),
'firstname',
'20%');
 
  387                $tbl->addColumn($this->lng->txt(
'lastname'), 
'lastname', 
'20%');
 
  389                $tbl->setSelectAllCheckbox(
'user');
 
  390                $tbl->addMultiCommand(
"addTrustee", $this->lng->txt(
"add"));
 
  391                $tbl->addCommandButton(
'showTrustees',$this->lng->txt(
'cancel'));
 
  394                $tbl->setData($a_result_set);
 
  395                $this->tpl->setVariable(
'TABLE', $tbl->getHTML());
 
  404                $tbl->setTitle($this->lng->txt(
"paya_trustee_table"));
 
  405                $tbl->setId(
'tbl_show_trustee');
 
  406                $tbl->setRowTemplate(
"tpl.shop_users_row.html", 
"Services/Payment");
 
  408                $tbl->addColumn(
' ', 
'trustee_id', 
'1%', 
true);
 
  409                $tbl->addColumn($this->lng->txt(
'login'), 
'login', 
'10%');
 
  410                $tbl->addColumn($this->lng->txt(
'firstname'),
'firstname',
'20%');
 
  411                $tbl->addColumn($this->lng->txt(
'lastname'), 
'lastname', 
'20%');
 
  412                $tbl->addColumn($this->lng->txt(
'paya_perm_stat'), 
'perm_stat', 
'15%');
 
  413                $tbl->addColumn($this->lng->txt(
'paya_perm_obj'), 
'perm_obj', 
'15%');
 
  414                $tbl->addColumn($this->lng->txt(
'paya_perm_coupons'), 
'perm_coupons', 
'15%');
 
  415                $tbl->addColumn(
'', 
'options', 
'5%');
 
  417                $tbl->setSelectAllCheckbox(
'trustee_id');
 
  418                $tbl->addMultiCommand(
"deleteTrustee", $this->lng->txt(
"delete"));
 
  420                $tbl->addCommandButton(
'update',$this->lng->txt(
'apply'));
 
  421                $tbl->setData($a_result_set);
 
  422                $this->tpl->setVariable(
'TABLE', $tbl->getHTML());
 
Confirmation screen class.
getUserIdByLogin($a_login)
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
__showTrusteesTable($a_result_set)
showTrustees($a_show_delete=false)
__showSearchUserTable($a_result_set)
__search($a_search_string)
This class represents a text property in a property form.
static formCheckbox($checked, $varname, $value, $disabled=false)
??? @access public
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.