示例#1
0
        echo $row->subject;
        ?>
		</td>
		<td>
			<?php 
        echo $row->currentlog;
        ?>
		</td>
		<td>
			<?php 
        echo $row->from;
        ?>
		</td>
		<td style="white-space: nowrap;">
			<?php 
        echo FSS_Helper::Date($row->lastseen, FSS_DATETIME_MYSQL);
        ?>
</td>
<td>
<?php 
        $log = str_replace("\n", "<br />", $row->oldlog);
        $log = htmlspecialchars($log);
        ?>
			<a href="#" onclick="return false;" data-placement="left" class="fssTip" title="<?php 
        echo $log;
        ?>
">Log</a>
		</td>	
	</tr>
<?php 
    }
示例#2
0
 function saveTicket()
 {
     $subject = FSS_Input::getString('subject');
     $body = FSS_Input::getBBCode('body');
     $prodid = FSS_Input::getInt('prodid');
     $deptid = FSS_Input::getInt('deptid');
     $catid = FSS_Input::getInt('catid');
     $priid = FSS_Input::getInt('priid');
     $handler = FSS_Input::getInt('handler');
     $user = JFactory::getUser();
     $userid = $user->get('id');
     $name = "";
     $session = JFactory::getSession();
     $this->admin_create = 0;
     if ($session->Get('admin_create')) {
         $this->admin_create = $session->Get('admin_create');
     }
     if ($this->admin_create == 1) {
         $this->admin_create = 1;
         $userid = $session->Get('admin_create_user_id');
     } else {
         if ($this->admin_create == 2) {
             $userid = 0;
         }
     }
     $db = JFactory::getDBO();
     if ($priid < 1) {
         $priid = FSS_Settings::get('support_default_priority');
     }
     $ticket['subject'] = $subject;
     $ticket['body'] = $body;
     $ticket['priid'] = $priid;
     $ticket['handler'] = $handler;
     $ok = true;
     $errors['subject'] = '';
     $errors['body'] = '';
     $errors['cat'] = '';
     $errors['captcha'] = '';
     $fields = FSSCF::GetCustomFields(0, $prodid, $deptid);
     if (FSS_Settings::get('support_subject_message_hide') == "subject") {
         $ticket['subject'] = substr(strip_tags($ticket['body']), 0, 40);
         $subject = $ticket['subject'];
     }
     if (FSS_Settings::get('support_altcat')) {
         $cats = $this->get('Cats');
         if (count($cats) > 0 && FSS_Input::getInt('catid') < 1) {
             $errors['cat'] = JText::_("YOU_MUST_SELECT_A_CATEGORY");
             $ok = false;
         }
     }
     if ($body == "" && FSS_Settings::get('support_subject_message_hide') != "message" && FSS_Settings::get('support_subject_message_hide') != "both") {
         $errors['body'] = JText::_("YOU_MUST_ENTER_A_MESSAGE_FOR_YOUR_SUPPORT_TICKET");
         $ok = false;
     }
     if (!FSSCF::ValidateFields($fields, $errors)) {
         $ok = false;
     }
     $email = "";
     $password = "";
     $now = FSS_Helper::CurDate();
     $this->sortCaptchaType();
     $captcha = new FSS_Captcha();
     if (!$captcha->ValidateCaptcha('support_captcha_type')) {
         $errors['captcha'] = JText::_("INVALID_SECURITY_CODE");
         $ok = false;
     }
     if ($userid < 1) {
         $email = FSSJ3Helper::getEscaped($db, $session->Get('ticket_email'));
         if ($session->Get('ticket_name')) {
             $name = FSSJ3Helper::getEscaped($db, $session->Get('ticket_name'));
         }
         if ($email == "" && $this->admin_create != 2) {
             $ok = false;
         } else {
             $password = FSS_Helper::createRandomPassword();
             $session->Set('ticket_pass', $password);
         }
     }
     // assign handler to ticket
     $admin_id = $handler;
     if (!$admin_id) {
         $admin_id = FSS_Ticket_Helper::AssignHandler($prodid, $deptid, $catid);
     }
     $now = FSS_Helper::CurDate();
     $def_open = FSS_Ticket_Helper::GetStatusID('def_open');
     if (FSS_Settings::get('support_subject_format') != "") {
         $parser = new FSSParser();
         foreach ($_POST as $var => $value) {
             $parser->setVar($var, FSS_Input::GetString($var));
         }
         foreach ($fields as $field) {
             $parser->setVar('custom_' . $field['alias'], FSS_Input::GetString('custom_' . $field['id']));
         }
         $user = JFactory::getUser($userid);
         $parser->setVar('userid', $userid);
         $parser->setVar('username', $user->username);
         $parser->setVar('name', $user->name);
         $parser->setVar('email', $user->email);
         $parser->setVar('subject', $subject);
         $parser->SetVar('product', FSS_EMail::GetProduct($prodid));
         $parser->SetVar('department', FSS_EMail::GetDepartment($deptid));
         $parser->SetVar('category', FSS_EMail::Getcategory($catid));
         $parser->SetVar('date', FSS_Helper::Date($now, FSS_DATE_SHORT));
         $parser->SetVar('time', FSS_Helper::Date($now, FSS_DATETIME_SHORT));
         $parser->SetTemplate(FSS_Settings::get('support_subject_format'));
         $result = $parser->Parse();
         if (trim($result) == "") {
             $sj = array();
             foreach ($fields as $field) {
                 $sj[] = FSS_Input::GetString('custom_' . $field['id']);
             }
             $result = implode(", ", $sj);
         }
         $ticket['subject'] = $result;
         $subject = $ticket['subject'];
         if ($subject == "") {
             $errors['subject'] = JText::_("YOU_MUST_ENTER_A_SUBJECT_FOR_YOUR_SUPPORT_TICKET");
             $ok = false;
         }
     }
     if ($ok) {
         $qry = "INSERT INTO #__fss_ticket_ticket (reference, ticket_status_id, ticket_pri_id, ticket_cat_id, ticket_dept_id, prod_id, title, opened, lastupdate, user_id, admin_id, email, password, unregname, lang) VALUES ";
         $qry .= "('', {$def_open}, '" . FSSJ3Helper::getEscaped($db, $priid) . "', '" . FSSJ3Helper::getEscaped($db, $catid) . "', '" . FSSJ3Helper::getEscaped($db, $deptid) . "', '" . FSSJ3Helper::getEscaped($db, $prodid) . "', '" . FSSJ3Helper::getEscaped($db, $subject) . "', '{$now}', '{$now}', '" . FSSJ3Helper::getEscaped($db, $userid) . "', '" . FSSJ3Helper::getEscaped($db, $admin_id) . "', '{$email}', '" . FSSJ3Helper::getEscaped($db, $password) . "', '{$name}', '" . JFactory::getLanguage()->getTag() . "')";
         $db->setQuery($qry);
         $db->Query();
         $this->ticketid = $db->insertid();
         $ref = FSS_Ticket_Helper::createRef($this->ticketid);
         $session->Set('ticket_reference', $ref);
         $qry = "UPDATE #__fss_ticket_ticket SET reference = '" . FSSJ3Helper::getEscaped($db, $ref) . "' WHERE id = '" . FSSJ3Helper::getEscaped($db, $this->ticketid) . "'";
         $db->setQuery($qry);
         $db->Query();
         if ($this->admin_create) {
             $curuser = JFactory::getUser();
             $premsg = date("Y-m-d H:i:s", strtotime($now) - 1);
             $msg = JText::sprintf('TICKET_OPENED_BY', $curuser->name, $curuser->username);
             $qry = "INSERT INTO #__fss_ticket_messages (ticket_ticket_id, subject, body, user_id, posted, admin) VALUES ('";
             $qry .= FSSJ3Helper::getEscaped($db, $this->ticketid) . "','" . FSSJ3Helper::getEscaped($db, $subject) . "','" . FSSJ3Helper::getEscaped($db, $msg) . "','" . FSSJ3Helper::getEscaped($db, $curuser->id) . "','{$premsg}', 6)";
             $db->setQuery($qry);
             $db->Query();
         }
         $qry = "INSERT INTO #__fss_ticket_messages (ticket_ticket_id, subject, body, user_id, posted) VALUES ('";
         $qry .= FSSJ3Helper::getEscaped($db, $this->ticketid) . "','" . FSSJ3Helper::getEscaped($db, $subject) . "','" . FSSJ3Helper::getEscaped($db, $body) . "','" . FSSJ3Helper::getEscaped($db, $userid) . "','{$now}')";
         $db->setQuery($qry);
         $db->Query();
         $messageid = $db->insertid();
         FSSCF::StoreFields($fields, $this->ticketid);
         // store tags if there are any posted
         $tags_input = FSS_Input::getString('tags');
         $parts = explode("|", $tags_input);
         foreach ($parts as $part) {
             $tag = trim($part);
             if (!$tag || $tag == "") {
                 continue;
             }
             $tags[] = $tag;
             $qry = "INSERT INTO #__fss_ticket_tags (ticket_id, tag) VALUES ('" . $this->ticketid . "', '" . $db->escape($tag) . "')";
             $db->setQuery($qry);
             $db->Query();
         }
         $t = new SupportTicket();
         $t->load($this->ticketid, true);
         $files = $t->addFilesFromPost($messageid, $userid);
         $t->stripImagesFromMessage($messageid);
         $subject = FSS_Input::getString('subject');
         $body = FSS_Input::getBBCode('body');
         $action_name = "User_Open";
         $action_params = array('subject' => $subject, 'user_message' => $body, 'files' => $files);
         SupportActions::DoAction($action_name, $t, $action_params);
         // additional users and emails if posted
         if ($this->admin_create > 0) {
             $additionalusers = JRequest::getVar('additionalusers');
             $additionalusers = explode(",", $additionalusers);
             $t->addCC($additionalusers, 0, 0);
             $additionalemails = JRequest::getVar('additionalemails');
             $additionalemails = explode(",", $additionalemails);
             foreach ($additionalemails as $email) {
                 $email = trim($email);
                 if ($email == "") {
                     continue;
                 }
                 $t->addEMailCC($email);
             }
             if ($t->admin_id != JFactory::getUser()->id) {
                 $t->addCC(JFactory::getUser()->id, 1, 0);
             }
         }
         $this->cleanAdminCreate();
         // if related is passed as part of ticket open, relate the 2 tickets
         $related = JRequest::getVar('related');
         if ($related > 0) {
             $t->addRelated($related);
         }
     }
     $this->errors = $errors;
     $this->ticket = $ticket;
     return $ok;
 }
