logout user

Started on the old forum in December 2009 · view the original in the archive · old links redirect here

5 replies · 472 views · started 17 years ago · 1 min read

4 participants
brand Senior · 391 posts #1

hi good coders has any one got or now how to do this please

when a member is logged in and some one else logs in using there info it logs the person what was online first so

eg: jo_blogs: online list

then when some one else logs in as jo_blogs

eg jo_blogs: loggin on

it logs the first one out so

eg jo_blogs: sorry u have been logged out as someone else has signed in with ur name

hope u understand what i mean

and whats to any one that can help i am using wapdesire v_2 script

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

subzero Super moderator Fellow · 3,954 posts #2

do a check online

$check = mysql_fetch_array(mysql_query("SELECT * FROM ibf_online WHERE userid='$_REQUEST' ")); if($check[0]) { echo "You May enter"; }else{ echo "You Cant enter"; }

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

kiLLeR-eyEd_14 Senior · 382 posts #3

This is what i coded in my login.php ..We delete the old session first and then create a new one.,so this time, the one who is online in your acct. will be logged out or session expire while you just logged in..This is also to prevent multiple logins..

if(isonline(getuid_nick($uid)))
{
$deloldses = mysql_query("DELETE FROM ibwf_ses WHERE uid='".getuid_nick($uid)."'");
}
$tm = time();
$xtm = $tm + (getsxtm()*60);
$sid = session_id();
$res = mysql_query("INSERT INTO ibwf_ses SET id='".$sid."', uid='".getuid_nick($uid)."', expiretm='".$xtm."'");
if($res)
{
$tolog = true;
$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()."' WHERE id='".$idn."'");
}else{
echo title($mime,"Error");
echo startalign($mime,"center");
echo "<img src=\"images/notok.gif\" alt=\"x\"/>\n<br/>\nDatabase Error!!!\n";
}
brand Senior · 391 posts #4

kiLLeR-eyEd_14 wrote: This is what i coded in my login.php ..We delete the old session first and then create a new one.,so this time, the one who is online in your acct. will be logged out or session expire while you just logged in..This is also to prevent multiple logins..

if(isonline(getuid_nick($uid)))
{
$deloldses = mysql_query("DELETE FROM ibwf_ses WHERE uid='".getuid_nick($uid)."'");
}
$tm = time();
$xtm = $tm + (getsxtm()*60);
$sid = session_id();
$res = mysql_query("INSERT INTO ibwf_ses SET id='".$sid."', uid='".getuid_nick($uid)."', expiretm='".$xtm."'");
if($res)
{
$tolog = true;
$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()."' WHERE id='".$idn."'");
}else{
echo title($mime,"Error");
echo startalign($mime,"center");
echo "<img src=\"images/notok.gif\" alt=\"x\"/>\n<br/>\nDatabase Error!!!\n";
}

i am after the code for wapdesire v_2 script its the only script i use

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

kiLLeR-eyEd_14 Senior · 382 posts #5

brand wrote: i am after the code for wapdesire v_2 script its the only script i use

just edit it accdg. to ur script..just follow the idea of checking if an acct. is online, delete its session and create new session..No one can do multiple logins in one acct.

evo21 Junior · 15 posts #6

aint the $main.= a spinoff of echo " dont ya just change $main and echo around dnt no never used the wapdesire_v2 but il give it ago 🙂

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close