her er de filer der styre det hele i TorrentTrader-v2.06
Bbcode.php - BDecode.php – benc.php – Bencode.php – cache.php – cleanup.php – config.php –functions.php – mysql.php - parse.php - serverload4.php - serverload5.php – tzs.php - account.php - account-ce.php - account-confirm.php - account-confirm-ok.php - account-details.php - account-login.php - account-logout. php - account-recover.php - account-signup.php – admincp.php – announce.php - backup-database.php - blocks-edit.php – comments.php – download.php – forums.php – index.php – invite.php – mailbox.php - mailbox-functions.php – rss.php – scrape.php – shoutbox.php – staff.php – tagsphp - take-themephp - teams-create.php - teams-view.php - rss.php – block.php - .htaccess
Det er index.php
- <?
- //
- // TorrentTrader v2.x
- // This file was last updated: 20/July/2007
- //
- // http://www.torrenttrader.org
- //
- //
- require_once("backend/functions.php");
- dbconn(true);
-
- stdhead("Home");
-
- //check
- if (file_exists("check.php") && $CURUSER["class"] == 7){ show_error_msg("WARNING", "Check.php stadig eksisterer, skal du slette eller omdøbe filen, da det kan udgøre en sikkerhedsrisiko<BR><BR><a href=check.php>Vis Tjek.php</a> - Bruges til at tjekke din config
- !<BR><BR>",0);
- }
-
- //Site Notice
- if ($site_config['SITENOTICEON']){
- begin_frame("" . NOTICE . "");
- echo stripslashes($site_config['SITENOTICE']);
- end_frame();
- }
-
- //Site News
- if ($site_config['NEWSON']){
- begin_frame("News");
- $res = mysql_query("SELECT * FROM news WHERE ADDDATE(added, INTERVAL 45 DAY) > '".get_date_time()."' ORDER BY added DESC LIMIT 10") or die(mysql_error());
- if (mysql_num_rows($res) > 0){
- print("<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td>\n<ul>");
- $news_flag = 0;
-
- while($array = mysql_fetch_array($res)){
- $user = mysql_fetch_assoc(mysql_query("SELECT username FROM users WHERE id = $array[userid]")) or die(mysql_error());
-
- $numcomm = number_format(get_row_count("comments", "WHERE news='".$array['id']."'"));
-
- if ($news_flag < 2) { //show first 2 items expanded
-
- print("<BR><a href=\"javascript: klappe_news('a".$array['id']."')\"><img border=\"0\" src=\"".$site_config["SITEURL"]."/images/minus.gif\" id=\"pica".$array['id']."\" alt=\"Show/Hide\">");
- print(" <b>". $array['title'] . "</b></a> - <B>Posted:</B> " . date("d-M-y", utc_to_tz_time($array['added'])) . " <B>By:</B> $user[username]");
-
- print("<div id=\"ka".$array['id']."\" style=\"display: block;\"> ".format_comment($array["body"],0)." <BR><BR>Comments (<a href=comments.php?type=news&id=".$array['id'].">".$numcomm."</a>)</div><br> ");
-
- $news_flag = ($news_flag + 1);
-
- }else{
-
- print("<BR><a href=\"javascript: klappe_news('a".$array['id']."')\"><img border=\"0\" src=\"".$site_config["SITEURL"]."/images/plus.gif\" id=\"pica".$array['id']."\" alt=\"Show/Hide\">");
- print(" <b>". $array['title'] . "</b></a> - <B>Posted:</B> " . date("d-M-y",utc_to_tz_time($array['added'])) . " <B>By:</B> $user[username]");
-
- print("<div id=\"ka".$array['id']."\" style=\"display: none;\"> ".format_comment($array["body"],0)." <BR><BR>Comments (<a href=comments.php?type=news&id=".$array['id'].">".number_format($numcomm)."</a>)</div><br> ");
- }
- }
- print("</ul></td></tr></table>\n");
- }else{
- echo "<BR><b>No news currently at this time</b>";
- }
- end_frame();
- }
-
-
-
- if ($site_config['SHOUTBOX']){
- begin_frame("Shoutbox");
- echo '<IFRAME name="shout_frame" src="'.$site_config["SITEURL"].'/shoutbox.php" frameborder="0" marginheight="0" marginwidth="0" width="99%" height="210" width=350 scrolling="no" align="middle"></IFRAME>';
- echo "(Shoutbox vil automatisk opdatere hvert 5 minut)<BR>";
- end_frame();
- }
-
- // latest torrents
- begin_frame("Seneste Torrents");
-
- print("<BR><CENTER><a href=torrents.php>".BROWSE_TORRENTS."</a> - <a href=torrents-search.php>".SEARCH_TITLE."</a></CENTER><BR>");
-
- if ($site_config["MEMBERSONLY"] && !$CURUSER) {
- echo "<BR><BR><b><CENTER>Du er ikke logget in Kun medlemmer kan se Torrents Venligst Log ind eller Tilmeld.</CENTER><BR><BR>";
- } else {
- $query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND banned = 'no' ORDER BY id DESC LIMIT 25";
- $res = mysql_query($query) or die(mysql_error());
- if (mysql_num_rows($res)) {
- torrenttable($res);
- }else {
- show_error_msg("" . NOTHING_FOUND . "", "" . NO_UPLOADS . "",0);
- }
- if ($CURUSER)
- mysql_query("UPDATE users SET last_browse=".gmtime()." WHERE id=$CURUSER[id]");
-
- }
- end_frame();
-
-
- if ($site_config['DISCLAIMERON']){
- begin_frame("" . DISCLAIMER . "");
- echo stripslashes($site_config['DISCLAIMERTXT']);
- end_frame();
- }
-
-
- stdfoot();
- ?>
Indlæg senest redigeret d. 25.05.2011 15:02 af Bruger #16639