Update of /cvsroot/e-ark/e-ark
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv31113
Modified Files:
voters_report_page.php
Log Message:
Fixed a system warning in voters report + updated cut off date.
Index: voters_report_page.php
===================================================================
RCS file: /cvsroot/e-ark/e-ark/voters_report_page.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** voters_report_page.php 14 May 2006 12:43:40 -0000 1.3
--- voters_report_page.php 1 Aug 2008 01:13:52 -0000 1.4
***************
*** 4,8 ****
# eArk
#
! # Copyright (C) 2003-2004 e-Ark Team - Diocese of Sydney and Affiliated Regions
#
# This program is distributed under the terms and conditions of the GPL
--- 4,8 ----
# eArk
#
! # Copyright (C) 2003-2008 e-Ark Team - Diocese of Sydney and Affiliated Regions
#
# This program is distributed under the terms and conditions of the GPL
***************
*** 29,33 ****
$diocese_db->connect();
! $t_core_parishioners = table( 'core_parishioners' );
$t_core_families = table( 'core_families' );
$t_core_family_members = table( 'core_family_members' );
--- 29,33 ----
$diocese_db->connect();
! $t_core_parishioners = table( 'core_parishioners' );
$t_core_families = table( 'core_families' );
$t_core_family_members = table( 'core_family_members' );
***************
*** 40,47 ****
( fm.parishioner_id = p.parishioner_id ) AND ( f.family_id = fm.family_id ) AND ( f.address_id = a.address_id ) AND ( s.suburb_id = a.suburb_id )";
! if ( access_limited_to_one_parish() )
! $f_parish_id = access_get_parish_id();
! else if ( $f_parish_id != 0 )
{
$query .= " AND ( p.primary_parish_id = " . (int)$f_parish_id . ')';
--- 40,47 ----
( fm.parishioner_id = p.parishioner_id ) AND ( f.family_id = fm.family_id ) AND ( f.address_id = a.address_id ) AND ( s.suburb_id = a.suburb_id )";
! if ( access_limited_to_one_parish() )
! $f_parish_id = access_get_parish_id();
! if ( $f_parish_id != 0 )
{
$query .= " AND ( p.primary_parish_id = " . (int)$f_parish_id . ')';
***************
*** 66,70 ****
$t_result = $diocese_db->execute( $query );
! $t_parishioners_details = array();
$t_last_parishioner = null;
--- 66,70 ----
$t_result = $diocese_db->execute( $query );
! $t_parishioners_details = array();
$t_last_parishioner = null;
***************
*** 75,100 ****
$t_parishioner = $diocese_db->parishioner_load( $t_parishioner_id );
! $t_age = $t_parishioner->get_age( '2005-11-06' );
if ( ( $t_age !== false ) && ( $t_age >= 18 ) )
{
! $t_parishioner_details = array();
! $t_parishioner_details["Id"] = $t_parishioner->get_id();
! $t_parishioner_details["Surname"] = $t_parishioner->get_last_name();
! $t_parishioner_details["FirstName"] = $t_parishioner->get_first_name();
! $t_post_code = $t_result->fields['post_code'];
! if ( is_numeric( $t_post_code ) && strlen( $t_post_code ) == 4 )
! $t_parishioner_details["PostCode"] = $t_result->fields['post_code']; # $t_address->get_post_code();
! else
! $t_parishioner_details["PostCode"] = '????';
! $t_parishioner_details["Age"] = $t_age;
! # filter out the duplicates
! if ( ( $t_last_parishioner === null ) ||
! ( $t_last_parishioner['Surname'] != $t_parishioner_details['Surname'] ) ||
! ( $t_last_parishioner['FirstName'] != $t_parishioner_details['FirstName']) ||
! ( $t_last_parishioner['PostCode'] != $t_parishioner_details['PostCode'] ) )
$t_parishioners_details[] = $t_parishioner_details;
--- 75,100 ----
$t_parishioner = $diocese_db->parishioner_load( $t_parishioner_id );
! $t_age = $t_parishioner->get_age( '2008-11-02' );
if ( ( $t_age !== false ) && ( $t_age >= 18 ) )
{
! $t_parishioner_details = array();
! $t_parishioner_details["Id"] = $t_parishioner->get_id();
! $t_parishioner_details["Surname"] = $t_parishioner->get_last_name();
! $t_parishioner_details["FirstName"] = $t_parishioner->get_first_name();
! $t_post_code = $t_result->fields['post_code'];
! if ( is_numeric( $t_post_code ) && strlen( $t_post_code ) == 4 )
! $t_parishioner_details["PostCode"] = $t_result->fields['post_code']; # $t_address->get_post_code();
! else
! $t_parishioner_details["PostCode"] = '????';
! $t_parishioner_details["Age"] = $t_age;
! # filter out the duplicates
! if ( ( $t_last_parishioner === null ) ||
! ( $t_last_parishioner['Surname'] != $t_parishioner_details['Surname'] ) ||
! ( $t_last_parishioner['FirstName'] != $t_parishioner_details['FirstName']) ||
! ( $t_last_parishioner['PostCode'] != $t_parishioner_details['PostCode'] ) )
$t_parishioners_details[] = $t_parishioner_details;
|