\n" . mysql_error()); $commit=mysql_query("COMMIT ;"); $tab=mysql_query("SHOW TABLES LIKE 'STAT_ARTICLE_$ID_JOUR'"); if (mysql_num_rows($result) == 0 or mysql_num_rows($tab) == 0) { header("Location: index.php"); exit; } while($row=mysql_fetch_row($result)) { $idissue=$row[1]; } include ("header.php"); $icid = $_GET[icid]; print ("
"); print (""); print ("
"); DrawArtykul($icid, 0); print("
"); if ($LANG == 'EN'){ $fulla = "Abstract total views"; $fulld = "Full text total downloads"; $maxi = "Maximum downloads"; $mini = "Minimum downloads"; $avg = "Average monthly downloads"; } else { $fulla = "Wszystkich wyświetleń streszczenia"; $fulld = "Wszystkich ściągnięć pełnego tekstu"; $maxi = "Największa liczba ściągnięć"; $mini = "Najmniejsza liczba ściągnięć"; $avg = "Średnia miesięczna liczba ściągnięć:"; } print ("
"); $commit=mysql_query("SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ;"); $q = " ( SELECT count(ID_STAT) AS ile, 0 AS dzien, '".$fulla."' as agregacja FROM STAT_ARTICLE_".$ID_JOUR." WHERE (ICID = ".$icid.") AND (STAT_ARTICLE_".$ID_JOUR.".WHAT = 'A') ) UNION ( SELECT count(ID_STAT) AS ile, 0 AS dzien, '".$fulld."' as agregacja FROM STAT_ARTICLE_".$ID_JOUR." WHERE (ICID = ".$icid.") AND (STAT_ARTICLE_".$ID_JOUR.".WHAT = 'F') ) UNION ( SELECT COUNT(ID_STAT) AS ile, DATE_FORMAT(`DATE`, '%Y.%m') AS dzien,'".$maxi."' as agregacja FROM STAT_ARTICLE_".$ID_JOUR." WHERE (ICID = ".$icid.") AND (STAT_ARTICLE_".$ID_JOUR.".WHAT = 'F') GROUP BY DZIEN ORDER BY 1 DESC LIMIT 1 ) UNION ( SELECT COUNT(ID_STAT) AS ile, DATE_FORMAT(`DATE`, '%Y.%m') AS dzien, '".$mini."' as agregacja FROM STAT_ARTICLE_".$ID_JOUR." WHERE (ICID = ".$icid.") AND (STAT_ARTICLE_".$ID_JOUR.".WHAT = 'F') GROUP BY DZIEN ORDER BY 1 ASC LIMIT 1 ) "; $total=0; $mysql_result42 = mysql_query($q, $mysql_link) or die ("$q
\n" . mysql_error()); $commit=mysql_query("COMMIT ;"); $i=0; while($row42=mysql_fetch_row($mysql_result42)) { $i==1 ? $total = $row42[0] : $total=$total; ($i==1 or $i==0) ? $color="color:red" : $color=""; if ($row42[1]!='0'){ $data=''.$row42[1].''; } print ("".$row42[2].": ".$row42[0]." ".$data."
"); $i++; } // echo $total; $commit=mysql_query("SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ;"); $qu=mysql_query("SELECT COUNT( DISTINCT (DATE_FORMAT( `DATE` , '%Y.%m' ) ) ) FROM STAT_ARTICLE_".$ID_JOUR." WHERE ICID =".$icid.""); $commit=mysql_query("COMMIT ;"); $mies=mysql_fetch_array($qu); $srednia=$total/$mies[0]; print "".$avg.": ".round($srednia,2)."
"; print "

\"\"



\n"; print (""); print ("
"); print ("
"); include("stopka.php"); ?>