<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.freedesk.purplepixie.org/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://wiki.freedesk.purplepixie.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dave</id>
		<title>FreeDESK - User contributions [en-gb]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.freedesk.purplepixie.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dave"/>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Special:Contributions/Dave"/>
		<updated>2026-05-12T22:12:46Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.0</generator>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/FreeDESK_User_Guide</id>
		<title>FreeDESK User Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/FreeDESK_User_Guide"/>
				<updated>2012-08-27T21:37:31Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
FreeDESK is a free service desk/helpdesk system by David Cutting.&lt;br /&gt;
&lt;br /&gt;
The system revolves around the idea of 'requests for service' which are raised and then managed by FreeDESK.&lt;br /&gt;
&lt;br /&gt;
= Logging In =&lt;br /&gt;
&lt;br /&gt;
To login go to the web page provided by your system administrator and select the 'Analyst' link. Now enter your provided username and password then click to login.&lt;br /&gt;
&lt;br /&gt;
If you are using a mobile device you will be automatically redirected to a mobile-optimized version of the interface.&lt;br /&gt;
&lt;br /&gt;
= Desktop Interface =&lt;br /&gt;
&lt;br /&gt;
== Navigation ==&lt;br /&gt;
&lt;br /&gt;
Once logged in you will see three distinct areas, the team list (left hand side), request list (right hand side) and menu bar (top of the page).&lt;br /&gt;
&lt;br /&gt;
You can view requests assigned to individual teams or users (if you have permission) by selecting the team/user from the menu on the left hand side.&lt;br /&gt;
&lt;br /&gt;
Once selected the requests assigned to that user or team will be displayed on the right.&lt;br /&gt;
&lt;br /&gt;
To sort requests in a list click on the field at the top of the list. Fields can be turned on or off for display by selecting &amp;quot;Options&amp;quot; at the top-right of the list.&lt;br /&gt;
&lt;br /&gt;
To open a request for full view or modification click on the request number.&lt;br /&gt;
&lt;br /&gt;
You can see other options and pages within the system, as setup by your administrator, from menu bar options at the top of the screen. From this menu you can also log off or switch to the mobile interface.&lt;br /&gt;
&lt;br /&gt;
At any point you can select &amp;quot;My Requests&amp;quot; under the Home menu to view all the requests assigned to your specific user.&lt;br /&gt;
&lt;br /&gt;
== Requests ==&lt;br /&gt;
&lt;br /&gt;
=== Updating Requests ===&lt;br /&gt;
&lt;br /&gt;
Once a request is opened a new window will be displayed with the full history of the request.&lt;br /&gt;
&lt;br /&gt;
To update the request click on the update tab from which you can add additional information, change the status of the request (for example close it), and also assign it to a different team or user (depending on the permissions you are allowed).&lt;br /&gt;
&lt;br /&gt;
When you update a request, if the option is enabled by your administrator, a checkbox to email the customer will be present. If this box is checked a new email window will open with the details of the update to be sent to the customer.&lt;br /&gt;
&lt;br /&gt;
=== Opening Requests ===&lt;br /&gt;
&lt;br /&gt;
To open a request select that option under the 'Requests' menu on the main screen. Your administrator may have setup different types of requests for different scenarios.&lt;br /&gt;
&lt;br /&gt;
A new request window is then opened. You can search for the customer by entering some or all of the customer information in the fields provided then clicking search. If a single customer matches the results they will be selected otherwise a list of matching customers will be displayed and can be selected. If no customer is found or you need to create a new customer then select 'New Customer' from the Entity menu on the main screen (if your administrator has allowed you this permission).&lt;br /&gt;
&lt;br /&gt;
After selecting a customer you enter details of the update, select other information such as the priority and assignment of the request and then open it. As with an update there will be an option to send an email to the customer, which will open in a new window if selected.&lt;br /&gt;
&lt;br /&gt;
= Mobile Interface =&lt;br /&gt;
&lt;br /&gt;
The mobile interface (auto detected or selected manually from the System menu) is a mobile-optimized limited version.&lt;br /&gt;
&lt;br /&gt;
From this interface you can view all your assigned requests and update them.&lt;br /&gt;
&lt;br /&gt;
Features such as email or new request logging are unavailable through the mobile interface.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/FreeDESK_User_Guide</id>
		<title>FreeDESK User Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/FreeDESK_User_Guide"/>
				<updated>2012-08-27T21:28:39Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;= Introduction =  FreeDESK is a free service desk/helpdesk system by David Cutting.  The system revolves around the idea of 'requests for service' which are raised and then ma...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
FreeDESK is a free service desk/helpdesk system by David Cutting.&lt;br /&gt;
&lt;br /&gt;
The system revolves around the idea of 'requests for service' which are raised and then managed by FreeDESK.&lt;br /&gt;
&lt;br /&gt;
= Logging In =&lt;br /&gt;
&lt;br /&gt;
To login go to the web page provided by your system administrator and select the 'Analyst' link. Now enter your provided username and password then click to login.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/MediaWiki:Lastmodifiedat</id>
		<title>MediaWiki:Lastmodifiedat</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/MediaWiki:Lastmodifiedat"/>
				<updated>2012-08-27T21:26:33Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FreeDESK is Free Software under the GNU GPL v3 Licence&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/MediaWiki:Lastmodifiedat</id>
		<title>MediaWiki:Lastmodifiedat</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/MediaWiki:Lastmodifiedat"/>
				<updated>2012-08-27T21:26:00Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/MediaWiki:Common.css</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/MediaWiki:Common.css"/>
				<updated>2012-08-27T21:23:13Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;/* CSS placed here will be applied to all skins */ #ca-history { display: none; }&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
#ca-history { display: none; }&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Event_Handling</id>
		<title>Event Handling</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Event_Handling"/>
				<updated>2012-08-22T00:04:27Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Events are handled by PIMs. A PIM will register to handle an event by calling PluginManager::RegisterPIMEvent().&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Events are handled by PIMs. A PIM will register to handle an event by calling PluginManager::RegisterPIMEvent().&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Custom_Requests</id>
		<title>Custom Requests</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Custom_Requests"/>
				<updated>2012-08-22T00:03:29Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Custom request modules are the concrete classes which can be used for configured request types as the &amp;quot;concrete class method&amp;quot;.  Requests classes are derived from the RequestBa...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Custom request modules are the concrete classes which can be used for configured request types as the &amp;quot;concrete class method&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Requests classes are derived from the RequestBase class and this, along with the standard request implementation, are included below.&lt;br /&gt;
&lt;br /&gt;
== RequestBase class ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Abstract Request base class for all request classes&lt;br /&gt;
**/&lt;br /&gt;
abstract class RequestBase&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Current FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	protected $DESK = null;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Current Request ID&lt;br /&gt;
	**/&lt;br /&gt;
	var $ID = 0;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Entity Data&lt;br /&gt;
	**/&lt;br /&gt;
	protected $Entity = null;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Updates&lt;br /&gt;
	**/&lt;br /&gt;
	protected $Updates = null;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 * @param mixed &amp;amp;$freeDESK Current FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	function RequestBase(&amp;amp;$freeDESK)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;DESK = &amp;amp;$freeDESK;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Create a request&lt;br /&gt;
	 * @param int $customer Customer ID&lt;br /&gt;
	 * @param string $update Initial Update&lt;br /&gt;
	 * @param int $class Request Class&lt;br /&gt;
	 * @param int $status Request status&lt;br /&gt;
	 * @param int $priority Priority Code (optional, default 0)&lt;br /&gt;
	 * @param int $group Request Group (optional, default 0)&lt;br /&gt;
	 * @param string $assign Assigned user (optional, default &amp;quot;&amp;quot;)&lt;br /&gt;
	 * @return string Request ID&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Create($customer, $update, $class, $status, $priority=0, $group=0, $assign=&amp;quot;&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Update a request&lt;br /&gt;
	 * @param string $update Update text&lt;br /&gt;
	 * @param bool $public Public update (optional, default false)&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Update($update, $public=false);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Change a request status&lt;br /&gt;
	 * @param int $status New status&lt;br /&gt;
	 * @param bool $public Public update (optional, default false)&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Status($status, $public=false);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Assign a request&lt;br /&gt;
	 * @param int $group Group ID&lt;br /&gt;
	 * @param string $username Username (optional, default &amp;quot;&amp;quot;)&lt;br /&gt;
	 * @param bool $public Public update (optional, default false)&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Assign($group, $username=&amp;quot;&amp;quot;, $public=false);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Attach a file&lt;br /&gt;
	 * @param int $fileid File ID&lt;br /&gt;
	 * @param bool $public Public update (optional, default false)&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Attach($fileid, $public=false);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Output XML&lt;br /&gt;
	 * @return string xml output&lt;br /&gt;
	 * @param bool $header Put XML header on output (optional, default false)&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function XML($header=false);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Set an entity value&lt;br /&gt;
	 * @param string $field Field ID&lt;br /&gt;
	 * @param string $value Value&lt;br /&gt;
	**/&lt;br /&gt;
	function Set($field, $value)&lt;br /&gt;
	{&lt;br /&gt;
		if ($this-&amp;gt;Entity == null)&lt;br /&gt;
			$this-&amp;gt;Entity = new Entity($this-&amp;gt;DESK);&lt;br /&gt;
		$this-&amp;gt;Entity-&amp;gt;Set($field, $value);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get an entity value&lt;br /&gt;
	 * @param string $field Field ID&lt;br /&gt;
	 * @return mixed Value&lt;br /&gt;
	**/&lt;br /&gt;
	function Get($field)&lt;br /&gt;
	{&lt;br /&gt;
		$data = $this-&amp;gt;Entity-&amp;gt;GetData();&lt;br /&gt;
		if (isset($data[$field]))&lt;br /&gt;
			return $data[$field];&lt;br /&gt;
		else&lt;br /&gt;
			return false;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Load updates for our ID&lt;br /&gt;
	**/&lt;br /&gt;
	function LoadUpdates()&lt;br /&gt;
	{&lt;br /&gt;
		$q=&amp;quot;SELECT * FROM &amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Table(&amp;quot;update&amp;quot;).&amp;quot; WHERE &amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;requestid&amp;quot;).&amp;quot;=&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($this-&amp;gt;ID).&amp;quot; &amp;quot;;&lt;br /&gt;
		$q.=&amp;quot;ORDER BY &amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;updateid&amp;quot;).&amp;quot; DESC&amp;quot;;&lt;br /&gt;
		&lt;br /&gt;
		$this-&amp;gt;Updates = array();&lt;br /&gt;
		&lt;br /&gt;
		$r=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Query($q);&lt;br /&gt;
		&lt;br /&gt;
		while ($row=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;FetchAssoc($r))&lt;br /&gt;
			$this-&amp;gt;Updates[] = $row;&lt;br /&gt;
		&lt;br /&gt;
		$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Free($r);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get updates&lt;br /&gt;
	 * @return array Updates&lt;br /&gt;
	**/&lt;br /&gt;
	function GetUpdates()&lt;br /&gt;
	{&lt;br /&gt;
		if ($this-&amp;gt;Updates == null)&lt;br /&gt;
			$this-&amp;gt;LoadUpdates();&lt;br /&gt;
		return $this-&amp;gt;Updates;&lt;br /&gt;
	}&lt;br /&gt;
		&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Inbuilt Standard Request Class ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Request class for all standard requests&lt;br /&gt;
**/&lt;br /&gt;
class Request extends RequestBase&lt;br /&gt;
{&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 * @param mixed &amp;amp;$freeDESK Current FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	function Request(&amp;amp;$freeDESK)&lt;br /&gt;
	{&lt;br /&gt;
		parent::RequestBase($freeDESK);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Create a request&lt;br /&gt;
	 * @param int $customer Customer ID&lt;br /&gt;
	 * @param string $update Initial Update&lt;br /&gt;
	 * @param int $class Request Class&lt;br /&gt;
	 * @param int $status Initial request status&lt;br /&gt;
	 * @param int $priority Priority code (optional, default 0)&lt;br /&gt;
	 * @param int $group Request Group (optional, default 0)&lt;br /&gt;
	 * @param string $assign Assigned user (optional, default &amp;quot;&amp;quot;)&lt;br /&gt;
	 * @return string Request ID&lt;br /&gt;
	**/&lt;br /&gt;
	function Create($customer, $update, $class, $status, $priority=0, $group=0, $assign=&amp;quot;&amp;quot;)&lt;br /&gt;
	{&lt;br /&gt;
		if (!is_numeric($class))&lt;br /&gt;
			$class=1;&lt;br /&gt;
		$q=&amp;quot;INSERT INTO &amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Table(&amp;quot;request&amp;quot;);&lt;br /&gt;
		$q.=&amp;quot;(&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;customer&amp;quot;).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;assignteam&amp;quot;).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;assignuser&amp;quot;).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;class&amp;quot;).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;openeddt&amp;quot;).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;priority&amp;quot;).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;status&amp;quot;).&amp;quot;) &amp;quot;;&lt;br /&gt;
		$q.=&amp;quot;VALUES(&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($customer).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;SafeQuote($group).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;SafeQuote($assign).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;SafeQuote($class).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=&amp;quot;NOW(),&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($priority).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($status).&amp;quot;)&amp;quot;;&lt;br /&gt;
		&lt;br /&gt;
		$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Query($q);&lt;br /&gt;
		&lt;br /&gt;
		$this-&amp;gt;ID = $this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;InsertID();&lt;br /&gt;
		&lt;br /&gt;
		$this-&amp;gt;Update($update, true);&lt;br /&gt;
		&lt;br /&gt;
		return $this-&amp;gt;ID;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Update a request&lt;br /&gt;
	 * @param string $update Update text&lt;br /&gt;
	 * @param bool $public Public update (optional, default false)&lt;br /&gt;
	**/&lt;br /&gt;
	function Update($update, $public=false)&lt;br /&gt;
	{&lt;br /&gt;
		if ($this-&amp;gt;ID &amp;lt;= 0)&lt;br /&gt;
			return false;&lt;br /&gt;
		if ($this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;Session == null)&lt;br /&gt;
			return false;&lt;br /&gt;
		&lt;br /&gt;
		$q=&amp;quot;INSERT INTO &amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Table(&amp;quot;update&amp;quot;).&amp;quot;(&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;requestid&amp;quot;).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;update&amp;quot;).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;public&amp;quot;).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;updateby&amp;quot;).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;updatedt&amp;quot;).&amp;quot;) &amp;quot;;&lt;br /&gt;
		$q.=&amp;quot;VALUES(&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($this-&amp;gt;ID).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;SafeQuote($update).&amp;quot;,&amp;quot;;&lt;br /&gt;
		if ($public)&lt;br /&gt;
			$p=1;&lt;br /&gt;
		else&lt;br /&gt;
			$p=0;&lt;br /&gt;
		$q.=$p.&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=&amp;quot;\&amp;quot;&amp;quot;.$this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;Session-&amp;gt;NiceName().&amp;quot;\&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=&amp;quot;NOW())&amp;quot;;&lt;br /&gt;
		&lt;br /&gt;
		$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Query($q);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Change a request status&lt;br /&gt;
	 * @param int $status New status&lt;br /&gt;
	 * @param bool $public Public update (optional, default false)&lt;br /&gt;
	**/&lt;br /&gt;
	function Status($status, $public=false)&lt;br /&gt;
	{&lt;br /&gt;
		$list = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;StatusList();&lt;br /&gt;
		&lt;br /&gt;
		if (isset($list[$status]))&lt;br /&gt;
		{&lt;br /&gt;
			$q=&amp;quot;UPDATE &amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Table(&amp;quot;request&amp;quot;).&amp;quot; SET &amp;quot;;&lt;br /&gt;
			$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;status&amp;quot;).&amp;quot;=&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($status);&lt;br /&gt;
			if ($status == 0)&lt;br /&gt;
				$q.=&amp;quot;,&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;closeddt&amp;quot;).&amp;quot;=NOW()&amp;quot;;&lt;br /&gt;
			$q.=&amp;quot; WHERE &amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;requestid&amp;quot;).&amp;quot;=&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($this-&amp;gt;ID);&lt;br /&gt;
			$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Query($q);&lt;br /&gt;
			&lt;br /&gt;
			$update=&amp;quot;Status changed to &amp;quot;.$list[$status];&lt;br /&gt;
			$this-&amp;gt;Update($update, $public);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Assign a request&lt;br /&gt;
	 * @param int $group Group ID&lt;br /&gt;
	 * @param string $username Username (optional, default &amp;quot;&amp;quot;)&lt;br /&gt;
	 * @param bool $public Public update (optional, default false)&lt;br /&gt;
	**/&lt;br /&gt;
	function Assign($group, $username=&amp;quot;&amp;quot;, $public=false)&lt;br /&gt;
	{&lt;br /&gt;
		$q=&amp;quot;UPDATE &amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Table(&amp;quot;request&amp;quot;).&amp;quot; SET &amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;assignteam&amp;quot;).&amp;quot;=&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($group).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;assignuser&amp;quot;).&amp;quot;=&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;SafeQuote($username).&amp;quot; WHERE &amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;requestid&amp;quot;).&amp;quot;=&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($this-&amp;gt;ID);&lt;br /&gt;
		$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Query($q);&lt;br /&gt;
		&lt;br /&gt;
		$teams = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;TeamList();&lt;br /&gt;
		$users = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;UserList();&lt;br /&gt;
		$assign = &amp;quot;&amp;quot;;&lt;br /&gt;
		&lt;br /&gt;
		if (isset($teams[$group]))&lt;br /&gt;
			$assign.=$teams[$group];&lt;br /&gt;
		else if ($group == 0)&lt;br /&gt;
			$assign.=$this-&amp;gt;DESK-&amp;gt;Lang-&amp;gt;Get(&amp;quot;unassigned&amp;quot;);&lt;br /&gt;
		&lt;br /&gt;
		if ($username != &amp;quot;&amp;quot; &amp;amp;&amp;amp; isset($users[$username]))&lt;br /&gt;
		{&lt;br /&gt;
			if ($assign != &amp;quot;&amp;quot;)&lt;br /&gt;
				$assign.=&amp;quot; &amp;amp;gt; &amp;quot;;&lt;br /&gt;
			$assign.=$users[$username];&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		$update = $this-&amp;gt;DESK-&amp;gt;Lang-&amp;gt;Get(&amp;quot;assigned_to&amp;quot;).&amp;quot; &amp;quot;.$assign;&lt;br /&gt;
		&lt;br /&gt;
		$this-&amp;gt;Update($update, $public);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Attach a file&lt;br /&gt;
	 * @param int $fileid File ID&lt;br /&gt;
	 * @param bool $public Public update (optional, default false)&lt;br /&gt;
	**/&lt;br /&gt;
	function Attach($fileid, $public=false)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Output XML&lt;br /&gt;
	 * @return string xml output&lt;br /&gt;
	 * @param bool $header Put XML header on output (optional, default false)&lt;br /&gt;
	**/&lt;br /&gt;
	function XML($header=false)&lt;br /&gt;
	{&lt;br /&gt;
		$data = $this-&amp;gt;Entity-&amp;gt;GetData();&lt;br /&gt;
		$xml = new xmlCreate();&lt;br /&gt;
		$xml-&amp;gt;startElement(&amp;quot;request&amp;quot;);&lt;br /&gt;
		$xml-&amp;gt;xmlArray($data);&lt;br /&gt;
		$xml-&amp;gt;endElement(&amp;quot;request&amp;quot;);&lt;br /&gt;
		return $xml-&amp;gt;getXML($header);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Logging_Module</id>
		<title>Logging Module</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Logging_Module"/>
				<updated>2012-08-22T00:01:23Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Logging modules provide a method for the FreeDESK log (syslog) to be outputted and stored. The default method uses a database table (syslog).  All logging modules must be deri...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Logging modules provide a method for the FreeDESK log (syslog) to be outputted and stored. The default method uses a database table (syslog).&lt;br /&gt;
&lt;br /&gt;
All logging modules must be derived from the base class LogMethodBase.&lt;br /&gt;
&lt;br /&gt;
The inbuilt method logging to a database table as an example is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * LogMethodDB implements database-level logging&lt;br /&gt;
**/&lt;br /&gt;
class LogMethodDB extends LogMethodBase&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	private $DESK = null;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 * @param mixed $freeDESK FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	function LogMethodDB(&amp;amp;$freeDESK)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;DESK = &amp;amp;$freeDESK;&lt;br /&gt;
		$this-&amp;gt;DESK-&amp;gt;PluginManager-&amp;gt;Register(new Plugin(&lt;br /&gt;
			&amp;quot;Core Database Logging&amp;quot;, &amp;quot;0.01&amp;quot;, &amp;quot;Log&amp;quot;, &amp;quot;Database&amp;quot;, &amp;quot;LogMethodDB&amp;quot; ));&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Log an event&lt;br /&gt;
	 * @param string $event Event description&lt;br /&gt;
	 * @param string $class Event class&lt;br /&gt;
	 * @param string $type Event type (optional, default &amp;quot;&amp;quot;)&lt;br /&gt;
	 * @param int $level Event level (0 = fatal, 10 = low priority info only) (optional, default 10)&lt;br /&gt;
	**/&lt;br /&gt;
	function Log($event, $class, $type=&amp;quot;&amp;quot;, $level=10)&lt;br /&gt;
	{&lt;br /&gt;
		if (strlen($event)&amp;gt;254)&lt;br /&gt;
			$event=substr($event,0,251).&amp;quot;...&amp;quot;;&lt;br /&gt;
		$q=&amp;quot;INSERT INTO &amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Table(&amp;quot;syslog&amp;quot;).&amp;quot;(&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;event_dt&amp;quot;).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;event&amp;quot;).&amp;quot;,&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;event_class&amp;quot;).&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;event_type&amp;quot;).&amp;quot;,&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;event_level&amp;quot;).&amp;quot;) &amp;quot;;&lt;br /&gt;
		$q.=&amp;quot;VALUES(NOW(),\&amp;quot;&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($event).&amp;quot;\&amp;quot;,\&amp;quot;&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($class).&amp;quot;\&amp;quot;,&amp;quot;;&lt;br /&gt;
		$q.=&amp;quot;\&amp;quot;&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($type).&amp;quot;\&amp;quot;,&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($level).&amp;quot;)&amp;quot;;&lt;br /&gt;
		&lt;br /&gt;
		&lt;br /&gt;
		// Log into DB ensure report flag is false to avoid infinite loop if SQL error in this method&lt;br /&gt;
		$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Query($q, false);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Database_Module</id>
		<title>Database Module</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Database_Module"/>
				<updated>2012-08-21T23:59:42Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Database modules provide the ability for different underlying databases to be used. They handle the connection, escaping and some other functionality.  The default shipped mod...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Database modules provide the ability for different underlying databases to be used. They handle the connection, escaping and some other functionality.&lt;br /&gt;
