Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $COUNT_FILE = "count_data.txt";
- $fp = fopen("$COUNT_FILE", "r+");
- flock($fp, 1);
- $count = fgets($fp, 4096);
- $count += 1;
- fseek($fp,0);
- fputs($fp, $count);
- flock($fp, 3);
- fclose($fp);
- error_reporting(E_ALL ^ E_DEPRECATED);
- $aye = htmlspecialchars($_GET['search']);
- $s = 0;
- $e = 6;
- $next = $s + $e;
- $prev = $s - $e;
- echo " <!DOCTYPE html>
- <html xmlns='http://www.w3.org/1999/xhtml'>
- <head>
- <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
- <title>Sigant Database Search</title>
- <style>
- a:link {
- text-decoration: none;
- }
- a:visited {
- text-decoration: none;
- }
- a:hover {
- text-decoration: underline;
- }
- .search {
- width: 400px;
- }
- #left {
- margin: 0 auto;
- color: red;
- }
- .search {
- border-bottom: 1px solid transparent;
- border-left: 1px solid transparent;
- border-right: 1px solid transparent;
- border-top: 1px solid transparent;
- }
- form {
- background-color: #e3e3e3;
- color: red;
- }
- #results font {
- color: #3498db;
- }
- #results font h3 {
- color: #252525;
- }
- table {
- align:left;
- background-color:#D3D3D3;
- width:100%;
- }
- </style>
- </head>
- <body bgcolor='#eee'>
- <font color='#ffffff'>
- <form name='myform' action='search.php' method='GET'>
- <table>
- <td width='100px'>
- <a href='index.php'><img src='logo.png' width='100px' height='40px' alt='Home'></a>
- </td>
- <td width='400px'>
- <input name='search' type='text' class='search' placeholder='Search Sigant Library Database Breach' required/>
- </td>
- <td>
- <input name='query' type='image' src='search.png' alt='Submit' height='24px' width='24px'>
- </td>
- <tr>
- <td colspan=3>
- </form>
- "
- ;
- $db = mysql_connect('localhost','sigantxy_search','prodigydisk') or die('Could not connect to database.');
- mysql_select_db('sigantxy_search',$db);
- $search = mysql_real_escape_string($aye);
- $search = str_replace(' ','%',$search);
- $search_exploded = explode (' ',$search);
- $search_exploded = str_replace(' ','', $search_exploded);
- $x = 0;
- foreach( $search_exploded as $search_each ) { $x++; $construct = " ";
- if( $x == 1 ) $construct .= "email LIKE '%$search_each%' ";
- else $construct .= "AND email LIKE '%$search_each%' ";
- } $construct = " SELECT name, email, password, ip FROM infinityhax WHERE $construct LIMIT 50";
- $run = mysql_query( $construct );
- $foundnum = mysql_num_rows($run);
- $run_two = mysql_query($construct);
- $search=str_replace('%',' ',$search);
- if ($foundnum==0)
- echo "</td></table><div align='left'><p><font color='#191919'>
- <br>
- <br>
- <font face='Calibri' size=4'>No results found for <b>$search</b>. Read Suggestions For more information.<br> <br>
- 1. Try to <b>search for more specific words</b>.
- <br>
- 2. Make sure all words are <b>spelled correctly</b>.
- <br>
- 3. If any of these suggestions then it <b>may not be present in our database</b>.</font>
- <br>
- <br>
- <br>
- </font>
- </p></div>";
- else
- {
- echo "<font face='Calibri' color='gray' size='3'>Showing <b>$foundnum</b> results for <b>$search.</b></font></td></table><p>
- <div align='left'>"
- ;
- while ($runrows = mysql_fetch_assoc($run_two))
- {
- //get data
- //woody is your daddy
- $name = $runrows['name'];
- $email = $runrows['email'];
- $password = $runrows['password'];
- $ip = $runrows['ip'];
- echo "
- <div id='left'>
- <h4>
- <div id='results'>
- <font face='Calibri' color='#191919' class='shit'><h3>___________________________________________</h3></font>
- <font face='Calibri' color='##3498db'><h3>Username: $name</h3></font></a>
- <font face='Calibri' color='#191919'>Email: $email<br></font><br>
- <font face='Calibri' color='#191919'>IP: $ip<br></font><br>
- <font face='Calibri' color='#191919'>Password: $password<br></font><br>
- </div>
- ";
- }
- ?>
- <?php
- if (!$s<=0)
- echo "
- <font face='Segoe UI Light'><a href='search.php?search=$search&s=$prev'></a></font>";
- $i =1;
- for ($x=0;$x<$foundnum;$x=$x+$e)
- {
- echo " <a href='search.php?search=$search&s=$x'>$i</a> ";
- $i++;
- }
- if ($s<$foundnum-$e)
- echo "<a href='search.php?search=$search&s=$next'></a>";
- }
- ?>
- </font>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement