in genproc.php
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>//////////////////////////////////////////Give Plusses
else if($action=="sharepl")
{
$wnick = getnick_uid($who);
addonline(getuid_sid($sid),"Shared Plusses to $wnick","");
$amount = $_POST["plusses"];
$whonick = $_GET["whonick"];
$who=$_GET["whoid"];
$whoid=$_GET["who"];
$ptg = $_POST["tfgp"];
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<card>";
//$uid = getuid_sid($sid);
$gpsf = mysql_fetch_array(mysql_query("SELECT plusses, name FROM ibwf_users WHERE id='".$uid."'"));
$gpst = mysql_fetch_array(mysql_query("SELECT plusses, name FROM ibwf_users WHERE id='".$who."'"));
if($gpsf[0]>=$ptg){
$gpsf = $gpsf[0]-$ptg;
$gpst = $gpst[0]+$ptg;
$facedown = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
$facedown= $facedown[0];
$ugpl2 = $facedown - "10";
mysql_query("UPDATE ibwf_users SET plusses='".$ugpl2."' WHERE id='".$uid."'");
$res = mysql_query("UPDATE ibwf_users SET plusses='".$gpst."' WHERE id='".$who."'");
if($res)
{
$who=$_GET["whoid"];
$whoid=$_GET["who"];
$res = mysql_query("UPDATE ibwf_users SET plusses='".$gpsf."' WHERE id='".$uid."'");
echo "Plusses Updated Succesfully!
Also 10 Plusses Deducted for transaction.
You Have $nopl[0] Plusses Left
";
}else{
echo "Database Error!
";
}
}else{
echo "You don't have enough Plusses to give
";
}
echo "
";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</card>";
}</div>
in index.php
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>//////////////////////////////////////////Give Plusses
else if($action=="sharepl")
{
$who = $_GET["who"];
$sid = $_GET["sid"];
$uid = getuid_sid($sid);
$wnick = getnick_uid($who);
addonline(getuid_sid($sid),"Sharing Plusses to $wnick","");
echo "<head>";
echo "<title>Give Plusses</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<card>";
echo "<p align=\"left\">";
echo "Give Plusses To ".getnick_uid($who)."
";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
echo "(Each transaction will cost 10 plusses)
";
echo "You Have $nopl[0]
";
echo "Plusses to give
";
echo "<form action=\"genproc.php?action=sharepl&sid=$sid&a mp;who=$who\" method=\"post\">";
echo "<input name=\"tfgp\" style=\"-wap-input-format: '*N'\" maxlength=\"5\">";
echo "
<input type=\"Submit\" Value=\"Give\" name=\"Give\"></anchor>
";
echo "
<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</card>";
}</div>
usage in index.php
add in action=viewuser
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'> if($uid !=$who)
{
echo "<a href=\"index.php?action=sharepl&who=$who&s id=$sid\">Share Plusses</a>
";</div>
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>//////////////////////////////////////////Give Plusses
else if($action=="sharepl")
{
$wnick = getnick_uid($who);
addonline(getuid_sid($sid),"Shared Plusses to $wnick","");
$amount = $_POST["plusses"];
$whonick = $_GET["whonick"];
$who=$_GET["whoid"];
$whoid=$_GET["who"];
$ptg = $_POST["tfgp"];
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<card>";
//$uid = getuid_sid($sid);
$gpsf = mysql_fetch_array(mysql_query("SELECT plusses, name FROM ibwf_users WHERE id='".$uid."'"));
$gpst = mysql_fetch_array(mysql_query("SELECT plusses, name FROM ibwf_users WHERE id='".$who."'"));
if($gpsf[0]>=$ptg){
$gpsf = $gpsf[0]-$ptg;
$gpst = $gpst[0]+$ptg;
$facedown = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
$facedown= $facedown[0];
$ugpl2 = $facedown - "10";
mysql_query("UPDATE ibwf_users SET plusses='".$ugpl2."' WHERE id='".$uid."'");
$res = mysql_query("UPDATE ibwf_users SET plusses='".$gpst."' WHERE id='".$who."'");
if($res)
{
$who=$_GET["whoid"];
$whoid=$_GET["who"];
$res = mysql_query("UPDATE ibwf_users SET plusses='".$gpsf."' WHERE id='".$uid."'");
echo "Plusses Updated Succesfully!
Also 10 Plusses Deducted for transaction.
You Have $nopl[0] Plusses Left
";
}else{
echo "Database Error!
";
}
}else{
echo "You don't have enough Plusses to give
";
}
echo "
";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</card>";
}</div>
in index.php
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>//////////////////////////////////////////Give Plusses
else if($action=="sharepl")
{
$who = $_GET["who"];
$sid = $_GET["sid"];
$uid = getuid_sid($sid);
$wnick = getnick_uid($who);
addonline(getuid_sid($sid),"Sharing Plusses to $wnick","");
echo "<head>";
echo "<title>Give Plusses</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<card>";
echo "<p align=\"left\">";
echo "Give Plusses To ".getnick_uid($who)."
";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
echo "(Each transaction will cost 10 plusses)
";
echo "You Have $nopl[0]
";
echo "Plusses to give
";
echo "<form action=\"genproc.php?action=sharepl&sid=$sid&a mp;who=$who\" method=\"post\">";
echo "<input name=\"tfgp\" style=\"-wap-input-format: '*N'\" maxlength=\"5\">";
echo "
<input type=\"Submit\" Value=\"Give\" name=\"Give\"></anchor>
";
echo "
<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</card>";
}</div>
usage in index.php
add in action=viewuser
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'> if($uid !=$who)
{
echo "<a href=\"index.php?action=sharepl&who=$who&s id=$sid\">Share Plusses</a>
";</div>
Comment