language file

Everything related to CCount PHP click counter
Post Reply
oiro
Posts: 3
Joined: Tue Nov 29, 2005 11:10 am

language file

Post by oiro »

Script URL:
Version of script: 0
Version of PHP: all
Hosting company: servizi LAN
Have you searched THIS FORUM for your problem:
(if not please do before posting)
If so, what terms did you try:

Write your message below:


for traslate the CCount in any language

3 files , settings.php, index.php, language/it.php || language/en.php || language/yourTraslation.php

replace your settings.php, index.php with the code below, make a folder language and put in en.php or your language file
set up the define('LANGUAGE_FILE','language/it.php'); in the settings.php

----------------------------------------------------------------
setting.php

Code: Select all

<?php
// SETUP YOUR CLICK COUNTER
// Detailed information found in the readme file


// on some server (like FirstClass server) use this. Leave empty if you d'not use
//define('X_FC_PATH', '/supporto/clickCounter/');
define('X_FC_PATH', '');

// set your language file
define('LANGUAGE_FILE','language/it.php');

// What type of server is your website on?
// 1 = UNIX (Linux), 2 = Windows, 3 = Machintos
$settings['system']=2;

// Password for admin area
$settings['apass']="admin";

// URL of the click.php file
$settings['click_url']="http://www.mydom.it/cgi-bin/mydir/clickCounter/click.php";

// OPTIONAL SETTINGS BELOW //

// Name of the log file
$settings['logfile']="clicks.txt";

// Name of the file where last ID number is stored
$settings['idfile']="ids.txt";

// DO NOT EDIT BELOW
$settings['verzija']="1.1";
?>
----------------------------------------------------------------
index.php

Code: Select all

<?php
# PHP click counter (CCount) - admin panel
# Version: 1.1
# File name: index.php
# Written 22nd January 2005 by Klemen Stirn (info@phpjunkyard.com)
# http://www.PHPJunkYard.com

##############################################################################
# COPYRIGHT NOTICE                                                           #
# Copyright 2004-2005 PHPJunkYard All Rights Reserved.                       #
#                                                                            #
# The CCount may be used and modified free of charge by anyone so long as    #
# this copyright notice and the comments above remain intact. By using this  #
# code you agree to indemnify Klemen Stirn from any liability that might     #
# arise from it's use.                                                       #
#                                                                            #
# Selling the code for this program without prior written consent is         #
# expressly forbidden. In other words, please ask first before you try and   #
# make money off this program.                                               #
#                                                                            #
# Obtain permission before redistributing this software over the Internet or #
# in any other medium. In all cases copyright and header must remain intact. #
# This Copyright is in full effect in any country that has International     #
# Trade Agreements with the United States of America or with                 #
# the European Union.                                                        #
##############################################################################

#############################
#     DO NOT EDIT BELOW     #
#############################

error_reporting(E_ALL ^ E_NOTICE);

require_once "settings.php";

require_once LANGUAGE_FILE;

if($settings['system'] == 2) {$settings['newline']="\r\n";}
elseif($settings['system'] == 3) {$settings['newline']="\r";}
else {$settings['newline']="\n";}

/* Start user session or output an error */
if (!session_start())
{
error(CANNOT_START_A_NEW_PHP_SESSION);
}

/* If no action parameter is set let's force visitor to login */
if (empty($_REQUEST['action']))
{
	if (isset($_SESSION['logged']) && $_SESSION['logged'] == "Y")
    {
    	mainpage();
    }
    else
    {
		login();
    }
}
else
{
$action=htmlspecialchars($_REQUEST['action']);
}

/* Do the action that is set in $action variable */
if ($action == "login")
	{
	checkpassword();
    $_SESSION['logged']="Y";
    mainpage("welcome");
	}
elseif ($action == "remove")
	{
	checklogin();
    $id=checkid();
    removelink($id);
	}
elseif ($action == "reset")
	{
    checklogin();
    $id=checkid();
    resetlink($id);
	}
elseif ($action == "add")
	{
	checklogin();
    $url=checkurl($_POST['url']);
    add($url);
	}
elseif ($action == "restore")
	{
	checklogin();
    restore();
	}
elseif ($action == "logout")
	{
	logout();
	}
else {login();}
exit();

function restore() {
global $settings;
$ext = strtolower(substr(strrchr($_FILES['backup']['name'], "."), 1));
if ($ext != "txt") {error(THIS_DOESN_T_SEEM_TO_BE_THE_RIGHT_BACKUP_FILE." <b>".$settings[logfile]."</b>!");}

    if (@move_uploaded_file($_FILES['backup']['tmp_name'], $settings['logfile']))
    {
    }
    else
    {
		error(THERE_HAS_BEEN_AN_ERROR_UPLOADING_THE_BACKUP_FILE);
    }

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<link rel="STYLESHEET" type="text/css" href="<?php echo X_FC_PATH; ?>style.css">
<title><?php echo ADMIN_PAGE_TITLE; ?></title>
</head>
<body>
<div align="center"><center>
<table border="0" width="700">
<tr>
<td align="center" class="glava"><font class="header"><?php echo ADMIN_PAGE_HEADER; ?></font></td>
</tr>
<tr>
<td class="vmes"><p>&nbsp;</p>
<div align="center"><center>
<table width="400" cellpadding="3"> <tr>
<td align="center" class="head"><?php echo BACKUP_RESTORED.$_FILES['backup']['name']; ?></td>
</tr>
<tr>
<td class="dol">
<form>
<p>&nbsp;</p>
<p align="center"><b><?php echo BACKUP_SUCCESSFULLY_RESTORED; ?></b></p>
<p><?php echo YOUR_BACKUP_HAS_BEEN_SUCCESSFULLY_RESTORED_IF_THIS_WAS_A_VALID_CCOUNT; ?></p>
<p>&nbsp;</p>
<p align="center">
<a href="index.php?<?php echo strip_tags (SID)?>">
<?php echo CLICK_TO_CONTINUE; ?></a></p>
<p>&nbsp;</p>
</td>
</tr> </table>
</div></center>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</td>
</tr>
<?php echo COPYRIGHT; ?>
</table>
</div></center>
</body>
</html>
<?php
exit();
} // END restore() //