示例#3
0
echo FSS_Helper::PageTitle("ANNOUNCEMENTS");
?>


<?php 
if (count($this->announces) > 0) {
    ?>
	<form method="post" action="<?php 
    echo FSSRoute::_('');
    ?>
" name="form">

		<?php 
    foreach ($this->announces as $announce) {
        $this->parser->SetVar('editpanel', $this->content->EditPanel($announce));
        $this->parser->SetVar('date', FSS_Helper::Date($announce['added'], FSS_DATE_MID));
        $this->parser->SetVar('link', FSSRoute::_('index.php?option=com_fss&view=announce&announceid=' . $announce['id']));
        $this->parser->setVar('title', FSS_Helper::PageSubTitle($announce['title']));
        $this->parser->setVar('subtitle', $announce['subtitle']);
        $authid = $announce['author'];
        $user = JFactory::getUser($authid);
        if ($user->id > 0) {
            $this->parser->setVar('author', $user->name);
            $this->parser->setVar('author_username', $user->username);
        } else {
            $this->parser->setVar('author', JText::_('UNKNOWN'));
            $this->parser->setVar('author_username', JText::_('UNKNOWN'));
        }
        if (FSS_Settings::get('glossary_announce')) {
            $this->parser->setVar('body', FSS_Glossary::ReplaceGlossary($announce['body']));
        } else {
示例#4
0
<?php 
    foreach ($this->rows as $row) {
        ?>
			<tr id="row_<?php 
        echo $row->id;
        ?>
" onmouseenter="showRow(<?php 
        echo $row->id;
        ?>
);" class='hlrow'>
				<td width="100"><?php 
        echo $row->cron;
        ?>
</td>
				<td width="180"><?php 
        echo FSS_Helper::Date($row->when, FSS_DATETIME_MYSQL);
        ?>
</td>
				<td id="entry_<?php 
        echo $row->id;
        ?>
" style='display: none'><?php 
        echo $row->log;
        ?>
</td>
			</tr>
<?php 
    }
    ?>
		</table>
示例#5
0
<?php 
    fss_end_col();
}
?>

<?php 
fss_start_col();
?>
	<th><?php 
echo JText::_("LAST_UPDATE");
?>
</th>
	<td>
		<?php 
echo FSS_Helper::Date($this->ticket->lastupdate, FSS_DATETIME_MID);
?>
	</td>
<?php 
fss_end_col();
?>


<?php 
fss_start_col();
?>
	<th style="vertical-align: middle"><?php 
echo JText::_("STATUS");
?>
</th>
	<td>
示例#6
0
            ?>
							<?php 
            if ($field->link) {
                ?>
</a><?php 
            }
            ?>
						</td>
					<?php 
        }
        ?>
					<?php 
        if ($this->list_added) {
            ?>
						<td nowrap><?php 
            echo FSS_Helper::Date($item['added'], FSS_DATE_SHORT);
            ?>
</td>
					<?php 
        }
        ?>

					<?php 
        if ($this->list_published) {
            ?>
						<td nowrap>
							<a href="#" id="publish_<?php 
            echo $item['id'];
            ?>
" class="fss_publish_button" state="<?php 
            echo $item['published'];
示例#7
0
 function kb_mod_show_extra($row, $pos)
 {
     global $posdata, $date_format;
     if (!array_key_exists($pos, $posdata)) {
         return;
     }
     $output = "<div class='fss_mod_kbart_{$pos}'>";
     foreach ($posdata[$pos] as $item) {
         $output .= "<div class='fss_mod_kbart_{$item}'>";
         switch ($item) {
             case 'date':
                 if ($row->modified != "0000-00-00 00:00:00") {
                     $output .= FSS_Helper::Date($row->modified, $date_format);
                 }
                 break;
             case 'added':
                 if ($row->created != "0000-00-00 00:00:00") {
                     $output .= FSS_Helper::Date($row->created, $date_format);
                 }
                 break;
             case 'author':
                 $user = JFactory::getUser($row->author);
                 if ($user->name) {
                     $output .= "By <span class='fss_mod_kbart_{$item}_inner'>" . $user->name . "</span>";
                 }
                 break;
             case 'rating':
                 $output .= "Rating: <span class='fss_mod_kbart_{$item}_inner'>" . $row->rating . "</span>";
                 break;
             case 'views':
                 $output .= "<span class='fss_mod_kbart_{$item}_inner'>" . $row->views . "</span> Views";
                 break;
             case 'blank':
                 $output .= "&nbsp;";
                 break;
         }
         $output .= "</div>";
     }
     $output .= "</div>";
     return $output;
 }
示例#8
0
            ?>
' title='Delete Attachment' class='fssTip'>
							<i class="icon-delete"></i>
						</a>
					</div>
				<?php 
        }
        ?>
					
				<div class="pull-right" style="text-align: right;">
					<?php 
        echo FSS_Helper::display_filesize($attach->size);
        ?>
<br />
					<?php 
        echo FSS_Helper::Date($attach->added, FSS_DATETIME_MID);
        ?>
<br />
						
				</div>
		
				<h4 class="media-heading"><a href='<?php 
        echo JRoute::_('index.php?option=com_fss&view=admin_support&task=attach.download&ticketid=' . $this->ticket->id . '&fileid=' . $attach->id);
        ?>
'><?php 
        echo $attach->filename;
        ?>
</a></h4>
				<?php 
        echo JText::_('UPLOADED_BY');
        ?>
示例#9
0
            }
        }
    }
}
if ($this->opt_max_length > 0 && strlen($this->comment['body']) > $this->opt_max_length) {
    $randno = mt_rand(100000, 999999);
    $result = array();
    $is_trimmed = false;
    $result[] = "<div id='test_short_" . $randno . "'>";
    $result[] = FSS_Helper::truncate($this->comment['body'], $this->opt_max_length, $is_trimmed, '');
    if ($is_trimmed) {
        $result[] = "&hellip; <a href='#' onclick='expand_test(" . $randno . ");return false;'>" . JText::_("MOD_FSS_TEST_READ_MORE") . "</a><div id='test_full_" . $randno . "' style='display:none'>" . $this->comment['body'] . "</div>";
        $result[] = "</div>";
        $this->comment['body'] = trim(implode($result));
    }
}
$this->comment['body'] = str_replace("\n", "<br />", $this->comment['body']);
$this->comment['body'] = str_replace("\n", "<br />", $this->comment['body']);
$this->parser->AddVars($this->comment);
$this->parser->SetVar('divid', "fss_comment_{$this->uid}_{$this->comment['id']}");
if (count($custom) > 0) {
    $this->parser->SetVar('custom', implode(", ", $custom));
} else {
    $this->parser->SetVar('custom', "");
}
$this->parser->SetVar('created_nice', FSS_Helper::Date($this->comment['created'], FSS_DATETIME_SHORT));
$this->parser->SetVar('date', FSS_Helper::Date($this->comment['created'], FSS_DATE_SHORT));
$this->parser->SetVar('moderation', $moderation);
//print_p($this->comment);
//print_p($this->parser);
echo $this->parser->Parse();
示例#10
0
        ?>
				
							</dd>	
				<?php 
    }
    ?>

				<?php 
    if (FSS_Settings::get('kb_show_dates') == 2 && $this->art['modified'] != "0000-00-00 00:00:00") {
        ?>
							<dd class="create">
								<span class="icon-calendar"></span> <?php 
        echo JText::_("MODIFIED");
        ?>
: <?php 
        echo FSS_Helper::Date($this->art['modified']);
        ?>
				
							</dd>	
				<?php 
    }
    ?>

			</dl>
		</div>
	
	<?php 
}
?>
	
	
示例#11
0
 function doReply()
 {
     $this->ticketid = FSS_Input::getInt('ticketid');
     $this->ticket = new SupportTicket();
     if (!$this->ticket->load($this->ticketid)) {
         return JError::raiseWarning(404, JText::_('Ticket not found'));
     }
     $this->ticket->loadAll();
     if (FSS_Settings::get('time_tracking') != "") {
         if (FSS_Settings::get('time_tracking_type') == 'se') {
             $this->time_start = FSS_Helper::Date(time(), FSS_DATE_CUSTOM, "H:i:s");
             $this->time_end = FSS_Helper::Date(time(), FSS_DATE_CUSTOM, "H:i:s");
         } elseif (FSS_Settings::get('time_tracking_type') == 'tm') {
             $this->time_start = FSS_Helper::Date(time(), FSS_DATE_CUSTOM, FSS_Helper::getFormat());
             $this->time_end = FSS_Helper::Date(time(), FSS_DATE_CUSTOM, FSS_Helper::getFormat());
         } else {
             $this->taken_hours = 0;
             $this->taken_mins = 0;
         }
     }
     if (FSS_Settings::get('time_tracking') == "auto") {
         $session = JFactory::getSession();
         $taken = $session->get('ticket_' . $this->ticket->id . "_opened");
         if (FSS_Settings::get('time_tracking_type') == 'se') {
             $document = JFactory::getDocument();
             $document->addScript(JURI::root() . 'components/com_fss/assets/js/bootstrap/bootstrap-timepicker.min.js');
             $document->addScriptDeclaration("jQuery(document).ready(function () {jQuery('#timetaken_start').timepicker({minuteStep:5, showMeridian: false});jQuery('#timetaken_end').timepicker({minuteStep:5, showMeridian: false});});");
             $this->time_start = FSS_Helper::Date($taken, FSS_DATE_CUSTOM, "H:i:s");
         } else {
             if ($taken > 0) {
                 $taken = time() - $taken;
             }
             $this->time_taken = $taken;
             $taken = ceil($taken / 60);
             $this->taken_hours = floor($taken / 60);
             $this->taken_mins = $taken % 60 + 1;
         }
     }
     $this->fields = FSSCF::GetCustomFields($this->ticket->id, $this->ticket->prod_id, $this->ticket->ticket_dept_id, 3);
     $this->fieldvalues = FSSCF::GetTicketValues($this->ticket->id, $this->ticket);
     $pathway = JFactory::getApplication()->getPathway();
     $pathway->addItem(JText::_("SUPPORT"), FSSRoute::_('index.php?option=com_fss&view=admin_support&tickets=' . $this->ticket_view, false));
     $pathway->addItem(JText::_("VIEW_TICKET") . " : " . $this->ticket->reference . " - " . $this->ticket->title, FSSRoute::_('index.php?option=com_fss&view=admin_support&tickets=' . $this->ticket_view . "&ticketid=" . $this->ticket->id, false));
     $this->reply_type = FSS_Input::getCmd('type', 'reply');
     if ($this->reply_type == "") {
         $this->reply_type = "reply";
     }
     switch ($this->reply_type) {
         case 'reply':
             $this->reply_title = "REPLY_TO_SUPORT_TICKET";
             $this->reply_button = "POST_REPLY";
             $pathway->addItem(JText::_("POST_REPLY"));
             break;
         case 'private':
             $this->reply_title = "ADD_HANDLER_COMMENT_TO_TICKET";
             $this->reply_button = "POST_COMMENT";
             $pathway->addItem(JText::_("ADD_COMMENT"));
             break;
         case 'user':
             $this->reply_title = "FORWARD_TICKET_TO_A_DIFFERENT_USER";
             $this->reply_button = "FORWARD_TICKET";
             if ($this->ticket->user_id > 0) {
                 $user = JFactory::getUser($this->ticket->user_id);
             } else {
                 $user = new stdClass();
                 $user->username = $this->ticket->email;
                 $user->name = $this->ticket->unregname;
             }
             $this->user = $user;
             $pathway->addItem(JText::_("FORWARD_TO_USER"));
             break;
         case 'product':
             $this->reply_title = "FORWARD_TICKET_TO_A_DIFFERENT_DEPARTMENT";
             $this->reply_button = "FORWARD_TICKET";
             $this->handlers = SupportUsers::getHandlers(false, true);
             $pathway->addItem(JText::_("FORWARD_TO_DEPARTMENT"));
             break;
         case 'handler':
             $this->reply_title = "FORWARD_TICKET_TO_A_DIFFERENT_HANDLER";
             $this->reply_button = "FORWARD_TICKET";
             $this->handlers = SupportUsers::getHandlers(false, true);
             $pathway->addItem(JText::_("FORWARD_TO_HANDLER"));
             break;
     }
     $this->draft = FSS_Input::getInt('draft');
     $this->user_message = $this->loadDraft($this->draft);
     $this->support_assign_reply = FSS_Settings::get('support_assign_reply');
     FSS_Helper::IncludeModal();
     FSS_Helper::AddSCEditor();
     parent::_display();
 }
