-
Notifications
You must be signed in to change notification settings - Fork 3
/
donate.php
64 lines (52 loc) · 2.12 KB
/
donate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
if (!isset($lang)){
$lang='en';
}
else {
$lang='fr';
}
$trans['en']['monthly']='Donate this on every month';
$trans['fr']['monthly']='Donner cette somme tous les mois';
$trans['en']['help']='Want to support '.htmlentities($sitename).'? What about a donation?';
$trans['fr']['help']='Vous voulez soutenir '.htmlentities($sitename).' ? Et si vous faisiez un don ?';
$trans['en']['donate']='Donate';
$trans['fr']['donate']='Faire un don';
?>
<script>
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL Version 3 or later
var monthly=false;
function toggleMonthly(){
if (!monthly){
document.getElementById('cmd').value='_xclick-subscriptions';
document.getElementById('amount').name='a3';
document.getElementById('wrapper').innerHTML='<input type="hidden" name="p3" value="1"><input type="hidden" name="t3" value="M"><input type="hidden" name="src" value="1">';
monthly=true;
}
else {
document.getElementById('cmd').value='_xclick';
document.getElementById('amount').name='amount';
document.getElementById('wrapper').innerHTML='';
monthly=false;
}
}
// @license-end
</script>
<span style="font-size:76%;"><?php echo $trans[$lang]['help'];?>
<form target="_blank" name="_xclick" action="https://www.paypal.com/fr/cgi-bin/webscr" method="post" >
<input type="hidden" id="cmd" name="cmd" value="_xclick" />
<input type="hidden" name="custom" value="<?php echo microtime(true);?>"/>
<input type="hidden" name="business" value="<?php echo htmlspecialchars($donationpaypaladdress);?>" />
<input type="hidden" name="item_name" value="<?php echo htmlspecialchars($sitename); ?> - Donate" />
<input type="hidden" name="currency_code" value="EUR" />
<input type="text" size="1" id="amount" name="amount" value="2.50" /> € (EUR)
<span id="wrapper"></span>
<input type="checkbox" onClick="toggleMonthly();" /><?php echo $trans[$lang]['monthly'] ;?>
<input type="submit" name="submit" value="<?php echo $trans[$lang]['donate']?>" />
</form>
<?php
if (file_exists('./supporters') && is_dir('./supporters')){
echo '<a href="./supporters">Our supporters</a>';
}
?>
</span>
<?php ?>