Hi all,
first of all, i hope i can get some help here, cause im realy stuck:( I am relativly new in the php/mysql scene, worked on some minor projects before, but this is my first big one.
Okay, the idee was to create a donate page, true admin menu the admin can edit, add and delete donation types. The way this donation file will be used is for a online game, and when you donate, you receive a item.
Normaly i get a list of items you can purchace trough donation, but i’d like to alter the page so you can see one small dropdown menu, the name of the character and a donation button. This is what i got, but it doesnt work:(
[code]<?php if($user['id']>0){ ?>
.postContainerPlain { font-family:arial,palatino, georgia, verdana, arial, sans-serif; color:#000000; padding:5px; margin-bottom: 4px; font-size: x-small; font-weight: normal; background-color: #E7CFA3; background-image: url('<?php echo $MW->getConfig->temp->template_href;?>images/light.jpg'); border-style: solid; border-color: #000000; border-width: 0px; border-bottom-width:1px; border-top-width:1px; line-height:140%; } .postBody { padding:10px; line-height:140%; font-size: small; } .title { font-family: palatino, georgia, times new roman, serif; font-size: 13pt; color: #640909; } small {font-family: verdana, arial, sans-serif; font-size:8pt; font-weight:normal;} .smallBold {font-family:verdana, arial, sans-serif; font-size:11px; font-weight:bold;} #text { position: absolute; top: 128px; left: 0px; } #char { position: absolute; top: -103; left: -20; } #wrapper { position: relative; z-index: 100; } #wrapper99 { position: relative; z-index: 99; }
|
// End Templates Start Content //
if (isset($_GET[‘pay’]) && $_GET[‘pay’] == ‘finish’){
$MANG = new Mangos;
$ep = $CHDB->select(“SELECT * FROM characters
WHERE account=’”.$user[‘id’]."’");
foreach($ep as $ap){
$charid = $ap[“guid”];
$q = $DB->select(“SELECT * FROM paypal_payment_info
WHERE itemname=’”.$charid."’ AND item_given != ‘1’");
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 ($MANG->mail_item_donation($data['itemnumber'], $ap['guid'],$ap['txnid']) == TRUE){
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>";
}
}
}
}else{
$no_chars++;
}
}
// Add message if we dont find any donation.
if ($no_chars){
echo "<p>".$lang['no_donations_found_for']." <b>".$user['username']."</b>!</p>";
}
unset($MANG);
}elseif (isset($_GET[“pay”]) && $_GET[“pay”] == ‘dublicate’){
output_message(‘alert’,$lang[‘donation_dup_error’].’’);
}
else{
?>
<?php echo $lang['donation_page_desc'];?>
<? $query="SELECT * FROM `donations_template` ORDER BY id"; ?> 1. Select The Gift You Would Like: <?php $q = $DB->select(“SELECT * FROM } ?>
|
The list shows, the items are put in the dropdown box, but when you select one, and press donate, on paypal you dont see the item you’ve chosen, but the last one of the dropdown list:(. This happens to all of the select items.
Does anyone know what i did wrong and how to fix this problem?
ps, im dutch, so sorry for my bad english