'') OR (uniqueid='$id' AND uniqueid<>'')) AND (banexpire='0000-00-00' OR banexpire>='".date("Y-m-d")."')"; $result = db_query($sql); if (db_num_rows($result)>0){ $session=array(); tlschema("ban"); $session['message'].=translate_inline("`n`4You fall under a ban currently in place on this website:`n"); while ($row = db_fetch_assoc($result)) { $session['message'].=$row['banreason']."`n"; if ($row['banexpire']=='0000-00-00') $session['message'].=translate_inline(" `\$This ban is permanent!`0"); else $session['message'].=sprintf_translate(" `^This ban will be removed `\$after`^ %s.`0",date("M d, Y",strtotime($row['banexpire']))); $sql = "UPDATE " . db_prefix("bans") . " SET lasthit='".date("Y-m-d H:i:s")."' WHERE ipfilter='{$row['ipfilter']}' AND uniqueid='{$row['uniqueidid']}'"; db_query($sql); $session['message'].="`n"; } $session['message'].=translate_inline("`4If you wish, you may appeal your ban with the petition link."); tlschema(); header("Location: index.php"); exit(); } db_free_result($result); } ?>