XOOPS
2.6.0
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
registerform.php
Go to the documentation of this file.
1
<?php
19
$email_tray
=
new
Xoops\Form\ElementTray
(
XoopsLocale::EMAIL
,
'<br />'
);
20
$email_text
=
new
Xoops\Form\Text
(
''
,
'email'
, 25, 60,
$myts
->htmlSpecialChars(
$email
));
21
$email_option
=
new
Xoops\Form\Checkbox
(
''
,
'user_viewemail'
,
$user_viewemail
);
22
$email_option
->addOption(1,
XoopsLocale::ALLOW_OTHER_USERS_TO_VIEW_EMAIL
);
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
)));
33
$tzselected
= (
$timezone_offset
!=
''
) ?
$timezone_offset
:
$xoopsConfig
[
'default_TZ'
];
34
$reg_form
->addElement(
new
Xoops
\Form\SelectTimeZone(
XoopsLocale::TIME_ZONE
,
'timezone_offset'
,
$tzselected
));
35
//$reg_form->addElement($avatar_tray);
36
$reg_form
->addElement(
new
Xoops
\Form\RadioYesNo(
XoopsLocale::Q_RECEIVE_OCCASIONAL_EMAIL_NOTICES_FROM_ADMINISTRATORS
,
'user_mailok'
,
$user_mailok
));
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'
));
Xoops\Form\TextArea
Definition:
TextArea.php:25
XoopsLocaleEn_US\A_SUBMIT
const A_SUBMIT
Definition:
en_US.php:128
$user_viewemail
$user_viewemail
Definition:
register.php:76
Xoops\Form\Text
Definition:
Text.php:25
$xoopsConfigUser
$xoopsConfigUser
Definition:
register.php:33
$tzselected
$tzselected
Definition:
registerform.php:33
$email_text
$email_text
Definition:
registerform.php:20
$timezone_offset
$timezone_offset
Definition:
register.php:75
Xoops\Form\Checkbox
Definition:
Checkbox.php:27
XoopsLocaleEn_US\F_ENTER
const F_ENTER
Definition:
en_US.php:408
XoopsLocaleEn_US\EMAIL
const EMAIL
Definition:
en_US.php:279
Xoops\Form\ThemeForm
Definition:
ThemeForm.php:27
Xoops
XoopsLocaleEn_US\TIME_ZONE
const TIME_ZONE
Definition:
en_US.php:1052
XoopsLocaleEn_US\USER_REGISTRATION
const USER_REGISTRATION
Definition:
en_US.php:1084
$vpass
$vpass
Definition:
register.php:74
$uname_size
$uname_size
Definition:
registerform.php:27
Xoops\Form\ElementTray
Definition:
ElementTray.php:25
$reg_form
$reg_form
Definition:
registerform.php:26
XoopsLocaleEn_US\PASSWORD
const PASSWORD
Definition:
en_US.php:895
$user_mailok
$user_mailok
Definition:
register.php:77
XoopsLocaleEn_US\VERIFY_PASSWORD
const VERIFY_PASSWORD
Definition:
en_US.php:1085
XoopsLocaleEn_US\DISCLAIMER
const DISCLAIMER
Definition:
en_US.php:212
$agree_disc
$agree_disc
Definition:
register.php:78
$url
$url
Definition:
register.php:72
$uname
$uname
Definition:
checklogin.php:37
XoopsLocaleEn_US\I_AGREE_TO_THE_ABOVE
const I_AGREE_TO_THE_ABOVE
Definition:
en_US.php:492
$pass
$pass
Definition:
checklogin.php:38
XoopsLocaleEn_US\USERNAME
const USERNAME
Definition:
en_US.php:1079
$myts
$myts
Definition:
edituser.php:38
$email_option
$email_option
Definition:
registerform.php:21
XoopsLocaleEn_US\Q_RECEIVE_OCCASIONAL_EMAIL_NOTICES_FROM_ADMINISTRATORS
const Q_RECEIVE_OCCASIONAL_EMAIL_NOTICES_FROM_ADMINISTRATORS
Definition:
en_US.php:934
XoopsLocaleEn_US\ALLOW_OTHER_USERS_TO_VIEW_EMAIL
const ALLOW_OTHER_USERS_TO_VIEW_EMAIL
Definition:
en_US.php:60
$email_tray
$email_tray
Definition:
registerform.php:19
$xoopsConfig
$xoopsConfig
Definition:
common.php:130
$email
$email
Definition:
lostpass.php:32
XoopsLocaleEn_US\WEBSITE
const WEBSITE
Definition:
en_US.php:1096
usr64
htdocs
include
registerform.php
Generated on Fri May 22 2015 03:07:02 for XOOPS by
1.8.9.1