Shoutb0x Dduct Plusses
Started on the old forum in November 2007 · view the original in the archive · old links redirect here
Guest
#4
edit your genproc.php file, the shout area to this
//////////////////////////////////////////shout
else if($action=="shout")
{
$shtxt = $_POST["shtxt"];
addonline(getuid_sid($sid),"Shouting","");
echo "<card id=\"main\" title=\"Shout\">";
echo "<p align=\"center\">";
if(getplusses(getuid_sid($sid))<75)
{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>You should have at least 75 plusses to shout!";
}else{
$shtxt = $shtxt;
//$uid = getuid_sid($sid);
$shtm = time();
$res = mysql_query("INSERT INTO ibwf_shouts SET shout='".$shtxt."', shouter='".$uid."', shtime='".$shtm."'");
if($res)
{
$shts = mysql_fetch_array(mysql_query("SELECT shouts from ibwf_users WHERE id='".$uid."'"));
$shts = $shts[0]+1;
$plus = getplusses(getuid_sid($sid));
$plusses = $plus - 1;
mysql_query("UPDATE ibwf_users SET shouts='".$shts."', plusses='".$plusses."' WHERE id='".$uid."'");
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Shout added successfully";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
}
}
echo "
<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
else if($action=="shout")
{
$uid = getuid_ses($ses);
$shtxt = $_POST["shtxt"];
addonline(getuid_ses($ses),"Shouting","");
$wiz = mysql_fetch_array(mysql_query("SELECT credits FROM ibwf_users WHERE id='".$uid."'"));
$credits = $wiz[0] - 1;
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
if(getcredits(getuid_ses($ses))<75)
{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>You should have at least 75 credits to shout!";
}else{
$shtxt = $shtxt;
$shtm = time();
$res = mysql_query("INSERT INTO ibwf_shouts SET shout='".$shtxt."', shouter='".$uid."', shtime='".$shtm."'");
if($res)
{
$shts = mysql_fetch_array(mysql_query("SELECT shouts from ibwf_users WHERE id='".$uid."'"));
$shts = $shts[0]+1;
mysql_query("UPDATE ibwf_users SET shouts='".$shts."', credits='".$credits."' WHERE id='".$uid."'");
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Shout added successfully";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
}
}
echo "
<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
if(getcredits(getuid_ses($ses))<75)
{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>You should have at least 75 credits to shout!";
}else{
$shtxt = $shtxt;
//$uid = getuid_ses($ses);
$shtm = time();
$res = mysql_query("INSERT INTO ibwf_shouts SET shout='".$shtxt."', shouter='".$uid."', shtime='".$shtm."'");
if($res)
{
$shts = mysql_fetch_array(mysql_query("SELECT shouts from ibwf_users WHERE id='".$uid."'"));
$shts = $shts[0]+1;
mysql_query("UPDATE ibwf_users SET shouts='".$shts."', credits='".$credits."' WHERE id='".$uid."'");
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Shout added successfully";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
}
}
echo "
<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}