function add($url) {
global $settings;

$name=$_POST['name'];
if (empty($name) || !preg_match("/\S/",$name)) {$name="";}
if (strlen($name)>40) {error("Your link name is too long! Please choose a shorter name (max 40 chars).");}

$fp = fopen($settings['idfile'],"rb") or die(CAN_T_OPEN_THE_LOG_FILE_FOR_READING);
$previd=fread($fp,filesize($settings['idfile']));
fclose($fp);
$previd = trim(chop($previd));
$previd++;
$fp = fopen($settings['idfile'],"wb") or die(CAN_T_OPEN_THE_LOG_FILE_FOR_READING);
fputs($fp,$previd);
fclose($fp);

//$today = date('Y/m/d');
$today = date('d/m/Y');
$addline = $previd . "%%" . $today . "%%" . $url . "%%0%%" . $name . $settings['newline'];

$fp = fopen($settings['logfile'],"ab") or die(CAN_T_OPEN_THE_LOG_FILE_CHMOD_666);
fputs($fp,$addline);
fclose($fp);

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<link rel="STYLESHEET" type="text/css" href="<?php echo X_FC_PATH; ?>style.css">
<title><?php echo ADMIN_PAGE_TITLE; ?></title>
</head>
<body>
<div align="center"><center>
<table border="0" width="700">
<tr>
<td align="center" class="glava"><font class="header"><?php echo ADMIN_PAGE_HEADER; ?></font></td>
</tr>
<tr>
<td class="vmes"><p>&nbsp;</p>
<div align="center"><center>
<table width="400" cellpadding="3"> <tr>
<td align="center" class="head"><?php echo LINK_ADDED; ?></td>
</tr>
<tr>
<td class="dol">
<form>
<p>&nbsp;</p>
<p align="center"><b><?php echo NEW_LINK_SUCCESSFULLY_ADDED; ?></b></p>
<p><?php echo A_NEW_LINK_WITH_ID.$previd.HAS_BEEN_SUCCESSFULLY_ADDED; ?></p>
<p><?php echo TO_COUNT_CLICKS_ON_THIS_LINK_USE_THIS_URL; ?><br><br>
<b><nobr><?php echo("$settings[click_url]?id=$previd"); ?></nobr></b><br><br>
<?php echo INSTEAD_OF_THE_OLD_ONE; ?><br><br>
<nobr><?php echo($url); ?></nobr></p>
<p>&nbsp;</p>
<p align="center">
<a href="index.php?<?php echo strip_tags (SID)?>">
<?php echo CLICK_TO_CONTINUE; ?></a></p>
<p>&nbsp;</p>
</td>
</tr> </table>
</div></center>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</td>
</tr>
<?php echo COPYRIGHT; ?>
</table>
</div></center>
</body>
</html>
<?php
exit();
}
// END add() //

function resetlink($id) {
global $settings;
$fp = fopen($settings['logfile'],"rb") or die(CAN_T_OPEN_THE_LOG_FILE_FOR_READING);
$content=fread($fp,filesize($settings['logfile']));
fclose($fp);

$content = trim(chop($content));
$lines = explode($settings['newline'],$content);

$found=0;

$fp = fopen($settings['logfile'],"wb") or die(CAN_T_OPEN_THE_LOG_FILE_CHMOD_666);
	foreach ($lines as $thisline) {
	    if (preg_match("/^($id\%\%)/",$thisline)) {
        	$found=1;
        	list($id,$added,$url,$count,$name)=explode("%%",$thisline);
            $thisline=$id."%%".$added."%%".$url."%%0%%".$name;
        }
    $thisline .= $settings['newline'];
	fputs($fp,$thisline);
	}
fclose($fp);

if($found != 1) {error(THIS_ID_DOESN_T_EXIST);}

mainpage("ID $id ".LINK_WAS_SUCCESSFULLY_RESET_TO_0);
}
// END resetlink() //

function removelink($id) {
global $settings;
$fp = fopen($settings['logfile'],"rb") or die(CAN_T_OPEN_THE_LOG_FILE_FOR_READING);
$content=fread($fp,filesize($settings['logfile']));
fclose($fp);

$content = trim(chop($content));
$lines = explode($settings['newline'],$content);

$found=0;

$fp = fopen($settings['logfile'],"wb") or die(CAN_T_OPEN_THE_LOG_FILE_CHMOD_666);
	foreach ($lines as $thisline) {
	    if (preg_match("/^($id\%\%)/",$thisline)) {$found=1; continue;}
    $thisline .= $settings['newline'];
	fputs($fp,$thisline);
	}
fclose($fp);

if($found != 1) {error(THIS_ID_DOESN_T_EXIST);}

mainpage("ID $id ".LINK_WAS_SUCCESSFULLY_REMOVED);
}
// END removelink() //

