include_once "gesdis.php";
include_once "gessql.php";
-//==============================================================
-//
-// Procedure to extract the list of actions
-//
-//==============================================================
-function getactions($dbsql,$offset)
-
-{
-$limit=20;
-if (isset($_POST['username']))
- $username=trim(($_POST['username']));
-if (isset($_POST['limit']))
- $limit=intval($_POST['limit']);
-$numrec=sql_getnumactions($dbsql,$username);
-$actions=sql_getactionslist($dbsql,$username,$limit,$offset);
-
-return $actions;
-}
-
//==============================================================
//
// section to generate the main screen body
$top=topper($isadmin,$logname,"lvlmai");
$footer=footer("lvlmai");
+$limit=20;
$offset=0;
$username="";
+if (isset($_POST['limit']))
+ $limit=intval($_POST['limit']);
if (isset($_POST['offset']))
$offset=intval($_POST['offset']);
-$dbsql=sql_connect();
-$actions=getactions($dbsql,$offset);
+$rqst=NEW probe("actions",$limit,$offset);
+if (isset($_POST['username'])) {
+ $username=trim(($_POST['username']));
+ $rqst->where("username","like","%$username%");
+ }
+$actions=$rqst->order("username asc")
+ ->limit($limit)
+ ->GET();
$line="";
$count=$offset+1;
foreach($actions as $action) {
//end of generation
$count++;
}
-sql_close($dbsql);
+$rqst->close();
$STR = <<<EOT