Go to the documentation of this file.00001 <?php
00002
00008 class AdminGuestbook_List extends oxAdminList
00009 {
00010
00016 protected $_sThisTemplate = 'adminguestbook_list.tpl';
00017
00023 protected $_sListClass = 'oxgbentry';
00024
00030 protected $_sDefSortField = 'oxcreate';
00031
00037 protected $_blDesc = true;
00038
00045 public function render()
00046 {
00047 parent::render();
00048
00049 $oList = $this->getItemList();
00050 if ($oList && $oList->count()) {
00051
00052 $oDb = oxDb::getDb();
00053 foreach ($oList as $oEntry) {
00054
00055 $sUserIdField = 'oxgbentries__oxuserid';
00056 $sUserLastNameField = 'oxuser__oxlname';
00057 if (isset($oEntry->$sUserIdField) && $oEntry->$sUserIdField->value) {
00058 $sSql = "select oxlname from oxuser where oxid=" . $oDb->quote($oEntry->$sUserIdField->value);
00059 $oEntry->$sUserLastNameField = new oxField($oDb->getOne($sSql, false, false));
00060 }
00061 }
00062 }
00063
00064 $this->_aViewData["mylist"] = $oList;
00065
00066 return $this->_sThisTemplate;
00067 }
00068
00069 }