<CFCONTENT type="text/vnd.wap.wml">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
"http://www.wapforum.org/DTD/wml12.dtd">
<!---show error and abort if the values entered are not date/time values--->
<cfif ( not isDate(Replace(date_start,".","/","ALL")) or not isDate(Replace(date_end,".","
/","ALL")) ) or ( not isDate(Replace(time_start,".","/","ALL")) or not isDate(Replace
(time_end,".","/")) )>
<wml>
<card>
<do type="accept" label="Back">
<go href="main.wml#add"/>
</do>
<p>
<b>Error:</b> <br/>
Invalid date/time value detected.<br/>
<cfoutput>#Replace(date_start,".","/","ALL")#</cfoutput>
</p>
</card>
</wml>
<CFABORT>
</cfif>
<!---if the dates are valid, put them into the
database and show confirmation message--->
<CFQUERY datasource="schedule">
INSERT into schedule(date_start,date _end,time_start,time_end,description)
values(#CreateODBCDate(Replace(date_start,".","/","ALL"))# ,#CreateODBCDate(Replace
(date_end,".","/","ALL"))#,#CreateODBCTime (time_start)#,#CreateODBCTime(time_end)#
,'#description#')
</CFQUERY>
<wml>
<card>
<do type="accept" label="Back">
<go href="main.wml#options"/>
</do>
<p>
Your appointment was added succesfully.
</p>
</card>
</wml
>
|