mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
More cleanup, add TU link to header
Cleans up links on front page, adds a TU link to the header to the voting application, fixes some titles and styling for logged in text Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
This commit is contained in:
parent
2f56688b56
commit
8ab823728c
6 changed files with 22 additions and 36 deletions
|
@ -52,7 +52,7 @@ while ($row = mysql_fetch_assoc($result)) {
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="boxSoft">';
|
print '<td class="boxSoft">';
|
||||||
|
|
||||||
print '<span class="f4"><span class="blue"><a href="/packages.php?do_Details=1&ID='.intval($row["ID"]).'">';
|
print '<span class="f4"><span class="blue"><a href="/packages.php?ID='.intval($row["ID"]).'">';
|
||||||
print $row["Name"]." ".$row["Version"]."</a></span></span>";
|
print $row["Name"]." ".$row["Version"]."</a></span></span>";
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
|
@ -16,7 +16,7 @@ if (isset($_GET['ID'])) {
|
||||||
if (!empty($id)) {
|
if (!empty($id)) {
|
||||||
$title = $id;
|
$title = $id;
|
||||||
}
|
}
|
||||||
} else if (isset($_GET['K'])) {
|
} else if (!empty($_GET['K'])) {
|
||||||
$title = "Search: " . $_GET['K'];
|
$title = "Search: " . $_GET['K'];
|
||||||
} else if (isset($_GET['do_MyPackages'])) {
|
} else if (isset($_GET['do_MyPackages'])) {
|
||||||
$title = __("My Packages");
|
$title = __("My Packages");
|
||||||
|
|
|
@ -27,4 +27,6 @@ $_t["en"]["Discussion"] = "Discussion";
|
||||||
|
|
||||||
$_t["en"]["Bugs"] = "Bugs";
|
$_t["en"]["Bugs"] = "Bugs";
|
||||||
|
|
||||||
?>
|
$_t["en"]["Trusted User"] = "TU";
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
|
@ -447,29 +447,6 @@ function can_submit_pkg($name="", $sid="") {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
# convert an ini_get number to a real integer - stupid PHP!
|
|
||||||
#
|
|
||||||
function initeger($inival="0", $isbytes=1) {
|
|
||||||
$last_char = strtolower(substr($inival, -1));
|
|
||||||
if ($isbytes) {
|
|
||||||
switch ($last_char) {
|
|
||||||
case 't': $multiplier = 1024 * 1024 * 1024; break;
|
|
||||||
case 'm': $multiplier = 1024 * 1024; break;
|
|
||||||
case 'k': $multiplier = 1024; break;
|
|
||||||
default: $multiplier = 1; break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
switch ($last_char) {
|
|
||||||
case 't': $multiplier = 1000 * 1000 * 1000; break;
|
|
||||||
case 'm': $multiplier = 1000 * 1000; break;
|
|
||||||
case 'k': $multiplier = 1000; break;
|
|
||||||
default: $multiplier = 1; break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return intval($inival) * $multiplier;
|
|
||||||
}
|
|
||||||
|
|
||||||
# recursive delete directory
|
# recursive delete directory
|
||||||
#
|
#
|
||||||
function rm_rf($dirname="") {
|
function rm_rf($dirname="") {
|
||||||
|
|
|
@ -290,10 +290,10 @@ function package_details($id=0, $SID="") {
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
# print out package details
|
# print out package details
|
||||||
#
|
#
|
||||||
echo "<div class=\"pgbox\">\n";
|
echo "<div class=\"pgbox\">\n";
|
||||||
echo " <div class=\"pgboxtitle\"><span class=\"f3\">".__("Package Details")."</span></div>\n";
|
echo " <div class=\"pgboxtitle\"><span class=\"f3\">".__("Package Details")."</span></div>\n";
|
||||||
echo " <div class=\"pgboxbody\">\n";
|
echo " <div class=\"pgboxbody\">\n";
|
||||||
echo " <table>\n";
|
echo " <table>\n";
|
||||||
echo " <tr><td class='boxSoft' colspan='2'><span class='f2'>";
|
echo " <tr><td class='boxSoft' colspan='2'><span class='f2'>";
|
||||||
echo $row["Name"] . " " . $row["Version"]."</span></td></tr>\n";
|
echo $row["Name"] . " " . $row["Version"]."</span></td></tr>\n";
|
||||||
|
|
|
@ -31,10 +31,17 @@
|
||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
if (isset($_COOKIE["AURSID"])) {
|
if (isset($_COOKIE["AURSID"])) {
|
||||||
echo ' <li><a href="/logout.php">'.__("Logout")."</a></li>\n";
|
?>
|
||||||
echo ' <li><a href="/pkgsubmit.php">'.__("Submit")."</a></li>\n";
|
<li><a href="/logout.php"><?php print __("Logout"); ?></a></li>
|
||||||
echo ' <li><a href="/packages.php?do_MyPackages=1">'
|
<li><a href="/pkgsubmit.php"><?php print __("Submit"); ?></a></li>
|
||||||
.__("My Packages")."</a></li>\n";
|
<li><a href="/packages.php?do_MyPackages=1"><?php print __("My Packages"); ?></a></li>
|
||||||
|
<?php
|
||||||
|
if (account_from_sid($_COOKIE["AURSID"]) == "Trusted User"
|
||||||
|
|| account_from_sid($_COOKIE["AURSID"]) == "Developer") {
|
||||||
|
?>
|
||||||
|
<li><a href="/tu.php"><?php print __("Trusted User"); ?></a></li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<li><a href="http://archlinux.org/mailman/listinfo/aur-general">
|
<li><a href="http://archlinux.org/mailman/listinfo/aur-general">
|
||||||
|
@ -59,8 +66,8 @@ foreach ($SUPPORTED_LANGS as $lang => $lang_name) {
|
||||||
<li>Lang: </li>
|
<li>Lang: </li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div style="text-align: right; padding-right: 10px">
|
<div style="text-align: right; padding-right: 10px; clear: right">
|
||||||
<?php
|
<?php
|
||||||
if (isset($_COOKIE["AURSID"])) {
|
if (isset($_COOKIE["AURSID"])) {
|
||||||
print __("Logged-in as: %h%s%h",
|
print __("Logged-in as: %h%s%h",
|
||||||
|
|
Loading…
Add table
Reference in a new issue