$SQLserver = "localhost";
$SQLuser = "weldlit.eu";
$SQLpasswd = "nesakysiu";
$SQLdb = "weldlit_eu";
$tbl_admin = 'weldlit_user';
$tbl_session = 'weldlit_session';
$tbl = 'weldlit_';
?>
$conn = mysql_connect($SQLserver, $SQLuser, $SQLpasswd) or die("Could not connect to MySQL");
$db = mysql_select_db($SQLdb) or die("Could not select database ".$SQLdb."");
mysql_query("SET SESSION time_zone = '+1:00'");
mysql_query("SET NAMES 'UTF8'");
class MyClass {
function mysql_safe ( $key, $item, $type )
{
switch( $type )
{
case 'get':
if( count( $_GET ) > 0 )
{
$_GET[$item] = htmlspecialchars( $key );
}
break;
case 'post':
if( count( $_POST ) > 0 )
{
$_POST[$item] = htmlspecialchars( $key );
}
break;
}
}
function safe_get ( )
{
#Flag to only run function once
if( $this->get_flag == true ) { return true; }
array_walk_recursive( $_GET, array( $this, 'mysql_safe' ), 'get' );
array_walk_recursive( $_POST, array( $this, 'mysql_safe' ), 'post' );
$this->get_flag = true;
}
}
//if($_SERVER['SCRIPT_NAME'] != '/company_news.php' && $_SERVER['SCRIPT_NAME'] != '/company_article.php'){
$pimp = new MyClass;
$pimp->safe_get();
//}
?>
header('Content-Type:text/html; charset=UTF-8');
$visos_kalbos = array("en", "lt", "ru", "de", "pl");
if($_GET['lang'] && !in_array($_GET['lang'], $visos_kalbos)){
$_GET['lang'] = "en";
}
elseif($_GET['lang']){
$domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false;
setcookie("language", $_GET['lang'], time()+31536000, "/", "");
}
if($_GET['lang']){
$sel_lang = $_GET['lang'];
}
elseif(!$_COOKIE['language']){
$sel_lang = 'en';
}
else{
$sel_lang = $_COOKIE['language'];
}
$res = mysql_query("SELECT bekalbos, ".$sel_lang." FROM ".$tbl."language") or die(mysql_error());
while($row = mysql_fetch_array($res)){
$ln[$row['bekalbos']] = $row[$sel_lang];
}
require_once 'lib/url.class.php';
$url_gen = new Url;
?>TCPDF ERROR: [Image] No such file or directory in /home/weldlit/public_html/images/no-logo.gif