7 print([[<script type="text/javascript">
16 require
"luasql.mysql";
17 env
= assert (luasql
.mysql())
18 con
= assert (env
:connect(CONF_DB
.DBN
, CONF_DB
.USR
, CONF_DB
.PWD
, CONF_DB
.SRV
), "mysql connect bad")
21 function rows(connection
, sql_statement
)
22 local cursor
= assert(connection
:execute(sql_statement
))
30 for email
, pwd
in rows(con
, "select email,clear from postfix_users") do
31 print(string.format ("%s:%s<br>", email
, pwd
))
36 as_head(cb_head
, "mysql as_header");
37 as_body(cb_body
, "init();");