if rc<10 then call putawebmsg('File <b>'file'</b> deleted. <br><a href="'url'">Go Back</a>')
else call putawebmsg("<h1>Error</h1>Error with deletion")
end
else call putawebmsg("Delete Cancelled.")
end
end
else call putawebmsg('<h1>Error</h1><b>'file'</b> does not exist!')
end
else call putawebmsg("No directory specified.")
exit
end
when function='amiftp' then do
parse var url 'ftp://'hostname'/'dirs
dirs='/'dirs
if showlist(P,'AMIFTP') then do
address 'AMIFTP' 'GETATTR STEM ainfo'
if (ainfo.HOST ~= hostname) then do
address 'AMIFTP' 'DISCONNECT'
address 'AMIFTP' 'SETATTR HOST' hostname
address 'AMIFTP' 'CONNECT NOSCAN'
end
address 'AMIFTP' 'CD' dirs
end
else do
address command amiftpexe
timeout=0
address command 'waitforport AMIFTP'
if (showlist(P,'AMIFTP')) then do
address 'AMIFTP' 'GETATTR STEM ainfo'
if (ainfo.HOST ~= hostname) then do
address 'AMIFTP' 'DISCONNECT'
address 'AMIFTP' 'SETATTR HOST' hostname
address 'AMIFTP' 'CONNECT NOSCAN'
end
address 'AMIFTP' 'CD' dirs
end
else do
putawebmsg('Error: Couldn''t run AmiFTP')
exit
end
end
end
otherwise do
call putawebmsg('Program Error: please <a href="mailto:panther@gate.net">mail</a> author w/ errorcode: F-'function' and conditions under which it failed.')
call writeln(1,'AwebFTP is an FTP plug-in arexx script for Aweb, which does FTP inside Aweb''s GUI, provided you have FTPMount installed')
call writeln(1,'<p><h2>Features of AwebFTP</h2><ul>')
call writeln(1,'<li>Fast reaction, since FTPMount does caches dirs.')
call writeln(1,'<li>Inline - Stays within the Aweb GUI.')
call writeln(1,'<li>Asyncronous download (thanks to Aweb), you can continue browsing while it downloads, and Aweb will inform you when the transfer has completed!')
call writeln(1,'<li>Brings up a requestor to ask what you want to save as.')
call writeln(1,'</ul>New for 1.1:<ul>')
call writeln(1,'<li>You can now upload to the directory if you type the name of a file in a form at the bottom of the list (or leave blank, and it will give you a requester asking for a file)')
call writeln(1,'<li>Make directories')
call writeln(1,'<li>Delete a file (currently only one file at a time)')
call writeln(1,'<li>Title is now a link: click to refresh the list after send/makedir/delete, etc')
call writeln(1,'</ul>New for 1.2:<ul>')
call writeln(1,'<li>WBCopy command used to copy files with progress meter')
call writeln(1,'<br>Thanks to Bastian H. Frank for developing this handy program!')
call writeln(1,'</ul>New for 1.3:<ul>')
call writeln(1,'<li>Much faster:<ul>')
call writeln(1,'<li>No longer parses list output, uses lformat to create listing')
call writeln(1,'</ul><li>AmiFTP can now be automatically loaded and set to the current dir!<ul>');
call writeln(1,'<li>Will detect if amiftp is already loaded, and go to the directory');
call writeln(1,'<li>Doesn''t disconnect and reconnect if amiftp already has the host open');
call writeln(1,'</ul></ul>')
call writeln(1,'</ul><p><h2>Known Bugs</h2><ul>')
call writeln(1,'<li>Linked files are sometimes thought to be directories in AmigaDOS, and may wind up returning an empty directory listing instead of the actual file.')
call writeln(1,'<p>I''ve attempted to correct this by checking if the link clicked on has a period in the name, if so, it assumes it''s a file instead. Hopefully this bug is obsolete with the new copy program. Let me know if you find any URL''s that this still happens on.<p>')
call writeln(1,'<li>Many people are getting "out of memory" errors. This should only be occuring on old versions of AwebFTP, and usually only when they forget to pass all three %s arguments in aweb''s preferences. If this is still occuring in this version for you, PLEASE let me know the URL.')
call writeln(1,'</ul><p><h2>AwebFTP Author</h2>')
call writeln(1,'<p>AwebFTP is written by <a href="http://www.versanet.com/~josef/">me</a> (<a href="mailto:panther@gate.net">panther@gate.net</a>), Josef on <a href="irc://innernet.org/#Amiga">IRC</a>. I have also written a few other arexx scripts for Aweb, and over a hundred arexx scripts for Grapevine IRC client (mostly available on my <a href="http://www.versanet.com/~josef/">home page</a>.')
call writeln(1,'<hr><a href="http://ftp.wustl.edu/aminetbin/find?ftpmount">Latest FTPMount from Aminet</a> | <a href="http://www.versanet.com/~josef/aweb">Other Aweb Scripts</a> | <a href="http://www.versanet.com/~josef/crap/net.html">Other Net Applications</a>')
call writeln(1,'</body></html>')
call close(1)
'OPEN file://localhost/'tmpfile
exit
end
if server='upload' then do
end
do
if right(server,1)~='/' then server=server'/'
if length(file)>0 then do
filebk=file
dir=''
do until index(filebk,'/')=0
parse var filebk dirbk'/'filebk
dir=dir||dirbk'/'
end
file=filebk
url='ftp://'server||dir||file
end
else url='ftp://'server
call putawebmsg('Opening 'url' - Please wait. <h5>(Ignore this if [Back]ing up)</h5>')