User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,649 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,866 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Having a bit of trouble figuring out my image upload script

Join Date: Jul 2006
Posts: 3
Reputation: davethedope is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
davethedope davethedope is offline Offline
Newbie Poster

Re: Having a bit of trouble figuring out my image upload script

  #3  
Jan 24th, 2008
Well, what I know is that

$mxx is the code for the pictures

and this is the actual working script that outputs the thumbnnails of the uploaded photos along with their links.

  1. <script language="JavaScript" type="text/javascript">
  2. function check<?php echo($mxx); ?>()
  3. { if (document.getElementById("email<?php echo($mxx); ?>").value==""){alert("You did not enter your e-mail address at e-mail field No. <?php echo($mxx); ?>!"); return false; }
  4. }
  5.  
  6. function shide<?php echo $mxx; ?>()
  7. {
  8. if (gl<?php echo($mxx); ?>==1)
  9. {
  10. gl<?php echo($mxx); ?>=0;
  11. document.getElementById("ui<?php echo($mxx); ?>").innerHTML='<p class="heading1">Use these links to share your picture: </p> <span class="style2"> <?php if ($hotlink3=="yes") {echo(" <p class=\"text\">Show image to friends: <br> <input name=\"textfield222\" type=\"text\" class=\"box\" value=\"$uselink2\" size=\"100\" onClick=\"select();\"></p>"); } ?><?php if ($hotlink1=="yes") {echo("<p class=\"text\">Hotlink for forums 1: <br><input name=\"textfield\" type=\"text\" class=\"box\" value=\"[url=$mhost][IMG]"); echo($uselink); echo("[/IMG][/url]\" size=\"100\" onClick=\"select();\"></p>"); } ?> <?php if ($hotlink2=="yes") {echo("<p class=\"text\">Hotlink for forums 2: <br> <input name=\"textfield2\" type=\"text\" class=\"box\" value=\"[url=$mhost][img=$uselink][/url]\" size=\"100\" onClick=\"select();\"></p>"); } ?><?php if (strtolower(strtolower($ext))=="bmp" || strtolower(strtolower($ext))=="jpg" || strtolower(strtolower($ext))=="jpeg" || strtolower(strtolower($ext))=="png"){if ($forums1=="yes" ) {echo(" <p class=\"text\">Thumbnail for forums 1: <br><input name=\"textfieldx\" type=\"text\" class=\"box\" value=\"[url=$uselink2][IMG]"); echo($thumblink); echo("[/IMG][/url]\" size=\"100\" onClick=\"select();\"></p>"); }} ?><?php if (strtolower(strtolower($ext))=="bmp" || strtolower(strtolower($ext))=="jpg" || strtolower(strtolower($ext))=="jpeg" || strtolower(strtolower($ext))=="png"){if ($forums2=="yes" ) {echo(" <p class=\"text\">Thumbnail for forums 2: <br> <input name=\"textfieldx1\" type=\"text\" class=\"box\" value=\"[url=$uselink2][img=$thumblink][/url]\" size=\"100\" onClick=\"select();\"></p>"); }} ?> <?php if ($websites=="yes") {echo(" <p class=\"text\">Hotlink for websites: <br> <input name=\"textfield22\" type=\"text\" class=\"box\" value=\'<a href=\"$mhost\"><img src=\"$uselink;\" border=\"0\" width=\"250\" alt=\"$slogan\" /></a>\' size=\"100\" onClick=\"select();\"> </p>"); } ?><?php if ($directlink=="yes") {echo(" <p class=\"text\">Direct link to image: <br> <input name=\"textfield223\" type=\"text\" class=\"box\" value=\"$uselink\" size=\"100\" onClick=\"select();\"></p>"); } ?> </span><p class="heading1">Use this link to remove this image from our server: </p><form action="remmail.php" method="post" name="form<?php echo $mxx; ?>" target="email2" class="style2" onsubmit="window.open(\'remmail.php\', \'email2\', \'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=265,left = 287,top = 209\');"><input name="link" type="hidden" id="link" value="<?php echo $uselink2; ?>"><input name="link" type="hidden" id="link" value="<?php echo $remlink; ?>"><input name="filen" type="hidden" id="filen" value="<?php echo $rft; ?>"><?php echo("<p class=\"text\"><input name=\"textfield223\" type=\"text\" class=\"box\" value=\"$remlink\" size=\"100\" onClick=\"select();\"></p>"); ?> <table width="525" border="0"> <tr> <td width="519" background="../audio/images/middleline.jpg">&nbsp;</td></tr> </table> <p><span class="heading1"><strong>E-mail me the &quot;show image to friends&quot; and the image removal link:</strong></span></p> <p><span class="heading1"><strong></strong></span><span class="text"> <input name="email" type="text" id="email<?php echo($mxx); ?>"> <input name="Submit2" type="submit" class="smallbutton" value="Submit" onClick="return check<?php echo $mxx; ?>()"> </span></p> </form> <table width="525" border="0"> <tr> <td width="519" background="../audio/images/middleline.jpg">&nbsp;</td> </tr></table>';
  12. }
  13. else
  14. {
  15. gl<?php echo($mxx); ?>=1;
  16. document.getElementById("ui<?php echo($mxx); ?>").innerHTML='';
  17. }
  18. }
  19. </script>

My problem is that after you have uploaded the photos, all the links associated with an uploaded picture are hidden by this javascript, and they are single. So, if I upload ten pictures, I have to go one by one to get the links. I don't mind that- but in addition to that I'd like all of the links as specified by this code which is in the above sample

<?php if ($hotlink1=="yes") {echo("<p class=\"text\">Hotlink for forums 1: <br><input name=\"textfield\" type=\"text\" class=\"box\" value=\"[IMG]"); echo($uselink); echo("[/IMG]\" size=\"100\" onClick=\"select();\"></p>"); } ?>

output into one so I can collect all the the hotlinks for forums 1 in one place at the same time- like imagevenue. You can see the script in action and see what I mean about getting links one by one at videolist.biz/host.

Any help will be greatly appreciated- and if I am still unclear just tell me.

Thanks
Reply With Quote  
All times are GMT -4. The time now is 1:18 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC