title = "Example 3"; // The
$S->banner = "Example Three
"; // This is the banner.
$S->defaultCss = "../css/style.css";
// There is more information about the mysql functions at https://bartonlp.github.io/site-class/ or
// in the docs directory.
$sql = "select site, ip, agent, finger, count, created, lasttime from $S->masterdb.logagent where lasttime>=current_date() and site='Examples'";
$S->query($sql);
while([$site, $ip, $agent, $finger, $count, $created, $lasttime] = $S->fetchrow('num')) {
$rows .= "| $site | $ip | $agent | $finger | $count | $created | $lasttime |
";
}
// Now here is an easier way using dbTables.
// For more information on dbTables you can look at the source or the documentation in the docs
// directory on on line at https://bartonlp.github.io/site-class/
$T = new dbTables($S);
$tbl = $T->maketable($sql, ['attr'=>['id'=>'table1', 'border'=>'1']])[0];
[$top, $footer] = $S->getPageTopBottom();
echo <<
Here are the entries from the 'logagent' table for today.
| site | ip | agent | finger | count | created | lasttime |
$rows
Same table but with dbTables
$tbl
Example1
Example2
Example3
Example4
Example5
Example6
PHPINFO
$footer
EOF;