Upload 2 Images With Torrent
Files to be edited:
upload.php takeupload.php edit.php takeedit.php delete.php details.php Files to be added: thumbnail.php viewimage.php in database add this Code:
ALTER TABLE `torrents` ADD `image1` TEXT NOT NULL AFTER `ori_descr` , Code:
tr("Torrent file", "\n", 1); Code:
tr("Torrent file", "\n", 1); find Code:
tr("Torrent name", " Code:
tr("Images", "Max File Size: 500kb Code:
Code:
in takeupload find Code:
if (!isset($_FILES["file"])) Code:
if (!isset($_FILES["tfile"])) Code:
$f = $_FILES["file"]; Code:
$f = $_FILES["tfile"]; Code:
// Replace punctuation characters with spaces Code:
////////////////////////////////////////////// Code:
$ret = mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, size, numfiles, type, descr, ori_descr, category, save_as, added, last_action, nfo) VALUES (" . implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $infohash, $torrent, $totallen, count($filelist), $type, $descr, $descr, 0 + $_POST["type"], $dname))) . ", '" . get_date_time() . "', '" . get_date_time() . "', $nfo)"); replace with Code:
$ret = mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, size, numfiles, type, descr, ori_descr, image1, image2, category, save_as, added, last_action, nfo) VALUES (" . implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $infohash, $torrent, $totallen, count($filelist), $type, $descr, $descr, $inames[0], $inames[1], 0 + $_POST["type"], $dname))) . ", '" . get_date_time() . "', '" . get_date_time() . "', $nfo)"); in edit.php find Code:
tr("Torrent name", "", 1); Code:
tr("Images", "Keep Image 1  "."Delete Image 1  "."Update Image 1 Code:
function bark($msg) { Code:
//////////////////////////////////////////////// Code:
$res = mysql_query("SELECT owner, filename, save_as FROM torrents WHERE id = $id"); Code:
$res = mysql_query("SELECT owner, filename, save_as, image1, image2 FROM torrents WHERE id = $id"); Code:
$dname = $row["save_as"]; Code:
$img1action = $_POST['img1action']; Code:
$res = mysql_query("SELECT name,owner,seeders FROM torrents WHERE id = $id"); Code:
$res = mysql_query("SELECT name,owner,seeders,image1,image2 FROM torrents WHERE id = $id"); Code:
deletetorrent($id); Code:
if ($row["image1"]) { Code:
$res = mysql_query("SELECT torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, LENGTH(torrents.nfo) AS nfosz, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(torrents.last_action) AS lastseed, torrents.numratings, torrents.name, IF(torrents.numratings < $minvotes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.numfiles, torrents.nfo, torrents.category, categories.name AS cat_name, users.username FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id") or sqlerr(); Code:
$res = mysql_query("SELECT torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, LENGTH(torrents.nfo) AS nfosz, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(torrents.last_action) AS lastseed, torrents.numratings, torrents.name, IF(torrents.numratings < $minvotes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.numfiles, torrents.nfo, torrents.image1, torrents.image2, torrents.category, categories.name AS cat_name, users.username FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id") or sqlerr(); Code:
if (!empty($row["descr"])) Code:
if ($row["image1"] != "" OR $row["image2"] != "") { create a new php document called 'thumbnail.php' - Add into Code:
# Constants Code:
|
thanks
Thanks man ! :chch:
|
viewimage.php
not working for me |
Quote:
Code:
define(IMAGE_BASE, '/home/vixbit/public_html/trader/torrents/images/'); |
yes i edit thumbail and wievimages not working...
|
Quote:
|
works here boys :-D
|
Code:
Parse error: syntax error, unexpected '/', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /public_html/th/viewimage.php on line 11 I put it here Code:
tr("" .TORRENT_FILE. "", "\n", 1); |
upload.php
Code:
tr("Torrent file", "\n", 1); |
THank you
|
All times are GMT +2. The time now is 06:13. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.