delivery_users.php

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 = oxConfig::getParameter( "oxid");
00022         $sSelGroup = oxConfig::getParameter( "selgroup");
00023 
00024         // all usergroups
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         // rebuild list as we need the "no value" entry at the first position
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( "oxdelivery" );
00046             $oDelivery->load( $soxId);
00047 
00048             //Disable editing for derived articles
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/delivery_users.inc.php';
00060             $this->_aViewData['oxajax'] = $aColumns;
00061 
00062             return "popups/delivery_users.tpl";
00063         } elseif ( $iAoc == 2 ) {
00064 
00065             include_once 'inc/delivery_groups.inc.php';
00066             $this->_aViewData['oxajax'] = $aColumns;
00067 
00068             return "popups/delivery_groups.tpl";
00069         }
00070 
00071 
00072         return "delivery_users.tpl";
00073     }
00074 }

Generated on Wed Apr 22 12:26:29 2009 for OXID eShop CE by  doxygen 1.5.5