Моля помощ ! ;)

index.php
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1251' />
<title>Ne7WoRK Website</title>
<link href='style.css' rel='stylesheet' type='text/css' />
<script type='text/javascript'>

</script>
</head>

<body>


<img src='Blank Image Files/header.jpg' alt='header' width='703' height='121' />



<ul id='topnav'>
<li class='bigtab'>Начало</li>
<li><a href='#' class='smalltab'>За мен</a></li>
<li><a href='#' class='smalltab'>Книга за гости</a></li>
<li><a href='#' class='smalltab'>За контакти</a></li>
</ul>



<img src='Blank Image Files/slogan_box.gif' alt='slogan box' width='703' height='110' />



<ul id='statsbar'>
<li id='comments'>10,232 Comments</li>
<li id='hits'>298 Unique Hits Today</li>
<li id='online'><? require_once('count.dat'); ?></li>
</ul>


<div id='container'>


<div id='left'>

<h2>Управление</h2>


<ul id='leftnav'>
<li><a href='#'>Начало</a></li>
<li><a href='#'>Форум</a></li>
<li><a href='#'>Фаилове</a></li>
<li><a href='#'>Галерия</a></li>
<li><a href='#'>Статии</a></li>
<li><a href='#'>Информация</a></li>
</ul>


<h2>Последни статии</h2>

<div id='news'>

<img src='images/news_icon.gif' alt='news' /><strong>06/06/06</strong> - Site Updates<br />
We have added more downloads to the ... <a href='#'>Read More</a>
<img src='images/news_seperator.gif' alt='sep' />

<img src='images/news_icon.gif' alt='news' /><strong>06/06/06</strong> - Site Updates<br />
We have added more downloads to the ... <a href='#'>Read More</a>
<img src='images/news_seperator.gif' alt='sep' />

<img src='images/news_icon.gif' alt='news' /><strong>06/06/06</strong> - Site Updates<br />
We have added more downloads to the ... <a href='#'>Read More</a></div>

</div>





<div id='right'>


<img src='Blank Image Files/slogan_box_2.jpg' alt='slogan' width='485' height='205' />

<h2><? require_once('counter.php'); ?> </h2>

<div id='maincontent'>



<h3>Новини</h3>
<p>Здравейте това е първият ми личен уеб сайт и се надявам да ви хареса ;)</p>




</div>

</div>



</div>



<p id='footer'>© Copyright 2007 - <a href='#'>Website</a> By <a href='#'>Ne7WoRK</a> - All Rights Reserved </p>
<p id='footer'>© include("counter.php");</p>
<p id='footer'>© <? require_once('count.dat'); ?></p>
</body>
</html>
counter.php
<?php
$countfile = "count.dat";
$ipcounter = "today.dat";
$countdate = date("j-n-Y");
$visitorip = $_SERVER[REMOTE_ADDR];
$maxrecord = date("d.m.Y (H:i)");

if (!file_exists($ipcounter)) { $fp = fopen($ipcounter, 'w+'); }
if (!file_exists($countfile)) { $fp = fopen($countfile, 'w+'); fwrite($fp, "0|0|0|1|$countdate|0|$maxrecord"); }

$fcontents = file_get_contents($countfile);
list($today, $yesterday, $total, $days, $nowdate, $max, $nowrecord) = explode("|", $fcontents);

if($countdate != $nowdate) {
$ipfile2 = fopen($ipcounter, 'w');
$line = "$visitorip\n";
fwrite($ipfile2, $line, strlen($line));
fclose($ipfile2);

if($today > $max) { $max = $today; $nowrecord = $maxrecord; }
$yesterday = $today;
$today = 1;
$total++;
$days++;

$fp = fopen($countfile, 'w');
fwrite($fp, "1|$yesterday|$total|$days|$countdate|$max|$nowrecord");
fclose($fp);
}

