Hi,
I'm having a problem displaying some directories. Below are two sample variables which
I get from my database. These are inserted into the database from another
template that has checkboxes and then once submitted the database gets re-populated.
That is not my problem though. It's displaying the directory tree.
There are other variables in my sample which I haven't supplied code for because the
problem I think is just in my <cfif statement comparing the two variables.
When I run the code below not all the subdirectories get listed within
\reports\csl\. Only the SGML directory.
Why?
I know I'm checking for just an occurence but how can I do an "exact" match for
just "D:\reports\csl" only and not include D:\reports\csl\sgml\tse\tsed or
D:\reports\csl\sgml\tse\tsem?
If I remove the directories D:\reports\csl\sgml\tse\tsed and
D:\reports\csl\sgml\tse\tsem then everything works properly.
It's matching on the "sgml" and only listing that directory. I only want it to match
up to the third "\" and NOTHING past.
I know...I'm rambling...I hope I'm making sense! ;-D
How can I do this?
URLDecode(dir) = d:\reports\csl\
SESSION.DisplayShowMe =
D:\reports\aclg,
D:\reports\breg,
D:\reports\cdir,
D:\reports\cfam,
D:\reports\chfl,
D:\reports\cmtgl,
D:\reports\cpen,
D:\reports\cres,
D:\reports\csl,
D:\reports\csl\sgml\tse\tsed,
D:\reports\csl\sgml\tse\tsem,
D:\ed_depot
<cfif FindNoCase(URLDecode(dir),SESSION.DisplayShowMe)>
<cfoutput>
<tr>
<td class="dirlinks" align="right">#indent#</td>
<td valign="bottom" width="16" height="13">
<a
href="#cgi.script_name#?dir=#URLEncodedFormat(dir)##URLEncodedFormat(SESSION.stDirFileName[i])#\"
class="dirlinks" alt="#SESSION.stDirFileName[i]#"><img
src="images/folder-closed.gif" border="0"> </a>
</td>
<td valign="middle" width="100%">
<!--- Display directory folders --->
<a
href="#cgi.script_name#?dir=#URLEncodedFormat(dir)##URLEncodedFormat(SESSION.stDirFileName[i])#\"
class="dirlinks" alt="#SESSION.stDirFileName[i]#">
#SESSION.stDirFileName[i]#</a>
</td>
</tr>
</cfoutput>
</cfif>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137339
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm