Lavalair Mods...

Started on the old forum in June 2008 · view the original in the archive · old links redirect here

147 replies · 72,508 views · started 18 years ago · 1 min read

TL;DR · summary of 147 replies
  • -metulj provided a fixed code and usage instructions for the total unread PMs count feature.
  • -Rider added code to display user avatars next to their names in online lists, forums, etc.
  • -The profile moods functionality was discussed by opticalpigion, with a link provided for downloading images.
  • -No specific unresolved issues were mentioned regarding the forum mods.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

48 participants
DiL Developer · 142 posts #81

riderz wrote: DIL there are a code on here for that to show when ppl enter the room

I want a code that will show the users actions like if u make a post or sign gb or what ever it wil show on the main page the last 5 actions

riderz bro, u can make this code easly.... u need to creat an new table in databse in which value comes from the online user.

////////////////////////////////////////MAIN PAGE
if($action=="main")
{
  addvisitor();
  addonline(getuid_sid($sid),"Main","index.php?action=$action");
  //saveuinfo($sid);
  $nick = getnick_sid($sid);
  echo "<head>";
  echo "<title> Hall </title>";
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
  echo "</head>";
 

i have pase here a code in which addonline(getuid_sid($sid),"Main","index.php?action=$action"); is function which use to add user activty on Main page and index.php?action=$action for url of that page

use just need to add this value in new table also....

and after that just creat a new action in index.php page in which 5 actions are shown in a list..

i dont knw m worng or right..!!! but may be u can understand that what i want to say bro....

Be happy 😉

wap_king Developer · 126 posts #82

coolboiz1 wrote: $uid = getuid_sid($sid); $addvhitv = mysql_fetch_array(mysql_query("SELECT visit FROM ibwf_users WHERE id='".$uid."'")); $addv = $addhitv[0] + 1; $addvisit = mysql_query("UPDATE ibwf_users SET visit='".$addv."' WHERE id='".$uid."'");

///ADD THIS WHERE YOU WANT TO SEE THE VISITS TO SHOW////

$uid = getuid_sid($sid); $addv = mysql_fetch_array(mysql_query("SELECT visit FROM ibwf_users WHERE id='".$uid."'")); $addv = $addhitv[0] + 1; $addvisit = mysql_query("UPDATE ibwf_users SET visit='".$addv."' WHERE id='".$uid."'");

$visits = mysql_fetch_array(mysql_query("SELECT visits FROM ibwf_users WHERE id='".$uid."'"));

mysql_query("UPDATE ibwf_users SET visits='".($visits[0]+1)."' WHERE id='".$uid."'");

echo "Visits $visits[0] ";

///SQL//

visits varchar 255 default 1

visit varchar 255 default 1

there you go!

metulj Super moderator Principal · 1,726 posts #83

mazalo wrote: It isn't stupid to me.Man registers 50 nicks with stupid meaning for 10 minutes.If someone can help me i will appreciate it a lot! I have validation but i have to stop nick registration every minute.

mazalo wrote: I know that there is a code but can not find it. I want to close the registration for a browser in 24 hours. That can not spaming and register new nicks every second.

metulj wrote: find code for validation... as blocking new registration by browser would be stupid actually... if i got for example nokia6600... and after my registration you/or script automaticly close registration for such browser for next 24 hours... imagine hom many users will go away !?

have you even read what i've said above ?😕

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

mazalo Developer · 50 posts #84

metulj wrote:

have you even read what i've said above ?😕

Of course!And i wrote my answer that i need that code

########################## I found...Here's a cod!Maybe someone needs it ##########################

// anti-flood inregisrare
	
	$actime = mysql_fetch_array(mysql_query("SELECT regdate FROM iwbf_users WHERE browserm='".$ubr."' ORDER BY regdate DESC LIMIT 1"));
    $timeout = $actime[0] + (200000000);
		if(time()<$timeout)
		{
			$tm = time();
			$ramas = $timeout - $tm;
			echo "<p align=\"center\">";
			echo "<img src=\"images/notok.gif\" alt=\"X\"/><br/><small><b>ANTI-FLOOD REGISTER</b><b>$ramas sec.</b></small><br/>";
            echo "</p>";
		}else{ 
shakil420 Developer · 125 posts #85

how can i add my admin cp ....make vip i have a code but i want it in wml

 echo "VIP: <select name=\"specialid\" value=\"$specialid[0]\">";
    echo "<option value=\"0\">Normal</option>";
    echo "<option value=\"1\">Millionaire</option>";
    echo "<option value=\"2\">Quiz Masters</option>";
    echo "<option value=\"8\">Prince</option>";
    echo "<option value=\"9\">Princess</option>";
    echo "</select><br/>";

please convert it in <anchor> and post details you can post admincp.php in wml not html

shakil420 Developer · 125 posts #86

i have ara bank script but i cant convert it into wml please make it wml awbank.php

<?php

/*
|======================================================|
| Arawap Wap Forum                                     |
| http://Arawap.net / http://Arawap.net          |
| Arawapwap@gmail.com								   |
|======================================================|
*/

include("xhtmlfunctions.php");
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
?>
<?php
include("config.php");
include("core.php");
connectdb();
$action = $_GET["action"];
$sid = $_GET["sid"];
    if(islogged($sid)==false)
    {
      $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
      echo "<p align=\"center\">";
      echo "You are not logged in<br/>";
      echo "Or Your session has been expired<br/><br/>";
      echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
     echo xhtmlfoot();
      exit();
    }
$uid = getuid_sid($sid);
if(isbanned($uid))
    {
     $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
      echo "<p align=\"center\">";
      echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
      echo "You are <b>Banned</b><br/>";
      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE uid='".$uid."' AND penalty='1'"));
      $remain = $banto[0]- (time()  );
      $rmsg = gettimemsg($remain);
      echo "Time to finish your penalty: $rmsg<br/><br/>";
      //echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
    echo xhtmlfoot();
      exit();
    }

if($action=="main")
{
  addonline(getuid_sid($sid),"Arawap Bank","awbank.php?action=main");
 $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
  echo "<p align=\"center\">";

  $nick = getnick_sid($sid);
  $who = getuid_nick($nick);
   echo "<img src=\"images/ayu.gif\" alt=\"\"/><br/>";
  echo "<b><u>AubOwan $nick!!</u></b><br/>";
  echo "<br/>";

 echo "<i>Welcome to 1st w@p Bank in da w0rld! </i><br/>";
  echo "Deposit Ur Credits in aRa bank and get <b>1% interest Daily!!</b><br/>";
$credits = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
$arabank = mysql_fetch_array(mysql_query("SELECT arabank FROM ibwf_users WHERE id='".$who."'"));

  echo "U have <b>$credits[0]</b> Credits in Pocket!<br/>";
    echo "U have <b>$arabank[0]</b> Credits in Bank!<br/><br/>";

   echo "<a href=\"awbank.php?action=dep&sid=$sid\">» Deposit Credits</a><br/>";
   echo "<a href=\"awbank.php?action=get&sid=$sid\">» Withdraw Credits</a><br/>";
   echo "» Bank LoanS<br/>";
    echo "<a href=\"awbank-func.php?action=topt&sid=$sid\">» Top Transactors!</a><br/>";
   echo "<a href=\"awbank.php?action=mis&sid=$sid\">» Our Aim</a><br/>";
 echo"</p>";
  ////// UNTILL HERE >>
  echo "<p align=\"center\">";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "Home</a>";
   echo "<br/><br/><i>-plz Dont Copy Us-</i>";
  echo "<br/>100% coded by: ";
	echo"<a href=\"index.php?action=viewuser&who=1&sid=$sid\">aRaa</a><br/>";
	 echo"(c) Arawap.net";
  echo "</p>";
 echo xhtmlfoot();
}else

if($action=="dep1")
{
  addonline(getuid_sid($sid),"Arawap Bank","awbank.php?action=main");
 $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
  echo "<p align=\"center\">";

  $nick = getnick_sid($sid);
  $who = getuid_nick($nick);

  echo "<b><u>Deposit Credits!</u></b><br/>";
  echo "Here You are about to Deposit Your Hardly Earned Credits in aRa bank!<br/>";
$credits = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
$arabank = mysql_fetch_array(mysql_query("SELECT arabank FROM ibwf_users WHERE id='".$who."'"));

  echo "U have <b>$credits[0]</b> Credits in Pocket!<br/>";
    echo "U have <b>$arabank[0]</b> Credits in Bank!<br/>";
  echo "</p>";
  echo "<p>";

    echo " <b>Type here the Amount U gonna deposit</b>  <br/>";

echo "<form action=\"awbank-func.php?action=dep&sid=$sid&who=$who\" method=\"post\">";
echo "<input name=\"ptg\" format=\"*N\" maxlength=\"5\"/>";
echo "<input type=\"submit\" value=\"Deposit now!\"/>";
echo "</form>";

  echo "</p>";
  ////// UNTILL HERE >>
  echo "<p align=\"center\">";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "Home</a>";
  echo "</p>";
 echo xhtmlfoot();
}else
if($action=="get")
{
  addonline(getuid_sid($sid),"Arawap Bank","awbank.php?action=main");
$pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
  echo "<p align=\"center\">";

  $nick = getnick_sid($sid);
  $who = getuid_nick($nick);

  echo "<b><u>Withdraw Credits</u></b><br/>";
  echo "U can Get Back Ur Credits From AW Bank now.<br/>";
$credits = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
$arabank = mysql_fetch_array(mysql_query("SELECT arabank FROM ibwf_users WHERE id='".$who."'"));

  echo "U have <b>$credits[0]</b> Credits in Pocket!<br/>";
    echo "U have <b>$arabank[0]</b> Credits in Bank!<br/>";
  echo "</p>";
  echo "<p>";

    echo " <b>Type here the Amount U gonna Withdraw</b>  <br/>";
	echo "<form action=\"awbank-func.php?action=get&sid=$sid&who=$who\" method=\"post\">";
echo "<input name=\"ptg\" format=\"*N\" maxlength=\"5\"/>";
echo "<input type=\"submit\" value=\"withdraw now\"/>";
echo "</form>";

  echo "</p>";
  ////// UNTILL HERE >>
  echo "<p align=\"center\">";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "Home</a>";
  echo "</p>";
 echo xhtmlfoot();
}else

if($action=="dep")
{
  addonline(getuid_sid($sid),"Arawap Bank","awbank.php?action=main");
 $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
  echo "<p align=\"center\">";

  $nick = getnick_sid($sid);
  $who = getuid_nick($nick);

  echo "<b><u>Deposit Credits!</u></b><br/>";
  echo "

   *if u dont have much credits to deposit contact an online staff member and ask how to earn much credits.<br/>
  *U can deposit any amount of credits.<br/>
 *we add u 1% intersts in everyday.<br/>
 *U can withdraw ur Credits+interest in any time.<br/>

  <br/>";

  echo "<a href=\"awbank.php?action=dep1&sid=$sid\">OK, I want to Deposit My credits Now</a>";

  echo "</p>";
  ////// UNTILL HERE >>
  echo "<p align=\"center\">";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "Home</a>";
  echo "</p>";
 echo xhtmlfoot();
}else

if($action=="mis")
{
  addonline(getuid_sid($sid),"Arawap Shop","awbank.php?action=main");
  $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
  echo "<p align=\"center\">";

  $nick = getnick_sid($sid);
  $who = getuid_nick($nick);

  echo "<b><u>Our Aim</u></b><br/>";
  echo " Hello $nick we r proud to say dat u r in da <i>1st wap-bank
 in the world </i>, U can get an interests for ur hardly earned credits.Our target is to make wealthy ppl in da wap as wel as in real life,
 so be the best Transactor in our bank..Now other noobs may Copy us, but we Promise u, We do more than them! Maximum fUn from arawap!
 <br/><b> Good Luck!! </b><br/>

 <i>-arawap team-</i><br/>";

  echo "</p>";

  ////// UNTILL HERE >>
  echo "<p align=\"center\">";
   echo "<a href=\"awbank.php?action=main&sid=$sid\">Back to Bank</a><br/>";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "Home</a>";
  echo "</p>";
 echo xhtmlfoot();
}

else
{
  addonline(getuid_sid($sid),"Lost in Shop","");
 $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
  echo "<p align=\"center\">";
  echo "I don't know how did you get into here, but there's nothing to show<br/><br/>";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "Home</a>";
  echo "</p>";
   echo xhtmlfoot();
}

?>

awbank-func.php

<?php

/*
|======================================================|
| Arawap Wap Forum                                     |
| http://Arawap.net / http://Arawap.net          |
| Arawapwap@gmail.com								   |
|======================================================|
*/

include("xhtmlfunctions.php");
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
?>
<?php
include("config.php");
include("core.php");
connectdb();
$action = $_GET["action"];
$sid = $_GET["sid"];
$itemid = $_GET["itemid"];
    if(islogged($sid)==false)
    {
    $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
      echo "<p align=\"center\">";
      echo "You are not logged in<br/>";
      echo "Or Your session has been expired<br/><br/>";
      echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
      echo xhtmlfoot();
      exit();
    }
$uid = getuid_sid($sid);
if(isbanned($uid))
    {
    $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
      echo "<p align=\"center\">";
      echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
      echo "You are <b>Banned</b><br/>";
      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE uid='".$uid."' AND penalty='1'"));
      $remain = $banto[0]- (time()  );
      $rmsg = gettimemsg($remain);
      echo "Time to finish your penalty: $rmsg<br/><br/>";
      //echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
     echo xhtmlfoot();
      exit();
    }

if($action=="main")
{
  addonline(getuid_sid($sid),"Arawap Bank","");
  $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
	  echo "<p align=\"center\">";

  $nick = getnick_sid($sid);
  $who = getuid_nick($nick);

  echo "<b><u>hehehe hai $nick u r good explorer .. keep it up ur work , i know who you r .. lol</u></b><br/>";

  echo "</p>";

  ////// UNTILL HERE >>
  echo "<p align=\"center\">";

  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "Home</a>";
  echo "</p>";
 echo xhtmlfoot();
}

else

if($action=="get")
{
  addonline(getuid_sid($sid),"Arawap Bank","");
 $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
  echo "<p align=\"center\">";

    $whoid=$_GET["who"];
	 $ptg = $_POST["ptg"];
  $nick = getnick_sid($sid);
  $who = getuid_nick($nick);
  $credits = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
  $arabank = mysql_fetch_array(mysql_query("SELECT arabank FROM ibwf_users WHERE id='".$who."'"));

  echo "<b><u>Withdraw credits!</u></b><br/>";

  echo "</p>";
  echo "<p>";

  if($arabank[0]>=$ptg){

  $ugpl = mysql_fetch_array(mysql_query("SELECT arabank FROM ibwf_users WHERE id='".$who."'"));
  $ugpl = $ugpl[0] - $ptg;
  mysql_query("UPDATE ibwf_users SET arabank='".$ugpl."' WHERE id='".$who."'");

    $ugpl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
  $ugpl = $ugpl[0] + $ptg;

  mysql_query("UPDATE ibwf_users SET plusses='". $ugpl."' WHERE id='".$who."'");

  echo "U Have Successfully withdraw $ptg credits from the bank<br/>";

  }else{
         echo "<img src=\"images/notok.gif\" alt=\"x\"/>You don't have
enough Credits to withdraw<br/>";
       }

  echo "</p>";
  ////// UNTILL HERE >>
  echo "<p align=\"center\">";
   echo "<a href=\"awbank.php?action=main&sid=$sid\">Back to Bank</a><br/>";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "Home</a>";
  echo "</p>";
 echo xhtmlfoot();
}

else

if($action=="dep")
{
  addonline(getuid_sid($sid),"Arawap Bank","");
 $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
  echo "<p align=\"center\">";
  $ownid[0]=1;

    $whoid=$_GET["who"];
	 $ptg = $_POST["ptg"];
  $nick = getnick_sid($sid);
  $who = getuid_nick($nick);
  $credits = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
  $arabank = mysql_fetch_array(mysql_query("SELECT arabank FROM ibwf_users WHERE id='".$who."'"));

  echo "<b><u>Deposit Credits!</u></b><br/>";

  echo "</p>";
  echo "<p>";

  if($credits[0]>=$ptg){

  $ugpl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
  $ugpl = $ugpl[0] - $ptg;
  mysql_query("UPDATE ibwf_users SET plusses='".$ugpl."' WHERE id='".$who."'");

    $ugpl = mysql_fetch_array(mysql_query("SELECT arabank FROM ibwf_users WHERE id='".$who."'"));
  $ugpl = $ugpl[0] + $ptg;

  mysql_query("UPDATE ibwf_users SET arabank='". $ugpl."' WHERE id='".$who."'");

  echo "U Have Successfully deposit $ptg credits in the bank<br/>";

  }else{
         echo "<img src=\"images/notok.gif\" alt=\"x\"/>You don't have
enough Credits to Deposit in the Bank<br/><br/>Dont worry, Plz contact an online Staff member and ask How to earn much Credits..<br/>";
       }

  echo "</p>";
  ////// UNTILL HERE >>
  echo "<p align=\"center\">";
   echo "<a href=\"awbank.php?action=main&sid=$sid\">Back to Bank</a><br/>";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "Home</a>";
  echo "</p>";
 echo xhtmlfoot();
}

//////////////////////////////////Most Credits List

else if($action=="topt")
{
    addonline(getuid_sid($sid),"Top transactors","awbank-func.php?action=$action");
  $pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
    echo "<p align=\"center\">";
    echo "<b>Top transactors in ara-bank (Top Ten)</b>";
    echo "</p>";
    //////ALL LISTS SCRIPT <<

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

    //changable sql

        $sql = "SELECT id, name, arabank FROM ibwf_users WHERE perm='0' ORDER BY arabank DESC LIMIT $limit_start, $items_per_page";

    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      $lnk = "<a href=\"index.php?action=viewuser&who=$item[0]&sid=$sid\">$item[1]</a> <small>Deposits: $item[2]</small>";
      echo "$lnk<br/>";
    }
    }
    echo "</p>";

  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    echo "<a href=\"awbank.php?action=main&sid=$sid\">";
echo "Back to Bank</a><br/>";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
   echo xhtmlfoot();
}

