deliveryset_users.php

Go to the documentation of this file.
00001 <?php
00002 
00010 class DeliverySet_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         /*while (list($key, $val) = each($oGroups)) {
00044             if ( $val->oxgroups__oxid->value == $oDelivery->oxdelivery__oxusergroupid->value)
00045                 $val->selected = 1;
00046             $aNewList[] = $val;
00047         }*/
00048         $oGroups = $aNewList;
00049 
00050         if ( isset($soxId) && $soxId != "-") {
00051             $oDelivery = oxNew( "oxdeliveryset" );
00052             $oDelivery->load( $soxId);
00053 
00054             //Disable editing for derived articles
00055             if ($oDelivery->isDerived())
00056                 $this->_aViewData['readonly'] = true;
00057         }
00058 
00059         $this->_aViewData["allgroups2"] = $oGroups;
00060 
00061         $aColumns = array();
00062         $iAoc = oxConfig::getParameter("aoc");
00063         if ( $iAoc == 1 ) {
00064 
00065             include_once 'inc/deliveryset_groups.inc.php';
00066             $this->_aViewData['oxajax'] = $aColumns;
00067 
00068             return "popups/deliveryset_groups.tpl";
00069         } elseif ( $iAoc == 2 ){
00070 
00071             include_once 'inc/deliveryset_users.inc.php';
00072             $this->_aViewData['oxajax'] = $aColumns;
00073 
00074             return "popups/deliveryset_users.tpl";
00075         }
00076         return "deliveryset_users.tpl";
00077     }
00078 }

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