示例#12
0
if ($this->view_mode != 'popup') {
    ?>
	
	<div class='media'>
		<div class="pull-right">
			<?php 
    echo $this->content->EditPanel($art);
    ?>
		</div>
		<div class="media-body">
			<?php 
    if ($what == "recent" && FSS_Settings::get('kb_show_recent_stats') && $art['modified'] != "0000-00-00 00:00:00") {
        ?>
				<span class="pull-right">
					<?php 
        echo FSS_Helper::Date($art['modified'], FSS_DATE_SHORT);
        ?>
				</span>
			<?php 
    }
    ?>
			<?php 
    if ($what == "viewed" && FSS_Settings::get('kb_show_viewed_stats')) {
        ?>
				<span class="pull-right">
					<?php 
        echo $art['views'];
        ?>
 <?php 
        echo JText::_("VIEW_S");
        ?>
示例#13
0
        ?>
								<br />
								<span class="small">
									<?php 
        echo $ticket->getUserEMail();
        ?>
								</span>
							</td>
					
							<td style="vertical-align:middle;text-align:center;word-break: break-all;" nowrap>
								<?php 
        echo FSS_Helper::Date($ticket->opened, FSS_DATE_SHORT);
        ?>
<br />
								<span class="small"><?php 
        echo FSS_Helper::Date($ticket->opened, FSS_TIME_SHORT);
        ?>
</span>
							</td>

							<td style="vertical-align:middle;text-align:center;" nowrap class="action_buttons">
								<?php 
        if ($this->state == "") {
            ?>
									<a href="#" class="btn btn-success accept_button" onclick="email_accept(<?php 
            echo $ticket->id;
            ?>
); return false; "><?php 
            echo JText::_('ACCEPT');
            ?>
</a>
示例#14
0
px;
	overflow: hidden;
}
</style>
<?php 
}
?>