else

if($action=="val")
{
  addonline(getuid_sid($sid),"Arawap Bank","");
$pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
  echo "<p align=\"center\">";
  $ownid[0]=1;

    $whoid=$_GET["who"];
  $nick = getnick_sid($sid);
  $who = getuid_nick($nick);
  $credits = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));

  echo "<b><u>Validate interests!</u></b><br/>";

  echo "</p>";
  echo "<p>";

if (isadmin(getuid_sid($sid)))
{
$sql = 'UPDATE `ibwf_users` SET `arabank` = `arabank` * 1.01 WHERE `arabank` > 20';
mysql_query($sql);

 echo "$ugpl";
   echo "updated succesfuly";
    $message = "  $nick validated bank credits manualy.[br/][small][i]p.s: this is an automated pm[/i][/small]";
	autopm($message, $ownid[0]);

}
else{
         echo "<img src=\"images/notok.gif\" alt=\"x\"/>you are not arawap bank manager, ur stupid action got reported<br/>";
		 $message = "  $nick tried to rob ara bank.[br/][small][i]p.s: this is an automated pm[/i][/small]";
	autopm($message, $ownid[0]);
       }

  echo "</p>";
  ////// UNTILL HERE >>
  echo "<p align=\"center\">";
   echo "<a href=\"awbank.php?action=main&sid=$sid\">Back to Bank</a><br/>";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "Home</a>";
  echo "</p>";
 echo xhtmlfoot();
}

