id; } page_head(PROJECT." donations"); if (function_exists("donations_intro")) { donations_intro(); } else { echo "
This project is accepting donations via PayPal.
\n"; echo "
To donate, fill in the amount you want to donate using the field below. PayPal is accepting multiple currencies (Canadian Dollars, Euros, Pounds Sterling, U.S. Dollars, Yen, Australian Dollars, New Zealand Dollars, Swiss Francs, Hong Kong Dollars, Singapore Dollars, Swedish Kronor, Danish Kroner, Polish Zloty, Norwegian Kroner, Hungarian Forint, Czech Koruna). You can use included currency converter to see the donation amount equivalent in different currencies (please note that the rates are only estimates and the actual amount may differ).
"; } echo "\n"; $query = mysql_query("SELECT * FROM donation_items"); echo "
\n"; start_table(); // If donation_items table is filled, a list of donation targets is shown $first_row = true; while ($row = mysql_fetch_object($query)) { $col1 = $row->title."
".$row->description.""; $query_amount = mysql_query("SELECT SUM(payment_amount-payment_fee) AS amount FROM donation_paypal WHERE processed = 1 AND item_number = '".$row->id."'"); $acquired = mysql_fetch_object($query_amount)->amount; $required = $row->required; if ($acquired > $required) { $acquired = $acquired - $required; $progress = 100; } else { $progress = round($acquired / ($required) * 100); $progress2 = round($acquired / ($required) * 100,1); } $col2 = "id."\""; if ($first_row) { $first_row = false; $col2 .= " checked=\"checked\""; } $col2 .= ">"; if ($progress == 0) { $col2 .= "
"; } elseif ($progress == 100) { $col2 .= "
"; } else { $col2 .= "
".$progress2."%
"; } row2($col1, $col2); } $amount .= "\n"; $amount .= "\n"; $amount .= "\n"; $estimated .= "\n"; $estimated .= "\n"; echo row2("Amount you would like to donate", $amount); echo row2("Estimated value in", $estimated); if ($user_id) { echo row2("Anonymous donation
Select this if you dont want your name and account number displayed in donator lists.
If not checked, you will be recorded as user ID ".$user_id." (".$logged_in_user->name.")
", ""); } else { echo row2("Anonymous donation
To assign the donation with your user ID, please log in.", " "); } echo row2("", ""); echo row1("Donations are accepted through
\"PayPal\""); end_table(); echo "\n"; page_tail(); ?>