1 Star 3 Fork 2

mojie126/HDCN-PT

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
donate.php 4.31 KB
一键复制 编辑 原始数据 按行查看 历史
mojie126 提交于 2015-01-31 21:09 . 支付宝捐赠直接填写好
<?php
require "include/bittorrent.php";
dbconn();
require_once(get_langfile_path());
if ($enabledonation != 'yes')
stderr($lang_donate['std_sorry'], $lang_donate['std_do_not_accept_donation']);
$do = $_GET['do'];
if ($do == 'thanks') {
stderr($lang_donate['std_success'], $lang_donate['std_donation_success_note_one'] . "<a href=\"sendmessage.php?receiver=" . $ACCOUNTANTID . "\"><b>" . $lang_donate['std_here'] . "</b></a>" . $lang_donate['std_donation_success_note_two'], false);
} else {
$paypal = safe_email($PAYPALACCOUNT);
if ($paypal && check_email($paypal))
$showpaypal = true;
else
$showpaypal = false;
$alipay = safe_email($ALIPAYACCOUNT);
if ($alipay && check_email($alipay))
$showalipay = true;
else
$showalipay = false;
if ($showpaypal && $showalipay)
$tdattr = "width=\"50%\"";
elseif ($showpaypal || $showalipay)
$tdattr = "colspan=\"2\" width=\"100%\"";
else
stderr($lang_donate['std_error'], $lang_donate['std_no_donation_account_available'], false);
stdhead($lang_donate['head_donation']);
begin_main_frame();
print("<h2>" . $lang_donate['text_donate'] . "</h2>");
print("<table width=100%><tr>");
print("<td colspan=2 class=text align=left>" . $lang_donate['text_donation_note'] . "</td></tr>");
print("<tr>");
if ($showpaypal) {
?>
<td class=text align=left valign=top <?php echo $tdattr ?>>
<b><?php echo $lang_donate['text_donate_with_paypal'] ?></b><br /><br />
<?php echo $lang_donate['text_donate_paypal_note'] ?>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="<?php echo $paypal; ?>">
<input type="hidden" name="item_name" value="Donation to <?php echo $SITENAME; ?>">
<p align="center">
<br />
<?php echo $lang_donate['text_select_donation_amount'] ?>
<br />
<select name="amount">
<option value="" selected><?php echo $lang_donate['select_choose_donation_amount'] ?></option>
<?php
$allowedDonationUsdAmounts = array(0, 1, 5, 10, 15, 20, 30, 40, 50, 60, 100, 300);
//$allowedDonationUsdAmounts = array(32, 64, 320);
foreach ($allowedDonationUsdAmounts as $amount) {
if ($amount == 0) {
echo '<option value="">' . $lang_donate['select_other_donation_amount'] . '</option>';
} else {
$amount = number_format($amount, 2);
echo '<option value=' . $amount . '>' . $lang_donate['text_usd_mark'] . $amount . $lang_donate['text_donation'] . '</option>';
}
}
?>
</select>
<input type="hidden" name="image_url" value="">
<input type="hidden" name="shipping" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="return" value="<?php echo get_protocol_prefix() . $BASEURL; ?>/donate.php?do=thanks">
<input type="hidden" name="cancel_return" value="<?php echo get_protocol_prefix() . $BASEURL; ?>/donate.php">
<br />
</p>
<p align="center">
<input type="image" src="pic/paypalbutton.gif" border="0" name="I1" alt="用PayPal付款">
<br /><br /></p>
</form></td>
<?php
}
if ($showalipay) {
?>
<td class=text align=left valign=top <?php echo $tdattr ?>>
<b><?php echo $lang_donate['text_donate_with_alipay'] ?></b><br /><br />
<form action="https://shenghuo.alipay.com/send/payment/fill.htm" method="post" target="_blank">
<input type="hidden" value="<?= $alipay ?>" name="optEmail">
<input type="hidden" value="5" name="payAmount">
<?php
print("<input type=\"hidden\" name=\"title\" placeholder=\"付款说明\" value=\"" . $CURUSER['username'] . "-Donate" . "\">");
echo $lang_donate['text_donate_alipay_note_one'] . "<b>" . $alipay . "</b>" . $lang_donate['text_donate_alipay_note_two'];
?>
<br /><br /><br /><br /><br />
<p align="center">
<input type="image" src="pic/alipaybutton.gif" border="0" name="I2" alt="用支付宝付款" />
<br /><br /></p>
</form></td>
<?php
}
print("</tr>");
print("<tr><td class=text colspan=2 align=left>" . $lang_donate['text_after_donation_note_one']
. "<a href=\"sendmessage.php?receiver=" . $ACCOUNTANTID . "\"><font class=\"striking\"><b>" . $lang_donate['text_send_us'] . "</b></font></a>" . $lang_donate['text_after_donation_note_two'] . "</td></tr>");
print("</table>");
end_main_frame();
stdfoot();
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/mojie126/HDCN-PT.git
git@gitee.com:mojie126/HDCN-PT.git
mojie126
HDCN-PT
HDCN-PT
master

搜索帮助