&lt;br /&gt;
The default shipped module supports MySQL and any alternatives must be derived from DatabaseBase. The base class and MySQL implementation are included below.&lt;br /&gt;
&lt;br /&gt;
The DatabaseBase also includes the QueryBuilder class which can be used anywhere in the system to build SQL queries easily (the database implementation must therefore support QueryBuilder objects for SQL construction).&lt;br /&gt;
&lt;br /&gt;
== DatabaseBase Base Class ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
/**&lt;br /&gt;
 * Database Query Type&lt;br /&gt;
**/&lt;br /&gt;
abstract class QueryType&lt;br /&gt;
{&lt;br /&gt;
	const Equal = 0;&lt;br /&gt;
	const Like = 1;&lt;br /&gt;
	const MoreThan = 2;&lt;br /&gt;
	const MoreThanEqual = 3;&lt;br /&gt;
	const LessThan = 4;&lt;br /&gt;
	const LessThanEqual = 5;&lt;br /&gt;
	const NotEqual = 6;&lt;br /&gt;
	&lt;br /&gt;
	const OpenBracket = 100;&lt;br /&gt;
	const CloseBracket = 101;&lt;br /&gt;
	&lt;br /&gt;
	const opAND = 200;&lt;br /&gt;
	const opOR = 201;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Query Builder Class&lt;br /&gt;
**/&lt;br /&gt;
class QueryBuilder&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query items array&lt;br /&gt;
	**/&lt;br /&gt;
	var $items = array();&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Limit Flag&lt;br /&gt;
	**/&lt;br /&gt;
	var $limit = false;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Start (for limit)&lt;br /&gt;
	**/&lt;br /&gt;
	var $start = 0;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Entries (for limit)&lt;br /&gt;
	**/&lt;br /&gt;
	var $entries = 30;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Order Flag&lt;br /&gt;
	**/&lt;br /&gt;
	var $order = false;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Order fields&lt;br /&gt;
	**/&lt;br /&gt;
	var $orderlist = array();&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add item&lt;br /&gt;
	 * @param string $field Field&lt;br /&gt;
	 * @param mixed $type QueryType const&lt;br /&gt;
	 * @param mixed $value Value&lt;br /&gt;
	**/&lt;br /&gt;
	function Add($field, $type, $value)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;items[] = array(&lt;br /&gt;
			&amp;quot;field&amp;quot; =&amp;gt; $field,&lt;br /&gt;
			&amp;quot;type&amp;quot; =&amp;gt; $type,&lt;br /&gt;
			&amp;quot;value&amp;quot; =&amp;gt; $value );&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add an order field&lt;br /&gt;
	 * @param string $field Field&lt;br /&gt;
	 * @param bool $asc Ascending (optional, default true) - false is descending&lt;br /&gt;
	**/&lt;br /&gt;
	function AddOrder($field, $asc = true)&lt;br /&gt;
	{&lt;br /&gt;
		if (!$this-&amp;gt;order)&lt;br /&gt;
			$this-&amp;gt;order = true;&lt;br /&gt;
		$this-&amp;gt;orderlist[$field]=$asc;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Open bracket&lt;br /&gt;
	**/&lt;br /&gt;
	function OpenBracket()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;items[] = array(&amp;quot;type&amp;quot; =&amp;gt; QueryType::OpenBracket);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Close bracket&lt;br /&gt;
	**/&lt;br /&gt;
	function CloseBracket()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;items[] = array(&amp;quot;type&amp;quot; =&amp;gt; QueryType::CloseBracket);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add operation&lt;br /&gt;
	 * @param mixed $operation Op of type QueryType&lt;br /&gt;
	**/&lt;br /&gt;
	function AddOperation($operation)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;items[] = array(&amp;quot;type&amp;quot; =&amp;gt; $operation);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * DatabaseBase is the abstract base class for database system implementations&lt;br /&gt;
**/&lt;br /&gt;
&lt;br /&gt;
abstract class DatabaseBase&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 * @param object $freeDESK FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	//abstract function DatabaseBase(&amp;amp;$freekDESK);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Connect&lt;br /&gt;
	 * @param string $server Database server&lt;br /&gt;
	 * @param string $username Database username&lt;br /&gt;
	 * @param string $password Database password&lt;br /&gt;
	 * @param string $database Database name&lt;br /&gt;
	 * @param string $prefix Database table prefix (optonal, default &amp;quot;&amp;quot;)&lt;br /&gt;
	 * @return bool Successful connection or not&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Connect($server, $username, $password, &lt;br /&gt;
		$database, $prefix=&amp;quot;&amp;quot;);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Disconnect&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Disconnect();&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Return table name with correct prefix and escaping&lt;br /&gt;
	 * @param string $table table un-prefixed&lt;br /&gt;
	 * @return string table with prefix and escape&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Table($table);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Sanitise user-input using correct escaping&lt;br /&gt;
	 * @param string $input user input&lt;br /&gt;
	 * @return string Sanitised output&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Safe($input);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Sanitise user-input string and quote&lt;br /&gt;
	 * @param string $input user input&lt;br /&gt;
	 * @return string Sanitised quoted output&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function SafeQuote($input);&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Contain a field correctly&lt;br /&gt;
	 * @param string $field The field name&lt;br /&gt;
	 * @return string Escaped field&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Field($field);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Escape and contain a field correctly&lt;br /&gt;
	 * @param string $value The value of the field&lt;br /&gt;
	 * @return string Escaped and prefixed+suffixed data&lt;br /&gt;
	**/&lt;br /&gt;
	function FieldSafe($value)&lt;br /&gt;
	{&lt;br /&gt;
		return $this-&amp;gt;Field($this-&amp;gt;Safe($value));&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Perform a query&lt;br /&gt;
	 * @param string $query SQL query&lt;br /&gt;
	 * @param bool $report Record any errors using LoggingEngine (optonal, default true)&lt;br /&gt;
	 * @return mixed Results of query&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Query($query, $report=true);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Number of rows affected by last query&lt;br /&gt;
	 * @return int number of rows affected&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function RowsAffected();&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Number of rows in a result set&lt;br /&gt;
	 * @param mixed $result Result set&lt;br /&gt;
	 * @return int number of rows in the set&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function NumRows(&amp;amp;$result);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Fetch next associated array from result set&lt;br /&gt;
	 * @param mixed $result Result Set&lt;br /&gt;
	 * @return array Assocative Array of Results&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function FetchAssoc(&amp;amp;$result);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Free a result set&lt;br /&gt;
	 * @param mixed $result Result Set&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Free(&amp;amp;$result);&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Return an error flag&lt;br /&gt;
	 * @return bool Experienced error on last command&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Error();&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Last error code&lt;br /&gt;
	 * @return int Error code&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function ErrorCode();&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Last error description&lt;br /&gt;
	 * @return string Error description&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function ErrorDescription();&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Details of the last error&lt;br /&gt;
	 * @return string Code and error description&lt;br /&gt;
	**/&lt;br /&gt;
	function LastError()&lt;br /&gt;
	{&lt;br /&gt;
		return $this-&amp;gt;ErrorCode().&amp;quot;: &amp;quot;.$this-&amp;gt;ErrorDescription();&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * The last inserted ID&lt;br /&gt;
	 * @return mixed Last inserted ID&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function InsertID();&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Generate a clause from a QueryBuilder object&lt;br /&gt;
	 * @param object &amp;amp;$query QueryBuilder object&lt;br /&gt;
	 * @return string query string&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Clause(&amp;amp;$query);&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MySQL Database Implementation ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * MySQL concrete implementation of DatabaseBase&lt;br /&gt;
**/&lt;br /&gt;
&lt;br /&gt;
class MySQL extends DatabaseBase&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Pointer to the FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	private $DESK = null;&lt;br /&gt;
	/**&lt;br /&gt;
	 * MySQL data connection&lt;br /&gt;
	**/&lt;br /&gt;
	private $connection = null;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Table prefix&lt;br /&gt;
	**/&lt;br /&gt;
	var $prefix = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 * @param object $freeDESK FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	function MySQL(&amp;amp;$freeDESK)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;DESK = &amp;amp;$freeDESK;&lt;br /&gt;
		&lt;br /&gt;
		$this-&amp;gt;DESK-&amp;gt;PluginManager-&amp;gt;Register(new Plugin(&lt;br /&gt;
			&amp;quot;MySQL Database Engine&amp;quot;,&amp;quot;0.01&amp;quot;,&amp;quot;Core&amp;quot;,&amp;quot;DB&amp;quot; ));&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Connect&lt;br /&gt;
	 * @param string $server Database server&lt;br /&gt;
	 * @param string $username Database username&lt;br /&gt;
	 * @param string $password Database password&lt;br /&gt;
	 * @param string $database Database name&lt;br /&gt;
	 * @param string $prefix Database table prefix (optonal, default &amp;quot;&amp;quot;)&lt;br /&gt;
	 * @return bool Successful connection or not&lt;br /&gt;
	**/&lt;br /&gt;
	function Connect($server, $username, $password, &lt;br /&gt;
		$database, $prefix=&amp;quot;&amp;quot;)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;prefix = $prefix;&lt;br /&gt;
	&lt;br /&gt;
		$this-&amp;gt;connection = mysql_connect($server, $username, $password);&lt;br /&gt;
		if ($this-&amp;gt;connection &amp;lt;= 0) return false;&lt;br /&gt;
		&lt;br /&gt;
		if (!mysql_select_db($database, $this-&amp;gt;connection))&lt;br /&gt;
			return false;&lt;br /&gt;
			&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Disconnect&lt;br /&gt;
	**/&lt;br /&gt;
	function Disconnect()&lt;br /&gt;
	{&lt;br /&gt;
		mysql_close($this-&amp;gt;connection);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Return table name with correct prefix and escaping&lt;br /&gt;
	 * @param string $table table un-prefixed&lt;br /&gt;
	 * @return string table with prefix and escape&lt;br /&gt;
	**/&lt;br /&gt;
	function Table($table)&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;`&amp;quot;.$this-&amp;gt;prefix.$table.&amp;quot;`&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Sanitise user-input using correct escaping&lt;br /&gt;
	 * @param string $input user input&lt;br /&gt;
	 * @return string Sanitised output&lt;br /&gt;
	**/&lt;br /&gt;
	function Safe($input)&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_real_escape_string($input, $this-&amp;gt;connection);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Sanitise user-input string and quote&lt;br /&gt;
	 * @param string $input user input&lt;br /&gt;
	 * @return string Sanitised quoted output&lt;br /&gt;
	**/&lt;br /&gt;
	function SafeQuote($input)&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;\&amp;quot;&amp;quot;.$this-&amp;gt;Safe($input).&amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Contain a field correctly&lt;br /&gt;
	 * @param string $field The field name&lt;br /&gt;
	 * @return string Escaped field&lt;br /&gt;
	**/&lt;br /&gt;
	function Field($field)&lt;br /&gt;
	{&lt;br /&gt;
		return &amp;quot;`&amp;quot;.$field.&amp;quot;`&amp;quot;;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Escape and contain a field correctly&lt;br /&gt;
	 * @param string $value The value of the field&lt;br /&gt;
	 * @return string Escaped and prefixed+suffixed data&lt;br /&gt;
	**/&lt;br /&gt;
	function FieldSafe($value)&lt;br /&gt;
	{&lt;br /&gt;
		return $this-&amp;gt;Field($this-&amp;gt;Safe($value));&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Perform a query&lt;br /&gt;
	 * @param string $query SQL query&lt;br /&gt;
	 * @param bool $report Record any errors using LoggingEngine (optonal, default true)&lt;br /&gt;
	 * @return mixed Results of query&lt;br /&gt;
	**/&lt;br /&gt;
	function Query($query, $report=true)&lt;br /&gt;
	{&lt;br /&gt;
		$result=mysql_query($query, $this-&amp;gt;connection);&lt;br /&gt;
		&lt;br /&gt;
		if ($report &amp;amp;&amp;amp; $this-&amp;gt;Error()) // has an error and to be reported&lt;br /&gt;
		{&lt;br /&gt;
			$err=&amp;quot;Query Failed: &amp;quot;.$query;&lt;br /&gt;
			$error=&amp;quot;SQL Error: &amp;quot;.$this-&amp;gt;LastError();&lt;br /&gt;
			$this-&amp;gt;DESK-&amp;gt;LoggingEngine-&amp;gt;Log($err, &amp;quot;SQL&amp;quot;, &amp;quot;Fail&amp;quot;, 1);&lt;br /&gt;
			$this-&amp;gt;DESK-&amp;gt;LoggingEngine-&amp;gt;Log($error, &amp;quot;SQL&amp;quot;, &amp;quot;Error&amp;quot;, 1);&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		return $result;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Number of rows affected by last query&lt;br /&gt;
	 * @return int number of rows affected&lt;br /&gt;
	**/&lt;br /&gt;
	function RowsAffected()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_affected_rows($this-&amp;gt;connection);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Number of rows in a result set&lt;br /&gt;
	 * @param mixed $result Result set&lt;br /&gt;
	 * @return int number of rows in the set&lt;br /&gt;
	**/&lt;br /&gt;
	function NumRows(&amp;amp;$result)&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_num_rows($result);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Fetch next associated array from result set&lt;br /&gt;
	 * @param mixed $result Result Set&lt;br /&gt;
	 * @return array Assocative Array of Results&lt;br /&gt;
	**/&lt;br /&gt;
	function FetchAssoc(&amp;amp;$result)&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_fetch_assoc($result);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Free a result set&lt;br /&gt;
	 * @param mixed $result Result Set&lt;br /&gt;
	**/&lt;br /&gt;
	function Free(&amp;amp;$result)&lt;br /&gt;
	{&lt;br /&gt;
		mysql_free_result($result);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Return an error flag&lt;br /&gt;
	 * @return bool Experienced error on last command&lt;br /&gt;
	**/&lt;br /&gt;
	function Error()&lt;br /&gt;
	{&lt;br /&gt;
		if (mysql_errno($this-&amp;gt;connection)&amp;gt;0)&lt;br /&gt;
			return true;&lt;br /&gt;
		return false;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Last error code&lt;br /&gt;
	 * @return int Error code&lt;br /&gt;
	**/&lt;br /&gt;
	function ErrorCode()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_errno($this-&amp;gt;connection);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Last error description&lt;br /&gt;
	 * @return string Error description&lt;br /&gt;
	**/&lt;br /&gt;
	function ErrorDescription()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_error($this-&amp;gt;connection);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * The last inserted ID&lt;br /&gt;
	 * @return mixed Last inserted ID&lt;br /&gt;
	**/&lt;br /&gt;
	function InsertID()&lt;br /&gt;
	{&lt;br /&gt;
		return mysql_insert_id($this-&amp;gt;connection);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Generate a clause from a QueryBuilder object&lt;br /&gt;
	 * @param object &amp;amp;$query QueryBuilder object&lt;br /&gt;
	 * @return string query string&lt;br /&gt;
	**/&lt;br /&gt;
	function Clause(&amp;amp;$query)&lt;br /&gt;
	{&lt;br /&gt;
		$c = &amp;quot;&amp;quot;;&lt;br /&gt;
		foreach($query-&amp;gt;items as $item)&lt;br /&gt;
		{&lt;br /&gt;
			if (isset($item['field']))&lt;br /&gt;
			{&lt;br /&gt;
				if ($c!=&amp;quot;&amp;quot;)&lt;br /&gt;
					$c.=&amp;quot; &amp;quot;;&lt;br /&gt;
				$c.=$this-&amp;gt;Field($item['field']);&lt;br /&gt;
				&lt;br /&gt;
				switch($item['type'])&lt;br /&gt;
				{&lt;br /&gt;
					case QueryType::Equal:&lt;br /&gt;
						$c.=&amp;quot;=&amp;quot;;&lt;br /&gt;
						break;&lt;br /&gt;
					case QueryType::Like:&lt;br /&gt;
						$c.=&amp;quot; LIKE &amp;quot;;&lt;br /&gt;
						break;&lt;br /&gt;
					case QueryType::MoreThan:&lt;br /&gt;
						$c.=&amp;quot; &amp;gt; &amp;quot;;&lt;br /&gt;
						break;&lt;br /&gt;
					case QueryType::MoreThanEqual:&lt;br /&gt;
						$c.=&amp;quot; &amp;gt;= &amp;quot;;&lt;br /&gt;
						break;&lt;br /&gt;
					case QueryType::LessThan:&lt;br /&gt;
						$c.=&amp;quot; &amp;lt; &amp;quot;;&lt;br /&gt;
						break;&lt;br /&gt;
					case QueryType::LessThanEqual:&lt;br /&gt;
						$c.=&amp;quot; &amp;lt;= &amp;quot;;&lt;br /&gt;
						break;&lt;br /&gt;
					case QueryType::NotEqual;&lt;br /&gt;
						$c.=&amp;quot; != &amp;quot;;&lt;br /&gt;
						break;&lt;br /&gt;
				}&lt;br /&gt;
				&lt;br /&gt;
				$c.=$item['value'];&lt;br /&gt;
			}&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				switch($item['type'])&lt;br /&gt;
				{&lt;br /&gt;
					case QueryType::OpenBracket:&lt;br /&gt;
						$c.=&amp;quot; ( &amp;quot;;&lt;br /&gt;
						break;&lt;br /&gt;
					case QueryType::CloseBracket:&lt;br /&gt;
						$c.=&amp;quot; ) &amp;quot;;&lt;br /&gt;
						break;&lt;br /&gt;
					case QueryType::opAND:&lt;br /&gt;
						$c.=&amp;quot; AND &amp;quot;;&lt;br /&gt;
						break;&lt;br /&gt;
					case QueryType::opOR:&lt;br /&gt;
						$c.=&amp;quot; OR &amp;quot;;&lt;br /&gt;
						break;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		if ($c==&amp;quot;&amp;quot;)&lt;br /&gt;
			$c=&amp;quot;1&amp;quot;;&lt;br /&gt;
		&lt;br /&gt;
		return $c;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Authentication_Modules</id>
		<title>Authentication Modules</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Authentication_Modules"/>
				<updated>2012-08-21T23:55:57Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Authentication modules provide an alternative authentication method for analyst users.  The following are the base class (that must be extended for an authentication class) an...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Authentication modules provide an alternative authentication method for analyst users.&lt;br /&gt;
&lt;br /&gt;
The following are the base class (that must be extended for an authentication class) and the included standard authentication class as an example.&lt;br /&gt;
&lt;br /&gt;
== Authentication Base Class ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * AuthMethodBase is the abstract base class for authentication methods&lt;br /&gt;
**/&lt;br /&gt;
abstract class AuthMethodBase extends FreeDESK_PIM&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * AuthMethodBase Constructor&lt;br /&gt;
	 * @param mixed $freeDESK FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	function AuthMethodBase(&amp;amp;$freeDESK)&lt;br /&gt;
	{&lt;br /&gt;
		parent::FreeDESK_PIM(&amp;amp;$freeDESK, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;, 0);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Authenticate a user/customer session&lt;br /&gt;
	 * @param int $type Type of Context (ContextType)&lt;br /&gt;
	 * @param string $username Username provided&lt;br /&gt;
	 * @param string $password Password provided&lt;br /&gt;
	 * @return bool True on success or false on failure&lt;br /&gt;
	**/&lt;br /&gt;
	abstract function Authenticate($type, $username, $password);&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Inbuilt Standard Authentication ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * AuthMethodStandard is the standard (database-based) authentication method&lt;br /&gt;
**/&lt;br /&gt;
class AuthMethodStandard extends AuthMethodBase&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * AuthMethodStandard Constructor&lt;br /&gt;
	 * @param mixed $freeDESK FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	function AuthMethodStandard(&amp;amp;$freeDESK)&lt;br /&gt;
	{&lt;br /&gt;
		parent::AuthMethodBase($freeDESK);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Authenticate a user/customer session&lt;br /&gt;
	 * @param int $type Type of Context (ContextType)&lt;br /&gt;
	 * @param string $username Username provided&lt;br /&gt;
	 * @param string $password Password provided&lt;br /&gt;
	 * @return bool True on success or false on failure&lt;br /&gt;
	**/&lt;br /&gt;
	function Authenticate($type, $username, $password)&lt;br /&gt;
	{&lt;br /&gt;
		$valid=false; // default to failed&lt;br /&gt;
	&lt;br /&gt;
		if ($type == ContextType::User)&lt;br /&gt;
		{&lt;br /&gt;
			$password=$this-&amp;gt;DESK-&amp;gt;BaseConfig-&amp;gt;pwd_Hash.$password; // add the hash to the password&lt;br /&gt;
			$q=&amp;quot;SELECT * FROM &amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Table(&amp;quot;user&amp;quot;).&amp;quot; WHERE &amp;quot;;&lt;br /&gt;
			$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;username&amp;quot;).&amp;quot;=\&amp;quot;&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($username).&amp;quot;\&amp;quot; AND &amp;quot;;&lt;br /&gt;
			$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;password&amp;quot;).&amp;quot;=MD5(\&amp;quot;&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($password).&amp;quot;\&amp;quot;) &amp;quot;;&lt;br /&gt;
			$q.=&amp;quot;LIMIT 0,1&amp;quot;;&lt;br /&gt;
			&lt;br /&gt;
			$r=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Query($q);&lt;br /&gt;
			&lt;br /&gt;
			if ($user = $this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;FetchAssoc($r))&lt;br /&gt;
				$valid=true;&lt;br /&gt;
			&lt;br /&gt;
			$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Free($r);&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		// TODO: Customer Authentication&lt;br /&gt;
		&lt;br /&gt;
		return $valid;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Set a standard user password - note no security here and that this is NOT a AutoMethodBase overrided function&lt;br /&gt;
	 * @param string $username Username&lt;br /&gt;
	 * @param string $password Password&lt;br /&gt;
	**/&lt;br /&gt;
	function SetPassword($username, $password)&lt;br /&gt;
	{&lt;br /&gt;
		$password=$this-&amp;gt;DESK-&amp;gt;BaseConfig-&amp;gt;pwd_Hash.$password;&lt;br /&gt;
		$q=&amp;quot;UPDATE &amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Table(&amp;quot;user&amp;quot;).&amp;quot; SET &amp;quot;;&lt;br /&gt;
		$q.=$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;password&amp;quot;).&amp;quot;=MD5(\&amp;quot;&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($password).&amp;quot;\&amp;quot;) &amp;quot;;&lt;br /&gt;
		$q.=&amp;quot;WHERE &amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Field(&amp;quot;username&amp;quot;).&amp;quot;=\&amp;quot;&amp;quot;.$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Safe($username).&amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
		$this-&amp;gt;DESK-&amp;gt;Database-&amp;gt;Query($q);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Exec function (static)&lt;br /&gt;
	 * @param mixed $DESK Current FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	static function Exec(&amp;amp;$DESK)&lt;br /&gt;
	{&lt;br /&gt;
		$plugin = new Plugin();&lt;br /&gt;
		$plugin-&amp;gt;name=&amp;quot;Standard Authentication&amp;quot;;&lt;br /&gt;
		$plugin-&amp;gt;version=&amp;quot;0.01&amp;quot;;&lt;br /&gt;
		$plugin-&amp;gt;type=&amp;quot;Auth&amp;quot;;&lt;br /&gt;
		$plugin-&amp;gt;subtype=&amp;quot;standard&amp;quot;;&lt;br /&gt;
		$plugin-&amp;gt;classname=&amp;quot;AuthMethodStandard&amp;quot;;&lt;br /&gt;
		$DESK-&amp;gt;PluginManager-&amp;gt;Register($plugin);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Developing_Plugin_Modules</id>
		<title>Developing Plugin Modules</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Developing_Plugin_Modules"/>
				<updated>2012-08-21T23:53:12Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plugin modules are the heart of FreeDESK extensibility and are developed in PHP. All plugin modules extend the base class FreeDESK_PIM and provide some defined interfaces.&lt;br /&gt;
&lt;br /&gt;
Plugins can register functionality they provide in the main system, register additional pages and menu options for display, register custom API modes and handle request events.&lt;br /&gt;
&lt;br /&gt;
= Plugin Modules (PIMs) =&lt;br /&gt;
&lt;br /&gt;
PIMs provide some or all of the functionality listed in the FreeDESK_PIM module. For a plugin to work it must be installed in a named directory within the plugin folder, have a main PHP file of the same name and the main PIM class within that file of the same name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * FreeDESK_PIM is the abstacr base class for all PIM components&lt;br /&gt;
**/&lt;br /&gt;
abstract class FreeDESK_PIM&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	protected $DESK = null;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * File path for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	protected $filepath = &amp;quot;&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Web path for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	protected $webpath = &amp;quot;&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * ID for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	protected $ID = 0;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Main Constructor&lt;br /&gt;
	 * @param mixed $freeDESK FreeDESK instance&lt;br /&gt;
	 * @param string $filepath Path to plugin directory (filebase)&lt;br /&gt;
	 * @param string $webpath Path to plugin directory (webpath)&lt;br /&gt;
	 * @param int $id Internal FreeDESK ID for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	function FreeDESK_PIM(&amp;amp;$freeDESK, $filepath, $webpath, $id)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;DESK = &amp;amp;$freeDESK;&lt;br /&gt;
		$this-&amp;gt;filepath = $filepath;&lt;br /&gt;
		$this-&amp;gt;webpath = $webpath;&lt;br /&gt;
		$this-&amp;gt;ID = $id;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Start (when an instance is started from within the system and is installed - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Start()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Install - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Install()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Activate - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Activate()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * De-Activate - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Deactivate()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Uninstall - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Uninstall()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * API Call - to be overriden&lt;br /&gt;
	 * @param string $mode API Mode&lt;br /&gt;
	**/&lt;br /&gt;
	function API($mode)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Event Call - to be overriden&lt;br /&gt;
	 * @param string $event Event&lt;br /&gt;
	 * @param mixed &amp;amp;$data Event data (dependent on the event)&lt;br /&gt;
	**/&lt;br /&gt;
	function Event($event, &amp;amp;$data)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Build any menu items needed - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function BuildMenu()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Page has been called for this plugin - to be overriden&lt;br /&gt;
	 * @param string $page Page identifier&lt;br /&gt;
	**/&lt;br /&gt;
	function Page($page)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Static exec/registration function to list provided interfaces&lt;br /&gt;
	 * @param mixed $DESK Reference to current FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	static function Exec(&amp;amp;$DESK)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The filepath, webpath and ID are provided by the system automatically on startup and can then be used within the PIM.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&lt;br /&gt;
The following provides a simple example of a plugin providing some workload reporting. It would be installed as follows:&lt;br /&gt;
* Folder: plugins/workload&lt;br /&gt;
* Main file: plugins/workload/workload.php&lt;br /&gt;
* Main class: plugins/workload/workload.php::workload&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
&lt;br /&gt;
// A new class for the PIM extending FreeDESK_PIM,&lt;br /&gt;
// named the same as the directory and filename&lt;br /&gt;
class workload extends FreeDESK_PIM&lt;br /&gt;
{&lt;br /&gt;
// The startup method - register functionalityh&lt;br /&gt;
function Start()&lt;br /&gt;
{&lt;br /&gt;
  // Register ourselves as a plugin&lt;br /&gt;
  $this-&amp;gt;DESK-&amp;gt;PluginManager-&amp;gt;Register(new Plugin(&lt;br /&gt;
    &amp;quot;Workload&amp;quot;, &amp;quot;0.01&amp;quot;, &amp;quot;Reporting&amp;quot; ));&lt;br /&gt;
  // Register a page which will be displayed&lt;br /&gt;
  $this-&amp;gt;DESK-&amp;gt;PluginManager-&amp;gt;RegisterPIMPage(&amp;quot;workload_page&amp;quot;,&lt;br /&gt;
    $this-&amp;gt;ID);&lt;br /&gt;
  // Register an API call for details&lt;br /&gt;
  $this-&amp;gt;DESK-&amp;gt;PluginManager-&amp;gt;RegisterPIMAPI(&amp;quot;workload_api&amp;quot;,&lt;br /&gt;
    $this-&amp;gt;ID);&lt;br /&gt;
  // Add a permission for this action&lt;br /&gt;
  $this-&amp;gt;DESK-&amp;gt;PermissionManager-&amp;gt;Register(&amp;quot;workload&amp;quot;, false);&lt;br /&gt;
  // Register a JS script (workload.js) in our directory for inclusion&lt;br /&gt;
  // Note the file can be called anything we like or even not in the&lt;br /&gt;
  // directory (unlike this PHP file)&lt;br /&gt;
  $jspath = $this-&amp;gt;webpath . &amp;quot;workload.js&amp;quot;;&lt;br /&gt;
  $this-&amp;gt;DESK-&amp;gt;PluginManager-&amp;gt;RegisterScript($jspath);&lt;br /&gt;
  // Register a CSS file (workload.css)&lt;br /&gt;
  $csspath = $this-&amp;gt;webpath . &amp;quot;workload.css&amp;quot;;&lt;br /&gt;
  $this-&amp;gt;DESK-&amp;gt;PluginManager-&amp;gt;RegisterCSS($csspath);&lt;br /&gt;
}&lt;br /&gt;
// The method to add menu items&lt;br /&gt;
function BuildMenu()&lt;br /&gt;
{&lt;br /&gt;
  // Check if the permission is allowed or don't show the menu&lt;br /&gt;
  if ($this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;Permission(&amp;quot;workload&amp;quot;))&lt;br /&gt;
  {&lt;br /&gt;
    // Check if the reporting menu already exists, add if not&lt;br /&gt;
    $currentItems = $this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;MenuItems();&lt;br /&gt;
    if (!isset($currentItems['reporting']))&lt;br /&gt;
    {&lt;br /&gt;
      $repmenu = new MenuItem();&lt;br /&gt;
      $repmenu-&amp;gt;tag = &amp;quot;reporting&amp;quot;;&lt;br /&gt;
      $repmenu-&amp;gt;display = &amp;quot;Reporting&amp;quot;;&lt;br /&gt;
      $this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;AddMenuItem&lt;br /&gt;
        (&amp;quot;reporting&amp;quot;, $repmenu);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Built the menu item for this plugin&lt;br /&gt;
    $sReport = new MenuItem();&lt;br /&gt;
    $sReport-&amp;gt;tag=&amp;quot;workload&amp;quot;;&lt;br /&gt;
    $sReport-&amp;gt;display=&amp;quot;Workload&amp;quot;;&lt;br /&gt;
    // Set the action for the click&lt;br /&gt;
    // (show the page 'workload' registered above)&lt;br /&gt;
    $sReport-&amp;gt;onclick = &amp;quot;DESK.loadSubpage('workload_page');&amp;quot;;&lt;br /&gt;
    // Add the menu option to the reporting menu&lt;br /&gt;
    $this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;AddMenuItem(&amp;quot;reporting&amp;quot;,$sReport);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
// Handle page requests (specifically the workload page)&lt;br /&gt;
function Page($page)&lt;br /&gt;
{&lt;br /&gt;
  if ($page == &amp;quot;workload_page&amp;quot; // page is the workload page&lt;br /&gt;
  	&amp;amp;&amp;amp; // and permission for this page&lt;br /&gt;
  	$this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;Permission(&amp;quot;workload&amp;quot;))&lt;br /&gt;
  {&lt;br /&gt;
    // Page title&lt;br /&gt;
    echo &amp;quot;&amp;lt;h3&amp;gt;Workload&amp;lt;/h3&amp;gt;\n&amp;quot;;&lt;br /&gt;
    // Team and user list&lt;br /&gt;
    $teamuser = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;TeamUserList();&lt;br /&gt;
    // Iterate through this list and display workload info&lt;br /&gt;
    echo &amp;quot;&amp;lt;table&amp;gt;\n&amp;quot;;&lt;br /&gt;
    foreach($teamuser as $teamid =&amp;gt; $teamdata)&lt;br /&gt;
    {&lt;br /&gt;
      // Counter for the team&lt;br /&gt;
      $teamcount=0;&lt;br /&gt;
      echo &amp;quot;&amp;lt;tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;td&amp;gt;\n&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;b&amp;gt;&amp;quot;.$teamdata['name'].&amp;quot;&amp;lt;/b&amp;gt;\n&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;/td&amp;gt;\n&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;\n&amp;quot;;&lt;br /&gt;
      // Get the requests assigned to just the team&lt;br /&gt;
      $requests = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;FetchAssigned($teamid, &amp;quot;&amp;quot;);&lt;br /&gt;
      $reqcount = sizeof($requests);&lt;br /&gt;
      echo $reqcount;&lt;br /&gt;
      // Increment team counter&lt;br /&gt;
      $teamcount += $reqcount;&lt;br /&gt;
      echo &amp;quot;&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;quot;;&lt;br /&gt;
      // Detail link for the team&lt;br /&gt;
      $js=&amp;quot;Workload.Detail(&amp;quot;.$teamid.&amp;quot;,'');&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;td&amp;gt;\n&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;a href=\&amp;quot;#\&amp;quot; onclick=\&amp;quot;&amp;quot;.$js.&amp;quot;\&amp;quot;&amp;gt;Detail&amp;lt;/a&amp;gt;\n&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;/tr&amp;gt;&amp;quot;;&lt;br /&gt;
      // Detail row for the team&lt;br /&gt;
      echo &amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td colspan=\&amp;quot;3\&amp;quot; id=\&amp;quot;detail_&amp;quot;.$teamid.&amp;quot;_\&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
      // Iterate through the users in the team&lt;br /&gt;
      foreach($teamdata['items'] as $user =&amp;gt; $userdata)&lt;br /&gt;
      {&lt;br /&gt;
        echo &amp;quot;&amp;lt;tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
        echo &amp;quot;&amp;lt;td&amp;gt;\n&amp;quot;;&lt;br /&gt;
        echo $userdata['realname'];&lt;br /&gt;
        echo &amp;quot;&amp;lt;/td&amp;gt;\n&amp;quot;;&lt;br /&gt;
        echo &amp;quot;&amp;lt;td&amp;gt;\n&amp;quot;;&lt;br /&gt;
        // Requests for this user and team&lt;br /&gt;
        $requests = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;FetchAssigned($teamid, $user);&lt;br /&gt;
        $reqcount = sizeof($requests);&lt;br /&gt;
        echo $reqcount;&lt;br /&gt;
        // Increment team counter&lt;br /&gt;
        $teamcount+=$reqcount;&lt;br /&gt;
        echo &amp;quot;&amp;lt;/td&amp;gt;\n&amp;quot;;&lt;br /&gt;
        // Detail link for the team and user&lt;br /&gt;
        $js=&amp;quot;Workload.Detail(&amp;quot;.$teamid.&amp;quot;,'&amp;quot;.$user.&amp;quot;');&amp;quot;;&lt;br /&gt;
        echo &amp;quot;&amp;lt;td&amp;gt;\n&amp;quot;;&lt;br /&gt;
        echo &amp;quot;&amp;lt;a href=\&amp;quot;#\&amp;quot; onclick=\&amp;quot;&amp;quot;.$js.&amp;quot;\&amp;quot;&amp;gt;Detail&amp;lt;/a&amp;gt;\n&amp;quot;;&lt;br /&gt;
        echo &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;;&lt;br /&gt;
        echo &amp;quot;&amp;lt;/tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
        // Detail row for the user&lt;br /&gt;
        echo &amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td colspan=\&amp;quot;3\&amp;quot; id=\&amp;quot;detail_&amp;quot;.$teamid.&amp;quot;_&amp;quot;.$user.&amp;quot;\&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
      }&lt;br /&gt;
    // The team total&lt;br /&gt;
    echo &amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Total&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;&amp;quot;.$teamcount.&amp;quot;&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
    // A spacer&lt;br /&gt;
    echo &amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td colspan=\&amp;quot;3\&amp;quot;&amp;gt;&amp;lt;hr class=\&amp;quot;workload\&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    echo &amp;quot;&amp;lt;/table&amp;gt;\n&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
// API Handler&lt;br /&gt;
function API($mode)&lt;br /&gt;
{&lt;br /&gt;
  if ($mode == &amp;quot;workload_api&amp;quot; // Correct API Mode&lt;br /&gt;
    &amp;amp;&amp;amp; // and permission for workload&lt;br /&gt;
    $this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;Permission(&amp;quot;workload&amp;quot;))&lt;br /&gt;
  {&lt;br /&gt;
    // Get the team and user requested&lt;br /&gt;
    $teamid = isset($_REQUEST['teamid']) ? $_REQUEST['teamid'] : 0;&lt;br /&gt;
    $username = isset($_REQUEST['username']) ? $_REQUEST['username'] : &amp;quot;&amp;quot;;&lt;br /&gt;
    // Get the assigned requests&lt;br /&gt;
    $reqs = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;FetchAssigned($teamid,$username);&lt;br /&gt;
    // Get the list of priorities&lt;br /&gt;
    $pris = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;GetPriorityList();&lt;br /&gt;
    // Our output array with unknown default&lt;br /&gt;
    $out = array(0=&amp;gt;array(&amp;quot;name&amp;quot;=&amp;gt;&amp;quot;Unknown&amp;quot;,&amp;quot;total&amp;quot;=&amp;gt;0));&lt;br /&gt;
    // Iterate through the requests&lt;br /&gt;
    foreach($reqs as $req)&lt;br /&gt;
    {&lt;br /&gt;
      // Get the priority&lt;br /&gt;
      $pri = $req-&amp;gt;Get(&amp;quot;priority&amp;quot;);&lt;br /&gt;
      // Check if exists and add to totals&lt;br /&gt;
      if (isset($pris[$pri])) // valid&lt;br /&gt;
      {&lt;br /&gt;
        if (isset($out[$pri]))&lt;br /&gt;
          $out[$pri]['total']++;&lt;br /&gt;
        else&lt;br /&gt;
          $out[$pri]=array(&lt;br /&gt;
            &amp;quot;name&amp;quot;=&amp;gt;$pris[$pri]['priorityname'],&lt;br /&gt;
            &amp;quot;total&amp;quot;=&amp;gt;1 );&lt;br /&gt;
      }&lt;br /&gt;
      else&lt;br /&gt;
        $out[0][&amp;quot;total&amp;quot;]++;&lt;br /&gt;
    }&lt;br /&gt;
    // Build the HTML&lt;br /&gt;
    $html = &amp;quot;&amp;quot;;&lt;br /&gt;
    // For each detail line&lt;br /&gt;
    foreach($out as $line)&lt;br /&gt;
    {&lt;br /&gt;
      $html.=$line[&amp;quot;name&amp;quot;].&amp;quot;: &amp;quot;.$line[&amp;quot;total&amp;quot;].&amp;quot;&amp;lt;br /&amp;gt;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    // Create the XML output&lt;br /&gt;
    // XML creation object&lt;br /&gt;
    $xml = new xmlCreate();&lt;br /&gt;
    // Add a char element with CDATA encoding&lt;br /&gt;
    $xml-&amp;gt;charElement(&lt;br /&gt;
      &amp;quot;data&amp;quot;,&lt;br /&gt;
      $html,&lt;br /&gt;
      0,&lt;br /&gt;
      false,&lt;br /&gt;
      true );&lt;br /&gt;
    // Output the XML with the header&lt;br /&gt;
    $xml-&amp;gt;echoXML(true);&lt;br /&gt;
    // Exit (ensure no other output)&lt;br /&gt;
    exit();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally support Javascript and CSS files are used as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
//The PIM Function&lt;br /&gt;
function workloadPIM()&lt;br /&gt;
{&lt;br /&gt;
  // Last detail items asked for&lt;br /&gt;
  var teamid = 0;&lt;br /&gt;
  var username = &amp;quot;&amp;quot;;&lt;br /&gt;
  &lt;br /&gt;
  // Get detail for the given team and user&lt;br /&gt;
  this.Detail = function(teamid, username)&lt;br /&gt;
  {&lt;br /&gt;
    // Set last requested items&lt;br /&gt;
    this.teamid = teamid;&lt;br /&gt;
    this.username = username;&lt;br /&gt;
    &lt;br /&gt;
    // Create a ServerRequest object&lt;br /&gt;
    var sr = new ServerRequest();&lt;br /&gt;
    // Build the URL to the API&lt;br /&gt;
    var url = &amp;quot;api.php?&amp;quot;;&lt;br /&gt;
    // Add the mode&lt;br /&gt;
    url += &amp;quot;mode=workload_api&amp;quot;;&lt;br /&gt;
    // And the team and user detail&lt;br /&gt;
    url += &amp;quot;&amp;amp;teamid=&amp;quot;+teamid+&amp;quot;&amp;amp;username=&amp;quot;+username;&lt;br /&gt;
    // And the SID from FreeDESK&lt;br /&gt;
    url += &amp;quot;&amp;amp;sid=&amp;quot;+DESK.sid;&lt;br /&gt;
    // Define the callback&lt;br /&gt;
    sr.callback = Workload.Callback;&lt;br /&gt;
    // Set the URL&lt;br /&gt;
    sr.url = url;&lt;br /&gt;
    // Set to XML&lt;br /&gt;
    sr.xmlrequest = true;&lt;br /&gt;
    // Call the API&lt;br /&gt;
    sr.Post();&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  // The callback method (API response)&lt;br /&gt;
  this.Callback = function(xml, additional)&lt;br /&gt;
  {&lt;br /&gt;
    // Check if the API has returned an error&lt;br /&gt;
    if (DESK.isError(xml))&lt;br /&gt;
    {&lt;br /&gt;
      // Display error&lt;br /&gt;
      Alerts.add(DESK.getError(xml), 2, 10);&lt;br /&gt;
      // Exit&lt;br /&gt;
      return;&lt;br /&gt;
    } // no error so continue&lt;br /&gt;
    // Strip the response from the server&lt;br /&gt;
    var data = xml.getElementsByTagName(&amp;quot;data&amp;quot;)[0]&lt;br /&gt;
      .firstChild.nodeValue;&lt;br /&gt;
    // Get the element to display it in&lt;br /&gt;
    var eleID = 'detail_'&lt;br /&gt;
      +Workload.teamid&lt;br /&gt;
      +&amp;quot;_&amp;quot;+Workload.username;&lt;br /&gt;
    var ele = document.getElementById(eleID);&lt;br /&gt;
    // And display the data&lt;br /&gt;
    ele.innerHTML = data;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
// Instantiate the workloadPIM object&lt;br /&gt;
var Workload = new workloadPIM();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;&lt;br /&gt;
hr.workload&lt;br /&gt;
{&lt;br /&gt;
 	color: green;&lt;br /&gt;
 	background-color: green;&lt;br /&gt;
	border: 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more examples look at the provided example plugins with the system.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Developing_Plugin_Modules</id>
		<title>Developing Plugin Modules</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Developing_Plugin_Modules"/>
				<updated>2012-08-21T23:52:09Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plugin modules are the heart of FreeDESK extensibility and are developed in PHP. All plugin modules extend the base class FreeDESK_PIM and provide some defined interfaces.&lt;br /&gt;
&lt;br /&gt;
Plugins can register functionality they provide in the main system, register additional pages and menu options for display, register custom API modes and handle request events.&lt;br /&gt;
&lt;br /&gt;
= Plugin Modules (PIMs) =&lt;br /&gt;
&lt;br /&gt;
PIMs provide some or all of the functionality listed in the FreeDESK_PIM module. For a plugin to work it must be installed in a named directory within the plugin folder, have a main PHP file of the same name and the main PIM class within that file of the same name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * FreeDESK_PIM is the abstacr base class for all PIM components&lt;br /&gt;
**/&lt;br /&gt;
abstract class FreeDESK_PIM&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	protected $DESK = null;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * File path for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	protected $filepath = &amp;quot;&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Web path for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	protected $webpath = &amp;quot;&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * ID for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	protected $ID = 0;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Main Constructor&lt;br /&gt;
	 * @param mixed $freeDESK FreeDESK instance&lt;br /&gt;
	 * @param string $filepath Path to plugin directory (filebase)&lt;br /&gt;
	 * @param string $webpath Path to plugin directory (webpath)&lt;br /&gt;
	 * @param int $id Internal FreeDESK ID for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	function FreeDESK_PIM(&amp;amp;$freeDESK, $filepath, $webpath, $id)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;DESK = &amp;amp;$freeDESK;&lt;br /&gt;
		$this-&amp;gt;filepath = $filepath;&lt;br /&gt;
		$this-&amp;gt;webpath = $webpath;&lt;br /&gt;
		$this-&amp;gt;ID = $id;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Start (when an instance is started from within the system and is installed - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Start()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Install - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Install()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Activate - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Activate()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * De-Activate - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Deactivate()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Uninstall - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Uninstall()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * API Call - to be overriden&lt;br /&gt;
	 * @param string $mode API Mode&lt;br /&gt;
	**/&lt;br /&gt;
	function API($mode)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Event Call - to be overriden&lt;br /&gt;
	 * @param string $event Event&lt;br /&gt;
	 * @param mixed &amp;amp;$data Event data (dependent on the event)&lt;br /&gt;
	**/&lt;br /&gt;
	function Event($event, &amp;amp;$data)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Build any menu items needed - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function BuildMenu()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Page has been called for this plugin - to be overriden&lt;br /&gt;
	 * @param string $page Page identifier&lt;br /&gt;
	**/&lt;br /&gt;
	function Page($page)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Static exec/registration function to list provided interfaces&lt;br /&gt;
	 * @param mixed $DESK Reference to current FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	static function Exec(&amp;amp;$DESK)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The filepath, webpath and ID are provided by the system automatically on startup and can then be used within the PIM.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&lt;br /&gt;
The following provides a simple example of a plugin providing some workload reporting. It would be installed as follows:&lt;br /&gt;
* Folder: plugins/workload&lt;br /&gt;
* Main file: plugins/workload/workload.php&lt;br /&gt;
* Main class: plugins/workload/workload.php::workload&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
&lt;br /&gt;
// A new class for the PIM extending FreeDESK_PIM,&lt;br /&gt;
// named the same as the directory and filename&lt;br /&gt;
class workload extends FreeDESK_PIM&lt;br /&gt;
{&lt;br /&gt;
// The startup method - register functionalityh&lt;br /&gt;
function Start()&lt;br /&gt;
{&lt;br /&gt;
  // Register ourselves as a plugin&lt;br /&gt;
  $this-&amp;gt;DESK-&amp;gt;PluginManager-&amp;gt;Register(new Plugin(&lt;br /&gt;
    &amp;quot;Workload&amp;quot;, &amp;quot;0.01&amp;quot;, &amp;quot;Reporting&amp;quot; ));&lt;br /&gt;
  // Register a page which will be displayed&lt;br /&gt;
  $this-&amp;gt;DESK-&amp;gt;PluginManager-&amp;gt;RegisterPIMPage(&amp;quot;workload_page&amp;quot;,&lt;br /&gt;
    $this-&amp;gt;ID);&lt;br /&gt;
  // Register an API call for details&lt;br /&gt;
  $this-&amp;gt;DESK-&amp;gt;PluginManager-&amp;gt;RegisterPIMAPI(&amp;quot;workload_api&amp;quot;,&lt;br /&gt;
    $this-&amp;gt;ID);&lt;br /&gt;
  // Add a permission for this action&lt;br /&gt;
  $this-&amp;gt;DESK-&amp;gt;PermissionManager-&amp;gt;Register(&amp;quot;workload&amp;quot;, false);&lt;br /&gt;
  // Register a JS script (workload.js) in our directory for inclusion&lt;br /&gt;
  // Note the file can be called anything we like or even not in the&lt;br /&gt;
  // directory (unlike this PHP file)&lt;br /&gt;
  $jspath = $this-&amp;gt;webpath . &amp;quot;workload.js&amp;quot;;&lt;br /&gt;
  $this-&amp;gt;DESK-&amp;gt;PluginManager-&amp;gt;RegisterScript($jspath);&lt;br /&gt;
  // Register a CSS file (workload.css)&lt;br /&gt;
  $csspath = $this-&amp;gt;webpath . &amp;quot;workload.css&amp;quot;;&lt;br /&gt;
  $this-&amp;gt;DESK-&amp;gt;PluginManager-&amp;gt;RegisterCSS($csspath);&lt;br /&gt;
}&lt;br /&gt;
// The method to add menu items&lt;br /&gt;
function BuildMenu()&lt;br /&gt;
{&lt;br /&gt;
  // Check if the permission is allowed or don't show the menu&lt;br /&gt;
  if ($this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;Permission(&amp;quot;workload&amp;quot;))&lt;br /&gt;
  {&lt;br /&gt;
    // Check if the reporting menu already exists, add if not&lt;br /&gt;
    $currentItems = $this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;MenuItems();&lt;br /&gt;
    if (!isset($currentItems['reporting']))&lt;br /&gt;
    {&lt;br /&gt;
      $repmenu = new MenuItem();&lt;br /&gt;
      $repmenu-&amp;gt;tag = &amp;quot;reporting&amp;quot;;&lt;br /&gt;
      $repmenu-&amp;gt;display = &amp;quot;Reporting&amp;quot;;&lt;br /&gt;
      $this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;AddMenuItem&lt;br /&gt;
        (&amp;quot;reporting&amp;quot;, $repmenu);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Built the menu item for this plugin&lt;br /&gt;
    $sReport = new MenuItem();&lt;br /&gt;
    $sReport-&amp;gt;tag=&amp;quot;workload&amp;quot;;&lt;br /&gt;
    $sReport-&amp;gt;display=&amp;quot;Workload&amp;quot;;&lt;br /&gt;
    // Set the action for the click&lt;br /&gt;
    // (show the page 'workload' registered above)&lt;br /&gt;
    $sReport-&amp;gt;onclick = &amp;quot;DESK.loadSubpage('workload_page');&amp;quot;;&lt;br /&gt;
    // Add the menu option to the reporting menu&lt;br /&gt;
    $this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;AddMenuItem(&amp;quot;reporting&amp;quot;,$sReport);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
// Handle page requests (specifically the workload page)&lt;br /&gt;
function Page($page)&lt;br /&gt;
{&lt;br /&gt;
  if ($page == &amp;quot;workload_page&amp;quot; // page is the workload page&lt;br /&gt;
  	&amp;amp;&amp;amp; // and permission for this page&lt;br /&gt;
  	$this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;Permission(&amp;quot;workload&amp;quot;))&lt;br /&gt;
  {&lt;br /&gt;
    // Page title&lt;br /&gt;
    echo &amp;quot;&amp;lt;h3&amp;gt;Workload&amp;lt;/h3&amp;gt;\n&amp;quot;;&lt;br /&gt;
    // Team and user list&lt;br /&gt;
    $teamuser = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;TeamUserList();&lt;br /&gt;
    // Iterate through this list and display workload info&lt;br /&gt;
    echo &amp;quot;&amp;lt;table&amp;gt;\n&amp;quot;;&lt;br /&gt;
    foreach($teamuser as $teamid =&amp;gt; $teamdata)&lt;br /&gt;
    {&lt;br /&gt;
      // Counter for the team&lt;br /&gt;
      $teamcount=0;&lt;br /&gt;
      echo &amp;quot;&amp;lt;tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;td&amp;gt;\n&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;b&amp;gt;&amp;quot;.$teamdata['name'].&amp;quot;&amp;lt;/b&amp;gt;\n&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;/td&amp;gt;\n&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;\n&amp;quot;;&lt;br /&gt;
      // Get the requests assigned to just the team&lt;br /&gt;
      $requests = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;FetchAssigned($teamid, &amp;quot;&amp;quot;);&lt;br /&gt;
      $reqcount = sizeof($requests);&lt;br /&gt;
      echo $reqcount;&lt;br /&gt;
      // Increment team counter&lt;br /&gt;
      $teamcount += $reqcount;&lt;br /&gt;
      echo &amp;quot;&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;quot;;&lt;br /&gt;
      // Detail link for the team&lt;br /&gt;
      $js=&amp;quot;Workload.Detail(&amp;quot;.$teamid.&amp;quot;,'');&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;td&amp;gt;\n&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;a href=\&amp;quot;#\&amp;quot; onclick=\&amp;quot;&amp;quot;.$js.&amp;quot;\&amp;quot;&amp;gt;Detail&amp;lt;/a&amp;gt;\n&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;;&lt;br /&gt;
      echo &amp;quot;&amp;lt;/tr&amp;gt;&amp;quot;;&lt;br /&gt;
      // Detail row for the team&lt;br /&gt;
      echo &amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td colspan=\&amp;quot;3\&amp;quot; id=\&amp;quot;detail_&amp;quot;.$teamid.&amp;quot;_\&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
      // Iterate through the users in the team&lt;br /&gt;
      foreach($teamdata['items'] as $user =&amp;gt; $userdata)&lt;br /&gt;
      {&lt;br /&gt;
        echo &amp;quot;&amp;lt;tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
        echo &amp;quot;&amp;lt;td&amp;gt;\n&amp;quot;;&lt;br /&gt;
        echo $userdata['realname'];&lt;br /&gt;
        echo &amp;quot;&amp;lt;/td&amp;gt;\n&amp;quot;;&lt;br /&gt;
        echo &amp;quot;&amp;lt;td&amp;gt;\n&amp;quot;;&lt;br /&gt;
        // Requests for this user and team&lt;br /&gt;
        $requests = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;FetchAssigned($teamid, $user);&lt;br /&gt;
        $reqcount = sizeof($requests);&lt;br /&gt;
        echo $reqcount;&lt;br /&gt;
        // Increment team counter&lt;br /&gt;
        $teamcount+=$reqcount;&lt;br /&gt;
        echo &amp;quot;&amp;lt;/td&amp;gt;\n&amp;quot;;&lt;br /&gt;
        // Detail link for the team and user&lt;br /&gt;
        $js=&amp;quot;Workload.Detail(&amp;quot;.$teamid.&amp;quot;,'&amp;quot;.$user.&amp;quot;');&amp;quot;;&lt;br /&gt;
        echo &amp;quot;&amp;lt;td&amp;gt;\n&amp;quot;;&lt;br /&gt;
        echo &amp;quot;&amp;lt;a href=\&amp;quot;#\&amp;quot; onclick=\&amp;quot;&amp;quot;.$js.&amp;quot;\&amp;quot;&amp;gt;Detail&amp;lt;/a&amp;gt;\n&amp;quot;;&lt;br /&gt;
        echo &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;;&lt;br /&gt;
        echo &amp;quot;&amp;lt;/tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
        // Detail row for the user&lt;br /&gt;
        echo &amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td colspan=\&amp;quot;3\&amp;quot; id=\&amp;quot;detail_&amp;quot;.$teamid.&amp;quot;_&amp;quot;.$user.&amp;quot;\&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
      }&lt;br /&gt;
    // The team total&lt;br /&gt;
    echo &amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Total&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;&amp;quot;.$teamcount.&amp;quot;&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
    // A spacer&lt;br /&gt;
    echo &amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td colspan=\&amp;quot;3\&amp;quot;&amp;gt;&amp;lt;hr class=\&amp;quot;workload\&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    echo &amp;quot;&amp;lt;/table&amp;gt;\n&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
// API Handler&lt;br /&gt;
function API($mode)&lt;br /&gt;
{&lt;br /&gt;
  if ($mode == &amp;quot;workload_api&amp;quot; // Correct API Mode&lt;br /&gt;
    &amp;amp;&amp;amp; // and permission for workload&lt;br /&gt;
    $this-&amp;gt;DESK-&amp;gt;ContextManager-&amp;gt;Permission(&amp;quot;workload&amp;quot;))&lt;br /&gt;
  {&lt;br /&gt;
    // Get the team and user requested&lt;br /&gt;
    $teamid = isset($_REQUEST['teamid']) ? $_REQUEST['teamid'] : 0;&lt;br /&gt;
    $username = isset($_REQUEST['username']) ? $_REQUEST['username'] : &amp;quot;&amp;quot;;&lt;br /&gt;
    // Get the assigned requests&lt;br /&gt;
    $reqs = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;FetchAssigned($teamid,$username);&lt;br /&gt;
    // Get the list of priorities&lt;br /&gt;
    $pris = $this-&amp;gt;DESK-&amp;gt;RequestManager-&amp;gt;GetPriorityList();&lt;br /&gt;
    // Our output array with unknown default&lt;br /&gt;
    $out = array(0=&amp;gt;array(&amp;quot;name&amp;quot;=&amp;gt;&amp;quot;Unknown&amp;quot;,&amp;quot;total&amp;quot;=&amp;gt;0));&lt;br /&gt;
    // Iterate through the requests&lt;br /&gt;
    foreach($reqs as $req)&lt;br /&gt;
    {&lt;br /&gt;
      // Get the priority&lt;br /&gt;
      $pri = $req-&amp;gt;Get(&amp;quot;priority&amp;quot;);&lt;br /&gt;
      // Check if exists and add to totals&lt;br /&gt;
      if (isset($pris[$pri])) // valid&lt;br /&gt;
      {&lt;br /&gt;
        if (isset($out[$pri]))&lt;br /&gt;
          $out[$pri]['total']++;&lt;br /&gt;
        else&lt;br /&gt;
          $out[$pri]=array(&lt;br /&gt;
            &amp;quot;name&amp;quot;=&amp;gt;$pris[$pri]['priorityname'],&lt;br /&gt;
            &amp;quot;total&amp;quot;=&amp;gt;1 );&lt;br /&gt;
      }&lt;br /&gt;
      else&lt;br /&gt;
        $out[0][&amp;quot;total&amp;quot;]++;&lt;br /&gt;
    }&lt;br /&gt;
    // Build the HTML&lt;br /&gt;
    $html = &amp;quot;&amp;quot;;&lt;br /&gt;
    // For each detail line&lt;br /&gt;
    foreach($out as $line)&lt;br /&gt;
    {&lt;br /&gt;
      $html.=$line[&amp;quot;name&amp;quot;].&amp;quot;: &amp;quot;.$line[&amp;quot;total&amp;quot;].&amp;quot;&amp;lt;br /&amp;gt;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    // Create the XML output&lt;br /&gt;
    // XML creation object&lt;br /&gt;
    $xml = new xmlCreate();&lt;br /&gt;
    // Add a char element with CDATA encoding&lt;br /&gt;
    $xml-&amp;gt;charElement(&lt;br /&gt;
      &amp;quot;data&amp;quot;,&lt;br /&gt;
      $html,&lt;br /&gt;
      0,&lt;br /&gt;
      false,&lt;br /&gt;
      true );&lt;br /&gt;
    // Output the XML with the header&lt;br /&gt;
    $xml-&amp;gt;echoXML(true);&lt;br /&gt;
    // Exit (ensure no other output)&lt;br /&gt;
    exit();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally support Javascript and CSS files are used as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
//The PIM Function&lt;br /&gt;
function workloadPIM()&lt;br /&gt;
{&lt;br /&gt;
  // Last detail items asked for&lt;br /&gt;
  var teamid = 0;&lt;br /&gt;
  var username = &amp;quot;&amp;quot;;&lt;br /&gt;
  &lt;br /&gt;
  // Get detail for the given team and user&lt;br /&gt;
  this.Detail = function(teamid, username)&lt;br /&gt;
  {&lt;br /&gt;
    // Set last requested items&lt;br /&gt;
    this.teamid = teamid;&lt;br /&gt;
    this.username = username;&lt;br /&gt;
    &lt;br /&gt;
    // Create a ServerRequest object&lt;br /&gt;
    var sr = new ServerRequest();&lt;br /&gt;
    // Build the URL to the API&lt;br /&gt;
    var url = &amp;quot;api.php?&amp;quot;;&lt;br /&gt;
    // Add the mode&lt;br /&gt;
    url += &amp;quot;mode=workload_api&amp;quot;;&lt;br /&gt;
    // And the team and user detail&lt;br /&gt;
    url += &amp;quot;&amp;amp;teamid=&amp;quot;+teamid+&amp;quot;&amp;amp;username=&amp;quot;+username;&lt;br /&gt;
    // And the SID from FreeDESK&lt;br /&gt;
    url += &amp;quot;&amp;amp;sid=&amp;quot;+DESK.sid;&lt;br /&gt;
    // Define the callback&lt;br /&gt;
    sr.callback = Workload.Callback;&lt;br /&gt;
    // Set the URL&lt;br /&gt;
    sr.url = url;&lt;br /&gt;
    // Set to XML&lt;br /&gt;
    sr.xmlrequest = true;&lt;br /&gt;
    // Call the API&lt;br /&gt;
    sr.Post();&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  // The callback method (API response)&lt;br /&gt;
  this.Callback = function(xml, additional)&lt;br /&gt;
  {&lt;br /&gt;
    // Check if the API has returned an error&lt;br /&gt;
    if (DESK.isError(xml))&lt;br /&gt;
    {&lt;br /&gt;
      // Display error&lt;br /&gt;
      Alerts.add(DESK.getError(xml), 2, 10);&lt;br /&gt;
      // Exit&lt;br /&gt;
      return;&lt;br /&gt;
    } // no error so continue&lt;br /&gt;
    // Strip the response from the server&lt;br /&gt;
    var data = xml.getElementsByTagName(&amp;quot;data&amp;quot;)[0]&lt;br /&gt;
      .firstChild.nodeValue;&lt;br /&gt;
    // Get the element to display it in&lt;br /&gt;
    var eleID = 'detail_'&lt;br /&gt;
      +Workload.teamid&lt;br /&gt;
      +&amp;quot;_&amp;quot;+Workload.username;&lt;br /&gt;
    var ele = document.getElementById(eleID);&lt;br /&gt;
    // And display the data&lt;br /&gt;
    ele.innerHTML = data;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
// Instantiate the workloadPIM object&lt;br /&gt;
var Workload = new workloadPIM();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Developing_Plugin_Modules</id>
		<title>Developing Plugin Modules</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Developing_Plugin_Modules"/>
				<updated>2012-08-21T23:47:08Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plugin modules are the heart of FreeDESK extensibility and are developed in PHP. All plugin modules extend the base class FreeDESK_PIM and provide some defined interfaces.&lt;br /&gt;
&lt;br /&gt;
Plugins can register functionality they provide in the main system, register additional pages and menu options for display, register custom API modes and handle request events.&lt;br /&gt;
&lt;br /&gt;
= Plugin Modules (PIMs) =&lt;br /&gt;
&lt;br /&gt;
PIMs provide some or all of the functionality listed in the FreeDESK_PIM module. For a plugin to work it must be installed in a named directory within the plugin folder, have a main PHP file of the same name and the main PIM class within that file of the same name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * FreeDESK_PIM is the abstacr base class for all PIM components&lt;br /&gt;
**/&lt;br /&gt;
abstract class FreeDESK_PIM&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	protected $DESK = null;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * File path for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	protected $filepath = &amp;quot;&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Web path for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	protected $webpath = &amp;quot;&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * ID for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	protected $ID = 0;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Main Constructor&lt;br /&gt;
	 * @param mixed $freeDESK FreeDESK instance&lt;br /&gt;
	 * @param string $filepath Path to plugin directory (filebase)&lt;br /&gt;
	 * @param string $webpath Path to plugin directory (webpath)&lt;br /&gt;
	 * @param int $id Internal FreeDESK ID for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	function FreeDESK_PIM(&amp;amp;$freeDESK, $filepath, $webpath, $id)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;DESK = &amp;amp;$freeDESK;&lt;br /&gt;
		$this-&amp;gt;filepath = $filepath;&lt;br /&gt;
		$this-&amp;gt;webpath = $webpath;&lt;br /&gt;
		$this-&amp;gt;ID = $id;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Start (when an instance is started from within the system and is installed - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Start()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Install - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Install()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Activate - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Activate()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * De-Activate - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Deactivate()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Uninstall - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Uninstall()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * API Call - to be overriden&lt;br /&gt;
	 * @param string $mode API Mode&lt;br /&gt;
	**/&lt;br /&gt;
	function API($mode)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Event Call - to be overriden&lt;br /&gt;
	 * @param string $event Event&lt;br /&gt;
	 * @param mixed &amp;amp;$data Event data (dependent on the event)&lt;br /&gt;
	**/&lt;br /&gt;
	function Event($event, &amp;amp;$data)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Build any menu items needed - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function BuildMenu()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Page has been called for this plugin - to be overriden&lt;br /&gt;
	 * @param string $page Page identifier&lt;br /&gt;
	**/&lt;br /&gt;
	function Page($page)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Static exec/registration function to list provided interfaces&lt;br /&gt;
	 * @param mixed $DESK Reference to current FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	static function Exec(&amp;amp;$DESK)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Developing_Plugin_Modules</id>
		<title>Developing Plugin Modules</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Developing_Plugin_Modules"/>
				<updated>2012-08-21T23:46:49Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Plugin modules are the heart of FreeDESK extensibility and are developed in PHP. All plugin modules extend the base class FreeDESK_PIM and provide some defined interfaces.  Pl...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plugin modules are the heart of FreeDESK extensibility and are developed in PHP. All plugin modules extend the base class FreeDESK_PIM and provide some defined interfaces.&lt;br /&gt;
&lt;br /&gt;
Plugins can register functionality they provide in the main system, register additional pages and menu options for display, register custom API modes and handle request events.&lt;br /&gt;
&lt;br /&gt;
= Plugin Modules (PIMs) =&lt;br /&gt;
&lt;br /&gt;
PIMs provide some or all of the functionality listed in the FreeDESK_PIM module. For a plugin to work it must be installed in a named directory within the plugin folder, have a main PHP file of the same name and the main PIM class within that file of the same name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
/* -------------------------------------------------------------&lt;br /&gt;
This file is part of FreeDESK&lt;br /&gt;
&lt;br /&gt;
FreeDESK is (C) Copyright 2012 David Cutting&lt;br /&gt;
&lt;br /&gt;
FreeDESK is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
(at your option) any later version.&lt;br /&gt;
&lt;br /&gt;
FreeDESK is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
You should have received a copy of the GNU General Public License&lt;br /&gt;
along with FreeDESK.  If not, see www.gnu.org/licenses&lt;br /&gt;
&lt;br /&gt;
For more information see www.purplepixie.org/freedesk/&lt;br /&gt;
-------------------------------------------------------------- */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * FreeDESK_PIM is the abstacr base class for all PIM components&lt;br /&gt;
**/&lt;br /&gt;
abstract class FreeDESK_PIM&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	protected $DESK = null;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * File path for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	protected $filepath = &amp;quot;&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Web path for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	protected $webpath = &amp;quot;&amp;quot;;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * ID for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	protected $ID = 0;&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Main Constructor&lt;br /&gt;
	 * @param mixed $freeDESK FreeDESK instance&lt;br /&gt;
	 * @param string $filepath Path to plugin directory (filebase)&lt;br /&gt;
	 * @param string $webpath Path to plugin directory (webpath)&lt;br /&gt;
	 * @param int $id Internal FreeDESK ID for PIM&lt;br /&gt;
	**/&lt;br /&gt;
	function FreeDESK_PIM(&amp;amp;$freeDESK, $filepath, $webpath, $id)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;DESK = &amp;amp;$freeDESK;&lt;br /&gt;
		$this-&amp;gt;filepath = $filepath;&lt;br /&gt;
		$this-&amp;gt;webpath = $webpath;&lt;br /&gt;
		$this-&amp;gt;ID = $id;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Start (when an instance is started from within the system and is installed - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Start()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Install - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Install()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Activate - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Activate()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * De-Activate - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Deactivate()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Uninstall - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function Uninstall()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * API Call - to be overriden&lt;br /&gt;
	 * @param string $mode API Mode&lt;br /&gt;
	**/&lt;br /&gt;
	function API($mode)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Event Call - to be overriden&lt;br /&gt;
	 * @param string $event Event&lt;br /&gt;
	 * @param mixed &amp;amp;$data Event data (dependent on the event)&lt;br /&gt;
	**/&lt;br /&gt;
	function Event($event, &amp;amp;$data)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Build any menu items needed - to be overriden&lt;br /&gt;
	**/&lt;br /&gt;
	function BuildMenu()&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Page has been called for this plugin - to be overriden&lt;br /&gt;
	 * @param string $page Page identifier&lt;br /&gt;
	**/&lt;br /&gt;
	function Page($page)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Static exec/registration function to list provided interfaces&lt;br /&gt;
	 * @param mixed $DESK Reference to current FreeDESK instance&lt;br /&gt;
	**/&lt;br /&gt;
	static function Exec(&amp;amp;$DESK)&lt;br /&gt;
	{&lt;br /&gt;
		//&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Developer_Overview</id>
		<title>Developer Overview</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Developer_Overview"/>
				<updated>2012-08-21T23:42:14Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Development of extensions to FreeDESK consists of developing plugin modules of PHP code which can fulfil a specific function (replacing or providing an additional method for i...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Development of extensions to FreeDESK consists of developing plugin modules of PHP code which can fulfil a specific function (replacing or providing an additional method for inbuilt functionality) or add new functionality to the system.&lt;br /&gt;
&lt;br /&gt;
Plugins are wrapped within specifically-named directory and file structures which then become available for installation and activation through the system administration plugin options (under System - System Administration in the main interface).&lt;br /&gt;
&lt;br /&gt;
For information on developing specific areas see the following documents:&lt;br /&gt;
&lt;br /&gt;
* [[Developing Plugin Modules]]&lt;br /&gt;
* [[Authentication Modules]]&lt;br /&gt;
* [[Database Module]]&lt;br /&gt;
* [[Logging Module]]&lt;br /&gt;
* [[Custom Requests]]&lt;br /&gt;
* [[Entity Modules]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/System_Configuration</id>
		<title>System Configuration</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/System_Configuration"/>
				<updated>2012-08-21T22:46:29Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;The system configuration is accessed through the System menu in the main interface when users have system administration permissions.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The system configuration is accessed through the System menu in the main interface when users have system administration permissions.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Priorities</id>
		<title>Priorities</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Priorities"/>
				<updated>2012-08-21T22:45:59Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Priorities can be configured through the system administration interface.  When creating or editing a priority a target resolution can be set in hours, minutes and seconds. Th...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Priorities can be configured through the system administration interface.&lt;br /&gt;
&lt;br /&gt;
When creating or editing a priority a target resolution can be set in hours, minutes and seconds. This allows reporting to analyse if requests are being resolved within the set targets for the priority.&lt;br /&gt;
&lt;br /&gt;
Priorities are a useful way for service desk staff to distinguish relative importance of requests and are intended to be setup (and assigned against requests) based upon your internal processes.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Statuses</id>
		<title>Statuses</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Statuses"/>
				<updated>2012-08-21T22:44:15Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Requests are assigned statuses and these can be configured through the system administration menu.  Once a status has been created requests can be set (either on creation or u...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Requests are assigned statuses and these can be configured through the system administration menu.&lt;br /&gt;
&lt;br /&gt;
Once a status has been created requests can be set (either on creation or update) to this status which is displayed within the system interface. This allows distinguishing between requests which are awaiting action by a third party or similar.&lt;br /&gt;
&lt;br /&gt;
Once a request is complete it's status can be set to Closed (this is a system-made setting which cannot be deleted unlike other types) and it will no longer be visible in the normal request lists.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Configuring_Request_Types</id>
		<title>Configuring Request Types</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Configuring_Request_Types"/>
				<updated>2012-08-21T22:42:35Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Request types are configured through the System Administration interface under the heading &amp;quot;request classes&amp;quot;.  Different classes of request have different names to distinguish...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Request types are configured through the System Administration interface under the heading &amp;quot;request classes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Different classes of request have different names to distinguish them (once created they will appear under the New Request options) and an associated &amp;quot;concrete&amp;quot; class.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concrete&amp;quot; class is the actual PHP code underlying the request which can be created and customised by the user. By default all requests use the standard &amp;quot;concrete&amp;quot; class type which comes included with the system (and is sufficient for most needs). For information on the creation see the [[Custom Requests|custom request]] page.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Requests</id>
		<title>Requests</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Requests"/>
				<updated>2012-08-21T22:40:25Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Requests are the core of FreeDESK and someone with the relevant permissions (such as an administrator) can view and update all the requests logged within the system.&lt;br /&gt;
&lt;br /&gt;
Different types (classes) of request can be configured within the system for easy categorisation and also allowing for different &amp;quot;concrete&amp;quot; definitions in code of these requests, with specific or custom properties as explained in [[Configuring Request Types|the request configuration]].&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Requests</id>
		<title>Requests</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Requests"/>
				<updated>2012-08-21T22:38:51Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Requests are the core of FreeDESK and someone with the relevant permissions (such as an administrator) can view and update all the requests logged within the system.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Requests are the core of FreeDESK and someone with the relevant permissions (such as an administrator) can view and update all the requests logged within the system.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Permissions</id>
		<title>Permissions</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Permissions"/>
				<updated>2012-08-21T22:37:08Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Permissions in FreeDESK operate on a granular most-specific model.  Each user can have permissions assigned to it directly or be a member of a permissions group for easy bulk ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Permissions in FreeDESK operate on a granular most-specific model.&lt;br /&gt;
&lt;br /&gt;
Each user can have permissions assigned to it directly or be a member of a permissions group for easy bulk administration.&lt;br /&gt;
&lt;br /&gt;
A wide variety of operations are assigned a permission (these are either coded within the system or added automatically by plugins once installed). These permissions can be explicitly set (allowed or denied) on a per-user or per-group basis. If a permission is undefined then the next level of specificity is tested (hence the most-specific model).&lt;br /&gt;
&lt;br /&gt;
When a permission is requested it is determined as follows:&lt;br /&gt;
&lt;br /&gt;
* Is the permission set specifically for the user (allowed or denied), in which case this is used.&lt;br /&gt;
* Does the user have a default permission (allowed or denied), in which case this is used.&lt;br /&gt;
If the user is a member of a permission group:&lt;br /&gt;
* Is the permission set specifically for the group (allowed or denied), in which case this is used&lt;br /&gt;
* Does the group have a default permission (allowed or denied), in which case this is used&lt;br /&gt;
If no matching permission is found:&lt;br /&gt;
* Permission Denied&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== One ==&lt;br /&gt;
&lt;br /&gt;
The permission &amp;quot;one&amp;quot; is set as denied for the permission group, the user has it and default undefined.&lt;br /&gt;
&lt;br /&gt;
Permission is denied.&lt;br /&gt;
&lt;br /&gt;
== Two ==&lt;br /&gt;
&lt;br /&gt;
The permission &amp;quot;two&amp;quot; is set as denied for the permission group, the user has it undefined but default is allowed.&lt;br /&gt;
&lt;br /&gt;
The permission is allowed.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Customer_Access</id>
		<title>Customer Access</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Customer_Access"/>
				<updated>2012-08-21T22:32:03Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Customer access is provided through the customer portal. Customers can login to the interface (accessed either directly or by clicking on the customer link on the main page) a...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Customer access is provided through the customer portal. Customers can login to the interface (accessed either directly or by clicking on the customer link on the main page) and entering their email address or username and password. Customer usernames and passwords are managed from within the customer entity editor (under the Entity menu).&lt;br /&gt;
&lt;br /&gt;
The customer portal allows customers to view their existing request (updating any which are still open) as well as opening new requests (which are assigned to the Unassigned group).&lt;br /&gt;
&lt;br /&gt;
The customer portal can be easily customised or a specific portal created based upon the code contained in the customer folder of the FreeDESK interface, there is very little PHP code which can just be cut and pasted and the HTML/CSS customised as seen fit.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Standard_Users</id>
		<title>Standard Users</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Standard_Users"/>
				<updated>2012-08-21T22:29:03Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;Standard (analyst) users are those able to access the analyst portal (and use the API).  Users are managed through the System Administration option available to administra...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Standard (analyst) users are those able to access the analyst portal (and use the [[API]]).&lt;br /&gt;
&lt;br /&gt;
Users are managed through the System Administration option available to administrators under the System menu of the interface.&lt;br /&gt;
&lt;br /&gt;
Once users have been created they can be joined to a Team and also assigned [[Permissions|permissions]] which control what access that user has.&lt;br /&gt;
&lt;br /&gt;
When assigned to a team the user will appear listed on the interface and assignment lists for that team.&lt;br /&gt;
&lt;br /&gt;
To reset a user password open the user in the administration interface, enter a new password and click Save.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Users_and_Groups</id>
		<title>Users and Groups</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Users_and_Groups"/>
				<updated>2012-08-21T21:40:12Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FreeDESK has two core types of users, &amp;quot;standard users&amp;quot; (analysts or administrators) and &amp;quot;customer&amp;quot; users which are the customers the Service Desk supports and access the system through the [[Customer Portal]].&lt;br /&gt;
&lt;br /&gt;
* [[Standard Users]]&lt;br /&gt;
* [[Customer Access]]&lt;br /&gt;
* [[Permissions]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Users_and_Groups</id>
		<title>Users and Groups</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Users_and_Groups"/>
				<updated>2012-08-21T21:39:14Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;* Standard Users * Customer Access * Permissions&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Standard Users]]&lt;br /&gt;
* [[Customer Access]]&lt;br /&gt;
* [[Permissions]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_request_create</id>
		<title>API request create</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_request_create"/>
				<updated>2012-08-21T21:38:12Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;{{Infobox API | name = Request Create | mode = request_create | description = Create a New Request | parameters = class, customer, assign, update, status, priority | returned ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox API&lt;br /&gt;
| name = Request Create&lt;br /&gt;
| mode = request_create&lt;br /&gt;
| description = Create a New Request&lt;br /&gt;
| parameters = class, customer, assign, update, status, priority&lt;br /&gt;
| returned = XML request ID or error&lt;br /&gt;
}}&lt;br /&gt;
This article details a FreeDESK [[API]] call.&lt;br /&gt;
= Description =&lt;br /&gt;
This call will create a new request&lt;br /&gt;
= Using the Call =&lt;br /&gt;
Pass in the following parameters using GET or POST&lt;br /&gt;
* class : Request Class (blank will use default)&lt;br /&gt;
* customer : Customer ID&lt;br /&gt;
* assign : Composite assignment string in the form TEAMID/USERNAME (or just TEAMID) for assignment&lt;br /&gt;
* update : Textual Update&lt;br /&gt;
* status : Status Code&lt;br /&gt;
* priority : Priority Code&lt;br /&gt;
For example&lt;br /&gt;
 api.php?mode=request_create&amp;amp;class=1&amp;amp;customer=1&amp;amp;assign=0&amp;amp;update=A+Request&amp;amp;status=1&amp;amp;priority=1&lt;br /&gt;
= Returned Data =&lt;br /&gt;
XML containing either a request ID (see below) or a [[API XML Error|FreeDESK error on failure]].&lt;br /&gt;
&lt;br /&gt;
Format of created request response:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;request&amp;gt;ID&amp;lt;/request&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_request_update</id>
		<title>API request update</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_request_update"/>
				<updated>2012-08-21T21:34:46Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;{{Infobox API | name = Request Update | mode = request_update | description = Update a Request | parameters = requestid, update, status, assign | returned = XML success or err...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox API&lt;br /&gt;
| name = Request Update&lt;br /&gt;
| mode = request_update&lt;br /&gt;
| description = Update a Request&lt;br /&gt;
| parameters = requestid, update, status, assign&lt;br /&gt;
| returned = XML success or error&lt;br /&gt;
}}&lt;br /&gt;
This article details a FreeDESK [[API]] call.&lt;br /&gt;
= Description =&lt;br /&gt;
This call will update a request&lt;br /&gt;
= Using the Call =&lt;br /&gt;
Pass in the following parameters using GET or POST&lt;br /&gt;
* requestid : Request ID&lt;br /&gt;
* update : Textual update to request (optional, call be null or blank)&lt;br /&gt;
* status : New status for request (optional, can be null or blank)&lt;br /&gt;
* assign : Composite assignment string in the form TEAMID/USERNAME (or just a numeric team ID) - optional can be blank or null&lt;br /&gt;
For example&lt;br /&gt;
 api.php?mode=request_update&amp;amp;requestid=1&amp;amp;update=Hello+World&amp;amp;status=0&lt;br /&gt;
= Returned Data =&lt;br /&gt;
XML containing either a [[XML Operation Confirmation]] or a [[API XML Error|FreeDESK error on failure]].&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_entity_create</id>
		<title>API entity create</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_entity_create"/>
				<updated>2012-08-21T21:32:04Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;{{Infobox API | name = Entity Create | mode = entity_create | description = Create an entity record | parameters = entity, [fields] | returned = XML success or error }} This a...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox API&lt;br /&gt;
| name = Entity Create&lt;br /&gt;
| mode = entity_create&lt;br /&gt;
| description = Create an entity record&lt;br /&gt;
| parameters = entity, [fields]&lt;br /&gt;
| returned = XML success or error&lt;br /&gt;
}}&lt;br /&gt;
This article details a FreeDESK [[API]] call.&lt;br /&gt;
= Description =&lt;br /&gt;
This call will create a stored entity record&lt;br /&gt;
= Using the Call =&lt;br /&gt;
Pass in the following parameters using GET or POST&lt;br /&gt;
* entity : Entity name&lt;br /&gt;
* [fields] : Field list in the format fieldname=value&lt;br /&gt;
For example&lt;br /&gt;
 api.php?mode=entity_create&amp;amp;entity=customer&amp;amp;firstname=David&lt;br /&gt;
= Returned Data =&lt;br /&gt;
XML containing either a [[XML Operation Confirmation]] or a [[API XML Error|FreeDESK error on failure]].&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_entity_save</id>
		<title>API entity save</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_entity_save"/>
				<updated>2012-08-21T21:31:16Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;{{Infobox API | name = Entity Save | mode = entity_save | description = Save an entity record | parameters = entity, [fields] | returned = XML success or error }} This article...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox API&lt;br /&gt;
| name = Entity Save&lt;br /&gt;
| mode = entity_save&lt;br /&gt;
| description = Save an entity record&lt;br /&gt;
| parameters = entity, [fields]&lt;br /&gt;
| returned = XML success or error&lt;br /&gt;
}}&lt;br /&gt;
This article details a FreeDESK [[API]] call.&lt;br /&gt;
= Description =&lt;br /&gt;
This call will update a stored entity record&lt;br /&gt;
= Using the Call =&lt;br /&gt;
Pass in the following parameters using GET or POST&lt;br /&gt;
* entity : Entity name&lt;br /&gt;
* [fields] : Field list in the format fieldname=value&lt;br /&gt;
For example&lt;br /&gt;
 api.php?mode=entity_save&amp;amp;entity=customer&amp;amp;customerid=1&amp;amp;firstname=David&lt;br /&gt;
Please note that you 'must' pass the keyfield for the entity unmodified for the record to be successfully updated.&lt;br /&gt;
= Returned Data =&lt;br /&gt;
XML containing either a [[XML Operation Confirmation]] or a [[API XML Error|FreeDESK error on failure]].&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/XML_Operation_Confirmation</id>
		<title>XML Operation Confirmation</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/XML_Operation_Confirmation"/>
				<updated>2012-08-21T21:28:02Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;An XML operation confirmation is returned from the API when an operation (or set of operations) has succeeded but no specific information needs to be returned.  In general...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An XML operation confirmation is returned from the [[API]] when an operation (or set of operations) has succeeded but no specific information needs to be returned.&lt;br /&gt;
&lt;br /&gt;
In general these are simple update operations that don't require anything like a UID of a newly created object being returned. Such operations will return either an [[API XML Error]] or this success message.&lt;br /&gt;
&lt;br /&gt;
The operation success message is formatted as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;operation&amp;gt;1&amp;lt;/operation&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API</id>
		<title>API</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API"/>
				<updated>2012-08-21T19:04:41Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following is a list of API calls that can be made to the API via HTTP(S).&lt;br /&gt;
&lt;br /&gt;
Data can be passed either in the query string (GET) or as POST data. Returned data will be in XML as described for each individual call. The type of call is specified with the mode parameter. For all calls other than login an SID must be passed of a valid session.&lt;br /&gt;
&lt;br /&gt;
The API script is api.php so requests are made to &amp;lt;nowiki&amp;gt;http://your.freedesk.path/api.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= HTTP API Calls =&lt;br /&gt;
&lt;br /&gt;
* [[API login|login]] - open a user session to the system&lt;br /&gt;
* [[API logout|logout]] - close a current session&lt;br /&gt;
* [[API requests_assigned|requests_assigned]] - list of requests assigned to a specific user/team or combination&lt;br /&gt;
* [[API entity_search|entity_search]] - search a data entity&lt;br /&gt;
* [[API entity_save|entity_save]] - save an entity&lt;br /&gt;
* [[API entity_create|entity_create]] - create an entity&lt;br /&gt;
* [[API request_create|request_create]] - create a request&lt;br /&gt;
* [[API request_update|request_update]] - update a request&lt;br /&gt;
&lt;br /&gt;
For other built-in modes consult the source code directly.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API</id>
		<title>API</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API"/>
				<updated>2012-08-21T19:04:03Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following is a list of API calls that can be made to the API via HTTP(S).&lt;br /&gt;
&lt;br /&gt;
Data can be passed either in the query string (GET) or as POST data. Returned data will be in XML as described for each individual call. The type of call i specified with the mode parameter.&lt;br /&gt;
&lt;br /&gt;
The API script is api.php so requests are made to &amp;lt;nowiki&amp;gt;http://your.freedesk.path/api.php&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= HTTP API Calls =&lt;br /&gt;
&lt;br /&gt;
* [[API login|login]] - open a user session to the system&lt;br /&gt;
* [[API logout|logout]] - close a current session&lt;br /&gt;
* [[API requests_assigned|requests_assigned]] - list of requests assigned to a specific user/team or combination&lt;br /&gt;
* [[API entity_search|entity_search]] - search a data entity&lt;br /&gt;
* [[API entity_save|entity_save]] - save an entity&lt;br /&gt;
* [[API entity_create|entity_create]] - create an entity&lt;br /&gt;
* [[API request_create|request_create]] - create a request&lt;br /&gt;
* [[API request_update|request_update]] - update a request&lt;br /&gt;
&lt;br /&gt;
For other built-in modes consult the source code directly.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_entity_search</id>
		<title>API entity search</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_entity_search"/>
				<updated>2012-08-21T19:02:23Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox API&lt;br /&gt;
| name = Entity Search&lt;br /&gt;
| mode = entity_search&lt;br /&gt;
| description = Search an Entity&lt;br /&gt;
| parameters = entity, [fields], start, limit&lt;br /&gt;
| returned = XML login error or session data&lt;br /&gt;
}}&lt;br /&gt;
This article details a FreeDESK [[API]] call.&lt;br /&gt;
= Description =&lt;br /&gt;
The entity_search call will search a registered entity (with valid permissions) and return matches&lt;br /&gt;
= Using the Call =&lt;br /&gt;
Pass in the following parameters using GET or POST&lt;br /&gt;
* entity : Entity&lt;br /&gt;
* start : Start (0 for beginning)&lt;br /&gt;
* limit : Limit number of results (default 30)&lt;br /&gt;
* [fields] : In the form of:&lt;br /&gt;
 fieldname=value&lt;br /&gt;
For example&lt;br /&gt;
 api.php?mode=entity_search&amp;amp;entity=customer&amp;amp;firstname=david&lt;br /&gt;
Would search the customer entity for records with the firstname of david (starting at the beginning and returning a max of 30 results)&lt;br /&gt;
= Returned Data =&lt;br /&gt;
XML containing search results on success or a [[API XML Error]] on failure.&lt;br /&gt;
&lt;br /&gt;
Example returned output on success:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;search-results&amp;gt;&lt;br /&gt;
 &amp;lt;meta&amp;gt;&lt;br /&gt;
 &amp;lt;field-data&amp;gt;&lt;br /&gt;
  &amp;lt;id&amp;gt;customerid&amp;lt;/id&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Customer ID&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;/field-data&amp;gt;&lt;br /&gt;
 &amp;lt;field-data&amp;gt;&lt;br /&gt;
  &amp;lt;id&amp;gt;firstname&amp;lt;/id&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;First Name&amp;lt;/name&amp;gt;&lt;br /&gt;
 &amp;lt;/field-data&amp;gt;&lt;br /&gt;
 &amp;lt;field-data&amp;gt;&lt;br /&gt;
  &amp;lt;id&amp;gt;lastname&amp;lt;/id&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Last Name&amp;lt;/name&amp;gt;&lt;br /&gt;
 &amp;lt;/field-data&amp;gt;&lt;br /&gt;
 &amp;lt;keyfield&amp;gt;customerid&amp;lt;/keyfield&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;entity&amp;gt;&lt;br /&gt;
 &amp;lt;field id=&amp;quot;customerid&amp;quot;&amp;gt;1&amp;lt;/field&amp;gt;&lt;br /&gt;
 &amp;lt;field id=&amp;quot;firstname&amp;quot;&amp;gt;David&amp;lt;/field&amp;gt;&lt;br /&gt;
 &amp;lt;field id=&amp;quot;lastname&amp;quot;&amp;gt;Cutting&amp;lt;/field&amp;gt;&lt;br /&gt;
&amp;lt;/entity&amp;gt;&lt;br /&gt;
&amp;lt;/search-results&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_entity_search</id>
		<title>API entity search</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_entity_search"/>
				<updated>2012-08-21T18:58:55Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;{{Infobox API | name = Entity Search | mode = entity_search | description = Search an Entity | parameters = entity, [fields], start, limit | returned = XML login error or sess...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox API&lt;br /&gt;
| name = Entity Search&lt;br /&gt;
| mode = entity_search&lt;br /&gt;
| description = Search an Entity&lt;br /&gt;
| parameters = entity, [fields], start, limit&lt;br /&gt;
| returned = XML login error or session data&lt;br /&gt;
}}&lt;br /&gt;
This article details a FreeDESK [[API]] call.&lt;br /&gt;
= Description =&lt;br /&gt;
The entity_search call will search a registered entity (with valid permissions) and return matches&lt;br /&gt;
= Using the Call =&lt;br /&gt;
Pass in the following parameters using GET or POST&lt;br /&gt;
* entity : Entity&lt;br /&gt;
* start : Start (0 for beginning)&lt;br /&gt;
* limit : Limit number of results (default 30)&lt;br /&gt;
* [fields] : In the form of:&lt;br /&gt;
 fieldname=value&lt;br /&gt;
For example&lt;br /&gt;
 api.php?mode=entity_search&amp;amp;entity=customer&amp;amp;firstname=david&lt;br /&gt;
Would search the customer entity for records with the firstname of david (starting at the beginning and returning a max of 30 results)&lt;br /&gt;
= Returned Data =&lt;br /&gt;
XML containing search results on success or a&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_requests_assigned</id>
		<title>API requests assigned</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_requests_assigned"/>
				<updated>2012-08-21T18:53:03Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;{{Infobox API | name = Requests Assigned | mode = requests_assigned | description = Return Requests Assigned to Specific User/Team | parameters = teamid, username, sort, order...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox API&lt;br /&gt;
| name = Requests Assigned&lt;br /&gt;
| mode = requests_assigned&lt;br /&gt;
| description = Return Requests Assigned to Specific User/Team&lt;br /&gt;
| parameters = teamid, username, sort, order&lt;br /&gt;
| returned = XML request list&lt;br /&gt;
}}&lt;br /&gt;
This article details a FreeDESK [[API]] call.&lt;br /&gt;
= Description =&lt;br /&gt;
This call allows the fetching of sets of requests assigned to a specific team and/or user&lt;br /&gt;
= Using the Call =&lt;br /&gt;
Pass in the following parameters using GET or POST&lt;br /&gt;
* teamid : Team ID (null or 0 for no team)&lt;br /&gt;
* username : Username of analyst (null or blank for no user)&lt;br /&gt;
* sort : Field name on which to sort the results (blank or null for default)&lt;br /&gt;
* order : A for ASC or D for DESC (optional, defaults to ASC)&lt;br /&gt;
For example&lt;br /&gt;
 api.php?mode=requests_assigned&amp;amp;teamid=3&amp;amp;username=someuser&lt;br /&gt;
Would return the requests assigned to someuser 'within' teamid 3&lt;br /&gt;
= Returned Data =&lt;br /&gt;
A request-list block of results&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_login</id>
		<title>API login</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_login"/>
				<updated>2012-08-21T18:49:24Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox API&lt;br /&gt;
| name = login&lt;br /&gt;
| mode = login&lt;br /&gt;
| description = Open a user session&lt;br /&gt;
| parameters = username, password&lt;br /&gt;
| returned = XML login error or session data&lt;br /&gt;
}}&lt;br /&gt;
This article details a FreeDESK [[API]] call.&lt;br /&gt;
= Description =&lt;br /&gt;
The login call allows the establishment of a ContextType::User session&lt;br /&gt;
= Using the Call =&lt;br /&gt;
Pass in the following parameters using GET or POST&lt;br /&gt;
* username : Analyst username&lt;br /&gt;
* password : Analyst password&lt;br /&gt;
For example&lt;br /&gt;
 api.php?mode=login&amp;amp;username=someuser&amp;amp;password=theirpassword&lt;br /&gt;
= Returned Data =&lt;br /&gt;
XML containing either the SID on success or a [[API XML Error|FreeDESK error on failure]].&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_logout</id>
		<title>API logout</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_logout"/>
				<updated>2012-08-21T18:48:48Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox API&lt;br /&gt;
| name = logout&lt;br /&gt;
| mode = logout&lt;br /&gt;
| description = Destroy a user session&lt;br /&gt;
| parameters = sid&lt;br /&gt;
| returned = XML confirming logout&lt;br /&gt;
}}&lt;br /&gt;
This article details a FreeDESK [[API]] call.&lt;br /&gt;
= Description =&lt;br /&gt;
The login call allows the destruction of a ContextType::User session&lt;br /&gt;
= Using the Call =&lt;br /&gt;
Pass in the following parameters using GET or POST&lt;br /&gt;
* sid : Session ID&lt;br /&gt;
For example&lt;br /&gt;
 api.php?mode=logout&amp;amp;sid=XYZ&lt;br /&gt;
= Returned Data =&lt;br /&gt;
Logout confirmation&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_logout</id>
		<title>API logout</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_logout"/>
				<updated>2012-08-21T18:48:13Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;{{Infobox API | name = logout | mode = logout | description = Destroy a user session | parameters = sid | returned = XML confirming logout }} = Description = The login call al...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox API&lt;br /&gt;
| name = logout&lt;br /&gt;
| mode = logout&lt;br /&gt;
| description = Destroy a user session&lt;br /&gt;
| parameters = sid&lt;br /&gt;
| returned = XML confirming logout&lt;br /&gt;
}}&lt;br /&gt;
= Description =&lt;br /&gt;
The login call allows the destruction of a ContextType::User session&lt;br /&gt;
= Using the Call =&lt;br /&gt;
Pass in the following parameters using GET or POST&lt;br /&gt;
* sid : Session ID&lt;br /&gt;
For example&lt;br /&gt;
 api.php?mode=logout&amp;amp;sid=XYZ&lt;br /&gt;
= Returned Data =&lt;br /&gt;
Logout confirmation&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_XML_Error</id>
		<title>API XML Error</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_XML_Error"/>
				<updated>2012-08-21T18:46:03Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A FreeDESK XML error will contain an error code and textual description.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;error&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;XXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
 &amp;lt;text&amp;gt;Textual Error Description&amp;lt;/text&amp;gt;&lt;br /&gt;
&amp;lt;/error&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Codes ==&lt;br /&gt;
The following is a list of in-built error codes based upon the ErrorCode class. You may use your own error codes which can either be captured by your own receipt handling code or will be detected client-side with the DESK.isError(xml) call.&lt;br /&gt;
&lt;br /&gt;
=== 101 ErrorCode::FailedLogin ===&lt;br /&gt;
Login has failed&lt;br /&gt;
&lt;br /&gt;
=== 102 ErrorCode::SessionExpired ===&lt;br /&gt;
Attempt to validate client SID has failed as it has expired (or has been deleted, or is illegal)&lt;br /&gt;
&lt;br /&gt;
=== 201 ErrorCode::UnknownMode ===&lt;br /&gt;
The API has been called with an unknown or unregistered mode&lt;br /&gt;
&lt;br /&gt;
=== 300 ErrorCode::EntityError ===&lt;br /&gt;
An error has occurred when fetching/searching/writing an entity. The system logs will provide more information.&lt;br /&gt;
&lt;br /&gt;
=== 403 ErrorCode::Forbidden ===&lt;br /&gt;
Current user context does not have access to the mode or resource requested&lt;br /&gt;
&lt;br /&gt;
=== 404 ErrorCode::ResourceNotFound ===&lt;br /&gt;
A resource was asked for that does not exist or has not been registered&lt;br /&gt;
&lt;br /&gt;
=== 406 ErrorCode::UnknownRequest ===&lt;br /&gt;
A request has been received of a type which is unknown or unregistered&lt;br /&gt;
&lt;br /&gt;
=== 700 ErrorCode::OperationFailed ===&lt;br /&gt;
Generic failure, the operation requested has failed. Used to indicate a general call failure of an API call for some unknown reason.&lt;br /&gt;
&lt;br /&gt;
== Creating Custom Errors ==&lt;br /&gt;
To create a custom error use the FreeDESK_Error class as follows:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Our error information&lt;br /&gt;
$code = 999;&lt;br /&gt;
$text = &amp;quot;An Error&amp;quot;;&lt;br /&gt;
// Create a FreeDESK_Error&lt;br /&gt;
$myError = new FreeDESK_Error($code, $text);&lt;br /&gt;
// Output the XML&lt;br /&gt;
echo $myError-&amp;gt;XML();&lt;br /&gt;
// n.b. this will output XML without header&lt;br /&gt;
// $myError-&amp;gt;XML(true) will include an XML header&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_XML_Error</id>
		<title>API XML Error</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_XML_Error"/>
				<updated>2012-08-21T18:45:44Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A FreeDESK XML error will contain an error code and textual description.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;error&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;XXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
 &amp;lt;text&amp;gt;Textual Error Description&amp;lt;/text&amp;gt;&lt;br /&gt;
&amp;lt;/error&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Codes ==&lt;br /&gt;
The following is a list of in-built error codes based upon the ErrorCode class. You may use your own error codes which can either be captured by your own receipt handling code or will be detected client-side with the DESK.isError(xml) call.&lt;br /&gt;
&lt;br /&gt;
=== 101 ErrorCode::FailedLogin ===&lt;br /&gt;
Login has failed&lt;br /&gt;
&lt;br /&gt;
=== 102 ErrorCode::SessionExpired ===&lt;br /&gt;
Attempt to validate client SID has failed as it has expired (or has been deleted, or is illegal)&lt;br /&gt;
&lt;br /&gt;
=== 201 ErrorCode::UnknownMode ===&lt;br /&gt;
The API has been called with an unknown or unregistered mode&lt;br /&gt;
&lt;br /&gt;
=== 300 ErrorCode::EntityError ===&lt;br /&gt;
An error has occurred when fetching/searching/writing an entity. The system logs will provide more information.&lt;br /&gt;
&lt;br /&gt;
=== 403 ErrorCode::Forbidden ===&lt;br /&gt;
Current user context does not have access to the mode or resource requested&lt;br /&gt;
&lt;br /&gt;
=== 404 ErrorCode::ResourceNotFound ===&lt;br /&gt;
A resource was asked for that does not exist or has not been registered&lt;br /&gt;
&lt;br /&gt;
=== 406 ErrorCode::UnknownRequest ===&lt;br /&gt;
A request has been received of a type which is unknown or unregistered&lt;br /&gt;
&lt;br /&gt;
=== 700 ErrorCode::OperationFailed ===&lt;br /&gt;
Generic failure, the operation requested has failed. Used to indicate a general call failure of an API call for some unknown reason.&lt;br /&gt;
&lt;br /&gt;
== Creating Custom Errors ==&lt;br /&gt;
To create a custom error use the FreeDESK_Error class as follows:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Our error information&lt;br /&gt;
$code = 999;&lt;br /&gt;
$text = &amp;quot;An Error&amp;quot;;&lt;br /&gt;
// Create a FreeDESK_Error&lt;br /&gt;
$myError = new FreeDESK_Error($code, $text);&lt;br /&gt;
// Output the XML&lt;br /&gt;
echo $myError-&amp;gt;XML();&lt;br /&gt;
// n.b. this will output XML without header $myError-&amp;gt;XML(true) will include an XML header&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_XML_Error</id>
		<title>API XML Error</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_XML_Error"/>
				<updated>2012-08-21T18:45:29Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A FreeDESK XML error will contain an error code and textual description.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;error&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;XXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
 &amp;lt;text&amp;gt;Textual Error Description&amp;lt;/text&amp;gt;&lt;br /&gt;
&amp;lt;/error&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Codes ==&lt;br /&gt;
The following is a list of in-built error codes based upon the ErrorCode class. You may use your own error codes which can either be captured by your own receipt handling code or will be detected client-side with the DESK.isError(xml) call.&lt;br /&gt;
&lt;br /&gt;
=== 101 ErrorCode::FailedLogin ===&lt;br /&gt;
Login has failed&lt;br /&gt;
&lt;br /&gt;
=== 102 ErrorCode::SessionExpired ===&lt;br /&gt;
Attempt to validate client SID has failed as it has expired (or has been deleted, or is illegal)&lt;br /&gt;
&lt;br /&gt;
=== 201 ErrorCode::UnknownMode ===&lt;br /&gt;
The API has been called with an unknown or unregistered mode&lt;br /&gt;
&lt;br /&gt;
=== 300 ErrorCode::EntityError ===&lt;br /&gt;
An error has occurred when fetching/searching/writing an entity. The system logs will provide more information.&lt;br /&gt;
&lt;br /&gt;
=== 403 ErrorCode::Forbidden ===&lt;br /&gt;
Current user context does not have access to the mode or resource requested&lt;br /&gt;
&lt;br /&gt;
=== 404 ErrorCode::ResourceNotFound ===&lt;br /&gt;
A resource was asked for that does not exist or has not been registered&lt;br /&gt;
&lt;br /&gt;
=== 406 ErrorCode::UnknownRequest ===&lt;br /&gt;
A request has been received of a type which is unknown or unregistered&lt;br /&gt;
&lt;br /&gt;
=== 700 ErrorCode::OperationFailed ===&lt;br /&gt;
Generic failure, the operation requested has failed. Used to indicate a general call failure of an API call for some unknown reason.&lt;br /&gt;
&lt;br /&gt;
== Creating Custom Errors ==&lt;br /&gt;
To create a custom error use the FreeDESK_Error class as follows:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php5&amp;quot;&amp;gt;&lt;br /&gt;
// Our error information&lt;br /&gt;
$code = 999;&lt;br /&gt;
$text = &amp;quot;An Error&amp;quot;;&lt;br /&gt;
// Create a FreeDESK_Error&lt;br /&gt;
$myError = new FreeDESK_Error($code, $text);&lt;br /&gt;
// Output the XML&lt;br /&gt;
echo $myError-&amp;gt;XML();&lt;br /&gt;
// n.b. this will output XML without header $myError-&amp;gt;XML(true) will include an XML header&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_XML_Error</id>
		<title>API XML Error</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_XML_Error"/>
				<updated>2012-08-21T18:32:44Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A FreeDESK XML error will contain an error code and textual description.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;error&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;XXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
 &amp;lt;text&amp;gt;Textual Error Description&amp;lt;/text&amp;gt;&lt;br /&gt;
&amp;lt;/error&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Codes ==&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_XML_Error</id>
		<title>API XML Error</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_XML_Error"/>
				<updated>2012-08-21T18:31:21Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;A FreeDESK XML error will contain an error code and textual description.  == Example ==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A FreeDESK XML error will contain an error code and textual description.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/API_login</id>
		<title>API login</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/API_login"/>
				<updated>2012-08-21T18:29:32Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox API&lt;br /&gt;
| name = login&lt;br /&gt;
| mode = login&lt;br /&gt;
| description = Open a user session&lt;br /&gt;
| parameters = username, password&lt;br /&gt;
| returned = XML login error or session data&lt;br /&gt;
}}&lt;br /&gt;
= Description =&lt;br /&gt;
The login call allows the establishment of a ContextType::User session&lt;br /&gt;
= Using the Call =&lt;br /&gt;
Pass in the following parameters using GET or POST&lt;br /&gt;
* username : Analyst username&lt;br /&gt;
* password : Analyst password&lt;br /&gt;
For example&lt;br /&gt;
 api.php?username=someuser&amp;amp;password=theirpassword&lt;br /&gt;
= Returned Data =&lt;br /&gt;
XML containing either the SID on success or a [[API XML Error|FreeDESK error on failure]].&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/FreeDESK_Administrators_Guide</id>
		<title>FreeDESK Administrators Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/FreeDESK_Administrators_Guide"/>
				<updated>2012-08-21T18:18:45Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;* Users and Groups ** Standard Users ** Customer Access ** Permissions * Requests ** Configuring Request Types * Statuses * Priorities * [[Syst...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Users and Groups]]&lt;br /&gt;
** [[Standard Users]]&lt;br /&gt;
** [[Customer Access]]&lt;br /&gt;
** [[Permissions]]&lt;br /&gt;
* [[Requests]]&lt;br /&gt;
** [[Configuring Request Types]]&lt;br /&gt;
* [[Statuses]]&lt;br /&gt;
* [[Priorities]]&lt;br /&gt;
* [[System Configuration]]&lt;br /&gt;
** [[System-Wide Configuration Settings]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Installation_Guide</id>
		<title>Installation Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Installation_Guide"/>
				<updated>2012-08-21T18:17:19Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing FreeDESK =&lt;br /&gt;
&lt;br /&gt;
== Download a Release ==&lt;br /&gt;
&lt;br /&gt;
Download the latest recommended release from the [http://freedesk.purplepixie.org/download.php download page] in tarball or zip format.&lt;br /&gt;
&lt;br /&gt;
Extract the release and copy the resultant folder/files to your web directory of choice.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Navigate in a browser to the installation directory, you will be redirected to the setup page.&lt;br /&gt;
&lt;br /&gt;
Follow the on-screen instructions to create an initial configuration. This can be saved automatically if the config directory is writeable by the web server.&lt;br /&gt;
&lt;br /&gt;
For example under Linux:&lt;br /&gt;
    # chmod 777 config&lt;br /&gt;
&lt;br /&gt;
If the directory is not writeable by the web server you will need to copy and paste the configuration data into the config/Config.php file.&lt;br /&gt;
&lt;br /&gt;
Select to preform a fresh install.&lt;br /&gt;
&lt;br /&gt;
Set an admin password of your choice.&lt;br /&gt;
&lt;br /&gt;
== Logging In ==&lt;br /&gt;
&lt;br /&gt;
Delete the setup.php file in the installation directory (if you don't do this it will automatically redirect to this file).&lt;br /&gt;
&lt;br /&gt;
Now either click on the login link or point your browser again at the install directory.&lt;br /&gt;
&lt;br /&gt;
Click on the analyst link and login as admin with the password you entered earliest.&lt;br /&gt;
&lt;br /&gt;
= Setting up FreeDESK for First Use =&lt;br /&gt;
&lt;br /&gt;
Once you are logged in you can do some initial setup for example setting up statuses for requests, users and teams.&lt;br /&gt;
&lt;br /&gt;
These options are under the System - System Settings menu option. For more information see the [[FreeDESK Administrators Guide]].&lt;br /&gt;
&lt;br /&gt;
= Using FreeDESK =&lt;br /&gt;
&lt;br /&gt;
For more information please read the [[Introduction to Using FreeDESK]].&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Main_Page"/>
				<updated>2012-08-19T22:54:30Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Welcome to the FreeDESK Wiki'''&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
* [[FreeDESK:About|About FreeDESK]]&lt;br /&gt;
* [[Installation Guide]]&lt;br /&gt;
* [[Introduction to Using FreeDESK]]&lt;br /&gt;
&lt;br /&gt;
== Administration ==&lt;br /&gt;
* [[Users and Groups]]&lt;br /&gt;
** [[Standard Users]]&lt;br /&gt;
** [[Customer Access]]&lt;br /&gt;
** [[Permissions]]&lt;br /&gt;
* [[Requests]]&lt;br /&gt;
** [[Configuring Request Types]]&lt;br /&gt;
* [[Statuses]]&lt;br /&gt;
* [[Priorities]]&lt;br /&gt;
* [[System Configuration]]&lt;br /&gt;
** [[System-Wide Configuration Settings]]&lt;br /&gt;
&lt;br /&gt;
== Interfacing with FreeDESK ==&lt;br /&gt;
* [[API]]&lt;br /&gt;
&lt;br /&gt;
== Extending the System ==&lt;br /&gt;
* [[Developer Overview]]&lt;br /&gt;
* [[Plugin Modules]]&lt;br /&gt;
** [[Developing Plugin Modules]]&lt;br /&gt;
** [[Authentication Modules]]&lt;br /&gt;
** [[Database Module]]&lt;br /&gt;
** [[Logging Module]]&lt;br /&gt;
** [[Custom Requests]]&lt;br /&gt;
** [[Entity Modules]]&lt;br /&gt;
* [[Event Handling]]&lt;br /&gt;
* [[FreeDESK Javascript Support]]&lt;br /&gt;
* [[Skinning]]&lt;br /&gt;
&lt;br /&gt;
== MediaWiki Help ==&lt;br /&gt;
* [//meta.wikimedia.org/wiki/Help:Contents User's Guide] Information on using the wiki software.&lt;br /&gt;
* [//www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Introduction_to_Using_FreeDESK</id>
		<title>Introduction to Using FreeDESK</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Introduction_to_Using_FreeDESK"/>
				<updated>2012-07-03T11:28:33Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;= For Users =  FreeDESK User Guide  = For Administrators =  FreeDESK Administrators Guide&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For Users =&lt;br /&gt;
&lt;br /&gt;
[[FreeDESK User Guide]]&lt;br /&gt;
&lt;br /&gt;
= For Administrators =&lt;br /&gt;
&lt;br /&gt;
[[FreeDESK Administrators Guide]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Installation_Guide</id>
		<title>Installation Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Installation_Guide"/>
				<updated>2012-07-03T00:30:03Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing FreeDESK =&lt;br /&gt;
&lt;br /&gt;
== Download a Release ==&lt;br /&gt;
&lt;br /&gt;
Download the latest recommended release from the [http://freedesk.purplepixie.org/download.php download page] in tarball or zip format.&lt;br /&gt;
&lt;br /&gt;
Extract the release and copy the resultant folder/files to your web directory of choice.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Navigate in a browser to the installation directory, you will be redirected to the setup page.&lt;br /&gt;
&lt;br /&gt;
Follow the on-screen instructions to create an initial configuration. This can be saved automatically if the config directory is writeable by the web server.&lt;br /&gt;
&lt;br /&gt;
For example under Linux:&lt;br /&gt;
    # chmod 777 config&lt;br /&gt;
&lt;br /&gt;
If the directory is not writeable by the web server you will need to copy and paste the configuration data into the config/Config.php file.&lt;br /&gt;
&lt;br /&gt;
Select to preform a fresh install.&lt;br /&gt;
&lt;br /&gt;
Set an admin password of your choice.&lt;br /&gt;
&lt;br /&gt;
== Logging In ==&lt;br /&gt;
&lt;br /&gt;
Delete the setup.php file in the installation directory (if you don't do this it will automatically redirect to this file).&lt;br /&gt;
&lt;br /&gt;
Now either click on the login link or point your browser again at the install directory.&lt;br /&gt;
&lt;br /&gt;
Click on the analyst link and login as admin with the password you entered earliest.&lt;br /&gt;
&lt;br /&gt;
= Setting up FreeDESK for First Use =&lt;br /&gt;
&lt;br /&gt;
Once you are logged in you can do some initial setup for example setting up statuses for requests, users and teams.&lt;br /&gt;
&lt;br /&gt;
These options are under the System - System Settings menu option.&lt;br /&gt;
&lt;br /&gt;
= Using FreeDESK =&lt;br /&gt;
&lt;br /&gt;
For more information please read the [[Introduction to Using FreeDESK]].&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	<entry>
		<id>http://wiki.freedesk.purplepixie.org/Installation_Guide</id>
		<title>Installation Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.freedesk.purplepixie.org/Installation_Guide"/>
				<updated>2012-07-03T00:29:25Z</updated>
		
		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;= Installing FreeDESK =  == Download a Release ==  Download the latest recommended release from the [http://freedesk.purplepixie.org/download.php download page] in tarball or ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing FreeDESK =&lt;br /&gt;
&lt;br /&gt;
== Download a Release ==&lt;br /&gt;
&lt;br /&gt;
Download the latest recommended release from the [http://freedesk.purplepixie.org/download.php download page] in tarball or zip format.&lt;br /&gt;
&lt;br /&gt;
Extract the release and copy the resultant folder/files to your web directory of choice.&lt;br /&gt;
&lt;br /&gt;
== Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Navigate in a browser to the installation directory, you will be redirected to the setup page.&lt;br /&gt;
&lt;br /&gt;
Follow the on-screen instructions to create an initial configuration. This can be saved automatically if the config directory is writeable by the web server.&lt;br /&gt;
&lt;br /&gt;
For example under Linux:&lt;br /&gt;
    # chmod 777 config&lt;br /&gt;
&lt;br /&gt;
If the directory is not writeable by the web server you will need to copy and paste the configuration data into the config/Config.php file.&lt;br /&gt;
&lt;br /&gt;
Select to preform a fresh install.&lt;br /&gt;
&lt;br /&gt;
Set an admin password of your choice.&lt;br /&gt;
&lt;br /&gt;
== Logging In ==&lt;br /&gt;
&lt;br /&gt;
Delete the setup.php file in the installation directory (if you don't do this it will automatically redirect to this file).&lt;br /&gt;
&lt;br /&gt;
Now either click on the login link or point your browser again at the install directory.&lt;br /&gt;
&lt;br /&gt;
Click on the analyst link and login as admin with the password you entered earliest.&lt;br /&gt;
&lt;br /&gt;
= Setting up FreeDESK for First Use =&lt;br /&gt;
&lt;br /&gt;
Once you are logged in you can do some initial setup for example setting up statuses for requests, users and teams.&lt;br /&gt;
&lt;br /&gt;
These options are under the System - System Settings menu option.&lt;br /&gt;
&lt;br /&gt;
= Using FreeDESK =&lt;/div&gt;</summary>
		<author><name>Dave</name></author>	</entry>

	</feed>