<div id="fss_announce_scroll" class="fss_announce_scroll">

<?php 
foreach ($rows as $announce) {
    $parser->SetVar('title', $announce['title']);
    $parser->SetVar('subtitle', $announce['subtitle']);
    $parser->SetVar('date', FSS_Helper::Date($announce['added'], FSS_DATE_MID));
    $parser->SetVar('time', FSS_Helper::Date($announce['added'], FSS_TIME_SHORT));
    $parser->SetVar('body', $announce['body']);
    $parser->SetVar('link', FSSRoute::_('index.php?option=com_fss&view=announce&announceid=' . $announce['id']));
    $authid = $announce['author'];
    $user = JFactory::getUser($authid);
    if ($user->id > 0) {
        $parser->setVar('author', $user->name);
        $parser->setVar('author_username', $user->username);
    } else {
        $parser->setVar('author', JText::_('UNKNOWN'));
        $parser->setVar('author_username', JText::_('UNKNOWN'));
    }
    echo $parser->Parse();
}
?>
示例#15
0
			    <a href="<?php 
    echo $link;
    ?>
"><?php 
    echo $row->title;
    ?>
</a>
			</td>
           	<td>
   				<?php 
    echo $row->subtitle;
    ?>
			</td>
			<td nowrap>
   				<?php 
    echo FSS_Helper::Date($row->added, FSS_DATETIME_MID);
    ?>
			</td>
           	<td>
   				<?php 
    echo $row->name;
    ?>
			</td>
			<td align="center">
				<a href="javascript:void(0);" class="jgrid btn btn-micro" onclick="return listItemTask('cb<?php 
    echo $i;
    ?>
