This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathupload.php
102 lines (80 loc) · 3.52 KB
/
upload.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
/*
+------------------------------------------------
| TBDev.net BitTorrent Tracker PHP
| =============================================
| by CoLdFuSiOn
| (c) 2003 - 2011 TBDev.Net
| http://www.tbdev.net
| =============================================
| svn: http://sourceforge.net/projects/tbdevnet/
| Licence Info: GPL
+------------------------------------------------
| $Date$
| $Revision$
| $Author$
| $URL$
+------------------------------------------------
*/
require_once "include/bittorrent.php";
require_once "include/user_functions.php";
require_once "include/html_functions.php";
dbconn(false);
loggedinorreturn();
$lang = array_merge( load_language('global'), load_language('upload') );
$HTMLOUT = '';
if ($CURUSER['class'] < UC_UPLOADER)
{
stderr($lang['upload_sorry'], $lang['upload_no_auth']);
}
$js = "<script type='text/javascript' src='scripts/bbcode2text.js'></script>";
$HTMLOUT .= "
<form name='bbcode2text' enctype='multipart/form-data' action='takeupload.php' method='post'>
<input type='hidden' name='MAX_FILE_SIZE' value='{$TBDEV['max_torrent_size']}' />";
$HTMLOUT .="
<div class='cblock'>
<div class='cblock-header'>{$lang['upload_title']}</div>
<div class='cblock-lb'>{$lang['upload_announce_url']} {$TBDEV['announce_urls'][0]}</div>
<div class='cblock-content'>";
$HTMLOUT .= "
<table border='0' cellspacing='0' cellpadding='6'>
<tr>
<td class='heading' valign='top' align='right'>{$lang['upload_torrent']}</td>
<td valign='top' align='left'><input type='file' name='file' size='80' /></td>
</tr>
<tr>
<td class='heading' valign='top' align='right'>{$lang['upload_name']}</td>
<td valign='top' align='left'><input type='text' name='name' size='80' /><br />({$lang['upload_filename']})</td>
</tr>
<tr>
<td class='heading' valign='top' align='right'>{$lang['upload_nfo']}</td>
<td valign='top' align='left'><input type='file' name='nfo' size='80' /><br />({$lang['upload_nfo_info']})</td>
</tr>
<tr>
<td class='heading' valign='top' align='right'>{$lang['upload_description']}</td>
<td valign='top' align='left'>";
$HTMLOUT .= bbcode2textarea( 'body' );
$HTMLOUT .= "<br />({$lang['upload_html_bbcode']})</td>
</tr>";
$s = "<select name='type'>\n<option value='0'>({$lang['upload_choose_one']})</option>\n";
$cats = genrelist();
foreach ($cats as $row)
{
$s .= "<option value='{$row["id"]}'>" . htmlsafechars($row["name"]) . "</option>\n";
}
$s .= "</select>\n";
$HTMLOUT .= "<tr>
<td class='heading' valign='top' align='right'>{$lang['upload_type']}</td>
<td valign='top' align='left'>$s</td>
</tr>
<tr>
<td align='center' colspan='2'><input type='submit' class='btn' value='{$lang['upload_submit']}' /></td>
</tr>
</table>";
$HTMLOUT .= "
</div></div>";
$HTMLOUT .= "</form>";
$HTMLOUT .= "<div class='clear'> </div>";
////////////////////////// HTML OUTPUT //////////////////////////
print stdhead($lang['upload_stdhead'], $js) . $HTMLOUT . stdfoot();
?>