// -------------------------------------------------------------------------
// http://www.heapsoftware.com
// Created By HEAP Software 2011 All Rights Reserved
// 
// COPYRIGHT NOTICE:
// This program may be used but not modified by 
// anyone. By using this program you agree to indemnify 
// HEAP Software and any company programmers from any 
// liability.  Selling or Modifing the code for this program without prior
// written consent is expressly forbidden. Obtain permission before 
// redistributing this program over the Internet or in any 
// other medium. No part of this whole program code shall be reproduced, stored, 
// copied or modified in any way whatsoever without written permission from 
// HEAP Software. The Copyright holder, HEAP Software holds no responsibility
// for errors or omissions. No liability is assumed in any way for damages
// resulting from the use of this software. You may not sell, repackage, redistribute 
// or modify any part of the code or application, or represent it as being your own work 
// without written permission from HEAP Software. Any disagreement of this license behaves 
// as the removal of rights to use this application. HEAP Software reserves the right to modify 
// these terms and the license at any time in the current and future versions without prior notice.
// -------------------------------------------------------------------------
v0.1 Beta - 03/09/11
	Initial Release
v0.2 Beta - 03/10/11
	Added WHMCS Home Page Ticket Code To ReadMe.txt
v0.3 Beta - 03/11/11
	- New Feature: Ticket Attachment Support
	--- Changed Files ----
	includes/aiso-kayako-v4.php
	includes/aiso-kayako-v4-settings.new.php
	modules/support/kayako/viewticket.php
v0.4 Beta - 03/11/11
	- Updated: ReadMe.txt updated to provide directions on Kayako v4 Loginshare with WHMCS
	- Updated: ReadMe.txt updated code for clientareahome.tpl file, replace top Kayako {php}{/php} section with what is in ReadMe.txt file
	- Bug Fix: Fixed blank line ticket on Client home page (clientareahome.tpl) when there are no tickets to display.
	- New Feature: Support for creation of new user in kayako if WHMCS email is not assigned to a user.
	--- Changed Files ----
	includes/aiso-kayako-v4.php
	includes/aiso-kayako-v4-settings.new.php
	modules/support/kayako/submitticket.php
v0.5 Beta - 03/16/11
	- New Feature: Ticket Paging Under the My Support Tab (supporttickets.php)
	--- Changed Files ----
	includes/aiso-kayako-v4.php
	templates/kayako/supporttickets.tpl
	modules/support/kayako/supporttickets.php
	includes/aiso-pagination.class.php
v0.6 Beta - 03/20/11
	- New Feature: Kayako v3 Support via included v3 module, CraigBrassSystems Kayako V3 API is required
	--- Changed Files ----
	includes/nusoap
	includes/aiso-kayako-v3.php
	includes/aiso-kayako-v3-settings.new.php
	modules/support/kayako/viewticket.php
v0.7 Beta - 04/12/11
	- Please make sure you are running Kayako Version 4.01.204 or higher
	- New Feature: Added DoTicketCloseByCustomer function to allow user to close their own tickets from WHMCS
	- Updated: Added $mstrClosedTicketStatusName = "closed"; line to aiso-kayako-v4-settings.new.php
	- Updated: Updated Readme.txt for new kayako version and added code to allow the open ticket count to be listed under Account Statistics
	--- Changed Files ----
	includes/aiso-kayako-v4.php
	includes/aiso-kayako-v4-settings.new.php
v0.8 Beta - 04/22/11
	- Bug Fix: Fixed an issue when looking up users when you have over 1000 users in your Kayako install
	--- Changed Files ----
	includes/aiso-kayako-v4.php
v0.9 Beta - 04/22/11
	- Please make sure you are running PHP 5.3.0 or higher
	- Bug Fix: Speed issue with large user count, re-coded user ID search method to use array filterin
	--- Changed Files ----
	includes/aiso-kayako-v4.php
v0.10 Beta - 04/22/11
	- Bug Fix: Fixed issue with ticket statuses not being displayed. This is an issue with the Kayako API not returning all statuses when using -1 per their docs.
	- Bug Fix: Fixed pagination issue on ticket list page
	--- Changed Files ----
	includes/aiso-kayako-v4.php
	includes/aiso-pagination.class.php
v0.11 Beta - 04/23/11
	- Bug Fix: Fixed issue when cron jobs run in WHMCS and it cannot get the current path for file including causing WHMCS cron job to fail
	--- Changed Files ----
	includes/hooks/editticketsystememail.php
	modules/support/kayako/integrate.php
	modules/support/kayako/submitticket.php
	modules/support/kayako/supporttickets.php
	modules/support/kayako/viewticket.php
v0.12 Beta - 04/24/11
	- Bug Fix: Had to revert changes done in version 0.9 Beta bug fix, as the kayako API forces only 1000 records per API query so I couldnt do more if I wanted to. PHP 5.3 or higher is not required any more.
	- Bug Fix: Fixed newline characters to display correctly in ticket posts
	- Kayako Fix: If you have 4.01.204 then put the included files below into __modules/tickets/api/ folder, per http://dev.kayako.com/browse/SWIFT-1130, this fixes ticket & ticket post order
	--- Changed Files ----
	includes/aiso-kayako-v4.php
	--- Included Files for Kayako v.4.01.204 ----
	class.Controller_Ticket.php
	class.Controller_TicketPost.php
