0) ? $Size : 25; $First=(!array_key_exists('f', $_GET) || empty($_GET['f'])) ? 1 : only_digits($_GET['f'], 4); $First=(is_numeric($First) && $First>0) ? $First : 1; list($GoodAcct, $AcctName)=chk_acct($Key,'A'); if (!$GoodAcct) { $Page='0;url=failed.php'; $First=1; $Size=25; $max_cnt=0; } else { $Page='900;url=amenu.php?k='.$Key; $query='select count(*) from logins'; $cnt_res=mysqli_query($db, $query); $cnt_row=mysqli_fetch_row($cnt_res); $max_cnt=$cnt_row[0]; if ($First > $max_cnt) { $First=max(1,intval($max_cnt / $Size) * $Size + 1); } } ?>

Access Log

'."\n"; $HRef='logins.php?k='.$Key.'&f='.$First.'&s='.$Size.'&o='; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; switch ($Order) { case 'ba': $where='brewer, chg_ts desc'; break; case 'bd': $where='brewer desc, chg_ts desc'; break; case 'da': $where='chg_ts'; break; case 'dd': $where='chg_ts desc'; break; case 'na': $where='fullname, brewer, chg_ts desc'; break; case 'nd': $where='fullname desc, brewer, chg_ts desc'; break; case 'ta': $where='acct_type, chg_ts desc'; break; case 'td': $where='acct_type desc, chg_ts desc'; break; case 'sa': $where='valid_login, chg_ts desc'; break; case 'sd': $where='valid_login desc, chg_ts desc'; break; default: $where='chg_ts desc'; } $query='select * from logins order by '.$where; if (!empty($Size) && $Size > 0) { $query.=' limit '.(($First > 1) ? ($First - 1).', ' : '').$Size; } $login_res=mysqli_query($db, $query); while ($login_row=mysqli_fetch_assoc($login_res)) { echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; } echo '
'."\n"; echo 'Date/Time'."\n"; echo ''."\n"; echo 'Brewer Number'."\n"; echo ''."\n"; echo 'Brewer Name'."\n"; echo ''."\n"; echo 'Login
Type
'."\n"; echo '
'."\n"; echo 'Login
Status
'."\n"; echo '
'."\n"; echo 'IP Address'."\n"; echo '
'."\n"; echo $login_row['chg_ts']."\n"; echo ''."\n"; if ($login_row['brewer'] < 'A') { echo ''.$login_row['brewer'].''; } else { echo $login_row['brewer']; } echo "\n"; echo ''."\n"; echo (empty($login_row['fullname']) ? ' ' : $login_row['fullname'])."\n"; echo ''."\n"; echo $login_row['acct_type']."\n"; echo ''."\n"; echo $login_row['valid_login']."\n"; echo ''."\n"; echo $login_row['remote_ip']."\n"; echo '
'."\n"; echo '
'."\n"; table_nav ('logins.php?k='.$Key.'&o='.$Order, $max_cnt, $First, $Size); ?>