Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.95 KB | None | 0 0
  1. <div id="content" class="clearfix">
  2. <link rel="stylesheet" type="text/css" href="css/stylex.css"/>
  3. <table width=100%>
  4. <tr>
  5. <th class="th" style="text-align: center;">HWID</th>
  6. <th class="th" style="text-align: center;">Usuario</th>
  7. <th class="th" style="text-align: center;">S.O</th>
  8. <th class="th" style="text-align: center;">IPv4</th>
  9. <th class="th" style="text-align: center;">RAM</th>
  10. <th class="th" style="text-align: center;">Ping</th>
  11. <th class="th" style="text-align: center;">Version</th>
  12. <th class="th" style="text-align: center;">Status</th>
  13. </tr>
  14.  
  15. <?php
  16. $tiempo = time();
  17. //FUNCIONES PARA LAS CADENAS
  18. function after ($this, $inthat)
  19. {
  20. if (!is_bool(strpos($inthat, $this)))
  21. return substr($inthat, strpos($inthat,$this)+strlen($this));
  22. };
  23.  
  24. function after_last ($this, $inthat)
  25. {
  26. if (!is_bool(strrevpos($inthat, $this)))
  27. return substr($inthat, strrevpos($inthat, $this)+strlen($this));
  28. };
  29.  
  30. function before ($this, $inthat)
  31. {
  32. return substr($inthat, 0, strpos($inthat, $this));
  33. };
  34.  
  35. function before_last ($this, $inthat)
  36. {
  37. return substr($inthat, 0, strrevpos($inthat, $this));
  38. };
  39.  
  40. function between ($this, $that, $inthat)
  41. {
  42. return before ($that, after($this, $inthat));
  43. };
  44. $base_de_datos = file_get_contents("../base_de_datos/intrucciones.txt");
  45. for($posicion == false; strpos($base_de_datos, 'IP_REMOTO'); )
  46. {
  47. $id_equipo = between ('ESPECIALID', 'CONEXION_TIME', "$base_de_datos");
  48. $conexion_time = between (''.$id_equipo.'CONEXION_TIME', ';', "$base_de_datos");
  49. $ip_remoto = between (''.$id_equipo.'IP_REMOTO', ';', "$base_de_datos");
  50. $nombre_remoto = between (''.$id_equipo.'NOMBRE_REMOTO', ';', "$base_de_datos");
  51. $ping_remoto = between (''.$id_equipo.'PING_REMOTO', ';', "$base_de_datos");
  52. $ram_remoto = between (''.$id_equipo.'RAM_REMOTO', ';', "$base_de_datos");
  53. $remotoversion = between (''.$id_equipo.'VERSIONREMOTO', ';', "$base_de_datos");
  54. $so_remoto = between (''.$id_equipo.'SO', ';', "$base_de_datos");
  55. $htmlclientes = ''.$htmlclientes.'<tr>
  56. <td class="td" style="text-align: center;">'.$id_equipo.'</td>
  57. <td class="td" style="text-align: center;">'.$nombre_remoto.'</td>
  58. <td class="td" style="text-align: center;">'.$so_remoto.'</td>
  59. <td class="td" style="text-align: center;">'.$ip_remoto.'</td>
  60. ';
  61. if ($ram_remoto < 60) {
  62. $htmlclientes = ''.$htmlclientes.'<td class="td" style="text-align: center; width: 60px;">'.$ram_remoto.'%</td>';
  63. }elseif ($ram_remoto < 80) {
  64. $htmlclientes = ''.$htmlclientes.'<td class="td" style="text-align: center; color: #fbf888; width: 60px;">'.$ram_remoto.'%</td>';
  65. }elseif ($ram_remoto < 110) {
  66. $htmlclientes = ''.$htmlclientes.'<td class="td" style="text-align: center; color: red; width: 60px;">'.$ram_remoto.'%</td>';
  67. }
  68. $htmlclientes = ''.$htmlclientes.'<td class="td" style="text-align: center;">'.$ping_remoto.' ms</td>';
  69. $htmlclientes = ''.$htmlclientes.'<td class="td" style="text-align: center;">V'.$remotoversion.'</td>';
  70. $conexion_time = $conexion_time + 20;
  71. if ($tiempo > $conexion_time) {
  72.  
  73. $tiempo_desconectado = $tiempo - $conexion_time;
  74. if ($tiempo_desconectado < 60) {
  75. $htmlclientes = ''.$htmlclientes.'<td class="td" style="text-align: center; color: red; width: 60px;">Desconectado ('.$tiempo_desconectado.' s.)<a href="#" onclick="window.open(\'./recovery.php?id='.$id_equipo.'\',\'targetWindow\',\'toolbar=no,location=,status=no,menubar=no,scrollbars=no,resizable=no,width=780,height=350,left=180,top=180\')" title="Enrique cabron"><img src="img/task.png" aling="bottom" height="16" wedth="16"></a></td></tr>';
  76. }elseif($tiempo_desconectado < 3600) {
  77. $tiempo_desconectado = $tiempo_desconectado / 60;
  78. $tiempo_desconectado = intval($tiempo_desconectado);
  79. $htmlclientes = ''.$htmlclientes.'<td class="td" style="text-align: center; color: red; width: 60px;">Desconectado ('.$tiempo_desconectado.' m.)<a href="#" onclick="window.open(\'./recovery.php?id='.$id_equipo.'\',\'targetWindow\',\'toolbar=no,location=,status=no,menubar=no,scrollbars=no,resizable=no,width=780,height=350,left=180,top=180\')" title="Enrique cabron"><img src="img/task.png" aling="bottom" height="16" wedth="16"></a></td></tr>';
  80. }elseif($tiempo_desconectado < 86400) {
  81. $tiempo_desconectado = $tiempo_desconectado / 60 / 60;
  82. $tiempo_desconectado = intval($tiempo_desconectado);
  83. $htmlclientes = ''.$htmlclientes.'<td class="td" style="text-align: center; color: red; width: 60px;">Desconectado ('.$tiempo_desconectado.' h.)<a href="#" onclick="window.open(\'./recovery.php?id='.$id_equipo.'\',\'targetWindow\',\'toolbar=no,location=,status=no,menubar=no,scrollbars=no,resizable=no,width=780,height=350,left=180,top=180\')" title="Enrique cabron"><img src="img/task.png" aling="bottom" height="16" wedth="16"></a></td></tr>';
  84. }elseif($tiempo_desconectado < 9999999999999999) {
  85. $tiempo_desconectado = $tiempo_desconectado / 60 / 60 / 24;
  86. $tiempo_desconectado = intval($tiempo_desconectado);
  87. if ($tiempo_desconectado > "7") {
  88. $htmlclientes = ''.$htmlclientes.'<td class="td" style="text-align: center; color: red; width: 60px;">Desconectado ('.$tiempo_desconectado.' d.)<a href="#" onclick="window.open(\'./recovery.php?id='.$id_equipo.'\',\'targetWindow\',\'toolbar=no,location=,status=no,menubar=no,scrollbars=no,resizable=no,width=780,height=350,left=180,top=180\')" title="Enrique cabron"><img src="img/task.png" aling="bottom" height="16" wedth="16"></a></td></tr>';
  89. } else {
  90. $htmlclientes = ''.$htmlclientes.'<td class="td" style="text-align: center; color: red; width: 60px;">Desconectado ('.$tiempo_desconectado.' d.)<a href="#" onclick="window.open(\'./recovery.php?id='.$id_equipo.'\',\'targetWindow\',\'toolbar=no,location=,status=no,menubar=no,scrollbars=no,resizable=no,width=780,height=350,left=180,top=180\')" title="Enrique cabron"><img src="img/task.png" aling="bottom" height="16" wedth="16"></a></td></tr>';
  91. }
  92. }
  93. $htmlclientes_desconectados = ''.$htmlclientes_desconectados.''.$htmlclientes.'';
  94. $htmlclientes = " ";
  95. } else {
  96. $htmlclientes = ''.$htmlclientes.'<td class="td" style="text-align: center; color: green; width: 60px;">Conectado<a href="#" onclick="window.open(\'./recovery.php?id='.$id_equipo.'\',\'targetWindow\',\'toolbar=no,location=,status=no,menubar=no,scrollbars=no,resizable=no,width=780,height=350,left=180,top=180\')" title="Enrique cabron"><img src="img/task.png" aling="bottom" height="16" wedth="16"></a></td></tr>';
  97. $htmlclientes_conectados = ''.$htmlclientes_conectados.''.$htmlclientes.'';
  98. $htmlclientes = " ";
  99. }
  100. $base_de_datos = after (''.$nombre_remoto.';
  101. ', "$base_de_datos");
  102. }
  103. $base_de_datos = file_get_contents("../base_de_datos/intrucciones.txt");
  104. echo $htmlclientes_conectados;
  105. echo $htmlclientes_desconectados;
  106. ?>
  107. </table> </div>
  108. <!--
  109. <form action="./index.php?p=clientes&borrar=si" method="POST">
  110. <center><input class="button-success" type="submit" value="Borrar cache" name="B1"></center>
  111. </form>!-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement