summaryrefslogtreecommitdiffstats
path: root/web/html/home.php
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2017-02-26 10:30:16 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2017-02-26 10:30:16 +0100
commit69f7eb115a0a48d4d2808708bcfef9eaf292f64c (patch)
treee8e4ac633b88099b6836ba3f637b0ab2b1d6a472 /web/html/home.php
parentfdd932ff8d5e5899cfeae9a8b29011fa2cf9d439 (diff)
parent5fd417d70154470d145c83a4b60693c8d877b016 (diff)
downloadaur-69f7eb115a0a48d4d2808708bcfef9eaf292f64c.tar.gz
aur-69f7eb115a0a48d4d2808708bcfef9eaf292f64c.tar.xz
Merge branch 'master' into maint
Diffstat (limited to 'web/html/home.php')
-rw-r--r--web/html/home.php62
1 files changed, 60 insertions, 2 deletions
diff --git a/web/html/home.php b/web/html/home.php
index 475370bb..26754916 100644
--- a/web/html/home.php
+++ b/web/html/home.php
@@ -8,12 +8,69 @@ check_sid();
include_once('stats.inc.php');
-html_header( __("Home") );
+if (isset($_COOKIE["AURSID"])) {
+ html_header( __("Dashboard") );
+} else {
+ html_header( __("Home") );
+}
?>
<div id="content-left-wrapper">
<div id="content-left">
+ <?php if (isset($_COOKIE["AURSID"])): ?>
+ <div id="intro" class="box">
+ <h2><?= __("Dashboard"); ?></h2>
+ <h3><?= __("My Flagged Packages"); ?></h3>
+ <?php
+ $params = array(
+ 'PP' => 50,
+ 'SeB' => 'M',
+ 'K' => username_from_sid($_COOKIE["AURSID"]),
+ 'outdated' => 'on',
+ 'SB' => 'l',
+ 'SO' => 'a'
+ );
+ pkg_search_page($params, false, $_COOKIE["AURSID"]);
+ ?>
+ <h3><?= __("My Requests"); ?></h3>
+ <?php
+ $archive_time = config_get_int('options', 'request_archive_time');
+ $from = time() - $archive_time;
+ $results = pkgreq_list(0, 50, uid_from_sid($_COOKIE["AURSID"]), $from);
+ $show_headers = false;
+ include('pkgreq_results.php');
+ ?>
+ </div>
+ <div id="intro" class="box">
+ <h2><?= __("My Packages"); ?></h2>
+ <p><a href="<?= get_uri('/packages/') ?>?SeB=m&amp;K=<?= username_from_sid($_COOKIE["AURSID"]); ?>"><?= __('Search for packages I maintain') ?></a></p>
+ <?php
+ $params = array(
+ 'PP' => 50,
+ 'SeB' => 'm',
+ 'K' => username_from_sid($_COOKIE["AURSID"]),
+ 'SB' => 'l',
+ 'SO' => 'd'
+ );
+ pkg_search_page($params, false, $_COOKIE["AURSID"]);
+ ?>
+ </div>
+ <div id="intro" class="box">
+ <h2><?= __("Co-Maintained Packages"); ?></h2>
+ <p><a href="<?= get_uri('/packages/') ?>?SeB=c&amp;K=<?= username_from_sid($_COOKIE["AURSID"]); ?>"><?= __('Search for packages I co-maintain') ?></a></p>
+ <?php
+ $params = array(
+ 'PP' => 50,
+ 'SeB' => 'c',
+ 'K' => username_from_sid($_COOKIE["AURSID"]),
+ 'SB' => 'l',
+ 'SO' => 'd'
+ );
+ pkg_search_page($params, false, $_COOKIE["AURSID"]);
+ ?>
+ </div>
+ <?php else: ?>
<div id="intro" class="box">
<h2>AUR <?= __("Home"); ?></h2>
<p>
@@ -122,6 +179,7 @@ html_header( __("Home") );
</p>
</div>
</div>
+ <?php endif; ?>
</div>
</div>
<div id="content-right">
@@ -140,7 +198,7 @@ html_header( __("Home") );
<div id="pkg-stats" class="widget box">
<?php general_stats_table(); ?>
</div>
- <?php if (!empty($_COOKIE["AURSID"])): ?>
+ <?php if (isset($_COOKIE["AURSID"])): ?>
<div id="pkg-stats" class="widget box">
<?php user_table(uid_from_sid($_COOKIE["AURSID"])); ?>
</div>