Hjælp! Blood
*s* jeg skal have lavet en til counter! altså denne gang for du koden der hvor der skal læggges Dokument.Whrite men jeg kan ikke se hvor det skal stå her er koden<?
///////////////////////////////////
// Counter Script by Cralex NS
//
// All Rights Reserved - GIFed.net
// Copyright © GIFed.net
///////////////////////////////////
header (\"Content-type: image/png\");
///////////////////////////////////
// Options/Login Part
////////////////////////////////////
$showimg = \"on\";
if ($action == \"login\") {
if ($action2 == \"add\") {
$writeo = fopen (\"counterdata.php\", \"w\");
fputs ($writeo, \"$iplog|$pass|$getdata|$color|$font|$size|$adminv\") or die(\"Error\");
fclose ($writeo);
print \"Done\";
exit;
}
///////////////////////////////////
// Get Data from counterdata.php and log
///////////////////////////////////
$data = \"counterdata.php\";
$getoptions = file($data);
$line = explode(\"|\", $getoptions[0]);
$iplog = $line[0];
$pass = $line[1];
$getdata = $line[2];
$color = $line[3];
$font = $line[4];
$size = $line[5];
$adminv = $line[6];
if ($password == $pass) {
?>
<html>
<head>
<meta http-equiv=\"Content-Language\" content=\"da\">
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\">
<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 4.0\">
<meta name=\"ProgId\" content=\"FrontPage.Editor.Document\">
<title>Ny side 1</title>
</head>
<body>
<center><a href=\"http://www.gifed.net\"><img src=\"http://www.frag-energy.net/~gifed/banners/banner2.gif\"></a></center>
<p><font face=\"Verdana\" size=\"2\">Welcome to the Admin Center</font></p>
<form method=\"POST\" action=\"counter.php?action=login\">
<p> </p>
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"14%\"><font face=\"Verdana\" size=\"1\">IP:</font></td>
<td width=\"15%\"><font face=\"Verdana\" size=\"1\">On<input type=\"radio\" value=\"on\"<? if ($iplog == \"on\") { ?>checked name=\"iplog\"><? } else { ?> name=\"iplog\"> <? } ?>/Off<input type=\"radio\" value=\"off\"<? if ($iplog == \"off\") { ?> checked name=\"iplog\"><? } else { ?> name=\"iplog\"> <? } ?></font></td>
<td width=\"71%\"><font face=\"Verdana\" size=\"1\">("on" will mean that a ip only
counts on hit pr. day)</font></td>
</tr>
<tr>
<td width=\"14%\"><font face=\"Verdana\" size=\"1\">Password:</font></td>
<td width=\"15%\"><input type=\"text\" name=\"pass\" size=\"20\" value=\"<? print $pass; ?>\"></td>
<td width=\"71%\"><font face=\"Verdana\" size=\"1\">(Your password to this Admin
Center)</font></td>
</tr>
<tr>
<td width=\"14%\"><font face=\"Verdana\" size=\"1\">CountFile:</font></td>
<td width=\"15%\"><input type=\"text\" name=\"getdata\" size=\"20\" value=\"<? print $getdata; ?>\"></td>
<td width=\"71%\"><font face=\"Verdana\" size=\"1\">(The path or name of the countlog file.)</font></td>
</tr>
<tr>
<td width=\"14%\"><font face=\"Verdana\" size=\"1\">FontColor:</font></td>
<td width=\"15%\"><input type=\"text\" name=\"color\" size=\"20\" value=\"<? print $color; ?>\"></td>
<td width=\"71%\"><font face=\"Verdana\" size=\"1\">(Ex: #FFFFFF)</font></td>
</tr>
<tr>
<td width=\"14%\"><font face=\"Verdana\" size=\"1\">FontFace:</font></td>
<td width=\"15%\"><input type=\"text\" name=\"font\" size=\"20\" value=\"<? print $font; ?>\"></td>
<td width=\"71%\"><font face=\"Verdana\" size=\"1\">(Ex: Verdana)</font></td>
</tr>
<tr>
<td width=\"14%\"><font face=\"Verdana\" size=\"1\">AC Visibel:</font></td>
<td width=\"15%\"><font face=\"Verdana\" size=\"1\">Yes<input type=\"radio\" value=\"yes\"<? if ($adminv == \"yes\") { ?> checked name=\"adminv\"> <? } else { ?> name=\"adminv\"> <? } ?>/No<input type=\"radio\" value=\"no\"<? if ($adminv == \"no\") { ?> checked name=\"adminv\"> <? } else { ?> name=\"adminv\"> <? } ?></font></td>
<td width=\"71%\"><font face=\"Verdana\" size=\"1\">(Show link to Admin Center?)</font></td>
</tr>
<tr>
<td width=\"14%\"><font face=\"Verdana\" size=\"1\">FontSize:</font></td>
<td width=\"15%\"><input type=\"text\" name=\"size\" size=\"20\" value=\"<? print $size; ?>\"></td>
<td width=\"71%\"><font face=\"Verdana\" size=\"1\">(Ex: 1)</font></td>
</tr>
</table>
<p><font face=\"Verdana\" size=\"1\">Log:</font><br>
<textarea rows=\"4\" name=\"none\" cols=\"57\"><? include($getdata); ?></textarea></p>
<p><input type=\"submit\" value=\"Send\" name=\"B1\"><input type=\"reset\" value=\"Nulstil\" name=\"B2\"></p>
<input type=\"hidden\" name=\"action2\" value=\"add\">
</form>
<p> </p>
</body>
</html>
<?
exit;
}
?>
<html>
<head>
<meta http-equiv=\"Content-Language\" content=\"da\">
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\">
<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 4.0\">
<meta name=\"ProgId\" content=\"FrontPage.Editor.Document\">
<title>Ny side 1</title>
</head>
<body>
<form method=\"POST\" action=\"counter.php?action=login\">
<p><font face=\"Verdana\">Enter Password</font> <input type=\"password\" name=\"password\" size=\"20\"><input type=\"submit\" value=\"Send\" name=\"B1\"></p>
</form>
</body>
</html>
<?
exit;
}
///////////////////////////////////
// End of \"Options/Login Part\"
// Start of Counterpart - script
///////////////////////////////////
$thisprog = \"counter.php\";
///////////////////////////////////
// Get Data from counterdata.php
///////////////////////////////////
$data = \"counterdata.php\";
$getoptions = file($data);
$line = explode(\"|\", $getoptions[0]);
$iplog = $line[0];
$pass = $line[1];
$getdata = $line[2];
$color = $line[3];
$font = $line[4];
$size = $line[5];
$adminv = $line[6];
///////////////////////////////////
// Get Visits / Data
///////////////////////////////////
$ip = getenv(\"REMOTE_ADDR\");
$time = time();
$date = date(\"Y|m|d H:i\");
///////////////////////////////////
$today = date(\"Y|m|d\");
$found = \"true\";
$found2 = \"true\";
$v = \"0\";
$f = file($getdata);
$counted = count($f);
// Se if ip is there already
while ($counted > $v) {
$streg = explode(\" \", $f[$v]);
if ($ip == $streg[0]) {
$found = \"false\";
if ( $streg[1] == $today ) {
$found2 = \"false\";
}
}
$v++;
}
///////////////////////////////////
// End Of \"Get Visits\"
// Write Data
///////////////////////////////////
if ($iplog == \"on\") {
if ($found2 != \"false\") {
$writedata = fopen (\"$getdata\", \"a\");
fputs ($writedata, \"$ip $date: $time\\n\");
fclose ($writedata);
}
}
elseif ($iplog != \"on\") {
$writedata = fopen (\"$getdata\", \"a\");
fputs ($writedata, \"$ip $date: $time\\n\");
fclose ($writedata);
}
if ($counted == \"0\") {
$writedata = fopen (\"$txt\", \"a\");
fputs ($writedata, \"$ip $date: $time\\n\");
fclose ($writedata);
}
////////////////////////////////////
// End of \"Write Data\"
// Print Results
////////////////////////////////////
?><html><font face=\"<? print $font; ?>\" Size=\"<? print $size; ?>\" color=\"<? print $color; ?>\">[<? print $counted; ?>] besøgene :)
<? if ($adminv == \"yes\") { ?> <a href style=\"color: <? print $color; ?>; cursor: hand; text-decoration: underline;\" onclick=\"java script:window.open(\'counter.php?action=login\',\'name\',\'toolbar=no,menubar=no,resizable=no,scrollbars=yes,status=no,location=no,width=600,height=300,\');\"><? } ?></font></html><?
////////////////////////////////////
// End Of \"Counterpart - script\"
///////////////////////////////////
// End of Script
//
// Script by Cralex NS
// http://www.gifed.net
///////////////////////////////////
?>
