From 95ac68f6b9b217d1203bb1572ff842f72b02f8eb Mon Sep 17 00:00:00 2001 From: Jean-Marc Pigeon Date: Tue, 9 Sep 2025 05:24:50 -0400 Subject: [PATCH] Able to search within user list --- www/gessql.php | 7 +++++-- www/lvlusr.php | 25 ++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/www/gessql.php b/www/gessql.php index 80fe7cf..502e257 100644 --- a/www/gessql.php +++ b/www/gessql.php @@ -165,14 +165,17 @@ rou_alert(0,"$OPEP, now logname=<$logname>"); // Function to retreive a some email record // //============================================================== -function sql_getemaillist($dbsql,$limit,$skip) +function sql_getemaillist($dbsql,$username,$limit,$skip) { $OPEP="gessql.php:sql_getemaillist"; $strlim=""; $strskip=""; -$strsel="Select * from emails order by email asc"; +$select=""; +if ($username!=NULL) + $select="where email like '%$username%'"; +$strsel="Select * from emails $select order by email asc"; if ($limit!=NULL) $strlim="limit $limit"; if ($skip!=NULL) diff --git a/www/lvlusr.php b/www/lvlusr.php index 76e6ff7..282a9c7 100644 --- a/www/lvlusr.php +++ b/www/lvlusr.php @@ -13,9 +13,13 @@ include_once "gessql.php"; function tblheader(int $numrec,int $offset,int $limit) { +global $userlang; + +$email=gettranslate($userlang,"Email"); + $STR = << - +
@@ -41,7 +45,16 @@ $STR = << $offset/$numrec - + + +
+ +$email: + + + +
+
@@ -69,8 +82,12 @@ global $logname; $limit=20; $offset=0; +$username=NULL; $dbsql=sql_connect(); $numrec=sql_getnumrec($dbsql,"emails"); +if (isset($_POST['username'])) + $username=($_POST['username']); +rou_alert(0,"Post jmpdbg=<$username>"); if (isset($_POST['limit'])) $limit=intval($_POST['limit']); if (isset($_POST['offset'])) @@ -101,7 +118,7 @@ if (isset($_POST['scanner'])) { } rou_alert(0,"JMPDBG scanner=$scanner offset=$offset"); $line=""; -$emails=sql_getemaillist($dbsql,$limit,$offset); +$emails=sql_getemaillist($dbsql,$username,$limit,$offset); $count=$offset; foreach($emails as $email) { $bgcolor="white"; @@ -162,6 +179,8 @@ $line +
+
$footer $stop EOT; -- 2.47.3