2002-11-11 10:26:40 +00:00
|
|
|
<?php
|
2007-09-23 19:19:37 +00:00
|
|
|
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
|
|
|
|
|
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-10-28 07:27:15 +00:00
|
|
|
echo "<p>
|
2005-10-28 20:03:30 +00:00
|
|
|
<b>".tr(CREATE_AC_USE_CLIENT)."</b>
|
2005-10-28 07:27:15 +00:00
|
|
|
";
|
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\">
|
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 {
|
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 "
|
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-09-23 19:19:37 +00:00
|
|
|
tr(AC_INVITE_CODE)."<br><span class=\"description\">".tr(AC_INVITE_CODE_DESC)."</span>",
|
|
|
|
"<input name=\"invite_code\" size=\"30\">"
|
2006-05-27 21:41:36 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2004-05-11 22:49:23 +00:00
|
|
|
row2(
|
2007-09-23 19:19:37 +00:00
|
|
|
tr(CREATE_AC_NAME)."<br><span class=\"description\">".tr(CREATE_AC_NAME_DESC)."</span>",
|
|
|
|
"<input name=\"new_name\" size=\"30\">"
|
2004-05-11 22:49:23 +00:00
|
|
|
);
|
|
|
|
row2(
|
2007-09-23 19:19:37 +00:00
|
|
|
tr(CREATE_AC_EMAIL)."<br><span class=\"description\">".tr(CREATE_AC_EMAIL_DESC)."</span>",
|
|
|
|
"<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(
|
|
|
|
tr(CREATE_AC_PASSWORD)
|
2007-09-23 19:19:37 +00:00
|
|
|
."<br><span class=\"description\">"
|
2005-12-04 23:39:09 +00:00
|
|
|
.sprintf(tr(CREATE_AC_PASSWORD_DESC), $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-09-23 19:19:37 +00:00
|
|
|
row2(tr(CREATE_AC_CONFIRM_PASSWORD), "<input type=\"password\" name=\"passwd2\">");
|
2004-05-11 22:49:23 +00:00
|
|
|
row2_init(
|
2007-09-23 19:19:37 +00:00
|
|
|
tr(CREATE_AC_COUNTRY)."<br><span class=\"description\">".tr(CREATE_AC_COUNTRY_DESC)."</span>",
|
|
|
|
"<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-09-23 19:19:37 +00:00
|
|
|
tr(CREATE_AC_ZIP)."<br><span class=\"description\">".tr(OPTIONAL).".</span>",
|
|
|
|
"<input name=\"postal_code\" size=\"20\">"
|
2004-05-11 22:49:23 +00:00
|
|
|
);
|
|
|
|
row2("",
|
2007-09-23 19:19:37 +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
|
|
|
?>
|