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

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

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

revision 101 by torben, Thu Nov 29 13:59:21 2007 UTC revision 171 by torben, Thu Dec 6 10:18:40 2007 UTC
# Line 26  if (userName.size() == 0) Line 26  if (userName.size() == 0)
26  <h2>Customers administration</h2>  <h2>Customers administration</h2>
27    
28  <a href="adm_customer_edit?id=-1">Create new customer</a><br>  <a href="adm_customer_edit?id=-1">Create new customer</a><br>
29    <br>
30    
31  <{  <{
32  tntdb::Connection conn = tntdb::connect(dburl);  tntdb::Connection conn = tntdb::connect(dburl);
# Line 38  tntdb::Result res = conn.select(query); Line 38  tntdb::Result res = conn.select(query);
38  std::ostream& out = reply.out();  std::ostream& out = reply.out();
39  if (res.size() > 0)  if (res.size() > 0)
40  {  {
41          out << "<ul>";          out << "<table border='1' cellspacing='0'>";
42          for (int i=0; i<res.size(); ++i)          for (unsigned i=0; i<res.size(); ++i)
43          {          {
44                  int id = res[i].getInt(0);                  int id = res[i].getInt(0);
45                  std::string name = res[i].getString(1);                  std::string name = res[i].getString(1);
46                  out << "<li>";                  out << "<tr><td>&nbsp;";
47                  out << "<a href='adm_customer_edit?id=" << id << "'>" << name << "</a>";                  out << "<a href='adm_customer_edit?id=" << id << "'>" << name << "</a>";
48                  out << " - <a href='adm_installation_list?customerid=" << id << "&name=" << name << "'>manage installations</a>";                  out << "&nbsp;</td>\n<td>&nbsp;";
49                  out << "</li>";                  out << "<a href='adm_installation_list?customerid=" << id << "&name=" << name << "'>manage installations</a>";
50                    out << "&nbsp;</td></tr>";
51          }          }
52          out << "</ul>";          out << "</table>";
53  }  }
54  else  else
55  {  {

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

  ViewVC Help
Powered by ViewVC 1.1.20