Example #1
0
<results>
	<rs>foo</rs>
	<rs>bar</rs>
</results>
*/
@session_start();
include "../../conf.php";
checkLoginLang(true, true, "test2.php");
if (!check_source()) {
    die("<font id='hata'>{$metin['295']}</font>");
}
$taraDili = isset($_COOKIE["lng"]) ? $_COOKIE["lng"] : "";
if (!($taraDili == "TR" || $taraDili == "EN")) {
    $taraDili = "EN";
}
dilCevir($taraDili);
$aUsers = array();
$aID = array();
$aInfo = array();
$result = mysql_query("select realName from eo_users order by id");
for ($i = 0; $sonuc = mysql_fetch_assoc($result); $i++) {
    $aUsers[$i] = iconv("ISO-8859-9", "UTF-8", temizle(htmlentities($sonuc["realName"])));
}
$result = mysql_query("select id from eo_users order by id");
for ($i = 0; $sonuc = mysql_fetch_assoc($result); $i++) {
    $aID[$i] = iconv("ISO-8859-9", "UTF-8", temizle(htmlentities($sonuc["id"])));
}
$result = mysql_query("select userName from eo_users order by id");
for ($i = 0; $sonuc = mysql_fetch_assoc($result); $i++) {
    $aInfo[$i] = iconv("ISO-8859-9", "UTF-8", temizle(htmlentities($sonuc["userName"])));
}
Example #2
0
function checkLoginLang($lgn, $lng, $src)
{
    global $metin;
    global $adi;
    global $taraDili;
    global $_defaultLang;
    if ($lng) {
        $taraDili = isset($_COOKIE["lng"]) ? $_COOKIE["lng"] : "";
        if (!($taraDili == "TR" || $taraDili == "EN")) {
            $taraDili = $_defaultLang;
        }
        dilCevir($taraDili);
    }
    if ($lgn) {
        $adi = temizle(substr(isset($_SESSION["usern"]) ? $_SESSION["usern"] : "", 0, 15));
        $par = temizle(isset($_SESSION["userp"]) ? $_SESSION["userp"] : "");
        if ($adi == "" || $par == "") {
            //EMPTY?
            @header("Location: error.php?error=2");
            die("<font id='hata'> " . $metin[403] . "</font><br/>" . $metin[402]);
        }
        $tur = checkRealUser($adi, $par);
        if ($tur <= -1 || $tur > 2) {
            sessionDestroy();
            @header("Location: error.php?error=7");
            die("<font id='hata'> " . $metin[404] . " (0)</font><br/>" . $metin[402]);
        } else {
            $_SESSION["tur"] = $tur;
            $_SESSION["usern"] = $adi;
            $_SESSION["userp"] = $par;
        }
    }
    if (!empty($src)) {
        currentFileCheck($src);
    }
}