Rozdział 15. ♦ Generowanie statystyk 417
if($dataOd != "" && SdataDo !- ""){
$query .= "WHERE Data >= 'SdataOd' AND Data <- 'SdataDo'
else if($ile > 0){
Squery .= "WHERE Data > DATĘ SUBCNOWO. INTERVAL Sile DAY)
ifdSresult = mysql_query(Squery)) return:
ifUSrow - mysql_fetch_array(Sresult)){
$allV1sits - 0:
else{
SallVisits = $row[0]:
Squery - "SELECT C0UNT(*) AS Ile FROM Stats
if(SdataOd !- "" && SdataDo != ""){
Squery .= "WHERE Data >= 'SdataOd' AND Data <= 'SdataDo' AND
else if(Si 1 e > 0){
Squery .= "WHERE Data > DATĘ SUB(N0W(). INTERVAL Sile DAY) AND
}
else{
Squery .= "WHERE
)
Squery .= "Stats.Userld o 1
ifdSresult = mysql_query($query)) return:
ifdSrow - mysql_fetch_array(Sresult)){
SknownllsersVisits = 0:
}
else{
SknownUsersVisits = $row[0]:
SunknownUsersVisits = Sal 1 Visits - Sknownlisersl/isits:
echo “<tr><td align=\"left\">Calkowita:</td>"; echo "<td align=\"right\">SallVisits</td></tr>":
echo “<tr><td align=\"left\">Zarejestrowanych:</td>": echo "<td align=\"right\">SknownUsersVisits</td></tr>'':
echo "<tr><td align=\"left\">Niezarejestrowanych:</td>"; echo "<td align=\"right\">SunknownUsersVisits</td></tr>":
function printBrowsersStats(SdataOd. SdataDo. Sile)
{
if(!SGLOBALS['connected']) return:
Squery = "SELECT COUNTO*) AS Ile. Nazwa FROM Stats. Przeglądarki