Hi,
How can I FTP the files selected from my database to a destination on the
server?
I select the files from my index.cfm file which the results from my
database get passed to "create-list.cfm" which creates a list
of the fontnames selected and corresponding .pfb files. I want to be able
to FTP all .pfb files listed to a directory on the server but
don't know how to go about it.
Any suggestions or code? :-)
Below is my code.
index.cfm
-------------
<cfform action="create-list.cfm" name="checkboxform" method="POST">
<cfquery name="GetFontFamily" datasource="fontstyles">
SELECT sti, ID
FROM fontsti
ORDER BY sti
</cfquery>
<td class="dirlinks">
<cfoutput query="GetFontFamily">
<cfif #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'BorderPi-15159'
OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Bundesbahn-Pi' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'CCH-Australia-Logos' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'CCH-Folio-Views' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'CCH-Logos' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'CCH-Logos-PH' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'CCHFM-Lawlines' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'CCHFM-Logos'
OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'Carta' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'Century' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'Custom' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Environmental Logo' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'Euro' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'European-Pi'
OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'Garamond' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'Helvetica' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Linotype-Decoration-Pi' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'Linotype
Holiday-Pi' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Lucida-Math-Extension' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Mathematical-Pi' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Old-Style-Seven' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'Symbol' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS 'Times' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Times-Serials' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Wood-Ornaments' OR
#LCase(ListGetAt(GetFontFamily.sti,1,'.'))# IS
'Zapf-Chancery-Dingbats'>
<input type="Checkbox" name="select"
value="#GetFontFamily.ID#"
checked="Yes" required="Yes" onclick="this.checked=true;"><img
src="../../images/blank.gif" width="3" height="14" alt="" border="0"><font
color="red"> #LCase(ListGetAt(GetFontFamily.sti,1,'.'))#</font><br>
<input type="hidden" name="ID" value="#GetFontFamily.ID#">
<cfelse>
<cfinput type="Checkbox" name="select"
value="#GetFontFamily.ID#"> #LCase(ListGetAt(GetFontFamily.sti,1,'.'))#<br>
</cfif>
</cfoutput>
</td>
</tr>
<tr>
<td class="navlinks">
<input class="navlinks" type="submit" name="Action" value=" Generate ">
<input class="navlinks" type="submit" name="Action" value="Close"
OnClick="window.close()">
<br>
create-list.cfm
-------------------
<cfquery name="GetMyFonts" datasource="fontstyles">
SELECT fontsti.sti, fontsti.ID, fontspecs.pfb
FROM fontsti, fontspecs
WHERE fontsti.ID = fontspecs.fontsti_ID
AND fontsti.ID IN (#form.select#)
ORDER BY sti
</cfquery>
<cfoutput query="GetMyFonts" group="ID">
#LCase(ListGetAt(GetMyFonts.sti,1,'.'))#<br>
<cfoutput>[#GetMyFonts.pfb#]</cfoutput>
<hr>
</cfoutput>
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org