<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Open Script Solution&#187; name</title>
	<atom:link href="http://www.openscriptsolution.com/tag/name/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.openscriptsolution.com</link>
	<description>... where solutions for script programming are found ...</description>
	<lastBuildDate>Tue, 31 Jan 2012 03:22:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Displaying the Staff Name in the Reply Email of osTicket v1.6 RC5</title>
		<link>http://www.openscriptsolution.com/2009/12/02/displaying-the-staff-name-in-reply-email-of-osticket-v1-6-rc5/</link>
		<comments>http://www.openscriptsolution.com/2009/12/02/displaying-the-staff-name-in-reply-email-of-osticket-v1-6-rc5/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 02:22:55 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[osTicket]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[reply]]></category>
		<category><![CDATA[staff]]></category>
		<category><![CDATA[ticket]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=937</guid>
		<description><![CDATA[This modification will display the staff name in the reply email that sent by the current staff. As default, osTicket have not included the %staff variable in the reply or response email template. So here is the modification to implement it. Open your \include\class.ticket.php file, and find this code: 752 $body = str_replace&#40;'%response',$response,$body&#41;; after that [...]]]></description>
			<content:encoded><![CDATA[<p>This modification will display the staff name in the reply email that sent by the current staff. As default, osTicket have not included the <strong>%staff</strong> variable in the reply or response email template. So here is the modification to implement it. <span id="more-937"></span></p>
<ol>
<li>
Open your <strong>\include\class.ticket.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>752
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$body</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%response'</span><span style="color: #339933;">,</span><span style="color: #000088;">$response</span><span style="color: #339933;">,</span><span style="color: #000088;">$body</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>after that line, please insert this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>753
754
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$staff</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Staff<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thisuser</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$body</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #009933; font-weight: bold;">%s</span>taff&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$staff</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFirstName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$body</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

</li>
<li>
Go to your <strong>Admin Panel -> Emails -> Templates</strong>, then select your email template record, go to the <strong>Ticket Response/Reply</strong> section.</p>
<p>Change this email template regarding the ticket response/reply at the <strong>Message Body</strong> directive, from this code:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">%name,
&nbsp;
Our customer support team personnel has replied to your support request #%ticket 
&nbsp;
%response
&nbsp;
We hope this response has sufficiently answered your questions. If not, please do not send another email. Instead, reply to this email or login to your account for a complete archive of all your support request and responses.
&nbsp;
%url/view.php?e=%email&amp;t=%ticket
&nbsp;
%signature</pre></div></div>

<p>become this following code:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">%name,
&nbsp;
%staff has replied to your support request #%ticket 
&nbsp;
%response
&nbsp;
We hope this response has sufficiently solved your request. If not, please do not send another email. Instead, reply to this email or login to your account for a complete archive of all your support request and responses.
&nbsp;
%url/view.php?e=%email&amp;t=%ticket
&nbsp;
%signature</pre></div></div>

</li>
</ol>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.openscriptsolution.com%2F2009%2F12%2F02%2Fdisplaying-the-staff-name-in-reply-email-of-osticket-v1-6-rc5%2F&amp;title=Displaying%20the%20Staff%20Name%20in%20the%20Reply%20Email%20of%20osTicket%20v1.6%20RC5" id="wpa2a_2"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2009/12/02/displaying-the-staff-name-in-reply-email-of-osticket-v1-6-rc5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing Ticket Transfer Description in osTicket v1.6 RC5</title>
		<link>http://www.openscriptsolution.com/2009/10/28/fixing-ticket-transfer-description-in-osticket-v1-6-rc5/</link>
		<comments>http://www.openscriptsolution.com/2009/10/28/fixing-ticket-transfer-description-in-osticket-v1-6-rc5/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 01:27:29 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[osTicket]]></category>
		<category><![CDATA[department]]></category>
		<category><![CDATA[Dept]]></category>
		<category><![CDATA[Internal]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[Note]]></category>
		<category><![CDATA[old]]></category>
		<category><![CDATA[ticket]]></category>
		<category><![CDATA[transfer]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=704</guid>
		<description><![CDATA[Not many users pay attention about this little problem in osTicket version 1.6 RC5. What was that? Well, if you transfer a ticket from one department to another department. For example, after you transfer a ticket from Dept. Support to Dept. Billing, then the message that being saved in Internal Note is: &#8220;Dept. Transfer: Support [...]]]></description>
			<content:encoded><![CDATA[<p>Not many users pay attention about this little problem in osTicket version 1.6 RC5. What was that? Well, if you transfer a ticket from one department to another department. For example, after you transfer a ticket from Dept. Support to Dept. Billing, then the message that being saved in Internal Note is: &#8220;Dept. Transfer: Support to Support&#8221;, whereas it should be: &#8220;Dept. Transfer: Support to Billing&#8221;. On the other word, the old department name is not correct. So here is the modification I created to correct and fix the problem. Only small change, though. <span id="more-704"></span></p>
<p>Open your <strong>\scp\tickets.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>112
113
114
115
116
117
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$errors</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">transfer</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dept_id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                 <span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">reload</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//dept manager changed!</span>
                <span style="color: #666666; font-style: italic;">//Send out alerts?? - for now yes....part of internal note!</span>
                <span style="color: #000088;">$title</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Dept. Transfer: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDeptName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' to '</span><span style="color: #339933;">.</span>Dept<span style="color: #339933;">::</span><span style="color: #004000;">getNameById</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dept_id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">postNote</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'message'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$msg</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Ticket Transfered Sucessfully'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>then replace with this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>112
113
114
115
116
117
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$errors</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">transfer</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dept_id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #666666; font-style: italic;">//Send out alerts?? - for now yes....part of internal note!</span>
                <span style="color: #000088;">$title</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Dept. Transfer: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDeptName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' to '</span><span style="color: #339933;">.</span>Dept<span style="color: #339933;">::</span><span style="color: #004000;">getNameById</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dept_id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">reload</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//dept manager changed!</span>
		<span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">postNote</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'message'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>               
                <span style="color: #000088;">$msg</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Ticket Transfered Sucessfully'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>So that problem caused by the $ticket->reload(); statement that placed before $ticket->getDeptName() line. Since the $ticket->getDeptName() statement is for getting the old department name, then the $ticket->reload() statement, which has functionality for refreshing or reloading the current ticket, should be put after the $ticket->getDeptName(). Now after you put $ticket->reload() below the $ticket->getDeptName() line, then the old department name is correct now.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.openscriptsolution.com%2F2009%2F10%2F28%2Ffixing-ticket-transfer-description-in-osticket-v1-6-rc5%2F&amp;title=Fixing%20Ticket%20Transfer%20Description%20in%20osTicket%20v1.6%20RC5" id="wpa2a_4"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2009/10/28/fixing-ticket-transfer-description-in-osticket-v1-6-rc5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Post Number, Sender Name, and Time Duration in Each Message of osTicket</title>
		<link>http://www.openscriptsolution.com/2009/09/09/add-post-number-sender-name-and-time-duration-in-each-message-of-osticket/</link>
		<comments>http://www.openscriptsolution.com/2009/09/09/add-post-number-sender-name-and-time-duration-in-each-message-of-osticket/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 02:42:26 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[osTicket]]></category>
		<category><![CDATA[duration]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[sender]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=248</guid>
		<description><![CDATA[Both osTicket version 1.6 RC4 and 1.6 RC5 have not included the post number, the sender name of client, and duration time in each message. That is why I made this modification. It is important for you as staff or admin of your ticketing system, if you want to know quickly how much time needed [...]]]></description>
			<content:encoded><![CDATA[<p>Both osTicket version 1.6 RC4 and 1.6 RC5 have not included the post number, the sender name of client, and duration time in each message. That is why I made this modification. It is important for you as staff or admin of your ticketing system, if you want to know quickly how much time needed to respond between one post and the next post in one current ticket. Moreover, you will also know how much total time taken for the opened ticket when you view the certain ticket in full-mode. <span id="more-248"></span></p>
<p>Follow these instructions below.</p>
<ol>
<li>Create a new file, copy-paste the following code to this file, then put it to <strong>\include\</strong> sub directory of your osTicket System, and save it as <strong>class.duration.php</strong>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/**************************************************************************/</span>
<span style="color: #666666; font-style: italic;">/* [MOD] Add #Post, SenderName, Time Duration in Each Message,            */</span> 
<span style="color: #666666; font-style: italic;">/*       by Masino Sinaga, May 7, 2009                                    */</span> 
<span style="color: #666666; font-style: italic;">/* Website: - http://www.masinosinaga.com                                 */</span>
<span style="color: #666666; font-style: italic;">/*          - http://osticket.masinosinaga.com                            */</span>
<span style="color: #666666; font-style: italic;">/**************************************************************************/</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Duration <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$begindate</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$enddate</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">function</span> Duration<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parambegindate</span><span style="color: #339933;">,</span> <span style="color: #000088;">$paramenddate</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">begindate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$parambegindate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">enddate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$paramenddate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$diff</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">enddate</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">begindate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>                 
    <span style="color: #000088;">$diffday</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">86400</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$modday</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span><span style="color: #339933;">%</span><span style="color:#800080;">86400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$diffhour</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$modday</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">3600</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$diffminute</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$modday</span><span style="color: #339933;">%</span><span style="color:#800080;">3600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$diffsecond</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$modday</span><span style="color: #339933;">%</span><span style="color:#800080;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diffday</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Day(s), &quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diffhour</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Hour(s), &quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diffminute</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Minute(s), &quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diffsecond</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Second(s).&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

</li>
<li>Open <strong>\scp\tickets.php</strong> file, and find this code:

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>21
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span>INCLUDE_DIR<span style="color: #339933;">.</span><span style="color: #0000ff;">'class.banlist.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>after that code, add the following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>22
23
24
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// MOD Show Post#, SenderName, and Duration on Each Message by Masino Sinaga, July 20, 2009</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span>INCLUDE_DIR<span style="color: #339933;">.</span><span style="color: #0000ff;">'class.duration.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// MOD Show Post#, SenderName, and Duration on Each Message by Masino Sinaga, July 20, 2009</span></pre></td></tr></table></div>

</li>
<li>Open <strong>\include\staff\viewticket.inc.php</strong> file, and find this code:

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>274
275
276
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #000088;">$msgres</span> <span style="color: #339933;">=</span>db_query<span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span> <span style="color: #339933;">=</span> db_fetch_array<span style="color: #009900;">&#40;</span><span style="color: #000088;">$msgres</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>replace with:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">      <span style="color: #000088;">$msgres</span> <span style="color: #339933;">=</span>db_query<span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span> <span style="color: #339933;">=</span> db_fetch_array<span style="color: #009900;">&#40;</span><span style="color: #000088;">$msgres</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">!=</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
          <span style="color: #000088;">$dateend</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #000088;">$datebegin</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
          <span style="color: #000088;">$firstdate</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$datebegin</span><span style="color: #339933;">;</span>
          <span style="color: #000088;">$dateend</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000088;">$lastdate</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dateend</span><span style="color: #339933;">;</span>                 
        <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Duration<span style="color: #009900;">&#40;</span><span style="color: #000088;">$datebegin</span><span style="color: #339933;">,</span><span style="color: #000088;">$dateend</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$resultdiff</span><span style="color: #339933;">=</span><span style="color: #000088;">$datediff</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Duration</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$datebegin</span><span style="color: #339933;">,</span><span style="color: #000088;">$dateend</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$datebegin</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dateend</span><span style="color: #339933;">;</span>        
        <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>288
289
290
291
292
293
294
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            &lt;table align=&quot;center&quot; class=&quot;message&quot; cellspacing=&quot;0&quot; cellpadding=&quot;1&quot; width=&quot;100%&quot; border=0&gt;
                &lt;tr&gt;&lt;th&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">db_daydatetime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/th&gt;&lt;/tr&gt;
                <span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attachments'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
                &lt;tr class=&quot;header&quot;&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAttachmentStr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'msg_id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'M'</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt; 
                <span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
                &lt;tr&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">display</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'message'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
            &lt;/table&gt;</pre></td></tr></table></div>

<p>replace with:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>288
289
290
291
292
293
294
295
296
297
298
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        &lt;table align=&quot;center&quot; class=&quot;message&quot; cellspacing=&quot;0&quot; cellpadding=&quot;1&quot; width=&quot;100%&quot; border=0&gt;
          &lt;tr&gt;&lt;th&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;(#&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$i</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;) &quot;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> Format<span style="color: #339933;">::</span><span style="color: #004000;">db_daydatetime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; - &quot;</span><span style="color: #339933;">.</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">htmlchars</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/th&gt;
          &lt;/tr&gt;
          <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attachments'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
          &lt;tr class=&quot;header&quot;&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAttachmentStr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'msg_id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'M'</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt; 
          <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
          &lt;tr&gt;&lt;td&gt;
          <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> Format<span style="color: #339933;">::</span><span style="color: #004000;">display</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'message'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
          &lt;/td&gt;&lt;/tr&gt;
          &lt;tr class=&quot;header&quot;&gt;&lt;td align=&quot;right&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Duration: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$resultdiff</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>    <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;
        &lt;/table&gt;</pre></td></tr></table></div>

<p>find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            $resp =db_query($sql);
            while ($resp_row = db_fetch_array($resp)) {
                $respID=$resp_row['response_id'];
                ?&gt;
                &lt;table align=&quot;center&quot; class=&quot;response&quot; cellspacing=&quot;0&quot; cellpadding=&quot;1&quot; width=&quot;100%&quot; border=0&gt;
                    &lt;tr&gt;&lt;th&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">db_daydatetime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;nbsp;-&amp;nbsp;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'staff_name'</span><span style="color: #009900;">&#93;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/th&gt;&lt;/tr&gt;
                    <span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attachments'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
                    &lt;tr class=&quot;header&quot;&gt;
                        &lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAttachmentStr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$respID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'R'</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;
                    <span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
                    &lt;tr&gt;&lt;td&gt; <span style="color: #000000; font-weight: bold;">&lt;?=</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">display</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'response'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;
                &lt;/table&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #009900;">&#125;</span>
            <span style="color: #000088;">$msgid</span> <span style="color: #339933;">=</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'msg_id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/div&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p>replace with:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        $resp =db_query($sql);
        $j=1;
        while ($resp_row = db_fetch_array($resp)) {
          $i++;
          $respID=$resp_row['response_id'];
          $dateend = $resp_row['created']; 
          $lastdate = $dateend;          
          $datediff = new Duration($datebegin,$dateend);
          $resultdiff=$datediff-&gt;Duration($datebegin,$dateend);            
          ?&gt;
          &lt;table align=&quot;center&quot; class=&quot;response&quot; cellspacing=&quot;0&quot; cellpadding=&quot;1&quot; width=&quot;100%&quot; border=0&gt;
            &lt;tr&gt;&lt;th&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;(#&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$i</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;) &quot;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> Format<span style="color: #339933;">::</span><span style="color: #004000;">db_daydatetime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;nbsp;-&amp;nbsp;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'staff_name'</span><span style="color: #009900;">&#93;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/th&gt;
            &lt;/tr&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attachments'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
            &lt;tr class=&quot;header&quot;&gt;
              &lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAttachmentStr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$respID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'R'</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
            &lt;tr&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> Format<span style="color: #339933;">::</span><span style="color: #004000;">display</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'response'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;
            &lt;tr class=&quot;header&quot;&gt;&lt;td align=&quot;right&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Duration: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$resultdiff</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>    <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;
          &lt;/table&gt;            
          <span style="color: #000000; font-weight: bold;">&lt;?php</span>     
          <span style="color: #000088;">$datebegin</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dateend</span><span style="color: #339933;">;</span>
          <span style="color: #000088;">$j</span><span style="color: #339933;">++;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000088;">$msgid</span> <span style="color: #339933;">=</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'msg_id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
        <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
      <span style="color: #009900;">&#125;</span> 
      <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Duration<span style="color: #009900;">&#40;</span><span style="color: #000088;">$firstdate</span><span style="color: #339933;">,</span><span style="color: #000088;">$lastdate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$resultdiff</span><span style="color: #339933;">=</span><span style="color: #000088;">$datediff</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Duration</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$firstdate</span><span style="color: #339933;">,</span><span style="color: #000088;">$lastdate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    
      <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/div&gt;
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
  <span style="color: #000088;">$totalpost</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$i</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getStatus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'open'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;div align='right'&gt;&lt;br /&gt;&lt;b&gt;Total: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$totalpost</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; post(s), Duration: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$resultdiff</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/b&gt;&lt;/div&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$lastdate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y-m-d H:i:s&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//userdate();   //date(&quot;Y-m-d H:i:s&quot;);</span>
    <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Duration<span style="color: #009900;">&#40;</span><span style="color: #000088;">$firstdate</span><span style="color: #339933;">,</span><span style="color: #000088;">$lastdate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$resultdiff</span><span style="color: #339933;">=</span><span style="color: #000088;">$datediff</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Duration</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$firstdate</span><span style="color: #339933;">,</span><span style="color: #000088;">$lastdate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;div align='right'&gt;&lt;br /&gt;&lt;b&gt;Ticket still opened, Total Duration: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$resultdiff</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/b&gt;&lt;/div&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;div align='right'&gt;&lt;br /&gt;&lt;b&gt;Total: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$totalpost</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; post(s), Duration: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$resultdiff</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/b&gt;&lt;/div&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>    
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

</li>
</ol>
<p>Now you can see that there is post number, sender name, and time duration in each message of the current ticket thread. You can also see in the bottom of the ticket thread, duration total for that current ticket. At least, you will get warning especially about the duration total of the opened ticket, thus you can take the respond as quick as you can for that ticket number.</p>
<p><img src="http://img136.imageshack.us/img136/3842/osticketviewticketimpro.jpg" alt="Post Number, Sender Name, and Time Duration in Each Post in osTicket" /></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.openscriptsolution.com%2F2009%2F09%2F09%2Fadd-post-number-sender-name-and-time-duration-in-each-message-of-osticket%2F&amp;title=Add%20Post%20Number%2C%20Sender%20Name%2C%20and%20Time%20Duration%20in%20Each%20Message%20of%20osTicket" id="wpa2a_6"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2009/09/09/add-post-number-sender-name-and-time-duration-in-each-message-of-osticket/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
