Exemplo n.º 1
0
 /**
  * Add EditList to site
  *
  * @param XmlBlockCollection $this->_mainBlock
  * @param string $site
  * @param AnyDataset $dataset
  */
 protected function AddEditListToSite($block, $site, $dataset)
 {
     $para = new XmlParagraphCollection();
     $this->_mainBlock->addXmlnukeObject($para);
     $this->url->addParam("editsite", $site);
     $editList = new XmlEditList($this->_context, $this->myWords->Value("EDITLIST_TITLE", $site), $this->url->getUrl(), true, false, true, true);
     $editList->setDataSource($dataset->getIterator());
     $listField = new EditListField();
     $listField->editlistName = "";
     $listField->fieldData = "role";
     $editList->addEditListField($listField);
     $listField = new EditListField();
     $listField->editlistName = $this->myWords->Value("EDITLIST_ROLES");
     $listField->fieldData = $this->user->getRolesTable()->Role;
     $editList->addEditListField($listField);
     $listField = new EditListField();
     $listField->editlistName = $this->myWords->Value("EDITLIST_SITES");
     $listField->fieldData = $this->user->getRolesTable()->Site;
     $editList->addEditListField($listField);
     $para->addXmlnukeObject($editList);
 }
Exemplo n.º 2
0
 protected function redirProcessPage($full)
 {
     $url = new XmlnukeManageUrl(URLTYPE::MODULE, $this->_module);
     $url->addParam("acao", self::ACTION_MSG);
     $url->addParam(self::PARAM_MSG, $this->_currentAction);
     //$url->addParam("filter", $this->_filter);
     //$url->addParam("sort", $this->_sort);
     $url->addParam("curpage", $this->_curPage);
     $url->addParam("offset", $this->_qtdRows);
     foreach ($this->_parameter as $key => $value) {
         $url->addParam($key, $value);
     }
     //if ($full)
     //{
     return $url->getUrlFull();
     //}
     //else
     //{
     //	return $url->getUrl();
     //}
 }
Exemplo n.º 3
0
 /**
  * Action Upload
  *
  */
 protected function actionUpload()
 {
     $blockCenter = new XmlBlockCollection($this->_myWords->Value("UPLOAD"), BlockPosition::Center);
     $this->_document->addXmlnukeObject($blockCenter);
     $paragraph = new XmlParagraphCollection();
     $blockCenter->addXmlnukeObject($paragraph);
     switch ($this->_action) {
         case 'add':
             $fileProcessor = new UploadFilenameProcessor('*.*');
             $fileProcessor->setFilenameLocation(ForceFilenameLocation::DefinePath, "diretorio/subdir/");
             $result = $this->_context->processUpload($fileProcessor, false, 'form_file');
             $paragraph->addXmlnukeObject(new XmlnukeText("Arquivo " . $result[0] . " enviado com sucesso ao servidor!"));
             break;
         default:
             $paragraph->addXmlnukeObject(new XmlnukeText($this->_myWords->Value("DESCUPLOADTEXT2")));
             $url = new XmlnukeManageUrl(URLTYPE::MODULE, $this->_url);
             $url->addParam('op', '6');
             $url->addParam('action', 'add');
             $form = new XmlFormCollection($this->_context, $url->getUrl(), $this->_myWords->Value("MAKEUPLOAD"));
             $paragraph = new XmlParagraphCollection();
             $blockCenter->addXmlnukeObject($paragraph);
             $paragraph->addXmlnukeObject($form);
             $fileField = new XmlInputFile($this->_myWords->Value("FILE"), 'form_file');
             $form->addXmlnukeObject($fileField);
             $button = new XmlInputButtons();
             $button->addSubmit($this->_myWords->Value("ADD"), "");
             $form->addXmlnukeObject($button);
             break;
     }
 }