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
00043
00044
00045
00046
00047 $oGroups = $aNewList;
00048
00049 if ( isset($soxId) && $soxId != "-") {
00050 $oDelivery = oxNew( "oxdeliveryset" );
00051 $oDelivery->load( $soxId);
00052
00053
00054 if ($oDelivery->isDerived())
00055 $this->_aViewData['readonly'] = true;
00056 }
00057
00058 $this->_aViewData["allgroups2"] = $oGroups;
00059
00060 $aColumns = array();
00061 $iAoc = oxConfig::getParameter("aoc");
00062 if ( $iAoc == 1 ) {
00063
00064 include_once 'inc/deliveryset_groups.inc.php';
00065 $this->_aViewData['oxajax'] = $aColumns;
00066
00067 return "popups/deliveryset_groups.tpl";
00068 } elseif ( $iAoc == 2 ){
00069
00070 include_once 'inc/deliveryset_users.inc.php';
00071 $this->_aViewData['oxajax'] = $aColumns;
00072
00073 return "popups/deliveryset_users.tpl";
00074 }
00075 return "deliveryset_users.tpl";
00076 }
00077 }