Exemplo n.º 1
0
    }else{
        return TRUE;
    } */
    return TRUE;
}
$realmz = $DB->select("SELECT id,name FROM realmlist ORDER BY name");
foreach($realmz as $aaa) {
$realmzlist .= "<option value='".$aaa['id']."'>".$aaa['name']."</option>";
}
if (isset($_POST['donate_username']) && isset($_POST['donate_items'])){
    $character_item_id = $CHDB->selectCell("SELECT guid FROM `characters` WHERE name='".mysql_real_escape_string($_POST['donate_username'])."'");
    if ($character_item_id != '' && $_POST['donate_username'] != '' && $_POST['donate_items'] != ''){
	$MANG = new Mangos;
		if((int)$MW->getConfig->donation->ra == 1){
			echo "Using Remote Access<br />";
			if ($MANG->mail_item_donation_ra($_POST['donate_items'], $character_item_id, $_POST['donate_realm']) == TRUE){
			}else{
			echo "<p><center>Error: Error in Donate RA system! Contact administrator!</center></p>";
			}
		}else{
			if($MANG->mail_item_donation($_POST['donate_items'], $character_item_id,false,true) == TRUE){
			}else{
				echo "<p><center>Error: Error in mail system! Contact administrator!</center></p>";
			}
		}
        unset($MANG);
	}else{
        echo "<p><b>Character not found</b></p>";
    }
}elseif(isset($_POST['donation_edit'])){
    if ($_POST['edit_id']){
Exemplo n.º 2
0
        if(count($q) > 0){
            foreach($q as $data){
                echo 'Payment Done.<br />';
                if ($data['item_given'] != 1){

                    // Aditional payment checks can be done here.
                    $donations_template = $DB->selectRow("SELECT * FROM `donations_template` WHERE id='".$data['itemnumber']."'");
                    // Ok, we must check if we actually got the money that we asked for.
                    if ($donations_template['donation'] > $data['mc_gross']){
                    	$NOT_MAIL = TRUE;
                    }else{
                        $NOT_MAIL = FALSE;
                    }
                    if ($NOT_MAIL == FALSE){
						if((int)$MW->getConfig->donation->ra){
							if ($MANG->mail_item_donation_ra($data['itemnumber'], $ap['guid'],$rid['id']) == TRUE){
								$DB->query("UPDATE `paypal_payment_info` SET item_given='1' WHERE txnid='".$data[txnid]."'");
								echo $lang['items_sent']."<br /><ul><li>".$lang['username'].": ".$user['username']."</li><li>".$lang['charname'].": ".$ap['name']."</li><li>".$lang['donate']." ".$lang['l_delkey_id'].": ".$data['itemnumber']."</li><li>".$lang['paymentstatus'].": ".$data['paymentstatus']."</li></ul>";
							}else{ 	echo $lang['items_could_not_be_sent']; }
						}else{
							if ($MANG->mail_item_donation($data['itemnumber'], $ap['guid'],$ap['txnid']) == TRUE){
								$DB->query("UPDATE `paypal_payment_info` SET item_given='1' WHERE txnid='".$data[txnid]."'");
								echo $lang['items_sent']."<br /><ul><li>".$lang['username'].": ".$user['username']."</li><li>".$lang['charname'].": ".$ap['name']."</li><li>".$lang['donate']." ".$lang['l_delkey_id'].": ".$data['itemnumber']."</li><li>".$lang['paymentstatus'].": ".$data['paymentstatus']."</li></ul>";
							}else{
								echo $lang['items_could_not_be_sent'];
							}
						} 
					}else{
                    	echo "<ul><li>".$lang['donation_not_face_value']."</li></ul>";
                    }
                }