public function __construct() { echo parent::htmlHeader('Home'); $heading = parent::htmlAlertDiv('info', Heading::newHeading('h4', 'Sign up below')); echo parent::htmlDiv($heading, 8); $hp_uniq = InputField::hiddenInputField('text', 'form'); $hp = InputField::hpInputField(); $firstname = InputField::newInputField('text', 'fname', 'First name'); $lastname = InputField::newInputField('text', 'lname', 'Last name'); $email = InputField::newInputField('text', 'email', 'Email'); $password = InputField::newInputField('password', 'pass', 'Password'); $password2 = InputField::newInputField('password', 'pass2', 'Re-enter password'); $captcha = InputField::captchaInputField(); $submit = Button::newButton('submit', 'btn-primary', 'Register'); $form = new Form('index.php?page=signup', 'POST'); $form->addNewInput($hp_uniq); $form->addNewInput($hp); $form->addNewInput($firstname); $form->addNewInput($lastname); $form->addNewInput($email); $form->addNewInput($password); $form->addNewInput($password2); $form->addNewInput($captcha); $form->addNewInput($submit); $content = $form->getForm(); $content .= Link::newLink('Go Back', 'index.php', '_self'); echo parent::htmlDiv($content, 4); echo parent::htmlFooter(); }
public function __construct() { echo parent::htmlHeader('Login'); $heading = Heading::newHeading('h4', '<b>Welcome!</b> Sing in or sing up below.'); $content = parent::htmlAlertDiv('info', $heading); echo parent::htmlDiv($content, 8); // Form $hp_uniq = InputField::hiddenInputField('text', 'form'); $hp = InputField::hpInputField(); $username = InputField::newInputField('text', 'email', 'Email'); $password = InputField::newInputField('password', 'password', 'Password'); $captcha = InputField::captchaInputField(); $submit = Button::newButton('submit', 'btn-primary', 'Sing in'); $form = new Form('index.php?page=login', 'POST'); $form->addNewInput($hp_uniq); $form->addNewInput($hp); $form->addNewInput($username); $form->addNewInput($password); $form->addNewInput($captcha); $form->addNewInput($submit); $content = $form->getForm(); $content .= Paragraph::newParagraph('Not a member yet? Please sing up below!'); $content .= Link::newLink('Sing up', 'index.php?page=signup', '_self'); echo parent::htmlDiv($content, 4); echo parent::htmlFooter(); }