<?
if(define("opendomains", false)) die("Hacking System");
$fill=$_GET['fill'];
$do=$_GET['do'];
if($_GET['where']) {
alert("Hacking System !");
die("Hacking System");
}
$s=$_GET['s'];
if(!$s) $s=0;
$mm=20;
$tp=$_GET['tp'];
if(!$tp) $tp="wdomain";
$ik[$tp]="checked=true";
if($fill) {
switch ($fill) {
case "bad":
$where=" and wact=2 ";
$order="by id desc";
break;
case "wait":
$where=" and wact=0 ";
$order="by id desc";
break;
case "top":
$where=" and wact=1 ";
$order="by wvisit desc";
break;
case "all":
$where="";
$order="by id desc";
break;
case "search":
$kw=$_GET['kw'];
$where=" and ".$tp." like '%".$kw."%'";
$order="by id desc";
break;
}
echo "
<form action='?act=user&fill=search' method='get'>
» <b>Keywords:</b> <input type='text' name='kw' value='".$_GET['kw']."'>
<input type='radio' name='tp' value='wdomain' ".$ik[wdomain]." > Domain
<input type='radio' name='tp' value='wemail' ".$ik[wemail]." > E-Mail
<input type='radio' name='tp' value='wurl' ".$ik[wurl]." > URL
<input type='submit' name='sssubmit' value='Search' >
<input type='hidden' name='act' value='user'>
<input type='hidden' name='fill' value='search'>
</form>
<table width=100% cellspacing=0 cellpadding=5 border=1 style='border-collapse:collapse;'>
<tr><td align=center ><b>Domain Name</b></td>
<td align=center ><b>Counter</b></td>
<td align=center ><b>Status</b></td>
<td align=center ><B>Action</b></td>
</tr>";
$cc="select id,wdomain,wexe,wemail,wvisit,wdate,wact from cl_domains where 1 $where ";
$query=mysql_query("select id,wdomain,wexe,wemail,wvisit,wdate,wact from cl_domains where 1 $where order $order limit $s, $mm");
while($ht=mysql_fetch_array($query)) {
$tam=$ht[wact];
$sel[0]=$sel[1]=$sel[2]="";
$sel[$tam]="selected";
echo "
<tr><td align=left >$ht[id] » $ht[wdomain].$ht[wexe]</td>
<td align=center >$ht[wvisit]</td>
<td align=center ><select name='edit$ht[id]' onchange='Javascript:goact($ht[id],this.value);'>
<option value='0' $sel[0] >Waiting</option>
<option value='1' $sel[1] >Active</option>
<option value='2' $sel[2] >Suppend</option>
</select></td>
<td align=center >
<a href='?act=user&do=edit&id=$ht[id]'>Edit</a> |
<a href='?act=user&do=del&id=$ht[id]'>Del</a>
</td>
</tr>
";
}
echo "
<script language='Javascript'>
function goact(id,act) {
window.location='?act=user&do=act&id=' + id + '&set=' + act;
}
</script>
</table>
";
$query=mysql_query($cc);
$ht=mysql_num_rows($query);
$max=$ht;
echo "---------- <br>
Total Account: $max <br>
Pages:
";
$tt=round($max/$mm);
if($tt * $mm < $max) $tt++;
for($i=1;$i<=$tt;$i++) {
$p=$i-1;
$url=$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
$url=str_replace("&s=","&null=",$url);
$url=$url."&s=".$p*$mm;
echo "
<a href='$url'>$i</a>
";
}
}
if($do) {
switch ($do) {
case "del":
$id=kiemtra(1,$_GET['id'],1,0,40,"Hacking System",0);
$query=mysql_query("delete from cl_domains where id='$id'");
alert("Deleted Domain ID : $id");
goto("?act=user");
break;
case "add":
include("user.add.php");
break;
case "edit":
include("user.edit.php");
break;
case "act":
$id=kiemtra(1,$_GET['id'],1,0,40,"Hacking System",0);
$set=kiemtra(1,$_GET['set'],1,0,40,"Hacking System",0);
$query=mysql_query("update cl_domains set wact='$set' where id='$id'")or die("Up Error !");
alert("Updated ID : $id - Ok !");
goto("?act=user");
break;
}
}
?>