EasyCFM.COM ColdFusion Forums / ColdFusion Applications / How to display Tag Restrictions?

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: How to display Tag Restrictions?

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

demonangel
11-07-2007 @ 11:38 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 2
Joined: Nov 2007

Does anyone have a clue how to display (to your web browser) the tags that have restrictions on them on a particular CF Server?

"...may you bow your head, as others look up to you..."

demonangel
03-06-2008 @ 12:50 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 2
Joined: Nov 2007

Okay after much testing and going crazy, a friend of mine showed me how it could be done, so  i thought I'd share:

Just use the code below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.No {
     color: #FF0000;
     font-weight: bold;
}
.Yes {
     color: #00CC00;
     font-weight: bold;
}
-->
</style>
</head>
<cfset CFFILEtst =0>
<cfset CFDIRECTORYtst=0 >
<cfset CFCOLLECTIONtst=0>
<cfset CFCONTENTtst=0>
<cfset CFEXECUTEtst=0>
<cfset CFLOGtst=0>
<cfset CFOBJECTtst=0>
<cfset CFOBJECTCACHEtst=0>
<cfset CFREGISTRYtst=0>
<cfset SetProfileStringtst=0>
<cfset CreateObjectCOMtst=0>
<cfset CreateObjectCORBAtst=0>
<cfset CreateObjectJAVAtst=0>
<body>
<p>This is the tags we should look for I belive:
  CF tags:
  CFFILE
  CFDIRECTORY
  CFCOLLECTION
  CFCONTENT
  CFEXECUTE
  CFLOG
  CFOBJECT
  CFOBJECTCACHE
  CFREGISTRY
  
  CF functions:
  SetProfileString
  CreateObject(COM)
  CreateObject(CORBA)
  CreateObject(JAVA)<br />

<cftry>
    <cffile action="write" addnewline="yes" charset="utf-8" file="HelloWorld.txt" output="Hello World" fixnewline="no">
        <cfcatch type="Any">
             <cfset CFFILEtst =1>
        </cfcatch>
  </cftry>
<cftry>
<CFDIRECTORY directory="C:\Sites\dev\dfgdfdfhvcvb" action="create">
<CFDIRECTORY directory="C:\Sites\dev\dfgdfdfhvcvb" action="delete" recurse="no">
<cfcatch type="Any">
<cfset CFDIRECTORYtst=1>
</cfcatch>
</cftry>
<cftry>
<CFEXECUTE name="notepad.exe"></CFEXECUTE>
<cfcatch type="Any">
<cfset CFEXECUTEtst=1>
</cfcatch>
</cftry>
<table width="150" border="1" cellspacing="2" cellpadding="0">
  <tr>
    <th>Tag</th>
    <th>Passed</th>
  </tr>
  
  <tr>
    <td nowrap>CFFILE = </td>
<cfif CFFILEtst IS 1>     
    <td class="No">No</td>
<cfelse>
    <td class="Yes">Yes</td>
</cfif>
  </tr>
<tr>
    <td nowrap>CFDIRECTORY = </td>
<cfif CFDIRECTORYtst IS 1>     
    <td class="No">No</td>
<cfelse>
    <td class="Yes">Yes</td>
</cfif>
  </tr>
  <tr>
    <td nowrap>CFEXECUTE = </td>
<cfif CFEXECUTEtst IS 1>     
    <td class="No">No</td>
<cfelse>
    <td class="Yes">Yes</td>
</cfif>
  </tr>
</table>

</body>
</html>




"...may you bow your head, as others look up to you..."


Website Designed and Developed by Pablo Varando.