function mainpage($notice="") {
global $settings;
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<link rel="STYLESHEET" type="text/css" href="<?php echo X_FC_PATH; ?>style.css">
<title><?php echo ADMIN_PAGE_TITLE; ?></title>
<script language="Javascript" type="text/javascript"><!--
function doconfirm(message) {
	if (confirm(message)) {return true;}
    else {return false;}
}
//-->
</script>
</head>
<body>
<div align="center"><center>
<table border="0" width="700" cellpadding="5">
<tr>
<td align="center" class="glava"><font class="header"><?php echo ADMIN_PAGE_HEADER; ?></font></td>
</tr>
<tr>
<td class="vmes">
<?php
if ($notice == "welcome") {
    echo "<p align=\"center\"><b>".WELCOME_TO_ADMIN_PANEL."</b></p>";
	}
else {
	echo "<p align=\"center\"><b>".ADMIN_PANEL."</b></p>
    <p align=\"center\"><font color=\"#FF0000\">$notice</font></p>";
    }
?>
<p><a href="#addlink"><?php echo ADD_A_NEW_LINK; ?></a><br>
<a href="index.php?action=logout"><?php echo LOGOUT; ?></a></p>
<hr>
<p><b><?php echo LINK_STATISTICS; ?></b></p>
<?php
$lines=array();
$totalclicks="";
$linewidth="";
$maxclicks=0;
$maxid=0;
$noyet=0;

$fp = @fopen($settings['logfile'],"rb") or die(CAN_T_OPEN_THE_LOG_FILE_FOR_READING);
$content=@fread($fp,filesize($settings['logfile']));
fclose($fp);
$content = trim(chop($content));
	if (strlen($content) == 0) {$noyet=1;}
$lines = explode($settings['newline'],$content);

if ($noyet == 1)
	{
    ?>
<p><?php echo NOT_COUNTING_ANY_LINKS_USE_THE_FORM_BELOW_TO_ADD_NEW_LINKS_TO_BE_COUNTED; ?></p>
    <?php
    }
else {
	$i=0;
		foreach ($lines as $thisline) {
			list($id,$added,$url,$count,$linkname)=explode("%%",$thisline);
			$totalclicks += $count;
	            if($count > $maxclicks) {$maxclicks = $count;$maxid=$id;}
		    $i++;
		}
    $average = $totalclicks/$i;
    $average = number_format($average,1);
    echo "<p>".TOTAL_LINKS." <b>$i</b><br>"
    .TOTAL_CLICKS." <b>$totalclicks</b><br>"
    .AVERAGE_CLICKS_PER_LINK." <b>$average</b>";
    	if ($maxclicks != 0) {
        echo MAXIMUM_CLICKS_PER_LINK." <b>".$maxclicks."</b> (Link ID ".$maxid.")";
        }
    echo "</p>\n";
}

if ($maxclicks == 0 || $totalclicks == 0) {$totalimagewidth=0;}
else {
$maxlinewidth=($maxclicks/$totalclicks)*100;
$maxlinewidth=round($maxlinewidth);
	if ($maxlinewidth < 20) {$totalimagewidth=1000;}
	elseif ($maxlinewidth < 40) {$totalimagewidth=500;}
	elseif ($maxlinewidth < 60) {$totalimagewidth=334;}
	elseif ($maxlinewidth < 80) {$totalimagewidth=250;}
	else {$totalimagewidth=200;}
}

if ($noyet == 0) {
echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tr>
<td algin=\"center\" valgin=\"center\" class=\"first\">&nbsp;</td>
<td algin=\"center\" valgin=\"center\" class=\"first\"> <b>".ID."</b> </td>
<td algin=\"center\" valgin=\"center\" class=\"second\"> <b>".CLICKS."</b> </td>
<td algin=\"center\" valgin=\"center\" class=\"first\"> <b>".ADDED."</b> </td>
<td algin=\"center\" valgin=\"center\" class=\"second\"> <b>".WEB_PAGE."</b> </td>
<td valgin=\"center\" class=\"first\"> <b>".GRAPH."</b> </td>
</tr>";

	foreach ($lines as $thisline) {
    	trim($thisline);
		list($id,$added,$url,$count,$linkname)=explode("%%",$thisline);
        	if ($count==0 || $totalclicks==0) {$linewidth="1";}
            else {
            $linewidth=($count/$totalclicks)*$totalimagewidth;
            $linewidth=round($linewidth);
            	if ($linewidth == 0) {$linewidth="1";}
            }

            $linkname=rtrim($linkname);
            if (empty($linkname))
            {
	            if (strlen($url) > 40)
	            {
	                $linkname = substr($url, 0, 20);
	                $linkname .= "...";
	                $linkname .= substr($url, -17);
	            }
	            else
	            {
	                $linkname=$url;
	            }
            }

        echo "<tr>
<td algin=\"center\" valgin=\"center\" class=\"first\"><a href=\"index.php?".SID."&action=remove&id=$id\" onclick=\"return doconfirm('".ARE_YOU_SURE_YOU_WANT_TO_REMOVE_LINK_ID.$id." ? ".THIS_CANNOT_BE_UNDONE."');\"><img src=\"".X_FC_PATH."delete.gif\" height=\"14\" width=\"16\" border=\"0\" alt=\"".REMOVE_THIS_LINK."\" title=\"".REMOVE_THIS_LINK."\"></a>
<a href=\"index.php?".SID."&action=reset&id=$id\" onclick=\"return doconfirm('".ARE_YOU_SURE_YOU_WANT_TO_RESET_CLICKS_FOR_LINK_ID.$id." ?".THIS_CANNOT_BE_UNDONE."');\"><img src=\"".X_FC_PATH."reset.gif\" height=\"14\" width=\"16\" border=\"0\" alt=\"".RESET_NUMBER_OF_CLICKS_TO_0."\" title=\"".RESET_NUMBER_OF_CLICKS_TO_0."\"></a></td>
<td algin=\"center\" valgin=\"center\" class=\"first\"> $id </td>
<td algin=\"center\" valgin=\"center\" class=\"second\"> <b>$count</b> </td>
<td algin=\"center\" valgin=\"center\" class=\"first\"> $added </td>
<td algin=\"center\" valgin=\"center\" class=\"second\"> <a href=\"$url\" target=\"_new\" class=\"link\">$linkname</a> </td>
<td valgin=\"center\" class=\"first\"> <img src=\"".X_FC_PATH."line.gif\" height=\"5\" width=\"$linewidth\" border=\"0\"> </td>
        </tr>";
	}
echo "</table>
<p>".NOTE_REMOVE_LINK."<img src=\"".X_FC_PATH."delete.gif\" height=\"14\" width=\"16\" border=\"0\" alt=\"".REMOVE_THIS_LINK."\" title=\"".REMOVE_THIS_LINK."\"><br>".NOTE_REMOVE_CLICKS."<img src=\"".X_FC_PATH."reset.gif\" height=\"14\" width=\"16\" border=\"0\" alt=\"".RESET_NUMBER_OF_CLICKS_TO_0."\" title=\"".RESET_NUMBER_OF_CLICKS_TO_0."\"></p>
";
}

?>
<hr>
<form action="index.php?<?php echo strip_tags (SID)?>" method="POST">
<p><a name="#addlink"></a><b><?php echo ADD_A_LINK; ?></b></p>
<p><?php echo USE_THIS_FORM_TO_ADD_A_NEW_URL_LINK_TO_TRACK_CLICKS; ?><br>
<input type="hidden" name="action" value="add">
<input type="hidden" name="pass" value="<?php echo($settings['apass']); ?>">
<input type="text" name="url" value="http://" size="120">
</p>
<p><?php echo LINK_NAME_OPTIONAL; ?><br>
<?php echo CHOOSE_A_UNIQUE_NAME_FOR_THIS_LINK_MAX_40_CHARS; ?><br>
<input type="text" name="name" size="40" maxlength="40"> </p>
<p><input type="submit" value="<?php echo ADD_A_LINK; ?>"></p>
</form>
<hr>
<p><b><?php echo DOWNLOAD_BACKUP; ?></b></p>
<p><?php echo YOU_MAY_DOWNLOAD_A_BACKUP_OF_THE_LINK_DATABASE_AND_RESTORE_IT_IN_THE_FUTURE; ?></p>
<p><a href="<?php echo X_FC_PATH.$settings['logfile']; ?>" target="_new"><?php echo CLICK_TO_DOWNLOAD_BACKUP; ?></a></p>
<p><b><?php echo RESTORE_BACKUP; ?></b></p>
<form action="index.php?<?php echo strip_tags (SID)?>" method="POST" enctype="multipart/form-data">
<p><input type="hidden" name="action" value="restore">
<?php echo USE_THIS_FORM_TO_RESTORE_A_PREVIOUSLY_DOWNLOADED_BACKUP_FILE; ?><br>
<input type="file" name="backup" size="30">
<p><input type="submit" value="<?php echo CLICK_TO_RESTORE_THIS_BACKUP; ?>"></p>
</form>
<hr>
<p><b><?php echo USAGE; ?></b></p>
<p><?php echo TO_TRACK_CLICKS_ON_A_LINK_USE_THIS_URL; ?></p>
<hr>
<p><b><?php echo RATE_THIS_SCRIPT; ?></b></p>
<p><?php echo IF_YOU_LIKE_THIS_SCRIPT_PLEASE_RATE_IT; ?></p>
<hr>
<p><b><?php echo STAY_UPDATED; ?></b></p>
<p><?php echo JOIN_MY_FREE_NEWSLETTER; ?></p>
<hr>
<p>&nbsp;</p>
</td>
</tr>
<?php echo COPYRIGHT; ?>
</table>
</div></center>
</body>
</html>
<?php
exit();
}
// END mainpage() //

