Changeset View
Changeset View
Standalone View
Standalone View
fundraisers/yearend2014/index.php
Show All 12 Lines | 1 | <?php | |||
---|---|---|---|---|---|
13 | $pageConfig = array_merge($pageConfig, [ | 13 | $pageConfig = array_merge($pageConfig, [ | ||
14 | 'title' => i18n_noop("Make the World a Better Place! - KDE End of Year 2014 Fundraising"), | 14 | 'title' => i18n_noop("Make the World a Better Place! - KDE End of Year 2014 Fundraising"), | ||
15 | 'cssFile' => '/css/announce.css' | 15 | 'cssFile' => '/css/announce.css' | ||
16 | ]); | 16 | ]); | ||
17 | 17 | | |||
18 | require('../../aether/header.php'); | 18 | require('../../aether/header.php'); | ||
19 | $site_root = "../../"; | 19 | $site_root = "../../"; | ||
20 | 20 | | |||
21 | require("donations_auth.inc"); | 21 | require("config.php"); | ||
22 | 22 | | |||
23 | $query = "select count(*) from yearend2014donations;"; | 23 | $countStmt = $dbConnection->prepare("SELECT COUNT(*) FROM yearend2014donations ORDER BY CREATED_AT DESC;"); | ||
24 | $q = mysql_query($query,$sq); | 24 | $countStmt->execute(); | ||
25 | echo mysql_error(); | 25 | $n = $countStmt->fetchColumn(); | ||
26 | $row = mysql_fetch_array($q); | 26 | | ||
27 | $index = $row[0]; | 27 | $res = $dbConnection->prepare("SELECT *, UNIX_TIMESTAMP(CREATED_AT) AS date_t FROM yearend2014donations ORDER BY CREATED_AT DESC;"); | ||
28 | 28 | $res->execute(); | |||
29 | $query = "select *,unix_timestamp(date) as date_t from yearend2014donations order by date desc;"; | | |||
30 | $q = mysql_query($query,$sq); | | |||
31 | echo mysql_error(); | | |||
32 | $total = 0; | 29 | $total = 0; | ||
33 | $table = "<table border='1' width='100%'>"; | 30 | $table = "<table border='1' width='100%'>"; | ||
34 | $table.="<tr><th width='20'></th><th width='180'>".i18n_var("Date")."</th><th width='80'>".i18n_var("Amount")."</th><th style='text-align:left'>".i18n_var("Donor Name")."</th></tr>"; | 31 | $table.="<tr><th width='20'></th><th width='180'>".i18n_var("Date")."</th><th width='80'>".i18n_var("Amount")."</th><th style='text-align:left'>".i18n_var("Donor Name")."</th></tr>"; | ||
35 | while ($row = mysql_fetch_array($q)) { | 32 | while ($row = $res->fetch()) { | ||
36 | $msg = htmlspecialchars($row["message"]); | 33 | $msg = htmlspecialchars($row["message"]); | ||
37 | if ($msg == "") { | 34 | if ($msg == "") { | ||
38 | $msg = "<i>".i18n_var("Anonymous donation")."</i>"; | 35 | $msg = "<i>".i18n_var("Anonymous donation")."</i>"; | ||
39 | } | 36 | } | ||
40 | $amount = $row["amount"]; | 37 | $amount = $row["amount"]; | ||
41 | $table.="<tr>"; | 38 | $table.="<tr>"; | ||
42 | $table.="<td align='center'>".$index."</td>"; | 39 | $table.="<td align='center'>".$index."</td>"; | ||
43 | $table.="<td align='center'>".date("jS F Y", $row["date_t"])."</td>"; | 40 | $table.="<td align='center'>".date("jS F Y", $row["date_t"])."</td>"; | ||
▲ Show 20 Lines • Show All 257 Lines • Show Last 20 Lines |