[ Index ] |
|
Code source de XOOPS 2.0.17.1 |
1 <?php 2 // $Id: registerform.php 984 2007-08-11 16:31:54Z phppp $ 3 // ------------------------------------------------------------------------ // 4 // XOOPS - PHP Content Management System // 5 // Copyright (c) 2000 XOOPS.org // 6 // <http://www.xoops.org/> // 7 // ------------------------------------------------------------------------ // 8 // This program is free software; you can redistribute it and/or modify // 9 // it under the terms of the GNU General Public License as published by // 10 // the Free Software Foundation; either version 2 of the License, or // 11 // (at your option) any later version. // 12 // // 13 // You may not change or alter any portion of this comment or credits // 14 // of supporting developers from this source code or any supporting // 15 // source code which is considered copyrighted (c) material of the // 16 // original comment or credit authors. // 17 // // 18 // This program is distributed in the hope that it will be useful, // 19 // but WITHOUT ANY WARRANTY; without even the implied warranty of // 20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // 21 // GNU General Public License for more details. // 22 // // 23 // You should have received a copy of the GNU General Public License // 24 // along with this program; if not, write to the Free Software // 25 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // 26 // ------------------------------------------------------------------------ // 27 if (!defined("XOOPS_ROOT_PATH")) { 28 die("XOOPS root path not defined"); 29 } 30 include_once XOOPS_ROOT_PATH."/class/xoopslists.php"; 31 include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; 32 33 34 $email_tray = new XoopsFormElementTray(_US_EMAIL, "<br />"); 35 $email_text = new XoopsFormText("", "email", 25, 60, $myts->htmlSpecialChars($email)); 36 $email_option = new XoopsFormCheckBox("", "user_viewemail", $user_viewemail); 37 $email_option->addOption(1, _US_ALLOWVIEWEMAIL); 38 $email_tray->addElement($email_text, true); 39 $email_tray->addElement($email_option); 40 41 //$avatar_select = new XoopsFormSelect("", "user_avatar", $user_avatar); 42 //$avatar_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/"); 43 //$avatar_select->addOptionArray($avatar_array); 44 //$a_dirlist =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/images/avatar/"); 45 //$a_dir_labels = array(); 46 //$a_count = 0; 47 //$a_dir_link = "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/misc.php?action=showpopups&type=avatars&start=".$a_count."','avatars',600,400);\">XOOPS</a>"; 48 //$a_count = $a_count + count($avatar_array); 49 //$a_dir_labels[] = new XoopsFormLabel("", $a_dir_link); 50 //foreach ($a_dirlist as $a_dir) { 51 // if ( $a_dir == "users" ) { 52 // continue; 53 // } 54 // $avatars_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/".$a_dir."/", $a_dir."/"); 55 // $avatar_select->addOptionArray($avatars_array); 56 // $a_dir_link = "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/misc.php?action=showpopups&type=avatars&subdir=".$a_dir."&start=".$a_count."','avatars',600,400);\">".$a_dir."</a>"; 57 // $a_dir_labels[] = new XoopsFormLabel("", $a_dir_link); 58 // $a_count = $a_count + count($avatars_array); 59 //} 60 //$avatar_select->setExtra("onchange='showImgSelected(\"avatar\", \"user_avatar\", \"images/avatar\", \"\", \"".XOOPS_URL."\")'"); 61 //$avatar_label = new XoopsFormLabel("", "<img src='images/avatar/blank.gif' name='avatar' id='avatar' alt='' />"); 62 //$avatar_tray = new XoopsFormElementTray(_US_AVATAR, " "); 63 //$avatar_tray->addElement($avatar_select); 64 //$avatar_tray->addElement($avatar_label); 65 //foreach ($a_dir_labels as $a_dir_label) { 66 // $avatar_tray->addElement($a_dir_label); 67 //} 68 69 $reg_form = new XoopsThemeForm(_US_USERREG, "userinfo", "register.php", "post", true); 70 $uname_size = $xoopsConfigUser['maxuname'] < 25 ? $xoopsConfigUser['maxuname'] : 25; 71 $reg_form->addElement(new XoopsFormText(_US_NICKNAME, "uname", $uname_size, $uname_size, $myts->htmlSpecialChars($uname)), true); 72 $reg_form->addElement($email_tray); 73 $reg_form->addElement(new XoopsFormPassword(_US_PASSWORD, "pass", 10, 32, $myts->htmlSpecialChars($pass)), true); 74 $reg_form->addElement(new XoopsFormPassword(_US_VERIFYPASS, "vpass", 10, 32, $myts->htmlSpecialChars($vpass)), true); 75 $reg_form->addElement(new XoopsFormText(_US_WEBSITE, "url", 25, 255, $myts->htmlSpecialChars($url))); 76 $tzselected = ($timezone_offset != "") ? $timezone_offset : $xoopsConfig['default_TZ']; 77 $reg_form->addElement(new XoopsFormSelectTimezone(_US_TIMEZONE, "timezone_offset", $tzselected)); 78 //$reg_form->addElement($avatar_tray); 79 $reg_form->addElement(new XoopsFormRadioYN(_US_MAILOK, 'user_mailok', $user_mailok)); 80 if ($xoopsConfigUser['reg_dispdsclmr'] != 0 && $xoopsConfigUser['reg_disclaimer'] != '') { 81 $disc_tray = new XoopsFormElementTray(_US_DISCLAIMER, '<br />'); 82 $disc_text = new XoopsFormTextarea('', 'disclaimer', $xoopsConfigUser['reg_disclaimer'], 8); 83 $disc_text->setExtra('readonly="readonly"'); 84 $disc_tray->addElement($disc_text); 85 $agree_chk = new XoopsFormCheckBox('', 'agree_disc', $agree_disc); 86 $agree_chk->addOption(1, _US_IAGREE); 87 $eltname = $agree_chk->getName(); 88 $eltmsg = str_replace('"', '\"', stripslashes( sprintf( _FORM_ENTER, _US_IAGREE ) ) ); 89 $agree_chk->customValidationCode[] = "if ( myform.{$eltname}.checked == false ) { window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }"; 90 $disc_tray->addElement($agree_chk, true); 91 $reg_form->addElement($disc_tray); 92 } 93 $reg_form->addElement(new XoopsFormHidden("op", "newuser")); 94 $reg_form->addElement(new XoopsFormButton("", "submit", _US_SUBMIT, "submit")); 95 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Nov 25 11:44:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |