index.php

 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
<?php
error_reporting(E_ERROR);
if(isset($_GET["ppp"])){
if($_GET["ppp"] == "out"){
$loginok = false;
setcookie("pwd", "", time()-3600);
session_destroy();
header("Location: enter.php");
exit;
}
}
include_once (dirname(__FILE__) . "/config.php");
include_once (dirname(__FILE__) . "/functions.php");
include_once (dirname(__FILE__) . "/login.php");
include_once (dirname(__FILE__) . "/header.php");
$action = @rr("action");
$name = @rr("name");
$sid = @rr("sid");
if($action == "add"){
$qu = "INSERT INTO `schems` values (NULL,'$name');";
$result = mysql_query($qu);
}
if($action == "reset"){
echo "No available!!!<br>";
}
if($action == "delete"){
$qu = "DELETE FROM `schems` WHERE `id`=$sid";
$result = mysql_query($qu);
$qu = "DELETE FROM `outs` WHERE `id` IN (SELECT `oid` FROM `tds_out2s` WHERE `sid`=$sid)";
$result = mysql_query($qu);
$qu = "DELETE FROM `filters` WHERE `id` IN (SELECT `fid` FROM `filt2o` WHERE `oid` IN (SELECT `oid` FROM `out2s` WHERE `sid`=$sid))";
$result = mysql_query($qu);
$qu = "DELETE FROM `outs_stat` WHERE `oid` IN (SELECT `oid` FROM `out2s` WHERE `sid`=$sid)";
$result = mysql_query($qu);
$qu = "DELETE FROM `filt2o` WHERE `oid` IN (SELECT `oid` FROM `out2s` WHERE `sid`=$sid)";
$result = mysql_query($qu);
$qu = "DELETE FROM `out2s` WHERE `sid`=$sid";
$result = mysql_query($qu);
}
$shad = "#EAEAEA";
$light = "#FFFFFF";
$fl = true;
echo "<table border='0' cellpadding='1' cellspacing='0' width='100%'>";
echo "<tr><td width='35%' valign=top>";
echo "<table border='1' cellpadding='5' width='400'>";
echo "<tr background='img/bg_table.jpg'><td>";
echo "<strong>ID</strong>";
echo "</td><td width='100'>";
echo "<strong>Schema Name</strong>";
echo "</td><td>";
echo "<strong>Send Traffic URL</strong>";
echo "</td><td>";
echo "<strong>Opt.</strong>";
echo "</td></tr>";
$sch = 0;
$stat_style = " border:1px solid #84D878;\xd text-decoration:none;\xa padding:1px;\xa color:#84D878;\xa font-size:10px;\xd ";
$qu = "SELECT * FROM `schems` ORDER BY `id`";
$result = mysql_query($qu);
while($schema = mysql_fetch_array($result)){
$sid = $schema["id"];
$qub = "SELECT count(*) count FROM `outs` WHERE `id` IN (SELECT `oid` FROM `out2s` WHERE `sid`=$sid) AND `upbot_disabled` = '1'";
$resultb = mysql_query($qub);
$lineb = mysql_fetch_array($resultb);
$ubt = "";
if($lineb["count"] > 0){
$ubt = "<br><font color=red><b>OFF OUT by UpTime Bot</b></font>";
}
if($fl) $col = $shad;
else $col = $light;
echo "<tr style='background:$col'><td id='c$sch'>";
echo $ssid = $schema["id"];
echo "</td><td>";
echo $sname = $schema["name"] . $ubt;
$z = md5($schema["name"]);
echo "<br><a href='#' onClick=\"window.open('{$scripturl}renames.php?ssid=$ssid&z=$z','RSchema','width=300,height=160,toolbar=no,menubar=no,status=no,resizable=no')\">[Rename]</a>";
echo "</td><td>";
echo "<a target='_blank' href='$scripturl" . "go.php?sid=" . $ssid . "'>$scripturl" . "go.php?sid=" . $ssid . "</a>";
echo "</td><td>";
echo "<div onclick='rems(" . $ssid . ",\"" . $sname . "\")' style='background:#FEDC9A; padding:1px; cursor:pointer; font-size:10px;border:1px solid #AFAFAF'>DEL</div>\n <a style='background:#DEF9C0; padding:1px; cursor:pointer; font-size:10px;border:1px solid #AFAFAF; display:block' href='stats.php?f_schema[]=$ssid'>&nbsp;<strong>S</strong>&nbsp;</a>\n <div onclick='showout(" . $ssid . ")' style='background:#DBF7F9; padding:1px; cursor:pointer; font-size:10px;border:1px solid #AFAFAF'>OUTS&rarr;</div>\n <form style='display:none' name='ddd$ssid' action='' method='post'>\n <input name='action' type='hidden' value='delete'>\n <input name='sid' type='hidden' value='$ssid'>\n </form>";
echo "</td></tr>";
$fl = !$fl;
$sch++;
}
echo "</table>\n\n";
?><br /><form style="margin: 2px;" name="aaa" action="" method="post"><input name="action" type="hidden" value="add"> <input id="iii" name="name" type="text" value=""> <input type="submit" value="Add New Schema"></form>All Countries<a href="#" onclick="showc();return true;">Show</a>|<a href="#" onclick="hidec();return true;">Hide</a></td><td valign=top><div id='outs'></div></td></tr></table><script language=javascript> function rems (sid,sname) { var is_del = confirm("Are you sure to delete schema '"+sname+"' with id="+sid+"?"); if (is_del) { document.forms['ddd' + sid].submit(); } } function showc () { var ccc = document.getElementById("country"); ccc.innerHTML = "<iframe style='border:1px solid #B2B2B2' width='83%' height='380' src='allc.php'></iframe>"; } function hidec () { var ccc = document.getElementById("country"); ccc.innerHTML = ""; } function showout (id) { var ccc = document.getElementById("outs"); ccc.innerHTML = "<iframe style='border:1px solid #B2B2B2' width='100%' height='743' src='editout.php?sid="+id+"'></iframe>"; var ccc2 = document.getElementById("filters"); ccc2.innerHTML = ""; }</script><table width='100%'> <tr> <td width='40%' valign=top> <div id='country'></div> </td> <td valign=top> <div id='filters'></div> </td> </tr></table><br /><br /><br /><!--Content end--></td></tr><tr> <td class="copy" height="30" bgcolor="#585B61">Script author: mizhgan. Modified: JackSoft&Xeonik</td></tr></table><br /></td></tr></table>