Guest User

Untitled

a guest
Feb 19th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.15 KB | None | 0 0
  1. <?
  2. ob_start("ob_gzhandler");
  3. require "include/bittorrent.php";
  4. dbconn(true);
  5. loggedinorreturn();
  6. //dbconn(false);
  7. stdhead();
  8. //begin_main_frame();
  9.  
  10. print("<div class=\"fborder\" style=\"width:860px;\"><h2 style=\"text-align:left; padding-left:10px;\">" . $SITENAME . " iesaka");
  11.   $res = mysql_query("SELECT movmod FROM access WHERE movmod = '$CURUSER[id]'") or sqlerr();
  12.   $arr = mysql_fetch_assoc($res);
  13.   $movmod = $arr["movmod"];
  14.  
  15. if (get_user_class() >= UC_MODERATOR || $CURUSER[id] == $movmod) {
  16.     echo(" - <font class=\"small\">[<a class=\"altlink\" href=\"moviesadd.php\"><span class=\"modify\">".ADD."</span></a>]</font>");
  17.     echo(" - <font class=\"small\">[<a class=\"altlink\" href=\"moviesedit.php\"><span class=\"modify\">MovieModi</span></a>]</font>");
  18.     }
  19.     echo("</h2><div class=\"movies\">");
  20. //print("</h2><a href=\"javascript: klappe_news('a130".$array['id']."')\"><img border=\"0\" src=\"pic/plus.gif\" id=\"pica".$array['id']."\" alt=\"Rādīt/Paslēpt\"></a><div id=\"ka130".$array['id']."\" style=\"display: none;\"><p>\n");
  21. $res = mysql_query("SELECT * FROM movies ORDER BY added DESC LIMIT 100") or sqlerr(__FILE__, __LINE__);
  22. if (mysql_num_rows($res) > 0)
  23. {
  24.     print("<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\" style=\"background:transparent\" width=\"100%\"><tr><td style=\"border:none;\">\n");
  25.  
  26. $file = "cache/movies.txt";
  27. $input = "SELECT * FROM movies ORDER BY added DESC LIMIT 100";
  28. $expire = 60*5;  //60*5
  29. $arr1 = cache_mysql($file,$expire,$input);
  30. $count = 0;
  31. if ($arr1)
  32. foreach ($arr1 as $arr)
  33.     {
  34.         if($count % 4 == 0)
  35.             {
  36.             // Multiple of 4
  37.                 echo '</tr>';
  38.                 echo '<tr>';
  39.             }
  40.     print("<td style=\"border:none; background:none;\">");
  41. //  begin_frame();
  42.     print("<div class=\"posters\">");
  43.     print("<div style=\"height:300px\"><h4>".format_comment($arr['name'])."</h4>");
  44.     print(format_comment("[url=" . $arr['url'] . "][img=" . $arr['body'] . "][/url]"));
  45.   print("</div>");
  46.     if($arr["imdb"] != "")
  47.     print("<br /><div class=\"videogallery\">" . format_comment("[b][url=" . $arr['imdb'] . "][img=$DEFAULTBASEURL/pic/imdb.gif][/url][/b]"));
  48.     if($arr["youtube"] != "")
  49.     {
  50.     $youtubevideo = str_replace("watch?v=", "v/", $arr['youtube']);
  51.     print("<a rel=\"#voverlay\" href=\"" . $youtubevideo . "?autoplay=1&rel=0&enablejsapi=1&playerapiid=ytplayer\"><img style=\"width:60px;\" alt=\"youtube\" src=\"$DEFAULTBASEURL/pic/youtube.png\"/></a></div>"/* . format_comment("[b][url=" . $arr['youtube'] . "][img=$DEFAULTBASEURL/pic/youtube.png][/url][/b]")*/);
  52.     }
  53.     if($arr["info"] != "")
  54.     print("" . format_comment($arr['info']) . "");
  55.     print("</div>");
  56. //  end_frame();
  57.     print("</td>");
  58. /*    if (get_user_class() >= UC_MODERATOR || $CURUSER[username] == $tmod)
  59.     {
  60.         print(" <font size=\"-2\">[<a class=altlink href=turniri.php?action=edit&gameid=" . $arr['id'] . "&returnto=" . urlencode($_SERVER['PHP_SELF']) . "><b>E</b></a>]</font>");
  61.         print(" <font size=\"-2\">[<a class=altlink href=turniri.php?action=delete&gameid=" . $arr['id'] . "&returnto=" . urlencode($_SERVER['PHP_SELF']) . "><b>D</b></a>]</font>");
  62.     }*/
  63.     $count++;
  64.   }
  65.   print("</tr></table></div></div>\n");
  66. }
  67. //end_main_frame();
  68. stdfoot();
  69. ?>
Add Comment
Please, Sign In to add comment