$dat[1] + 7200) { $ipa[$i] = ""; $zeita[$i] = ""; $countera[$i] = ""; } $i++; } $zeitan = ""; $ipan = ""; $counteran = ""; if($merke == "1") { $ipan = "$ip|"; $zeitan = "$zeit|"; $counteran = "$counter|\n"; $zählen = "1"; } $t = "0"; $datei = fopen("counter/$user.ip.log", "w+"); while($t < $i) { fputs($datei, "$ipa[$t]$zeita[$t]$countera[$t]"); $t++; } if($zeitan != "" and $ipan != "") { fputs($datei, "$ipan$zeitan$counteran"); } fclose($datei); $i = "1"; $merke = "1"; while ($i < $nr) { if(isset($name[$i])) { if($counter == $name[$i]) { if($aktiv[$i] == "Ja") { $ac1234 = ""; if($zählen == "1") { $wert[$i] = $wert[$i] + 1; } $countanz = $wert[$i]; } else { $countanz = $wert[$i]; } $merke = "0"; $counternr = "$i"; }} $i++; } if($merke == "1") { $name[$nr] = $counter; $wert[$nr] = "0"; $layout[$nr] = "1"; $aktiv[$nr] = "$ncaa"; $counternr = "$nr"; $countanz = $wert[$nr]; $nr++; } $i = "1"; $data = fopen("counter/$user.php","w+"); fputs($data,""); fclose($data1); if($zählen == "1") { if(isset($ac1234)) { // Log-Datei schreiben $daddum_jahr = strftime("%Y"); $daddum_week = strftime("%W"); // echo ("$daddum_jahr , $daddum_week
"); $cnt = -1; $pruef = FALSE; if (file_exists("counter/$user.$counter.log")) { $datei = fopen ("counter/$user.$counter.log","r"); while (!feof($datei)) { $line = str_replace("\n","",fgets($datei, 128)); if ($line != "") { $cnt++; $counts[$cnt] = explode("|",$line); if (($counts[$cnt][0] == $daddum_jahr) && ($counts[$cnt][1] == $daddum_week)) { $counts[$cnt][2] += 1; $pruef = TRUE; } } } fclose ($datei); } $datei = fopen ("counter/$user.$counter.log","w"); if ($cnt == -1) { $line = "$daddum_jahr|$daddum_week|1\n"; fputs($datei, $line); } else { for ($x=0;$x<=$cnt;$x++) { $line = implode("|",$counts[$x])."\n"; fputs($datei, $line); } if (!$pruef) { $line = "$daddum_jahr|$daddum_week|1\n"; fputs($datei, $line); } } fclose ($datei); }} if($layout[$counternr] == "1") { echo "document.write(\"$countanz\");"; } else { $longstr = strlen($countanz); for ($x=0; $x < $longstr; $x++) { $image = substr($countanz,$x,1); echo "document.write(\"\");"; } } ?>