Go to the documentation of this file.00001 <?php
00002
00009 class Delivery_Users extends oxAdminDetails
00010 {
00017 public function render()
00018 {
00019 parent::render();
00020
00021 $soxId = $this->getEditObjectId();
00022 $sSelGroup = oxConfig::getParameter( "selgroup");
00023
00024 $sViewName = getViewName( "oxgroups", $this->_iEditLang );
00025
00026 $oGroups = oxNew( "oxlist" );
00027 $oGroups->init( 'oxgroups' );
00028 $oGroups->selectString( "select * from {$sViewName}" );
00029
00030 $oRoot = new stdClass();
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 Oxstdclass();
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( "oxdelivery" );
00047 $oDelivery->load( $soxId);
00048
00049
00050 if ($oDelivery->isDerived())
00051 $this->_aViewData['readonly'] = true;
00052 }
00053
00054 $this->_aViewData["allgroups2"] = $oGroups;
00055
00056 $aColumns = array();
00057 $iAoc = oxConfig::getParameter("aoc");
00058 if ( $iAoc == 1 ) {
00059
00060 include_once 'inc/delivery_users.inc.php';
00061 $this->_aViewData['oxajax'] = $aColumns;
00062
00063 return "popups/delivery_users.tpl";
00064 } elseif ( $iAoc == 2 ) {
00065
00066 include_once 'inc/delivery_groups.inc.php';
00067 $this->_aViewData['oxajax'] = $aColumns;
00068
00069 return "popups/delivery_groups.tpl";
00070 }
00071
00072
00073 return "delivery_users.tpl";
00074 }
00075 }