How to make the user may enter only with a browser .. If you try to get another browser to escape his notice that his nik protected and may enter default browser that is marked as the default..... I tried to do this .. but not work
the SQL users I have added zastita CHAR 1..
to index.php
to login.php
So if I protect my nick with the browser and if someone try a different browser to enter my nick, he can not allow input...
the SQL users I have added zastita CHAR 1..
to index.php
Code:
else if($action=="zastita"){ addonline(getuid_sid($sid),"HAPPY","index.php?action=$action"); $pstyle = gettheme($sid); echo xhtmlhead("HAPPY",$pstyle); echo "<p align=\"center\">"; $userwa = $uid; $zastita = mysql_fetch_array(mysql_query("SELECT zastita FROM ibwf_users WHERE id = '".$userwa."'")); if($zastita[0]==0){ mysql_query("UPDATE ibwf_users SET zastita=1 WHERE id=$userwa"); echo "Protection of your browser is activated.<br/>"; } else if($zastita[0]==1){ mysql_query("UPDATE ibwf_users SET zastita=0 WHERE id=$userwa"); echo "Protection of yout browser is inactive.<br/>"; } $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'")); $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'")); echo "<img src=\"http://coding-talk.com/images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/> <a href=\"index.php?action=main&sid=$sid\">"; echo "HAPPY</a>"; echo "</p>"; echo xhtmlfoot(); }
Code:
$zastita = mysql_fetch_array(mysql_query("SELECT zastita FROM ibwf_users WHERE name='".$uid."' AND browserm='".$brws."'")); if($zastita[0]==1){ return true; }else{ $uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$uid."'")); if($uinf[0]==0) { //Check for user ID echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"X\"/>Nik ne postoji<br/><br/>"; }else{ //check for pwd $epwd = ($pwd); $uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$uid."' AND pass='".$epwd."'")); if($uinf[0]==0) { echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"X\"/>pogresna lozinka<br/><br/>"; }else{ $tm = (time() - $timeadjust) ; $xtm = $tm + (getsxtm()*60); $did = $uid.$tm; $res = mysql_query("INSERT INTO ibwf_ses SET id='".($did)."', uid='".getuid_nick($uid)."', expiretm='".$xtm."'"); if($res) { $tolog=true; $sesx = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online")); echo "Na online je: <a href=\"index.php?action=online2\">$sesx[0]</a> Forumasa<br/>"; echo "<b>Uspesan login</b>!<br/>Pozdrav <b>$uid</b><br/>"; echo "<img src=\"http://coding-talk.com/images/see_down.gif\" alt=\"*\"/><br/>"; include "clock/include.php"; echo "<br/>"; $idn = getuid_nick($uid); $lact = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$idn."'")); mysql_query("UPDATE ibwf_users SET lastvst='".$lact[0]."' WHERE id='".$idn."'"); mysql_query("UPDATE ibwf_users SET lastact='".(time() - $timeadjust)."' WHERE id='".$idn."'"); }else{ //is user already logged in? $logedin = mysql_fetch_array(mysql_query("SELECT (*) FROM ibwf_ses WHERE uid='".$getuid_nick($uid)."'")); if($logedin[0]>0) { //yip, so let's just update the expiration time $xtm = (time() - $timeadjust) + (getsxtm()*60); $res = mysql_query("UPDATE ibwf_ses SET expiretm='".$xtm."' WHERE uid='".getuid_nick($uid)."'"); if($res) { $tolog=true; //echo "Bookmark THIS page to avoid repeating the login proccess in the future<br/><br/>"; echo "<b>Uspesan login!<br/>Pozdrav <b>$uid</b><br/>"; }else{ echo "<img src=\"http://coding-talk.com/images/point.gif\" alt=\"!\"/>Nemoguce logovanje, pokusaj kasnije<br/>"; //no chance this could happen unless there's error in mysql connection } } } } } if($tolog) { $sid = ($did); echo "<br/><a href=\"index.php?action=main&sid=$sid\">"; echo "<b>Udji i budi HAPPY</b></a><br/><br/>"; echo "<img src=\"http://coding-talk.com/images/str1.gif\" alt=\"!\"/> <a href=\"index.php?action=sexclub&sid=$sid\">18+ Club</a> <img src=\"http://coding-talk.com/images/str2.gif\" alt=\"!\"/><br/><br/>"; echo "<b>Za laksi ulaz na forum skini</b><br/>"; echo "<a href=\"http://www.opera.com/mini/download/generic/generic_advanced_midp_2/\">OPERU MINI</a><br/>"; echo "Sacuvaj ovu stranicu kako bi izbegao/la stalno logovanje.<br/>"; }else{ echo "<br/><a href=\"index.php\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>"; echo "HAPPY</a><br/><br/>"; } return false; }
Comment