else {
$ipfile = fopen($ipcounter, 'rb');
$line = array();
while (!feof($ipfile)) $line[]=fgets($ipfile,1024);
for ($i=0; $i<(count($line)); $i++) {
list($visitorip_x) = split("\n",$line[$i]);
if ($visitorip == $visitorip_x) {$found = 1;}
}
fclose($ipfile);

if (!$found) {
$ipfile2 = fopen($ipcounter, 'ab');
$line = "$visitorip\n";
fwrite($ipfile2, $line, strlen($line));
fclose($ipfile2);

$today++;
$total++;

if($today > $max) { $max = $today; $nowrecord = $maxrecord; }
$fp = fopen($countfile, 'r+');
fwrite($fp, "$today|$yesterday|$total|$days|$countdate|$max|$nowrecord");
fclose($fp);
}
}
if($days == 1) { $dendni = "ден"; }
else { $dendni = "дни"; }
?>

<div style="font-family:verdana;font-size:11px;color:#A80000;">
<b>Уникални посещения:</b>
Днес <b><?php echo $today; ?></b> /
Вчера <b><?php echo $yesterday; ?></b> /
Общо <b><?php echo $total."</b> за <b>$days</b> ".$dendni; ?> /
Средно дневно <b><?php echo ceil($total/$days); ?></b> /
Рекорд <b><?php echo $max."</b> на <b>$nowrecord"; ?></b>
</div>
 
Код:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1251' />
<title>Ne7WoRK Website</title>
<link href='http://ne7work.freehostia.com/style.css' rel='stylesheet' type='text/css' />
<script type='text/javascript'>

</script>
</head>

<body>


<img src='http://ne7work.freehostia.com/Blank Image Files/header.jpg' alt='header' width='703' height='121' />



<ul id='topnav'>
<li class='bigtab'>Начало</li>
<li><a href='#' class='smalltab'>За мен</a></li>
<li><a href='#' class='smalltab'>Книга за гости</a></li>
<li><a href='#' class='smalltab'>За контакти</a></li>
</ul>



<img src='http://ne7work.freehostia.com/Blank Image Files/slogan_box.gif' alt='slogan box' width='703' height='110' />



<ul id='statsbar'>
<li id='comments'>10,232 Comments</li>
<li id='hits'>298 Unique Hits Today</li>
<li id='online'><?php
$countfile = "count.dat";
$ipcounter = "today.dat";
$countdate = date("j-n-Y");
$visitorip = $_SERVER[REMOTE_ADDR];
$maxrecord = date("d.m.Y (H:i)");

if (!file_exists($ipcounter)) { $fp = fopen($ipcounter, 'w+'); }
if (!file_exists($countfile)) { $fp = fopen($countfile, 'w+'); fwrite($fp, "0|0|0|1|$countdate|0|$maxrecord"); }

$fcontents = file_get_contents($countfile);
list($today, $yesterday, $total, $days, $nowdate, $max, $nowrecord) = explode("|", $fcontents);

if($countdate != $nowdate) {
$ipfile2 = fopen($ipcounter, 'w');
$line = "$visitorip\n";
fwrite($ipfile2, $line, strlen($line));
fclose($ipfile2);

if($today > $max) { $max = $today; $nowrecord = $maxrecord; }
$yesterday = $today;
$today = 1;
$total++;
$days++;

$fp = fopen($countfile, 'w');
fwrite($fp, "1|$yesterday|$total|$days|$countdate|$max|$nowrecord");
fclose($fp);
}

else {
$ipfile = fopen($ipcounter, 'rb');
$line = array();
while (!feof($ipfile)) $line[]=fgets($ipfile,1024);
for ($i=0; $i<(count($line)); $i++) {
list($visitorip_x) = split("\n",$line[$i]);
if ($visitorip == $visitorip_x) {$found = 1;}
}
fclose($ipfile);

if (!$found) {
$ipfile2 = fopen($ipcounter, 'ab');
$line = "$visitorip\n";
fwrite($ipfile2, $line, strlen($line));
fclose($ipfile2);

$today++;
$total++;

if($today > $max) { $max = $today; $nowrecord = $maxrecord; }
$fp = fopen($countfile, 'r+');
fwrite($fp, "$today|$yesterday|$total|$days|$countdate|$max|$nowrecord");
fclose($fp);
}
}
if($days == 1) { $dendni = "ден"; }
else { $dendni = "дни"; }
?>

