hi,
erstmal freue ich mich, dass ihr wieder da seid, und ach die armen ausgebeuteten Profis wieder ausgeruht zurück sind ;)
Also zu meinem Problem:
Ich habe eine Right.php die per Inlude in eine Index.php eingebunden wird:
index.php:
---------------------------------------------------------------------
<?php
$showid = $_GET["showid"];
if(!isset($showid)) {
$file="news.php";
}
else {
include('includes/connect.inc.php');
$get = mysql_query("select * from showid where id='".$showid."'");
$result = mysql_fetch_array($get);
$file = $result["file"];
}
session_start();
if(!session_is_registered('user')) {
if($result["auto_login"]="1") {
if(isset($auto_login)) {
$user = $auto_login;
include('connect.inc.php');
$get = mysql_query("select * from user_table where username='".$user."'");
$result = mysql_fetch_array($get);
$groupid = $result["groupid"];
session_register('groupid');
session_register('user');
setcookie("auto_login","$user");
}
}
}
$today = date("d.m.Y H:i:s");
?>
<html>
<head>
<title>Ich-lerne-noch.de - Das Webmasterportal</title>
<style>
<--
font {
font-family:verdana;
font-size:10px;
}
.menusub {font-size: 13px;}
.log {font-size: 13px;
text-color:#FFFFFF;
}
.log a {
text-color:#FFFFFF
text-decoration: none;
padding: 2px;
padding-left: 12px;
}
.log a:hover {
text-decoration: underline;
}
.menusub a {
text-color:#000000
text-decoration: none;
white-space: nowrap;
display: block;
padding: 2px;
padding-left: 12px;
}
.menusub a:hover {
text-decoration: underline;
background-color: #FFFFFF;
}
a {
color: #000000;
text-decoration:none;
}
a:hover {
text-decoration:underline;
}
.news {
text-color:#000000
text-decoration: none;
display: block;
padding: 2px;
padding-left: 12px;
}
-->
</style>
</head>
<body>
<center>
<table width="100%" height="100%">
<tr height="100">
<td colspan="3" align="center"><?php include('includes/head.php'); ?></td>
</tr>
<tr height="21">
<td align="center" colspan="3" valign="center" background="images/background-line.jpg">
<table width="96%">
<tr><td align="left"><font color="white" style="font-size:8pt;"><a href="index.php" class="balken"><font color="white">Start</font></a></font></td><td align="right"><font color="white" style="font-size:8pt;">
<?php
if(session_is_registered('user')) {
echo "<p class='log'>Eingeloggt als ".$user." [<a href='logout.php' class='log'>logout</a>]</p>";
}
else {
echo $today;
}
?></font></td></tr>
</table>
</td>
</tr>
<tr>
<td align="left" valign="top" width="15%"><?php include('includes/left.php'); ?></td>
<td align="center" valign="top" width="70%">
<?php include("includes/".$file); ?></td>
<td align="right" valign="top" width="15%"><?php include('includes/right.php'); ?></td>
</tr>
</center>
</body>
</html>
---------------------------------------------------------------------
und right.php
---------------------------------------------------------------------
<?php
$ip = getenv("REMOTE_ADDR");
setcookie("ipsperre",$ip,time() +86400);
if(isset($ipsperre)) {
$result = file("counter.dat");
$number = $result[0];
}
else {
$result = file("counter.dat");
$result[0]++;
$datei = fopen("counter.dat","r+");
rewind($datei);
fwrite($datei,$result[0]);
fclose($datei);
}
?>
<table border="1" style="border-collapse:collapse" bordercolor="#AAAAAA" width="98%" height="700">
<tr bgcolor="#EBEBEB">
<th align="center" height="20">Statistik</th>
</tr>
<tr>
<td align="left" bgcolor="#F5F5F5" class="menusub" valign="top">
Besucher: <?php echo $result[0]; ?>
</td>
</tr>
<tr bgcolor="#EBEBEB" height="20">
<th align="center">Vote 4Us</th>
</tr>
<tr height="88">
<td align="center" bgcolor="#F5F5F5" class="menusub" valign="middle">
<a href="http://www.gfx-syndicate.de/toplist.php?mode=vote&page=96" target="_blank" border="0"><img src="http://www.gfx-syndicate.de/images/top_toplist.gif" alt="Kommen Sie in die GFX-[S]yndicate-Toplist und bewerten Sie diese Seite" border="0"></a>
</td>
</tr>
</table>
---------------------------------------------------------------------
Ich erhalte immer folgenden fehler:
---------------------------------------------------------------------
Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/ich-lerne-noch.de/index.php:32) in /home/www/htdocs/ich-lerne-noch.de/includes/right.php on line 3
---------------------------------------------------------------------
Irgendwas stimmt nicht, aber ich finde den fehler einfach nicht, einzeln funktionieren die Files, nur nicht zusammen... :(
Ach ja, die counter.dat ist an der richitgen Stelle.
danke euch vielmals,
Tron