Merge pull request #22 from VJftw/master

Implementation of some useful and additional methods in fs_director, also fixes for ZPPY client not executing install.run on Windows servers.
Removal of phpMyAdmin auto-updater hook of which was merged as part of recently pull request. Removed as per forum post here: http://forums.zpanelcp.com/showthread.php?8215-VJ-s-ZPX-Modules&p=100240&viewfull=1#post100240
The DNS Admin module was missing the correct bound parameter character (:) for the SQL parameter binding of one of the statements, Fixes bug reported here: http://forums.zpanelcp.com/showthread.php?26393-FIX-for-DNS-Admin&p=101991#post101991  and also discussed here: https://github.com/bobsta63/zpanelx/pull/24.
Fixes bug #484 (http://bugs.zpanelcp.com/view.php?id=484) where client accounts could be created without validating the uniqueness of the user email address. Added a new method inside ctrl_users to enable a shared function to check for Unique email addresses on the x_accounts table. This functionality has then been used in the manage_clients module to check and report back if the email address is not unique.
Added fix for DNS CNAME issue where a period was not being added to the end of the target address. This fixes bug #482 (http://bugs.zpanelcp.com/view.php?id=482)
Fixes issues where the MySQL 'REVOKE ALL PRIVILEDGES' syntax was not being run correctly due to the bound parameters, changed the code back for this statement only to run a raw query on the DB to ensure these permissions are revoked correctly, the query parameter values (username and db name) are coming from a prepared and sanitised record set therefore direct sanitization in this instance is not an issue. This fixes bug #483 (http://bugs.zpanelcp.com/view.php?id=483). Tested as working on my development enviroment.
Fixed an issue (still needs testing though!) where the ManageClients XMWS CreateUser request did not work correctly due to a missing controller method, Have now added this in and should work fine. This fixes bug #464 (http://bugs.zpanelcp.com/view.php?id=464)
Updated ZPanel Log file path to log errors in /var/zpanel/logs/zpanel.log by default instead of under the zpanel/panel directory. As part of this fix I also implemented the new upgrade MySQL scripts for CentOS 6.3 and Ubuntu 12.04. This fixes bug #449 (http://bugs.zpanelcp.com/view.php?id=449)
'setzadmin' is now correctly installed for Windows installs, This closes bug #485 (http://bugs.zpanelcp.com/view.php?id=485)
Copying 'setzadmin' into the /usr/bin/ to keep the prepare.sh file uniform, this is done automatically in the Installer files but its obviously good to keep this file updated too!
Added DROP TABLE syntax to the 10.0.3 upgrade scripts for the redundent table and also upgraded each of the installer scripts so that this old table is no longer created during installation. Also fixed the code in the Usage Viewer webservice so that the number of used MySQL databases are queried from the correct 'x_mysql_databases' table instead of 'x_mysql'. This is now ready for full QA testing and will be released as part of the next release of ZPX. This fixes bug #408 (http://bugs.zpanelcp.com/view.php?id=408)
Adds a nice friendly error message when connection to the ZPanel New API cannot be established, instead of the old PHP error - this fixes bug #150 (http://bugs.zpanelcp.com/view.php?id=150)
Adds a nice friendly error message when connection to the ZPanel New API cannot be established, instead of the old PHP error - this fixes bug #150 (http://bugs.zpanelcp.com/view.php?id=150)
Adding new table column into x_accounts to store module category box locations on a per-user basis in the new ZPX 2013 default theme. This fixes bug #485 (http://bugs.zpanelcp.com/view.php?id=486)
A whole load of cleaned up code, bug fixes for bug #490 and bug #491, changes contributed mainly by @5050, I've 'patched' instead of 'merging' to ensure that I was able to modify changes first before committing. With the shire amount of changes here, some shit is BOUND to break here lol! -Ekkkk Testing required by QA team required ASAP if possible, specifically in the following modules:- Manage clients, Sub-domains, Usage viewer, Distribution Lists, Domains, Forwarders, FTP Management, Mailboxes, MySQL Users, Packages and Parked domains.
Fixed a few issues from the last commit, also removed the HTML output of used domains when the quota is 'unlimited' as in my opinion there is no need to output  graph/used as the pie graphs are there to give a graphical representation of used/avaliable. As the numeric values of the used and avaliable are printed at the top of the Usage module anyways, I thought it looked cleaner to remove the orphaned HTML. I also fixed up some issues with HTML errors in Usage Viewer module. - Added new Unlimited image too!
Session Security 
Added session security to ZPanelX. 
This stops any session hi-jacking taking place across zpanel. It also has a way of disabling on login incase you are behind a proxy and having issues. It also detects proxys / webserver and displays a warning that they may need to disable session security.
Session Security 
Change the way its implimented as before i think it was checking the session before it was actully set
Session Security 
Change the way its implimented as before i think it was checking the session before it was actully set
Session Security 
Change the way its implimented as before i think it was checking the session before it was actully set