<div style="font-family:verdana;font-size:11px;color:#A80000;">
<b>Уникални посещения:</b>
Днес <b><?php echo $today; ?></b> /
Вчера <b><?php echo $yesterday; ?></b> /
Общо <b><?php echo $total."</b> за <b>$days</b> ".$dendni; ?> /
Средно дневно <b><?php echo ceil($total/$days); ?></b> /
Рекорд <b><?php echo $max."</b> на <b>$nowrecord"; ?></b>
</div></li>
</ul>


<div id='container'>


<div id='left'>

<h2>Управление</h2>


<ul id='leftnav'>
<li><a href='#'>Начало</a></li>
<li><a href='#'>Форум</a></li>
<li><a href='#'>Фаилове</a></li>
<li><a href='#'>Галерия</a></li>
<li><a href='#'>Статии</a></li>
<li><a href='#'>Информация</a></li>
</ul>


<h2>Последни статии</h2>

<div id='news'>

<img src='images/news_icon.gif' alt='news' /><strong>06/06/06</strong> - Site Updates<br />
We have added more downloads to the ... <a href='#'>Read More</a>
<img src='images/news_seperator.gif' alt='sep' />

<img src='images/news_icon.gif' alt='news' /><strong>06/06/06</strong> - Site Updates<br />
We have added more downloads to the ... <a href='#'>Read More</a>
<img src='images/news_seperator.gif' alt='sep' />

<img src='images/news_icon.gif' alt='news' /><strong>06/06/06</strong> - Site Updates<br />
We have added more downloads to the ... <a href='#'>Read More</a></div>

</div>





<div id='right'>


<img src='http://ne7work.freehostia.com/Blank Image Files/slogan_box_2.jpg' alt='slogan' width='485' height='205' />

<h2><?php require_once('counter.php'); ?> </h2>

<div id='maincontent'>



<h3>Новини</h3>
<p>Здравейте това е първият ми личен уеб сайт и се надявам да ви хареса Wink</p>




</div>

</div>



</div>



<p id='footer'>© Copyright 2007 - <a href='#'>Website</a> By <a href='#'>Ne7WoRK</a> - All Rights Reserved </p>
<p id='footer'>© <?php include("counter.php"); ?></p>
<p id='footer'>© <?php require_once('count.dat'); ?></p>
</body>
</html>
Така става ли?
 
index.php
Код:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> 
<html xmlns='http://www.w3.org/1999/xhtml'> 
<head> 
<meta http-equiv='Content-Type' content='text/html; charset=windows-1251' /> 
<title>Ne7WoRK Website</title> 
<link href='style.css' rel='stylesheet' type='text/css' /> 
<script type='text/javascript'> 
 
</script> 
</head> 

<body> 

 
<img src='Blank Image Files/header.jpg' alt='header' width='703' height='121' /> 
 

 
<ul id='topnav'> 
<li class='bigtab'>Начало</li> 
<li><a href='#' class='smalltab'>За мен</a></li> 
<li><a href='#' class='smalltab'>Книга за гости</a></li> 
<li><a href='#' class='smalltab'>За контакти</a></li> 
</ul> 
 

 
<img src='Blank Image Files/slogan_box.gif' alt='slogan box' width='703' height='110' /> 
 

 
<ul id='statsbar'> 
<li id='comments'>10,232 Comments</li> 
<li id='hits'>298 Unique Hits Today</li> 
<li id='online'><?PHP include("counter.php"); ?></li> 
</ul> 
 

<div id='container'> 

 
<div id='left'> 

<h2>Управление</h2> 

 
<ul id='leftnav'> 
<li><a href='#'>Начало</a></li> 
<li><a href='#'>Форум</a></li> 
<li><a href='#'>Фаилове</a></li> 
<li><a href='#'>Галерия</a></li> 
<li><a href='#'>Статии</a></li> 
<li><a href='#'>Информация</a></li> 
</ul> 
 

<h2>Последни статии</h2> 

<div id='news'> 

<img src='images/news_icon.gif' alt='news' /><strong>06/06/06</strong> - Site Updates<br /> 
We have added more downloads to the ... <a href='#'>Read More</a> 
<img src='images/news_seperator.gif' alt='sep' /> 

<img src='images/news_icon.gif' alt='news' /><strong>06/06/06</strong> - Site Updates<br /> 
We have added more downloads to the ... <a href='#'>Read More</a> 
<img src='images/news_seperator.gif' alt='sep' /> 