','<?php 
    echo $row->published ? 'unpublish' : 'publish';
    ?>
')">
示例#16
0
 function testdate($date, $format)
 {
     /*$date = new JDate($date, new DateTimeZone("UTC"));
     		$date->setTimezone(FSS_Helper::getTimezone());
     		return $date->format($format, true);*/
     return FSS_Helper::Date($date, FSS_DATE_CUSTOM, $format);
 }
示例#17
0
					</a>
				</div>
			<?php 
        }
        ?>
		
			
				<div class="media-body">

					<div class="pull-right" style="text-align: right;">
						<?php 
        echo FSS_Helper::display_filesize($attach['size']);
        ?>
<br />
						<?php 
        echo FSS_Helper::Date($attach['added'], FSS_DATETIME_MID);
        ?>
					</div>

					<h4 class="media-heading"><a href='<?php 
        echo FSSRoute::_('index.php?option=com_fss&view=ticket&fileid=' . $attach['id'] . "&ticketid=" . $this->ticket['id']);
        ?>
'><?php 
        echo $attach['filename'];
        ?>
</a></h4>
					<?php 
        echo JText::_('UPLOADED_BY');
        ?>
 
					<span class="label label-<?php 
示例#18
0
        echo FSS_Helper::Date($row->created, FSS_DATETIME_MID);
        ?>
				<?php 
    } else {
        ?>
					-
				<?php 
    }
    ?>
			</td>
			<td>
                <?php 
    if ($row->modified != "0000-00-00 00:00:00") {
        ?>
					<?php 
        echo FSS_Helper::Date($row->modified, FSS_DATETIME_MID);
        ?>
				<?php 
    } else {
        ?>
					-
				<?php 
    }
    ?>
            </td>
            <td>
                <?php 
    echo $row->cattitle ? $row->cattitle : "Uncategorized";
    ?>
            </td>
            <td align='center'>
