home *** CD-ROM | disk | FTP | other *** search
/ Cool Page Magazine 16 / CoolPage_16.iso / dynadb / codes / addtype2.cfm < prev    next >
Text File  |  1997-12-08  |  3KB  |  76 lines

  1. <!---------------------------└╔ªWíGAddtype2.cfm-------------------->
  2. <!---            │o¼Oñ@¡╙½ß│B▓z╡{ªí            --->
  3. <!---        Ñ╗¡╢¼Oªb┐ΘñJ╝╞¡╚ÑH½ß│B▓z¬║╣L╡{            --->        
  4. <!---        ½e¡▒ñjÑb│í│ú¼Oªb┤·╕╒⌐╥┐ΘñJ¬║╕Ω«╞¼Oº_Ñ┐╜T    --->
  5. <!----------------------------------------------------------------->
  6.  
  7. <HTML>
  8. <BODY background="paper12l.jpg">
  9.  
  10.     <!--- ▒N┼▄╝╞▒╥⌐lñ╞  --->    <!------------------------------------------------->
  11.     <cfset iserror=false>        <!--- ªp¬Gª│Ñ⌠ª≤┐∙╗~íAiserror│ú╖|│]ª¿íutrueív    --->
  12.     <cfset dupidx=false>        <!--- ¿M⌐w║╪├■╜s╕╣ª│¿Sª│¡½┬╨¬║┼▄╝╞        --->
  13.     <cfset id_long=false>        <!--- ¿M⌐w║╪├■╜s╕╣ª│¿Sª│╣L¬°¬║┼▄╝╞        --->
  14.     <cfset name_long=false>        <!--- ¿M⌐w║╪├■ªW║┘ª│¿Sª│╣L¬°¬║┼▄╝╞        --->
  15.                     <!------------------------------------------------->
  16.  
  17.     <!--- └╦¼d║╪├■¬║╜s╕╣⌐MªW║┘ª│¿Sª│¡½╜╞ --->
  18.     <CFQUERY NAME="Checkidx" DATASOURCE="Dynamic Database">    
  19.         select * from prodtype where 
  20.             type_code = '#type_code#' 
  21.             or type_name='#type_name#'
  22.     </CFQUERY>
  23.  
  24.     <cfif #Checkidx.recordcount# greater than 0>
  25.         <!------------------------------------------------------------------------->
  26.         <!--- ªp¬G╝╞╛┌¬φñññwª│░O┐²íA½h╢╟ª^ #Checkidx.recordcount# ¼░ 1,     --->
  27.         <!--- ¿Sª│░O┐²½h╢╟ª^ 0íAª]¼░¼█ªP¬║ type_code ⌐M type_nameÑu»αª│ñ@¡╙░O┐²    --->
  28.         <!------------------------------------------------------------------------->
  29.         <cfset iserror=true>
  30.         <cfset dupidx=true>            
  31.     </cfif>
  32.  
  33.     <cfif len(#type_code#) greater than 10>
  34.     <!--- └╦¼d┐ΘñJ─µª∞¬║ñσªr¼Oº_╣L¬°    --->
  35.         <cfset iserror=true>
  36.         <cfset id_long = true>
  37.     <cfelse>            
  38.         <cfset id_long =false>
  39.     </cfif>
  40.  
  41.     <cfif len(#type_name#) greater than 25>
  42.     <!--- └╦¼d┐ΘñJ─µª∞¬║ñσªr¼Oº_╣L¬°    --->
  43.         <cfset iserror=true>
  44.         <cfset name_long = true>
  45.     <cfelse>            
  46.         <cfset name_long =false>
  47.     </cfif>
  48.  
  49.     <cfif iserror>
  50.         ┐ΘñJñúÑ┐╜TíCºAÑ╟ñFÑHñU┐∙╗~íG<br>
  51.  
  52.         <cfif id_long>
  53.             ║╪├■╜s╕╣ñ╙¬°íC╜╨ñ┼┐ΘñJ╢W╣L 10 ¡╙ªrª∞¬║╜s╕╣íC<br>
  54.         </cfif>
  55.  
  56.         <cfif name_long>
  57.             ║╪├■ªW║┘ñ╙¬°íC╜╨ñ┼┐ΘñJ╢W╣L 25 ¡╙ªrª∞¬║│f¬½ªW║┘íC<br>
  58.         </cfif>        
  59.  
  60.         <cfif dupidx>
  61.             ║╪├■╜s╕╣⌐╬ªW║┘¡½╜╞<br>
  62.         </cfif>
  63.     <cfelse>
  64.         <!--------------------------------------------------------------------->
  65.         <!---    ªp¬G│q╣LñF⌐╥ª│¬║┤·╕╒íA┤N╖|¿╙¿∞│oñ@│íñ└                      --->
  66.             <!---   │o¼Oñ@Ñy╖s╝W░O┐²¬║╗yÑyíA─µª∞ªW║┘Ñ▓╢╖⌐M╝╞╛┌«w¬║─µª∞ªW║┘ñ@¡P  --->
  67.         <!--------------------------------------------------------------------->
  68.         <CFINSERT DATASOURCE="Dynamic Database" TABLENAME="Prodtype">
  69.         <HEAD><TITLE>╕Ω«╞ñw╕g╖s╝W</TITLE></HEAD>
  70.         <CENTER><H2>ºA¡Φñ~⌐╥┐ΘñJ¬║║╪├■╕Ω«╞ñw╖s╝Wª▄╝╞╛┌«wññ</H2></CENTER>
  71.         <HR>
  72.         <P ALIGN="center"><A HREF="/dynadb/index.htm">ª^¿∞ÑD¡╢</A></P>
  73.         </BODY>
  74.         </HTML>    
  75.     </cfif>
  76.