Jump to content

Recommended Posts

Ok on my Forum gold system.. I Grab the username..

 

so like

 

USER: input username here

Money: input money here

Comment: comment goes here

 

 

//-------------------------------------------------------------
// Transfer money
//--------------------------------------------------------------
if ($func=="transfer_money")
{
    if ($code=="")
    {
    $templateform = loadtemplate("shop_transfer_money_1");
    eval(template);
    $output = $templateform;
    print_and_exit();
} elseif ($code=="send")
{
    global $HTTP_POST_VARS;
    if (!isset($HTTP_POST_VARS["money"]) OR !is_numeric($HTTP_POST_VARS["money"]) OR $HTTP_POST_VARS["money"]<=0)
    {
        shoperror("Sorry, you can't 0 {$ibforums->vars["shop_currencyname"]}, or a negative amount, nice try though!");
    }
    if ($HTTP_POST_VARS["money"] > $ibforums->member["points"])
    {
        shoperror("You do not have enough {$ibforums->vars["shop_currencyname"]} to send " . currencyformat($HTTP_POST_VARS["money"]));
    }
    
    $money = $HTTP_POST_VARS["money"];
    
    if (!isset($HTTP_POST_VARS["username"]))
    {
        shoperror("You must enter a member to send {$ibforums->vars["shop_currencyname"]} to!");
    }
    $username = addslashes($HTTP_POST_VARS["username"]);
    $DB->query("SELECT id FROM ibf_members WHERE name='". mysql_real_escape_string($username) ."' LIMIT 1");
    if ($DB->get_num_rows()==0)
    {
        shoperror("Recipient does not exist, correct spelling?");
    }
	if (isset($HTTP_POST_VARS["post"]))
        {
            $PM_MSG = htmlspecialchars($HTTP_POST_VARS["post"]);
        }
    $id = $DB->fetch_row();
    $id = $id["id"];
	$money_new = currencyformat($money);
	$timestamp = date("F j, Y, g:i a");
    $month = date(F);
	$year = date(Y);
    $DB->query("UPDATE ibf_members SET points = points + ". mysql_real_escape_string($money) ." WHERE id='" . mysql_real_escape_string($id) . "' LIMIT 1");
    $DB->query("UPDATE ibf_members SET points = points - ". mysql_real_escape_string($money) ." WHERE id=". mysql_real_escape_string($ibforums->member["id"]) ." LIMIT 1");
	$DB->query("INSERT INTO `ibf_logs` (`sender_id` ,`receiver_id` ,`amount` ,`date_time` ,`message`,`month`,`year`) VALUES (' ". mysql_real_escape_string($ibforums->member["id"]) ."', '". mysql_real_escape_string($id) ."', '". mysql_real_escape_string($money_new) ."', '". mysql_real_escape_string($timestamp) ."', '". mysql_real_escape_string($PM_MSG) ."', '". mysql_real_escape_string($month) ."', '". mysql_real_escape_string($year) ."');");


        shop_addlog(array("type" => "M", "targetmemberid" => $id, "actiontext" => "Transfered {$money} {$ibforums->vars["shop_currencyname"]}" ));
        
        $post = "";
        if (isset($HTTP_POST_VARS["post"]))
        {
            $message = htmlspecialchars($HTTP_POST_VARS["post"]);
        }
        
        $recipient = $username;
        $sender = $ibforums->member["name"];
        global $std;
        $timestamp = $std->get_date(time(), "LONG");
        $servicebotname = $ibforums->vars["shop_botname"];
        $currencyname = $ibforums->vars["shop_currencyname"];
        $currency = currencyformat($money);
        
        $templateform = loadtemplate("transfer_money_pm");
        eval(template);
        $pm = $templateform;
        unset($templateform);
        global $std; $pm = $std->clean_value($pm);

        send_pm(array("recipientid" => $id, "title" => "{$ibforums->member["name"]} has sent you Forum Gold!", "message" => $pm, "senderid" => $ibforums->member["id"]));
        redirect("{$currency} sent to {$recipient}", "act=shop");
        exit;
}
    else    
{
    shoperror("Contact your board administrator and ask to be banned... no messing with board input ");
}

}

 

I want it to be like..

 

 

USER ID: input userID here

Money: input money here

Comment: comment goes here

 

 

 

~~~~

