Statistik aus langeweile

DevEye

Erfahrenes Mitglied
mache grad aus langeweile ne statistik, aber da ist n fehler drin, wer ihn findet kriegt nen keks! Danke!!!

PHP:
<?
$today = "0";
$tmonth = "0";
$tyear = "0";
$yesterday = "0";
$ymonth = "0";
$yyear = "0";
$array = file( "count.all");
for($x=0;$x<count($array);$x++)
 {
       if ($skin == "WhiteAngel"){
       $color1 = "dcdcdc";
       $color2 = "FFFFFF";
       }
       else{
       $color1 = "990000";
       $color2 = "440000";
       }
       $daten = explode("||@@||",$array[$x]);
	$dateex = explode(".",$daten[0]);
	$timeex = explode(".",$daten[1]);
	

	if ($dateex[0] == date(d)){
	 if ($dateex[1] == date(m)){
	  if ($dateex[2] == date(y))
		{
		$today = $today +1;
		}}}	
	 
	if ($dateex[1] == date(m)){
	  if ($dateex[2] == date(y))
		{
		$tmonth = $tmonth +1;
		}}	
	
	  if ($dateex[2] == date(y))
		{
		$tyear = $tyear +1;
		}

	$d = explode("0",dateex[0]);
	if ($d[0] < 10) {
	if ($d[0] == date("d-1")){
	 if ($dateex[1] == date(m)){
	  if ($dateex[2] == date(y))
		{
		$yesterday = $yesterday +1;
		}}}}
	else{
	if ($dateex[0] == date("d-1")){
	 if ($dateex[1] == date(m)){
	  if ($dateex[2] == date(y))
		{
		$yesterday = $yesterday +1;
		}}}}
	
	$m = explode("0",dateex[1]);
	if ($m[0] < 10) { 
	if ($m[1] == date("m-1")){
	  if ($dateex[2] == date(y))
		{
		$ymonth = $ymonth +1;
		}}}
	else{
	 if ($dateex[1] == date("m-1")){
	  if ($dateex[2] == date(y))
		{
		$yesterday = $yesterday +1;
		}}}

	  if ($dateex[2] == date("y-1"))
		{
		$yyear = $yyear +1;
		}


	
     }
       echo "<table width=\"80%\" borderspacing=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border:1px solid black;\">";
       echo "<tr bgcolor=\"#$color2\"><td width=\"80%\">Besucher Heute:</td><td align=\"right\" width=\"20%\">$today</td></tr>";
       echo "<tr bgcolor=\"#$color2\"><td width=\"80%\">Besucher diesen Monat:</td><td align=\"right\" width=\"20%\">$tmonth</td></tr>";
       echo "<tr bgcolor=\"#$color2\"><td width=\"80%\"> Besucher dieses Jahr:</td><td align=\"right\" width=\"20%\">$tyear</td></tr>";
       echo "</table><br>";
       echo "<table width=\"80%\" borderspacing=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border:1px solid black;\">";
       echo "<tr bgcolor=\"#$color2\"><td width=\"80%\">Besucher Gestern:</td><td align=\"right\" width=\"20%\">$yesterday</td></tr>";
       echo "<tr bgcolor=\"#$color2\"><td width=\"80%\">Besucher letzten Monat:</td><td align=\"right\" width=\"20%\">$ymonth</td></tr>";
       echo "<tr bgcolor=\"#$color2\"><td width=\"80%\"> Besucher letzes Jahr:</td><td align=\"right\" width=\"20%\">$yyear</td></tr>";
       echo "</table><br>
?>
 
Zurück