function checkurl($url) {
    if (empty($url) || $url == "http://" || $url == "https://")
    {
    error(PLEASE_ENTER_URL_OF_THE_LINK_YOU_WISH_TO_ADD);
    }
    return $url;
}
// END checkurl() //

function checkid() {
    if(empty($_REQUEST['id']))
    {
    error("Please enter a link ID number!");
    }
    else
    {
    $id=htmlentities($_REQUEST['id']);
    	if (preg_match("/\D/",$id))
        {
        error(THIS_IS_NOT_A_VALID_LINK_ID_USE_NUMBERS_ONLY);
        }
    }
    return $id;
}
// END checkid() //

function checklogin() {
	if (isset($_SESSION['logged']) && $_SESSION['logged'] == "Y")
	{
        return true;
    }
	else
    {
    	error(YOU_ARE_NOT_AUTHORIZED_TO_VIEW_THIS_PAGE);
    }
}
// END checklogin() //

function checkpassword() {
global $settings;

	if(empty($_POST['pass']))
    {
    error(PLEASE_ENTER_YOUR_ADMIN_PASSWORD);
    }
    else
    {
    $pass=htmlspecialchars($_POST['pass']);
    }

	if ($pass != $settings['apass'])
    {
    error(WRONG_PASSWORD);
    }

}
// END checkpassword() //

