Skip to content

Commit

Permalink
Cleans up the code in relation to ec886a9 .
Browse files Browse the repository at this point in the history
  • Loading branch information
fspc committed Oct 28, 2018
1 parent ec886a9 commit 23ce8ff
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions stats/paid_members.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,6 @@

mysql_select_db($database_YBDB, $YBDB);

$today = date("Y/m/d");
$year_ago = date("Y/m/d", strtotime("$today -1 year"));

$today_date = new DateTime('now');
$past = new DateTime($year_ago);
$interval = $today_date->diff($past);

$chosen_date = $today;
$days_range1 = $interval->days;
$days_range2 = 0;

// Do some ajax stuff
if (isset($_POST['range1'])) {
$range1 = $_POST['range1'];
$range2 = $_POST['range2'];

$choice1 = new DateTime($range1);
$interval = $today_date->diff($choice1);
$days_range1 = $interval->days;

$choice2 = new DateTime($range2);
$interval = $today_date->diff($choice2);
$days_range2 = $interval->days;

$year_ago = $range1;
$today = $range2;
}

// Membership via volunteering
$query = "SELECT contact_id, full_name, normal_full_name, email, phone, sort_visits, sort_hours FROM
(SELECT contacts.contact_id, CONCAT(last_name, ', ', first_name, ' ',middle_initial) AS full_name,
Expand Down Expand Up @@ -94,7 +66,7 @@
<tr>
<td class="yb_standardRIGHTred"><a href="<?php echo "{$page_individual_history_log}?contact_id=" . $result['contact_id']; ?>"><?php echo $result['full_name']; ?></a></td>
<td class="yb_standardRIGHTred"><?php
if( strtotime($result['expiration_date']) <= local_datetime() ) {
if( strtotime($result['expiration_date']) <= time() ) {
echo $result['expiration_date'];
} else {
echo "<span style='color:blue;'>" . $result['expiration_date'] . "</span>";
Expand Down

0 comments on commit 23ce8ff

Please sign in to comment.