else
{
  addonline(getuid_sid($sid),"Lost in bank","");
$pstyle = gettheme($sid);
      echo xhtmlhead("Arawap Bank",$pstyle);
  echo "<p align=\"center\">";
  echo "I don't know how did you get into here, but there's nothing to rob, just get out here befor bank security gards shoot u!<br/><br/>";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
  echo "Home</a>";
  echo "</p>";
   echo xhtmlfoot();
}

?>
wap_king Developer · 126 posts #87

shakil420 wrote: how can i add my admin cp ....make vip i have a code but i want it in wml

 echo "VIP: <select name=\"specialid\" value=\"$specialid[0]\">";
    echo "<option value=\"0\">Normal</option>";
    echo "<option value=\"1\">Millionaire</option>";
    echo "<option value=\"2\">Quiz Masters</option>";
    echo "<option value=\"8\">Prince</option>";
    echo "<option value=\"9\">Princess</option>";
    echo "</select><br/>";

please convert it in <anchor> and post details you can post admincp.php in wml not html

Dude you cant be serious? theres a million wml script with an <anchor> coding and u cant look at one and make the code? wow

honkytonkman Senior · 252 posts #88

mazalo wrote: Of course!And i wrote my answer that i need that code

########################## I found...Here's a cod!Maybe someone needs it ##########################

