<?php
include("postget.php");
include_once("common.php");
$pagetitle = _SPAM_FILTERS;

checklevel(2,$_REQUEST['clientid']);

include("head_template.php");
echo '
<div class="container">
	<div class="row">
';

print("<table class='table table-bordered'><thead><tr>
	<th>".ucfirst(_BY)." ".strtolower(_DOMAIN)."</th> 
	<th>".ucfirst(_BY)." ".strtolower(_EMAIL)."</th> 
	<th>".ucfirst(_BY)." ".strtolower(_SUBJECT)."</th> 
	<th>".ucfirst(_BY)." ".strtolower(_BODY)."</th> 
	</tr></thead><tbody>");

print("<tr>");




////////////////////////////////////////////////////////////////////////////////
print("<td width='25%' valign='top'>");
echo '<table class="table table-striped">';

print("<thead><tr>
	<th>".ucfirst(_TEXT)."</th> 
	<th>".ucfirst(_OPTIONS)."</th> 
	</tr></thead><tbody>");

$query="SELECT id, type, text FROM hd_spamfilters WHERE type='Domain' ORDER by text";
$result=mysql_query($query,$db_link);
$bgc="";
while($row=mysql_fetch_array($result)) {
	print("<tr><td align='center'>$row[text]</td>");
	print("<td align='center'>
	<a href='$serverurl/spamfilters2.php?id=$row[0]'><img class='sprites edit' src='images/transparent.gif' border='0' title='"._EDIT."'></a>
	<a href='$serverurl/spamfiltersdelete.php?id=$row[0]&text=$row[text]'><img class='sprites del' src='images/transparent.gif' border='0' title='"._DELETE."'></a>
	</td>
	</tr>");
}
print("</tbody></table>");
print("</td>");
//////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
print("<td width='25%' valign='top'>");
print("<table class='table table-striped'>
    <thead><tr>
	<th>".ucfirst(_TEXT)."</th> 
	<th>".ucfirst(_OPTIONS)."</th> 
	</tr></thead><tbody>");

$query="SELECT id, type, text FROM hd_spamfilters WHERE type='Email' ORDER by text";
$result=mysql_query($query,$db_link);
$bgc="";
while($row=mysql_fetch_array($result)) {
	print("<tr><td align='center'>$row[text]</td>");
	print("<td align='center' nowrap>
	<a href='$serverurl/spamfilters2.php?id=$row[0]'><img class='sprites edit' src='images/transparent.gif' border='0' title='"._EDIT."'></a>
	<a href='$serverurl/spamfiltersdelete.php?id=$row[0]&text=$row[text]'><img class='sprites del' src='images/transparent.gif' border='0' title='"._DELETE."'></a>
	</td>
	</tr>");
}
print("</tbody></table>");
print("</td>");
//////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
print("<td width='25%' valign='top'>");
print("<table class='table table-striped'>
    <thead><tr>
	<th>".ucfirst(_TEXT)."</th> 
	<th>".ucfirst(_OPTIONS)."</th> 
	</tr></thead><tbody>");

$query="SELECT id, type, text FROM hd_spamfilters WHERE type='Subject' ORDER by text";
$result=mysql_query($query,$db_link);
$bgc="";
while($row=mysql_fetch_array($result)) {
	print("<tr><td align='center'>$row[text]</td>");
	print("<td align='center' nowrap>
	<a href='$serverurl/spamfilters2.php?id=$row[0]'><img class='sprites edit' src='images/transparent.gif' border='0' title='"._EDIT."'></a>
	<a href='$serverurl/spamfiltersdelete.php?id=$row[0]&text=$row[text]'><img class='sprites del' src='images/transparent.gif' border='0' title='"._DELETE."'></a>
	</td>
	</tr>");
}
print("</tbody></table>");
print("</td>");
//////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
print("<td width='25%' valign='top'>");
print("<table class='table table-striped'>
    <thead><tr>
	<th>".ucfirst(_TEXT)."</th> 
	<th>".ucfirst(_OPTIONS)."</th> 
	</tr></thead><tbody>");

$query="SELECT id, type, text FROM hd_spamfilters WHERE type='Body' ORDER by text";
$result=mysql_query($query,$db_link);
$bgc="";
while($row=mysql_fetch_array($result)) {
	print("<tr><td align='center'>$row[text]</td>");
	print("<td align='center' nowrap>
	<a href='$serverurl/spamfilters2.php?id=$row[0]'><img class='sprites edit' src='images/transparent.gif' border='0' title='"._EDIT."'></a>
	<a href='$serverurl/spamfiltersdelete.php?id=$row[0]&text=$row[text]'><img class='sprites del' src='images/transparent.gif' border='0' title='"._DELETE."'></a>
	</td>
	</tr>");
}
print("</tbody></table>");
print("</td>");
//////////////////////////////////////////////////////////////////////////////////

print("</tr></tbody>");
print("</table>");


graybutton("spamfilters2.php",_ADD_FILTER);


echo '
</div>
</div>
';

include("foot_template.php");
?>
	
