well, after the code was done I tried and tried to do it yet again with a multi upload. the only thing I could make was one that uploaded them to nothingness.. not as ease as just making an upload script..
well.. I made a new index page and copied all the info from the old one to a new one in a new directory. I changed the config to match that directry. After that I went to my form.php and I made five of them. at the end I put the upload button and the browse button. I set it to post action to upload to the image directory and then go to the display page. I then made that page but it only uploads the first image. Can anyone help me by taking the following script/s I will provide and make it so that it is able to do a multi upload. also I thought about making a number set for the first forum like number of copys="5" or somthing like that but dont know what I would write or even if it is poaaible. You may have to edit this alot but i dunno. please keep the design and ads inplace
this is the form php. It's the php file where the forum is located!
- Quote:
-
<style type="text/css"> <!-- .style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; } --> </style>
<form action="upload.php" method="post" action="" enctype="multipart/form-data">
<center> <form id="form1" name="upload" enctype="multipart/form-data" method="post" action=""> <label> <input name="image" type="file" id="image" /> <input type="submit" name="upload" value="Upload" /> </label> <br></center><br>File size limit: <b>600 KB</b><br>Allowed Images- <i>gif, Jpg, bmp, jpeg, tif, tiff</i> <span class="style1"></span><br /> <br /> </p> <center><script type="text/javascript"><!-- if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) { var url="http://www.invisionfreenetworks.com"; var title="ImageUp"; document.write('<A HREF="javascript:window.external.AddFavorite(url,title)'); document.write('"><font face=arial color=000066 size=1>Add us to your favorites!</font></a>'); } else { var alt = "<font color=ff6600 face=arial size=1>Add us to your favorites!</font><BR>"; if(navigator.appName == "Netscape") alt += "Press (Ctrl-D) on your keyboard.</font>"; document.write(alt); } // End of favorites code --></SCRIPT> <br> <!--[if IE]><a HREF onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.invisionfreenetworks.com');" style="cursor:hand"> <font color="000066" face="arial" size="1"><u>Make us your Homepage!</u></font></a><![endif]--> <!-- end of homepage code --> </form></center>
well, dont edit the red because it is just there for extra things like homepage and fav+
here is the next script you will possibly need to edit and may have been my problem.. You see.. I only edited the above one and though this would catch along but I was wrong I think
this is the upload script. it displays the upload page and it displays codes for linking and hotlinking. also it handles the preveiws and uploads themself.!!!
- Quote:
-
<?php include('includes/config.php'); include('verify.php');
if($image != "") {
$your_25_digit_code = substr(md5(rand(0,9999)), 17, 25); $temp_arr = explode(".", $image_name); $original_name = '';
//** Please make sure the file isn't something like **// //** image.something.whatever.ok.hello.get.it.now.png **// //** (file_name).(random_chars).(extension), **// //** with this it comes out to (file_name)(random_chars).(extension) **//
for ($x = 0; $x < count($temp_arr)-2; $x++) { $original_name .= $temp_arr[$x] . '.'; } $new_file = $original_name . $temp_arr[$x] . $your_25_digit_code . '.' . $temp_arr[$x+1]; $destination = "./images/" . $new_file; move_uploaded_file($_FILES['image']['tmp_name'],$destination); } $old_file = "images/" . $image_name; $newb_file = "images/" . $new_file;
rename($old_file,$newb_file);
;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>ImageUp Image Hosting</title> <style type="text/css"> <!-- .style1 { font-size: 10px; font-family: Candara, Castellar, "Century Gothic", "Century Schoolbook"; color: #000000; } .style5 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 10px; } --> </style> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div align="center" class="style1"> <table width="800" height="559" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999"> <tr> <th height="63" bordercolor="#FFFFFF" bgcolor="#f7f7f7" class="style1" scope="col"><img src="http://www.invisionfreenetworks.com/off/images/helavasearchbanner.gif" alt="Invisionfreenetworks ImageUp" width="250" height="120" /> <span class="style5">| <a href="index.php">Home</a> | </tr> <tr> <th height="404" bordercolor="#999999" bgcolor="#ffffff" class="style1" scope="col"><h3 align="center" class="style5">Your Image has been uploaded by ImageUp! need to <a href="http://www.invisionfreenetworks.com">Upload Another</a>?</h3> <h3 align="center" class="style5"><img src="<?php echo $address ."". $new_file ; ?>" width="148" height="98" border="1" align="middle" /> </h3> <h3 align="center" class="style5"><a target="_blank" href="<?php echo $address ."". $new_file ; ?>"><u>Veiw your full size image here!</u></a> </h3> <p align="center" class="style5">[--------------------- LINK FOR WEBSITE/HTML -----------------------]<br /> <input name="text" type="text" class="textfield" style="width; 500px" value="<img src="<?php echo $address ."". $new_file ; ?>" alt="Image hosted by <?php echo $yoursite; ?>" /></a>" size="70" /> <font size="4" face="arial"><b>There are more links below this ad! Scroll down please.</b></font> <p align="center" class="style5"> <script type="text/javascript"><!-- google_ad_client = "pub-8846246020391704"; google_ad_width = 468; google_ad_height = 60; google_ad_format = "468x60_as"; google_ad_type = "text_image"; google_ad_channel =""; google_color_border = "ffffff"; google_color_bg = "FFFFFF"; google_color_link = "000000"; google_color_url = "666666"; google_color_text = "333333"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></p> <p align="center" class="style5"> <script type="text/javascript"><!-- google_ad_client = "pub-8846246020391704"; google_ad_width = 468; google_ad_height = 60; google_ad_format = "468x60_as"; google_ad_type = "text_image"; google_ad_channel =""; google_color_border = "ffffff"; google_color_bg = "FFFFFF"; google_color_link = "000000"; google_color_url = "666666"; google_color_text = "333333"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></p> <p align="center" class="style5"><br /> [------------------------- LINK FOR FORUM (BBcode) 2 ------------------------]<br /> <input name="text2" type="text" class="textfield" style="width; 500px" value="[IMG=<?php echo $address ."". $new_file ; ?>]" size="70" /> </p><p align="center" class="style5"><br /> [---------------------- DIRECT LINK TO IMAGE ------------------------]<br /> <input name="text2" type="text" class="textfield" style="width; 500px" value="<?php echo $address ."". $new_file ; ?>" size="70" /> </p> <p align="center" class="style5"> </p></th> </tr> <tr> <th height="78" bordercolor="#333333" bgcolor="#f7f7f7" class="style1" scope="col"><p class="style5"> <?php for ($i=1; $i<=4; $i++) ?> </p> <p class="style5">Upload Another Image? <?php include('form.php'); ?> </p></th> </tr> </table>
</div> </body> </html>
red= dont edit, orange. i dont know if you should but if you have to go ahed. aslong as it still appears for the multiple images. blue.. you should edit probly..
well. I donno if you need anymore but if there may be somthing else you need please let me know. oh and I really need help on this Ive been looking for a php team to help me with my noobish work but no luck so i muct resort to posting files in public
|