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

User administration

Create new user

<{ tntdb::Connection conn = tntdb::connectCached(dburl); std::string query = "SELECT id, realname, username FROM users ORDER BY username ASC"; tntdb::Result res = conn.select(query); std::ostream& out = reply.out(); if (res.size() > 0) { out << "
    "; for (unsigned i=0; i"; out << "" << username << " - " << realname; out << ""; } out << "
"; } else { out << "No customers found!"; } }> <&footer>