Browse Source

Fix up last remains for new php

pull/12/head
falkTX 6 years ago
parent
commit
a9f52e73d4
2 changed files with 6 additions and 10 deletions
  1. +3
    -3
      DonationsStats.php
  2. +3
    -7
      includes/header.php

+ 3
- 3
DonationsStats.php View File

@@ -28,10 +28,10 @@ $total_year = 0.0;

$donation_count = 0.0;

$sql_donations = mysql_query("SELECT * FROM donations WHERE YEAR(dt) = " . $year);
$sql_donations = mysqli_query($db_link, "SELECT * FROM donations WHERE YEAR(dt) = " . $year);

if (mysql_num_rows($sql_donations)) {
while ($sql_row = mysql_fetch_assoc($sql_donations)) {
if (mysqli_num_rows($sql_donations)) {
while ($sql_row = mysqli_fetch_assoc($sql_donations)) {
$amount = $sql_row["amount"];
$donation_count += 1.0;
if ($amount > $max_month) {


+ 3
- 7
includes/header.php View File

@@ -1,16 +1,12 @@
<?php
$SHOW_NOTE = TRUE;
$SHOW_NOTE = FALSE;
$ROOT = FALSE;

if (file_exists("/home/falktx/.jackdrc") || file_exists("/home/daeavelwyn/public_html/kxstudio/"))
{
$ROOT = "/kxstudio";
$SHOW_NOTE = FALSE;
}
else
{
$ROOT = "";
$SHOW_NOTE = FALSE;
}

if ($PAGE_TYPE != "PASTE" && $PAGE_TYPE != "DONATIONS" && $PAGE_TYPE != "NAMESPACE") {
require "donate/config.php";
@@ -23,7 +19,7 @@ if ($PAGE_TYPE != "PASTE" && $PAGE_TYPE != "DONATIONS" && $PAGE_TYPE != "NAMESPA
$sql_donations = mysqli_query($db_link, "SELECT * FROM donations WHERE MONTH(dt) = MONTH(NOW()) AND YEAR(dt) = YEAR(NOW())");

if (mysqli_num_rows($sql_donations)) {
while ($sql_row = mysql_fetch_assoc($sql_donations)) {
while ($sql_row = mysqli_fetch_assoc($sql_donations)) {
$cur_amount += $sql_row["amount"];
}
}


Loading…
Cancel
Save