/* Local Exchange version 0.4.0 release notes */

/* 13-01-2009 Chris Macdonald <chris@cdmweb.co.uk>, Rob Follett <robf@letsf.co.uk> */

*****************************************************
/* New Functionality */

[BUG-FIX] 'Take Monthly Fee' and 'Refund Monthly Fee' now function properly
[BUG-FIX] Resolved htmlspecialchars() issue when creating/editing a 'Joint' member
[BUG-FIX] 'Edit member' now properly saves changes to join date and dob

[ADDED] Ability to add/edit static pages from the admin (uses MySQL) 
[ADDED] Extra layer of security to screen data going to MySQL - admin can also define a 'Safe List' of HTML Tags
[ADDED] New options re handling of out-of-balance situations (this no longer has to result in a 'fatal' error); also added option for admin to be emailed when out-of-balance occurs
[ADDED]	Image Upload for members (based on existing CVS script and uses existing upload-handling class that is used for newsletters) 
[ADDED]	Age, Sex and About Me fields for Member profiles 
[ADDED] Search function and sort options for member directory
[ADDED] Members now have choice of confirming payments sent to them. 
[ADDED] Added ability to Invoice members. 
[ADDED] Provision for admin to 'override' member account balance via admin  
[ADDED] Search by Keyword on Offers/Wants
[ADDED] Pending transactions (payments awaiting confirmation/invoices awaiting payment) can now be viewed from the Exchanges page.  
[ADDED] Have tried simplifying the 'pick member' dropdown by linking it with a textbox - still very much a work in progress
[ADDED] Display PostCode next to Listings in Offers/Wants search results
[ADDED] Option to display Rate on Listings results
[ADDED] Database Balance now appears at top of admin panel, for reference only 

[CHANGE] Inactive members no longer display in Members List
[CHANGE] Got rid of the link to non-existant 'monthly_fee_list.php' in admin
[CHANGE] Some of the default variables in config file
[CHANGE] PDF's/Newsletters now open in a new browser window
[CHANGE] Updated info/credits.php


