-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
107 lines (98 loc) · 4.11 KB
/
index.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
include_once("config.php");
include_once("version.php");
if($use_map == 'Rocketmap' and !file_exists(__DIR__.'/.htpasswd')) {
$handle = fopen(__DIR__.'/.htpasswd', 'a');
fclose($handle);
}
if(!file_exists(__DIR__.'/admin/msg.php') and file_exists(__DIR__.'/admin/msg_example.php')) {
copy(__DIR__."/admin/msg_example.php",__DIR__."/admin/msg.php");
}
$query = "SELECT * FROM products ORDER BY id ASC";
$result = $mysqli->query($query);
$query_cha = "SELECT * FROM channels ORDER BY name ASC";
$result_cha = $mysqli->query($query_cha);
?>
<!DOCTYPE html>
<html dir="ltr" lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?=$WebsiteTitle ?></title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="pageHeaderFacade" class="pageHeaderFacade">
<div class="layoutBoundary">
<div id="pageHeaderLogo" class="pageHeaderLogo">
<a href="<?=$WebsiteUrlHeader ?>">
<img src="<?=$pageHeaderLogoLarge ?>" alt="" class="pageHeaderLogoLarge" style="width: 350px;height: 165px">
<img src="<?=$pageHeaderLogoSmall ?>" alt="" class="pageHeaderLogoSmall">
</a>
</div>
</div>
</div>
<div class="pageNavigation">
<div class="layoutBoundary">
</div>
</div>
<div style="padding-bottom:5px; padding-top:15px; font-size:24px; font-weight:bold; text-align: center;"><?=$organization ?> - Spende</div>
<div style="padding-bottom:8px; text-align: center;"><?=$header ?></div>
<div class="product_wrapper">
<?php
while($row = $result->fetch_array()) {
if($row["months"] > 1) {
$monate = " Monate ";
} else {
$monate = " Monat ";
}
?>
<form method="post" action="process.php">
<table class="procut_item">
<tr>
<td style="width:70%; vertical-align: top;"><h4><?=$row["months"].$monate?> für <?=$row["item_price"]?> € <span style="font-size:12px">(<?=number_format($row["item_price"]/$row["months"], 2, ',', '.');?> €/mtl.)</span></h4>(das Abo beginnt mit dem Tag der Zahlung und endet automatisch nach <?=$row["abo_days"]?> Tagen)</td>
<td style="width:30%;">
<input type="hidden" name="itemname" value="<?=$row["months"]?> Monat Abo" />
<input type="hidden" name="itemnumber" value="<?=$row["item_number"]?>" />
Dein Telegram Benutzername: <br><input class="input" size="10" type="text" name="itemdesc" value="" required /> <span style="font-size:11px">(beginnend mit @)</span>
<?php if($use_map == "PMSF") { ?>
<br>Deine eMail: <input class="input" size="10" type="text" name="itemdesc2" value="" />
<?php } ?>
<input type="hidden" name="itemprice" value="<?=$row["item_price"]?>" />
<input type="hidden" name="itemQty" value="1" />
<p>
<?php
if($AccessAllChannels === false) {
foreach ( $mysqli->query("SELECT * FROM channels ORDER BY name ASC") as $channel ) {
?>
<input id="<?=$row["item_price"].$channel["id"]?>" type="checkbox" name="added[]" value="<?=$channel["id"]?>" checked="checked" /> <label for="<?=$row["item_price"].$channel["id"]?>"><?=$channel["name"]?> beitreten</label><br>
<?php
}
}
?>
</p>
<p>
Zahlungsweise:<br>
<img src="images/paypal.png" alt="Bezahlung mit PayPal" title="Bezahlung mit PayPal" style="width:102px; height:33px;">
</p>
<?php if($showDisclaimer) { ?>
<p>
<input id="<?=$row["item_price"]?>disclaimer" type='checkbox' name='disclaimer' required /> <label for="<?=$row["item_price"]?>disclaimer">Ich akzeptiere die Regeln im <a href="disclaimer.php">Disclaimer</a></label>
</p>
<?php } ?>
<p>
<input class="dw_button" type="submit" name="submitbutt" value="Weiter zu Paypal" />
</p>
</td>
</tr>
</table>
</form>
<?php
}
///$array = implode(',',$_POST["added"]);
//echo '--> '.$array." --> ".$_POST["itemnumber"];
//print_r($_POST["added"]);
?>
</div>
</body>
</html>