| [ Index ] |
PHP Cross Reference of Limb3 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Limb PHP Framework 4 * 5 * @link http://limb-project.com 6 * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com) 7 * @license LGPL http://www.gnu.org/copyleft/lesser.html 8 */ 9 lmb_require('limb/web_app/src/controller/lmbController.class.php'); 10 lmb_require('limb/cms/src/lmbCmsFileRepositoryBrowser.class.php'); 11 lmb_require('limb/cms/src/lmbCmsImageRepositoryBrowser.class.php'); 12 13 /** 14 * class AdminMediaController. 15 * 16 * @package cms 17 * @version $Id: AdminMediaController.class.php 5945 2007-06-06 08:31:43Z pachanga $ 18 */ 19 class AdminMediaController extends lmbController 20 { 21 function doProcessCommand() 22 { 23 $resource_type = $this->request->get('Type'); 24 $current_folder = $this->request->get('CurrentFolder'); 25 $command = $this->request->get('Command'); 26 27 $browser = $this->_createBrowser($resource_type); 28 $browser->setCurrentFolderPath($current_folder); 29 30 $this->_setXmlHeaders(); 31 32 $xml = '<?xml version="1.0" encoding="utf-8" ?>'; 33 $xml .= '<Connector command="' . $command . '" resourceType="' . $resource_type . '">' ; 34 $xml .= '<CurrentFolder path="' . $current_folder . '" url="/" />' ; 35 36 $xml .= '<Folders>' . $browser->renderFolders() . '</Folders>'; 37 38 39 $xml .= '<Files>' . $browser->renderFiles() . '</Files>'; 40 41 $xml .= '</Connector>'; 42 43 return $xml; 44 } 45 46 protected function _createBrowser($type) 47 { 48 if($type == 'File') 49 return new lmbCmsFileRepositoryBrowser(); 50 if($type == 'Image') 51 return new lmbCmsImageRepositoryBrowser(); 52 53 return new lmbCmsFileRepositoryBrowser(); 54 } 55 56 protected function _setXmlHeaders() 57 { 58 $this->response->header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ; 59 $this->response->header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ; 60 $this->response->header('Cache-Control: no-store, no-cache, must-revalidate') ; 61 $this->response->header('Cache-Control: post-check=0, pre-check=0', false) ; 62 $this->response->header('Pragma: no-cache') ; 63 $this->response->header( 'Content-Type:text/xml; charset=utf-8' ) ; 64 } 65 } 66 67 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Sat Nov 22 03:48:54 2008 | Cross-referenced by PHPXref 0.7 |