示例#19
0
        echo (int) $message['id'];
        ?>
'><?php 
        echo $message['subject'];
        ?>
</strong>
			</td>
		</tr>

		<tr>
			<td>
			
				<div class="pull-right" style="margin-bottom: 8px;margin-left: 8px;">
					<i>
						<?php 
        echo FSS_Helper::Date($message['posted'], FSS_DATETIME_MID);
        ?>
					</i>
				</div>
				
				<div id="message_<?php 
        echo (int) $message['id'];
        ?>
">
					<?php 
        $msg = $message['body'];
        $msg = FSS_Helper::ParseBBCode($msg, $message);
        echo $msg;
        ?>
				</div>
				
示例#20
0
 static function ParseMessageRows(&$messages, $ishtml, $foruser = false)
 {
     $template = self::Get_Template('messagerow');
     $result = "";
     foreach ($messages as &$message) {
         $vars = array();
         //print_p($message);
         if ($message['name']) {
             $vars[] = self::BuildVar('name', $message['name']);
             $vars[] = self::BuildVar('email', $message['email']);
             $vars[] = self::BuildVar('username', $message['username']);
         } else {
             $vars[] = self::BuildVar('name', 'Unknown');
             $vars[] = self::BuildVar('email', 'Unknown');
             $vars[] = self::BuildVar('username', 'Unknown');
         }
         $vars[] = self::BuildVar('subject', $message['subject']);
         $vars[] = self::BuildVar('posted', FSS_Helper::Date($message['posted']));
         $message['body'] = FSS_Helper::ParseBBCode($message['body'], null, false, false, $foruser);
         if ($ishtml) {
             $message['body'] = str_replace("\n", "<br>\n", $message['body']);
             $vars[] = self::BuildVar('body', $message['body'] . "<br />");
         } else {
             $vars[] = self::BuildVar('body', $message['body'] . "\n");
         }
         $result .= self::ParseText($template['body'], $vars);
     }
     return $result;
 }
