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");
-}
-
?>