?> "> <td width=7px> <input type="checkbox" name="canned[]" value="<?php echo $row['premade_id']; ?> " <?php echo $sel ? 'checked' : ''; ?> onClick="highLight(this.value,this.checked);"> <td><a href="kb.php?id=<?php echo $row['premade_id']; ?> "><?php echo Format::htmlchars(Format::truncate($row['title'], 60)); ?> </a></td> <td><b><?php echo $row['isenabled'] ? 'Active' : 'Disabled'; ?> </b></td> <td><?php echo $row['dept_name'] ? Format::htmlchars($row['dept_name']) : 'All Departments'; ?> </td> <td><?php echo Format::db_datetime($row['updated']); ?> </td> </tr>
"> <td width=7px> <input type="checkbox" name="ids[]" value="<?php echo $row['category_id']; ?> " class="ckb" <?php echo $sel ? 'checked="checked"' : ''; ?> > </td> <td><a href="categories.php?id=<?php echo $row['category_id']; ?> "><?php echo Format::truncate($row['name'], 200); ?> </a> </td> <td><?php echo $row['ispublic'] ? '<b>Public</b>' : 'Internal'; ?> </td> <td style="text-align:right;padding-right:25px;"><?php echo $faqs; ?> </td> <td> <?php echo Format::db_datetime($row['updated']); ?> </td> </tr>
echo $row['priority_desc']; ?> </td> <td nowrap><?php echo Format::truncate($row['name'], 22, strpos($row['name'], '@')); ?> </td> <?php if ($row['assigned_name'] == "") { ?> <td nowrap>- Unassigned -</td> <?php } else { ?> <td nowrap><?php echo Format::truncate($row['assigned_name'], 22, strpos($row['assigned_name'], '@')); ?> </td> <?php } ?> </tr> <?php $class = $class == 'row2' ? 'row1' : 'row2'; } //end of while. } else { //not tickets found!! ?> <tr class="<?php
echo $row['attachments'] ? "<span class='Icon file'> </span>" : ''; ?> </td> <td nowrap><?php echo Format::truncate($row['dept_name'], 30); ?> </td> <td class="nohover" align="center" style="background-color:<?php echo $row['priority_color']; ?> ;"><?php echo $row['priority_desc']; ?> </td> <td nowrap><?php echo Format::truncate($row['name'], 22, strpos($row['name'], '@')); ?> </td> </tr> <? $class = ($class =='row2') ?'row1':'row2'; } //end of while. else: //not tickets found!! ?> <tr class="<?php echo $class; ?> "><td colspan=8><b>Query returned 0 results.</b></td></tr> <? endif; ?> </table> </td></tr>
echo $row['ticketID']; ?> "><?php echo $subject; ?> </a> <?php echo $row['attachments'] ? "<span class='Icon file'> </span>" : ''; ?> </td> <td nowrap> <?php echo Format::truncate($dept, 30); ?> </td> <td> <?php echo Format::truncate($row['email'], 40); ?> </td> </tr> <? $class = ($class =='row2') ?'row1':'row2'; } //end of while. else: //not tickets found!! ?> <tr class="<?php echo $class; ?> "><td colspan=7><b>NO tickets found.</b></td></tr> <? endif; ?> </table> </td></tr>
</td> <td> <?php echo $row['status']; ?> </td> <td> <a href="tickets.php?id=<?php echo $row['ticket_id']; ?> "><?php echo $subject; ?> </a> </td> <td> <?php echo Format::truncate($dept, 30); ?> </td> <?php $mysqli = new mysqli("localhost", "osticket", "0571ck37", "osticket1911"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit; } $query2 = " SELECT \n CAST(localizador AS char(100) CHARACTER SET utf8),\n CAST(status_loc AS char(100) CHARACTER SET utf8) \n FROM `ost_ticket__cdata` \n WHERE ticket_id = " . $row['ticket_id']; $result2 = $mysqli->query($query2); $row2 = $result2->fetch_array(); ?> <td> <?php echo $row2[0];
function truncate($str, $len = 40) { return Format::truncate($str, $len); }
?> "> <td width=7px> <input type="checkbox" name="tids[]" value="<?php echo $row['topic_id']; ?> " <?php echo $sel ? 'checked' : ''; ?> onClick="highLight(this.value,this.checked);"> </td> <td><a href="admin.php?t=topics&id=<?php echo $row['topic_id']; ?> "><?php echo Format::htmlchars(Format::truncate($row['topic'], 30)); ?> </a></td> <td><?php echo $row['isactive'] ? _('Active') : _('<b>Disabled</b>'); ?> </td> <td> <?php echo $row['noautoresp'] ? _('No') : _('<b>Yes</b>'); ?> </td> <td><a href="admin.php?t=dept&id=<?php echo $row['dept_id']; ?> "><?php echo $row['dept_name'];
$total=0; $ids=($errors && is_array($_POST['ids']))?$_POST['ids']:null; if($res && db_num_rows($res)): while ($row = db_fetch_array($res)) { $sel=false; if($ids && in_array($row['canned_id'],$ids)) $sel=true; $files=$row['files']?'<span class="Icon file"> </span>':''; ?> <tr id="<?php echo $row['canned_id']; ?>"> <td width=7px> <input type="checkbox" name="ids[]" value="<?php echo $row['canned_id']; ?>" class="ckb" <?php echo $sel?'checked="checked"':''; ?> /> </td> <td> <a href="canned.php?id=<?php echo $row['canned_id']; ?>"><?php echo Format::truncate($row['title'],200); echo " $files"; ?></a> </td> <td><?php echo $row['isenabled']?__('Active'):'<b>'.__('Disabled').'</b>'; ?></td> <td><?php echo $row['department']?$row['department']:'— '.__('All Departments').' —'; ?></td> <td> <?php echo Format::db_datetime($row['updated']); ?></td> </tr> <?php } //end of while. endif; ?> <tfoot> <tr> <td colspan="5"> <?php if($res && $num){ ?> <?php echo __('Select');?>: <a id="selectAll" href="#ckb"><?php echo __('All');?></a> <a id="selectNone" href="#ckb"><?php echo __('None');?></a>
$types = array('M', 'R'); if ($thread = $ticket->getThreadEntries($types)) { $threadTypes = array('M' => 'message', 'R' => 'response', 'N' => 'note'); foreach ($thread as $entry) { ?> <div class="thread-entry <?php echo $threadTypes[$entry->type]; ?> "> <table class="header"><tr><td> <span><?php echo Format::datetime($entry->created); ?> </span> <span style="padding:0 1em" class="faded title"><?php echo Format::truncate($entry->title, 100); ?> </span> </td> <td class="flush-right faded title" style="white-space:no-wrap"> <?php echo Format::htmlchars($entry->getName()); ?> </span> </td> </tr></table> <div class="thread-body"> <div><?php echo $entry->getBody()->display('pdf'); ?> </div>
function _print() { if (!($ticket = $this->getTicket())) { return; } $w = $this->w / 2 - $this->lMargin; $l = 35; $c = $w - $l; // Setup HTML writing and load default thread stylesheet $this->WriteHtml('<style>' . file_get_contents(ROOT_DIR . 'css/thread.css') . '</style>', 1, true, false); $this->SetFont('Arial', 'B', 11); $this->cMargin = 0; $this->SetFont('Arial', 'B', 11); $this->SetTextColor(10, 86, 142); $this->WriteCell($w, 7, sprintf(__('Ticket #%s'), $ticket->getNumber()), 0, 0, 'L'); $this->Ln(7); $this->cMargin = 3; $this->SetTextColor(0); $this->SetDrawColor(220, 220, 220); $this->SetFillColor(244, 250, 255); $this->SetX($this->lMargin); $this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, __('Status'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, (string) $ticket->getStatus(), 1, 0, 'L', true); $this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, __('Name'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, (string) $ticket->getName(), 1, 1, 'L', true); $this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, __('Priority'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, $ticket->getPriority(), 1, 0, 'L', true); $this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, __('Email'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, $ticket->getEmail(), 1, 1, 'L', true); $this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, __('Department'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, $ticket->getDeptName(), 1, 0, 'L', true); $this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, __('Phone'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, $ticket->getPhoneNumber(), 1, 1, 'L', true); $this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, __('Create Date'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, Format::db_datetime($ticket->getCreateDate()), 1, 0, 'L', true); $this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, __('Source'), 1, 0, 'L', true); $this->SetFont(''); $source = ucfirst($ticket->getSource()); if ($ticket->getIP()) { $source .= ' (' . $ticket->getIP() . ')'; } $this->WriteCell($c, 7, $source, 1, 0, 'L', true); $this->Ln(12); $this->SetFont('Arial', 'B', 11); if ($ticket->isOpen()) { $this->WriteCell($l, 7, __('Assigned To'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, $ticket->isAssigned() ? $ticket->getAssigned() : ' -- ', 1, 0, 'L', true); } else { $closedby = __('unknown'); if ($staff = $ticket->getStaff()) { $closedby = (string) $staff->getName(); } $this->WriteCell($l, 7, __('Closed By'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, $closedby, 1, 0, 'L', true); } $this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, __('Help Topic'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, $ticket->getHelpTopic(), 1, 1, 'L', true); $this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, __('SLA Plan'), 1, 0, 'L', true); $this->SetFont(''); $sla = $ticket->getSLA(); $this->WriteCell($c, 7, $sla ? $sla->getName() : ' -- ', 1, 0, 'L', true); $this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, __('Last Response'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, Format::db_datetime($ticket->getLastRespDate()), 1, 1, 'L', true); $this->SetFont('Arial', 'B', 11); if ($ticket->isOpen()) { $this->WriteCell($l, 7, __('Due Date'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, Format::db_datetime($ticket->getEstDueDate()), 1, 0, 'L', true); } else { $this->WriteCell($l, 7, __('Close Date'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, Format::db_datetime($ticket->getCloseDate()), 1, 0, 'L', true); } $this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, __('Last Message'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c, 7, Format::db_datetime($ticket->getLastMsgDate()), 1, 1, 'L', true); $this->SetFillColor(255, 255, 255); foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) { $idx = 0; foreach ($form->getAnswers() as $a) { if (in_array($a->getField()->get('name'), array('email', 'name', 'subject', 'phone', 'priority'))) { continue; } $this->SetFont('Arial', 'B', 11); if ($idx++ === 0) { $this->Ln(5); $this->SetFillColor(244, 250, 255); $this->WriteCell(($l + $c) * 2, 7, $a->getForm()->get('title'), 1, 0, 'L', true); $this->SetFillColor(255, 255, 255); } if ($val = $a->toString()) { $this->Ln(7); $this->WriteCell($l * 2, 7, $a->getField()->get('label'), 1, 0, 'L', true); $this->SetFont(''); $this->WriteCell($c * 2, 7, $val, 1, 0, 'L', true); } } } $this->SetFillColor(244, 250, 255); $this->Ln(10); $this->SetFont('Arial', 'B', 11); $this->cMargin = 0; $this->SetTextColor(10, 86, 142); $this->WriteCell($w, 7, trim($ticket->getSubject()), 0, 0, 'L'); $this->Ln(7); $this->SetTextColor(0); $this->cMargin = 3; //Table header colors (RGB) $colors = array('M' => array(195, 217, 255), 'R' => array(255, 224, 179), 'N' => array(250, 250, 210)); //Get ticket thread $types = array('M', 'R'); if ($this->includenotes) { $types[] = 'N'; } if ($entries = $ticket->getThreadEntries($types)) { foreach ($entries as $entry) { $color = $colors[$entry['thread_type']]; $this->SetFillColor($color[0], $color[1], $color[2]); $this->SetFont('Arial', 'B', 11); $this->WriteCell($w / 2, 7, Format::db_datetime($entry['created']), 'LTB', 0, 'L', true); $this->SetFont('Arial', '', 10); $this->WriteCell($w, 7, Format::truncate($entry['title'], 50), 'TB', 0, 'L', true); $this->WriteCell($w / 2, 7, $entry['name'] ?: $entry['poster'], 'TBR', 1, 'L', true); $this->SetFont(''); $text = $entry['body']->display('pdf'); if ($entry['attachments'] && ($tentry = $ticket->getThreadEntry($entry['id'])) && ($attachments = $tentry->getAttachments())) { $files = array(); foreach ($attachments as $attachment) { if (!$attachment['inline']) { $files[] = $attachment['name']; } } if ($files) { $text .= "<div>Files Attached: [" . implode(', ', $files) . "]</div>"; } $text .= "<div>" . sprintf(__('Files Attached: [%s]'), implode(', ', $files)) . "</div>"; } $this->WriteHtml('<div class="thread-body">' . $text . '</div>', 2, false, false); $this->Ln(5); } } $this->WriteHtml('', 2, false, true); }
<td><?php echo $status; ?></td> <td><a <?php if ($flag) { ?> class="Icon <?php echo $flag; ?>Ticket" title="<?php echo ucfirst($flag); ?> Ticket" <?php } ?> href="tickets.php?id=<?php echo $row['ticket_id']; ?>"><?php echo $subject; ?></a> <?php if ($threadcount>1) echo "<small>($threadcount)</small> ".'<i class="icon-fixed-width icon-comments-alt"></i> '; if ($row['collaborators']) echo '<i class="icon-fixed-width icon-group faded"></i> '; if ($row['attachments']) echo '<i class="icon-fixed-width icon-paperclip"></i> '; ?> </td> <?php if ($user) { ?> <td><?php echo Format::truncate($row['dept_name'], 40); ?></td> <td> <?php echo $assigned; ?></td> <?php } else { ?> <td> <?php echo sprintf('<a href="users.php?id=%d">%s <em> <%s></em></a>', $row['user_id'], $row['name'], $row['email']); ?></td> <?php } ?> </tr> <?php } ?> </tbody> </table> </form> <?php
<tr class="<?=$class?> " id="<?=$row['ticket_id']?>"> <?if($canDelete || $canClose) {?> <td align="center" class="nohover"> <input type="checkbox" name="tids[]" value="<?=$row['ticket_id']?>" onClick="highLight(this.value,this.checked);"> </td> <?}?> <td align="center" title="<?=$row['email']?>" nowrap> <a class="Icon <?=strtolower($row['source'])?>Ticket" title="<?=$row['source']?> Ticket: <?=$row['email']?>" href="tickets.php?id=<?=$row['ticket_id']?>"><?=$tid?></a></td> <td align="center" nowrap><?=Format::db_date($row['created'])?></td> <td><a <?if($flag) { ?> class="Icon <?=$flag?>Ticket" title="<?=ucfirst($flag)?> Ticket" <?}?> href="tickets.php?id=<?=$row['ticket_id']?>"><?=$subject?></a> <?=$row['attachments']?"<span class='Icon file'> </span>":''?></td> <td nowrap><?=Format::truncate($row['dept_name'],30)?></td> <td class="nohover" align="center" style="background-color:<?=$row['priority_color']?>;"><?=$row['priority_desc']?></td> <td nowrap><?=Format::truncate($row['name'],22,strpos($row['name'],'@'))?> </td> </tr> <? $class = ($class =='row2') ?'row1':'row2'; } //end of while. else: //not tickets found!! ?> <tr class="<?=$class?>"><td colspan=8><b>Query returned 0 results.</b></td></tr> <? endif; ?> </table> </td></tr> <? if($num>0){ //if we actually had any tickets returned. ?> <tr><td style="padding-left:20px"> <?if($canDelete || $canClose) { ?>
if($res && db_num_rows($res)): while ($row = db_fetch_array($res)) { $sel=false; if($ids && in_array($row['category_id'],$ids)) $sel=true; $faqs=0; if($row['faqs']) $faqs=sprintf('<a href="faq.php?cid=%d">%d</a>',$row['category_id'],$row['faqs']); ?> <tr id="<?php echo $row['category_id']; ?>"> <td width=7px> <input type="checkbox" name="ids[]" value="<?php echo $row['category_id']; ?>" class="ckb" <?php echo $sel?'checked="checked"':''; ?>> </td> <td><a href="categories.php?id=<?php echo $row['category_id']; ?>"><?php echo Format::truncate($row['name'],200); ?></a> </td> <td><?php echo $row['ispublic']?'<b>'.__('Public').'</b>':__('Internal'); ?></td> <td style="text-align:right;padding-right:25px;"><?php echo $faqs; ?></td> <td> <?php echo Format::db_datetime($row['updated']); ?></td> </tr> <?php } //end of while. endif; ?> <tfoot> <tr> <td colspan="5"> <?php if($res && $num){ ?> <?php echo __('Select');?>: <a id="selectAll" href="#ckb"><?php echo __('All');?></a> <a id="selectNone" href="#ckb"><?php echo __('None');?></a> <a id="selectToggle" href="#ckb"><?php echo __('Toggle');?></a>
echo $row['ticket_id']; ?> "><?php echo $subject; ?> </a> <?php echo $row['attachments'] ? "<span class='Icon file'> </span>" : ''; ?> </td> <td nowrap><?php echo Format::truncate($row['name'], 22, strpos($row['name'], '@')); ?> </td> <td nowrap><?php echo Format::truncate($row['dept_name'], 30); ?> </td> <td class="nohover" align="center" style="color:<?php echo $row['priority_color']; ?> ;"><?php echo $row['priority_desc']; ?> </td> </tr> <?php $class = $class == 'row2' ? 'row1' : 'row2'; } //end of while. } else {
href="tickets.php?id=<?php echo $row['ticket_id']; ?>"><?php echo $tid; ?></a></td> <td align="center" nowrap><?php echo Format::db_datetime($row['effective_date']); ?></td> <td><a <?php if ($flag) { ?> class="Icon <?php echo $flag; ?>Ticket" title="<?php echo ucfirst($flag); ?> Ticket" <?php } ?> href="tickets.php?id=<?php echo $row['ticket_id']; ?>"><?php echo $subject; ?></a> <?php if ($threadcount>1) echo "<small>($threadcount)</small> ".'<i class="icon-fixed-width icon-comments-alt"></i> '; if ($row['collaborators']) echo '<i class="icon-fixed-width icon-group faded"></i> '; if ($row['attachments']) echo '<i class="icon-fixed-width icon-paperclip"></i> '; ?> </td> <td nowrap> <?php echo Format::htmlchars( Format::truncate($row['name'], 22, strpos($row['name'], '@'))); ?> </td> <?php if($search && !$status){ $displaystatus=ucfirst($row['status']); if(!strcasecmp($row['state'],'open')) $displaystatus="<b>$displaystatus</b>"; echo "<td>$displaystatus</td>"; } else { ?> <td class="nohover" align="center" style="background-color:<?php echo $row['priority_color']; ?>;"> <?php echo $row['priority_desc']; ?></td> <?php } ?> <td nowrap> <?php echo $lc; ?></td> </tr> <?php
</a> <?php if ($threadcount > 1) { echo "<small>({$threadcount})</small> " . '<i class="icon-fixed-width icon-comments-alt"></i> '; } if ($row['collaborators']) { echo '<i class="icon-fixed-width icon-group faded"></i> '; } if ($row['attachments']) { echo '<i class="icon-fixed-width icon-paperclip"></i> '; } ?> </td> <td nowrap> <?php echo Format::htmlchars(Format::truncate($row['name'], 22, strpos($row['name'], '@'))); ?> </td> <?php if ($search && !$status) { $displaystatus = ucfirst($row['status']); if (!strcasecmp($row['status'], 'open')) { $displaystatus = "<b>{$displaystatus}</b>"; } echo "<td>{$displaystatus}</td>"; } else { ?> <td class="nohover" align="center" style="background-color:<?php echo $row['priority_color']; ?> ;">
foreach ($thread as $entry) { ?> <table class="thread-entry <?php echo $threadTypes[$entry['thread_type']]; ?> " cellspacing="0" cellpadding="1" width="940" border="0"> <tr> <th colspan="4" width="100%"> <div> <span class="pull-left"> <span style="display:inline-block"><?php echo Format::db_datetime($entry['created']); ?> </span> <span style="display:inline-block;padding:0 1em" class="faded title"><?php echo Format::truncate($entry['title'], 100); ?> </span> </span> <span class="pull-right" style="white-space:no-wrap;display:inline-block"> <span style="vertical-align:middle;" class="textra"></span> <span style="vertical-align:middle;" class="tmeta faded title"><?php echo Format::htmlchars($entry['name'] ?: $entry['poster']); ?> </span> </span> </div> </th> </tr> <tr><td colspan="4" class="thread-body" id="thread-id-<?php
" <?php echo $sel ? 'checked' : ''; ?> onClick="highLight(this.value,this.checked);"> </td> <td> |-- <a href="admin.php?t=topics&id=<?php echo $sub2_row['topic_id']; ?> &tt=<?php echo $tt; ?> &prefix=<?php echo $prefix; ?> "><?php echo Format::htmlchars(Format::truncate($sub2_row['topic'], 60)); ?> </a></td> <td><?php echo $sub2_row['isactive'] ? 'Active' : '<b>Disabled</b>'; ?> </td> <td> <?php echo $sub2_row['noautoresp'] ? 'No' : '<b>Yes</b>'; ?> </td> <td><a href="admin.php?t=dept&id=<?php echo $sub2_row['dept_id']; ?> "><?php echo $sub2_row['dept_name'];
<th >Actualizado</th> <th>Estado</th> <th>Asunto</th> <!-- <th width="150">Email</th> --> </tr> </thead> <tbody> <?php $class = "row1"; $total = 0; if ($tickets_res && ($num = db_num_rows($tickets_res))) { $defaultDept = Dept::getDefaultDeptName(); while ($row = db_fetch_array($tickets_res)) { $dept = $row['ispublic'] ? $row['dept_name'] : $defaultDept; //Don't show hidden/non-public depts. $subject = Format::htmlchars(Format::truncate($row['subject'], 40)); $ticketID = $row['ticketID']; if ($row['isanswered'] && !strcasecmp($row['status'], 'open')) { $subject = "<strong>{$subject}</strong>"; $ticketID = "<strong>{$ticketID}</strong>"; } $stati = $row['status']; switch (strtolower($stati)) { //Status is overloaded case 'open': $stati = 'Abierto'; break; case 'closed': $stati = 'Cerrado'; break; }
<td><?php echo Format::db_datetime($ticket->getCloseDate()); ?> </td> </tr> <?php } ?> </table> </td> <td width="50%"> <table cellspacing="0" cellpadding="4" width="100%" border="0"> <tr> <th width="100">Subject:</th> <td><?php echo Format::htmlchars(Format::truncate($ticket->getSubject(), 200)); ?> </td> </tr> <tr> <th>Help Topic:</th> <td><?php echo Format::htmlchars($ticket->getHelpTopic()); ?> </td> </tr> <tr> <th nowrap>Last Message:</th> <td><?php echo Format::db_datetime($ticket->getLastMsgDate()); ?>
<td width=7px> <input type="checkbox" name="ids[]" value="<?php echo $row['canned_id']; ?> " class="ckb" <?php echo $sel ? 'checked="checked"' : ''; ?> /> </td> <td> <a href="canned.php?id=<?php echo $row['canned_id']; ?> "><?php echo Format::truncate($row['title'], 200); echo " {$files}"; ?> </a> </td> <td><?php echo $row['isenabled'] ? __('Active') : '<b>' . __('Disabled') . '</b>'; ?> </td> <td><?php echo $row['department'] ? $row['department'] : '— ' . __('All Departments') . ' —'; ?> </td> <td> <?php echo Format::db_datetime($row['updated']); ?>
$ticketID=$row['ticketID']; if($row['isanswered'] && !strcasecmp($row['status'],'open')) { $subject="<b>$subject</b>"; $ticketID="<b>$ticketID</b>"; } ?> <tr class="<?=$class?> " id="<?=$row['ticketID']?>"> <td align="center" title="<?=$row['email']?>" nowrap> <a class="Icon <?=strtolower($row['source'])?>Ticket" title="<?=$row['email']?>" href="view.php?id=<?=$row['ticketID']?>"> <?=$ticketID?></a></td> <td nowrap> <?=Format::db_date($row['created'])?></td> <td> <?=ucfirst($row['status'])?></td> <td> <a href="view.php?id=<?=$row['ticketID']?>"><?=$subject?></a> <?=$row['attachments']?"<span class='Icon file'> </span>":''?></td> <td nowrap> <?=Format::truncate($dept,30)?></td> <td> <?=Format::truncate($row['email'],40)?></td> </tr> <? $class = ($class =='row2') ?'row1':'row2'; } //end of while. else: //not tickets found!! ?> <tr class="<?=$class?>"><td colspan=7><b>NO tickets found.</b></td></tr> <? endif; ?> </table> </td></tr> <tr><td> <? if($num>0 && $pageNav->getNumPages()>1){ //if we actually had any tickets returned?> <tr><td style="text-align:left;padding-left:20px">page:<?=$pageNav->getPageLinks()?> </td></tr> <?}?>