// anti-flood inregisrare
	
	$actime = mysql_fetch_array(mysql_query("SELECT regdate FROM iwbf_users WHERE browserm='".$ubr."' ORDER BY regdate DESC LIMIT 1"));
    $timeout = $actime[0] + (200000000);
		if(time()<$timeout)
		{
			$tm = time();
			$ramas = $timeout - $tm;
			echo "<p align=\"center\">";
			echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"X\"/><br/><small><b>ANTI-FLOOD REGISTER</b><b>$ramas sec.</b></small><br/>";
            echo "</p>";
		}else{ 

where to put this code in register.php in precision?

the italian/international COMMUNITY of friendship http://people2000.netne.net WAP/WEB peoplemailbox@katamail.com

something else Fellow · 2,296 posts #89

turning php errors on is ok if your site isnt up and running ....

a better way is to use a file like eg: example.php

<?php
$page = $_GET["page"];
if($page=="") $page = "index.php";
error_reporting  (E_ALL);
ini_set ('display_errors', true);
include("$page");
?>

Then goto it in your browser: http://yoursitename.com/example.php?page=your_page_name.php

something else Fellow · 2,296 posts #90

its been posted many times before: core.php

////////////////////////anti sql injection
function antisi($str){ 
return mysql_real_escape_string($str); 
}

then on top of every other page:

if(isset($_GET)){foreach($_GET as $key=>$value){$_GET[$key]=antisi($value);}} 
if(isset($_POST)){foreach($_POST as $key=>$value){$_POST[$key]=antisi($value);}}
something else Fellow · 2,296 posts #91

thinking about above post ... migfht be better having a file: antiinjection.php

<?php
if(isset($_REQUEST)){foreach($_REQUEST as $key=>$value){$_REQUEST[$key]=mysql_real_escape_string(htmlspecialchars($value));}} 
if(isset($_SERVER)){foreach($_SERVER as $key=>$value){$_SERVER[$key]=mysql_real_escape_string(htmlspecialchars($value));}}
if(isset($_SESSION)){foreach($_SESSION as $key=>$value){$_SESSION[$key]=mysql_real_escape_string(htmlspecialchars($value));}}
?>

then just using:

include 'antiinjection.php';

at the top of every page

something else Fellow · 2,296 posts #92

yeah you could just add:

if(isset($_GET)){foreach($_GET as $key=>$value){$_GET[$key]=addslashes(htmlspecialchars($value));}} 
if(isset($_POST)){foreach($_POST as $key=>$value){$_POST[$key]=addslashes(htmlspecialchars($value));}}    
if(isset($_SERVER)){foreach($_SERVER as $key=>$value){$_SERVER[$key]=addslashes(htmlspecialchars($value));}}  
if(isset($_SESSION)){foreach($_SESSION as $key=>$value){$_SESSION[$key]=addslashes(htmlspecialchars($value));}} 

to your config.php

khan Lead · 681 posts #93

something else wrote: thinking about above post ... migfht be better having a file: antiinjection.php

<?php
if(isset($_REQUEST)){foreach($_REQUEST as $key=>$value){$_REQUEST[$key]=mysql_real_escape_string(htmlspecialchars($value));}} 
if(isset($_SERVER)){foreach($_SERVER as $key=>$value){$_SERVER[$key]=mysql_real_escape_string(htmlspecialchars($value));}}
if(isset($_SESSION)){foreach($_SESSION as $key=>$value){$_SESSION[$key]=mysql_real_escape_string(htmlspecialchars($value));}}
?>

then just using:

include 'antiinjection.php';

at the top of every page

I you do that, some value will not work. like intejer, numeric value..bla bla bla

something else Fellow · 2,296 posts #94

riderz wrote: dont work when i add that in confic it show error msges saying no password

for user '..........'@'localhost' (using password: NO) in /home/............./public_html/config.php on line 16

Place it below your database connection 😛

nclemale36 Lead · 537 posts #95
///////////////////////////////del one persons messages
else if($action=="delonemsg")
{
  $who = $_GET["who"];
  $user = getnick_uid($who);
  echo "<head>";
  echo "<title>Owner Tools</title>";
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
  echo "</head>";
  echo "<body>";
  echo "<p align=\"center\">";
  $uid = getuid_sid($sid);
  $perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
  $trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));

  if($trgtperm>$perm){ 
  echo "<b><img src=\"../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>permission Denied...</b><br/>";
  echo "<br/>U Cannot Delete $user<br/>";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
  }else{

  echo "<br/>";
$res = mysql_query("DELETE FROM ibwf_private WHERE byuid='".$who."'");
  $res = mysql_query("DELETE FROM ibwf_popups WHERE byuid='".$who."'");

 if($res)
  {
  echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Users messages deleted successfully";
mysql_query("INSERT INTO ibwf_mlog SET action='users pms ', details='<b>".getnick_uid(getuid_sid($sid))."</b> $user messages deleted', actdt='".time()."'");
  }else{
  echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error deleting UGroup";
  }
 
  echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  }
  echo "</p></body>";
}

