2002-11-11 10:26:40 +00:00
< ? php
2007-09-23 19:19:37 +00:00
2004-02-02 23:34:39 +00:00
require_once ( '../inc/db.inc' );
require_once ( '../inc/util.inc' );
2004-03-26 18:32:57 +00:00
require_once ( '../inc/countries.inc' );
2005-02-11 22:08:56 +00:00
require_once ( '../inc/translation.inc' );
2004-03-26 18:32:57 +00:00
2007-11-02 14:43:02 +00:00
page_head ( tra ( " Create an account " ));
2002-11-11 10:26:40 +00:00
2004-06-30 18:53:35 +00:00
$config = get_config ();
2004-11-12 22:50:58 +00:00
if ( parse_bool ( $config , " disable_account_creation " )) {
2003-09-02 03:54:30 +00:00
echo "
2007-11-02 14:43:02 +00:00
< h1 > " .tra( " Account creation is disabled " ). " </ h1 >
2008-02-13 19:02:44 +00:00
< p > " .tra( " Account creation is currently disabled . Please try again later . " ). " </ p >
2003-09-02 03:54:30 +00:00
" ;
page_tail ();
exit ();
}
2008-02-13 19:54:54 +00:00
$next_url = get_str ( 'next_url' , true );
2008-02-13 19:02:44 +00:00
$wac = parse_bool ( $config , " web_account_creation " );
if ( ! $wac ) {
echo " <p>
< b > " .tra( " NOTE : If you use BOINC version 5.2 + with the BOINC Manager , don ' t use this form . Just run BOINC , select Attach Project , and enter an email address and password . " ). " </ b ></ p >
" ;
}
2003-09-02 03:54:30 +00:00
echo "
2005-10-28 07:27:15 +00:00
< p >
2007-09-23 19:19:37 +00:00
< form action = \ " create_account_action.php \" method= \" post \" >
2008-02-13 19:54:54 +00:00
< input type = hidden name = next_url value = \ " $next_url\ " >
2003-09-02 03:54:30 +00:00
" ;
2005-02-13 06:13:33 +00:00
$teamid = get_int ( " teamid " , true );
2004-10-16 04:12:11 +00:00
if ( $teamid ) {
$team = lookup_team ( $teamid );
$user = lookup_user_id ( $team -> userid );
2004-10-15 23:46:24 +00:00
if ( ! $user ) {
echo " No such user " ;
} else {
2007-11-02 14:43:02 +00:00
echo " <b> " . tra ( " This account will belong to the team %1 and will have the project preferences of its founder. " , " <a href= \" team_display.php?teamid= $team->id\ " > $team -> name </ a > " ). " </ b >< p > " ;
2004-10-15 23:46:24 +00:00
echo "
2007-09-23 19:19:37 +00:00
< input type = \ " hidden \" name= \" teamid \" value= \" $teamid\ " >
2004-10-15 23:46:24 +00:00
" ;
}
2003-09-02 03:54:30 +00:00
}
2004-05-11 22:49:23 +00:00
start_table ();
2006-05-27 21:41:36 +00:00
// Using invitation codes to restrict access?
//
if ( defined ( 'INVITE_CODES' )) {
row2 (
2007-11-02 14:43:02 +00:00
tra ( " Invitation Code " ) . " <br><span class= \" description \" > " . tra ( " A valid invitation code is required to create an account. " ) . " </span> " ,
2007-09-23 19:19:37 +00:00
" <input name= \" invite_code \" size= \" 30 \" > "
2006-05-27 21:41:36 +00:00
);
}
2004-05-11 22:49:23 +00:00
row2 (
2007-11-02 14:43:02 +00:00
tra ( " Name " ) . " <br><span class= \" description \" > " . tra ( " Identifies you on our web site. Use your real name or a nickname. " ) . " </span> " ,
2007-09-23 19:19:37 +00:00
" <input name= \" new_name \" size= \" 30 \" > "
2004-05-11 22:49:23 +00:00
);
row2 (
2007-11-02 14:43:02 +00:00
tra ( " Email Address " ) . " <br><span class= \" description \" > " . tra ( " Must be a valid address of the form 'name@domain'. " ) . " </span> " ,
2007-09-23 19:19:37 +00:00
" <input name= \" new_email_addr \" size= \" 50 \" > "
2004-05-11 22:49:23 +00:00
);
2005-10-12 22:51:55 +00:00
$min_passwd_length = parse_element ( $config , " <min_passwd_length> " );
if ( ! $min_passwd_length ) {
$min_passwd_length = 6 ;
}
2005-12-04 23:39:09 +00:00
row2 (
2007-11-02 14:43:02 +00:00
tra ( " Password " )
. " <br><span class= \" description \" > " . tra ( " Must be at least %1 characters " , $min_passwd_length ) . " </span> " ,
2007-09-23 19:19:37 +00:00
" <input type= \" password \" name= \" passwd \" > "
2005-10-12 22:51:55 +00:00
);
2007-11-02 14:43:02 +00:00
row2 ( tra ( " Confirm password " ), " <input type= \" password \" name= \" passwd2 \" > " );
2004-05-11 22:49:23 +00:00
row2_init (
2007-11-02 14:43:02 +00:00
tra ( " Country " ) . " <br><span class= \" description \" > " . tra ( " Select the country you want to represent, if any. " ) . " </span> " ,
2007-09-23 19:19:37 +00:00
" <select name= \" country \" > "
2004-05-11 22:49:23 +00:00
);
2003-09-02 03:54:30 +00:00
print_country_select ();
2004-05-11 22:49:23 +00:00
echo " </select></td></tr> \n " ;
row2 (
2007-11-02 14:43:02 +00:00
tra ( " Postal or ZIP Code " ) . " <br><span class= \" description \" > " . tra ( " Optional " ) . " </span> " ,
2007-09-23 19:19:37 +00:00
" <input name= \" postal_code \" size= \" 20 \" > "
2004-05-11 22:49:23 +00:00
);
row2 ( " " ,
2007-11-02 14:43:02 +00:00
" <input type= \" submit \" value= \" " . tra ( " Create account " ) . " \" > "
2004-05-11 22:49:23 +00:00
);
end_table ();
2003-09-02 03:54:30 +00:00
echo "
</ form >
" ;
2002-11-11 10:26:40 +00:00
2008-02-13 19:02:44 +00:00
$cvs_version_tracker [] = " \$ Id $ " ; //Generated automatically - do not edit
2003-08-15 01:01:00 +00:00
page_tail ();
2002-11-11 10:26:40 +00:00
?>