function logout() {
session_unset();
session_destroy();
global $settings;
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<link rel="STYLESHEET" type="text/css" href="<?php echo X_FC_PATH; ?>style.css">
<title><?php echo ADMIN_PAGE_TITLE; ?></title>
</head>
<body>
<div align="center"><center>
<table border="0" width="700">
<tr>
<td align="center" class="glava"><font class="header"><?php echo ADMIN_PAGE_HEADER; ?></font></td>
</tr>
<tr>
<td class="vmes"><p>&nbsp;</p>
<div align="center"><center>
<table width="400"> <tr>
<td align="center" class="head">LOGGED OUT</td>
</tr>
<tr>
<td align="center" class="dol">
<p>&nbsp;</p>
<p><b><?php echo YOU_HAVE_BEEN_SUCCESSFULLY_LOGGED_OUT; ?></b></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</td>
</tr> </table>
</div></center>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</td>
</tr>
<?php echo COPYRIGHT; ?>
</table>
</div></center>
</body>
</html>
<?php
exit();
}
// END logout() //

function login() {
global $settings;
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<link rel="STYLESHEET" type="text/css" href="<?php echo X_FC_PATH; ?>style.css">
<title><?php echo ADMIN_PAGE_TITLE; ?></title>
</head>
<body>
<div align="center"><center>
<table border="0" width="700">
<tr>
<td align="center" class="glava"><font class="header"><?php echo ADMIN_PAGE_HEADER; ?></font></td>
</tr>
<tr>
<td class="vmes"><p>&nbsp;</p>
<div align="center"><center>
<table width="400"> <tr>
<td align="center" class="head"><?php echo ENTER_ADMIN_PANEL; ?></td>
</tr>
<tr>
<td align="center" class="dol"><form method="POST" action="index.php?<?php echo strip_tags (SID)?>"><p>&nbsp;<br><b><?php echo PLEASE_TYPE_IN_YOUR_ADMIN_PASSWORD; ?></b><br><br>
<input type="password" name="pass" size="20"><input type="hidden" name="action" value="login"></p>
<p><input type="submit" name="enter" value="<?php echo ENTER_ADMIN_PANEL; ?>"></p>
</form>
</td>
</tr> </table>
</div></center>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</td>
</tr>
<?php echo COPYRIGHT; ?>
</table>
</div></center>
</body>
</html>
<?php
exit();
}
// END login() //

function error($myproblem) {
global $settings;
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<link rel="STYLESHEET" type="text/css" href="<?php echo X_FC_PATH; ?>style.css">
<title><?php echo ADMIN_PAGE_TITLE; ?></title>
</head>
<body>
<div align="center"><center>
<table border="0" width="700">
<tr>
<td align="center" class="glava"><font class="header"><?php echo ADMIN_PAGE_HEADER; ?></font></td>
</tr>
<tr>
<td class="vmes"><p>&nbsp;</p>
<div align="center"><center>
<table width="400"> <tr>
<td align="center" class="head"><?php echo ERROR; ?></td>
</tr>
<tr>
<td align="center" class="dol">
<p>&nbsp;</p>
<p><b><?php echo AN_ERROR_OCCURED; ?></b></p>
<p><?php echo($myproblem); ?></p>
<p>&nbsp;</p>
<p><a href="index.php?<?php echo strip_tags (SID)?>"><?php echo BACK_TO_THE_PREVIOUS_PAGE; ?></a></p>
<p>&nbsp;</p>
</td>
</tr> </table>
</div></center>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</td>
</tr>
<?php echo COPYRIGHT; ?>
</table>
</div></center>
</body>
</html>
<?php
exit();
}
// END error() //

?>
----------------------------------------------------------------
language/en.php

Code: Select all

