Go to the documentation of this file.00001 <?php
00002
00009 class DeliverySet_Users extends oxAdminDetails
00010 {
00011
00018 public function render()
00019 {
00020 parent::render();
00021
00022 $soxId = $this->getEditObjectId();
00023 $sSelGroup = oxRegistry::getConfig()->getRequestParameter("selgroup");
00024
00025
00026 $oGroups = oxNew('oxlist');
00027 $oGroups->init('oxgroups');
00028 $oGroups->selectString("select * from " . getViewName("oxgroups", $this->_iEditLang));
00029
00030 $oRoot = new oxgroups();
00031 $oRoot->oxgroups__oxid = new oxField("");
00032 $oRoot->oxgroups__oxtitle = new oxField("-- ");
00033
00034 $aNewList = array();
00035 $aNewList[] = $oRoot;
00036
00037 foreach ($oGroups as $val) {
00038 $aNewList[$val->oxgroups__oxid->value] = new oxGroups();
00039 $aNewList[$val->oxgroups__oxid->value]->oxgroups__oxid = new oxField($val->oxgroups__oxid->value);
00040 $aNewList[$val->oxgroups__oxid->value]->oxgroups__oxtitle = new oxField($val->oxgroups__oxtitle->value);
00041 }
00042
00043 $oGroups = $aNewList;
00044
00045 if (isset($soxId) && $soxId != "-") {
00046 $oDelivery = oxNew("oxdeliveryset");
00047 $oDelivery->load($soxId);
00048
00049
00050 if ($oDelivery->isDerived()) {
00051 $this->_aViewData['readonly'] = true;
00052 }
00053 }
00054
00055 $this->_aViewData["allgroups2"] = $oGroups;
00056
00057 $iAoc = oxRegistry::getConfig()->getRequestParameter("aoc");
00058 if ($iAoc == 1) {
00059 $oDeliverysetGroupsAjax = oxNew('deliveryset_groups_ajax');
00060 $this->_aViewData['oxajax'] = $oDeliverysetGroupsAjax->getColumns();
00061
00062 return "popups/deliveryset_groups.tpl";
00063 } elseif ($iAoc == 2) {
00064 $oDeliverysetUsersAjax = oxNew('deliveryset_users_ajax');
00065 $this->_aViewData['oxajax'] = $oDeliverysetUsersAjax->getColumns();
00066
00067 return "popups/deliveryset_users.tpl";
00068 }
00069
00070 return "deliveryset_users.tpl";
00071 }
00072 }