// vim: smarttab tabstop=8 shiftwidth=2 expandtab
-.table-userlist tr:nth-child(odd)
- {
- background-color: #0074ab ;
- color: yellow ;
- }
-
-.table-userlist tr:nth-child(even)
- {
- background-color: #e6f7ff ;
- color: black ;
- }
-
-.myTable { background-color:#eee;border-collapse:collapse; }
-.myTable th { background-color:#000;color:white;width:50%; }
-.myTable td, .myTable th { padding:5px;border:1px solid #000; }
+//==============================================================
+//function to update screen limit
+//==============================================================
+function updatelimit()
+
+{
+let limitvalue=document.getElementById("limit-choice").value;
+limitvalue*=10;
+document.getElementById("demo").innerHTML = limitvalue;
+window.location.reload();
+}
include_once "gesdis.php";
include_once "gessql.php";
+function tblheader(int $limit)
+
+{
+$STR = <<<EOT
+<TR>
+<TH align=left>LEFT</TH>
+<TD align=center> <p id="demo"></p> </TD>
+<TD align=right>
+<FORM method="post">
+<select name="tbllim" onchange='if(this.value!=0) {this.form.submit();}'>
+<option selected="selected">$limit</option>
+<option value=20>20</option>
+<option value=40>40</option>
+<option value=80>80</option>
+<option value=100>100</option>
+</SELECT>
+</FORM>
+</TD>
+</TR>
+EOT;
+
+return $STR;
+}
+
//section to generate the main screen body
function body($logname)
global $isadmin;
global $logname;
+$limit=20;
+$agent_id=$_POST['tbllim'];
+if ( $agent_id!=NULL)
+ $limit=intval($agent_id);
+rou_alert(0,"JMPDBG agent_id=$agent_id limit=$limit");
$line="";
$count=0;
$dbsql=sql_connect();
-$emails=sql_getemaillist($dbsql,20,NULL);
+$emails=sql_getemaillist($dbsql,$limit,NULL);
foreach($emails as $email) {
$bgcolor="white";
if ($count & 1 ) {
}
sql_close($dbsql);
-$start=starthtml(NULL);
+$start=starthtml("directives");
$stop=endhtml();
$top=topper($isadmin,$logname,"lvlusr");
$footer=footer("lvlusr");
-
+$tblheader=tblheader($limit);
$STR = <<<EOT
$start
</style>
<CENTER>
-<table class="table-userlist" WIDTH="80%" BORDER="1" CellSpacing="0">
+<table WIDTH="100%" BORDER="0" CellSpacing="0">
+$tblheader
+<table class="table-userlist" WIDTH="100%" BORDER="1" CellSpacing="0">
<TR>
<TH align=center>Email</TH>
<TH align=center>lastemail</TH>
</TR>
$line
</Table>
+</Table>
</CENTER>
$footer
$stop