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

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

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

revision 93 by torben, Wed Nov 28 23:19:28 2007 UTC revision 94 by torben, Thu Nov 29 08:04:13 2007 UTC
# Line 23  int id; Line 23  int id;
23  <{  <{
24    
25  if (userName.size() == 0)  if (userName.size() == 0)
     reply.setHeader("Refresh", "0; url=login");  
 else  
26  {  {
27          tntdb::Connection conn = tntdb::connect(dburl);          reply.setHeader("Location", "index");
28            return HTTP_MOVED_TEMPORARILY;
29    }
30            
31    tntdb::Connection conn = tntdb::connect(dburl);
32    
33          std::stringstream query;  std::stringstream query;
34          query << "DELETE FROM customer WHERE id = " << id;  query << "DELETE FROM customer WHERE id = " << id;
35          conn.execute(query.str());  
36    conn.execute(query.str());
37    reply.setHeader("Location", "adm_customer_list");
38    return HTTP_MOVED_TEMPORARILY;
39    
         reply.setHeader("Refresh", "0; url=adm_customer_list");  
 }  
40    
41  }>  }>
42    

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

  ViewVC Help
Powered by ViewVC 1.1.20