SHARE
TWEET

Untitled

a guest May 22nd, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $dbuser="nja";
  3. $dbpass="nja";
  4. $dbname="slavija_amxx";  //the name of the database
  5. $chandle = mysql_connect("localhost", $dbuser, $dbpass)
  6.     or die("Greska pri konekciji na bazu podataka, kontaktiraj nekog od admina da poprave :s");
  7. //echo "Connected to database server<br>";
  8. mysql_select_db($dbname, $chandle) or die ($dbname . " Baza podataka nije pronadjena, kontaktiraj nekog od admina da poprave :S" . $dbuser);
  9. //echo "Database " .  $database . " is selected<br><br><br>";
  10.  
  11.  
  12. $plname = $_POST["plname"];
  13. $plup = $_POST["plup"];
  14.  
  15.  
  16. if ($plname == "" && $plup == "")
  17. echo "Morate da ukucate rec koju hocete da trazite  <br> <a href='plugin_search.php'>Nazad </a>";
  18.  
  19. if ($plname != "" && $plup != "")
  20. echo "ne mozes zajedno da searchujes <br> <a href='plugin_search.php'>Nazad </a>";
  21.  
  22. if($plname != "" && $plup == "")
  23. {
  24. $query1= "SELECT * FROM phpbb_plugins WHERE plugin_name LIKE '%".$plname."%' OR plugin_first_post LIKE '%".$plname."%'";
  25. $qe1 = mysql_query($query1);
  26. //$qr1 = mysql_fetch_array($qe1);
  27.  
  28. if (mysql_num_rows($qe1)<1)
  29. echo "Nista nije pronadjeno :( <br> <a href='plugin_search.php'>Nazad </a>";
  30. else {
  31. echo "
  32.         <br><table border=1 bordercolor=#0099FF width=100%>
  33.         <tr>
  34.         <td width=10><b>ID</b></td>
  35.         <td width=350><b>Plugin name</b></td>
  36.         <td width=150><b>Author</b></td>
  37.         </tr>";
  38.    
  39.     while($row = mysql_fetch_array($qe1))
  40.     {
  41.         echo "
  42.             </tr>
  43.             <td>".$row['pluginID']."</td>
  44.             <td>".$row['plugin_name']."</td>
  45.             <td>".$row['plugin_uploader']."</td>
  46.             </tr>";
  47.     }
  48.    
  49.     echo "</table>";
  50.  
  51.  
  52. }
  53. }
  54.  
  55. if($plname == "" && $plup != "")
  56. {
  57. $query2= "SELECT * FROM phpbb_plugins WHERE plugin_uploader LIKE '%".$plup."%'";
  58. $qe2 = mysql_query($query2);
  59. //$qr1 = mysql_fetch_array($qe1);
  60.  
  61. if (mysql_num_rows($qe2)<1)
  62. echo "Nista nije pronadjeno :( <br> <a href='plugin_search.php'>Nazad </a>";
  63. else {
  64. echo "
  65.         <br><table border=1 bordercolor=#0099FF width=100%>
  66.         <tr>
  67.         <td width=10><b>ID</b></td>
  68.         <td width=350><b>Plugin name</b></td>
  69.         <td width=150><b>Author</b></td>
  70.         </tr>";
  71.    
  72.     while($row = mysql_fetch_array($qe2))
  73.     {
  74.         echo "
  75.             </tr>
  76.             <td>".$row['pluginID']."</td>
  77.             <td>".$row['plugin_name']."</td>
  78.             <td>".$row['plugin_uploader']."</td>
  79.             </tr>";
  80.     }
  81.    
  82.     echo "</table>";
  83.  
  84.  
  85. }
  86. }
  87. mysql_close($chandle);
  88. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top