Location: PHPKode > scripts > OekakiPoteto > oekakipoteto/header.php
<?
function get_microtime() {$mtime = microtime();$mtime = explode(' ',$mtime);return doubleval($mtime[1]) + doubleval($mtime[0]);}
 
$start_time = get_microtime();
/* OekakiPoteto is Copyright (C) Theo Chakkapark 2001-2002. Modification to the files are permitted as long as my name remains on the files */

//IP Banning
include('dbconn.php');

if(isset($OekakiU)) {
	$testrslt = mysql_query("SELECT usrname, language, usrpass, templatesel, usrflags, picview FROM ".$OekakiPoteto_MemberPrefix."oekaki WHERE usrname='$OekakiU'");
	$tresult = mysql_affected_rows();

	if($tresult != 0) {
		$row = mysql_fetch_array($testrslt);	

		$uflags = $row[usrflags];
		//check if passwords are correct and that the user is a non-pending member
		
		if (($OekakiPass != $row[usrpass]) || !strstr($row[usrflags],"G")) {
			$OekakiU = "";
			$OekakiPass = "";
		} else {
			//update last login
			$testrslt = mysql_query("UPDATE ".$OekakiPoteto_MemberPrefix."oekaki SET lastlogin = NOW() WHERE usrname = '$OekakiU'");
		} 
	} else {
		$OekakiU = "Please logout. This is an invalid account.";
		$OekakiPass = "";
	}
}
include('niftytoo.php');
include('banscript.php');	
include('config.php');

if(($OekakiU == "") || ($tresult==0)){
	include("language/".$language.".php");
	} else {
	include("language/".$row[language].".php");
}



include('online.php');

?>
<head>
<title><?=$BBStitle?> - OekakiPoteto</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>">
<meta name="description" content="Start your own online artist community with OekakiPoteto - an extension script to two popular online paint programs, OekakiBBS and PaintBBS.">
<meta name="keywords" content="theo, chakkapark, ranmaguy, chakkaphak, oekaki, poteto, suteki.nu, suteki, oekakiBBS, paintBBS, community, php, mysql, art, drawing, cg, anime, marcello bastea-forte,draw, theo chakkapark, theo chakkaphak">




<? 
if($OekakiU == "" || ($tresult==0)){





	include("templates/".$template.".php");
	} else {
	include("templates/".$row[templatesel].".php");
	$display = $row[picview];
}


?>

<script language="JavaScript">
<!--

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
// -->
<!--
//-->

<!--
  function openWindow(url, w, h) {
    var options = "width=" + w + ",height=" + h + ",";
    options += "resizable=yes,scrollbars=yes,status=no,";
    options += "menubar=no,toolbar=no,location=no,directories=no";
    var newWin = window.open(url, 'newWin', options);
    newWin.focus();
  }
//-->

<!--
  function openOnline(url, w, h) {
    var options = "width=" + w + ",height=" + h + ",";
    options += "resizable=yes,scrollbars=yes,status=no,";
    options += "menubar=no,toolbar=no,location=no,directories=no";
    var newWin = window.open(url, 'newOl', options);
    newWin.focus();
  }
//-->

<!--
  function openChat(url, w, h) {
    var options = "width=" + w + ",height=" + h + ",";
    options += "resizable=yes,scrollbars=yes,status=no,";
    options += "menubar=no,toolbar=no,location=no,directories=no";
    var newWin = window.open(url, 'chatWin', options);
    newWin.focus();
  }

function MM_showHideLayers() { //v6.0


  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>
</head>

<body bgcolor="<?=$bgColor?>" text="<?=$textColor?>" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="templates/<?=$bgImage?>" link="<?=$link?>" vlink="<?=$vLink?>" alink="<?=$aLink?>">
<table width="100%" border="0" cellspacing="0" cellpadding="2" class="menubar">
<?

//user killing

if($killuser != "-1"){
	
	if($row2[killrows] == 0){
		//kill users if there is not a result
			$usrkill = mysql_query("SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekaki WHERE (DATE_ADD(lastlogin,INTERVAL ".$killuser." DAY) <= NOW()) AND (usrflags NOT LIKE '%I%')");
			while($row2 = mysql_fetch_array($usrkill)){
				$usrdel = mysql_query("DELETE FROM ".$OekakiPoteto_MemberPrefix."oekakionline where onlineusr = '$row2[usrname]'");
				$usrdel = mysql_query("DELETE FROM ".$OekakiPoteto_Prefix."oekakidta where usrname = '$row2[usrname]'");
				$usrdel = mysql_query("DELETE FROM ".$OekakiPoteto_Prefix."oekakicmt where usrname = '$row2[usrname]'");
				$usrdel = mysql_query("DELETE FROM ".$OekakiPoteto_MemberPrefix."oekakichat where usrname = '$row2[usrname]'");
				mail ($row2[email], $BBStitle." ".$langop_kill_title,$langop_word_dear." ".$row2[usrname].",\n\n".$langop_kill_p1." ".$BBStitle." @ ".$okurl." ".$langop_kill_p2." ".$killuser." ".$langop_kill_p6." ".$BBStitle." @ ".$okurl.".\n\n".$langop_kill_p3."\n\n".$langop_kill_p4."\n\n".$langop_word_sincerely.",\n".$langop_kill_p5."\n\nGet your own OekakiPoteto: http://suteki.nu\nOekakiPoteto is © 2001 - 2002 RanmaGuy (Theo Chakkapark) and Marcello.", "From: \"OekakiPoteto Admin\" <$eaddr>\nX-Mailer: OekakiPoteto v5.x by RanmaGuy (Theo Chakkapark) and Marcello\n");
				$usrdel = mysql_query("DELETE FROM ".$OekakiPoteto_MemberPrefix."oekaki where usrname = '$row2[usrname]'");
			}
		//update the oekakikill
	}
}
?>

  <tr> 
    <td><b> 

      <?=$BBStitle?>
      -</b> <a href="#" onMouseOver="MM_showHideLayers('view','','show','draw','','hide','login2','','hide','admin','','hide','stats','','hide','search','','hide','chat','','hide')"><?=$langop_word_view?></a> 
      | <a href="#" onMouseOver="MM_showHideLayers('view','','hide','draw','','hide','login2','','hide','admin','','hide','stats','','hide','search','','show','chat','','hide')"><?=$langop_word_search?></a> 
      | <a href="faq.php" onMouseOver="MM_showHideLayers('view','','hide','draw','','hide','login2','','hide','admin','','hide','stats','','hide','search','','hide','chat','','hide')"> 
      <?=$langop_word_faq?></a> | 
      <? $chatonline = mysql_query("SELECT onlineusr FROM ".$OekakiPoteto_MemberPrefix."oekakionline WHERE locale='chat'"); $chatrows = mysql_numrows($chatonline);?>
      <a href="#" onClick="openChat('chatbox.php', 500, 300); return false" onMouseOver="MM_showHideLayers('view','','hide','draw','','hide','login2','','hide','admin','','hide','stats','','hide','search','','hide','chat','','show')"> 
      <?=$langop_word_chat?></a> (<?=$chatrows;?>) | <a href="#" onClick="openOnline('whosonline.php', 350, 400); return false" onMouseOver="MM_showHideLayers('view','','hide','draw','','hide','login2','','hide','admin','','hide','stats','','show','search','','hide','chat','','hide')"><?=$langop_word_online?></a> 
      <? $whoonline = mysql_query("SELECT onlineusr FROM ".$OekakiPoteto_MemberPrefix."oekakionline"); $onlinerows = mysql_numrows($whoonline);?>
      (<?=$onlinerows?>) <?if($OekakiU){ $readmail = mysql_query("SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekakimailbox where reciever = '$OekakiU' and mstatus=0"); $mailrows = mysql_numrows($readmail);?>| <a href="mailbox.php"><?=$langop_word_mailbox?></a> (<?=$mailrows?>)  <?}?>|
      <? if (!isset($OekakiU)) { ?>
      <a href="register.php" onMouseOver="MM_showHideLayers('view','','hide','draw','','hide','login2','','hide','admin','','hide','stats','','hide','search','','hide','chat','','hide')"><?=$langop_word_register?></a> 
      | <a href="#" onMouseOver="MM_showHideLayers('view','','hide','draw','','hide','login2','','show','admin','','hide','stats','','hide','search','','hide','chat','','hide')"><?=$langop_install_login?></a> 
      <?} else { 


	$result = mysql_query("SELECT usrname, usrflags FROM ".$OekakiPoteto_MemberPrefix."oekaki WHERE usrname='$OekakiU'");
	@extract(mysql_fetch_array($result));
?>
      <a href="#" onMouseOver="MM_showHideLayers('view','','hide','draw','','hide','login2','','hide','admin','','show','stats','','hide','search','','hide','chat','','hide')"><?=$langop_word_administration?></a> 
      | 
      <?
if (strstr($usrflags,"D")) { ?>
      <a href="#" onMouseOver="MM_showHideLayers('view','','hide','draw','','show','login2','','hide','admin','','hide','stats','','hide','search','','hide','chat','','hide')"><?=$langop_word_draw?></a> 
      | 
      <?} ?>
      <a href="functions.php?mode=logoff" onClick="MM_showHideLayers('view','','hide','draw','','hide','login2','','hide','admin','','hide','stats','','hide','search','','hide','chat','','hide')"><?=$langop_word_logoff?></a> 
      <?}?>
    </td>
    <td> 
      <div align="right"><?if (isset($OekakiU)) { ?> <?=$langop_common_loggedin?> <b> 

        <?=$OekakiU?></b><? } else { ?> <?=$langop_common_loggedin?> <b><?=$langop_word_guest?></b> <? } ?>
         </div>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td> 
      <div id="view" style="position:absolute; height:15px; z-index:1; top: 21px; left: 3px; visibility: hidden; width: 638px;" class="submenu"> 
        <b><?=$langop_word_view?></b> &raquo; <a href="#" onClick="openWindow('news.php', 500, 300); return false"> 
        <?=$langop_word_news?></a> | <?=$langop_word_drawings?>: <a href="index.php?sort=0&pageno=0"><?=$langop_word_date?></a> / <a href="index.php?sort=1&pageno=0"><?=$langop_word_comments?></a> 
        | <?=$langop_word_animations?>: <a href="index.php?sort=2&pageno=0"><?=$langop_word_date?></a> / <a href="index.php?sort=3&pageno=0"><?=$langop_word_comments?></a> 
        | <?=$langop_word_archives?>: <a href="index.php?sort=4&pageno=0"><?=$langop_word_date?></a> / <a href="index.php?sort=5&pageno=0"><?=$langop_word_comments?></a> 
      </div>
      <div id="draw" style="position:absolute; height:15px; z-index:1; top: 21px; left: 3px; visibility: hidden" class="submenu"><b><?=$langop_word_draw?></b> 
        &raquo; <?=$langop_word_oekakibbs?>: <a href="oekakiBBS.php?xcord=<?=$xDefault?>&ycord=<?=$yDefault?>&axcord=<?=$xDefault+ 425?>&aycord=<?=$yDefault+ 300?>"><?=$langop_word_normal?></a> <? if (strstr($usrflags,'M')) {?> /  <a href="oekakiBBSa.php?xcord=<?=$xDefault?>&ycord=<?=$yDefault?>&axcord=<?=$xDefault+ 425?>&aycord=<?=$yDefault+ 300?>"><?=$langop_word_animated?></a><?}?> | <?=$langop_word_paintbbs?>: <a href="paintBBS.php?xcord=<?=$xDefault?>&ycord=<?=$yDefault?>&axcord=<?=$xDefault+ 150?>&aycord=<?=$yDefault+ 200?>">Normal</a> /  <a href="noteBBS.php?xcord=<?=$xDefault?>&ycord=<?=$yDefault?>&axcord=<?=$xDefault+ 150?>&aycord=<?=$yDefault+ 200?>"><?=$langop_word_paletted?></a> <? if (strstr($usrflags,'M')) {?> / <a href="noteBBSa.php?xcord=<?=$xDefault?>&ycord=<?=$yDefault?>&axcord=<?=$xDefault+ 150?>&aycord=<?=$yDefault+ 200?>"><?=$langop_word_animated?></a><?}?></div>

<div id="login2" style="position:absolute; height:15px; z-index:1; top: 21px; left: 3px; visibility: hidden" class="submenu"><form name="form1" method="post" action="functions.php"> <b><?=$langop_install_login?></b> &raquo; <?=$langop_word_name?>: <input type="text" name="username" class="txtinput"> <?=$langop_install_password?>: <input type="password" name="pass" class="txtinput"> <input type="submit" name="login" value="Login" class="submit"> <a href="lostpass.php"><?=$langop_header_rpass?></a></form>
</div>

      <div id="admin" style="position:absolute;  height:15px; z-index:1; top: 21px;left: 3px; visibility: hidden" class="submenu"><b><?=$langop_word_administration?></b> 
        &raquo; <a href="editprofile.php"><?=$langop_word_profile?></a> 
        <? if (strstr($usrflags,'D')) {?>
        | <?=$langop_word_local?>: <a href="ldelpics.php"><?=$langop_header_epics?></a> / <a href="lcommentdel.php"><?=$langop_header_ecomm?></a> / <a href="recover.php"><?=$langop_header_rpics?></a>
        <? } if (strstr($usrflags,'O') || strstr($usrflags,'S') || strstr($usrflags,'A')) { ?>
       | Global: <a href="delpics.php"><?=$langop_header_dpics?></a> / <a href="delcomments.php"><?=$langop_header_dcomm?></a> / <a href="addusr.php"><?=$langop_header_vpending?></a> / <a href="modflags.php"><?=$langop_niftytoo_permissions?></a> / <a href="arecover.php"><?=$langop_header_rapic?></a> / <a href="editnews.php"><?=$langop_enews_title?></a> / <a href="editnotice.php"><?=$langop_enotice_title?></a> / <a href="banlist.php"><?=$langop_header_banlist?></a> / <a href="tdesign.php"><?=$langop_header_tdesign?></a> / <a href="#" onClick="openWindow('versionchk.php', 300, 125); return false"><?=$langop_header_chkvrsn?></a> <? } if (strstr($usrflags,'O')) { ?> / <a href="cpanel.php"><?=$langop_header_cpanel?></a> / <a href="massmail.php"><?=$langop_header_sendall?></a> <? } if (strstr($usrflags,'O') || strstr($usrflags,'S')){?> / <a href="delusr.php"><?=$langop_common_delusr?></a> <? } ?>
        
      </div>
      <div id="chat" style="position:absolute;  height:15px; z-index:1; top: 21px;left: 3px; visibility: hidden" class="submenu"></div>
      <div id="search" style="position:absolute; height:15px; z-index:1; top: 21px; left: 3px; visibility: hidden; width: 400px;" class="submenu"> 
        <form name="form1" method="put" action="index.php">
          <b><?=$langop_word_search?></b> &raquo;  <a href="memberlist.php"><?=$langop_word_memberlist?></a> | <?=$langop_word_artist?>: 
          <input name="artist" type="text" class="txtinput" id="artist">
          <input name="sortartist2" type="submit" class="submit" id="sortartist2" value="Go"></form>
      </div>
      <div id="stats" style="position:absolute; height:15px; z-index:1; top: 21px; left: 3px; visibility: hidden;" class="submenu"> 
      </div></td>

  </tr>
</table>
Return current item: OekakiPoteto