<?
//////////////////////////////////////////////////////////////////////
//
// PHPcounter - a web counter tracking system in PHP
//
// Copyright (C) 2004-2007 - Tsvetozar Drambozov <hide@address.com>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// 10 Dec 2004 - Initial version.
//
//////////////////////////////////////////////////////////////////////
//
// Rumen Avramov <hide@address.com>
// HTML Validator compatibility added.
// Counter Code/JavaScript rewritten.
//
//////////////////////////////////////////////////////////////////////
include("inc.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>">
<title></title>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#0000FF" alink="#FF0000">
<div align="center">
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="right"><?=$font?><a href="index.php?l=<?=$_GET["l"]?>&name=<?=$_GET["name"]?>"><img border="0" src="phpcounterlogo.gif" width="379" height="79" alt="PHPcounter <?=$version?>"></a><br><?=$strings["version"]?>: <?=$version?></font></td>
</tr>
<tr>
<td width="100%" align="right"><?=$font?>
<a href="index.php?l=en&name=<?=$_GET["name"]?>&action=<?=$_GET["action"]?>&page=<?=$_GET["page"]?>"><img border="0" src="flags/_english.gif" alt="English" width="32" height="20"></a>
<a href="index.php?l=bg&name=<?=$_GET["name"]?>&action=<?=$_GET["action"]?>&page=<?=$_GET["page"]?>"><img border="0" src="flags/bulgaria.gif" alt="Bulgarian" width="32" height="20"></a>
<a href="index.php?l=de&name=<?=$_GET["name"]?>&action=<?=$_GET["action"]?>&page=<?=$_GET["page"]?>"><img border="0" src="flags/germany.gif" alt="German" width="32" height="20"></a>
<a href="index.php?l=nl&name=<?=$_GET["name"]?>&action=<?=$_GET["action"]?>&page=<?=$_GET["page"]?>"><img border="0" src="flags/netherlands.gif" alt="Dutch" width="32" height="20"></a>
<a href="index.php?l=fr&name=<?=$_GET["name"]?>&action=<?=$_GET["action"]?>&page=<?=$_GET["page"]?>"><img border="0" src="flags/france.gif" alt="French" width="32" height="20"></a>
<a href="index.php?l=it&name=<?=$_GET["name"]?>&action=<?=$_GET["action"]?>&page=<?=$_GET["page"]?>"><img border="0" src="flags/italy.gif" alt="Italian" width="32" height="20"></a>
<a href="index.php?l=ru&name=<?=$_GET["name"]?>&action=<?=$_GET["action"]?>&page=<?=$_GET["page"]?>"><img border="0" src="flags/russia.gif" alt="Russian" width="32" height="20"></a>
</font></td>
</tr>
</table>
</center>
</div>
<br>
<?
$rs = mysql_query("select * from phpcounters where name='$_GET[name]'");
$row = mysql_fetch_array($rs);
if(!$row)
{
$font = "<font face=\"$font_name\" size=\"$font_size\">";
$font_header = "<font face=\"$font_name\" size=\"$font_size\" color=\"$font_color_header\">";
phpcounter_box_begin();
?>
<tr>
<td width="100%" bgcolor="<?=$color_table_header?>" nowrap><?=$font_header?><b><?=$strings["name"]?></b></font></td>
<td bgcolor="<?=$color_table_header?>" nowrap><?=$font_header?><b><?=$strings["title"]?></b></font></td>
<td bgcolor="<?=$color_table_header?>" nowrap><?=$font_header?><b><?=$strings["url_address"]?></b></font></td>
<td bgcolor="<?=$color_table_header?>" nowrap><?=$font_header?><b></b></font></td>
</tr>
<?
$rs = mysql_query("select * from phpcounters order by name asc");
while($row = mysql_fetch_array($rs))
{
?>
<tr>
<td bgcolor="<?=$bgcolor?>" nowrap width="100%"><?=$font?><a href="index.php?l=<?=$l?>&name=<?=$row["name"]?>"><?=$row["name"]?></a></font></td>
<td bgcolor="<?=$bgcolor?>" nowrap><?=$font?><?=$row["title"]?></font></td>
<td bgcolor="<?=$bgcolor?>"><?=$font?><a href="<?=$row["url"]?>" target="_blank"><?=$row["url"]?></a></font></td>
<td bgcolor="<?=$bgcolor?>" nowrap><?=$font?><a href="index.php?name=<?=$row["name"]?>&action=html" target="_blank">HTML Code</a></font></td>
</tr>
<?
}
phpcounter_box_end();
}
else
{
switch($_GET["action"])
{
case "html":
?>
<div align="center">
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<form action="">
<?=$font?>Copy and paste the following HTML code into your web-pages:</font><br>
<textarea rows="20" name="HTMLCode" cols="70"><?=html_code($_GET["name"])?></textarea>
</form>
</td>
</tr>
</table>
</center>
</div>
<?
break;
default:
phpcounter_box_begin("PHPcounter");
?>
<tr>
<td bgcolor="<?=$color_table_header?>" nowrap><?=$font_header?><b><?=$strings["report_date"]?>:</b></font></td>
<td width="100%" bgcolor="<?=$bgcolor2?>" nowrap><?=$font_header?><?=date("Y-m-d H:i:s")?></font></td>
</tr>
<tr>
<td bgcolor="<?=$color_table_header?>" nowrap><?=$font_header?><b><?=$strings["name"]?>:</b></font></td>
<td width="100%" bgcolor="<?=$bgcolor2?>" nowrap><?=$font_header?><b><?=$_GET["name"]?></b></font></td>
</tr>
<tr>
<td bgcolor="<?=$color_table_header?>" nowrap><?=$font_header?><b><?=$strings["title"]?>:</b></font></td>
<td width="100%" bgcolor="<?=$bgcolor2?>" nowrap><?=$font_header?><?=$row["title"]?></font></td>
</tr>
<tr>
<td bgcolor="<?=$color_table_header?>" nowrap><?=$font_header?><b><?=$strings["url_address"]?>:</b></font></td>
<td width="100%" bgcolor="<?=$bgcolor2?>" nowrap><?=$font_header?><?=$row["url"]?></font></td>
</tr>
<?
phpcounter_box_end();
if($_GET["action"]=="")
{
phpcounter_stats($_GET["name"], "years");
phpcounter_stats($_GET["name"], "months");
phpcounter_stats($_GET["name"], "days");
phpcounter_stats($_GET["name"], "weekdays");
phpcounter_stats($_GET["name"], "hours");
phpcounter_stats($_GET["name"], "langs");
phpcounter_stats($_GET["name"], "countries");
phpcounter_stats($_GET["name"], "hits");
phpcounter_stats($_GET["name"], "refererdomains");
phpcounter_stats($_GET["name"], "referers");
phpcounter_stats($_GET["name"], "localdomains");
phpcounter_stats($_GET["name"], "localpages");
phpcounter_stats($_GET["name"], "proxies");
}
else phpcounter_stats($_GET["name"], $_GET["action"], true);
break;
}
}
?>
</body>
</html>