Working Share Plusses Script

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

6 replies · 648 views · started 17 years ago · 1 min read

2 participants
l0rdrayven Developer · 83 posts #1

I only modified this script from Give Game Plusses script of my site.It is full working in lavalair wml version but in html the system said that Plusses Successfully updated but the when you view ya profile your plusses wasnt deducted also it wont added the user plusses you shared.In short,it wont updated at all in html version.So someone just fix it..or just try it first.

Not i rip persons off i will also do your arse !

l0rdrayven Developer · 83 posts #2

Working Share Plusses

Add this to genproc.php in wml version..

//////////////////////////////////////////Give Plusses else if($action=="givepl") { addonline(getuid_sid($sid),"Giving Plusses",""); $who = $_GET["who"]; $ptg = $_POST["ptg"]; echo "<card id="main" title="Give Kamote">"; echo " "; //$uid = getuid_sid($sid); $gpsf = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'")); $gpst = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'")); if($gpsf[0]>=$ptg){ $gpsf = $gpsf[0]-$ptg; $gpst = $gpst[0]+$ptg; $res = mysql_query("UPDATE ibwf_users SET plusses='".$gpst."' WHERE id='".$who."'"); if($res) { $res = mysql_query("UPDATE ibwf_users SET plusses='".$gpsf."' WHERE id='".$uid."'"); echo "<img src="../images/ok.gif" alt="o"/>Kamote Updated Successfully.! "; $msg = "Hi! /reader,[br/] You had given $ptg Plusses successfully. 🙂 [br/]Huwag ng mgreply at ng walang gulo lol[br/]P.S: this is an automated pm"; autopm($msg, $who); }else{ echo "<img src="../images/notok.gif" alt="x"/>Database Error! "; } }else{ echo "<img src="../images/notok.gif" alt="x"/>You don't have enough plusses to give Pasaway Ka.. "; }

    echo "

";

 echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";

echo "Home</a>"; echo " "; echo "</card>"; }

And add this to index.php wml version..

//////////////////////////////////////////Give Plusses

else if($action=="givepl")

{

$who = $_GET["who"];

addonline(getuid_sid($sid),"Giving Plusses","");

echo "<card id=\"main\" title=\"Share Kamote\">";

echo "<onevent type=\"onenterforward\">";

echo "<refresh>

    <setvar name=\"tfgp\" value=\"0\"/>";

echo "</refresh></onevent>";

echo " ";

echo "Give Plusses To ".getnick_uid($who)."

";

$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".getuid_sid($sid)."'"));

echo "You have $nopl[0] plusses

";

echo "Plusses To Give: ";

echo "<input name="tfgp" format="*N" maxlength="5"/>";

echo " <anchor>Give";

echo "<go href="genproc.php?action=givepl&sid=$sid&who=$who" method="post">";

echo "<postfield name="ptg" value="$(tfgp)"/>";

echo "</go></anchor>";

echo "

<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>";

echo "Home</a>";

echo " ";

echo "</card>";

}

Usage for this code is:

if($uid !=$who) { echo "<a href="index.php?action=givepl&sid=$sid&who=$who">Share Plusses</a>"; }

Not i rip persons off i will also do your arse !

l0rdrayven Developer · 83 posts #3

Add this to core.php html version. //////////////////////////////////////////Give GPs

else if($action=="givepl")

{

addonline(getuid_sid($sid),"Giving Plusses","");

$who = $_GET["who"];

$ptg = $_POST["ptg"];

  echo "<head>";

  echo "<title>Give Kamote</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>";

echo " ";

//$uid = getuid_sid($sid);

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

$gpst = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));

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

$gpsf = $gpsf[0]-$ptg;

$gpst = $gpst[0]+$ptg;

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

if($res)

    {

      $res = mysql_query("UPDATE ibwf_users SET plusses='".$gpsf."' WHERE id='".$uid."'");

        echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Kamote Updated Successfully

"; $msg = "Hi! /reader,[br/] you had given $ptg plusses successfully. 🙂 [br/]Huwag ng mgreply at ng walang gulo lol[br/]P.S: this is an automated pm"; autopm($msg, $who);

    }else{

      echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!

";

    }

  }else{

      echo "<img src=\"../images/notok.gif\" alt=\"x\"/>You don't have enough plusses to give

Pasaway ka ";

    }

    echo "

";

echo "<a accesskey="0" href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";

echo " ";

echo "</body>";

} Add this to index.php html version. //////////////////////////////////////////Give Plusses

