/** * Output error message * * @return PageXml */ public function CreatePage() { $this->_myWords = $this->WordCollection(); $title = $this->_myWords->Value("TITLE", $this->_context->get("SERVER_NAME")); $abstract = $this->_myWords->Value("ABSTRACT", $this->_context->get("SERVER_NAME")); $document = new XmlnukeDocument($title, $abstract); $this->_url = "module:UserProfile"; $this->_users = $this->getUsersDatabase(); $this->_user = $this->_users->getUserName($this->_context->authenticatedUser()); $blockCenterTitle = $this->_myWords->ValueArgs("TITLE", array($this->_user->getField($this->_users->getUserTable()->username))); $blockcenter = new XmlBlockCollection($blockCenterTitle, BlockPosition::Center); $document->addXmlnukeObject($blockcenter); $this->_paragraph = new XmlParagraphCollection(); $blockcenter->addXmlnukeObject($this->_paragraph); $action = $this->_context->get("action"); switch ($action) { case "update": $this->update(); break; case "changepassword": $this->changePWD(); break; } $this->formUserInfo(); $this->formPasswordInfo(); $this->formRolesInfo(); return $document->generatePage(); }
/** * Logic of your module * * @return PageXml */ public function CreatePage() { $myWords = $this->WordCollection(); $this->_titlePage = $myWords->Value("TITLE", $this->_context->get("SERVER_NAME")); $this->_abstractPage = $myWords->Value("ABSTRACT", $this->_context->get("SERVER_NAME")); $this->_document = new XmlnukeDocument($this->_titlePage, $this->_abstractPage); $this->txtSearch = $this->_context->get("txtSearch"); if ($this->txtSearch != "") { $this->Form(); $doc = $this->Find(); } else { $this->Form(); } return $this->_document->generatePage(); }
/** * Create the PageXml object from CreatePage() parameters * * @param string $title * @param array $ht * @return PageXml */ private function CreatePageArgs($title, $ht) { $myWords = $this->WordCollection(); $document = new XmlnukeDocument($myWords->ValueArgs("TITLE", array($this->_context->get("SERVER_NAME"))), $myWords->ValueArgs("ABSTRACT", array($this->_context->get("SERVER_NAME")))); $blockcenter = new XmlBlockCollection($myWords->Value("TITRESP"), BlockPosition::Center); $document->addXmlnukeObject($blockcenter); $paragraph = new XmlParagraphCollection(); $blockcenter->addXmlnukeObject($paragraph); $paragraph->addXmlnukeObject(new XmlnukeText(" ")); $paragraph->addXmlnukeObject(new XmlnukeText($title, true)); $paragraph->addXmlnukeObject(new XmlnukeBreakLine()); foreach ($ht as $key => $value) { $paragraph->addXmlnukeObject(new XmlnukeBreakLine()); $paragraph->addXmlnukeObject(new XmlnukeText($key . ":", true)); $paragraph->addXmlnukeObject(new XmlnukeText(" " . $value)); } $anchor = new XmlAnchorCollection("javascript:history.go(-1)", ""); $text = new XmlnukeText($myWords->Value("TXT_BACK")); $anchor->addXmlnukeObject($text); return $document->generatePage(); }
/** * CreatePage is called from module processor and decide the proper output XML. * * @param String $showAction * @param unknown_type $showLink * @param unknown_type $showMessage * @return PageXml */ public function CreatePage() { $this->_myWords = $this->WordCollection(); $this->_document = new XmlnukeDocument($this->_myWords->Value("TITLE", $this->_context->get("SERVER_NAME")), $this->_myWords->Value("ABSTRACT", $this->_context->get("SERVER_NAME"))); if ($this->_link == "") { $this->goBack($this->_myWords->Value("ERRORINVALID")); } elseif ($this->_action == "submit") { if (!XmlInputImageValidate::validateText($this->_context)) { $this->goBack($this->_myWords->Value("OBJECTIMAGEINVALID")); } else { if ($this->_toName == "" || $this->_toEmail == "" || $this->_fromName == "" || $this->_fromEmail == "") { $this->goBack($this->_myWords->Value("ERROR")); } else { $custMessage = $this->_myWords->Value("MESSAGE", array($this->_toName, $this->_toEmail, urldecode($this->_link), $this->_fromName, $this->_customMessage)); MailUtil::Mail(MailUtil::getEmailFromID(), MailUtil::getFullEmailName($this->_toName, $this->_toEmail), $this->_myWords->Value("SUBJECT"), "", $this->_fromEmail, $custMessage); $this->showMessage(); } } } else { $this->showForm(); } return $this->_document->generatePage(); }
/** * Output error message * * @return PageXml object */ public function CreatePage() { $this->_myWords = $this->WordCollection(); $this->_document = new XmlnukeDocument($this->_myWords->Value("TITLE"), $this->_myWords->Value("ABSTRACT")); $this->_url = "module:Xmlnuke.Sample"; $this->_document->setMenuTitle($this->_myWords->Value("OPTIONMODULE")); $this->_document->addMenuItem($this->_url . "?op=1", $this->_myWords->Value("OBJECT"), $this->_myWords->Value("DESCOBJECT")); $this->_document->addMenuItem($this->_url . "?op=2", $this->_myWords->Value("FORM"), $this->_myWords->Value("DESCFORM")); $this->_document->addMenuItem($this->_url . "?op=3", $this->_myWords->Value("EDITLIST"), $this->_myWords->Value("DESCEDITLIST")); $this->_document->addMenuItem($this->_url . "?op=4", $this->_myWords->Value("ANYDATASET"), $this->_myWords->Value("DESCANYDATASET")); $this->_document->addMenuItem($this->_url . "?op=5", $this->_myWords->Value("DATABASE"), $this->_myWords->Value("DESCDATABASE")); $this->_document->addMenuItem($this->_url . "?op=6", $this->_myWords->Value("UPLOAD"), $this->_myWords->Value("DESCUPLOAD")); $this->_document->addMenuItem($this->_url . "?op=7", $this->_myWords->Value("XMLDATASET"), $this->_myWords->Value("DESCXMLDATASET")); $this->_document->addMenuItem($this->_url . "?op=8", $this->_myWords->Value("TEXTFILEDATASET"), $this->_myWords->Value("DESTEXTFILEDATASET")); $this->_document->addMenuItem($this->_url . "?op=9", $this->_myWords->Value("XMLCHART"), $this->_myWords->Value("DESCXMLCHART")); $this->_document->addMenuItem($this->_url . "?op=10", $this->_myWords->Value("TABVIEW"), $this->_myWords->Value("DESCTABVIEW")); $this->_document->addMenuItem($this->_url . "?op=11", $this->_myWords->Value("DUALLIST"), $this->_myWords->Value("DESCDUALLIST")); $this->_document->addMenuItem($this->_url . "?op=12", $this->_myWords->Value("FAQ"), $this->_myWords->Value("DESCFAQ")); $this->_document->addMenuItem($this->_url . "?op=13", $this->_myWords->Value("AJAXPOST"), $this->_myWords->Value("DESCAJAXPOST")); $this->_document->addMenuItem($this->_url . "?op=14", $this->_myWords->Value("AUTOSUGGEST"), $this->_myWords->Value("DESCAUTOSUGGEST")); $this->_document->addMenuItem($this->_url . "?op=15", $this->_myWords->Value("TREEVIEW"), $this->_myWords->Value("DESCTREEVIEW")); $this->_document->addMenuItem($this->_url . "?op=16", $this->_myWords->Value("SORTABLE"), $this->_myWords->Value("DESCSORTABLE")); $this->_document->addMenuItem($this->_url . "?op=20", $this->_myWords->Value("PORTLET"), $this->_myWords->Value("PORTLET")); $this->_document->addMenuItem($this->_url . "?op=17", $this->_myWords->Value("CALENDAR"), $this->_myWords->Value("DESCCALENDAR")); $this->_document->addMenuItem($this->_url . "?op=18", $this->_myWords->Value("UIALERT"), $this->_myWords->Value("DESCUIALERT")); $this->_document->addMenuItem($this->_url . "?op=19", $this->_myWords->Value("MEDIAGALLERY"), $this->_myWords->Value("DESCMEDIAGALLERY")); $block = new XmlBlockCollection($this->_myWords->Value("MODULE"), BlockPosition::Center); $paragraph = new XmlParagraphCollection(); $paragraph->addXmlnukeObject(new XmlnukeText($this->_myWords->Value("DESCMODULE"))); $paragraph->addXmlnukeObject(new XmlnukeBreakLine()); $paragraph->addXmlnukeObject(new XmlnukeText($this->_myWords->Value("SELECTOPTION"))); $block->addXmlnukeObject($paragraph); $this->_document->addXmlnukeObject($block); $option = $this->_context->get("op"); switch ($option) { case 1: $this->actionCreateObject(); break; case 2: $this->actionForm(); break; case 3: $this->actionEditList(); break; case 4: $this->actionEditAnydataSet(); break; case 5: $this->actionEditDB(); break; case 6: $this->actionUpload(); break; case 7: $this->Opcao7(); break; case 8: $this->Opcao8(); break; case 9: $this->Opcao9(); break; case 10: $this->Opcao10(); break; case 11: $this->Opcao11(); break; case 12: $this->Opcao12(); break; case 13: $this->Opcao13(); break; case 14: $this->Opcao14(); break; case 15: $this->Opcao15(); break; case 16: $this->Opcao16(); break; case 17: $this->Opcao17(); break; case 18: $this->Opcao18(); break; case 19: $this->Opcao19(); break; case 20: $this->Opcao20(); break; } return $this->_document->generatePage(); }