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