示例#21
0
 static function TicketTime($time, $format = FSS_DATETIME_SHORT)
 {
     $abs = FSS_Helper::Date($time, $format);
     $rel = FSS_Helper::RelativeTime(strtotime($time));
     if (FSS_Settings::get('absolute_last_open') == 3) {
         // relative with no tip
         return $abs;
     } elseif (FSS_Settings::get('absolute_last_open') == 2) {
         // absolute without tip
         return $rel;
     } elseif (FSS_Settings::get('absolute_last_open') == 1) {
         // absolute withtip
         return "<span class='fssTip' title='{$rel}'>{$abs}</span>";
     } else {
         // relative with tip
         return "<span class='fssTip' title='{$abs}'>{$rel}</span>";
     }
 }
示例#22
0
    static function TimeTaken($message)
    {
        if ($message->time != 0) {
            ?>
			<span class="<?php 
            if ($message->time < 0) {
                ?>
 text-error <?php 
            }
            ?>
">
				<i class="icon-clock"></i> 
				<?php 
            if ($message->time < 0) {
                ?>
-<?php 
            }
            ?>
				<?php 
            echo "<span style='display:none' class='ticket_time_dur'>" . $message->time . "</span>";
            $time = abs($message->time);
            $hours = floor($time / 60);
            $mins = sprintf("%02d", $time % 60);
            if ($message->timestart > 0 && $message->timeend > 0 && $message->timestart < 86400) {
                echo "<span style='display:none' class='ticket_time_start'>" . date("H:i", $message->timestart) . "</span>";
                echo "<span style='display:none' class='ticket_time_end'>" . date("H:i", $message->timeend) . "</span>";
                echo "<i class='ticket_time_time'>" . date("H:i", $message->timestart) . " - " . date("H:i", $message->timeend) . "</i> (<b>";
            } else {
                if ($message->timestart > 0 && $message->timeend > 0) {
                    echo "<span style='display:none' class='ticket_time_start'>" . $message->timestart . "</span>";
                    echo "<span style='display:none' class='ticket_time_end'>" . $message->timeend . "</span>";
                    echo "<i class='ticket_time_date'>" . FSS_Helper::Date($message->timestart, FSS_DATETIME_SHORT) . " - " . FSS_Helper::Date($message->timeend, FSS_DATETIME_SHORT) . "</i> (<b>";
                } else {
                    echo "<span style='display:none' class='ticket_time_hours'>" . $hours . "</span>";
                    echo "<span style='display:none' class='ticket_time_mins'>" . $mins . "</span>";
                }
            }
            echo "<span class='ticket_time_duration'>" . JText::sprintf("TIME_TAKEN_DISP", $hours, $mins) . "</span>";
            if ($message->timestart > 0 && $message->timeend > 0) {
                echo "</b>)";
            }
            ?>
 
			</span>
			&nbsp;
		<?php 
        }
    }