From: Jean-Marc Pigeon Date: Mon, 24 Nov 2025 19:20:16 +0000 (-0500) Subject: Cleaning 'dead' function within gessql.php X-Git-Tag: tag-0.18~10 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=ae456ea6b5d7e2d90358a4d09551d95ce950278b;p=jmp%2Fmailleur Cleaning 'dead' function within gessql.php --- diff --git a/www/gessql.php b/www/gessql.php index b1ea48d..1769bdc 100644 --- a/www/gessql.php +++ b/www/gessql.php @@ -323,87 +323,4 @@ while ($proceed==true) { rou_alert(0,"$OPEP, now logname=<$logname>"); } -//============================================================== -// -// Function to retreive user email list -// -//============================================================== -function sql_getemaillist($dbsql,$username,$limit,$skip) - -{ -$OPEP="gessql.php:sql_getemaillist"; - -$strlim=""; -$strskip=""; -$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) - $strskip="offset $skip"; -$stmt=$dbsql->Select("$strsel $strlim $strskip"); -return $stmt->fetchAll(); -} - -//============================================================== -// -// Function to return the number of record within email -// table according a select. -// -//============================================================== -function sql_getnumemail($dbsql,$username) - -{ -$OPEP="gessql.php:sql_getnumemail"; - -$select=NULL; -if ($username!=NULL) - $select="where email like '%$username%'"; -return sql_getnumrec($dbsql,$select,"emails"); -} -//============================================================== -// -// Function to retreive user actions list -// -// -//============================================================== -function sql_getactionslist($dbsql,$username,$limit,$skip) - -{ -$OPEP="gessql.php:sql_getactions"; - -$strlim=""; -$strskip=""; -$select=""; -if ($username!=NULL) - $select="where (smtpfrom like '%$username%') or (rcptto like '%username%')"; -$strsel="Select * from actions $select order by creation desc"; -if ($limit!=NULL) - $strlim="limit $limit"; -if ($skip!=NULL) - $strskip="offset $skip"; -rou_alert(0,"$OPEP JMPDBG <$strsel $strlim $strskip>"); -$stmt=$dbsql->Select("$strsel $strlim $strskip"); -return $stmt->fetchAll(); -} - -//============================================================== -// -// Function to return the number of record within actions -// table according a select. -// -//============================================================== -function sql_getnumactions($dbsql,$username) - -{ - $OPEP="gessql.php:sql_getnumactions"; - -$select=NULL; -if ($username!=NULL) - $select="where rcptto like '%$username%'"; -return sql_getnumrec($dbsql,$select,"actions"); -} - ?>