public
Description: A Simple domain monitoring application
Homepage: http://www.domainhunter.org.tr
Clone URL: git://github.com/bmericc/domainhunter.git
Click here to lend your support to: domainhunter and make a donation at www.pledgie.com !
bmericc (author)
Wed Jul 09 11:28:48 -0700 2008
domainhunter / index.php
100755 107 lines (79 sloc) 3.926 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
/*
+-----------------------------------------------------------------------+
| Domain Hunter - A Simple Domain Monitoring Application |
| Version 0.1.0 |
| |
| Copyright (C) 2006-2007, DomainLabs.EU - Turkey |
| Licensed under the GNU GPLv3 |
| |
+-----------------------------------------------------------------------+
| Author: Bahri Meric CANLI <bahri@bahri.info> |
+-----------------------------------------------------------------------+
 
*/
 
 
include "config.inc.php";
include "header.inc.php";
include "functions.inc.php";
 
$domain_count = mysql_result(mysql_query("SELECT count( id ) FROM `monitors` "),0,0);
 
if( ($_GET['start']!= "") && ( isset($_GET['start']) ) ) { $start = $_GET['start']; }
else { $start=0; }
 
$h_id = $start;
$order_by = $_GET['order'];
 
if ($order_by=="expira") { $order_sql = " ORDER BY `monitors`.`expirate_date` ASC "; }
else if ($order_by=="control") { $order_sql = " ORDER BY `monitors`.`hunter_update` DESC "; }
else if ($order_by=="update") { $order_sql = " ORDER BY `monitors`.`update_date` DESC "; }
else { $order_sql = " ORDER BY `monitors`.`hunter_update` DESC "; }
 
////////////////////////////////////////////////////////////////////////////////////////////////////////
 
if(isset($_POST['process'])) {
 
 $delete=$_POST['delete'];
 foreach ($delete as $key => $value) {
 $delete_id = $key;
 }
 
$domain_name = mysql_result(mysql_query("SELECT domain FROM `monitors` WHERE id = '$delete_id' "),0,0);
 
$delete_query = "DELETE FROM `monitors` WHERE id = '$delete_id' ";
$delete_result = mysql_query($delete_query) or die($delete_query."<br>".mysql_error());
 
echo "<p class=\"result\"><b>Wiped domain:</b> $domain_name</p>";
 
}
 
////////////////////////////////////////////////////////////////////////////////////////////////////////
 
$sql = "SELECT * FROM `monitors` $order_sql LIMIT $start,$per_page_domain";
$results = mysql_query($sql) or die(mysql_error());
 
?>
 
<form name="delete_domain" method="post">
<input name="process" type="hidden" value="delete">
<table id="admin_table" >
<tr class="header" >
<td>Id</td>
<td>Domain</td>
<td>Status</td>
<td>Created</td>
<td class="hilightoff" onMouseOver="className='hilighton';" onMouseOut="className='hilightoff';" ><a href ="?start=<?php echo $_GET['start'];?>&order=update">Last Update</a></td>
<td class="hilightoff" onMouseOver="className='hilighton';" onMouseOut="className='hilightoff';" ><a href ="?start=<?php echo $_GET['start'];?>&order=expira">Expires</a></td>
<td class="hilightoff" onMouseOver="className='hilighton';" onMouseOut="className='hilightoff';" ><a href ="?start=<?php echo $_GET['start'];?>&order=control">Last Control</a></td>
<td>Register</td>
<td></td>
 
</tr>
<?php
while($rows = mysql_fetch_array($results)) {
 
$h_id++;
 
echo "<tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\"> <td>";
 
echo $h_id;
echo "</td><td><a href=\"".getdetail($rows[domain], $detail_server)."\" target=\"_blank\">". $rows[domain]." <img src=\"new-win-icon.gif\" border=\"0\" align=\"absmiddle\" /> </a>";
echo "</td><td>". $rows[status1];
echo "</td><td>". $rows[create_date];
echo "</td><td>". $rows[update_date];
echo "</td><td>". $rows[expirate_date];
echo "</td><td>". $rows[hunter_update];
echo "</td><td>". $rows[register];
echo "</td><td>";
 
echo "<input name=\"delete[".$rows[id]."]\" type=\"submit\" id=\"delete\" style=\"width:50px\" ";
 
echo "value=\"delete\" class=\"button\" />";
 
echo "</td></tr>\n\n";
}
 
 ?>
</table>
</form>
<?php
if($domain_count >= $per_page_domain) {
include "pager.inc.php"; }
include "foother.inc.php";
?>