예제 #1
0
function graphmore()
{
    $month = date('Y-m');
    $users = new user($_SESSION["uid"]);
    $sql = "SELECT COUNT(zDate) as tcount ,rcpt_to,mailfrom,\n\t\tDATE_FORMAT(zDate,'%Y-%m-%d') as tday,DATE_FORMAT(zDate,'%Y-%m') as tmonth FROM mails_events group by DATE_FORMAT(zDate,'%Y-%m-%d'),mailfrom\t\n\t\tHAVING rcpt_to='{$users->mail}' AND mailfrom='{$_GET["from"]}' AND tmonth='{$month}' ORDER BY tday;";
    $textes[] = 'title';
    $donnees[] = 'nb mails/day';
    $s = new mysql();
    $results = $s->QUERY_SQL($sql, "artica_events");
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $textes[] = $ligne["tday"];
        $donnees[] = $ligne["tcount"];
    }
    //$links=array("url"=>"javascript:MyHref('system_statistics.php?LinesMessagesHour=yes',_category_)","target"=>"javascript");
    include_once 'listener.graphs.php';
    BuildGraphCourbe(array($textes, $donnees), $links);
}
예제 #2
0
function CourbeQuarantine()
{
    $email = $_GET["tempsQuarantine"];
    $sql = "SELECT strftime('%m',zDate) as tmonth,strftime('%Y',zDate),COUNT(ID) as tcount FROM messages \n\tWHERE mail_to LIKE '%{$email}%' AND strftime('%m',zDate)='" . date('m') . "' AND strftime('%Y',zDate)='" . date('Y') . "' AND  quarantine=1 AND Deleted IS NULL\n\tGROUP BY strftime('%m',zDate),strftime('%Y',zDate)\n\tORDER BY strftime('%Y',zDate), strftime('%m',zDate)";
    $results = QUERY_SQL($sql);
    $textes[] = 'title';
    $donnees[] = '';
    while ($ligne = sqlite3_fetch_array($results)) {
        $textes[] = $ligne["tmonth"];
        $donnees[] = $ligne["tcount"];
    }
    BuildGraphCourbe(array($textes, $donnees));
}