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