Модератор: doliar
SHAHID писал(а):Скорее всего что-то с правами доступа к этой папке,потому что скрипт рабочий и проверен не одним мной.Посмотри что у тебя в привелегиях на топсервере.Можно так же поюзать файл .htacsess,иногда помогает.
SHAHID писал(а):Тогда все понятно.Скрипт проверялся на топ сервере,а что еще надо править в его случае я даже и не знаю,но все таки там видно что-то с правами доступа связано.А ща я напишу скрипчик как сделать 6 скринов в лайтбоксе.
ALTER TABLE `torrents` ADD `image3` TEXT CHARACTER SET cp1251 NOT NULL;
ALTER TABLE `torrents` ADD `image4` TEXT CHARACTER SET cp1251 NOT NULL;
ALTER TABLE `torrents` ADD `image5` TEXT CHARACTER SET cp1251 NOT NULL;
ALTER TABLE `torrents` ADD `image6` TEXT CHARACTER SET cp1251 NOT NULL;
ALTER TABLE `torrents` ADD `image7` TEXT CHARACTER SET cp1251 NOT NULL;
ALTER TABLE `torrents` ADD `image8` TEXT CHARACTER SET cp1251 NOT NULL;
stdhead($tracker_lang['torrent_details']." \"" . $row["name"] . "\"");
?>
<link
rel="stylesheet" href="css/lightbox.css" type="text/css"
media="screen" /> <script src="js/prototype.js"
type="text/javascript"></script><script
src="js/scriptaculous.js?load=effects,builder"
type="text/javascript"></script> <script
src="js/lightbox.js" type="text/javascript"></script>
<?
$res = sql_query("SELECT torrents.free, torrents.free_who, torrents.seeders, categories.id AS cat_id, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, 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.image1, torrents.image2, categories.name AS cat_name, users.username, groups.image FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN users ON torrents.owner = users.id LEFT JOIN groups ON users.groups = groups.id WHERE torrents.id = $id")
torrents.image3, torrents.image4, torrents.image5, torrents.image6, torrents.image7, torrents.image8
tr($tracker_lang['description'], format_comment($row["descr"]), 1, 1);
if ($row["image3"] != "" OR $row["image4"] != "" OR $row["image5"] != "" OR $row["image6"] != "" OR $row["image7"] != "" OR $row["image8"] != "") {
if ($row["image3"] != "")
$img3 = "<a href=\"torrents/images/$row[image3]\" rel=\"lightbox[roadtrip]\"><img border='0' height=80 src='torrents/images/$row[image3]' /></a>";
if ($row["image4"] != "")
$img4 = "<a href=\"torrents/images/$row[image4]\" rel=\"lightbox[roadtrip]\"><img border='0' height=80 src='torrents/images/$row[image4]' /></a>";
if ($row["image5"] != "")
$img5 = "<a href=\"torrents/images/$row[image5]\" rel=\"lightbox[roadtrip]\"><img border='0' height=80 src='torrents/images/$row[image5]' /></a>";
if ($row["image6"] != "")
$img6 = "<a href=\"torrents/images/$row[image6]\" rel=\"lightbox[roadtrip]\"><img border='0' height=80 src='torrents/images/$row[image6]' /></a>";
if ($row["image7"] != "")
$img7 = "<a href=\"torrents/images/$row[image7]\" rel=\"lightbox[roadtrip]\"><img border='0' height=80 src='torrents/images/$row[image7]' /></a>";
if ($row["image8"] != "")
$img8 = "<a href=\"torrents/images/$row[image8]\" rel=\"lightbox[roadtrip]\"><img border='0' height=80 src='torrents/images/$row[image8]' /></a>";
}
tr("Скриншоты", $img3 . " " . $img4 . " " . $img5 . "  " . $img6 . " " . $img7 . " " . $img8, 1);
tr($tracker_lang['images'], $tracker_lang['max_file_size'].": 500kb<br />".$tracker_lang['avialable_formats'].": .gif .jpg .png<br /><b>".$tracker_lang['image']." №1:</b>  <input type=file name=image0 size=80><br /><b>".$tracker_lang['image']." №2:</b>  <input type=file name=image1 size=80>\n", 1);
tr("Скриншоты", $tracker_lang['max_file_size'].": 500kb<br />".$tracker_lang['avialable_formats'].": .gif .jpg .png<br />
<b>Скриншот №1:</b>  <input type=file name=image2 size=80><br />
<b>Скриншот №2:</b>  <input type=file name=image3 size=80><br />
<b>Скриншот №3:</b>  <input type=file name=image4 size=80><br />
<b>Скриншот №4:</b>  <input type=file name=image5 size=80><br />
<b>Скриншот №5:</b>  <input type=file name=image6 size=80><br />
<b>Скриншот №6:</b>  <input type=file name=image7 size=80>\n", 1);
$ret = sql_query("INSERT INTO torrents (search_text, filename, owner, visible, sticky, info_hash, name, size, numfiles, type, descr, ori_descr, free, image1, image2, category, save_as, added, last_action) VALUES (" . implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $sticky, $infohash, $torrent, $totallen, count($filelist), $type, $descr, $descr, $free, $inames[0], $inames[1], $inames[2], 0 + $_POST["type"], $dname))) . ", '" . get_date_time() . "', '" . get_date_time() . "')");
$ret = sql_query("INSERT INTO torrents (search_text, filename, owner, visible, sticky, info_hash, name, size, numfiles, type, descr, ori_descr, free, image1, image2, image3, image4, image5, image6, image7, image8, category, save_as, added, last_action) VALUES (" . implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $sticky, $infohash, $torrent, $totallen, count($filelist), $type, $descr, $descr, $free, $inames[0], $inames[1], $inames[2], $inames[3], $inames[4], $inames[5], $inames[6], $inames[7], 0 + $_POST["type"], $dname))) . ", '" . get_date_time() . "', '" . get_date_time() . "')");
for ($x=0; $x < 2; $x++) {
for ($x=0; $x < 8; $x++) {
tr($tracker_lang['images'], "<input type=radio name=img1action value='keep' checked>Оставить картинку №1  "."<input type=radio name=img1action value='delete'>Удалить картинку №1  "."<input type=radio name=img1action value='update'>Обновить картинку №1<br /><b>Картинка №1:</b>  <input type=file name=image0 size=80> <br /><br /> <input type=radio name=img2action value='keep' checked>Оставить картинку №2  "."<input type=radio name=img2action value='delete'>Удалить картинку №2  "."<input type=radio name=img2action value='update'>Обновить картинку №2<br /><b>Картинка №2:</b>  <input type=file name=image1 size=80>", 1);
tr("Скриншоты","<input type=radio name=img3action value='keep' checked>Оставить скрин №1  "."<input type=radio name=img3action value='delete'>Удалить скрин №1  "."<input type=radio name=img3action value='update'>Обновить скрин №1<br /><b>Скрин №1:</b>  <input type=file name=image2 size=80> <br /><br /> <input type=radio name=img4action value='keep' checked>Оставить скрин №2  "."<input type=radio name=img4action value='delete'>Удалить скрин №2  "."<input type=radio name=img4action value='update'>Обновить скрин №2<br /><b>Скрин №2:</b>  <input type=file name=image3 size=80> <br /><br /> <input type=radio name=img5action value='keep' checked>Оставить скрин №3  "."<input type=radio name=img5action value='delete'>Удалить скрин №3  "."<input type=radio name=img5action value='update'>Обновить скрин №3<br /><b>Скрин №3:</b>  <input type=file name=image4 size=80> <br /><br /> <input type=radio name=img6action value='keep' checked>Оставить скрин №4  "."<input type=radio name=img6action value='delete'>Удалить скрин №4  "."<input type=radio name=img6action value='update'>Обновить скрин №4<br /><b>Скрин №4:</b>  <input type=file name=image5 size=80> <br /><br /> <input type=radio name=img7action value='keep' checked>Оставить скрин №5  "."<input type=radio name=img7action value='delete'>Удалить скрин №5  "."<input type=radio name=img7action value='update'>Обновить скрин №5<br /><b>Скрин №5:</b>  <input type=file name=image6 size=80> <br /><br /> <input type=radio name=img8action value='keep' checked>Оставить скрин №6  "."<input type=radio name=img8action value='delete'>Удалить скрин №6  "."<input type=radio name=img8action value='update'>Обновить скрин №6<br /><b>Скрин №6:</b>  <input type=file name=image7 size=80>", 1);
$res = sql_query("SELECT owner, filename, save_as, image1, image2 FROM torrents WHERE id = $id");
$res = sql_query("SELECT owner, filename, save_as, image1, image2, image3, image4, image5, image6, image7, image8 FROM torrents WHERE id = $id");
$img1action = $_POST['img1action'];
if ($img1action == "update")
$updateset[] = "image1 = " .sqlesc(uploadimage(0, $row[image1], $id));
if ($img1action == "delete") {
if ($row[image1]) {
$del = unlink("torrents/images/$row[image1]");
$updateset[] = "image1 = ''";
}
}
$img2action = $_POST['img2action'];
if ($img2action == "update")
$updateset[] = "image2 = " .sqlesc(uploadimage(1, $row[image2], $id));
if ($img2action == "delete") {
if ($row[image2]) {
$del = unlink("torrents/images/$row[image2]");
$updateset[] = "image2 = ''";
}
}
$img3action = $_POST['img3action'];
if ($img3action == "update")
$updateset[] = "image3 = " .sqlesc(uploadimage(2, $row[image3], $id));
if ($img3action == "delete") {
if ($row[image3]) {
$del = unlink("torrents/images/$row[image3]");
$updateset[] = "image3 = ''";
}
}
$img4action = $_POST['img4action'];
if ($img4action == "update")
$updateset[] = "image4 = " .sqlesc(uploadimage(3, $row[image4], $id));
if ($img4action == "delete") {
if ($row[image4]) {
$del = unlink("torrents/images/$row[image4]");
$updateset[] = "image4 = ''";
}
}
$img5action = $_POST['img5action'];
if ($img5action == "update")
$updateset[] = "image5 = " .sqlesc(uploadimage(4, $row[image5], $id));
if ($img5action == "delete") {
if ($row[image5]) {
$del = unlink("torrents/images/$row[image5]");
$updateset[] = "image5 = ''";
}
}
$img6action = $_POST['img6action'];
if ($img6action == "update")
$updateset[] = "image6 = " .sqlesc(uploadimage(5, $row[image6], $id));
if ($img6action == "delete") {
if ($row[image6]) {
$del = unlink("torrents/images/$row[image6]");
$updateset[] = "image6 = ''";
}
}
$img7action = $_POST['img7action'];
if ($img7action == "update")
$updateset[] = "image7 = " .sqlesc(uploadimage(6, $row[image7], $id));
if ($img7action == "delete") {
if ($row[image7]) {
$del = unlink("torrents/images/$row[image7]");
$updateset[] = "image7 = ''";
}
}
$img8action = $_POST['img8action'];
if ($img8action == "update")
$updateset[] = "image8 = " .sqlesc(uploadimage(7, $row[image8], $id));
if ($img8action == "delete") {
if ($row[image8]) {
$del = unlink("torrents/images/$row[image8]");
$updateset[] = "image8 = ''";
}
}
$tracker_lang['images'] = 'Картинки';
$tracker_lang['images'] = 'Постер';
$img1 = "<a href='viewimage.php?pic=$row[image1]'><img border='0' src='thumbnail.php?$row[image1]' /></a>";
if ($row["image2"] != "")
$img2 = "<a href='viewimage.php?pic=$row[image2]'><img border='0' src='thumbnail.php?$row[image2]' /></a>";
$img1 = "<a href=\"torrents/images/$row[image1]\" rel=\"lightbox[roadtrip]\"><img border='0' height=400 src='thumbnail.php?$row[image1]' /></a>";
if ($row["image2"] != "")
$img2 = "<a href=\"torrents/images/$row[image2]\" rel=\"lightbox[roadtrip]\"><img border='0' height=400 src='thumbnail.php?$row[image2]' /></a>";
if ($row["image2"]) {
$img2 = "torrents/images/$row[image2]";
$del = unlink($img2);
}
if ($row["image3"]) {
$img3 = "torrents/images/$row[image3]";
$del = unlink($img3);
}
if ($row["image4"]) {
$img4 = "torrents/images/$row[image4]";
$del = unlink($img4);
}
if ($row["image5"]) {
$img5 = "torrents/images/$row[image5]";
$del = unlink($img5);
}
if ($row["image6"]) {
$img6 = "torrents/images/$row[image6]";
$del = unlink($img6);
}
if ($row["image7"]) {
$img7 = "torrents/images/$row[image7]";
$del = unlink($img7);
}
if ($row["image8"]) {
$img8 = "torrents/images/$row[image8]";
$del = unlink($img8);
}
$res = sql_query("SELECT name,owner,seeders,image1,image2 FROM torrents WHERE id = $id");
$res = sql_query("SELECT name,owner,seeders,image1,image2,image3,image4,image5,image6,image7,image8 FROM torrents WHERE id = $id");
$inames[0], $inames[1]
, $inames[2], $inames[3], $inames[4], $inames[5], $inames[6], $inames[7],
Вернуться в Установка веб-приложений
Сейчас этот форум просматривают: Yandex [bot] и гости: 1