Easy AdSense.
*/
/*
Copyright (C) 2008 www.thulasidas.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 3 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, see .
*/
define('minmatch', 89) ;
if (!class_exists("ezTran") && !class_exists("PO")) {
class PO { // an id-str pair with attributes
var $num, $id, $str, $tranId, $tranVal, $keyId, $keyVal ;
function PO($id, $str) {
$this->id = (string) $id ;
$this->str = (string) $str ;
$this->tranVal = minmatch ;
$this->keyVal = minmatch ;
}
// Returns a text-area string of the Id
function textId() {
$ht = round(strlen($this->id)/52 + 1) * 25 ;
$col = 'background-color:#f5f5f5;' ;
if ($this->keyVal > minmatch+1) {
$col = "background-color:#ffc;border: solid 1px #f00" ;
$tit = 'onmouseover = "Tip(\'Another similar string: ' .
htmlspecialchars(' ' . addcslashes($this->keyId, "\n") .
' ', ENT_QUOTES) .
'exists. Please alert the author.\',WIDTH, 300)" ' .
'onmouseout="UnTip()"';
}
$s = ' ' ;
return $s ;
}
function textStr() {
$ht = round(strlen($this->id)/52 + 1) * 25 ;
if ($this->tranVal > minmatch+1){
$col = "background-color:#fdd;border: solid 1px #f00" ;
$tit = 'onmouseover = "Tip(\'Using the translation for a similar string: ' .
htmlspecialchars(' ' . addcslashes($this->tranId, "\n") .
' ', ENT_QUOTES) .
'Please check carefully.\',WIDTH, 300)" ' .
'onmouseout="UnTip()"';
}
$s = ' ' ;
return $s ;
}
}
class ezTran {
var $status, $error ;
function ezTran()
{
$this->status = '' ;
$this->error = '' ;
if ($_POST['savePot']) {
$file = $_POST['potFile'] ;
$str = $_POST['potStr'] ;
header('Content-Disposition: attachment; filename="' . $file .'"');
header("Content-Transfer-Encoding: ascii");
header('Expires: 0');
header('Pragma: no-cache');
ob_start() ;
print stripslashes(htmlspecialchars_decode($str, ENT_QUOTES)) ;
ob_end_flush() ;
$this->status = '