summaryrefslogtreecommitdiffstats
path: root/web/template
diff options
context:
space:
mode:
authorLoui Chang <louipc.ist@gmail.com>2008-11-03 21:52:07 -0500
committerLoui Chang <louipc.ist@gmail.com>2008-11-03 21:52:07 -0500
commita6147ab5ab297728adefdb97aaeedc93114b896d (patch)
tree49b508439ab2aa0cf4bd039d3b2d2d53e8860df0 /web/template
parentc85dfacc747387b9be6c53b4518ac680b505e0f7 (diff)
parent100451a9665cb387eeae2cb06cc22870cfd57c82 (diff)
downloadaurweb-a6147ab5ab297728adefdb97aaeedc93114b896d.tar.xz
Merge branch 'testing'
Conflicts: web/html/pkgsubmit.php Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web/template')
-rw-r--r--web/template/footer.php2
-rw-r--r--web/template/header.php1
-rw-r--r--web/template/login_form.php4
-rw-r--r--web/template/stats/general_stats_table.php38
-rw-r--r--web/template/stats/updates_table.php40
-rw-r--r--web/template/stats/user_table.php38
-rw-r--r--web/template/template.phps21
-rw-r--r--web/template/tu_details.php62
-rw-r--r--web/template/tu_list.php68
9 files changed, 272 insertions, 2 deletions
diff --git a/web/template/footer.php b/web/template/footer.php
index 9d85c7d..fe8f89c 100644
--- a/web/template/footer.php
+++ b/web/template/footer.php
@@ -3,7 +3,7 @@
<br />
<?php
if ($ver) {
- print "<p style=\"text-align: right; font-size: 14px;\">$ver</p>\n";
+ print "<p style=\"text-align: right; font-size: 14px;\"><b>$ver</b></p>\n";
}
?>
</div>
diff --git a/web/template/header.php b/web/template/header.php
index 88fd6f6..f60acb4 100644
--- a/web/template/header.php
+++ b/web/template/header.php
@@ -46,7 +46,6 @@
<?php
if (isset($_COOKIE["AURSID"])) {
?>
- <li><a href="/logout.php"><?php print __("Logout"); ?></a></li>
<li><a href="/pkgsubmit.php"><?php print __("Submit"); ?></a></li>
<li><a href="/packages.php?SeB=m&K=<?php print username_from_sid($_COOKIE["AURSID"]); ?>"><?php print __("My Packages"); ?></a></li>
<?php
diff --git a/web/template/login_form.php b/web/template/login_form.php
index b2ed066..727afd0 100644
--- a/web/template/login_form.php
+++ b/web/template/login_form.php
@@ -2,6 +2,9 @@
<?php
if (isset($_COOKIE["AURSID"])) {
print __("Logged-in as: %h%s%h", array("<b>", username_from_sid($_COOKIE["AURSID"]), "</b>"));
+?>
+<br /><a href="/logout.php"><?php print __("Logout"); ?></a>
+<?php
}
else {
if ($login_error) {
@@ -16,6 +19,7 @@
} ?>" />
<label><?php print __("Password:"); ?></label>
<input type="password" name="passwd" size="30" maxlength="<?php print PASSWD_MAX_LEN; ?>" />
+ <input type="checkbox" name="remember_me" /><?php print __("Remember me"); ?>
<input type="submit" class="button" value="<?php print __("Login"); ?>" />
</form>
<?php } ?>
diff --git a/web/template/stats/general_stats_table.php b/web/template/stats/general_stats_table.php
new file mode 100644
index 0000000..254b6b6
--- /dev/null
+++ b/web/template/stats/general_stats_table.php
@@ -0,0 +1,38 @@
+<table class='boxSoft'>
+<tr>
+<th colspan='2' class='boxSoftTitle'>
+<span class='f3'><?php print __("Statistics") ?></span>
+</th>
+</tr>
+<tr>
+<td class='boxSoft'>
+<span class='f4'><?php print __("Packages in unsupported"); ?></span>
+</td>
+<td class='boxSoft'><span class='f4'><?php print $unsupported_count; ?></span></td>
+</tr>
+<tr>
+<td class='boxSoft'>
+<span class='f4'><?php print __("Packages in [community]"); ?></span>
+</td>
+<td class='boxSoft'><span class='f4'><?php print $community_count; ?></span></td>
+</tr>
+<tr>
+<td class='boxSoft'>
+<span class='f4'><?php print __("Packages added or updated in the past 7 days"); ?></span>
+</td>
+<td class='boxSoft'><span class='f4'><?php print $update_count; ?></span></td>
+</tr>
+<tr>
+<td class='boxSoft'>
+<span class='blue'><span class='f4'><?php print __("Registered Users"); ?></span></span>
+</td>
+<td class='boxSoft'><span class='f4'><?php print $user_count; ?></span></td>
+</tr>
+<tr>
+<td class='boxSoft'>
+<span class='f4'><?php print __("Trusted Users"); ?></span>
+</td>
+<td class='boxSoft'><span class='f4'><?php print $tu_count; ?></span></td>
+</tr>
+</table>
+
diff --git a/web/template/stats/updates_table.php b/web/template/stats/updates_table.php
new file mode 100644
index 0000000..e1eb888
--- /dev/null
+++ b/web/template/stats/updates_table.php
@@ -0,0 +1,40 @@
+<table class="boxSoft">
+<tr>
+<th colspan="2" class="boxSoftTitle" style="text-align: right">
+<a href="rss2.php"><img src="images/rss.gif"></a>
+<span class="f3"><?php print __("Recent Updates") ?><span class="f5"></span></span>
+</th>
+</tr>
+
+<?php while ($row = mysql_fetch_assoc($newest_packages)): ?>
+
+<tr>
+<td class="boxSoft">
+<span class="f4"><span class="blue">
+<a href="packages.php?ID=<?php print intval($row["ID"]); ?>">
+<?php print $row["Name"] . ' ' . $row["Version"]; ?>
+</a></span>
+</td>
+<td class="boxSoft">
+
+<?php
+$mod_int = intval($row["ModifiedTS"]);
+$sub_int = intval($row["SubmittedTS"]);
+
+if ($mod_int != 0):
+ $modstring = gmdate("r", $mod_int);
+elseif ($sub_int != 0):
+ $modstring = '<img src="images/new.gif" /> ' . gmdate("r", $sub_int);
+else:
+ $modstring = '(unknown)';
+endif;
+?>
+
+<span class="f4"><?php print $modstring; ?></span>
+</td>
+</tr>
+
+<?php endwhile; ?>
+
+</table>
+
diff --git a/web/template/stats/user_table.php b/web/template/stats/user_table.php
new file mode 100644
index 0000000..ec71999
--- /dev/null
+++ b/web/template/stats/user_table.php
@@ -0,0 +1,38 @@
+<table class='boxSoft'>
+<tr>
+<th colspan='2' class='boxSoftTitle'>
+<span class='f3'><?php print __("My Statistics"); ?></span>
+</th>
+</tr>
+<tr>
+<td class='boxSoft'>
+<span class='f4'><?php print __("Packages in unsupported"); ?></span>
+</td>
+<td class='boxSoft'>
+<span class='f4'><?php print $maintainer_unsupported_count; ?></span>
+</td>
+</tr>
+
+<?php if (($atype == 'Trusted User') || ($atype == 'Developer')) : ?>
+
+<tr>
+<td class='boxSoft'>
+<span class='f4'><?php print __("Packages in [community]"); ?></span>
+</td>
+<td class='boxSoft'>
+<span class='f4'><?php print $maintainer_community_count; ?></span>
+</td>
+</tr>
+
+<?php endif; ?>
+
+<tr>
+<td class='boxSoft'>
+<span class='f4'><?php print __("Out-of-date"); ?></span>
+</td>
+<td class='boxSoft'>
+<span class='f4'><?php print $flagged_outdated ?></span>
+</td>
+</tr>
+</table>
+
diff --git a/web/template/template.phps b/web/template/template.phps
new file mode 100644
index 0000000..7a86686
--- /dev/null
+++ b/web/template/template.phps
@@ -0,0 +1,21 @@
+<?php
+
+# This template shows how a front page script is commonly coded.
+
+set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
+
+include("aur.inc"); # access AUR common functions
+include("template_po.inc"); # use some form of this for i18n support
+set_lang(); # this sets up the visitor's language
+check_sid(); # see if they're still logged in
+html_header(); # print out the HTML header
+
+
+# Any text you print out to the visitor, use the __() function
+# for i18n support. See web/lib/translator.inc for more info.
+#
+print __("Hi, this is worth reading!")."<br />\n";
+
+
+html_footer(AUR_VERSION);
+
diff --git a/web/template/tu_details.php b/web/template/tu_details.php
new file mode 100644
index 0000000..b1d69f6
--- /dev/null
+++ b/web/template/tu_details.php
@@ -0,0 +1,62 @@
+<div class="pgbox">
+<div class="pgboxtitle"><span class="f3"><?php print __("Proposal Details") ?></span></div>
+<div class="pgboxbody">
+<?php if ($isrunning == 1) { ?>
+<div style='text-align: center; font-weight: bold; color: red'><?php print __("This vote is still running.") ?></div>
+<br />
+<?php } ?>
+User: <b>
+<?php if (!empty($row['User'])) { ?>
+<a href='packages.php?K=<?php print $row['User'] ?>&amp;SeB=m'><?php print $row['User'] ?></a>
+<?php } else { ?>
+N/A
+<?php } ?>
+</b><br />
+<?php print __("Submitted: %s by %s", "<b>" . gmdate("r", $row['Submitted']) . "</b>", "<b>" . username_from_id($row['SubmitterID']) . "</b>") ?><br />
+<?php print __("End: ") ?><b><?php print gmdate("r", $row['End']) ?></b><br /><br />
+<?php print str_replace("\n", "<br />\n", htmlentities($row['Agenda'])) ?><br /><br />
+<center>
+<table cellspacing='3' class='boxSoft' style='width: 50%'>
+</tr>
+<tr>
+<td class='boxSoft'>
+<table width='100%' cellspacing='0' cellpadding='2'>
+<tr>
+<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Yes") ?></span></th>
+<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("No") ?></span></th>
+<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Abstain") ?></span></th>
+<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Total") ?></span></th>
+<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Voted?") ?></span></th>
+</tr>
+<tr>
+<td class='data1'><span class='f5'><span class='blue'><?php print $row['Yes'] ?></span></span></td>
+<td class='data1'><span class='f5'><span class='blue'><?php print $row['No'] ?></span></span></td>
+<td class='data1'><span class='f5'><span class='blue'><?php print $row['Abstain'] ?></span></span></td>
+<td class='data1'><span class='f5'><span class='blue'><?php print ($row['Yes'] + $row['No'] + $row['Abstain']) ?></span></span></td>
+<td class='data1'><span class='f5'><span class='blue'>
+<?php if ($hasvoted == 0) { ?>
+<span style='color: red; font-weight: bold'><?php print __("No") ?></span>
+<?php } else { ?>
+<span style='color: green; font-weight: bold'><?php print __("Yes") ?></span>
+<?php } ?>
+</span></span></td>
+</tr>
+</table>
+</table>
+</div></div>
+<br />
+<div class='pgbox'>
+<div class='pgboxtitle'><span class='f3'><?php print __("Vote Actions") ?></span></div>
+<div class='pgboxbody'>
+<?php if ($canvote == 1) { ?>
+<center><form action='tu.php?id=<?php print $row['ID'] ?>' method='post'>
+<input type='submit' class='button' name='voteYes' value='<?php print __("Yes") ?>'>
+<input type='submit' class='button' name='voteNo' value='<?php print __("No") ?>'>
+<input type='submit' class='button' name='voteAbstain' value='<?php print __("Abstain") ?>'>
+<input type='hidden' name='doVote' value='1'>
+</form></center>
+<?php } else { ?>
+<center><?php print $errorvote ?></center>
+<?php } ?>
+</div></div>
+<br /><center><a href='tu.php'><?php print __("Back") ?></a></center>
diff --git a/web/template/tu_list.php b/web/template/tu_list.php
new file mode 100644
index 0000000..bec2985
--- /dev/null
+++ b/web/template/tu_list.php
@@ -0,0 +1,68 @@
+<center>
+<table cellspacing='3' class='boxSoft'>
+ <tr>
+ <td class='boxSoftTitle' align='right'>
+ <span class='f3'><?php print $type ?></span>
+ </td>
+ </tr>
+ <tr>
+ <td class='boxSoft'>
+ <table width='100%' cellspacing='0' cellpadding='2'>
+ <tr>
+ <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Proposal") ?></span></th>
+ <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
+ <a href='?off=<?php print $off ?>&amp;by=<?php print $by_next ?>'><?php print __("Start") ?></a>
+ </span></th>
+ <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("End") ?></span></th>
+ <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("User") ?></span></th>
+ <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Yes") ?></span></th>
+ <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("No") ?></span></th>
+ <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Voted?") ?></span></th>
+ </tr>
+ <?php if (mysql_num_rows($result) == 0) { ?>
+ <tr><td align='center' colspan='0'><?php print __("No results found.") ?></td></tr>
+ <?php } else { for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { (($i % 2) == 0) ? $c = "data1" : $c = "data2"; ?>
+ <tr>
+ <td class='<?php print $c ?>'><span class='f4'><span class='blue'>
+ <?php
+ if (strlen($row["Agenda"]) >= $prev_Len) {
+ $row["Agenda"] = htmlentities(substr($row["Agenda"], 0, $prev_Len)) . "... - ";
+ } else {
+ $row["Agenda"] = htmlentities($row["Agenda"]) . " - ";
+ }
+ ?>
+ <?php print $row["Agenda"] ?><a href='/tu.php?id=<?php print $row['ID'] ?>'>[<?php print __("More") ?>]</a></span></span>
+ </td>
+ <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print gmdate("j M y", $row["Submitted"]) ?></span></span></td>
+ <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print gmdate("j M y", $row["End"]) ?></span></span></td>
+ <td class='<?php print $c ?>'><span class='f6'><span class='blue'>
+ <?php
+ if (!empty($row['User'])) {
+ print "<a href='packages.php?K=" . $row['User'] . "&SeB=m'>" . $row['User'] . "</a>";
+ } else {
+ print "N/A";
+ }
+ ?>
+ </span></span></td>
+ <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row['Yes'] ?></span></span></td>
+ <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row['No'] ?></span></span></td>
+ <td class='<?php print $c ?>'>
+ <?php
+ $q = "SELECT * FROM TU_Votes WHERE VoteID = " . $row['ID'] . " AND UserID = " . uid_from_sid($_COOKIE["AURSID"]);
+ $hasvoted = mysql_num_rows(db_query($q, $dbh));
+ ?>
+ <span class='f5'><span class='blue'>
+ <?php if ($hasvoted == 0) { ?>
+ <span style='color: red; font-weight: bold'><?php print __("No") ?></span>
+ <?php } else { ?>
+ <span style='color: green; font-weight: bold'><?php print __("Yes") ?></span>
+ <?php } ?>
+ </span></span>
+ </td>
+ </tr>
+ <?php } } ?>
+ </table>
+ </td>
+ </tr>
+</table>
+</center>