usage

echo "<a href=\"yourtools.php?action=delonemsg&sid=$sid&who=$who\">Delete All Users Messages</a><br/>";

lets say someone spams your site and no one catches them doing it for ages. they will of spammed alot of users. this can delete just that users sent messages no one elses .the only other way of clesring one persons messages is to delete the user .

pmbguy Senior · 344 posts #96

user avatar function... safe and easy... ////////////////////////////////////////////getavatar/////////////// function useravat($uid) { $avat = mysql_fetch_array(mysql_query("SELECT avatar FROM fun_users WHERE id='".$uid."'"));

$avatar = "<img src="phpThumb/phpThumb.php?iar=1&w=40&src=$avat[0]">"; return $avatar;

} ///////////////////////////////////////////////////////// to use: echo useravat($who); or $uid or whatever...

subzero Super moderator Fellow · 3,954 posts #97

nclemale36

@mysql_query("TRUNCATE TABLE `chat4u_UserPms`");

This will clean users inbox at one hit ....

Also note it will delete all and keeps the sql

But your way it only deletes some but not all best idea for busy site's over 1 MILL users will use this

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... _______…

opticalpigion Lead · 593 posts #98

Sql/Xss injection protection + registration flood protection.

captcha.php

<?
session_start();
header('content-type: image/jpeg');
$text = rand(10000,99999);
$_SESSION["vercode"] = $text;

