diff options
Diffstat (limited to 'web/lib/acctfuncs.inc.php')
-rw-r--r-- | web/lib/acctfuncs.inc.php | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index b2f0548e..3bdd8d0c 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -39,34 +39,34 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="", print "<tr><td colspan='2'> </td></tr>\n"; print "<tr>"; - print "<td align='left'>".__("Username").":</td>"; + print "<td align='left'>"._("Username").":</td>"; print "<td align='left'><input type='text' size='30' maxlength='64'"; - print " name='U' value='".htmlspecialchars($U,ENT_QUOTES)."' /> (".__("required").")</td>"; + print " name='U' value='".htmlspecialchars($U,ENT_QUOTES)."' /> ("._("required").")</td>"; print "</tr>\n"; # Only TUs or Devs can promote/demote/suspend a user if ($UTYPE == "Trusted User" || $UTYPE == "Developer") { print "<tr>"; - print "<td align='left'>".__("Account Type").":</td>"; + print "<td align='left'>"._("Account Type").":</td>"; print "<td align='left'><select name=T>\n"; print "<option value='1'"; $T == "User" ? print " selected>" : print ">"; - print __("Normal user")."\n"; + print _("Normal user")."\n"; print "<option value='2'"; $T == "Trusted User" ? print " selected>" : print ">"; - print __("Trusted user")."\n"; + print _("Trusted user")."\n"; # Only developers can make another account a developer if ($UTYPE == "Developer") { print "<option value='3'"; $T == "Developer" ? print " selected>" : print ">"; - print __("Developer")."\n"; + print _("Developer")."\n"; } print "</select></td>"; print "</tr>\n"; print "<tr>"; - print "<td align='left'>".__("Account Suspended").":</td>"; + print "<td align='left'>"._("Account Suspended").":</td>"; print "<td align='left'><input type='checkbox' name='S'"; if ($S) { print " checked=\"checked\" />"; @@ -77,43 +77,43 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="", } print "<tr>"; - print "<td align='left'>".__("Email Address").":</td>"; + print "<td align='left'>"._("Email Address").":</td>"; print "<td align='left'><input type='text' size='30' maxlength='64'"; - print " name='E' value='".htmlspecialchars($E,ENT_QUOTES)."' /> (".__("required").")</td>"; + print " name='E' value='".htmlspecialchars($E,ENT_QUOTES)."' /> ("._("required").")</td>"; print "</tr>\n"; print "<tr>"; - print "<td align='left'>".__("Password").":</td>"; + print "<td align='left'>"._("Password").":</td>"; print "<td align='left'><input type='password' size='30' maxlength='32'"; print " name='P' value='".$P."' />"; if ($A != "UpdateAccount") { - print " (".__("required").")"; + print " ("._("required").")"; } print "</td></tr>\n"; print "<tr>"; - print "<td align='left'>".__("Re-type password").":</td>"; + print "<td align='left'>"._("Re-type password").":</td>"; print "<td align='left'><input type='password' size='30' maxlength='32'"; print " name='C' value='".$C."' />"; if ($A != "UpdateAccount") { - print " (".__("required").")"; + print " ("._("required").")"; } print "</td></tr>\n"; print "<tr>"; - print "<td align='left'>".__("Real Name").":</td>"; + print "<td align='left'>"._("Real Name").":</td>"; print "<td align='left'><input type='text' size='30' maxlength='32'"; print " name='R' value='".htmlspecialchars($R,ENT_QUOTES)."' /></td>"; print "</tr>\n"; print "<tr>"; - print "<td align='left'>".__("IRC Nick").":</td>"; + print "<td align='left'>"._("IRC Nick").":</td>"; print "<td align='left'><input type='text' size='30' maxlength='32'"; print " name='I' value='".htmlspecialchars($I,ENT_QUOTES)."' /></td>"; print "</tr>\n"; print "<tr>"; - print "<td align='left'>".__("Language").":</td>"; + print "<td align='left'>"._("Language").":</td>"; print "<td align='left'><select name=L>\n"; reset($SUPPORTED_LANGS); @@ -134,12 +134,12 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="", if ($A == "UpdateAccount") { print "<input type='submit' class='button'"; - print " value='".__("Update")."' /> "; + print " value='"._("Update")."' /> "; } else { print "<input type='submit' class='button'"; - print " value='".__("Create")."' /> "; + print " value='"._("Create")."' /> "; } - print "<input type='reset' class='button' value='".__("Reset")."' />"; + print "<input type='reset' class='button' value='"._("Reset")."' />"; print "</td>"; print "</tr>\n"; @@ -181,44 +181,44 @@ function process_account_form($UTYPE,$TYPE,$A,$U="",$T="",$S="",$E="", $dbh = db_connect(); $error = ""; if (empty($E) || empty($U)) { - $error = __("Missing a required field."); + $error = _("Missing a required field."); } if ($TYPE == "new") { # they need password fields for this type of action # if (empty($P) || empty($C)) { - $error = __("Missing a required field."); + $error = _("Missing a required field."); } } else { if (!$UID) { - $error = __("Missing User ID"); + $error = _("Missing User ID"); } } if (!$error && !valid_username($U) && !user_is_privileged($editor_user)) - $error = __("The username is invalid.") . "<ul>\n" - ."<li>" . __("It must be between %s and %s characters long", + $error = _("The username is invalid.") . "<ul>\n" + ."<li>" . _("It must be between %s and %s characters long", USERNAME_MIN_LEN, USERNAME_MAX_LEN ) . "</li>" - . "<li>" . __("Start and end with a letter or number") . "</li>" - . "<li>" . __("Can contain only one period, underscore or hyphen.") + . "<li>" . _("Start and end with a letter or number") . "</li>" + . "<li>" . _("Can contain only one period, underscore or hyphen.") . "</li>\n</ul>"; if (!$error && $P && $C && ($P != $C)) { - $error = __("Password fields do not match."); + $error = _("Password fields do not match."); } if (!$error && $P != '' && !good_passwd($P)) - $error = __("Your password must be at least %s characters.",PASSWD_MIN_LEN); + $error = _("Your password must be at least %s characters.",PASSWD_MIN_LEN); if (!$error && !valid_email($E)) { - $error = __("The email address is invalid."); + $error = _("The email address is invalid."); } if ($UTYPE == "Trusted User" && $T == 3) { - $error = __("A Trusted User cannot assign Developer status."); + $error = _("A Trusted User cannot assign Developer status."); } if (!$error && !array_key_exists($L, $SUPPORTED_LANGS)) { - $error = __("Language is not currently supported."); + $error = _("Language is not currently supported."); } if (!$error) { # check to see if this username is available @@ -233,7 +233,7 @@ function process_account_form($UTYPE,$TYPE,$A,$U="",$T="",$S="",$E="", if ($result) { $row = mysql_fetch_array($result); if ($row[0]) { - $error = __("The username, %h%s%h, is already in use.", + $error = _("The username, %h%s%h, is already in use.", "<b>", htmlspecialchars($U,ENT_QUOTES), "</b>"); } } @@ -251,7 +251,7 @@ function process_account_form($UTYPE,$TYPE,$A,$U="",$T="",$S="",$E="", if ($result) { $row = mysql_fetch_array($result); if ($row[0]) { - $error = __("The address, %h%s%h, is already in use.", + $error = _("The address, %h%s%h, is already in use.", "<b>", htmlspecialchars($E,ENT_QUOTES), "</b>"); } } @@ -273,15 +273,15 @@ function process_account_form($UTYPE,$TYPE,$A,$U="",$T="",$S="",$E="", "VALUES (1, 0, '" . implode("', '", $escaped) . "')"; $result = db_query($q, $dbh); if (!$result) { - print __("Error trying to create account, %h%s%h: %s.", + print _("Error trying to create account, %h%s%h: %s.", "<b>", htmlspecialchars($U,ENT_QUOTES), "</b>", mysql_error($dbh)); } else { # account created/modified, tell them so. # - print __("The account, %h%s%h, has been successfully created.", + print _("The account, %h%s%h, has been successfully created.", "<b>", htmlspecialchars($U,ENT_QUOTES), "</b>"); print "<p>\n"; - print __("Click on the Home link above to login."); + print _("Click on the Home link above to login."); print "</p>\n"; } @@ -310,10 +310,10 @@ function process_account_form($UTYPE,$TYPE,$A,$U="",$T="",$S="",$E="", $q.= " WHERE ID = ".intval($UID); $result = db_query($q, $dbh); if (!$result) { - print __("Error trying to modify account, %h%s%h: %s.", + print _("Error trying to modify account, %h%s%h: %s.", "<b>", htmlspecialchars($U,ENT_QUOTES), "</b>", mysql_error($dbh)); } else { - print __("The account, %h%s%h, has been successfully modified.", + print _("The account, %h%s%h, has been successfully modified.", "<b>", htmlspecialchars($U,ENT_QUOTES), "</b>"); } } @@ -411,7 +411,7 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", $result = db_query($q, $dbh); if (!$result) { - print __("No results matched your search criteria."); + print _("No results matched your search criteria."); } else { $num_rows = mysql_num_rows($result); if ($num_rows) { @@ -424,19 +424,19 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", print " cellspacing='0' width='100%'>\n"; print "<tr>"; print "<th class='header'>"; - print "<span class='f2'>".__("Username")."</span></th>"; + print "<span class='f2'>"._("Username")."</span></th>"; print "<th class='header'>"; - print "<span class='f2'>".__("Type")."</span></th>"; + print "<span class='f2'>"._("Type")."</span></th>"; print "<th class='header'>"; - print "<span class='f2'>".__("Status")."</span></th>"; + print "<span class='f2'>"._("Status")."</span></th>"; print "<th class='header'>"; - print "<span class='f2'>".__("Real Name")."</span></th>"; + print "<span class='f2'>"._("Real Name")."</span></th>"; print "<th class='header'>"; - print "<span class='f2'>".__("IRC Nick")."</span></th>"; + print "<span class='f2'>"._("IRC Nick")."</span></th>"; print "<th class='header'>"; - print "<span class='f2'>".__("Last Voted")."</span></th>"; + print "<span class='f2'>"._("Last Voted")."</span></th>"; print "<th class='header'>"; - print "<span class='f2'>".__("Edit Account")."</span></th>"; + print "<span class='f2'>"._("Edit Account")."</span></th>"; print "</tr>\n"; $i = 0; while ($row = mysql_fetch_assoc($result)) { @@ -453,9 +453,9 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", print "</span></td>"; print "<td class='".$c."'><span class='f5'>"; if ($row["Suspended"]) { - print __("Suspended"); + print _("Suspended"); } else { - print __("Active"); + print _("Active"); } print "</span></td>"; print "<td class='".$c."'><span class='f5'>"; @@ -467,7 +467,7 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", print "<td class='".$c."'><span class='f5'>"; $row["LastVoted"] ? print date("Ymd", $row["LastVoted"]) - : print __("Never"); + : print _("Never"); print "</span></td>"; print "<td class='".$c."'><span class='f5'>"; if ($UTYPE == "Trusted User" && $row["AccountType"] == "Developer") { @@ -498,7 +498,7 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", print " value='".${$ind}."' />\n"; } print "<input type='submit' class='button'"; - print " value='<-- ".__("Less")."' />"; + print " value='<-- "._("Less")."' />"; print "</fieldset>"; print "</form>\n"; print "</td>"; @@ -514,7 +514,7 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", print " value='".${$ind}."' />\n"; } print "<input type='submit' class='button'"; - print " value='".__("More")." -->' />"; + print " value='"._("More")." -->' />"; print "</fieldset>"; print "</form>\n"; print "</td>"; @@ -522,7 +522,7 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", print "</table>\n"; } else { print "<p style=\"text-align:center;\">\n"; - print __("No more results to display."); + print _("No more results to display."); print "</p>\n"; } } @@ -546,40 +546,40 @@ function display_account_info($U="", $T="", $E="", $R="", $I="") { print " </tr>\n"; print " <tr>\n"; - print " <td align='left'>".__("Username").":</td>\n"; + print " <td align='left'>"._("Username").":</td>\n"; print " <td align='left'>".$U."</td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <td align='left'>".__("Account Type").":</td>\n"; + print " <td align='left'>"._("Account Type").":</td>\n"; print " <td align='left'>"; if ($T == "User") { - print __("User"); + print _("User"); } elseif ($T == "Trusted User") { - print __("Trusted User"); + print _("Trusted User"); } elseif ($T == "Developer") { - print __("Developer"); + print _("Developer"); } print " </td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <td align='left'>".__("Email Address").":</td>\n"; + print " <td align='left'>"._("Email Address").":</td>\n"; print " <td align='left'><a href='mailto:".htmlspecialchars($E,ENT_QUOTES)."'>".htmlspecialchars($E,ENT_QUOTES)."</a></td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <td align='left'>".__("Real Name").":</td>\n"; + print " <td align='left'>"._("Real Name").":</td>\n"; print " <td align='left'>".htmlspecialchars($R,ENT_QUOTES)."</td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <td align='left'>".__("IRC Nick").":</td>\n"; + print " <td align='left'>"._("IRC Nick").":</td>\n"; print " <td align='left'>".htmlspecialchars($I,ENT_QUOTES)."</td>\n"; print " </tr>\n"; print " <tr>\n"; - print " <td colspan='2'><a href='packages.php?K=".$U."&SeB=m'>".__("View this user's packages")."</a></td>\n"; + print " <td colspan='2'><a href='packages.php?K=".$U."&SeB=m'>"._("View this user's packages")."</a></td>\n"; print " </tr>\n"; print "</table>\n"; @@ -668,7 +668,7 @@ function try_login() { } } else { - $login_error = __("Bad username or password."); + $login_error = _("Bad username or password."); } } return array('SID' => $new_sid, 'error' => $login_error); |