XOOPS  2.6.0
registerform.php
Go to the documentation of this file.
1 <?php
20 $email_text = new Xoops\Form\Text('', 'email', 25, 60, $myts->htmlSpecialChars($email));
21 $email_option = new Xoops\Form\Checkbox('', 'user_viewemail', $user_viewemail);
23 $email_tray->addElement($email_text, true);
24 $email_tray->addElement($email_option);
25 
26 $reg_form = new Xoops\Form\ThemeForm(XoopsLocale::USER_REGISTRATION, 'userinfo', 'register.php', 'post', true);
27 $uname_size = $xoopsConfigUser['maxuname'] < 25 ? $xoopsConfigUser['maxuname'] : 25;
28 $reg_form->addElement(new Xoops\Form\Text(XoopsLocale::USERNAME, 'uname', $uname_size, $uname_size, $myts->htmlSpecialChars($uname)), true);
29 $reg_form->addElement($email_tray);
30 $reg_form->addElement(new Xoops\Form\Password(XoopsLocale::PASSWORD, 'pass', 10, 32, $myts->htmlSpecialChars($pass)), true);
31 $reg_form->addElement(new Xoops\Form\Password(XoopsLocale::VERIFY_PASSWORD, 'vpass', 10, 32, $myts->htmlSpecialChars($vpass)), true);
32 $reg_form->addElement(new Xoops\Form\Text(XoopsLocale::WEBSITE, 'url', 25, 255, $myts->htmlSpecialChars($url)));
34 $reg_form->addElement(new Xoops\Form\SelectTimeZone(XoopsLocale::TIME_ZONE, 'timezone_offset', $tzselected));
35 //$reg_form->addElement($avatar_tray);
37 if ($xoopsConfigUser['reg_dispdsclmr'] != 0 && $xoopsConfigUser['reg_disclaimer'] != '') {
38  $disc_tray = new Xoops\Form\ElementTray(XoopsLocale::DISCLAIMER, '<br />');
39  $disc_text = new Xoops\Form\TextArea('', 'disclaimer', $xoopsConfigUser['reg_disclaimer'], 15, 80);
40  $disc_text->setExtra('readonly="readonly"');
41  $disc_tray->addElement($disc_text);
42  $agree_chk = new Xoops\Form\Checkbox('', 'agree_disc', $agree_disc);
43  $agree_chk->addOption(1, XoopsLocale::I_AGREE_TO_THE_ABOVE);
44  $eltname = $agree_chk->getName();
45  $eltmsg = str_replace('"', '\"', stripslashes(sprintf(XoopsLocale::F_ENTER, XoopsLocale::I_AGREE_TO_THE_ABOVE)));
46  $agree_chk->customValidationCode[] = "if ( myform.{$eltname}.checked == false ) { window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }";
47  $disc_tray->addElement($agree_chk, true);
48  $reg_form->addElement($disc_tray);
49 }
50 $reg_form->addElement(new Xoops\Form\Hidden('op', 'newuser'));
51 $reg_form->addElement(new Xoops\Form\Button('', 'submitButton', XoopsLocale::A_SUBMIT, 'submit'));
const A_SUBMIT
Definition: en_US.php:128
$user_viewemail
Definition: register.php:76
$xoopsConfigUser
Definition: register.php:33
$tzselected
$email_text
$timezone_offset
Definition: register.php:75
const F_ENTER
Definition: en_US.php:408
const TIME_ZONE
Definition: en_US.php:1052
const USER_REGISTRATION
Definition: en_US.php:1084
$vpass
Definition: register.php:74
$uname_size
$reg_form
const PASSWORD
Definition: en_US.php:895
$user_mailok
Definition: register.php:77
const VERIFY_PASSWORD
Definition: en_US.php:1085
const DISCLAIMER
Definition: en_US.php:212
$agree_disc
Definition: register.php:78
$url
Definition: register.php:72
$uname
Definition: checklogin.php:37
const I_AGREE_TO_THE_ABOVE
Definition: en_US.php:492
$pass
Definition: checklogin.php:38
const USERNAME
Definition: en_US.php:1079
$myts
Definition: edituser.php:38
$email_option
const Q_RECEIVE_OCCASIONAL_EMAIL_NOTICES_FROM_ADMINISTRATORS
Definition: en_US.php:934
const ALLOW_OTHER_USERS_TO_VIEW_EMAIL
Definition: en_US.php:60
$email_tray
$xoopsConfig
Definition: common.php:130
$email
Definition: lostpass.php:32