<?php 
session_start();
include '../header.php';
include '../config.php';
include '../style.php';
if( session_is_registered('alogin') ) {
;echo '<table>

<tr>

<td width="15%" valign=top><br>

';include('adminnavigation.php');;echo '
</td>

<td valign="top" align="center" width="5%">

<td valign="top" align="center" ><br><br> ';
echo "<font size=2 face='$fonttype' color='$fontcolour'><p><center>";
if ($action=='save') {
$update1=mysql_query("update settings set setting='$pophostp' where name='pophost'");
$update1=mysql_query("update settings set setting='$bounceemailp' where name='bounceemail'");
$update1=mysql_query("update settings set setting='$bouncepasswordp' where name='bouncepassword'");
$update1=mysql_query("update settings set setting='$vacationsetp' where name='vacationset'");
$update1=mysql_query("update settings set setting='$bouncedeletep' where name='bouncedelete'");
echo '<p><b>Your settings have been saved.</b></p>';
;echo '<head>

<META HTTP-EQUIV="Refresh"

CONTENT="0; URL=bounce_settings.php">

</head>
';
}
else {
;echo '
<H2>Bounce Settings</H2>


<form method="POST" action="bounce_settings.php">

<input type="hidden" name="action" value="save">

<center>

<hr>

<p><b>Configuration Settings</b></p>
<p align="left">
Bounce Host:&nbsp;<input type="text" name="pophostp" size=30 value="';echo $pophost;;echo '"> (Usually Localhost)<br><br>

Bounce Email:&nbsp;<input type="text" name="bounceemailp" size=40 value="';echo $bounceemail;;echo '"><br><br>

Bounce Password:&nbsp;<input type="text" name="bouncepasswordp" value="';echo $bouncepassword;;echo '"><br><br>

Auto Vacation:&nbsp;<input type="text" name="vacationsetp" size=5 value="';echo $vacationset;;echo '">(Set to vacation after X bounces)<br><br>

Auto Delete:&nbsp;<input type="text" name="bouncedeletep" size=5 value="';echo $bouncedelete;;echo '">(Delete after X bounces)<br><br>

<input type="submit" value=" Save Settings ">

</form></center>


';
$query = 'SELECT * FROM members WHERE bounce>0 ORDER by bounce DESC';
$result = mysql_query ($query)
or die ('Query failed');
$num_rows = mysql_num_rows($result);
echo '<h2 align=center>Members Bounced List</h2>';
echo "<div align=center>$num_rows Results found</div><br><br>";
;echo '
<table width=70% border=0 cellpadding=2 cellspacing=2>


<tr>
<td bgcolor="';echo $contrastcolour;;echo '"><center><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '">Name</font></center></td>
<td bgcolor="';echo $contrastcolour;;echo '"><center><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '">Userid</font></center></td>
<td bgcolor="';echo $contrastcolour;;echo '"><center><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '">Contact Email</font></center></td>
<td bgcolor="';echo $contrastcolour;;echo '"><center><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '">IP</font></center></td>
<td bgcolor="';echo $contrastcolour;;echo '"><center><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '">Bounce</font></center></td>
<td bgcolor="';echo $contrastcolour;;echo '"><center><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '">Vacation</font></center></td>	
<td bgcolor="';echo $contrastcolour;;echo '"><center><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '">Verified</font></center></td>		  
<td bgcolor="';echo $contrastcolour;;echo '"><center><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '">Action</font></center></td>

</tr>
';
while ($line = mysql_fetch_array($result)) {
$name = $line['name'];
$userid = $line['userid'];
$contactemail = $line['contact_email'];
$subscribedemail = $line['subscribed_email'];
$verified = $line['verified'];
$ip = $line['ip'];
$vacation = $line['vacation'];
if ($vacation=='1') {
$vacation='Yes';
}
else {
$vacation='No';
}
;echo '  		<tr>
<td bgcolor="';echo $basecolour;;echo '"><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '"><center>';echo $name;;echo '</font></center></td>
<td bgcolor="';echo $basecolour;;echo '"><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '"><center><a href="memberlogin.php?userid=';echo $userid;;echo '">';echo $userid;;echo '</a></font></center></td>
<td bgcolor="';echo $basecolour;;echo '"><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '"><center>';echo $contactemail;;echo '</font></center></td>
<td bgcolor="';echo $basecolour;;echo '"><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '"><center>';echo $ip;;echo '</font></center></td>
<td bgcolor="';echo $basecolour;;echo '"><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '"><center>';echo $line['bounce'];;echo '</font></center></td>
<td bgcolor="';echo $basecolour;;echo '"><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '"><center>';echo $vacation;;echo '</font></center></td>	  
';if ($verified == 1) {;echo '<td bgcolor="';echo $basecolour;;echo '"<center><font size=2 face="';echo $fonttype;;echo '" color="';echo $fontcolour;;echo '">Yes</font></center></td>
';}if ($verified == 0) {;echo '<td bgcolor="';echo $basecolour;;echo '" valign="middle"><center><br>
<form method="POST" action="resendv.php">
<input type="hidden" name="userid" value="';echo $userid;;echo '">
<input type="hidden" name="email" value="';echo $subscribedemail;;echo '">
<input type="submit" value="Resend">
</form> </center>
</td>
';};echo '		  

<td valign="middle" bgcolor="';echo $basecolour;;echo '"><center><br>
<form method=POST action=edit.php>
<input type="hidden" name="userid" value="';echo $userid;;echo '">
<input type="submit" value="Edit">
</form>


<form method=POST action=deletethismember.php>
<input type="hidden" name="userid" value="';echo $userid;;echo '">
<input type="submit" value="Delete">
</form>


</center>
</td></tr>

';
}
echo '</table>';
;echo '
';}
echo '</td><td valign=top align=center width=5%></tr></table>';
}
else  {
echo 'Unauthorised Access!';
}
include '../footer.php';
mysql_close($dblink); 
?>