1 : <?php
2 :
3 : class GalleryController extends Zend_Controller_Action
4 0 : {
5 :
6 : public $galPath;
7 :
8 : public function init()
9 : {
10 0 : $this->_helper->_acl->allow(null);
11 0 : $this->galPath = APPLICATION_PATH . "/../public/images/gallery";
12 0 : }
13 :
14 : public function indexAction()
15 : {
16 0 : $gall = new Zend_Config_Xml($this->galPath . '/gallery.xml');
17 0 : $this->view->gall = $gall->toArray();
18 0 : }
19 :
20 : public function singleAction()
21 : {
22 0 : if (!$ident = $this->_getParam('ident'))
23 0 : {
24 0 : $this->_forward('index');
25 0 : }
26 0 : if (file_exists($this->galPath . "/$ident/images.xml"))
27 0 : {
28 0 : $images = new Zend_Config_Xml($this->galPath . "/$ident/images.xml");
29 0 : $this->view->images = $images->toArray();
30 0 : $this->view->ident = $ident;
31 0 : $this->view->pageTitle = '';
32 0 : }
33 0 : }
34 :
35 : }
36 :
|