<?php
define ('ADMIN_PAGE_TITLE','PHP Click counter admin panel');
define ('ADMIN_PAGE_HEADER','PHP Click counter '.$settings['verzija'].'<br>-- Admin panel --');
define ('ENTER_ADMIN_PANEL','Enter admin panel');
define ('WELCOME_TO_ADMIN_PANEL','Welcome to admin panel!');
define ('ADMIN_PANEL','Admin panel');
define ('ERROR','ERROR');
define ('AN_ERROR_OCCURED','An error occured: ');
define ('THIS_ID_DOESN_T_EXIST','This ID doesn\'t exist!');
define ('NOT_COUNTING_ANY_LINKS_USE_THE_FORM_BELOW_TO_ADD_NEW_LINKS_TO_BE_COUNTED','Not counting any links. Use the form below to add new links to be counted.');
define ('WRONG_PASSWORD','Wrong password!');
define ('PLEASE_ENTER_YOUR_ADMIN_PASSWORD','Please enter your admin password!');
define ('YOU_ARE_NOT_AUTHORIZED_TO_VIEW_THIS_PAGE','You are not authorized to view this page!');
define ('BACK_TO_THE_PREVIOUS_PAGE','Back to the previous page');
define ('ADD_A_NEW_LINK','Add a new link');
define ('PLEASE_ENTER_URL_OF_THE_LINK_YOU_WISH_TO_ADD','Please enter URL of the link you wish to add!');
define ('ADD_A_LINK','Add a link');
define ('USE_THIS_FORM_TO_ADD_A_NEW_URL_LINK_TO_TRACK_CLICKS','Use this form to add a new URL link to track clicks. Please type in the <b>full URL</b> of the link below: ');
define ('THIS_IS_NOT_A_VALID_LINK_ID_USE_NUMBERS_ONLY','This is not a valid link ID, use numbers (0-9) only!');
define ('LINK_ADDED','Link added');
define ('NEW_LINK_SUCCESSFULLY_ADDED','New link successfully added!');
define ('A_NEW_LINK_WITH_ID','A new link with ID ');
define ('HAS_BEEN_SUCCESSFULLY_ADDED',' has been successfully added.');
define ('TO_COUNT_CLICKS_ON_THIS_LINK_USE_THIS_URL','To count clicks on this link use this URL: ');
define ('INSTEAD_OF_THE_OLD_ONE','instead of the old one: ');
define ('CLICK_TO_CONTINUE','Click to continue');
define ('PLEASE_ENTER_A_LINK_ID_NUMBER','Please enter a link ID number!');
define ('LINK_NAME_OPTIONAL','<b>Link name:</b> (Optional)');
define ('CHOOSE_A_UNIQUE_NAME_FOR_THIS_LINK_MAX_40_CHARS','Choose a unique name for this link (max 40 chars). This name will be displayed as "Web page" in the statistics. If you don\'t choose a name the link URL will be displayed (if longer than 40 chars it will be shorten to 40 chars).');
define ('DOWNLOAD_BACKUP','Download backup');
define ('YOU_MAY_DOWNLOAD_A_BACKUP_OF_THE_LINK_DATABASE_AND_RESTORE_IT_IN_THE_FUTURE','You may download a backup of the link database and restore it in the future should your link file be corrupted for any reason. To download a backup click the link below and select "File > Save as" or "Save to disk" in the window that will open: ');
define ('CLICK_TO_DOWNLOAD_BACKUP','Click to download backup');
define ('RESTORE_BACKUP','Restore backup');
define ('USE_THIS_FORM_TO_RESTORE_A_PREVIOUSLY_DOWNLOADED_BACKUP_FILE','Use this form to restore a previously downloaded backup file. This action cannot be undone!</p><p>Select your backup file: ');
define ('CLICK_TO_RESTORE_THIS_BACKUP','Click to restore this backup');
define ('BACKUP_RESTORED','Backup restored: ');
define ('BACKUP_SUCCESSFULLY_RESTORED','Backup successfully restored!');
define ('YOUR_BACKUP_HAS_BEEN_SUCCESSFULLY_RESTORED_IF_THIS_WAS_A_VALID_CCOUNT','Your backup has been successfully restored. If this was a valid CCount backup file your counter should work OK now!');
define ('USAGE','Usage');
define ('TO_TRACK_CLICKS_ON_A_LINK_USE_THIS_URL','To track clicks on a link, use this URL instead of the link original URL:</p><p>'.$settings['click_url'].'?id=<b>ID</b></p><p>Replace <b>ID</b> with the ID number of the URL, for example:</p><p>'.$settings['click_url'].'?id=<b>13</b>');
define ('RATE_THIS_SCRIPT','Rate this script');
define ('IF_YOU_LIKE_THIS_SCRIPT_PLEASE_RATE_IT','If you like this script please rate it or even write a review at:</p><p><a href=\"http://www.hotscripts.com/Detailed/36874.html\" target=\"_new\">Rate this Script @ Hot Scripts</a>');
define ('STAY_UPDATED','Stay updated');
define ('JOIN_MY_FREE_NEWSLETTER','Join my FREE newsletter and you will be notified about new scripts, new versions of the existing scripts and other important news from PHPJunkYard.<br><a href=http://www.phpjunkyard.com/newsletter.php target=_new>Click here for more info</a>');
define ('LOGOUT','LOGOUT');
define ('LINK_STATISTICS','Link statistics');
define ('CAN_T_OPEN_THE_LOG_FILE_FOR_READING','Can\'t open the log file ('.$settings[logfile].') for reading!');
define ('CAN_T_OPEN_THE_LOG_FILE_CHMOD_666','x Can\'t write to log file! Please Change the file permissions (CHMOD to 666 on UNIX machines!)');
define ('TOTAL_LINKS','Total links: ');
define ('TOTAL_CLICKS','Total clicks: ');
define ('AVERAGE_CLICKS_PER_LINK','Average clicks per link: ');
define ('MAXIMUM_CLICKS_PER_LINK','<br>Maximum clicks per link: ');
define ('ID','ID');
define ('CLICKS','Clicks');
define ('ADDED','Added');
define ('WEB_PAGE','Web page');
define ('GRAPH','Graph');
define ('ARE_YOU_SURE_YOU_WANT_TO_REMOVE_LINK_ID','Are you sure you want to remove link ID ');
define ('ARE_YOU_SURE_YOU_WANT_TO_RESET_CLICKS_FOR_LINK_ID','Are you sure you want to reset clicks for link ID ');
define ('THIS_CANNOT_BE_UNDONE',' This cannot be undone!');
define ('REMOVE_THIS_LINK','Remove this link');
define ('RESET_NUMBER_OF_CLICKS_TO_0','Reset number of clicks to 0');
define ('NOTE_REMOVE_LINK','<b>Note:</b><br>For best performance you should remove links you don\'t use anymore by clicking the button ');
define ('NOTE_REMOVE_CLICKS','You can reset number of clicks on a link to 0 by clicking the button ');
define ('LINK_WAS_SUCCESSFULLY_REMOVED','Link was successfully removed!');
define ('LINK_WAS_SUCCESSFULLY_RESET_TO_0','LINK was successfully reset to 0 clicks!');
define ('PLEASE_TYPE_IN_YOUR_ADMIN_PASSWORD','Please type in your admin password');
define ('CANNOT_START_A_NEW_PHP_SESSION','Cannot start a new PHP session. Please contact server administrator or webmaster!');
define ('THIS_DOESN_T_SEEM_TO_BE_THE_RIGHT_BACKUP_FILE','This doesn\'t seem to be the right backup file. CCount backup file should be named ');
define ('THERE_HAS_BEEN_AN_ERROR_UPLOADING_THE_BACKUP_FILE','There has been an error uploading the backup file! Please make sure your CCount directory is world-writable. On UNIX machines CHMOD it to 777 (rwx-rwx-rwx)!');
define ('LOGGED_OUT','LOGGED OUT');
define ('YOU_HAVE_BEEN_SUCCESSFULLY_LOGGED_OUT','You have been successfully logged out.');
define ('COPYRIGHT','
<tr>
<!--Changing the "Powered by" credit sentence without purchasing a licence is illegal!
Please visit http://www.phpjunkyard.com/copyright-removal.php for more information.
-->
<td align="center" class="copyright">Powered by <a href="http://www.phpjunkyard.com/php-click-counter.php" target="_new">PHP click counter</a>'.$settings['verzija'].'<br>
(c) Copyright 2004-2005 <a href="http://www.phpjunkyard.com/" target="_new">PHPjunkyard - Free PHP scripts</a>
</td>
</tr>
');
?>
----------------------------------------------------------------
language/it.php

Code: Select all

<?php 
define ('ADMIN_PAGE_TITLE','CONTA CLICKS PHP Pannello di gestione');
define ('ADMIN_PAGE_HEADER','Conta Click '.$settings['verzija'].'<br>-- Pagina di AMMINISTRAZIONE --');
define ('ENTER_ADMIN_PANEL','Entra nella pagina di Gestione');
define ('WELCOME_TO_ADMIN_PANEL','Benvenuto nella gestione del conteggio dei click!');
define ('ADMIN_PANEL','GESTIONE DEI CONTATORI SUI COLLEGAMENTI');
define ('ERROR','ERRORE');
define ('AN_ERROR_OCCURED','E\' avvenuto un\' errore:');
define ('THIS_ID_DOESN_T_EXIST','Questo ID non esiste');
define ('NOT_COUNTING_ANY_LINKS_USE_THE_FORM_BELOW_TO_ADD_NEW_LINKS_TO_BE_COUNTED','Non contare ogni Click per ogni Link. Usa il modulo qui sotto per aggiungere un contatore su un Collegamento');
define ('WRONG_PASSWORD','Password non Valida!');
define ('PLEASE_ENTER_YOUR_ADMIN_PASSWORD','Inserisci la Password corretta!');
define ('YOU_ARE_NOT_AUTHORIZED_TO_VIEW_THIS_PAGE','Non sei autorizzato a visualizzare questa pagina!');
define ('BACK_TO_THE_PREVIOUS_PAGE','Ritorna alla pagina precedente');
define ('ADD_A_NEW_LINK','Aggiungi un nuovo link');
define ('PLEASE_ENTER_URL_OF_THE_LINK_YOU_WISH_TO_ADD','Inserisci l\'URL del collegamento che vuoi aggiungere!');
define ('ADD_A_LINK','Aggiungi un Link');
define ('USE_THIS_FORM_TO_ADD_A_NEW_URL_LINK_TO_TRACK_CLICKS','Usa questo campo per aggiungere un contatore su un LINK.<br>Scrivi qui sotto l\' <b>URL completo</b> del LINK:');
define ('THIS_IS_NOT_A_VALID_LINK_ID_USE_NUMBERS_ONLY','Questo non e\' un ID valido per il LINK, usa solo numeri (0-9)!');
define ('LINK_ADDED','Link aggiunto');
define ('NEW_LINK_SUCCESSFULLY_ADDED','Un nuovo LINK e\' stato aggiunto!');
define ('A_NEW_LINK_WITH_ID','Un nuovo LINK con ID ');
define ('HAS_BEEN_SUCCESSFULLY_ADDED',' e\' stato correttamente aggiunto. ');
define ('TO_COUNT_CLICKS_ON_THIS_LINK_USE_THIS_URL','Per contare i CLICKS su questo LINK usa questo URL: ');
define ('INSTEAD_OF_THE_OLD_ONE','al posto dell\' URL originale: ');
define ('CLICK_TO_CONTINUE','Clicca qui per continuare');
define ('PLEASE_ENTER_A_LINK_ID_NUMBER',' Inserisci un numero di ID! ');
define ('LINK_NAME_OPTIONAL','<b>Nome del LINK:</b> (facoltativo)<br>');
define ('CHOOSE_A_UNIQUE_NAME_FOR_THIS_LINK_MAX_40_CHARS','Scegli un nome significativo di riconoscimento per il LINK (max 40 caratteri).<br>Questo nome sara\' visualizzato come "Pagina WEB" nelle statitistiche.<br>Se lasci vuoto questo campo, sara\' visualizzato l\' URL (max 40 caratteri).');
define ('DOWNLOAD_BACKUP','Scarica una copia di Backup');
define ('YOU_MAY_DOWNLOAD_A_BACKUP_OF_THE_LINK_DATABASE_AND_RESTORE_IT_IN_THE_FUTURE','Puoi scaricare una copia di backup del file che contiene i contatori sui LINK. Puo\' essere utile per ripristinare i contatori in caso di bisogno.<br>Per salvare un copia di backup clicca qui sotto e seleziona il comando  "File > Save as" oppure "Save to disk" nella finestra che si aprira\':');
define ('CLICK_TO_DOWNLOAD_BACKUP','Click qui per scaricare il backup');
define ('RESTORE_BACKUP','Ripristina un backup salvato');
define ('USE_THIS_FORM_TO_RESTORE_A_PREVIOUSLY_DOWNLOADED_BACKUP_FILE','Usa questo campo per selezionare un file di backup da ripristinare. Questa azione non puo\' essere annullata!</p><p>Seleziona il file di backup da ripristinare: ');
define ('CLICK_TO_RESTORE_THIS_BACKUP','Click qui per ripristinare un backup');
define ('BACKUP_RESTORED','Backup ripristinato:');
define ('BACKUP_SUCCESSFULLY_RESTORED','Backup ripristinato con successo!');
define ('YOUR_BACKUP_HAS_BEEN_SUCCESSFULLY_RESTORED_IF_THIS_WAS_A_VALID_CCOUNT','Il file di backup e\' stato caricato. Se questo file contiene le informazioni corrette lo vedrai subito in azione.!');
define ('USAGE','Come usare il contatore sui LINKS');
define ('TO_TRACK_CLICKS_ON_A_LINK_USE_THIS_URL','ESEMPIO:<br>Per contare i CLICKS su un LINK sostituisci l\' URL originale con l\' URL qui sotto:</p><p>'.$settings['click_url'].'?id=<b>ID</b></p><p>Sostituisci il numero di <b>ID</b> con l\' ID associato all\' URL, per esempio:</p><p>'.$settings['click_url'].'?id=<b>13</b>');
define ('RATE_THIS_SCRIPT','Dai una valutazione a questo script');
define ('IF_YOU_LIKE_THIS_SCRIPT_PLEASE_RATE_IT','Se questo script e\' di tuo gradimento, dai una valutazione a questo LINK:</p><p><a href=\"http://www.hotscripts.com/Detailed/36874.html\" target=\"_new\">Rate this Script @ Hot Scripts</a>');
define ('STAY_UPDATED','Per ricevere le novita\' iscriviti alla NEWSLETTER');
define ('JOIN_MY_FREE_NEWSLETTER','Iscriviti gratuitamente alla NEWSLETTER per ricevere le novita\' sui miei scripts,  PHPJunkYard.<br><a href=http://www.phpjunkyard.com/newsletter.php target=_new>Click qui per maggiori info</a>');
define ('LOGOUT','LOGOUT esci');
define ('LINK_STATISTICS','Statistiche sui LINKS');
define ('CAN_T_OPEN_THE_LOG_FILE','Non posso aprire il file di log ('.$settings[logfile].') per la lettura!');
define ('CAN_T_OPEN_THE_LOG_FILE_CHMOD_666','Non posso aprire il file di log! Cambia i permessi sul file (CHMOD 666 su UNIX!)');
define ('TOTAL_LINKS','Totale Links:');
define ('TOTAL_CLICKS','Totale Clicks:');
define ('AVERAGE_CLICKS_PER_LINK','Media dei Clicks per Collegamento: ');
define ('MAXIMUM_CLICKS_PER_LINK','<br>Numero massimo di Clicks su un Link: ');
define ('ID','ID');
define ('CLICKS','Clicks');
define ('ADDED','Aggiunto in data');
define ('WEB_PAGE','Pagina WEB');
define ('GRAPH','Grafico');
define ('ARE_YOU_SURE_YOU_WANT_TO_REMOVE_LINK_ID','Sei sicuro di eliminare il LINK con ID ');
define ('ARE_YOU_SURE_YOU_WANT_TO_RESET_CLICKS_FOR_LINK_ID','Sei sicuro di voler reimpostare il contatore a 0 per il LINK con ID ');
define ('THIS_CANNOT_BE_UNDONE',' Questa azione non puo\\\' essere annullata! ');
define ('REMOVE_THIS_LINK','Rimuovi questo LINK');
define ('RESET_NUMBER_OF_CLICKS_TO_0','Reimposta a 0 il contatore');
define ('NOTE_REMOVE_LINK','<b>Nota:</b><br>Il modo migliore per rimuovere un LINK e\' cliccare sul bottone ');
define ('NOTE_REMOVE_CLICKS','Per reimpostare il contatore a 0 clicca sul bottone ');
define ('LINK_WAS_SUCCESSFULLY_REMOVED','Il LINK e\' stato rimosso!');
define ('LINK_WAS_SUCCESSFULLY_RESET_TO_0','il contatore sul LINK e\' stato reimpostato a 0!');
define ('PLEASE_TYPE_IN_YOUR_ADMIN_PASSWORD','Inserisci la Password per la Gestione');
define ('CANNOT_START_A_NEW_PHP_SESSION','Non posso inizializzare una sessione.Contatta l\' Amministratore o il WebMaster! ');
define ('THIS_DOESN_T_SEEM_TO_BE_THE_RIGHT_BACKUP_FILE','Non sembra che questo sia un file valido, il nome file deve essere ');
define ('THERE_HAS_BEEN_AN_ERROR_UPLOADING_THE_BACKUP_FILE','Durante la fase di carimento del file di backup e\' avvenuto un\'errore! Assicurati che i permessi sulla cartella che contiene il file contatore siano impostati correttamente. CHMOD 777 (rwx-rwx-rwx) su UNIX!');
define ('LOGGED_OUT','-LOGGED OUT-');
define ('YOU_HAVE_BEEN_SUCCESSFULLY_LOGGED_OUT','Ti sei scollegato correttamente!');
define ('COPYRIGHT','
<tr>
<!--Changing the "Powered by" credit sentence without purchasing a licence is illegal!
Please visit http://www.phpjunkyard.com/copyright-removal.php for more information.
-->
<td align="center" class="copyright">Powered by <a href="http://www.phpjunkyard.com/php-click-counter.php" target="_new">PHP click counter</a>'.$settings['verzija'].'<br>
(c) Copyright 2004-2005 <a href="http://www.phpjunkyard.com/" target="_new">PHPjunkyard - Free PHP scripts</a>
</td>
</tr>
');
?>
----------------------------------------------------------------
make your traslation and it work.
on the setting file set this to your language file

Code: Select all

define('LANGUAGE_FILE','language/it.php');
----------------------------------------------------------------
ciao
Mario
Post Reply