Commit 6102759b authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Use echo shortcut syntax



Replace all occurrences of "<?php echo" and "<?php print" by "<?=" to
reduce noise in templates.

Note that as of PHP 5.4.0, "<?=" is always available and no longer
requires "short_open_tag" to be set.
Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent 964ea083
...@@ -17,6 +17,8 @@ ALTER TABLE Users ADD COLUMN PGPKey VARCHAR(40) NULL DEFAULT NULL; ...@@ -17,6 +17,8 @@ ALTER TABLE Users ADD COLUMN PGPKey VARCHAR(40) NULL DEFAULT NULL;
4. Enable the PDO MySQL extension (pdo_mysql.so) in "php.ini". 4. Enable the PDO MySQL extension (pdo_mysql.so) in "php.ini".
5. Upgrade to PHP>=5.4.0 or enable "short_open_tag" in "php.ini".
From 1.9.0 to 1.9.1 From 1.9.0 to 1.9.1
------------------- -------------------
......
...@@ -62,29 +62,29 @@ if ($atype == "Trusted User" || $atype == "Developer") { ...@@ -62,29 +62,29 @@ if ($atype == "Trusted User" || $atype == "Developer") {
?> ?>
<?php if (!empty($error)): ?> <?php if (!empty($error)): ?>
<p style="color: red;" class="pkgoutput"><?php print $error ?></p> <p style="color: red;" class="pkgoutput"><?= $error ?></p>
<?php endif; ?> <?php endif; ?>
<div class="box"> <div class="box">
<h2><?php print __("Submit a proposal to vote on.") ?></h2> <h2><?= __("Submit a proposal to vote on.") ?></h2>
<form action="<?php echo get_uri('/addvote/'); ?>" method="post"> <form action="<?= get_uri('/addvote/'); ?>" method="post">
<p> <p>
<b><?php print __("Applicant/TU") ?></b> <b><?= __("Applicant/TU") ?></b>
<input type="text" name="user" value="<?php if (!empty($_POST['user'])) { print htmlentities($_POST['user'], ENT_QUOTES); } ?>" /> <input type="text" name="user" value="<?php if (!empty($_POST['user'])) { print htmlentities($_POST['user'], ENT_QUOTES); } ?>" />
<?php print __("(empty if not applicable)") ?> <?= __("(empty if not applicable)") ?>
</p> </p>
<p> <p>
<b><?php print __("Length in days") ?></b> <b><?= __("Length in days") ?></b>
<input type="text" name="length" value="<?php if (!empty($_POST['length'])) { print htmlentities($_POST['length'], ENT_QUOTES); } ?>" /> <input type="text" name="length" value="<?php if (!empty($_POST['length'])) { print htmlentities($_POST['length'], ENT_QUOTES); } ?>" />
<?php print __("(defaults to 7 if empty)") ?> <?= __("(defaults to 7 if empty)") ?>
</p> </p>
<p> <p>
<b><?php print __("Proposal") ?></b><br /> <b><?= __("Proposal") ?></b><br />
<textarea name="agenda" rows="15" cols="80"><?php if (!empty($_POST['agenda'])) { print htmlentities($_POST['agenda']); } ?></textarea><br /> <textarea name="agenda" rows="15" cols="80"><?php if (!empty($_POST['agenda'])) { print htmlentities($_POST['agenda']); } ?></textarea><br />
<input type="hidden" name="addVote" value="1" /> <input type="hidden" name="addVote" value="1" />
<input type="hidden" name="token" value="<?php print htmlspecialchars($_COOKIE['AURSID']) ?>" /> <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
<input type="submit" class="button" value="<?php print __("Submit"); ?>" /> <input type="submit" class="button" value="<?= __("Submit"); ?>" />
</p> </p>
</form> </form>
</div> </div>
......
...@@ -17,7 +17,7 @@ $dbh = db_connect(); ...@@ -17,7 +17,7 @@ $dbh = db_connect();
<div id="content-left-wrapper"> <div id="content-left-wrapper">
<div id="content-left"> <div id="content-left">
<div id="intro" class="box"> <div id="intro" class="box">
<h2>AUR <?php print __("Home"); ?></h2> <h2>AUR <?= __("Home"); ?></h2>
<p> <p>
<?php <?php
echo __( echo __(
...@@ -40,11 +40,11 @@ $dbh = db_connect(); ...@@ -40,11 +40,11 @@ $dbh = db_connect();
?> ?>
</p> </p>
<p> <p>
<?php echo __('Remember to vote for your favourite packages!'); ?> <?= __('Remember to vote for your favourite packages!'); ?>
<?php echo __('Some packages may be provided as binaries in [community].'); ?> <?= __('Some packages may be provided as binaries in [community].'); ?>
</p> </p>
<p> <p>
<h4><?php echo __('Discussion') ?></h4> <h4><?= __('Discussion') ?></h4>
<?php <?php
echo __( echo __(
'General discussion regarding the Arch User Repository (AUR) and Trusted User structure takes place on %saur-general%s. This list can be used for package orphan requests, merge requests, and deletion requests. For discussion relating to the development of the AUR, use the %saur-dev%s mailing list.', 'General discussion regarding the Arch User Repository (AUR) and Trusted User structure takes place on %saur-general%s. This list can be used for package orphan requests, merge requests, and deletion requests. For discussion relating to the development of the AUR, use the %saur-dev%s mailing list.',
...@@ -55,7 +55,7 @@ $dbh = db_connect(); ...@@ -55,7 +55,7 @@ $dbh = db_connect();
); );
?> ?>
</p> </p>
<h4><?php echo __('Bug Reporting') ?></h4> <h4><?= __('Bug Reporting') ?></h4>
<?php <?php
echo __( echo __(
'If you find a bug in the AUR, please fill out a bug report on our %sbug tracker%s. Use the tracker to report bugs in the AUR %sonly%s. To report packaging bugs contact the package maintainer or leave a comment on the appropriate package page.', 'If you find a bug in the AUR, please fill out a bug report on our %sbug tracker%s. Use the tracker to report bugs in the AUR %sonly%s. To report packaging bugs contact the package maintainer or leave a comment on the appropriate package page.',
...@@ -68,9 +68,9 @@ $dbh = db_connect(); ...@@ -68,9 +68,9 @@ $dbh = db_connect();
</p> </p>
<div class="important"> <div class="important">
<b><?php echo __('DISCLAIMER') ?> :</b> <b><?= __('DISCLAIMER') ?> :</b>
<br /> <br />
<?php echo __('Unsupported packages are user produced content. Any use of the provided files is at your own risk.'); ?> <?= __('Unsupported packages are user produced content. Any use of the provided files is at your own risk.'); ?>
</div> </div>
</div> </div>
<?php if (!empty($_COOKIE["AURSID"])): ?> <?php if (!empty($_COOKIE["AURSID"])): ?>
...@@ -91,7 +91,7 @@ $dbh = db_connect(); ...@@ -91,7 +91,7 @@ $dbh = db_connect();
</div> </div>
<div id="content-right"> <div id="content-right">
<div id="pkgsearch" class="widget"> <div id="pkgsearch" class="widget">
<form id="pkgsearch-form" method="get" action="<?php echo get_uri('/packages/'); ?>"> <form id="pkgsearch-form" method="get" action="<?= get_uri('/packages/'); ?>">
<fieldset> <fieldset>
<label for="pkgsearch-field">Package Search:</label> <label for="pkgsearch-field">Package Search:</label>
<input type="hidden" name="O" value="0" /> <input type="hidden" name="O" value="0" />
......
...@@ -13,34 +13,34 @@ if (!$DISABLE_HTTP_LOGIN || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])) { ...@@ -13,34 +13,34 @@ if (!$DISABLE_HTTP_LOGIN || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])) {
html_header('AUR ' . __("Login")); html_header('AUR ' . __("Login"));
?> ?>
<div id="dev-login" class="box"> <div id="dev-login" class="box">
<h2>AUR <?php echo __('Login') ?></h2> <h2>AUR <?= __('Login') ?></h2>
<?php if (isset($_COOKIE["AURSID"])): ?> <?php if (isset($_COOKIE["AURSID"])): ?>
<p> <p>
<?php echo __("Logged-in as: %s", '<strong>' . username_from_sid($_COOKIE["AURSID"]) . '</strong>'); ?> <?= __("Logged-in as: %s", '<strong>' . username_from_sid($_COOKIE["AURSID"]) . '</strong>'); ?>
<a href="<?php get_uri('/logout/'); ?>">[<?php print __("Logout"); ?>]</a> <a href="<?php get_uri('/logout/'); ?>">[<?= __("Logout"); ?>]</a>
</p> </p>
<?php elseif (!$DISABLE_HTTP_LOGIN || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])): ?> <?php elseif (!$DISABLE_HTTP_LOGIN || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])): ?>
<form method="post" action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES) ?>"> <form method="post" action="<?= htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES) ?>">
<fieldset> <fieldset>
<legend><?php echo __('Enter login credentials') ?></legend> <legend><?= __('Enter login credentials') ?></legend>
<?php if (!empty($login_error)): ?> <?php if (!empty($login_error)): ?>
<ul class="errorlist"><li><?php echo $login_error ?></li></ul> <ul class="errorlist"><li><?= $login_error ?></li></ul>
<?php endif; ?> <?php endif; ?>
<p> <p>
<label for="id_username"><?php print __('Username') . ':'; ?></label> <label for="id_username"><?= __('Username') . ':'; ?></label>
<input id="id_username" type="text" name="user" size="30" maxlength="<?php print USERNAME_MAX_LEN; ?>" value="<?php if (isset($_POST['user'])) { print htmlspecialchars($_POST['user'], ENT_QUOTES); } ?>" /> <input id="id_username" type="text" name="user" size="30" maxlength="<?= USERNAME_MAX_LEN; ?>" value="<?php if (isset($_POST['user'])) { print htmlspecialchars($_POST['user'], ENT_QUOTES); } ?>" />
</p> </p>
<p> <p>
<label for="id_password"><?php print __('Password') . ':'; ?></label> <label for="id_password"><?= __('Password') . ':'; ?></label>
<input id="id_password" type="password" name="passwd" size="30" maxlength="<?php print PASSWD_MAX_LEN; ?>" /> <input id="id_password" type="password" name="passwd" size="30" maxlength="<?= PASSWD_MAX_LEN; ?>" />
</p> </p>
<p> <p>
<input type="checkbox" name="remember_me" id="id_remember_me" /> <input type="checkbox" name="remember_me" id="id_remember_me" />
<label for="id_remember_me"><?php print __("Remember me"); ?></label> <label for="id_remember_me"><?= __("Remember me"); ?></label>
</p> </p>
<p> <p>
<input type="submit" class="button" value="<?php print __("Login"); ?>" /> <input type="submit" class="button" value="<?php print __("Login"); ?>" />
<a href="<?php echo get_uri('/passreset/') ?>">[<?php echo __('Forgot Password') ?>]</a> <a href="<?= get_uri('/passreset/') ?>">[<?= __('Forgot Password') ?>]</a>
</p> </p>
</fieldset> </fieldset>
</form> </form>
......
...@@ -97,7 +97,7 @@ html_header($title); ...@@ -97,7 +97,7 @@ html_header($title);
?> ?>
<?php if ($output): ?> <?php if ($output): ?>
<p class="pkgoutput"><?php print $output ?></p> <p class="pkgoutput"><?= $output ?></p>
<?php endif; ?> <?php endif; ?>
<?php <?php
......
...@@ -66,10 +66,10 @@ html_header(__("Password Reset")); ...@@ -66,10 +66,10 @@ html_header(__("Password Reset"));
?> ?>
<div class="box"> <div class="box">
<h2><?php print __("Password Reset"); ?></h2> <h2><?= __("Password Reset"); ?></h2>
<?php if ($error): ?> <?php if ($error): ?>
<p><span class="error"><?php echo $error ?></span></p> <p><span class="error"><?= $error ?></span></p>
<?php endif;?> <?php endif;?>
<?php <?php
if ($step == 'confirm') { if ($step == 'confirm') {
...@@ -81,31 +81,31 @@ html_header(__("Password Reset")); ...@@ -81,31 +81,31 @@ html_header(__("Password Reset"));
<form action="" method="post"> <form action="" method="post">
<table> <table>
<tr> <tr>
<td><?php echo __("Confirm your e-mail address:"); ?></td> <td><?= __("Confirm your e-mail address:"); ?></td>
<td><input type="text" name="email" size="30" maxlength="64" /></td> <td><input type="text" name="email" size="30" maxlength="64" /></td>
</tr> </tr>
<tr> <tr>
<td><?php echo __("Enter your new password:"); ?></td> <td><?= __("Enter your new password:"); ?></td>
<td><input type="password" name="password" size="30" maxlength="32" /></td> <td><input type="password" name="password" size="30" maxlength="32" /></td>
</tr> </tr>
<tr> <tr>
<td><?php echo __("Confirm your new password:"); ?></td> <td><?= __("Confirm your new password:"); ?></td>
<td><input type="password" name="confirm" size="30" maxlength="32" /></td> <td><input type="password" name="confirm" size="30" maxlength="32" /></td>
</tr> </tr>
</table> </table>
<br /> <br />
<input type="submit" class="button" value="<?php echo __('Continue') ?>" /> <input type="submit" class="button" value="<?= __('Continue') ?>" />
</form> </form>
<?php <?php
} else { } else {
?> ?>
<p><?php echo __('If you have forgotten the e-mail address you used to register, please send a message to the %saur-general%s mailing list.', <p><?= __('If you have forgotten the e-mail address you used to register, please send a message to the %saur-general%s mailing list.',
'<a href="http://mailman.archlinux.org/mailman/listinfo/aur-general">', '<a href="http://mailman.archlinux.org/mailman/listinfo/aur-general">',
'</a>'); ?></p> '</a>'); ?></p>
<form action="" method="post"> <form action="" method="post">
<p><?php echo __("Enter your e-mail address:"); ?> <p><?= __("Enter your e-mail address:"); ?>
<input type="text" name="email" size="30" maxlength="64" /></p> <input type="text" name="email" size="30" maxlength="64" /></p>
<input type="submit" class="button" value="<?php echo __('Continue') ?>" /> <input type="submit" class="button" value="<?= __('Continue') ?>" />
</form> </form>
<?php } ?> <?php } ?>
</div> </div>
......
...@@ -436,12 +436,12 @@ html_header("Submit"); ...@@ -436,12 +436,12 @@ html_header("Submit");
?> ?>
<?php if ($error): ?> <?php if ($error): ?>
<p class="pkgoutput"><?php print $error ?></p> <p class="pkgoutput"><?= $error ?></p>
<?php endif; ?> <?php endif; ?>
<div class="box"> <div class="box">
<h2><?php echo __("Submit"); ?></h2> <h2><?= __("Submit"); ?></h2>
<p><?php echo __("Upload your source packages here. Create source packages with `makepkg --source`.") ?></p> <p><?= __("Upload your source packages here. Create source packages with `makepkg --source`.") ?></p>
<?php <?php
if (empty($_REQUEST['pkgsubmit']) || $error): if (empty($_REQUEST['pkgsubmit']) || $error):
...@@ -452,16 +452,16 @@ html_header("Submit"); ...@@ -452,16 +452,16 @@ html_header("Submit");
$pkg_categories = pkgCategories(); $pkg_categories = pkgCategories();
?> ?>
<form action="<?php echo get_uri('/submit/'); ?>" method="post" enctype="multipart/form-data"> <form action="<?= get_uri('/submit/'); ?>" method="post" enctype="multipart/form-data">
<fieldset> <fieldset>
<div> <div>
<input type="hidden" name="pkgsubmit" value="1" /> <input type="hidden" name="pkgsubmit" value="1" />
<input type="hidden" name="token" value="<?php print htmlspecialchars($_COOKIE['AURSID']) ?>" /> <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
</div> </div>
<p> <p>
<label for="id_category"><?php print __("Package Category"); ?>:</label> <label for="id_category"><?= __("Package Category"); ?>:</label>
<select id="id_category" name="category"> <select id="id_category" name="category">
<option value="1"><?php print __("Select Category"); ?></option> <option value="1"><?= __("Select Category"); ?></option>
<?php <?php
foreach ($pkg_categories as $num => $cat): foreach ($pkg_categories as $num => $cat):
print '<option value="' . $num . '"'; print '<option value="' . $num . '"';
...@@ -474,12 +474,12 @@ html_header("Submit"); ...@@ -474,12 +474,12 @@ html_header("Submit");
</select> </select>
</p> </p>
<p> <p>
<label for="id_file"><?php print __("Upload package file"); ?>:</label> <label for="id_file"><?= __("Upload package file"); ?>:</label>
<input id="id_file" type="file" name="pfile" size='30' /> <input id="id_file" type="file" name="pfile" size='30' />
</p> </p>
<p> <p>
<label></label> <label></label>
<input class="button" type="submit" value="<?php print __("Upload"); ?>" /> <input class="button" type="submit" value="<?= __("Upload"); ?>" />
</p> </p>
</fieldset> </fieldset>
</form> </form>
......
...@@ -116,17 +116,17 @@ if ($atype == "Trusted User" || $atype == "Developer") { ...@@ -116,17 +116,17 @@ if ($atype == "Trusted User" || $atype == "Developer") {
$nextresult = proposal_count(); $nextresult = proposal_count();
?> ?>
<div class="box"> <div class="box">
<p><a href="<?php echo get_uri('/addvote/'); ?>"><?php print __("Add Proposal") ?></a></p> <p><a href="<?= get_uri('/addvote/'); ?>"><?= __("Add Proposal") ?></a></p>
<?php if ($result): <?php if ($result):
$by = htmlentities($by, ENT_QUOTES); ?> $by = htmlentities($by, ENT_QUOTES); ?>
<?php if ($off != 0): <?php if ($off != 0):
$back = (($off - $limit) <= 0) ? 0 : $off - $limit; ?> $back = (($off - $limit) <= 0) ? 0 : $off - $limit; ?>
<a href='<?php echo get_uri('/tu/'); ?>?off=<?php print $back ?>&amp;by=<?php print $by ?>'><?php print __("Back") ?></a> <a href='<?= get_uri('/tu/'); ?>?off=<?= $back ?>&amp;by=<?= $by ?>'><?= __("Back") ?></a>
<?php endif; ?> <?php endif; ?>
<?php if (($off + $limit) < $nextresult): <?php if (($off + $limit) < $nextresult):
$forw = $off + $limit; ?> $forw = $off + $limit; ?>
<a href="<?php echo get_uri('/tu/'); ?>?off=<?php print $forw ?>&amp;by=<?php print $by ?>"><?php print __("Next") ?></a> <a href="<?= get_uri('/tu/'); ?>?off=<?= $forw ?>&amp;by=<?= $by ?>"><?= __("Next") ?></a>
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
</div> </div>
......
...@@ -15,11 +15,11 @@ if ($atype == 'Trusted User' || $atype== 'Developer'): ...@@ -15,11 +15,11 @@ if ($atype == 'Trusted User' || $atype== 'Developer'):
?> ?>
<div class="box"> <div class="box">
<h2>Votes for <a href="<?php echo get_pkg_uri(pkgname_from_id($pkgid)); ?>"><?php echo pkgname_from_id($pkgid) ?></a></h2> <h2>Votes for <a href="<?= get_pkg_uri(pkgname_from_id($pkgid)); ?>"><?= pkgname_from_id($pkgid) ?></a></h2>
<div class="boxbody"> <div class="boxbody">
<ul> <ul>
<?php while (list($indx, $row) = each($votes)): ?> <?php while (list($indx, $row) = each($votes)): ?>
<li><a href="<?php echo get_user_uri($row['Username']); ?>"><?php echo htmlspecialchars($row['Username']) ?></a></li> <li><a href="<?= get_user_uri($row['Username']); ?>"><?= htmlspecialchars($row['Username']) ?></a></li>
<?php endwhile; ?> <?php endwhile; ?>
</ul> </ul>
</div> </div>
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
</tr> </tr>
<tr> <tr>
<td align="left"><?php echo __("Username") . ":" ?></td> <td align="left"><?= __("Username") . ":" ?></td>
<td align="left"><?php echo $row["Username"] ?></td> <td align="left"><?= $row["Username"] ?></td>
</tr> </tr>
<tr> <tr>
<td align="left"><?php echo __("Account Type") . ":" ?></td> <td align="left"><?= __("Account Type") . ":" ?></td>
<td align="left"> <td align="left">
<?php <?php
if ($row["AccountType"] == "User") { if ($row["AccountType"] == "User") {
...@@ -24,34 +24,34 @@ ...@@ -24,34 +24,34 @@
</tr> </tr>
<tr> <tr>
<td align="left"><?php echo __("Email Address") . ":" ?></td> <td align="left"><?= __("Email Address") . ":" ?></td>
<td align="left"><a href="mailto:<?php echo htmlspecialchars($row["Email"], ENT_QUOTES) ?>"><?php echo htmlspecialchars($row["Email"], ENT_QUOTES) ?></a></td> <td align="left"><a href="mailto:<?= htmlspecialchars($row["Email"], ENT_QUOTES) ?>"><?= htmlspecialchars($row["Email"], ENT_QUOTES) ?></a></td>
</tr> </tr>
<tr> <tr>
<td align="left"><?php echo __("Real Name") . ":" ?></td> <td align="left"><?= __("Real Name") . ":" ?></td>
<td align="left"><?php echo htmlspecialchars($row["RealName"], ENT_QUOTES) ?></td> <td align="left"><?= htmlspecialchars($row["RealName"], ENT_QUOTES) ?></td>
</tr> </tr>
<tr> <tr>
<td align="left"><?php echo __("IRC Nick") . ":" ?></td> <td align="left"><?= __("IRC Nick") . ":" ?></td>
<td align="left"><?php echo htmlspecialchars($row["IRCNick"], ENT_QUOTES) ?></td> <td align="left"><?= htmlspecialchars($row["IRCNick"], ENT_QUOTES) ?></td>
</tr> </tr>
<tr> <tr>
<td align="left"><?php echo __("PGP Key Fingerprint") . ":" ?></td> <td align="left"><?= __("PGP Key Fingerprint") . ":" ?></td>
<td align="left"><?php echo html_format_pgp_fingerprint($row["PGPKey"]) ?></td> <td align="left"><?= html_format_pgp_fingerprint($row["PGPKey"]) ?></td>
</tr> </tr>
<tr> <tr>
<td align="left"><?php echo __("Last Voted") . ":" ?></td> <td align="left"><?= __("Last Voted") . ":" ?></td>
<td align="left"> <td align="left">
<?php print $row["LastVoted"] ? date("Y-m-d", $row["LastVoted"]) : __("Never"); ?> <?= $row["LastVoted"] ? date("Y-m-d", $row["LastVoted"]) : __("Never"); ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><a href="<?php echo get_uri('/packages/'); ?>?K=<?php echo $row['Username'] ?>&amp;SeB=m"><?php echo __("View this user's packages") ?></a></td> <td colspan="2"><a href="<?= get_uri('/packages/'); ?>?K=<?= $row['Username'] ?>&amp;SeB=m"><?= __("View this user's packages") ?></a></td>
</tr> </tr>
</table> </table>
<?php if ($A == "UpdateAccount"): ?> <?php if ($A == "UpdateAccount"): ?>
<form action="<?php echo get_user_uri($U) . 'update/'; ?>" method="post"> <form action="<?= get_user_uri($U) . 'update/'; ?>" method="post">
<?php else: ?> <?php else: ?>
<form action="<?php echo get_uri('/register/'); ?>" method="post"> <form action="<?= get_uri('/register/'); ?>" method="post">
<?php endif; ?> <?php endif; ?>
<fieldset> <fieldset>
<input type="hidden" name="Action" value="<?php echo $A ?>" /> <input type="hidden" name="Action" value="<?= $A ?>" />
<?php if ($UID): ?> <?php if ($UID): ?>
<input type="hidden" name="ID" value="<?php echo $UID ?>" /> <input type="hidden" name="ID" value="<?= $UID ?>" />
<input type="hidden" name="token" value="<?php print htmlspecialchars($_COOKIE['AURSID']) ?>" /> <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
<?php endif; ?> <?php endif; ?>
</fieldset> </fieldset>
<table> <table>
...@@ -16,26 +16,26 @@ ...@@ -16,26 +16,26 @@
</tr> </tr>
<tr> <tr>
<td align="left"><?php echo __("Username") ?>:</td> <td align="left"><?= __("Username") ?>:</td>
<td align="left"><input type="text" size="30" maxlength="64" name="U" value="<?php echo htmlspecialchars($U,ENT_QUOTES) ?>" /> (<?php echo __("required") ?>)</td> <td align="left"><input type="text" size="30" maxlength="64" name="U" value="<?= htmlspecialchars($U,ENT_QUOTES) ?>" /> (<?= __("required") ?>)</td>
</tr> </tr>
<?php <?php
# Only TUs or Devs can promote/demote/suspend a user # Only TUs or Devs can promote/demote/suspend a user
if ($UTYPE == "Trusted User" || $UTYPE == "Developer"): if ($UTYPE == "Trusted User" || $UTYPE == "Developer"):
?> ?>
<tr> <tr>
<td align="left"><?php echo __("Account Type") ?>:</td> <td align="left"><?= __("Account Type") ?>:</td>
<td align="left"> <td align="left">
<select name=T> <select name=T>
<?php if ($T == "User"): ?> <?php if ($T == "User"): ?>
<option value="1" selected><?php echo __("Normal user") ?> <option value="1" selected><?= __("Normal user") ?>
<?php else: ?> <?php else: ?>
<option value="1"><?php echo __("Normal user") ?> <option value="1"><?= __("Normal user") ?>
<?php endif; ?> <?php endif; ?>
<?php if ($T == "Trusted User"): ?> <?php if ($T == "Trusted User"): ?>
<option value="2" selected><?php echo __("Trusted user") ?> <option value="2" selected><?= __("Trusted user") ?>
<?php else: ?> <?php else: ?>
<option value="2"><?php echo __("Trusted user") ?>