2002-11-11 10:26:40 +00:00
|
|
|
<?php
|
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
|
|
|
|
2005-10-12 22:51:55 +00:00
|
|
|
// Web-based interface for account creation.
|
|
|
|
// This isn't needed for people who use the version 5 Manager's
|
|
|
|
// "attach project wizard".
|
|
|
|
// But (for the time being at least)
|
|
|
|
// it's needed for pre-version 5 clients,
|
|
|
|
// and clients that don't use the account manager
|
|
|
|
|
2003-08-15 01:01:00 +00:00
|
|
|
db_init();
|
2005-02-11 22:08:56 +00:00
|
|
|
page_head(tr(CREATE_AC_TITLE));
|
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 "
|
2005-02-21 18:02:56 +00:00
|
|
|
<h1>".tr(CREATE_AC_DISABLED)."</h1>
|
|
|
|
<p>".tr(CREATE_AC_DISABLED_TEXT)."
|
2003-09-02 03:54:30 +00:00
|
|
|
</p>
|
|
|
|
";
|
|
|
|
page_tail();
|
|
|
|
exit();
|
|
|
|
}
|
2005-04-02 18:37:22 +00:00
|
|
|
echo "<p><b>";
|
|
|
|
printf(tr(CREATE_AC_READ_RULES), "<a href=info.php>".tr(RULES_TITLE)."</a>");
|
2003-09-02 03:54:30 +00:00
|
|
|
echo "
|
2005-10-12 22:51:55 +00:00
|
|
|
</b><p>
|
2003-09-02 03:54:30 +00:00
|
|
|
<form action=create_account_action.php method=post>
|
|
|
|
";
|
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 {
|
2005-02-21 18:02:56 +00:00
|
|
|
echo "<b>";
|
2005-04-02 18:37:22 +00:00
|
|
|
printf(tr(CREATE_AC_TEAM), "<a href=\"team_display.php?teamid=$team->id\">$team->name</a>");
|
|
|
|
echo "</b> <p> ";
|
2004-10-15 23:46:24 +00:00
|
|
|
echo "
|
2004-10-16 04:12:11 +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();
|
|
|
|
row2(
|
2005-02-11 22:08:56 +00:00
|
|
|
tr(CREATE_AC_NAME)."<br><span class=description>".tr(CREATE_AC_NAME_DESC)."</span>",
|
2004-05-11 22:49:23 +00:00
|
|
|
"<input name=new_name size=30>"
|
|
|
|
);
|
|
|
|
row2(
|
2005-02-11 22:08:56 +00:00
|
|
|
tr(CREATE_AC_EMAIL)."<br><span class=description>".tr(CREATE_AC_EMAIL_DESC)."</span>",
|
2004-05-11 22:49:23 +00:00
|
|
|
"<input name=new_email_addr size=50>"
|
|
|
|
);
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
row2("Password
|
|
|
|
<br><font size=-2>Must be at least $min_passwd_length characters</font>",
|
|
|
|
"<input type=password name=passwd>"
|
|
|
|
);
|
|
|
|
row2("Confirm password", "<input type=password name=passwd2>");
|
2004-05-11 22:49:23 +00:00
|
|
|
row2_init(
|
2005-02-11 22:08:56 +00:00
|
|
|
tr(CREATE_AC_COUNTRY)."<br><span class=description>".tr(CREATE_AC_COUNTRY_DESC)."</span>",
|
2004-05-11 22:49:23 +00:00
|
|
|
"<select name=country>"
|
|
|
|
);
|
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(
|
2005-02-11 22:08:56 +00:00
|
|
|
tr(CREATE_AC_ZIP)."<br><span class=description>".tr(OPTIONAL).".</span>",
|
2004-05-11 22:49:23 +00:00
|
|
|
"<input name=postal_code size=20>"
|
|
|
|
);
|
|
|
|
row2("",
|
2005-02-11 22:08:56 +00:00
|
|
|
"<input type=submit value='".tr(CREATE_AC_CREATE)."'>"
|
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
|
|
|
|
2003-08-15 01:01:00 +00:00
|
|
|
page_tail();
|
2002-11-11 10:26:40 +00:00
|
|
|
?>
|
2003-07-22 20:45:42 +00:00
|
|
|
|