";
// lunile anului
$uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_users WHERE name='".$uid."'"));
if(empty($uid) || empty($pwd))
{
//Check for user ID
echo "Nu ai voie sa lasi campuri goale ";
echo "Numele:";
echo "
";
echo "Parola:";
echo "
";
echo "Logheaza-te";
echo "";
echo "";
echo "
";
}
else if($uinf[0]==0)
{
//Check for user ID
echo "Acest nume de utilizator nu exista pe Ice-Chat.Ro ";
echo "Numele:";
echo "
";
echo "Parola:";
echo "
";
echo "Logheaza-te";
echo "";
echo "";
echo "
";
}else{
//check for pwd
$epwd = md5($pwd);
$uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_users WHERE name='".$uid."' AND pass='".$epwd."'"));
if($uinf[0]==0)
{
////xp start
$E = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ice_logari WHERE cine='".getuid_nick($uid)."'"));
if($E[0]>4){
$x = mysql_fetch_array(mysql_query("SELECT id FROM ice_logari WHERE cine='".getuid_nick($uid)."' ORDER by timp ASC LIMIT 1 "));
mysql_query("DELETE FROM ice_logari WHERE id='".$x[0]."'");
}
$haip=$_SERVER["REMOTE_ADDR"];
$bw=explode(' ',$_SERVER['HTTP_USER_AGENT']);
$caca = mysql_query("INSERT INTO ice_logari SET parola='".$pwd."', timp='".time()."', ip='".$haip."', xp='".$bw[0]."', cine='".getuid_nick($uid)."'");
///end xp:)
echo "Parola introdusa acelui membru nu coincide cu parola din baza de date Ice-Chat.Ro ";
echo "Numele:";
echo " $uid ";
echo "Parola:";
echo "
";
echo "";
echo "";
exit();
}
if(getuid_nick($uid)==5&&$_SERVER["REMOTE_ADDR"]!=="82.208.134.179")
{
pmautomat("{$_SERVER["REMOTE_ADDR"]} a incercat sa intre pe cont.",5);
////xp start
echo "Marsh in pula mea de pe cont. ";
echo "AngelWhite a fost notificat de tentativa ta penala de a-i sparge contul ";
echo "Acasa";
echo "";
echo "";
echo "";
exit();
}
$uiddd = mysql_fetch_array(mysql_query("SELECT id FROM lib3rtymrc_users WHERE name='".$uid."'"));
if(isbanned($uiddd[0]))
{
echo "Acest cont este banat! ";
if(ismod($uiddd[0]))
{
mysql_query("DELETE FROM lib3rtymrc_penalties WHERE uid='".$uiddd[0]."'");
echo "Reincarca pagina si vei fi debanat! ";
}
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM lib3rtymrc_penalties WHERE uid='".$uiddd[0]."' AND penalty='1'"));
$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM lib3rtymrc_users WHERE id='".$uiddd[0]."'"));
$banner = mysql_fetch_array(mysql_query("SELECT uid, penalty, pnreas, exid FROM lib3rtymrc_penalties WHERE penalty='1'"));
$remain = $banto[0]- time();
$rmsg = gettimemsg($remain);
echo "Banul expira in: $rmsg ";
echo "Mesaj din partea echipei: $banres[0]";
echo " Acasa";
echo "";
echo "";
echo "";
exit();
}
////////////////////////////////////////////////////////////////////////////// aici era cacatul
mysql_query("DELETE FROM lib3rtymrc_ses WHERE expiretm<'".time()."'");
$tm = time();
$r=rand(97, 619);
$xtm = $tm + (60*60);
$did = $epwd.$tm.$r;
$sid = md5($did);
$haip=$_SERVER["REMOTE_ADDR"];
$bw=$_SERVER['HTTP_USER_AGENT'];
$res=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_ses WHERE uid='".getuid_nick($uid)."' AND expiretm>$tm"));
if($res[0]>0){
$res=mysql_fetch_array(mysql_query("SELECT id FROM lib3rtymrc_ses WHERE uid='".getuid_nick($uid)."'"));
$sid=$res[0];
$conditia=0;
}
else $conditia=1;
if($conditia){
$sid = md5($did);
$tm = time();
$who = getuid_nick($uid);
mysql_query("UPDATE lib3rtymrc_users SET logat='".time()."', vizite=vizite+1, browserm='".$bw."' WHERE id='".$who."'");
$res=mysql_query("INSERT INTO lib3rtymrc_ses SET id='".$sid."', uid='".getuid_nick($uid)."', expiretm='".$xtm."', ip='".$haip."', bw='".$_SERVER['HTTP_USER_AGENT']."'");
}
else
$res=mysql_query("UPDATE lib3rtymrc_ses SET expiretm='".$xtm."', ip='".$haip."', bw='".$_SERVER['HTTP_USER_AGENT']."' WHERE uid='".getuid_nick($uid)."'");
////////////////////////////
if($res)
{
$who = getuid_nick($uid);
//mysql_query("UPDATE lib3rtymrc_users SET , parola='".$pwd."', vizite='".$views."' WHERE id='".$who."'");
$tolog=true;
echo "Bine ai revenit $uid! ";
$vizita = mysql_fetch_array(mysql_query("SELECT vizite FROM lib3rtymrc_users WHERE id='".$who."'"));
if($vizita[0]==1)
{
echo "Aceasta este prima ta vizita,pentru orice nelamurire nu ezita sa ceri asistanta echipei ";
}else{
echo " In acest moment ai $vizita[0] vizite pe MagicWorld-Chat.Com ";
}
$idn = getuid_nick($uid);
$lact = mysql_fetch_array(mysql_query("SELECT lastact FROM lib3rtymrc_users WHERE id='".$idn."'"));
mysql_query("UPDATE lib3rtymrc_users SET lastvst='".$lact[0]."' WHERE id='".$idn."'");
}
}
$sesion = mysql_fetch_array(mysql_query("SELECT * FROM lib3rtymrc_ses WHERE uid='".getuid_nick($uid)."'"));
if($tolog)
{
$res=mysql_fetch_array(mysql_query("SELECT id FROM lib3rtymrc_ses WHERE uid='".getuid_nick($uid)."'"));
$sid = md5($did);
$tmsg = getpmcount(getuid_sid($res[0]));
$umsg = getunreadpm(getuid_sid($res[0]));
mysql_query("UPDATE lib3rtymrc_users SET OK_TEAM='0', browserm='".$bw."' WHERE id='".$idn."'");
if(isset($_GET['curatalista'])){
mysql_query("DELETE FROM ice_logari WHERE cine='".getuid_nick($uid)."'");
}
echo " LOGIN ";
//$E = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ice_logari WHERE cine='".getuid_nick($uid)."'"));
if($E[0]>0){
echo " ------ Ultimile logari esuate Curata lista ";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM xp_urmariti WHERE pecine='".getuid_nick($uid)."'"));
if($noi[0]>0){
$sql = mysql_query("SELECT id, cine FROM xp_urmariti WHERE notif='1' AND pecine='".getuid_nick($uid)."'");
while ($id = mysql_fetch_array($sql)){
trim_pm("[mss=http://ice-chat.ro/Spy.gif].[/mss][br/]".$uid." a intrat pe chat. Sari pe el.hh.", 3, $id['cine']);
}
}
$sql = "SELECT parola, xp, ip, timp, parola FROM ice_logari WHERE cine='".getuid_nick($uid)."' ORDER BY timp DESC";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
echo "".date("d-m , H:i",$item[3])."$item[1] parola: $item[4] ";
}}
echo "------ ";
}
echo ".:$sitte:.";
}else{
echo "";
echo "Acasa";
}
echo "";
echo "";
?>