put this in index.php or wherever, then put the link "give plusses" to user's profile or wherever
i called it "share coins" just edit it to suit yours lol:D:p
Code:
//////////////////////////////////////////Give Plusses
else if($action=="shares")
{
$who = $_GET["who"];
$unick = getnick_uid($who);
addonline(getuid_sid($sid),"Sharing coins to $unick","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Share Coins");
echo "<onevent type=\"onenterforward\">";
echo "<refresh>
<setvar name=\"gplus\" value=\"\"/>";
echo "</refresh></onevent>";
echo "<p align=\"center\">";
echo "Share Coins to ".getnick_uid($who)."<br/><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".getuid_sid($sid)."'"));
echo "Your Current Coins: $nopl[0]<br/><br/>";
echo "<form action=\"genproc.php?action=shares&sid=$sid&who=$who\" method=\"post\">";
echo "Message: <input name=\"pres\" maxlength=\"100\"/><br/>";
echo "Amount to Share:<input name=\"ptg\" format=\"*N\" maxlength=\"4\"/>";
echo "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
echo "<input type=\"submit\" value=\"GO\"/>";
echo "</form>";
// echo "<br/><br/><a href=\"index.php?action=main&sid=$sid&type=send\">";
//echo "Main menu</a>";
echo "</p>";
then in genproc
put this
Code:
//////////////////////////////////////////Give Plusses
else if($action=="shares")
{
$unick = getnick_uid($who);
addonline(getuid_sid($sid),"Sending plusses to $unick","");
$who = $_GET["who"];
$ptg = trim($_POST["ptg"]);
$pres = trim($_POST["pres"]);
if(isdigitf3($ptg))
{
echo "<p align=\"center\">";
echo "Opps! No no its not the right amount!<br/>";
echo "<a href=\"index.php?action=main&sid=$sid&type=send&browse?start\">";
echo "Main menu</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
//echo "<title>site</title>";
echo "<p align=\"center\">";
//$uid = getuid_sid($sid);
if($uid==$who)
{
echo "Sending to your own account is not permitted!<br/>";
}else{
if($ptg<=0)
{
echo "0 amount is not allowed!<br/>";
}else{
if($ptg>=10001)
{
echo "10,000 maximum plusses!<br/>";
}else{
if(($ptg=="")||($pres==""))
{
echo "Its empty";
}//else{
// $unick = getnick_uid($who);
//$actime = mysql_fetch_array(mysql_query("SELECT actime FROM ibwf_killed2 WHERE uid='".$uid."' AND who='".$who."' ORDER BY actime DESC LIMIT 1"));
// $timeout = $actime[0] + (1*1*1*1);
//if(time()<$timeout)
// {
// echo "Can't send plusses to the same user at this time wait after 1 day!.<br/><br/>";
//}
else{
$unick = getnick_uid($who);
$psf = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
$npl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
if($psf[0]>=$ptg){
$psf = $psf[0]-$ptg;
$npl = $npl[0]+$ptg;
$res = mysql_query("UPDATE ibwf_users SET plusses='".$npl."', lastplreas='".mysql_escape_string($pres)."' WHERE id='".$who."'");
if($res)
{
if($tdo==1)
{
$msg = "share";
}else{
$msg = "share";
}
$res = mysql_query("INSERT INTO ibwf_killed2 SET uid='".$uid."', who='".$who."', actime='".time()."'");
$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 "Coins Shared Successfully to $unick<br/>";
$msg = "".getnick_uid(getuid_sid($sid))." had $msg $ptg coins to you. Message: $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 "You do not have enough coins!<br/>";
}
in this code, there should be a limit on amount that can be sent per day, i dont have the table/sql for that function so i just edited it:D
Bookmarks