Example #1
0
 public function init()
 {
     //se for postado algo ta tentando atualizar... atualiza em silencio
     if ($_POST) {
         include_once "library/site/modules/content/dao/ContentDemoDAO.class.php";
         include_once "library/facil3/core/modules/category/dao/CategoryDAO.class.php";
         include_once "library/site/modules/banner/vo/BannerConfigVO.class.php";
         $ContentDemoDAO = ContentSiteDAO::getInstance();
         $CategoryDAO = CategoryDAO::getInstance();
         $CategoryVO = new BannerConfigVO();
         $CategoryVO->setId(47, TRUE);
         /*
         * Array(
          [transitionType] => 1
          [transitionDelayTimeFixed] => 2
          )
         */
         //exit();
         $CategoryVO->commit();
         //exit();
     }
     $returnResult = parent::init();
     $novo_content = array();
     foreach ($this->arrayContentsVO as $ContentsVO) {
         if ($ContentsVO->active < 2) {
             $novo_content[] = $ContentsVO;
         }
     }
     $this->arrayContentsVO = $novo_content;
     //$ContentVO->toStdClass(Config::getLocale());
     $SelectData = new ContentSelectView($this->arrayContentsVO);
     $SelectData->setGoToLocation(array("value" => "admin/home/"));
     $SelectData->gerate();
     $SelectData->hat["label"] = "Url:";
     $SelectData->setMassiveAttr('visible', FALSE, array('Name', 'Description', 'Content', 'Author', 'TemplateUrl', 'Slug', 'KeyWords', 'Date', 'DateIn', 'DateOut', 'Order'));
     $SelectData = $SelectData->getFormData();
     $HttpContentResult = $returnResult->getHttpContentResult();
     $HttpContentResult->selectData = $SelectData;
     $HttpContentResult->category_id = $this->category_id;
     $returnResult->setHttpContentResult($HttpContentResult);
     $HttpResult = $returnResult;
     //para o botao de inserir
     $HttpContentResult->url_insert = Config::getRootPath("admin/home/insert/");
     //include (Config::getFolderView( 'admin/home/index.php' )) ;
     //exit() ;
     //print_r($returnResult);exit();
     return $returnResult;
 }
Example #2
0
 public function init()
 {
     $returnResult = parent::init();
     //$ContentVO->toStdClass(Config::getLocale());
     $SelectData = new ContentSelectView($this->arrayContentsVO);
     $SelectData->setGoToLocation(array("value" => "admin/menu_top"));
     $SelectData->gerate();
     $SelectData->setMassiveAttr('visible', FALSE, array('Name', 'Hat', 'Description', 'Content', 'Author', 'TemplateUrl', 'Slug', 'KeyWords', 'Date', 'DateIn', 'DateOut', 'Order'));
     $SelectData = $SelectData->getFormData();
     $HttpContentResult = $returnResult->getHttpContentResult();
     $HttpContentResult->selectData = $SelectData;
     $returnResult->setHttpContentResult($HttpContentResult);
     $HttpResult = $returnResult;
     //para o botao de inserir
     $HttpContentResult->url_insert = Config::getRootPath("admin/menu_top/insert/");
     include Config::getFolderView('admin/content/select.php');
     exit;
     //print_r($returnResult);exit();
     return $returnResult;
 }
Example #3
0
 public function init()
 {
     if ($this->sub == "blog") {
         $returnResult = parent::init("id", " DESC ");
     } else {
         $returnResult = parent::init();
     }
     //blog é id 36
     //$ContentVO->toStdClass(Config::getLocale());
     //Debug::print_r($this->arrayRestFolder[1]);exit();
     $SelectData = new ContentSelectView($this->arrayContentsVO);
     $SelectData->setGoToLocation(array("value" => "admin/page"));
     $SelectData->gerate();
     $SelectData->setMassiveAttr('visible', FALSE, array('Name', 'Hat', 'Description', 'Content', 'Author', 'TemplateUrl', 'KeyWords', 'Date', 'DateIn', 'DateOut', 'Order'));
     $SelectData->title["label"] = "Titulo:";
     $SelectData->slug["label"] = "Url:";
     $SelectData->slug["type"] = "url_local";
     //faz com que mostre a config::getRootPatc + url
     $SelectData = $SelectData->getFormData();
     $HttpContentResult = $returnResult->getHttpContentResult();
     $HttpContentResult->selectData = $SelectData;
     $returnResult->setHttpContentResult($HttpContentResult);
     $HttpResult = $returnResult;
     $HttpContentResult->sub = $this->sub;
     //para o botao de inserir
     $HttpContentResult->url_insert = Config::getRootPath("admin/page/insert/{$this->sub}");
     $content_sub = Config::getFolderView("admin/content/{$this->sub}/select.php");
     if (file_exists($content_sub)) {
         include $content_sub;
         exit;
     }
     include Config::getFolderView('admin/content/select.php');
     exit;
     //print_r($returnResult);exit();
     return $returnResult;
 }