Compiled Template multiple.adp
set __adp_output {}; set __ad_conn_locale [ad_conn locale]
append __adp_output "<html>
<head>
<title>Demo: Sample Users</title>
</head>
<body>
<h1>Sample Users</h1>
"
if {"${users:rowcount}" eq "0"} {
append __adp_output "
<p>Sorry, there are no users in the system at this time.</p>
"
} else {
append __adp_output "
<h2>Striped</h2>
<blockquote>
<table>
<tr><th>First Name</th><th>Last Name</th></tr>
"
if {[info exists users]} {
upvar 0 users __d5_swap
}
for { set __d5_i 1 } { $__d5_i <= ${users:rowcount} } { incr __d5_i } {
upvar 0 users:$__d5_i users
if {[expr {"[ns_quotehtml [lang::util::localize $users(rownum)]]" % 2}]} {
append __adp_output "<tr>"
} else {
append __adp_output "<tr bgcolor=\"#eeeeee\">"
}
append __adp_output "
<td>[ns_quotehtml [lang::util::localize $users(first_name)]]</td><td>[ns_quotehtml [lang::util::localize $users(last_name)]]</td>
</tr>
"
}
if {[info exists __d5_swap]} {
upvar 0 __d5_swap users
}
append __adp_output "
</table>
</blockquote>
<h2>Maximally 2 rows, starting after 1</h2>
<blockquote>
<table>
<tr><th>Row Number</th><th>First Name</th><th>Last Name</th></tr>
"
if {[info exists users]} {
upvar 0 users __d8_swap
}
for { set __d8_i 2 } { $__d8_i <= ${users:rowcount} && $__d8_i <= 2 + 1 } { incr __d8_i } {
upvar 0 users:$__d8_i users
append __adp_output "
<tr><td>[ns_quotehtml [lang::util::localize $users(rownum)]]</td>
<td>[ns_quotehtml [lang::util::localize $users(first_name)]]</td>
<td>[ns_quotehtml [lang::util::localize $users(last_name)]]</td></tr>
"
}
if {[info exists __d8_swap]} {
upvar 0 __d8_swap users
}
append __adp_output "
</table>
</blockquote>
"
}
append __adp_output "
</body>
</html>
"
set __adp_output