'') OR (" . db_prefix("bans") . ".uniqueid=" .
db_prefix("accounts") . ".uniqueid AND " .
db_prefix("bans") . ".uniqueid<>''))";
$r = db_query($sql);
echo "
$ops | $bauth | $ipd | $dur | $mssg | $aff | $l |
"); output_notl("%s", $liftban, true); rawoutput(""); addnav("","user.php?op=delban&ipfilter=".URLEncode($row['ipfilter'])."&uniqueid=".URLEncode($row['uniqueid'])); rawoutput(" | "); output_notl("`&%s`0", $row['banner']); rawoutput(" | "); output_notl("%s", $row['ipfilter']); output_notl("%s", $row['uniqueid']); rawoutput(" | "); // "43200" used so will basically round to nearest day rather than floor number of days $expire= sprintf_translate("%s days", round((strtotime($row['banexpire'])+43200-strtotime("now"))/86400,0)); if (substr($expire,0,2)=="1 ") $expire= translate_inline("1 day"); if (date("Y-m-d",strtotime($row['banexpire'])) == date("Y-m-d")) $expire=translate_inline("Today"); if (date("Y-m-d",strtotime($row['banexpire'])) == date("Y-m-d",strtotime("1 day"))) $expire=translate_inline("Tomorrow"); if ($row['banexpire']=="0000-00-00") $expire=translate_inline("Never"); output_notl("%s", $expire); rawoutput(" | "); output_notl("%s", $row['banreason']); rawoutput(" | "); $file = "user.php?op=removeban&subop=xml&ip={$row['ipfilter']}&id={$row['uniqueid']}"; rawoutput(""); addnav("",$file); rawoutput(" | "); output_notl("%s", relativedate($row['lasthit'])); rawoutput(" |