EasyCFM.COM ColdFusion Forums / Application Beta Testing Area! / ColdFusion Application Help

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: ColdFusion Application Help

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

dark2007_code
02-06-2009 @ 2:41 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 6
Joined: Jan 2009

Hello,

I have an application that is created and running on ColdFusion Server.
The index page has a few links.  These links only works if the file is .htm.
If the file is saved as .cfm the index page keeps reloading.

Any ideas which .cfm files does not open?

Please advice.

Thanks and Regards,
Dark2007_Code

Webmaster
02-06-2009 @ 3:00 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

Can you show us the code?

Pablo Varando
Senior Application Architect
EasyCFM.COM, LLC.

904.483.1457 \\ mobile
webmaster@easycfm.com \\email

\m/ (>.<) \m/
--- rock on ---

dark2007_code
02-06-2009 @ 5:24 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 6
Joined: Jan 2009

Pablo,  Thanks for your reponse. Here's the code.  I am including the APPLICATION CODE, INDEX.CFM, LOGIN_ID_FORM.CFM & LOGIN_ACTION.CFM

Thank you in advance for your support.

Regards,
Dark2007_Code

APPLICATION CODE
<!--- Technical Program Management --->

<cfapplication name="military"
sessionmanagement="Yes"
setclientcookies="Yes"
CLIENTMANAGEMENT="Yes"
SessionTimeout="#CreateTimeSpan(0,0,30,0)#">
<cfset v_military = "cargo_dev">

<!-- Application/ODBC Name for Production  -->
<!--- <cfset v_military = "cargo_prod">  --->

<!-- Application/ODBC Name for Development -->
<!--- <cfset v_military = "cargo_dev">  --->

<!-- Error Message -->
<!---  <cferror type="request"
                             template="cferror_Validation.cfm>  --->
                        

<!--- Set the cookie for requesting login when session expires --->
<cfif not isdefined("cookie.EmpMntTimeVisited")>
<!---------------- First time --------------------->
<CFCOOKIE NAME="EmpMntTimeVisited" VALUE="#Now()#">      
<!---------------- Logon begins here --------------------->
<!---------------- Show logon form --------------------->
     <CFSET session.client_set="0">     
     <cfset session.loginmessage="">
     <cfset Form.submit="Submit">
     <CFINCLUDE template="index.cfm">
     <CFABORT>
</cfif>
<cfset session.loginmessage="">
<cfif not isdefined("session.client_set")>
<!--- Just starting session or expired --->
     <cfif isdefined("cookie.EmpMntTimeVisited")>
          <cfset session.loginmessage="Your session expired, please login again.<BR>">     
     </cfif>
<!---------------- Logon begins here --------------------->
<!---------------- Show logon form --------------------->
     <CFINCLUDE template="index.cfm">
    
     <CFABORT>
</cfif>
<CFPARAM NAME="Form.user_id" DEFAULT="_____">
<CFPARAM NAME="Form.password" DEFAULT="_____">
<CFPARAM NAME="Form.submit" DEFAULT="______">
<CFIF Form.submit IS "Submit" OR session.client_set IS "0">
<!------- Just came from logon form verify the user/pasword --->
<cfif IsDefined("Form.user_id") and IsDefined("Form.password")>
<CFQUERY name="Check_Login" datasource=#v_military# maxrows="1">
SELECT *
     FROM OWNERS, COMPANY
     WHERE user_id = '#Form.user_id#'
       AND password = '#Form.password#'
       AND active = Yes
       AND owners.company_id = company.company_id
</CFQUERY>
<CFSET session.USER_ID=#Check_Login.user_id#>
<CFSET session.owner='#Check_Login.owner_name#'>
<CFSET session.owner_id='#Check_Login.owner_id#'>
<CFSET session.company='#Check_Login.company_name#'>
<CFSET session.company_id='#Check_Login.company_id#'>
<CFSET session.super_user='#Check_Login.super_user#'>
     <CFIF Check_Login.RecordCount IS "0">
          <cfset session.loginmessage=
          "Username or password<br> is incorrect.<br>Please try again.">     
          <CFINCLUDE template="index.cfm">
          <CFABORT>
     </cfif>