So then they put in the user ID OF THE USER Instead of the username!!

 

Help!  Thanks <3

 

 

This is the code taken out of the original to seem less complicated, sorry.

 

// Transfer money
//--------------------------------------------------------------
if ($func=="transfer_money")
{
    if ($code=="")
    {
       $templateform = loadtemplate("shop_transfer_money_1");
       eval(template);
       $output = $templateform;
       print_and_exit();
   } elseif ($code=="send")
   {
       global $HTTP_POST_VARS;
       if (!isset($HTTP_POST_VARS["money"]) OR !is_numeric($HTTP_POST_VARS["money"]) OR $HTTP_POST_VARS["money"]<=0)
       {
           shoperror("Sorry, you can't 0 {$ibforums->vars["shop_currencyname"]}, or a negative amount, nice try though!");
       }
       if ($HTTP_POST_VARS["money"] > $ibforums->member["points"])
       {
           shoperror("You do not have enough {$ibforums->vars["shop_currencyname"]} to send " . currencyformat($HTTP_POST_VARS["money"]));
       }
      
       $money = $HTTP_POST_VARS["money"];
      
       if (!isset($HTTP_POST_VARS["username"]))
       {
           shoperror("You must enter a member to send {$ibforums->vars["shop_currencyname"]} to!");
       }
       $username = addslashes($HTTP_POST_VARS["username"]);
       $DB->query("SELECT id FROM ibf_members WHERE name='". mysql_real_escape_string($username) ."' LIMIT 1");
       if ($DB->get_num_rows()==0)
       {
           shoperror("Recipient does not exist, correct spelling?");
       }
      if (isset($HTTP_POST_VARS["post"]))
        {
            $PM_MSG = htmlspecialchars($HTTP_POST_VARS["post"]);
        }

Sir sorry, But i need you to spit the code back out for me so i can easily read it and copy it pasta back in if you dont mind, I know your mind is 100x smarter then monkuar's GOd please..

 

Thanks bro!! Bring your friends to this topic immediateness i need help i can get!!

 

Thanks again! God blesS!

First of all, I wouldn't know where to start in your code because I have no idea how it works. I'm just giving you suggestions.

 

And all topics here are treated as equal and to the extent which people can offer help. The urgency of your situation will not get you more attention that the other topics so you can stop that.

First of all, I wouldn't know where to start in your code because I have no idea how it works. I'm just giving you suggestions.

 

And all topics here are treated as equal and to the extent which people can offer help. The urgency of your situation will not get you more attention that the other topics so you can stop that.

 

I can actually do whatever I want to get your attention, Thanks tho brotha!

 

Anyone else help me on this issue thx?

I can actually do whatever I want to get your attention, Thanks tho brotha!

 

Seriously, all caps in titles are freaking annoying as all hell. And it is against the rules/terms of service you did agree to when registering/logging in:

 

#2 under the Forum Guidelines

2. Users will not mark their post as being "URGENT" by either making the post ALL CAPS or adding any hint that they need it done Quick or ASAP. All posts are treated equal, your post is no more important than any other user's post on this forum. If it is "URGENT" pay someone to do it.

 

So please, do not do it as you are saying your matter is more important than someone else's. If it is that urgent post in the freelance section and pay someone to do it. Honestly, I ignore all posts that have caps in the title due to the disrespect it gives other users who obey the rules. Following the guidelines will help your topic get answered faster than not following them.

 

And being an asshole certainly will not motivate anyone to help you out.

 

Thanks.

I can actually do whatever I want to get your attention, Thanks tho brotha!

 

Seriously, all caps in titles are freaking annoying as all hell. And it is against the rules/terms of service you did agree to when registering/logging in:

 

#2 under the Forum Guidelines

2. Users will not mark their post as being "URGENT" by either making the post ALL CAPS or adding any hint that they need it done Quick or ASAP. All posts are treated equal, your post is no more important than any other user's post on this forum. If it is "URGENT" pay someone to do it.

 

So please, do not do it as you are saying your matter is more important than someone else's. If it is that urgent post in the freelance section and pay someone to do it. Honestly, I ignore all posts that have caps in the title due to the disrespect it gives other users who obey the rules. Following the guidelines will help your topic get answered faster than not following them.

 

And being an asshole certainly will not motivate anyone to help you out.

 

Thanks.

didnt even read it, lol

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.