<?PHP
/************************************************************************/
/* SFORM Extender for NPDS USER .                                       */
/* ===========================                                          */
/*                                                                      */
/* P. Brunier 2004 for NPDS V                                           */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/* Dont modify this file is you dont know what you make                 */
/************************************************************************/
$m->add_title(translate("New User"));
$m->add_mess(translate("* for mandatory field"));
$m->add_form_field_size(50);

$m->add_field('uname', translate("User ID"),$uname,'text',true,25,"","");
$m->add_field('name', translate("Real Name"),$name,'text',false,60,"","");
$m->add_field('email', translate("Real Email")."<br /><span style=\"font-size: 10px;\">".translate("(This Email will not be public but is required, will be used to send your password if you lost it)")."</span>",$email,'text',true,60,"","");
// $m->add_field('url', translate("Your HomePage"),$url,'text',false,100,"","");

// ---- AVATAR
if ($smilies) {
   global $theme;
   $direktori="images/forum/avatar";
   if (function_exists("theme_image")) {
      if (theme_image("forum/avatar/blank.gif"))
         $direktori="themes/$theme/images/forum/avatar";
   }
   $handle=opendir($direktori);
   while ($file = readdir($handle)) {$filelist[] = $file;}
   asort($filelist);
   while (list ($key, $file) = each ($filelist)) {
      if (!eregi("(.gif|.jpg)$",$file)) continue;
         $tmp_tempo[$file]['en']=$file;
         $tmp_tempo[$file]['selected']=false;
         if ($file=="blank.gif") {$tmp_tempo[$file]['selected']=true;}
   }
   $m->add_select("user_avatar", translate("Your Avatar"), $tmp_tempo, false, "", false);
   $m->add_extender("user_avatar", "onChange=\"showimage()\"", "&nbsp;&nbsp;<img src=\"$direktori/blank.gif\" name=\"avatar\" align=\"middle\" alt=\"\" />");
}
// ---- AVATAR

// ---- SHORT-USER
if ($short_user=="yes") {
   $m->add_field('user_icq', translate("Your ICQ"),StripSlashes($user_icq),'text',false,15,"","");
   $m->add_field('user_aim', translate("Your AIM"),StripSlashes($user_aim),'text',false,18,"","");
   $m->add_field('user_yim', translate("Your YIM"),StripSlashes($user_yim),'text',false,50,"","");
   $m->add_field('user_msnm', translate("Your MSNM"),StripSlashes($user_msnm),'text',false,50,"","");
}
// ---- SHORT-USER

$m->add_field('user_from', translate("Your Location"),StripSlashes($user_from),'text',false,100,"","");
$m->add_field('user_occ', translate("Your Occupation"),StripSlashes($user_occ),'text',false,100,"","");
$m->add_field('user_intrest', translate("Your Interest"),StripSlashes($user_intrest),'text',false,150,"","");
$m->add_checkbox('user_viewemail',translate("Allow other users to view my email address"), "1", false, false);
$m->add_field('user_sig', translate("Signature"),StripSlashes($user_sig),'textarea',false,255,7,"","");

// --- MEMBER-PASS
if ($memberpass) {
   $m->add_field('pass', translate("Password"),"",'password',true,40,"","");
   $m->add_field('vpass', translate("Retype Password"),"",'password',true,40,"","");
}
// --- MEMBER-PASS

// --- CHARTE du SITE
$m->add_checkbox('user_lnl',translate("Register to web site' mailing list"), "1", false, true);
$m->add_checkbox('charte','<a href="static.php?op=charte.html" target="_blank" class="ROUGE">'.translate("You must accept the terms of use of this website").'</a>', "1", false, false);
// --- CHARTE du SITE

// --- EXTENDER
if (file_exists("modules/sform/extend-user/extender/formulaire.php")) {
   $m->add_extra("<tr><td colspan=\"2\">&nbsp;</td></tr>");
   include("modules/sform/extend-user/extender/formulaire.php");
}
// --- EXTENDER

// ----------------------------------------------------------------
// CES CHAMPS sont indispensables --- Don't remove these fields
// Champ Hidden
// $m->add_field("op","","new user",'hidden',false);
$m->add_field("op","","new user",'hidden',false);
// extra
$m->add_extra("<tr><td align=\"center\" colspan=\"2\">");
// Reset bouton
$m->add_field('Reset',"",translate("Cancel"),'reset',false);
$m->add_extra(" ");
// Submit bouton
$m->add_field('Submit',"",translate("Submit"),'submit',false);
$m->add_extra("</td></tr>");
// ----------------------------------------------------------------
?>