$height = 25;
$width = 65;

$image_p = imagecreate($width, $height);
$black = imagecolorallocate($image_p, 0, 0, 0);
$white = imagecolorallocate($image_p, 255, 255, 255);
$font_size = 14; 
imagestring($image_p, $font_size, 5, 5, $text, $white);
imagejpeg($image_p, null, 80);
?>

register-form.php

<?php
	session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Registration Form</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
	if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 ) {
		echo '<p align=\"center"\>';
		echo '<ul class="err">';
		foreach($_SESSION['ERRMSG_ARR'] as $msg) {
			echo '<li>',$msg,'</li>'; 
		}
		echo '</ul>';
		echo '</p>';
		unset($_SESSION['ERRMSG_ARR']);
	}
?>
<form id="loginForm" name="loginForm" method="post" action="register-exec.php">
  <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
    <tr>
      <th>Email Address</th>
      <td><input name="email" type="text" class="textfield" id="fname" /></td>
    </tr>
     <tr>
      <th width="124">User ID</th>
      <td width="168"><input name="login" type="text" class="textfield" id="login" /></td>
    </tr>
    <tr>
      <th>Password</th>
      <td><input name="password" type="password" class="textfield" id="password" /></td>
    </tr>
    <tr>
      <th>Confirm Password </th>
      <td><input name="cpassword" type="password" class="textfield" id="cpassword" /></td>
    </tr>
    <tr>
    <tr>
      <th>Human Test</th>
     <td><img src="captcha.php"><input type="text" name="vercode" /><br>   </td>  </tr>
    <tr>
      <td> </td>
      <td><input type="submit" name="Submit" value="Register" /></td>
    </tr>
  </table>
