<%pre> #include #include #include #include <%config> dburl; <%session scope="global"> std::string userName; <{ if (userName.size() == 0) { reply.setHeader("Location", "index"); return HTTP_MOVED_TEMPORARILY; } }> <&header title="Customer administration">

Customers administration

Create new customer
<{ tntdb::Connection conn = tntdb::connect(dburl); std::string query = "SELECT id, name FROM customer ORDER BY name ASC"; tntdb::Result res = conn.select(query); std::ostream& out = reply.out(); if (res.size() > 0) { out << ""; for (unsigned i=0; i\n"; } out << "
"; out << "" << name << ""; out << ""; out << "manage installations"; out << "
"; } else { out << "No customers found!"; } }> <&footer>