*****************************************************
/* FILES Changed */


		*member_directory.php: 
			(): added 'Search Members' functionality
			(): added buildCondition() function
			(): rf added condition to prevent inactive members being displayed
		
		*listings.php
			(): added 'Keyword' form field
			(process_data): added 'keyword' value to GET request
			
		*member_edit.php
			(process_data): 'join date' and 'dob' no longer passed incorrectly as Arrays to htmlspecialchars() but instead are passed to htmlspecialchars() a bit later on when broken down into Strings
			(): changed form labels 'Admin Level 1/2' etc to 'Admin' and 'Committee'
			(): added option for user to confirm any payments sent to him/her
			(): added social-networking bits to member profile (age, sex etc)
			(): further edits throughout which handle the 'payment confirmation' preferences and social networking variables
			
		*take_monthly_fee.php
			(): fixed bugs relating to SQL syntax and timestamp formatting
			(already_fee_takenp): fixed SQL string syntax problem
		
		*refund_monthly_fee.php
			(select_time): fixed bug relating to SQL syntax problem
			(transfer_fee): fixed SQL syntax bugs and timestamp formatting problems
			
		*admin_menu.php: 
			(): Added 'current balance' display; Added links to new admin functions (described elsewhere); Removed link to missing 'list_member_fees.php'

		*listings_found.php
			(): added code to filter listings results by Keyword if specified

		*exchange_menu.php
			(): added link to trades_pending.php - this file now also calls the trade class to display the number of pending trades in brackets next to the link
			
		*member_create.php
			(): changed form labels 'Admin Level 1/2' etc to 'Admin' and 'Committee'
			
		*member_profile.php
			(): added a handy link so members can view their profile as others see it
			(): added link to upload/change photo
			
		*trade.php
			(): added lots of additional code to accomodate new Invoicing system and the fact that members now have the option to Confirm any payments sent to them. This form can now be used to send either a payment OR an invoice and I have reworked the code which processes the payment to check whether or not the recipient has elected to Confirm Payments and, if so, store the transaction as 'pending' accordingly. If the user is making a straight payment to a member that HASN'T elected to Confirm Payments then the code will function the same as before - i.e. the recipient gets paid immediately. 
			
		*includes/inc.config.php: 
			(): added options to turn on/off all new features as described
			(): changed 'Hours' to 'LETS Units'
			(): changed 'Directory' to 'Members List'
			(): added preferences for displaying PostCode alongside offers/wants listings
			(): added option to prevent display of inactive members in Members List
			(): added option to UP-scale member images smaller than the standard width specified (set this to FALSE by default as upscaling often results in unsightly pixelation)
			(): added option to strip any JavaScript found in incoming data
			(): added option to set Permission level for submitting all HTML Tags to the MySQL
			(): ... added option to define a 'Safe List' for HTML Tags that all other users are allowed to submit
			(): added option to define how out-of-balance situation should be handled
			(): added option for admin to receive an email when out-of-balance situation occurs
			(): added provision to allow this file to be included directly from the upgrade script (the upgrade needs access to the MySQL credentials in order to run)
			
		*includes/session_handler.php: 
			(): added some wrapper functions to accomodate newer/older versions of PHP (some of the original functions were either deprecated or incompatible with anything older than v4.2.3 - probably not a huge problem in most cases but these changes shouldn't break anything)

		*classes/class.listing.php
			(cListingGroup::DisplayListingGroup): some slight changes to the way Offers/Wants are displayed, including way member name and ID displayed
			(cListingGroup::DisplayListingGroup): added display postcode alongside listings
			(cListingGroup::DisplayListingGroup): Added Rate to listings results and tweaked listings results display
			
		*classes/class.member.php
			(cMember::SaveNewMember): adjusted MySQL query to store the member's 'confirm_payments' preference
			(cMember::LoadMember): adjusted MySQL query to request member's 'confirm_payments' preference
			(cMember::DisplayMemberImg): added this function to get and display member images
			(cMember::DisplayMember): adjusted to accomodate display of member image
		
		*classes/class.person.php
			(cPerson::cPerson): added code to retrieve the new data in the db related to social networking
			(cPerson::SavePerson): altered sql query to store social networking data
			(cPerson::LoadPerson): altered sql query to retrieve social networking data
														 added code to store the retrieved social networking vars in $this-> variables 
			
		*classes/class.trade.php: 
			(): added class cTradesPending to deal with pending trades (the need for which has arisen out of adding in invoicing and payment confirmation functionality)
			(cTrade::MakeTrade): added additional option for handling out-of-balance silently - also code to email admin when out-of-balance occurs
		
		*classes/class.uploads.php
			(cUpload::cUpload): added explicit definition for $filename property - not sure whether this being there or not has any impact on functionality
			(cUpload::DisplayURL): RF added target=_blank to anchor tag
		
		*classes/class.database.php:
			(cDatabase::EscTxt): added call to new HTML screening function
			(cDatabase::ScreenHTML): new HTML screening function
			(cDatabase::ProcessHTMLTag): new function to screen individual HTML tags passed from cDatabase::ScreenHTML
		
		*member_contact_create.php:
			(process_data): fixed htmlspecialchars() issue
		
		*member_contact_edit.php:
			(process_data): fixed htmlspecialchars() issue
				
		*info/credits.php
			(): changes to the copy made by RF			
		
		*includes/inc.global.php:
			(): redefined LOCALX_VERSION to 0.4.0
	
		
*****************************************************
/* FILES Added */

		*pages.php: displays information pages that have been created via the admin interface
		
		*create_info.php: enables admin to create an information page to be stored in sql
		
		*edit_info.php: presents admin with a list of pages that can be edited - we must then pick one to edit
		
		*do_info_edit.php: displays the form for admin to edit the info page just selected in edit_info.php
		
		*delete_info.php: enables admin to delete an information page from the sql
		
		*info_url.php: displays a list of info pages in the sql along with their corresponding URL's (to aid the process of 'hard-coding' these links into the menu)
		
		*classes/class.info.php: the class for handling info pages

		*trades_pending.php: enables user to view/manage pending transactions (i.e. incoming payments/invoices)
		
		*member_photo_upload.php: enables user to upload/replace a photo of him/her
		
		*balance_to_edit.php & edit_balance.php: allows admin to manually override a member's balance
		
		*includes/autocomplete.js: a third-party javascript which handles the new and 'improved' dropdown members box (on Record An Exchange form)


*****************************************************
/* MySQL Changes/Additions */

		*person: 
			adjusted 'phone1_area' and 'phone2_area' to be 5 chars in length
			added 'about_me', 'age', and 'sex' columns
			
		*member: 
			added 'confirm_payments' column		
		
		*ADDED table 'cdm_pages' (to store Info Pages created via admin)
		
		*ADDED table 'trades_pending' (to store Payments that need confirmation, and Invoices that need paying)