/TBDev/installer_v4_1/multidetails.php

https://github.com/cybernet/CyBerFuN-CoDeX · PHP · 57 lines · 52 code · 3 blank · 2 comment · 4 complexity · 8fabe40b887ca2992dcc3c7a1b0a976a MD5 · raw file

  1. <?php
  2. if (!extension_loaded('zlib')) {
  3. ob_start("ob_gzhandler");
  4. }
  5. require_once("include/bittorrent.php");
  6. require_once("include/bbcode_functions.php");
  7. dbconn(false);
  8. maxcoder();
  9. if(!logged_in())
  10. {
  11. header("HTTP/1.0 404 Not Found");
  12. // moddifed logginorreturn by retro//Remember to change the following line to match your server
  13. print("<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 ".$SITENAME." Server at ".$_SERVER['SERVER_NAME']." Port 80</address></body></html>\n");
  14. die();
  15. }
  16. stdhead("Multi Upload");
  17. print("<table border=1 cellpadding=4 width=35%> ");
  18. $ids = array();
  19. $ids[] = 0 + $_GET["id1"];
  20. $ids[] = 0 + $_GET["id2"];
  21. $ids[] = 0 + $_GET["id3"];
  22. $ids[] = 0 + $_GET["id4"];
  23. $ids[] = 0 + $_GET["id5"];
  24. // this is the page which is displayed if the uploader has just uplaoded the torrents//
  25. if (array_key_exists('uploaded', $_GET) && $_GET["uploaded"]) {
  26. print("<h2>Successfully uploaded!</h2>\n");
  27. print("<p>You can start downloading them now and start seeding. <b>Note</b> that the torrent won't be visible until you do that!</p>\n");
  28. $res = mysql_query("SELECT torrents.filename FROM torrents WHERE torrents.id=$ids[0] OR torrents.id=$ids[1] OR torrents.id=$ids[2] OR torrents.id=$ids[3] OR torrents.id=$ids[4];") or sqlerr();
  29. $i = 0;
  30. while ($row = mysql_fetch_array($res)) {
  31. print("<tr><td><a class=\"index\" href=\"download.php/$ids[$i]/" . rawurlencode($row["filename"]) . "\">" . htmlspecialchars($row["filename"]) . "</a></td></tr>");
  32. $i++;
  33. }
  34. print("</table>");
  35. // this is the page which is displayed when a user views the uploaded torrents from the shoutbox link//
  36. } else {
  37. print("<h2>New Torrents have been Uploaded!</h2>\n");
  38. print("<p>Click on the Torrents below to see the full description or alternatively click the 'Download' Button to Download..now</p>\n");
  39. $res = mysql_query("SELECT * FROM torrents WHERE torrents.id=$ids[0] OR torrents.id=$ids[1] OR torrents.id=$ids[2] OR torrents.id=$ids[3] OR torrents.id=$ids[4];") or sqlerr();
  40. print("<tr><td class='colhead'><b>Torrent Description</b></td><td class='colhead'><img src=\"pic/download.gif\" /></td></tr>");
  41. $i = 0;
  42. while ($row = mysql_fetch_array($res)) {
  43. print("<tr><td><a class=\"index\" href='$BASEURL/details.php?id=$ids[$i]'\>" . htmlspecialchars($row["name"]) . "</a></td><td><a class=\"index\" href=\"download.php/$ids[$i]/" . rawurlencode($row["filename"]) . "\"><img src=\"pic/download.gif\" /></a></td></tr>");
  44. $i++;
  45. }
  46. print("</table>");
  47. print("<br />");
  48. }
  49. stdfoot();
  50. ?>