</form>
</body>
</html>

register-exec.php

<?php
	//Start session
	session_start();

	//Include database connection details
	require_once('config.php');
	
	//Array to store validation errors
	$errmsg_arr = array();
	
	//Validation error flag
	$errflag = false;
	
	//Connect to mysql server
	$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
	if(!$link) {
		die('Failed to connect to server: ' . mysql_error());
	}
	
	//Select database
	$db = mysql_select_db(DB_DATABASE);
	if(!$db) {
		die("Unable to select database");
	}
	
	//Function to sanitize values received from the form. Prevents SQL/XSS injection
function clean($str) {
		$str = @trim($str);
		if(get_magic_quotes_gpc()) {
			$str=htmlspecialchars($str);                       
            $str=stripslashes(trim($str));
			$search=array("\\","\0","\n","\r","\x1a","'",'"');
            $replace=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"');
            $str = str_replace($search,$replace,$str);
		}
		return mysql_real_escape_string($str);
	}
	
	//Sanitize the POST values
	$email = clean($_POST['email']);
	$login = clean($_POST['login']);
	$password = clean($_POST['password']);
	$cpassword = clean($_POST['cpassword']);

	//Input Validations
	if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='')  { 
     $errmsg_arr[] = 'Failed Human Test.';
		$errflag = true;
} 
	if($email == '') {
		$errmsg_arr[] = 'Email Add is missing';
		$errflag = true;
	}
	
	if($login == '') {
		$errmsg_arr[] = 'Login ID missing';
		$errflag = true;
	}
	if($password == '') {
		$errmsg_arr[] = 'Password missing';
		$errflag = true;
	}
	if($cpassword == '') {
		$errmsg_arr[] = 'Confirm password missing';
		$errflag = true;
	}
	if( strcmp($password, $cpassword) != 0 ) {
		$errmsg_arr[] = 'Passwords do not match';
		$errflag = true;
	}
	
	//Check for duplicate login ID
	if($login != '') {
		$qry = "SELECT * FROM ibwf_users WHERE name='$login'";
		$result = mysql_query($qry);
		if($result) {
			if(mysql_num_rows($result) > 0) {
				$errmsg_arr[] = 'Login ID already in use';
				$errflag = true;
			}
			@mysql_free_result($result);
		}
		else {
			die("Query failed");
		}
	}
	
	//If there are input validations, redirect back to the registration form
	if($errflag) {
		$_SESSION['ERRMSG_ARR'] = $errmsg_arr;
		session_write_close();
		header("location: register-form.php");
		exit();
	}

	//Create INSERT query
	$qry = "INSERT INTO ibwf_users(email, validated, name, pass) VALUES('$email','1','$login','".md5($_POST['password'])."')";
	$result = @mysql_query($qry);
	
	//Check whether the query was successful or not
	if($result) {
		header("location: register-success.php");
		exit();
	}else {
		die("Query failed");
	}
