/[H9]/trunk/tntnet/dynamic/adm_customer_edit.ecpp
ViewVC logotype

Diff of /trunk/tntnet/dynamic/adm_customer_edit.ecpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 93 by torben, Thu Nov 29 07:34:54 2007 UTC revision 94 by torben, Thu Nov 29 08:04:13 2007 UTC
# Line 22  bool isAdmin; Line 22  bool isAdmin;
22  int id;  int id;
23  </%args>  </%args>
24    
25    <{
26    if (userName.size() == 0)
27    {
28            reply.setHeader("Location", "index");
29            return HTTP_MOVED_TEMPORARILY;
30    }
31    }>
32    
33    
34  <&header title="Customer Administration">  <&header title="Customer Administration">
35  </&header>  </&header>
36    
37    
   
38  <{  <{
39    
 if (userName.size() == 0)  
 {  
     reply.setHeader("Refresh", "0; url=login");  
         return HTTP_OK;  
 }  
   
40  if (id == -1)  if (id == -1)
41          reply.out() << "<h2>New Customer</h2>\n";          reply.out() << "<h2>New Customer</h2>\n";
42  else  else
# Line 64  if (submit == "1") Line 66  if (submit == "1")
66    
67                  //tntdb::Value v = conn.selectValue("SELECT lastval()"); //get the auto-generated id                  //tntdb::Value v = conn.selectValue("SELECT lastval()"); //get the auto-generated id
68                  //id = v.getInt();                  //id = v.getInt();
69                  reply.setHeader("Refresh", "0; url=adm_customer_list");  
70                  return HTTP_OK;                  reply.setHeader("Location", "adm_customer_list");
71                    return HTTP_MOVED_TEMPORARILY;
72          }          }
73          else          else
74          {          {

Legend:
Removed from v.93  
changed lines
  Added in v.94

  ViewVC Help
Powered by ViewVC 1.1.20