If statements and date varies... Someone knows what to do? (Long question)

Hi everyone - a little new here. I was hired in a web design company, last year and recently took to learning ColdFusion - so I'm not 100% on the syntax. I still need help if statements, so I hope you guys will be ready to spread knowledge.

In any case to put it in context:

What I'm getting is a calendar that allows you to register to attend an event, such as a corporate dinner, holiday party or a such nonsense. It also covers purchases of tickets through a 3rd party such as PayPal and look something like this when put on a web page.

http://i.imgur.com/VLIVVh3.jpg

Here's the code that creates this view.

< table class = "registerTablePrices" cellspacing = 5 >

< cfloop query = "registration_types" >

< cfif registration_types.esl_price gte 0 >

< b >

< class td nowrap 'formlabel' = > #registration_types.estName #: < table >

< td > < cfinput name = "" regType_ #registration_types.estid # "style =" width: 30px "value ="0"/ > < table >"

< cfif registration_types.esl_price is 0 >

< class td 'formlabel' = > X free < table >

< cfelse >

< class td = "formlabel" style = "width: 90px ' > X #dollarformat (registration_types.esl_price) # < table >

< / cfif >

< class td 'labelInfo' = > enter the number of participants for this type. < table >

< /tr >

< / cfif >

< / cfloop >

< /table >

All the code says right now is to show the events whose price is positive, or the list of free people.

This is what I want - I want to make sure 30, late registration will be hidden automatically if the date is BEFORE or AFTER May 30.

http://i.imgur.com/E7wU1K1.jpg

I assigned values to the record types I want to restrict by date...

They are registration_types.estStartDate and registration_types.estEndDate

AND the value designated as Restricted, registration_types.estRestricted - that would be used like this.

< cfif registration_types.estRestricted is 1 >

* Then show it only between registration_types.estStartDate and registration_types.estEndDate

And that's where I will meet with my problem. I can't make it work with the first code you saw:

< table class = "registerTablePrices" cellspacing = 5 >

< cfloop query = "registration_types" >

< cfif registration_types.esl_price gte 0 >

< b >

< class td nowrap 'formlabel' = > #registration_types.estName #: < table >

< td > < cfinput name = "" regType_ #registration_types.estid # "style =" width: 30px "value ="0"/ > < table >"

< cfif registration_types.esl_price is 0 >

< class td 'formlabel' = > X free < table >

< cfelse >

< class td = "formlabel" style = "width: 90px ' > X #dollarformat (registration_types.esl_price) # < table >

< / cfif >

< class td 'labelInfo' = > enter the number of participants for this type. < table >

< /tr >

< / cfif >

< / cfloop >

< /table >

I'll have at least 4 special conditions going on at the same time and I lose it it.

If you read everything that I'm sorry, it may be difficult to understand - I appreciate all help.

I didn't know what you wanted to do. Maybe this:

or (East of 1/registration_types.estRestricted and ((current_date ge estStartDate) and (the estEndDate current_date))) >

Alternatively, you can compare the dates using the dateCompare().

or (East of 1/registration_types.estRestricted and ((current_date ge estStartDate) and (the estEndDate current_date))) >

#registration_types.estName: #

X free

X #dollarformat (registration_types.esl_price) #.

Enter the number of participants for this type.

Tags: ColdFusion

Similar Questions

Maybe you are looking for

  • x 360 HP spectrum: windows store: "fallen server."

    Hi guys! I recently bought the hp 360 but spectrum however its has some problems such as: cannot open my windows store. whenever I try to open it it says "dropped the server we all have bad days", then it auto closes. Secondly, I have a little proble

  • &lt; help &gt; how to disconnect?

    How to connect to Skype on Mac?

  • Satellite M30X-124: battery not charging

    Hello the text by Googel translated hopes help.I have a laptop Satellite M30X-124 and has the following problem:My battery via the power supply with the company does not provide. It is emty completely also with the operation of the line and load your

  • How do I delete emails in the scan to address book so I can add new?

    I currently have the email set up the fine.  But when I scan a document and you want to send by email, there are already addresses in the address book which A) I don't want and can't remove, B) I can't add new ones constantly.  When I try to add new,

  • G6-2279wm

    I bought this computer with Windows 8 is already installed and I really hate Windows 8 because it keeps crashing, among other issues.  I want to install Windows 7.  So my question is: will I be able to install Windows 7 on this computer model?