SHARE
TWEET

Untitled

a guest Jan 12th, 2017 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. index.php?option=com_content&view=article&id=10
  2.    
  3. <?php
  4. include "php/dbc.php";
  5. $dbcnx = @mysql_connect($DB_HOST,$DB_USER,$DB_PASSWORD);
  6. mysql_query("SET character_set_results = 'utf8'", $dbcnx);
  7. mysql_set_charset('utf8');
  8. mysql_select_db($DB_NAME, $dbcnx);
  9.  
  10. $news = mysql_query("SELECT * FROM law_menu WHERE parent = 27 AND ordering <> 21 ORDER BY RAND() LIMIT 6");
  11.  
  12. while($row=mysql_fetch_assoc($news)) {
  13.     echo "<a class='bankmoduleid_".$row['id']."' href='".$row['reallink']."'>";
  14.  
  15.     $parts = parse_url($row['link']);
  16.     parse_str($parts['query'], $query);
  17.     $bank_id = $query['id'];
  18.  
  19.     $new = mysql_query("SELECT * FROM law_content WHERE id = $bank_id");
  20.     while($bankid=mysql_fetch_assoc($new)) {
  21.         echo "<img src='/images/".$bank_id."' />".$row['name']."</a>";
  22.     }
  23. }
  24. mysql_close($dbcnx);
  25. ?>
RAW Paste Data
Top