<img src='images/news_icon.gif' alt='news' /><strong>06/06/06</strong> - Site Updates<br /> 
We have added more downloads to the ... <a href='#'>Read More</a></div> 

</div> 

 

 

<div id='right'> 

 
<img src='Blank Image Files/slogan_box_2.jpg' alt='slogan' width='485' height='205' /> 

<h2><? require_once('counter.php'); ?> </h2> 

<div id='maincontent'> 

 

<h3>Новини</h3> 
<p>Здравейте това е първият ми личен уеб сайт и се надявам да ви хареса </p> 


 

</div> 

</div> 

 

</div> 

 

<p id='footer'>© Copyright 2007 - <a href='#'>Website</a> By <a href='#'>Ne7WoRK</a> - All Rights Reserved </p> 
<p id='footer'>© include("counter.php");</p> 
<p id='footer'>© <? require_once('count.dat'); ?></p> 
</body> 
</html>
 
NewGuy каза:
index.php
Код:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> 
<html xmlns='http://www.w3.org/1999/xhtml'> 
<head> 
<meta http-equiv='Content-Type' content='text/html; charset=windows-1251' /> 
<title>Ne7WoRK Website</title> 
<link href='style.css' rel='stylesheet' type='text/css' /> 
<script type='text/javascript'> 
 
</script> 
</head> 

<body> 

 
<img src='Blank Image Files/header.jpg' alt='header' width='703' height='121' /> 
 

 
<ul id='topnav'> 
<li class='bigtab'>Начало</li> 
<li><a href='#' class='smalltab'>За мен</a></li> 
<li><a href='#' class='smalltab'>Книга за гости</a></li> 
<li><a href='#' class='smalltab'>За контакти</a></li> 
</ul> 
 

 
<img src='Blank Image Files/slogan_box.gif' alt='slogan box' width='703' height='110' /> 
 

 
<ul id='statsbar'> 
<li id='comments'>10,232 Comments</li> 
<li id='hits'>298 Unique Hits Today</li> 
<li id='online'><?PHP include("counter.php"); ?></li> 
</ul> 
 

<div id='container'> 

 
<div id='left'> 

<h2>Управление</h2> 

 
<ul id='leftnav'> 
<li><a href='#'>Начало</a></li> 
<li><a href='#'>Форум</a></li> 
<li><a href='#'>Фаилове</a></li> 
<li><a href='#'>Галерия</a></li> 
<li><a href='#'>Статии</a></li> 
<li><a href='#'>Информация</a></li> 
</ul> 
 

<h2>Последни статии</h2> 

<div id='news'> 

<img src='images/news_icon.gif' alt='news' /><strong>06/06/06</strong> - Site Updates<br /> 
We have added more downloads to the ... <a href='#'>Read More</a> 
<img src='images/news_seperator.gif' alt='sep' /> 

<img src='images/news_icon.gif' alt='news' /><strong>06/06/06</strong> - Site Updates<br /> 
We have added more downloads to the ... <a href='#'>Read More</a> 
<img src='images/news_seperator.gif' alt='sep' /> 

<img src='images/news_icon.gif' alt='news' /><strong>06/06/06</strong> - Site Updates<br /> 
We have added more downloads to the ... <a href='#'>Read More</a></div> 

</div> 

 

 

<div id='right'> 

 
<img src='Blank Image Files/slogan_box_2.jpg' alt='slogan' width='485' height='205' /> 

<h2><? require_once('counter.php'); ?> </h2> 

<div id='maincontent'> 

 

<h3>Новини</h3> 
<p>Здравейте това е първият ми личен уеб сайт и се надявам да ви хареса </p> 


 

</div> 

</div> 

 

</div> 

 

<p id='footer'>© Copyright 2007 - <a href='#'>Website</a> By <a href='#'>Ne7WoRK</a> - All Rights Reserved </p> 
<p id='footer'>© include("counter.php");</p> 
<p id='footer'>© <? require_once('count.dat'); ?></p> 
</body> 
</html>
Ето това е ти си сложил файла в който се записва , а е трябвало да сложиш <?PHP include("counter.php"); ?> иначе моето е същото самоче с повече код :?:
 

Back
Горе