else if($action=="givepl") { $who = $_GET["who"]; $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid))); addonline(getuid_sid($sid),"Giving Plusses ($mmsg)",""); echo "<head>"; echo "<title>Give Kamote</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">"; echo "</head>"; echo "<body>"; echo " "; echo "Give Plusses To ".getnick_uid($who)."

"; $nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".getuid_sid($sid)."'")); echo "You have $nopl[0] plusses

"; echo "Plusses To Give: "; echo "<form action="genproc.php?action=givepl&sid=$sid&who=$who" method="post">"; echo "<input name="tfgp" style="-wap-input-format: '*N'" maxlength="5">"; echo " <input type="Submit" Value="Give" name="Give"></form>"; echo "

<a accesskey="0" href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo " "; echo "</body>"; } The same usage code...

Not i rip persons off i will also do your arse !

l0rdrayven Developer · 83 posts #4

TAKE NOTE: Im just a noob and really trying hard to learn..The script is the same,wml and html but why plusses are not updated perfectly in html version unlike in wml that works perfectly. I forgot someone help to fix the part of Autopm message the username of the plusses giver doesnt appear in the message inbox tnt.

Not i rip persons off i will also do your arse !

kazzin Junior · 33 posts #5

share pluses

//////////////////////////////////////////Share Plusses

else if($action=="sharepl")
{
  $who = $_GET["who"];
  addonline(getuid_sid($sid),"giving coins","");
  addlast(getuid_sid($sid),"giving coins","");
    echo "<card id=\"main\" title=\"Giving coins\">";
    echo "<onevent type=\"onenterforward\">";
    echo "<refresh>
        <setvar name=\"tfgp\" value=\"0\"/>";
    echo "</refresh></onevent>";
  echo "<p align=\"center\">";
echo "";
echo "<br/>";
  echo "<b>Give Plusses To ".getnick_uid($who)."</b><br/><br/>";
  $kazz = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".getuid_sid($sid)."'"));
  echo "You have $kazz[0] Coins<br/><br/>";
  echo "Plusses to give<br/>";
  echo "<input name=\"tfgp\" format=\"*N\" maxlength=\"2\"/>";
  echo "<br/><anchor>Give";
  echo "<go href=\"genproc.php?action=sharepl&sid=$sid&who=$who\" method=\"post\">";
  echo "<postfield name=\"ptg\" value=\"$(tfgp)\"/>";
  echo "</go></anchor>";
  echo "<br/><br/><a href=\"index.php?action=main&sid=$sid\">";
echo "Home</a>";
  echo "</p>";
  echo "</card>";
}

in genproc add it

//////////////////////////////////////////Share plusses
else if($action=="sharepl")
{
    addonline(getuid_sid($sid),"Giving  Plusses","");
    $who = $_GET["who"];
    $ptg = $_POST["ptg"];
    $pres = trim($_POST["pres"]);
    echo "<card id=\"main\" title=\"Giving plusses\">";
  echo "<p align=\"center\">";
  //$uid = getuid_sid($sid);
  $psf = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
  $pst = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
  if($psf[0]>=$ptg){
    $psf = $psf[0]-$ptg;
    $pst = $pst[0]+$ptg;
    $res = mysql_query("UPDATE ibwf_users SET plusses='".$pst."' WHERE id='".$who."'");
  if($res)
        {
          $res = mysql_query("UPDATE ibwf_users SET plusses='".$psf."' WHERE id='".$uid."'");
 mysql_query("INSERT INTO ibwf_mlog SET action='shareplusses', details='<b>".getnick_uid(getuid_sid($sid))."</b> send plusses to<b> ".$unick."</b> the amount of: ".$ptg."', actdt='".time()."'");
           mysql_query("UPDATE ibwf_users SET plussess=plusses-3 WHERE id='".$uid."'");
           echo "Plusses Shared Successfully to $unick<br/>";
          $msg = "".getnick_uid(getuid_sid($sid))." had shared $ptg plusses to you. LIVE MSG: $pres"."[br/][small]Note: This is an automatic PM[/small]";
			autopm($msg, $who);
        }else{
          echo "Database Error!<br/>";
        }
      }else{
         $nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".getuid_sid($sid)."'"));
        echo "Yebba! not enough plusses!<br/>";
        }
      echo "<br/>";
  
     echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Home</a>";
echo "</p>";
  echo "</card>";
}

this will work for share plusses 😛

l0rdrayven Developer · 83 posts #6

yah it is w0rking but i w0nder why the html version d0nt w0rk even though i created a the same script.

Not i rip persons off i will also do your arse !

kazzin Junior · 33 posts #7

convert it to html mine is work

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