<!--- <cfelse>
<script language="JavaScript">
<cfoutput>location.href="guest_login.cfm"</cfoutput>
</script>  
---></cfif>
     
     <!---- Logon is OK --->
<CFAPPLICATION NAME="military"
sessionmanagement="Yes"
sessiontimeout="#CreateTimeSpan(0, 0, 30, 0)#"
CLIENTMANAGEMENT="Yes" SETCLIENTCOOKIES="Yes">
<CFSET session.client_set="1">     
</cfif>
<!---------------- Logon ends here --------------------->


INDEX.CFM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 6.0 Transitional//EN">

<html>
          <style type="text/css">
          <!--
          .style1 {font-family: Tahoma}
          .style2 {color: #808080}
          -->
          </style>
<head>
<title>Cargo eBusiness</title>

          <style>
                    .sf_text {font-size :24px; font-weight : bold; font-family : verdana, arial, helvetica, sans-serif; color: #FFFFFF;}
                    .sf_text2 {font-size :14px; font-weight : bold; font-family : verdana, arial, helvetica, sans-serif; color: #000099;}
                     td {font-size :9px; font-weight : normal; font-family : verdana, arial, helvetica, sans-serif; color: #000000;}
               </style>
     
</head>
<body link="#000099" vlink="#000099" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">
         <table width = "800">
                 <tr>
                   <td width="167"><img src = "images/Cargo.jpg" align = "left" border = "0"></td>
                    <td colspan="3"><img src = "images/blueandblack_header.jpg" align = "left" border = "0" alt = ""></td>
  </tr>  
               <tr>
                   <td colspan="6"><img src = "images/top_Line.gif" height = "8" width = "800"></td>
                 </tr>
            <tr>
                   <td width = "167" rowspan="50" align="left" valign="top"><img src = "images/LeftImageBar.jpg" width = "164" height = "411"></td>
  </tr>
  <td width="529" height="19" align="center" valign="top" colspan = "3"><font face = "Tahoma" size = "+2"><strong>Technical Documentation</strong></font></td>
  </tr>
            <tr>    
                        <td colspan = "3" align = "center"><font face = "tahoma" size = "2">Cargo Customer Service is committed to providing web applications that improve the level of service we provide you. Please Login below.<br><br>
                        </font></td><br>
              </tr>
                 <tr>
                <td width="287" rowspan="2" align="left" valign="top" cellpadding = "5">
             <img src = "images/RUL-12B-Tah.gif" align = "left"><br>
                        <br>
                        <cfform ACTION="view_menu.cfm" Method="POST">
                        <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
                          User ID: <br>
                         <script language="JavaScript">
                         if (navigator.appName == "Netscape"){
                         document.write('<input TYPE="TEXT" NAME="user_id" SIZE="8">')
                         }
                         else{
                              document.write('<input TYPE="TEXT" NAME="user_id" SIZE="15">')
                         }
                         </script><br>
                         Password: <br>
                         <script language="JavaScript">
                         if (navigator.appName == "Netscape"){
                         document.write('<input TYPE="PASSWORD" NAME="password" SIZE="8">')
                         }
                         else{
                         document.write('<input TYPE="PASSWORD" NAME="password" SIZE="15">')
                         }
                            </script><br>
                         <input NAME="submit" TYPE="SUBMIT" VALUE="Login"> <input NAME="reset" TYPE="RESET" VALUE="Reset"><br></font>
                           </cfform>
                         <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#660000">
                        <CFIF #session.loginmessage# IS NOT "">
                          <CFOUTPUT>#session.loginmessage#<BR>
                          </cfoutput>
                          <cfset session.loginmessage="">     
                       </cfif>
                        <CFAPPLICATION NAME="military"
                         sessionmanagement="Yes"
                         sessiontimeout="#CreateTimeSpan(0, 0, 20, 0)#"
                         CLIENTMANAGEMENT="Yes" SETCLIENTCOOKIES="Yes">
                        <CFSET session.client_set="0">
                         </font>
                   <td width="23" rowspan="6"><font color="#FFFFFF"> </font></td>
<td width="303" align="left" valign="top" cellpadding = "5"><p><img src = "images/RUL-12B-Ver.gif" align = "middle"><br>
    <a href = "login_id_form.cfm" target = "_new"><font face="Tahoma" size="2">Forgot User Login ID</font></a><br>
  <a href = "reset_pw_form.htm" target = "_blank"><font face="Tahoma" size="2">Forgot Password</font></a></p></td>
              </tr>
                 <tr>
                   <td align="left" valign="top" cellpadding = "5"><img src = "images/RUL-13B-Tah.gif" alt="" align = "middle"><br>
                <a href = "../login_test/register_form.cfm" target = "_new"><font face="tahoma" size="2">Document Access Request</font></a></td>
            </tr>
              <tr>
                <td width="287" align="left" valign="top" cellpadding = "5"><p><img src = "images/RUL-13B-Ver.gif" alt="" align = "left"></p>
                  <br>
                  <br>
              
                      
                        <p></td>
            </tr>
          </table>

            </table>

</table>

               <table>
                  <tr>
                     <td> 
                    </td>
                </tr>
                <tr>
                     <td> 
                    </td>
                </tr>
                       
                        <tr>
                     <td> 
                    </td>
                </tr>
                    <tr>
                     <td> 
                    </td>
                </tr>
              </table>
     
</body>
</html>

LOGIN_ID_FORM.CFM

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 6.0 Transitional//EN">

<html>
<head>
<title>Cargo eBusiness</title>

</head>

     <script language="JavaScript" src="login_id_form.js"></script>
    
     <CFFORM NAME="login_id_form" ACTION="login_action.cfm" METHOD="POST">
    
    <body onLoad="document.login_id_form.customer.focus();">

<table width = "800">
                 <tr>
                   <td width="167"><img src = "images/Cargo.jpg" align = "left" border = "0"></td>
                    <td colspan="3"><img src = "images/blueandblack_header.jpg" align = "left" border = "0" alt = ""></td>
  </tr>  
               <tr>
                   <td colspan="6"><img src = "images/top_Line.gif" height = "8" width = "800"></td>
                 </tr>
            <tr>
                   <td width = "167" rowspan="25" align = "left" valign = "top"><img src = "images/LeftImageBar.jpg" width = "164" height = "411"></td>
  </tr>
  <td width="529" height="19" align="center" valign="top" colspan = "3"><font face = "Tahoma" size = "+2"><strong>Technical Documentation</strong></font></td>
  </tr>

                    <tr>
                           <td align="center"><span class="Title">
                      <font color="#000066" size="2" face="Tahoma"><strong>Fill in this form to Request your Login ID</strong><br><br></font>
                     <font color="#660000" size="2" face="Tahoma"><em>Your Login ID and Password will be
                     emailed to the EMAIL address you provide.</em></font>
                      </span>
                      </td>
                  </tr>
            
                   <tr>
                    <td>                                                                               
             <table border="0" cellspacing="0" width="500">
                      <tr>
                      <td width="125">
                    <font color="#000066" size="2" face="Verdana, Helvetica, Arial">Name: </font>
                     </td>
                    
                     <td width="371">
                              <INPUT TYPE="text" NAME="customer" SIZE="50" MAXLENGTH="60">
                          <img border="0" src="images/required2.gif" width="18" height="14" alt="*">
                      </td>
                </tr>
                <tr>
                     <td> </td>
                    <td>
                    <font face="Tahoma" size="-2" color="#666666">First, Last Name</font></td>
                      </tr>
            
           <!--           <tr>
                      <td width="125">
                    <font color="#000066" size="2" face="Verdana, Helvetica, Arial">Last Name: 
                     </td>
                    </font>
                     <td width="371">
                              <INPUT TYPE="text" NAME="Last_Name" SIZE="30" MAXLENGTH="60">
                          <img border="0" src="images/required2.gif" width="18" height="14" alt="*">
                      </td>
                      </tr>  -->
            
                      <tr>
                       <td width="125">
                    <font color="#000066" size="2" face="Verdana, Helvetica, Arial">Company:</font>
                          </td>
                    <td width="371">
                               <INPUT TYPE="text" NAME="company" SIZE="50" MAXLENGTH="80">
                              <img border="0" src="images/required2.gif" width="18" height="14" alt="*">
                     </td>
                      </tr>
            
                      <tr>
                       <td width="125">
                    <font color="#000066" size="2" face="Verdana, Helvetica, Arial">Address:</font>
                     </td>
                        <td width="371">
                           <INPUT TYPE="text" NAME="address" SIZE="50" MAXLENGTH="80">
                     </td>
                      </tr>
            
                      <tr>
                        <td width="125">
                    <font color="#000066" size="2" face="Verdana, Helvetica, Arial">City:</font>
                     </td>
                         <td width="371">
                           <INPUT TYPE="text" NAME="city" SIZE="30" MAXLENGTH="80">
                         </td>
                      </tr>
            
                      <tr>
                        <td width="125">
                    <font color="#000066" size="2" face="Verdana, Helvetica, Arial">State:</font>
                     </td>
                      <td width="371">
                            <INPUT TYPE="text" NAME="state" SIZE="30" MAXLENGTH="80">     
                        </td>
                      </tr>

                      <tr>
                      <td width="125">
                    <font color="#000066" size="2" face="Verdana, Helvetica, Arial">Country:</font>
                    </td>
                         <td width="371">
                          <INPUT TYPE="text" NAME="country" SIZE="30" MAXLENGTH="80">
                        </td>
                      </tr>
  
                   <tr>
                     <td width="125">
                    <font color="#000066" size="2" face="Verdana, Helvetica, Arial">Zip:</font>
                    </td>
                      <td width="371">
                           <INPUT TYPE="text" NAME="zip_code" SIZE="30" MAXLENGTH="80">
                       </td>
                      </tr>

                      <tr>
                       <td width="125">
                    <font color="#000066" size="2" face="Verdana, Helvetica, Arial">Phone Number: </font>
                    </td>
                       <td width="371">
                            <INPUT TYPE="text" NAME="phone" SIZE="30" MAXLENGTH="80">
                        <img border="0" src="images/required2.gif" width="18" height="14" alt="*">
                        </td>
                      </tr>
                
  <!---                    <tr>
                         <td width="125">
                    <font color="#000066" size="2" face="Verdana, Helvetica, Arial">Fax Number: 
                    </td>
                    </font>
                        <td width="371">
                             <INPUT NAME="customer_fax" SIZE="20" MAXLENGTH="80">
                       </td>
                      </tr>  --->
                     
                      <tr>
                     <td width="125">
                    <font color="#000066" size="2" face="Verdana, Helvetica, Arial">Email Address: </font>
                    </td>
                    <td width="371">
                   <INPUT TYPE="text" NAME="email_add" SIZE="50" MAXLENGTH="80">
                            <img border="0" src="images/required2.gif" width="18" height="14" alt="*">
                         </td>
                      </tr>      
            
                    <tr>
                         <td colspan = "5"><br>
                         <font color="#000066" size="2" face="Verdana, Helvetica, Arial"><strong>Additional Comments:</strong></font><br>
                              <TEXTAREA NAME="message" ROWS="3" COLS="50" ID="message"></TEXTAREA><br>
                    <!--    <input type="submit" value="Submit">
                           <INPUT TYPE="RESET" VALUE="Reset">  -->
                           
                        <img border="0" src="images/required2.gif" width="18" height="14" align = "center" alt="required2 field"> <font face="Verdana, Helvetica, Arial" size="2">indicates a required field</font>
                        </td>
                    </tr>
                                <tr>
                      <td colspan = "7" align = "center">
                     <input name="Submit" type = "submit" onClick="if(check(this.form)){
                        this.form.submit();
                         }
                         else
                         {
                        return false
                         }" style = "background: #003366; color: white; font-size: 1em" value = "SUBMIT"/>
                        </td>
                 </tr>
                                    
               </table>
            </table>
</cfform>
</body>
</html>

LOGIN_ACTION.CFM
<html>
<head>

<title>Cargo ebusiness</title>

<style>
.compheader {font-size: 12px; font-weight: bold; font-family: verdana, helvetica, arial, sans-serif;}
.compheader1 {font-size: 12px; font-weight: bold; font-family: verdana, helvetica, arial, sans-serif; color:#000066}
.compheader2 {font-size: 12px; font-weight: normal; font-family: verdana, helvetica, arial, sans-serif;}
.compheader3 {font-size: 10px; font-weight: bold; font-family: verdana, helvetica, arial, sans-serif; color:#707070}
</style>

</head>

<body>

<cfif not isdefined("form.customer")>
<cfset customer = "">
<cfelse>
<cfset customer=#form.customer#>
</cfif>

<cfif not isdefined("form.company")>
<cfset company = "">
<cfelse>
<cfset company=#form.company#>
</cfif>

<cfif not isdefined("form.address")>
<cfset address = "">
<cfelse>
<cfset address=#form.address#>
</cfif>

<cfif not isdefined("form.city")>
<cfset city = "">
<cfelse>
<cfset city=#form.city#>
</cfif>

<cfif not isdefined("form.state")>
<cfset state = "">
<cfelse>
<cfset state=#form.state#>
</cfif>

<cfif not isdefined("form.country")>
<cfset country = "">
<cfelse>
<cfset country=#form.country#>
</cfif>

<cfif not isdefined("form.zip_code")>
<cfset zip_code = "">
<cfelse>
<cfset zip_code=#form.zip_code#>
</cfif>

<cfif not isdefined("form.phone")>
<cfset phone = "">
<cfelse>
<cfset phone=#form.phone#>
</cfif>

<cfif not isdefined("form.email_add")>
<cfset email_add = "">
<cfelse>
<cfset email_add=#form.email_add#>
</cfif>

<cfif not isdefined("form.message")>
<cfset message = "">
<cfelse>
<cfset message=#form.message#>
</cfif>



  
<!---     <cfif isDefined("Cust_Name")>   --->
        <cfmail from="Cargo_ebusiness"
            to="dark2007_code@hotmail.com"
             subject="Cargo - Registration/Password">
  
       
       From: #email_add#
      
       Name - #Name#

       Company - #company#
      
      Address - #address#
      
      City - #city#
      
      State - #state#
      
      Zip Code - #zip_code#
      
      Country - #country#
      
      Telephone - #phone#

       Additional Comments - #message#

   </cfmail>
<!--- </cfif>   --->

                        
       <table width="506" border="1" bordercolor="#990000">
      
             <tr >
                  <td align = "center">
                  <font face = "Verdana" size = "+1" color="#003366"><br><strong>Text<br />
                 <hr /></strong></font></td>
            </tr>
            
               <tr>
                    <td>
                      <p><font size="2" face="Tahoma, Helvetica, Arial" color="##800000"><br><b>Dear <cfoutput>#form.Name#,</cfoutput><br><br>Your Request for Registration/Password has been successfully submitted.<br><br>
                 Action will be taken to address your Request.<br><br></b></font></p>
            <font face = "Georgia, Times New Roman, Times, serif" size = "2" color="#003366"><em>Cargo Product Support Management Office<br /></em></font><br></td>
             </tr>
  

</table>

</body>

</html>






MIGhunter
02-14-2009 @ 4:02 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 570
Joined: Apr 2006

It's 5am and I'm tired so I might be off.  Looking at your application file it seems like you are putting in includes for the other files.  Then in the other files you are including the application file.  Seems like it's making a perpetual loop.


Website Designed and Developed by Pablo Varando.