Home > Panele > losowe strony uzytkownik

losowe strony uzytkownik

Dodane przez: piciu
opis:
kod wyświetla losowe strony www
z profilu użytkowników
Kod:
  1. openside("Losowe strony Użytkowników");
  2. if (!defined("IN_FUSION")) { die("Access Denied"); }
  3.  
  4. if (file_exists(INFUSIONS."users_websites_panel/locale/".$settings['locale'].".php")) {
  5. include INFUSIONS."users_websites_panel/locale/".$settings['locale'].".php";
  6. } else {
  7. include INFUSIONS."users_websites_panel/locale/English.php";
  8. }
  9.  
  10. openside($locale['uwp_001']);
  11. // Look for Data in the Rows
  12. $rows = dbquery(
  13. "SELECT user_web
  14. FROM ".DB_USERS."
  15. WHERE user_web !=''"
  16. );
  17.  
  18. // If there's any Data in the Rows
  19. if ($rows) {
  20. // Get Latest Added Websites
  21. $result = dbquery(
  22. "SELECT user_id, user_name, user_web
  23. FROM ".DB_USERS."
  24. WHERE user_web !=''
  25. ORDER BY user_id DESC LIMIT 0,5"
  26. );
  27.  
  28. echo "<div class='side-label small'><b>".$locale['uwp_002']."</b></div>\n";
  29. while ($data = dbarray($result)) {
  30. $itemsubject = trimlink($data['user_web'], 23);
  31. if (strstr($data['user_web'], "http://") || strstr($data['user_web'], "https://")) {
  32. echo "<div class='side'><a href='".$data['user_web']."' target='_blank' title='".$locale['uwp_003']." ".$data['user_name']."".$locale['uwp_004']."'>".THEME_BULLET." ".$itemsubject."</a></div>\n";
  33. } else {
  34. echo "<div class='side'><a href='http://".$data['user_web']."' target='_blank' title='".$locale['uwp_003']." ".$data['user_name']."".$locale['uwp_004']."'>".THEME_BULLET." ".$itemsubject."</a></div>\n";
  35. }
  36. }
  37.  
  38. // Get Random Websites
  39. $result2 = dbquery(
  40. "SELECT user_id, user_name, user_web
  41. FROM ".DB_USERS."
  42. WHERE user_web !=''
  43. ORDER BY RAND() DESC LIMIT 0,5"
  44. );
  45.  
  46. echo "<div class='side-label small'><b>".$locale['uwp_005']."</b></div>\n";
  47. while ($data2 = dbarray($result2)) {
  48. $itemsubject2 = trimlink($data2['user_web'], 23);
  49. if (strstr($data2['user_web'], "http://") || strstr($data2['user_web'], "https://")) {
  50. echo "<div class='side'><a href='".$data2['user_web']."' target='_blank' title='".$locale['uwp_003']." ".$data2['user_name']."".$locale['uwp_004']."'>".THEME_BULLET." ".$itemsubject2."</a></div>\n";
  51. } else {
  52. echo "<div class='side'><a href='http://".$data2['user_web']."' target='_blank' title='".$locale['uwp_003']." ".$data2['user_name']."".$locale['uwp_004']."'>".THEME_BULLET." ".$itemsubject2."</a></div>\n";
  53. }
  54. }
  55.  
  56. // See All Websites
  57. echo "<div class='side-label small'><b>".$locale['uwp_006']."</b></div>\n";
  58. echo "<div class='side'><a href='".INFUSIONS."users_websites_panel/users_websites.php' title='".$locale['uwp_007']."'>".THEME_BULLET." ".$locale['uwp_007']."</a></div>\n";
  59.  
  60. // If there's no Data in the Rows..
  61. } else {
  62. echo "".$locale['uwp_007'];
  63. }
  64. closeside();

©