Ben bunu tek input ile halledemezmiyim aynanda 20-30 resim kodlar aşağıdaki gibi;
$ParentID = toGet($_GET['ParentID'], $_POST['ParentID']);
$Action = toGet($_GET['Action'], $_POST['Action']);
$ID = toGet($_GET['ID'], $_POST['ID']);
$sqlw = "select * from t_advert_images where ID='".$ID."'";
$qrw = mysql_query($sqlw);
$rsw = mysql_fetch_array($qrw);
if (isset($_POST['miSend'])) {
$sql = "select * from t_text";
$qrText = mysql_query($sql);
$rsText = mysql_fetch_array($qrText);
switch($Action) {
case 'Add' :
for ($x=1; $x<7; $x++) {
$im = "Image".$x;
if ($_FILES["".$im.""]['tmp_name']) {
$sql = "insert into t_advert_images (ParentID, Seq, Visible) values('".$ParentID."', '".($rsw['Seq']!=''?$rsw['Seq']:GetName("select * from t_advert_images where ParentID='".$ParentID."'order by Seq desc", "Seq")+1)."', '".getVisible($_POST['Visible'])."')";
$result = mysql_query($sql);
if ($result) {
$LastID = GetName("select * from t_advert_images where ParentID='".$ParentID."' order by ID desc","ID");
$save_img = SaveImage($_FILES["".$im.""]['tmp_name'], $_FILES["".$im.""]['size'], "../images/estate/", "240", "240", "1600", "240", "640", "640", $ParentID."_".$LastID, "Estate", $rsText['image_text'], "../font/".$rsText['font_name'], $rsText['font_size'], $rsText['image_alpha']);
$ex = explode(":",$save_img);
if ($ex[0] != "Err") {
$sql = "update t_advert_images set Images='".$ParentID."_".$LastID."' where ID='".$LastID."'";
mysql_query($sql);
$CloseWindow = "<script>\n";
$CloseWindow .= "\twindow.opener.location.reload();\n";
$CloseWindow .= "\twindow.close();\n";
$CloseWindow .= "</script>\n";
} else {
$sql = "delete from t_advert_images where ID='".$LastID."'";
mysql_query($sql);
$Err = "<script>\n";
$Err .= "alert('".$ex[1]."')";
$Err .= "</script>\n";
}
} else {
$Err = "<script>\n";
$Err .= "alert('Veri tabanina kayit yapılırken hata olustu')";
$Err .= "</script>\n";
}
}
}
break;
}
}
$sql = "select * from t_advert_images where ID='".$ID."'";
$qr = mysql_query($sql);
$rs = mysql_fetch_array($qr);
?>