?>

register-success.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Registration Successful</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Registration Successful</h1>
<p><a href="index.php">Click here</a> to login to your account.</p>
</body>
</html>

to scan more input value u can use this function

function clean($str) {
		$str = @trim($str);
		if(get_magic_quotes_gpc()) {
			$str=htmlspecialchars($str);                       
            $str=stripslashes(trim($str));
			$search=array("\\","\0","\n","\r","\x1a","'",'"');
            $replace=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"');
            $str = str_replace($search,$replace,$str);
		}
		return mysql_real_escape_string($str);
	}

use as

$email = clean($_POST['email']);
something else Fellow · 2,296 posts #99

shakil420 wrote: yeah thanx bro....is it possible.....suppose if any user change his browser then his session automatically dropped??? like in opera ----> 420.com/index.php?action=main&sid=420420420420 then when he tried to paste the link with others opera/mozilla browsers like in mozilla -----> 420.com/index.php?action=main&sid=420420420420

then it shows "hei 420 site sid proteced lol"

if u know the code trhen post pls

$bro = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id='".$uid."'"));
$brws = $_SERVER['HTTP_USER_AGENT'];
if($bro[0]!=$brws){
echo "hei 420 site sid proteced lol";
exit;
}
kafa Junior · 12 posts #100

I need some advice or help:

how to speed up the function that displays number of topics, number of posts and the last post (nick and time) of the subforum on my web extension of lava (trying to make it phpBB like)?

I am using this code:

$forums = mysql_query("SELECT id, name FROM ibwf_forums WHERE cid='".$cid."' AND clubid='0' ORDER BY position, id, name");

    while($forum = mysql_fetch_array($forums))
    {
      if(canaccess(getuid_sid($sid), $forum[0]))
      {
      $notp = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE fid='".$forum[0]."'"));
      $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts a INNER JOIN ibwf_topics b ON a.tid = b.id WHERE b.fid='".$forum[0]."'"));
      $iml = "<img src=\"images/1.gif\" alt=\"*\"/> ";

      $lpt = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_topics WHERE fid='".$forum[0]."' ORDER BY lastpost DESC LIMIT 0,1"));
      $nops0 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$lpt[0]."'"));
      if($nops0[0]==0)
      {
      $pinfo = mysql_fetch_array(mysql_query("SELECT authorid FROM ibwf_topics WHERE id='".$lpt[0]."' LIMIT 0,1"));
      }
	  else
	  {
      $pinfo = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_posts WHERE tid='".$lpt[0]."' ORDER BY dtpost DESC LIMIT 0,1"));
      }
      $tlnm = htmlspecialchars($lpt[1]);
      $tlnick = getnick_uid($pinfo[0]);
      $tpclnk = "<a href=\"index.php?action=viewtpc&sid=$sid&tid=$lpt[0]&go=last\">$tlnm</a>";
      $vulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$pinfo[0]\">$tlnick</a>";
	  
	echo "<tr>
    <td valign=\"middle\" width=\"25\"> $iml</td>
    <td align=\"left\" width=\"200\" class=\"sjena\"> <a href=\"index.php?action=viewfrm&sid=$sid&fid=$forum[0]\">$forum[1]</a></td>
    <td width=\"50\" align=\"center\" class=\"sjena\">$notp[0]</td>
    <td width=\"60\" align=\"center\" class=\"sjena\">$nops[0]</td>
    <td align=\"right\" class=\"style12\">$tpclnk <br/>od: $vulnk </td>
	</tr><tr><td colspan=\"5\"><hr></td></tr>";
    }
    }

and preview how slow it is can be seen here: MERAK.mobi

http://merak.mobi - Love at first click

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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