--- trunk/tntnet/dynamic/adm_customer_list.ecpp 2007/11/29 07:34:54 93
+++ trunk/tntnet/dynamic/adm_customer_list.ecpp 2007/11/29 08:04:13 94
@@ -13,23 +13,23 @@
std::string userName;
%session>
+<{
+if (userName.size() == 0)
+{
+ reply.setHeader("Location", "index");
+ return HTTP_MOVED_TEMPORARILY;
+}
+}>
+
<&header title="Customer administration">
&header>
Customers administration
Create new customer
-<{
-
-if (userName.size() == 0)
-{
- reply.setHeader("Refresh", "0; url=login");
- return HTTP_OK;
-}
-
-tntdb::Connection conn;
-conn = tntdb::connect(dburl); //letting exceptions flow up and to tntnet and let it display an error message
+<{
+tntdb::Connection conn = tntdb::connect(dburl);
std::string query = "SELECT id, name FROM customer ORDER BY name ASC";