Add Deduct Plusses How?

Started on the old forum in September 2008 · view the original in the archive · old links redirect here

15 replies · 1,092 views · started 18 years ago · 1 min read

5 participants
crazybrumi Super moderator Principal · 1,064 posts #2
//////////////////////////plusses//////////////////////////

else if($action=="plsopt")
{
  $who = $_GET["who"];
  echo "<head>";
  echo "<title>Admin Tools</title>";
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
  echo "</head>";
  echo "<body>";
  echo "<p align=\"center\">";
  if(!isadmin(getuid_sid($sid)))
  {
  echo "Permission Denied!
";
  }else{
  $unick = getnick_uid($who);
  echo "Add/Substract $unick's Plusses";
  echo "</p>";
  echo "

";
  echo "<form action=\"modproc.php?action=pls&sid=$sid\" method=\"post\">";
  $pen[0]="Substract";
  $pen[1]="Add";
  echo "Action: <select name=\"pid\">";
  for($i=0;$i<count($pen);$i++)
  {
  echo "<option value=\"$i\">$pen[$i]</option>";
  }
  echo "</select>
";
  echo "Reason: <input name=\"pres\" maxlength=\"100\"/>
";
  echo "Plusses: <input name=\"pval\" style=\"-wap-input-format: '*N'\" maxlength=\"3\"/>
";
  echo "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
  echo "<input type=\"Submit\" value=\"Edit User\" Name=\"Submit\"/></form>";
  }
  echo "
[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p></body>";
exit()
}
////////////////////////////////////////plusses

else if($action=="pls")
{
    $pid = $_POST["pid"];
    $who = $_POST["who"];
    $pres = $_POST["pres"];
    $pval = $_POST["pval"];
      echo "<head>";
      echo "<title>Admin Tools</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
  echo "<p align=\"center\">";
  if(!isadmin(getuid_sid($sid)))
  {
  echo "Permission Denied!";
  }else{
$unick = getnick_uid($who);
$opl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));

if($pid=='0')
{
  $npl = $opl[0] - $pval;
}else{
    $npl = $opl[0] + $pval;
}
if($npl<0)
{
  $npl=0;
}
  if(trim($pres)=="")
  {
    echo "<img src=\"../phpThumb/phpThumb.php?src=../images/notok.gif\" alt=\"X\"/>You must Specify a reson for updating $unick's Plusses";
  }else{
    
    $res = mysql_query("UPDATE ibwf_users SET lastplreas='".mysql_escape_string($pres)."', plusses='".$npl."' WHERE id='".$who."'");
    if($res)
          {
            mysql_query("INSERT INTO ibwf_mlog SET action='penalties', details='[b]".getnick_uid(getuid_sid($sid))."[/b] Updated [b]".$unick."[/b] plusses from ".$opl[0]." to $npl', actdt='".time()."'");
            echo "<img src=\"../phpThumb/phpThumb.php?src=../images/ok.gif\" alt=\"O\"/>$unick's Plusses Updated From $opl[0] to $npl";
          }else{
            echo "<img src=\"../phpThumb/phpThumb.php?src=../images/notok.gif\" alt=\"X\"/>Database Error";
          }
  }
  }
  echo "

[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p></body>";
}

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

learner Lead · 587 posts #3

thanks brumi bru but i not wanted manual i wanted i wanted automic if user visit a page then pluss get deducted and if visit anothar page pluss get added. how to bru?

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

inet Senior · 264 posts #4

thanks brumi bru but i not wanted manual i wanted i wanted automic if user visit a page then pluss get deducted and if visit anothar page pluss get added. how to bru?

a good idea! bro.. like this i have seen this from ***** i downloaded from somewhere! search and search!

CODE // lets give him bonnus visting this page! if(enters==$lastlocation) { mysql_query("UPDATE ibwf_users SET plusses=plusses+'5' WHERE id='".$uid."'"); }

or use this..........................

if($action=="main") { addvisitor(); addonline(getuid_sid($sid),"Forum Index","index.php?action=$action"); add_place_detected(getuid_sid($sid),"index.php?action=main",""); mysql_query("UPDATE ibwf_users SET plusses=plusses+'5' WHERE id='".uid."'"); //just add this + or -

Services

Are you looking to take your wap or wapsite to a higher level? Do you want to stand out and rise above your competitors?

Below is a list of services I offer:

Wap Design and Customized Coding -The first way to stand out in a crowd is to have a brilliant and unique design for your wap or wapsite.

Rates

General consulting – My current hourly rate is $100 / hour. Custom Wapsite Community - My current rate is $500 / Wap Community Development.

inet Senior · 264 posts #7

inet bru its not work 😢

just add this

this works...

CODEmysql_query("UPDATE ibwf_users SET plusses=plusses+'5' WHERE id='".uid."'");

or this

mysql_query("UPDATE ibwf_users SET plusses=plusses-'5' WHERE id='".uid."'");

in

Example: if($action=="main"){

mysql_query("UPDATE ibwf_users SET plusses=plusses-'5' WHERE id='".uid."'");

//add the other codes below

}

Services

Are you looking to take your wap or wapsite to a higher level? Do you want to stand out and rise above your competitors?

Below is a list of services I offer:

Wap Design and Customized Coding -The first way to stand out in a crowd is to have a brilliant and unique design for your wap or wapsite.

Rates

General consulting – My current hourly rate is $100 / hour. Custom Wapsite Community - My current rate is $500 / Wap Community Development.

learner Lead · 587 posts #10

sorry inet bru i do it wrong it is working but its sets the plusses its not upadting if u have 500 plusses and u put this code to -5 then all ur plusses gets disappeared and it becomes -5 :o

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

inet Senior · 264 posts #11

sorry inet bru i do it wrong it is working but its sets the plusses its not upadting if u have 500 plusses and u put this code to -5 then all ur plusses gets disappeared and it becomes -5 :o

the previous script works with my 3rd domain site...

you must use this one... this works with wapdesire!

CODE $facedown = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'")); $facedown= $facedown[0]; $ugpl2 = $facedown - "50"; mysql_query("UPDATE ibwf_users SET plusses='".$ugpl2."' WHERE id='".$uid."'");

Services

Are you looking to take your wap or wapsite to a higher level? Do you want to stand out and rise above your competitors?

Below is a list of services I offer:

Wap Design and Customized Coding -The first way to stand out in a crowd is to have a brilliant and unique design for your wap or wapsite.

Rates

General consulting – My current hourly rate is $100 / hour. Custom Wapsite Community - My current rate is $500 / Wap Community Development.

inet Senior · 264 posts #13

this works bru yay thank you inet bru

welcome bro...

yay yes! i had made it again..

i will help you again next time...

Services

Are you looking to take your wap or wapsite to a higher level? Do you want to stand out and rise above your competitors?

Below is a list of services I offer:

Wap Design and Customized Coding -The first way to stand out in a crowd is to have a brilliant and unique design for your wap or wapsite.

Rates

General consulting – My current hourly rate is $100 / hour. Custom Wapsite Community - My current rate is $500 / Wap Community Development.

inet Senior · 264 posts #15

this above topic will give you chance to charge plusses per visit of a certain page... add or deduct.. hehehehehe 🙄 bye for now i have to go....

Services

Are you looking to take your wap or wapsite to a higher level? Do you want to stand out and rise above your competitors?

Below is a list of services I offer:

Wap Design and Customized Coding -The first way to stand out in a crowd is to have a brilliant and unique design for your wap or wapsite.

Rates

General consulting – My current hourly rate is $100 / hour. Custom Wapsite Community - My current rate is $500 / Wap Community Development.

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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