Guest_imported
New member
- Jan 1, 1970
- 0
I am writing this email asking for help regarding the REFind() Function in ColdFusion.
The problem is that I am trying to integrate a cart system within our web site, but the guy who wrote the pages before wrote a .cfm page called PageSelector.cfm.
If you want to buy an item, you click on the item and it brings you to Item-Detail Page.
If the ItemID is 43523
Then the url will be
But "43523.html" is a virtual file, it doesnt really exist on the server, the PageSelector.cfm file dynamicaly creates this virtual file in the url, even though it doesn't physically exist.
But I need to find where that page is stored.
Here is the code that is used to create this virutal file.
<cfset st = REFind("items/([0-9]+)-([0-9]+)",QUERY_STRING,1,"TRUE"
>
<cfif ArrayLen(st.pos) LT 3>
<cfset st = REFind("items/([0-9]+)",QUERY_STRING,1,"TRUE"
>
</cfif>
<cfif ArrayLen(st.pos) GT 1>
<cfset ItemID = Mid(QUERY_STRING,st.pos[2],st.len[2])>
<cfif ArrayLen(st.pos) eq 3>
<cfset CatID = Mid(QUERY_STRING,st.pos[3],st.len[3])>
</cfif>
<cfset st = REFind("cats/([0-9]+)-?([0-9]*)-?([0-9]*)-?([a-zA-Z0-9]*).html",QUERY_STRING,1,"TRUE"
>
<cfif ArrayLen(st.pos) GTE 2>
<cfset CatID = Mid(QUERY_STRING,st.pos[2],st.len[2])>
<cfif ArrayLen(st.pos) GTE 3>
<cfif st.len[3] GT 0><cfset CatLvl = Mid(QUERY_STRING,st.pos[3],st.len[3])></cfif>
</cfif>
<cfif ArrayLen(st.pos) GTE 4>
<cfset MallID = Mid(QUERY_STRING,st.pos[4],st.len[4])>
</cfif>
<cfset frmAction="tab1">
<cfif ArrayLen(st.pos) GTE 5>
<cfif st.len[5] GT 0><cfset frmAction = Mid(QUERY_STRING,st.pos[5],st.len[5])></cfif>
</cfif>
Can anyone help me out. I need to find where this page really exists so I can put my ADD TO CART, UPDATE CART jpeg files. I cannot find it at all.
I don't understand REfind well enough to understand the syntax used above.
Please help
Thank You
MK
The problem is that I am trying to integrate a cart system within our web site, but the guy who wrote the pages before wrote a .cfm page called PageSelector.cfm.
If you want to buy an item, you click on the item and it brings you to Item-Detail Page.
If the ItemID is 43523
Then the url will be
But "43523.html" is a virtual file, it doesnt really exist on the server, the PageSelector.cfm file dynamicaly creates this virtual file in the url, even though it doesn't physically exist.
But I need to find where that page is stored.
Here is the code that is used to create this virutal file.
<cfset st = REFind("items/([0-9]+)-([0-9]+)",QUERY_STRING,1,"TRUE"

<cfif ArrayLen(st.pos) LT 3>
<cfset st = REFind("items/([0-9]+)",QUERY_STRING,1,"TRUE"

</cfif>
<cfif ArrayLen(st.pos) GT 1>
<cfset ItemID = Mid(QUERY_STRING,st.pos[2],st.len[2])>
<cfif ArrayLen(st.pos) eq 3>
<cfset CatID = Mid(QUERY_STRING,st.pos[3],st.len[3])>
</cfif>
<cfset st = REFind("cats/([0-9]+)-?([0-9]*)-?([0-9]*)-?([a-zA-Z0-9]*).html",QUERY_STRING,1,"TRUE"

<cfif ArrayLen(st.pos) GTE 2>
<cfset CatID = Mid(QUERY_STRING,st.pos[2],st.len[2])>
<cfif ArrayLen(st.pos) GTE 3>
<cfif st.len[3] GT 0><cfset CatLvl = Mid(QUERY_STRING,st.pos[3],st.len[3])></cfif>
</cfif>
<cfif ArrayLen(st.pos) GTE 4>
<cfset MallID = Mid(QUERY_STRING,st.pos[4],st.len[4])>
</cfif>
<cfset frmAction="tab1">
<cfif ArrayLen(st.pos) GTE 5>
<cfif st.len[5] GT 0><cfset frmAction = Mid(QUERY_STRING,st.pos[5],st.len[5])></cfif>
</cfif>
Can anyone help me out. I need to find where this page really exists so I can put my ADD TO CART, UPDATE CART jpeg files. I cannot find it at all.
I don't understand REfind well enough to understand the syntax used above.
Please help
Thank You
MK