please dont rip this site
   /*Following code is to upload and save a jpeg image in PHP -    
works ONLY with POST in the form!
add checks for GIF OR remove all checks to cater for other formatsBest to put this code before HTML code*/
global $userfile, $userfile_name, $userfile_size, $userfile_type, $archive_dir, $WINDIR;if(isset($WINDIR)) $userfile = str_replace("\\\\","\\", $userfile);
$filename = basename($userfile_name);

$lcfilename = strtolower($filename);
// check file extension
$ftype = strstr($lcfilename,'.j');
if ($ftype == ".jpg") $jpegok = "y";
if ($ftype == ".jpeg") $jpegok = "y";
if (!$jpegok) echo "<script language=\"javascript\"> alert('You must supply a JPEG file.')</script>";
else {
if($userfile_size <= 0) die ("$filename is empty.");
if(!@copy($userfile, "$archive_dir/$filename")) die("Can't copy $userfile_name to $filename.");
if(!isset($WINDIR) && !@unlink($userfile))
die ("Can't delete the file $userfile_name.");
// if entering data in a database following upload this is the place to do it!
}/* in the body of the HTML at the appropriate point you need
<input name="userfile" type="file" size="30">
*/



  Main
Index
Search
Posts
Who's
Online
Log
In


Home: Open Source: htmlArea v2.0:
HtmlArea with Image upload and extra functions
 
 



redspider
User

Dec 31, 2002, 11:25 AM

Post #1 of 8 (291 views)
Copy Shortcut
HtmlArea with Image upload and extra functions Can't Post

Hi Everyone,

