Advertisement
Guest User

Untitled

a guest
Mar 4th, 2016
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.31 KB | None | 0 0
  1. <?php
  2.  
  3. //Если авторизован
  4. if ($l==True) {
  5. if ($_POST[ip1] != '') {
  6. $ip1=$_POST[ip1];
  7. $q="UPDATE `user` SET `ip1`='$ip1' where `id`='$id' ";
  8. mysql_query($q) or die('Error');
  9. }
  10. if ($_POST[ip2] != '') {
  11. $ip2=$_POST[ip2];
  12. $q="UPDATE `user` SET `ip2`='$ip2' where `id`='$id' ";
  13. mysql_query($q) or die('Error');
  14. }
  15. if ($_POST[ip3] != '') {
  16. $ip3=$_POST[ip3];
  17. $q="UPDATE `user` SET `ip3`='$ip3' where `id`='$id' ";
  18. mysql_query($q) or die('Error');
  19. }
  20.  
  21. $time=time();
  22. include "geoipcity.inc";
  23. $nameEdit='';
  24.  
  25. $ch = curl_init();
  26. curl_setopt($ch, CURLOPT_URL, 'http://'.$ServerBC1.'/online?user=-1&socks5=get');
  27. curl_setopt($ch, CURLOPT_HEADER, 0);
  28. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  29. $GETon = '';
  30. $GETon= curl_exec($ch);
  31. curl_close($ch);
  32. $GETonlineout.=$GETon."/r/n";
  33. $ServIP = SubStr($ServerBC1,0,StrPos($ServerBC1,':'));
  34. $GETon=explode("\r\n",$GETon);
  35. $a=0;
  36. while ($a<count($GETon)) {
  37. if (StrPos($GETon[$a],':')>0) {
  38. $StrIP = SubStr($GETon[$a],0,StrPos($GETon[$a],':'));
  39. $GETon[$a]=str_replace($StrIP,$ServIP,$GETon[$a]);
  40. }
  41. $a++;
  42. }
  43. $GETon = implode("\r\n",$GETon);
  44.  
  45. $GETonline.=$GETon."\r\n";
  46.  
  47. $ch = curl_init();
  48. curl_setopt($ch, CURLOPT_URL, 'http://'.$ServerBC2.'/online?user=-1&socks5=get');
  49. curl_setopt($ch, CURLOPT_HEADER, 0);
  50. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  51. $GETon = '';
  52. $GETon= curl_exec($ch);
  53. curl_close($ch);
  54. $GETonlineout.=$GETon."/r/n";
  55. $ServIP = SubStr($ServerBC2,0,StrPos($ServerBC2,':'));
  56. $GETon=explode("\r\n",$GETon);
  57. $a=0;
  58. while ($a<count($GETon)) {
  59. if (StrPos($GETon[$a],':')>0) {
  60. $StrIP = SubStr($GETon[$a],0,StrPos($GETon[$a],':'));
  61. $GETon[$a]=str_replace($StrIP,$ServIP,$GETon[$a]);
  62. }
  63. $a++;
  64. }
  65. $GETon = implode("\r\n",$GETon);
  66.  
  67. $GETonline.=$GETon."\r\n";
  68.  
  69. $ch = curl_init();
  70. curl_setopt($ch, CURLOPT_URL, 'http://'.$ServerBC3.'/online?user=-1&socks5=get');
  71. curl_setopt($ch, CURLOPT_HEADER, 0);
  72. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  73. $GETon = '';
  74. $GETon= curl_exec($ch);
  75. curl_close($ch);
  76. $GETonlineout.=$GETon."/r/n";
  77. $ServIP = SubStr($ServerBC3,0,StrPos($ServerBC3,':'));
  78. $GETon=explode("\r\n",$GETon);
  79. $a=0;
  80. while ($a<count($GETon)) {
  81. if (StrPos($GETon[$a],':')>0) {
  82. $StrIP = SubStr($GETon[$a],0,StrPos($GETon[$a],':'));
  83. $GETon[$a]=str_replace($StrIP,$ServIP,$GETon[$a]);
  84. }
  85. $a++;
  86. }
  87. $GETon = implode("\r\n",$GETon);
  88.  
  89. $GETonline.=$GETon."\r\n";
  90.  
  91. $ArrayIP=explode("\r\n",$GETonline);
  92. $ArrayIPout=explode("\r\n",$GETonlineout);
  93.  
  94. $sql = mysql_query("select * from `user` where `id`='$id' LIMIT 1 ") or die('<meta http-equiv="refresh" content="0; url=index.php">');
  95. $count=mysql_num_rows($sql);
  96. $row=mysql_fetch_array($sql);
  97. $ip1=$row['ip1'];
  98. $ip2=$row['ip2'];
  99. $ip3=$row['ip3'];
  100. $MaxSocks = $row['400'];
  101.  
  102. $ME_info1.='<br>
  103. <table width="20%" cellspacing="0" style="border: 0px #e8f5ff solid; border-collapse: collapse ; " bordercolor="e8f5ff" border="0" id="TableLine" class="ruler">
  104. <tr><td><b>id</b></td><td><b></b></td><td><b>socks</b></td><td><b>out ip</b></td><td><b>country</b></td><td><b>region</b></td><td><b>city</b></td></tr>';
  105.  
  106. $a=0;
  107. $b=0;
  108. $d=0;
  109. while (($a<(count($ArrayIP)))and($b<$MaxSocks)) {
  110. $Tip=$ArrayIPout[$a];
  111. //$Tip2=$ArrayIP[$a];
  112. $Tip=substr($Tip,0,strpos($Tip,':'));
  113.  
  114. if ($Tip!='') {
  115. $Tcountry = user_geo_ip($Tip,3);
  116. $gi = geoip_open("GeoLiteCity.dat", GEOIP_STANDARD);
  117. $geo = GeoIP_record_by_addr($gi,$Tip);
  118. geoip_close($gi);
  119. $Country = $geo->country_code;
  120. $Region = $geo->region;
  121. $City = $geo->city;
  122.  
  123. $ME_info1.='<tr><td>'.($b+1).'</td><td>'.$Tcountry.'</td><td>'.$ArrayIP[$a].'</td><td>'.$Tip.'</td><td><center>'.$Country.'</center></td><td>'.$Region.'</td><td>'.$City.'</td></tr>';
  124. $b=$b+1;
  125.  
  126. //} else {
  127. // $Tcountry = '<center>-</center>';
  128. }
  129. $a=$a+1;
  130. }
  131.  
  132. $ME_info.='
  133. <b>Available socks: '.($b).'</b> <a href="api.php?id='.$id.'&key='.(md5($login.$password)).'" target=_blank>[get text format]</a><br>'.$ME_info1.'</table>';
  134.  
  135. $content.='
  136. <div style="position: relative; top: -35px;"><table border="0" width="100%" >
  137. <tr><td width="20%" valign="top">
  138. <div id="hide" style="width:95%;" >
  139. <b>Access to the Socks</b><br><br>
  140. <script type="text/javascript">
  141. function SH2(id) {
  142. if (document.getElementById(id).style==\'display:none\') { document.getElementById(id).style==\'display:block\'; } else { document.getElementById(id).style==\'display:none\'; }
  143. }
  144. </script>
  145. <script type="text/javascript">
  146. function SH(id,id2,texts) {
  147. if (document.getElementById(id).innerHTML==\'\') { document.getElementById(id).innerHTML = texts; } else { document.getElementById(id).innerHTML =\'\'; }
  148. if (document.getElementById(id2).type==\'text\') { document.getElementById(id2).type=\'hidden\'; } else { document.getElementById(id2).type=\'text\'; }
  149. }
  150. </script>
  151. <table width="100%" border="0" >
  152. <tr width="100%"><td ondblclick="SH(\'lip1'.$Uid.'\',\'ip1'.$Uid.'\',\''.$ip1.'\'); "><span id="lip1'.$Uid.'">'.$ip1.'</span><form method=post><input type="hidden" name="Uid" value="'.$Uid.'" style="width:100%"><input id="ip1'.$Uid.'" type="hidden" name="ip1" value="'.$ip1.'" style="width:200px"></form></td></tr>
  153. <tr width="100%"><td ondblclick="SH(\'lip2'.$Uid.'\',\'ip2'.$Uid.'\',\''.$ip2.'\'); "><span id="lip2'.$Uid.'">'.$ip2.'</span><form method=post><input type="hidden" name="Uid" value="'.$Uid.'" style="width:100%"><input id="ip2'.$Uid.'" type="hidden" name="ip2" value="'.$ip2.'" style="width:200px"></form></td></tr>
  154. <tr width="100%"><td ondblclick="SH(\'lip3'.$Uid.'\',\'ip3'.$Uid.'\',\''.$ip3.'\'); "><span id="lip3'.$Uid.'">'.$ip3.'</span><form method=post><input type="hidden" name="Uid" value="'.$Uid.'" style="width:100%"><input id="ip3'.$Uid.'" type="hidden" name="ip3" value="'.$ip3.'" style="width:200px"></form></td></tr>
  155. </table>
  156. </div>
  157. </td><td width="79%" valign="top">
  158. <div id="hide" style="width:95%">
  159. <b>'.$nameEdit.'</b>
  160. '.$ME_info.'
  161. </div>
  162. </td></tr>
  163. <tr><td width="20%" valign="top">
  164. </td><td> </td></tr>
  165. </table></div>
  166. ';
  167. } else {
  168. include"404.php";
  169. }
  170. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement