예제 #1
0
 /**
  * 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();
 }
예제 #2
0
파일: SendPage.php 프로젝트: byjg/xmlnuke
 /**
  * Show the form
  *
  */
 public function showForm()
 {
     $blockcenter = new XmlBlockCollection($this->_myWords->Value("MSGFILL"), BlockPosition::Center);
     $this->_document->addXmlnukeObject($blockcenter);
     $paragraph = new XmlParagraphCollection();
     $blockcenter->addXmlnukeObject($paragraph);
     $form = new XmlFormCollection($this->_context, "module:sendpage", $this->_myWords->Value("CAPTION"));
     $paragraph->addXmlnukeObject($form);
     $caption = new XmlInputCaption($this->_myWords->ValueArgs("INFO", array(urldecode($this->_link))));
     $form->addXmlnukeObject($caption);
     $hidden = new XmlInputHidden("action", "submit");
     $form->addXmlnukeObject($hidden);
     $hidden = new XmlInputHidden("link", $this->_link);
     $form->addXmlnukeObject($hidden);
     $textbox = new XmlInputTextBox($this->_myWords->Value("FLDNAME"), "fromname", "", 40);
     $textbox->setRequired(true);
     $form->addXmlnukeObject($textbox);
     $textbox = new XmlInputTextBox($this->_myWords->Value("FLDEMAIL"), "frommail", "", 40);
     $textbox->setDataType(INPUTTYPE::EMAIL);
     $textbox->setRequired(true);
     $form->addXmlnukeObject($textbox);
     $textbox = new XmlInputTextBox($this->_myWords->Value("FLDTONAME"), "toname", "", 40);
     $textbox->setRequired(true);
     $form->addXmlnukeObject($textbox);
     $textbox = new XmlInputTextBox($this->_myWords->Value("FLDTOEMAIL"), "tomail", "", 40);
     $textbox->setDataType(INPUTTYPE::EMAIL);
     $textbox->setRequired(true);
     $form->addXmlnukeObject($textbox);
     $memo = new XmlInputMemo($this->_myWords->Value("LABEL_MESSAGE"), "custommessage", "");
     $form->addXmlnukeObject($memo);
     $form->addXmlnukeObject(new XmlInputImageValidate($this->_myWords->Value("TYPETEXTFROMIMAGE")));
     $button = new XmlInputButtons();
     $button->addSubmit($this->_myWords->Value("TXT_SUBMIT"), "");
     $form->addXmlnukeObject($button);
 }
예제 #3
0
파일: Login.php 프로젝트: byjg/xmlnuke
 /**
  * Send a email with user data profile
  *
  * @param LanguageCollection $myWords
  * @param String $name
  * @param String $user
  * @param String $email
  * @param String $password
  */
 protected function sendResetPasswordMessage($myWords, $name, $user, $email, $token)
 {
     $path = $this->_context->get("SCRIPT_NAME");
     $path = substr($path, 0, strrpos($path, "/") + 1);
     $url = "http://" . $this->_context->getServerName() . $path;
     $body = $myWords->ValueArgs("RESETPASSWORDMESSAGE", array($name, $this->_context->get("SERVER_NAME"), $user, $url . $this->_context->bindModuleUrl(str_replace('\\', '.', get_class()) . '?action=' . ModuleActionLogin::RESETPASSWORD . '&username='******'&resettoken=' . $token . '&returnurl=' . $this->_login->getReturnUrl())));
     $envelope = new MailEnvelope(Util::getFullEmail($email, $name), $myWords->Value("RESETSUBJECTMESSAGE", "[" . $this->_context->getServerName() . "]"), $body);
     $envelope->Send();
 }