summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2013-05-01 09:05:40 +0200
committerDominique Martinet <asmadeus@codewreck.org>2015-11-08 14:27:59 +0100
commit1ae56d9e9a5b29fb4653522a22c450723a674d54 (patch)
tree77a4b457d3c7a194150b6014432cd9f82eafe7d5
parent0fe16b7c9e67c8ab7181149e965f6ca11a25e8b5 (diff)
additem: only show members who raided recently if all raids not shown
-rw-r--r--admin/additem.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/admin/additem.php b/admin/additem.php
index c49842f..a2f4954 100644
--- a/admin/additem.php
+++ b/admin/additem.php
@@ -372,14 +372,16 @@ class Add_Item extends EQdkp_Admin
{
global $db, $eqdkp, $user, $tpl, $pm;
global $eqdkp_root_path, $SID;
-
+
+ // Show all raids?
+ $show_all = ( (!empty($_GET['show'])) && ($_GET['show'] == 'all') ) ? true : false;
+
//
// Build member and buyer drop-downs
//
$buyer_source = ( $this->url_id ) ? $this->item['item_buyers'] : (( isset($_POST['item_buyers']) ) ? $_POST['item_buyers'] : '');
-
$sql = 'SELECT member_name
- FROM ' . MEMBERS_TABLE . '
+ FROM ' . ( ($show_all) ? MEMBERS_TABLE : 'R30' ). '
ORDER BY member_name';
$result = $db->query($sql);
while ( $row = $db->fetch_record($result) )
@@ -401,9 +403,7 @@ class Add_Item extends EQdkp_Admin
//
// Build raid drop-down
//
- // Show all raids?
- $show_all = ( (!empty($_GET['show'])) && ($_GET['show'] == 'all') ) ? true : false;
-
+
// Make two_weeks two weeks before the date the item was purchased
$two_weeks = mktime(0, 0, 0, date('m', $this->time), date('d', $this->time)-14, date('y', $this->time));