I have finished my version with the image-upload function. (sorry but it's in dutch)
For the upload i use Aspupload that you can download for a free 30-days trail.
For download see http://www.aspupload.com

Only thing that i want to change is the insert_image dialog so you can select the images from the uploadfolder and get a preview.

-------------------------------------------------------------
Modify these files and lines to get the upload script working
-------------------------------------------------------------

progress_upload.asp, line 44
replace the path to your upload path.
n = Upload.Save("e:\Inetpub\wwwroot\z_testzone\HTMLarea_wme\uploads\")

deletefiles.asp, line 40
replace the path to your upload path.
Directory = "e:\Inetpub\wwwroot\z_testzone\HTMLarea_wme\uploads\" ' initial directory

Add two custom buttoms in editor.js

this.toolbar = [
['custom2','custom3','separator'],

this.btnList = {
"custom2": ['custom2', 'Upload file', 'editor_action(this.id)', 'ed_image_up.gif'],
"custom3": ['custom3', 'Verwijder files', 'editor_action(this.id)', 'ed_image_del.gif'],

Custom buttom section.

// Custom2 - upload files
else if (cmdID.toLowerCase() == 'custom2'){
window.open('popups/upload/progress.Asp',null,'width=390,height=225,status=no,scrollbars=auto,toolbar=no,menubar=no,location=no');
}
// Custom3 - Delete files
else if (cmdID.toLowerCase() == 'custom3'){
window.open("popups/upload/deletefiles.Asp",null,"height='100',width='380',status=no,toolbar=no,scrollbars=yes,menubar=no,location=no");
}


If you find bugs please let me know !!!

If there are people who are working on a Table-function thats better then the function in version 2.03
(delete, insert, modify rows and collumns) or other functions please let me know ;-)

This version contains also following extra functions:



I hope you like it Wink

Greetz
Redspider
(Belgium)



Still 3 hours and 40 minutes untill 2003 (in Belgium), enjoy Cool

Attachments: HTMLarea_wme.zip (50.5 KB)



Benjamin
User / Moderator


Dec 31, 2002, 2:44 PM

Post #2 of 8 (281 views)
Copy Shortcut
Re: [redspider] HtmlArea with Image upload and extra functions [In reply to] Can't Post

Thanks so much for your contribution! You should make a lot of ASP htmlArea users happy...! CoolCool

And Happy New Year...? Almost? Another 20 minutes, maybe? Wink

Ben
interactivetools.com

(This post was edited by Benjamin on Dec 31, 2002, 2:45 PM)



lvni900
User

Jan 3, 2003, 12:54 PM

Post #3 of 8 (193 views)
Copy Shortcut
Re: [redspider] HtmlArea with Image upload and extra functions [In reply to] Can't Post

Redspider, do you have a php-version also?

greetings, Leo - STOPspamaweSPAM at be.tf (also belgium!)



redspider
User

Jan 3, 2003, 1:31 PM

Post #4 of 8 (190 views)
Copy Shortcut
Re: [lvni900] HtmlArea with Image upload and extra functions [In reply to] Can't Post

Leo,

Sorry, but at this moment i just have a little knowledge of ASP, so i just have an ASP version.

Maybe, you can find a sollution at www.hotscripts.com or www.planet-source.com where you can find a lot of scripts and components.

If i find something i will post it in this forum.
greetz

Redspider
(belgium)



mixmuis
User

Jan 3, 2003, 4:32 PM

Post #5 of 8 (180 views)
Copy Shortcut
Re: [lvni900] HtmlArea with Image upload and extra functions [In reply to] Can't Post

i have a PHP version for uploading images

i am going to rewrite it for use with sql , so i can use extra info for the images.

the old php version may be used by people that can use it, but don't think is the ultimate tool.



if you want it, please mail me so i can prepare the files to add it for download



lvni900
User

Jan 5, 2003, 8:23 AM

Post #6 of 8 (106 views)
Copy Shortcut
Re: [mixmuis] HtmlArea with Image upload and extra functions [In reply to] Can't Post

To mail you, I'll need your email-adress.

But, never mind, I wrote the thing myself yesterday.

Anyway, thanks.



dmoellenbeck
New User

Jan 7, 2003, 10:14 AM

Post #7 of 8 (38 views)
Copy Shortcut
Re: [lvni900] HtmlArea with Image upload and extra functions [In reply to] Can't Post

Hello!

Can u send me your PHP Script to Uplod!



Thanks Daniel



aeon
New User

Jan 7, 2003, 11:38 AM

Post #8 of 8 (27 views)
Copy Shortcut
Re: [dmoellenbeck] HtmlArea with Image upload and extra functions [In reply to] Can't Post

Quote

Here is some PHP upload code for you - hope it can be used - keep us posted!


Code
   /*Following code is to upload and save a jpeg image in PHP -    
works ONLY with POST in the form!
add checks for GIF OR remove all checks to cater for other formatsBest to put this code before HTML code*/
global $userfile, $userfile_name, $userfile_size, $userfile_type, $archive_dir, $WINDIR;if(isset($WINDIR)) $userfile = str_replace("\\\\","\\", $userfile);
$filename = basename($userfile_name);

$lcfilename = strtolower($filename);
// check file extension
$ftype = strstr($lcfilename,'.j');
if ($ftype == ".jpg") $jpegok = "y";
if ($ftype == ".jpeg") $jpegok = "y";
if (!$jpegok) echo "<script language=\"javascript\"> alert('You must supply a JPEG file.')</script>";
else {
if($userfile_size <= 0) die ("$filename is empty.");
if(!@copy($userfile, "$archive_dir/$filename")) die("Can't copy $userfile_name to $filename.");
if(!isset($WINDIR) && !@unlink($userfile))
die ("Can't delete the file $userfile_name.");
// if entering data in a database following upload this is the place to do it!
}/* in the body of the HTML at the appropriate point you need
<input name="userfile" type="file" size="30">
*/



(This post was edited by aeon on Jan 7, 2003, 11:41 AM)


 
 
 



Search for (options)
Content Management SystemContent Management Software


Home | Conditions of Use | Privacy Policy | Site Map | Contact Us
Copyright © 1999-2003 interactivetools.com, inc.

Questions:


file: /Techref/os/win/ddk/nt/HtmlAreaImageupload.htm, 38KB, , updated: 2006/3/6 11:54, local time: 2024/12/28 02:07,
TOP NEW HELP FIND: 
18.191.171.86:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://ecomorder.com/techref/os/win/ddk/nt/HtmlAreaImageupload.htm"> Interactivetools.com Forum: Open Source: htmlArea v2.0: HtmlArea with Image upload and extra functions</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .