Lavalair updates made by Andrew haswell owner of www.madfonez.com


add theses tables to ibwf users
`setmood` varchar(100) NOT NULL default '',
`pass2` varchar(60) NOT NULL,

and add this to index.php

else if($action=="mood")
{
    echo "<head>";
    echo "<title>Set OnlineList Mood</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/style.css\">";
    echo "</head>";
    echo "<body>";
    echo "<p align=\"center\">";
        $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    $uid = getuid_sid($sid);
echo "<form action=\"genproc.php?action=upmood&amp;sid=$sid\" method=\"post\">";
        echo "SET MOOD TO:<br/><input name=\"mmsg\" maxlength=\"30\"/><br/>";
    echo "<input type=\"Submit\" name=\"submit\" Value=\"Submit\"></form>";
    echo "</p>";
    echo "<p align=\"center\">";
  echo "<a href=\"home.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
    echo "</p>";
    echo "</body>";
}

now add this page to genproc.php

else if($action=="upmood")
{
     addonline(getuid_sid($sid),"Updating My Mood","");
$mmsg = $_POST["mmsg"];
     
      echo "<head>";
    echo "<title>Set OnlineList Mood</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/style.css\">";
    echo "</head>";
    echo "<body>";
    echo "<p align=\"center\">";
       $res = mysql_query("UPDATE ibwf_users SET setmood='".$mmsg."' WHERE id='".$uid."'");
  if($res)
        {
            echo "<img src=\"images/ok.gif\" alt=\"o\"/>Mood updated successfully<br/>";
        }else{
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>Can't update your Mood<br/>";
        } 
    echo "<a href=\"home.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
    echo "</body>";
}

now add this to your online list in index.php

else if($action=="online")
{
$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
  addonline(getuid_sid($sid),"Xhtml-$mmsg","index.php?action=online");
    echo "<head>";
    echo "<title>Online List</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/style.css\">";
    echo "</head>";
    echo "<body>";
echo "<p align=\"center\">";
    echo "<img src=\"images/onlinelist.gif\" alt=\"Online List\"/>";
echo "<h1><center>ONLINE LIST</center></h1>";
  echo popup($sid);
  //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    $num_items = getnumonline(); //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if($page>$num_pages)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    //changable sql
    $sql = "SELECT
            a.name,a.perm, b.place, b.userid FROM mad_users a
            INNER JOIN mad_online b ON a.id = b.userid
            GROUP BY 1,2
            LIMIT $limit_start, $items_per_page
    ";
  echo "<p align=\"center\">";
    $items = mysql_query($sql);
    echo mysql_error();
    while ($item = mysql_fetch_array($items))
    {
        if($item[1]=='0')
        {
          $tit = "";
        }if($item[1]=='1')
        {
          $tit = "&#179;";
        }if($item[1]=='2')
        {
          $tit = "&#178;";
        } if($item[1]=='3')
        {
          $tit = "&#185;";
        } if($item[1]=='4')
        {
          $tit = "&#186;";
        }

$sex = mysql_fetch_array(mysql_query("SELECT sex FROM mad_users WHERE name='$item[0]'"));
if($sex[0]=="M"){$usersex = "<img src=\"images/male.gif\" alt=\"(M)\"/>";}
if($sex[0]=="F"){$usersex = "<img src=\"images/female.gif\" alt=\"(F)\"/>";}
if($sex[0]==""){$usersex = "";}
if($item[1]>'0')
  {
  $lnk = "$usersex<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$tit$item[0]</a>";
  }else{
  $lnk = "$usersex<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$tit$item[0]</a>";
  }
  echo "$lnk - $item[2] <br/>";
    }
$mmsg1 = parsemsg(getsetmood($item[2]), $sid);
      if(!$mmsg1=="") 
     {
      echo "($mmsg1) - $item[1] ";
      }else{
      echo "  $item[1]<br/>";
      }

    //echo "</p>";
    //echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"index.php?action=online&amp;page=$ppage&amp;sid=$sid\">Prev</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"index.php?action=online&amp;page=$npage&amp;sid=$sid\">Next</a>";
    }
    echo "<br/>$page/$num_pages";
    if($num_pages>2)
    {
    echo getjumper($action, $sid,"index");
    }
    echo "</p>";
  ////// UNTILL HERE >>

  
$nick = getnick_sid($sid);
echo "<p align=\"center\">";
echo "Back To Where $nick";
echo "<hr></hr>";
$tmsg = getpmcount(getuid_sid($sid));
  $umsg = getunreadpm(getuid_sid($sid));
  echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">Inbox($umsg/$tmsg)</a><br/>";
echo "<a href=\"index.php?action=forumindx&amp;sid=$sid\">Forums</a><br/>";
  echo "<a href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a><br/>";
  echo "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a><br/>";
  echo "<a href=\"home.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
echo "<br/><b>&#169;copyright 2007<br/>www.madfonez.com</b><br/>";
  echo "</p>";
  echo "</body>";
}
==========================================
and add this code to your core.php


function getsetmood($uid)
{
   $getdata = mysql_fetch_array(mysql_query("SELECT setmood FROM ibwf_users WHERE id='".$uid."'"));
   return $getdata[0];
   $text = getsmilies($text);
}

============================================
Note :// my permisions are 0 for a user 3  mod, 4 for owner 2 headadmin and so on

also on the updates for all tools just change the dbase fields from mad to ibwf
my updates ip bans anyone who attempts to get in your tools then it reports the attempt to modcp and also inboxes your the log of the attmpt
iv also included my login page with the hacking log code in 2