$y['Amount']) { return -1; } elseif ($x['Amount'] < $y['Amount']) { return 1; } } function dag_sortbountieslevel($x, $y) { if ($x['Level'] == $y['Level']) { return dag_sortbounties($x, $y); } elseif ($x['Level'] > $y['Level']) { return -1; } elseif ($x['Level'] < $y['Level']) { return 1; } } function dag_manage(){ page_header("Dag's Bounty Lists"); require_once("lib/superusernav.php"); superusernav(); // Add some bounty expiration for closed bounties $sql = "DELETE FROM " . db_prefix("bounty") . " WHERE status=1 AND windate <'".date("Y-m-d H:i:s",strtotime("-".(getsetting("expirecontent",180)/10)." days"))."'"; db_query($sql); addnav("Actions"); addnav("A?View All Bounties","runmodule.php?module=dag&manage=true&op=viewbounties&type=1&sort=1&dir=1&admin=true"); addnav("O?View Open Bounties","runmodule.php?module=dag&manage=true&op=viewbounties&type=2&sort=1&dir=1&admin=true"); addnav("C?View Closed Bounties","runmodule.php?module=dag&manage=true&op=viewbounties&type=3&sort=1&dir=1&admin=true"); addnav("R?Refresh List","runmodule.php?module=dag&manage=true&admin=true"); rawoutput("
"); $op = httpget('op'); if ($op == "") { // ***ADDED*** // By Andrew Senger // Adding for new Bounty Code output_notl("`n`n"); output("`c`bThe Bounty List`b`c`n"); $sql = "SELECT bountyid,amount,target,setter,setdate FROM " . db_prefix("bounty") . " WHERE status=0 ORDER BY bountyid ASC"; $result = db_query($sql); rawoutput("$amt | $lev | $name | $loc | $sex | $alive | $last | "); $listing = array(); $totlist = 0; for($i=0;$i|||||||
"); output_notl("`^%s`0", $listing[$i]['Amount']); rawoutput(" | "); output_notl("`^%s`0", $listing[$i]['Level']); rawoutput(" | "); output_notl("`^%s`0", $listing[$i]['Name']); rawoutput(" | "); output($loggedin ? "`#Online`0" : $listing[$i]['Location']); rawoutput(" | "); output($listing[$i]['Sex']?"`!Female`0":"`!Male`0"); rawoutput(" | "); output($listing[$i]['Alive']?"`1Yes`0":"`4No`0"); rawoutput(" | "); $laston= relativedate($listing[$i]['LastOn']); if ($loggedin) $laston=translate_inline("Now"); output_notl("%s", $laston); rawoutput(" |
$id | $amt | $targ | $set | $sdate | $stat | $win | $wdate | $ops | "); output_notl("`^%s`0", $row['bountyid']); rawoutput(" | "); output_notl("`^%s`0", $row['amount']); rawoutput(" | "); output_notl("`&%s`0", $target['name']); rawoutput(" | "); output_notl("`^%s`0", $setter['name']); rawoutput(" | "); output_notl("`^%s`0", $row['setdate']); rawoutput(" | "); output($row['status']==0?"`^Open`0":"`^Closed`0"); rawoutput(" | "); output_notl("`^%s`0", $winner['name']); rawoutput(" | "); output_notl("`^%s`0", $row['status']?$row['windate']:""); rawoutput(" | "); if ($row['status'] == 0) { $link = "runmodule.php?module=dag&manage=true&op=closebounty&id={$row['bountyid']}&admin=true"; $close = translate_inline("Close"); rawoutput("$close"); addnav("",$link); } else { rawoutput(" "); } rawoutput(" | "); } rawoutput("