delivery_users.php

Go to the documentation of this file.
00001 <?php
00002 
00010 class Delivery_Users extends oxAdminDetails
00011 {
00018     public function render()
00019     {
00020         parent::render();
00021 
00022         $soxId = oxConfig::getParameter( "oxid");
00023         $sSelGroup = oxConfig::getParameter( "selgroup");
00024 
00025         // all usergroups
00026         $oGroups = oxNew( "oxlist" );
00027         $oGroups->init( 'oxgroups' );
00028         $oGroups->selectString( 'select * from oxgroups' );
00029 
00030         $oRoot = new stdClass();
00031         $oRoot->oxgroups__oxid    = new oxField("");
00032         $oRoot->oxgroups__oxtitle = new oxField("-- ");
00033         // rebuild list as we need the "no value" entry at the first position
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             //Disable editing for derived articles
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 }

Generated on Thu Dec 4 12:04:55 2008 for OXID eShop CE by  doxygen 1.5.5