1 <?php 2 3 /******************************************** 4 SQLgrey Web Interface 5 Filename: index.php 6 Purpose: Renders the main menu page 7 Version: 1.1.8 8 *********************************************/ 9 10 require "includes/functions.inc.php"; 11 12 $query = "SELECT COUNT(*) AS count FROM connect"; 13 $result = do_query($query); 14 $line = fetch_row($result); 15 ?> 16 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 17 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 18 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 19 20 <head> 21 <title>SQLGrey Webinterface</title> 22 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 23 <link rel="stylesheet" href="main.css" type="text/css" charset="utf-8" /> 24 <style type="text/css"> 25 input { width: 150px; height: 25px; font-size: 13px; } 26 </style> 27 </head> 28 29 <body> 30 31 <div id="page"> 32 33 <div class="navcontainer"> 34 <?php shownav('grey','','ind','ind'); ?> 35 </div> 36 37 <table width="77%" summary="main"> 38 <tr> 39 <td> 40 <table width="820" border="0" summary="header"> 41 <tr> 42 <td> 43 <h1>SQLGrey Webinterface (Main menu)</h1> 44 </td> 45 <?php if ($close_btn == "yes") echo (' 46 <td align="right"> 47 <form action="../" method="post"> 48 <input type="submit" value="Close" /> 49 </form> 50 </td>'); 51 ?> 52 </tr> 53 </table> 54 55 <table border="0" summary="sub"> 56 <tr> 57 <td colspan="3"> 58 Hosts / domains that are currently greylisted: [<?php echo $line["count"]; ?>] 59 </td> 60 </tr> 61 <tr> 62 <td colspan="3"> 63 <form action="connect.php" method="post"> 64 <input style="width:150px;" type="submit" value="Waiting (greylist)" /> 65 </form> 66 </td> 67 </tr> 68 <tr> 69 <td colspan="3"> </td> 70 </tr> 71 <tr> 72 <td colspan="3">Auto-whitelisted (hosts / domains that have passed greylisting)</td> 73 </tr> 74 <tr> 75 <td> 76 <form action="awl.php?mode=email" method="post"> 77 <input type="submit" value="E-mail addresses" /> 78 </form> 79 </td> 80 <td> 81 <form action="awl.php?mode=domains" method="post"> 82 <input type="submit" value="Domains" /> 83 </form> 84 </td> 85 <td width="40%"> </td> 86 </tr> 87 <tr> 88 <td colspan="3"> </td> 89 </tr> 90 <tr> 91 <td colspan="3"> 92 <form action="opt_in_out.php?direction=out&what=domain" method="post"> 93 <input type="submit" value="Optout domain" /> 94 (<?php echo $dom_out; ?>) 95 </form> 96 </td> 97 </tr> 98 <tr> 99 <td colspan="3"> </td> 100 </tr> 101 <tr> 102 <td colspan="3"> 103 <form action="opt_in_out.php?direction=out&what=email" method="post"> 104 <input type="submit" value="Optout e-mail" /> 105 (<?php echo $email_out; ?>) 106 </form> 107 </td> 108 </tr> 109 <tr> 110 <td colspan="3"> </td> 111 </tr> 112 <tr> 113 <td colspan="3"> 114 <form action="opt_in_out.php?direction=in&what=domain" method="post"> 115 <input type="submit" value="Optin domain" /> 116 (<?php echo $dom_in; ?>) 117 </form> 118 </td> 119 </tr> 120 <tr> 121 <td colspan="3"> </td> 122 </tr> 123 <tr> 124 <td colspan="3"> 125 <form action="opt_in_out.php?direction=in&what=email" method="post"> 126 <input type="submit" value="Optin e-mail" /> 127 (<?php echo $email_in; ?>) 128 </form> 129 </td> 130 </tr> 131 </table> 132 <br /> 133 </td> 134 </tr> 135 </table> 136 137 <div id="footer" style="width: 800px;"> 138 <?php include "includes/copyright.inc.php" ?> 139 </div> 140 141 </div> 142 143 </body> 144 145 </html>