Location: PHPKode > scripts > OekakiPoteto > oekakipoteto/online.php
<?

/* 
Who's Online Module for OekakiPoteto v3
by RanmaGuy (Theo Chakkapark)
with assistance from Marcello (http://www.cellosoft.net)
http://suteki.nu
hide@address.com 
*/

function check_location($c) { 
global $usrflags; 
return is_integer(strpos($usrflags,$c)); 
}

$loc = "View";
if (strstr($SCRIPT_NAME,"editnews.php")){
	$loc = $langop_enews_title;
}

if (strstr($SCRIPT_NAME,"noteBBSa.php")){
	$loc = $langop_online_aninbbs;
}

if (strstr($SCRIPT_NAME,"chat.php")){
	$loc = $langop_word_chat;
}

if (strstr($SCRIPT_NAME,"index.php")){
	$loc = $langop_word_view;
}

if (strstr($SCRIPT_NAME,"comment.php")){
	$loc = $langop_word_commenting;
}

if (strstr($SCRIPT_NAME,"oekakiBBS.php")){
	$loc = $langop_online_nmrlobbs;
}

if (strstr($SCRIPT_NAME,"oekakiBBSa.php")){
	$loc = $langop_online_aniobbs;
}

if (strstr($SCRIPT_NAME,"arecover.php")){
	$loc = $langop_online_apicr;
}

if (strstr($SCRIPT_NAME,"editnotice.php")){
	$loc = $langop_enotice_title;
}

if (strstr($SCRIPT_NAME,"paintBBS.php")){
	$loc = $langop_online_npaintbbs;
}

if (strstr($SCRIPT_NAME,"noteBBS.php")){
	$loc = $langop_online_palpaintbbs;
}

if (strstr($SCRIPT_NAME,"memberlist.php")){
	$loc = $langop_mlist_title;
}

if (strstr($SCRIPT_NAME,"faq.php")){
	$loc = $langop_word_faq;
}

if (strstr($SCRIPT_NAME,"editprofile.php")){
	$loc = $langop_eprofile_title;
}

if (strstr($SCRIPT_NAME,"ldelpics.php")){
	$loc = $langop_header_epics;
}

if (strstr($SCRIPT_NAME,"lcommentdel.php")){
	$loc = $langop_header_ecomm;
}

if (strstr($SCRIPT_NAME,"addusr.php")){
	$loc = $langop_header_vpending;
}

if (strstr($SCRIPT_NAME,"modflags.php")){
	$loc = $langop_niftytoo_permissions;
}

if (strstr($SCRIPT_NAME,"recover.php")){
	$loc = $langop_picrecover_title;
}

if (strstr($SCRIPT_NAME,"delpics.php")){
	$loc = $langop_header_dpics;
}

if (strstr($SCRIPT_NAME,"delcomments.php")){
	$loc = $langop_header_dcomm;
}

if (strstr($SCRIPT_NAME,"banlist.php")){
	$loc = $langop_header_banlist;
}

if (strstr($SCRIPT_NAME,"cpanel.php")){

	$loc = $langop_header_cpanel;
}

if (strstr($SCRIPT_NAME,"tdesign.php")){
	$loc = $langop_header_tdesign;
}

if (strstr($SCRIPT_NAME,"tedit.php")){
	$loc = $langop_header_tdesign;
}

if (strstr($SCRIPT_NAME,"tedita.php")){
	$loc = $langop_header_tdesign;
}

if (strstr($SCRIPT_NAME,"tnewa.php")){
	$loc = $langop_header_tdesign;
}

if (strstr($SCRIPT_NAME,"tnew.php")){
	$loc = $langop_header_tdesign;
}

//User is on OekakiPoteto; check if present on table
 
$online = mysql_query("UPDATE ".$OekakiPoteto_MemberPrefix."oekakionline SET onlinetime=NOW(), locale='$loc' WHERE onlineusr = '$OekakiU'");

if ((!mysql_affected_rows()) && isset($OekakiU)) {
$online = mysql_query("INSERT INTO ".$OekakiPoteto_MemberPrefix."oekakionline SET onlineusr='$OekakiU', onlinetime=NOW(), onlineIP='$REMOTE_ADDR', locale='$loc', onlineboard='$BBStitle'");
}

$online = mysql_query("DELETE FROM ".$OekakiPoteto_MemberPrefix."oekakionline WHERE (DATE_ADD(onlinetime,INTERVAL 15 MINUTE) < NOW())");

if($loc != $langop_word_chat){
$online = mysql_query("DELETE FROM ".$OekakiPoteto_MemberPrefix."oekakionline WHERE (DATE_ADD(onlinetime,INTERVAL 1 MINUTE) < NOW()) AND locale ='$langop_word_chat'");
}

mysql_error();




?>
Return current item: OekakiPoteto