home *** CD-ROM | disk | FTP | other *** search
/ Cool Page Magazine 16 / CoolPage_16.iso / dynadb / codes / codes / updod2.cfm < prev    next >
Text File  |  1998-02-10  |  3KB  |  110 lines

  1. <!----------------------------------------------------------------------------------------->
  2. <!---                └╔ªWíGupdod2.cfm                     --->
  3. <!---            │o¡╙└╔«╫╖|«┌╛┌Ñ╤ updateod.cfm ⌐╥ѵ¿╙¬║ order_idíA        --->
  4. <!---            ╖j»┴╝╞╛┌«wíAºΣÑX░O┐²íA╡M½ß┼²Ñ╬ñß¡╫º∩                --->
  5. <!---            ╡M½ßªAѵ╡╣ updod3.cfm │B▓z                    --->
  6. <!----------------------------------------------------------------------------------------->
  7.  
  8. <!------------------------------------------------------------------
  9. <FORM ACTION="updod3.cfm" method="post">
  10. --------------------------------------------------------------------->
  11. <HTML>
  12. <BODY background="paper12l.jpg">
  13.  
  14.     <CFQuery Name="GetRecord" datasource="Dynamic Database">
  15.         select * from orderproduct 
  16.         where order_id='#url.order_id#'
  17.     </CFQuery>
  18.  
  19.     <CFQuery Name="GetCust" datasource="Dynamic Database">
  20.         select * from customer 
  21.         where cust_id=
  22.             (select cust_id from orderproduct 
  23.                 where order_id='#url.order_id#')
  24.     </CFQuery>
  25.  
  26. <cfoutput query ="GetRecord">
  27.  
  28.  
  29.     <cfset orig_orderyear=#year(order_date)#>
  30.     <cfset orig_ordermonth=#month(order_date)#>
  31.     <cfset orig_orderday=#day(order_date)#>
  32.     <cfset orig_orderdate=#orig_ordermonth# & "/" & #orig_orderday# & "/" & #orig_orderyear#>
  33.  
  34.     <cfset orig_dueyear=#year(due_date)#>
  35.     <cfset orig_duemonth=#month(due_date)#>
  36.     <cfset orig_dueday=#day(due_date)#>
  37.     <cfset orig_duedate=#orig_duemonth# & "/" & #orig_dueday# & "/" & #orig_dueyear#>
  38.     
  39.     <cfset orig_payby=#pay_by#>
  40. </cfoutput>
  41.  
  42. <CFFORM NAME="UpdateForm" ACTION="updod3.cfm">
  43.     ¡q│µ╜s╕╣íG      <cfoutput>#GetRecord.order_id#
  44.             <input type="hidden" name="orig_order_id" value=#GetRecord.order_id#>
  45.             </cfoutput>
  46. <br>
  47.     ┼U½╚╜s╕╣íG    <CFSELECT NAME="updated_cust_id"
  48.                     REQUIRED="Yes"
  49.                     SIZE="1"
  50.                     MULTIPLE="no"
  51.                     QUERY="GetCust"
  52.                     VALUE="cust_id"
  53.                     DISPLAY="cust_id">
  54.             </CFSELECT>
  55. <br>
  56.     ¡q│µñΘ┤┴íG    <CFINPUT TYPE="text" 
  57.                 NAME="updated_order_date" 
  58.                 query="GetRecord"
  59.                 value=#orig_orderdate#
  60.                 REQUIRED="Yes" 
  61.                 VALIDATE="date" 
  62.                 MESSAGE="¡q│µñΘ┤┴«µªíñúÑ┐╜TíA└│¼░mm/dd/yyyy" 
  63.                 SIZE="10"
  64.                 MAXLENGTH="10">(mm/dd/yyyy)
  65.  
  66. <br>
  67.     ¿∞┤┴ñΘ┤┴íG    <CFINPUT TYPE="text" 
  68.                 NAME="updated_due_date" 
  69.                 query="GetRecord"
  70.                 VALUE=#orig_duedate#
  71.                 REQUIRED="Yes" 
  72.                 VALIDATE="date" 
  73.                 MESSAGE="¿∞┤┴ñΘ┤┴«µªíñúÑ┐╜TíA└│¼░mm/dd/yyyy" 
  74.                 SIZE="10"
  75.                 MAXLENGTH="10">(mm/dd/yyyy)
  76.  
  77.  
  78. <br>
  79.     ÑI┤┌ñΦªííG    <CFSELECT NAME="updated_pay_by"
  80.                     REQUIRED="Yes"
  81.                 query="GetRecord"
  82.                 Value="pay_by"
  83.                     SIZE="1"
  84.                     MULTIPLE="no"
  85.                     SELECTED="pay_by">
  86.                 <cfif #orig_payby# is not "Visa">
  87.                     <OPTION VALUE="Visa">Visa
  88.                 </cfif>
  89.                 <cfif #orig_payby# is not "Cash">
  90.                     <OPTION VALUE="cash">Cash
  91.                 </cfif>
  92.                 <cfif #orig_payby# is not "Cheque">
  93.                     <OPTION VALUE="cheque">Cheque
  94.                 </cfif>
  95.             </CFSELECT>
  96.  
  97. <br>
  98. <INPUT TYPE="Submit" VALUE="└xªs">
  99.  
  100. <INPUT type="hidden" NAME="updated_order_date_required" VALUE="ºA┴┘¿S┐ΘñJ¡q│µñΘ┤┴">
  101. <INPUT type="hidden" NAME="updated_due_date_required" VALUE="ºA┴┘¿S┐ΘñJ¿∞┤┴ñΘ┤┴">
  102. <input type="hidden" name="updated_order_date_date" value="¡q│µñΘ┤┴«µªí┐∙╗~">
  103. <input type="hidden" name="updated_due_date_date" value="¿∞┤┴ñΘ┤┴«µªí┐∙╗~">
  104. </CFFORM>
  105.  
  106. <P ALIGN="center"><A HREF="/dynadb/index.htm">ª^¿∞ÑD¡╢</A></P>
  107. </BODY>
  108. </HTML>
  109.  
  110.