Example #1
0
 public function __construct($form = null)
 {
     $folders = JRequest::getVar('folder', array());
     if (count($folders)) {
         $list = array();
         foreach ($folders as $k => $v) {
             $list[$v] = JFolder::files(JPATH_ROOT . '/' . $v, '(.jpg|.jpeg|.gif|.png)$');
         }
         echo '{st-image-load}' . json_encode($list) . '{/st-image-load}';
         die;
     }
     // load saved images
     $saved = JRequest::getVar('loadImage', '');
     if ($saved) {
         require_once dirname(dirname(__FILE__)) . '/stContentShowcase.php';
         $params = stContentShowcase::getModuleParams();
         echo '{st-image-load}' . json_encode($params) . '{/st-image-load}';
         die;
     }
 }