Вот вылаживаю скрины
в delete.php ищем
image1,image2 FROM torrents WHERE id = $id");
и заменяем на
image1,image2,image3,image4 FROM torrents WHERE id = $id");
ищем
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); }
в details.php ищем
torrents.image1, torrents.image2,
после добавляем
torrents.image3, torrents.image4,
ищем
if ($row["image1"] != "" OR $row["image2"] != "") { if ($row["image1"] != "") $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>"; tr($tracker_lang['images'], $img1 . "  " . $img2, 1); } if (!empty($row["descr"])) tr($tracker_lang['description'], format_comment($row["descr"]), 1, 1);
заменяем на
if ($row["image1"] != "") { if ($row["image1"] != "") $img1 = "<a href='viewimage.php?pic=$row[image1]'><img border='0' src='thumbnail.php?$row[image1]' /></a>"; tr($tracker_lang['image'], $img1, 1); } if (!empty($row["descr"])) tr($tracker_lang['description'], format_comment($row["descr"]), 1, 1); if ($row["image2"] != "" OR $row["image3"] != "" OR $row["image4"] != "") if ($row["image2"] != "") $img2 = "<a href='viewimage.php?pic=$row[image2]'><img border='0' src='thumbnail.php?$row[image2]' /></a>"; if ($row["image3"] != "") $img3 = "<a href='viewimage.php?pic=$row[image3]'><img border='0' src='thumbnail.php?$row[image3]' /></a>"; if ($row["image4"] != "") $img4 = "<a href='viewimage.php?pic=$row[image4]'><img border='0' src='thumbnail.php?$row[image4]' /></a>"; tr($tracker_lang['screens'], $img2 . "<br /><br />" . $img3 . "<br /><br />" . $img4, 1);
в edit.php ищем
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($tracker_lang['image'], "<input type=radio name=img1action value='keep' checked>Оставить"."<input type=radio name=img1action value='delete'>Удалить"."<input type=radio name=img1action value='update'>Обновить<br /><input type=file name=image0 size=80>", 1);
ищем
$s .= "</select>\n";
после вставляем
tr($tracker_lang['screens'], " <input type=radio name=img2action value='keep' checked>Оставить"."<input type=radio name=img2action value='delete'>Удалить"."<input type=radio name=img2action value='update'>Обновить<br /><input type=file name=image1 size=80><br /> <input type=radio name=img3action value='keep' checked>Оставить"."<input type=radio name=img3action value='delete'>Удалить"."<input type=radio name=img3action value='update'>Обновить<br /><input type=file name=image2 size=80><br /> <input type=radio name=img4action value='keep' checked>Оставить"."<input type=radio name=img4action value='delete'>Удалить"."<input type=radio name=img4action value='update'>Обновить<br /><input type=file name=image3 size=80>", 1);
в takeedit.php ищем
image1, image2 FROM torrents WHERE id = $id");
зменяем на
image1, image2, image3, image4 FROM torrents WHERE id = $id");
ищем
$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 = ''"; } }
в takeupload.php ищем
for ($x=0; $x < 2; $x++) {
заменяем на
for ($x=0; $x < 4; $x++) {
ищем
image1, image2,
после добовляем
image3, image4,
ищем
$inames[0], $inames[1]
и добовляем после
, $inames[2], $inames[3]
в upload.php ищем
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['image'], "<input type=file name=image0 size=80> <br />".$tracker_lang['max_file_size'].": 500kb ".$tracker_lang['avialable_formats'].": .gif .jpg .png\n", 1);
ищем
$s .= "</select>\n";
добовляем после
tr($tracker_lang['screens'], "<input type=file name=image1 size=80> <br /><input type=file name=image2 size=80> <br /><input type=file name=image3 size=80>", 1);
ну и в lang_main.php
$tracker_lang['screens'] = 'Скриншоты';
чуть про базу не забыл
ALTER TABLE `torrents` ADD `image3` TEXT CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL; ALTER TABLE `torrents` ADD `image4` TEXT CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL;