0){ die("Twoje ip jest zbanowane!"); } if(($_GET['id'] == 'settings') && ($_GET['s'] == 'language') && ($_GET['o'] == 'se')) { if($_SESSION['userlevel'] < 1) { die('
' . Lack_of_entitlement . '
'); } elseif(!eregi('^[[:alnum:]]*$', $_GET['l'])) { die('
' . Bad_parameter . ' l.
'); } else { $wyn = zapytanie('SELECT normal FROM languages WHERE short=\'' . $_GET['l'] . '\';'); if(!($linia = pobierz($wyn))) { die('
' . Bad_parameter . ' l.
'); } else { zapytanie('UPDATE users SET language=\'' . $_GET['l'] . '\' WHERE id=\'' . $_SESSION['userid'] . '\';'); $_SESSION['jezyk'] = $_GET['l']; } zwolnij($wyn); } } if($_SESSION['jezyk'] == null) { $najp = 5000; $wyn = zapytanie('SELECT short FROM languages;'); while($linia = pobierz($wyn)) { if((strpos(strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), strtolower($linia['short'])) >= 0) && (strpos(strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), strtolower($linia['short'])) < $najp)) { $najp = strpos(strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), strtolower($linia['short'])); $najl = $linia['short']; } } zwolnij($wyn); if($najl == null) { $wyn = zapytanie('SELECT value FROM config WHERE name = \'default_language\';'); $linia = pobierz($wyn); zwolnij($wyn); $najl = $linia['value']; } $_SESSION['jezyk'] = $najl; } if($_GET['p'] != null) { if(!eregi('^[[:alnum:]]{1,10}$', $_GET['p'])) { die('
' . Bad_parameter . ' p.
'); } else { $sql1 = zapytanie("SELECT id FROM users WHERE login='".(string)$_GET['p']."' limit 1"); $row1 = pobierz($sql1); if($row1['id'] != null){ $_GET['p'] = $row1['id']; $_SESSION['p'] = $_GET['p']; setcookie('p', $_GET['p'], time() + 604800); } header('HTTP/1.1 301 Moved Permanently'); header('Location: http://www.linkorn.pl/'); } } $lang = 'lang/' . $_SESSION['jezyk'] . '/'; $lang2 = $_SESSION['jezyk']; require('inc/functions.php'); require($lang . 'lang.php'); if(($_GET['id'] == 'signin') || ($_GET['id'] == 'signinas')) { require('inc/signin.php'); } elseif($_GET['id'] == 'logout') { require('inc/logout.php'); } require($lang . 'main2.php'); echo ''; rozlacz(); ?>