v0.13 Beta - 04/26/11
	- Bug Fix: Fixed issue with file includes and paths within WHMCS area
	--- Changed Files ----
	modules/support/kayako/submitticket.php
	modules/support/kayako/supporttickets.php
	modules/support/kayako/viewticket.php
v0.14 Beta - 04/28/11
	- New Feature: Added the ability for SSL (https) API URLs to work with my code.
	- New Feature/Bug Fix: Fixed an issue where if your logged into WHMCS under a sub account it would use the master account owner email address instead of the sub-account email address. Now you can
		turn this feature on or off as you see fit. Setting it to true or leaving the boolean variable $mblnUseEmailAddressOfAccountOwnerForTickets not defined will use the default method of using
		the master account owner email for tickets. Setting it to false ($mblnUseEmailAddressOfAccountOwnerForTickets = false;) will make the ticket access under the sub account email address instead.
	- Updated: Added $mblnUseEmailAddressOfAccountOwnerForTickets = True; line to aiso-kayako-v4-settings.new.php and aiso-kayako-v3-settings.new.php
	- Updated: Updated Readme.txt for new code for both footer.tpl and clientareahome.tpl pages to support the new feature of which email address to use in WHMCS.
	- Updated: Updated Readme.txt with instructions on how to use an SSL API URL, step 7 section.
	- Bug Fix: There is on some installs funky data formats coming back from the kayako API, I have added code to take the data and put it into an Array instead of a SimpleXML object. This can be done
		via setting in the file includes/aiso-kayako-v4-settings.php, changing the boolean variable to true: $mblnGetUserDataIntoArrayInsteadOfXML = True;
	- Updated: Added $mblnGetUserDataIntoArrayInsteadOfXML = False; line to aiso-kayako-v4-settings.new.php
	--- Changed Files ----
	modules/support/kayako/submitticket.php
	modules/support/kayako/supporttickets.php
	modules/support/kayako/viewticket.php
	includes/aiso-RestClient.class.php
	includes/aiso-kayako-v4.php
v0.15 Beta - 05/2/11
	- Bug Fix: Fixed issue with array searching and departments not showing up with custom user groups
	--- Changed Files ----
	includes/aiso-kayako-v4.php
v0.16 Beta - 05/9/11
	- Bug Fix: Fixed speed issue when loading and dealing with thousands of users via storing the user id in a session
	--- Changed Files ----
	includes/aiso-kayako-v4.php
	includes/hooks/editticketsystememail.php
v0.17 Beta - 05/12/11
	- Bug Fix: Fixed issue with WHMCS user modification and email address changing.
	- Bug Fix: Fixed issue with user id caching and at times cache is not correct.
	--- Changed Files ----
	includes/aiso-kayako-v4.php
v0.18 Beta - 05/24/11
	- Bug Fix: Fixed issue of double loading ticket count on ticket list page which caused more slowness then needed
	--- Changed Files ----
	includes/aiso-kayako-v4.php
	modules/support/kayako/supporttickets.php
v0.19 Beta - 05/27/11
	- Bug Fix: Fixed issue of slow loading of tickets page when user has hundreds of tickets
	- Bug Fix: Fixed Status and Urgency language issue on ticket list page
	--- Changed Files ----
	includes/aiso-kayako-v4.php
v0.20 Beta - 05/27/11
	- Bug Fix: Added boolean variable to enable/disable check of when a user registers in WHMCS and already exists in Kayako. Use variable $mblnDisableKayakoEmailExistsOnRegisterCheck
	- Bug Fix: Fixed issue with WHMCS ticket close button redirect when a WHMCS install is in a sub-directory.
	- Updated: Added $mblnDisableKayakoEmailExistsOnRegisterCheck = False; line to aiso-kayako-v4-settings.new.php
	--- Changed Files ----
	includes/aiso-kayako-v4.php
	includes/hooks/editticketsystememail.php
v0.21 Beta - 05/27/11
	- Bug Fix: Fixed issue with new ticket list code where if user has only 1 ticket the ticket would not display
	--- Changed Files ----
	includes/aiso-kayako-v4.php
v0.22 Beta - 06/10/11
	- Bug Fix: Fixed issue with saving customer profile in WHMCS admin area
	--- Changed Files ----
	includes/hooks/editticketsystememail.php
v0.23 Beta - 06/22/11
	- New Feature: Added Announcements page support for both v3 and v4
	- Updated: Added $mstrAnnouncementsXMLNewsFeed,$mintAnnouncementsNumberOfNewsItemsToShow,$mintAnnouncementsMaxArticleDisplayLength variables to aiso-kayako-v3-settings.new.php and aiso-kayako-v4-settings.new.php
	--- Changed Files ----
	includes/aiso-kayako-v3-settings.new.php
	includes/aiso-kayako-v4-settings.new.php
	modules/support/kayako/announcements.php
v0.24 Beta - 07/29/11
	- Bug Fix: Changed xml2array function name to stop conflicts with other possible modules.
	- Updated: Updated Readme.txt to update code for footer.tpl and clientareahome.tpl to fix some server path issues
	--- Changed Files ----
	includes/aiso-kayako-v4.php
v0.25 Beta - 08/04/11
	- Bug Fix: Fixed code where when creating a new kayako user account, the account would be created but in WHMCS you would get a blank page
	--- Changed Files ----
	includes/aiso-kayako-v4.php
v0.26 Beta - 09/06/11
	- Bug Fix: Fixed doule quote characters to display correctly in ticket posts
	--- Changed Files ----
	includes/aiso-kayako-v4.php