/[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 94 by torben, Thu Nov 29 08:04:13 2007 UTC revision 171 by torben, Thu Dec 6 10:18:40 2007 UTC
# Line 15  dburl; Line 15  dburl;
15    
16  <%session scope="global">  <%session scope="global">
17  std::string userName;  std::string userName;
 bool isAdmin;  
18  </%session>  </%session>
19    
20  <%args>  <%args>
# Line 44  else Line 43  else
43    
44  reply.out() << "<a href='adm_customer_list'>";  reply.out() << "<a href='adm_customer_list'>";
45  reply.sout() << "<< back to customer list";  reply.sout() << "<< back to customer list";
46  reply.out() << "</a><br>";  reply.out() << "</a><br><br>";
47    
48  tntdb::Connection conn = tntdb::connect(dburl);  tntdb::Connection conn = tntdb::connect(dburl);
49    
# Line 75  if (submit == "1") Line 74  if (submit == "1")
74                  tntdb::Statement st = conn.prepare("UPDATE customer SET name=:v1, address=:v2, phonenr=:v3, contactperson=:v4 WHERE id=:v5");                  tntdb::Statement st = conn.prepare("UPDATE customer SET name=:v1, address=:v2, phonenr=:v3, contactperson=:v4 WHERE id=:v5");
75                  st.setString("v1", form_name).setString("v2", form_address).setString("v3", form_phone).setString("v4", form_contact).setInt("v5", id);                  st.setString("v1", form_name).setString("v2", form_address).setString("v3", form_phone).setString("v4", form_contact).setInt("v5", id);
76                  st.execute();                  st.execute();
77    
78                    reply.out() << "<i>Customer updated</i><br>\n";
79          }          }
80    
81  }  }
# Line 142  if (showForm) Line 143  if (showForm)
143  <br>  <br>
144  <form method="post" action="adm_customer_delete">  <form method="post" action="adm_customer_delete">
145  <input type="hidden" name="id" value="<$ id $>">  <input type="hidden" name="id" value="<$ id $>">
146  <input type="submit" value="Delete">  <input type="submit" value="Delete this customer">
147  </form>  </form>
148    
149  <{  <{

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

  ViewVC Help
Powered by ViewVC 1.1.20