Exemple #1
0
        ?>
">
						<?php 
        echo $attach['name'];
        ?>
					</span>
			
				</div>
			</div>

		<?php 
    }
    ?>

	<?php 
    FSS_Helper::HelpText("support_user_view_attach_footer");
    ?>

<?php 
}
?>
</div>
<script>

function doPrint(link)
{
	printWindow = window.open(jQuery(link).attr('href')); 
	return false;
}

var procform = false;
<div id="messagereply" style="display: none;">
	<?php 
include $this->snippet(JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'ticket' . DS . 'snippet' . DS . '_reply.php');
?>
</div>

<div id="messagepleasewait" style="display: none;clear: both" class="alert alert-info">
	<?php 
echo JText::_('PLEASE_WAIT');
?>
</div>

<?php 
FSS_Helper::HelpText("support_user_view_mes_buttons");
?>

<div id="ticket_messages">
	<?php 
include $this->snippet(JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'ticket' . DS . 'snippet' . DS . '_messages.php');
?>
</div>

<?php 
FSS_Helper::HelpText("support_user_view_mes_footer");
?>

<?php 
if (FSS_Settings::get('glossary_support')) {
    echo FSS_Glossary::Footer();
}
Exemple #3
0
</a>
		<?php 
        }
        ?>
	<?php 
    }
}
?>

<input class='btn btn-primary' type='submit' value='<?php 
echo JText::_("CREATE_NEW_TICKET");
?>
' id='addcomment'>
</p>
<?php 
FSS_Helper::HelpText("support_open_main_buttons_after");
?>

</form>

<script>
jQuery(document).ready(function(){
<?php 
if ($this->prodid > 0 || $this->deptid > 0) {
    ?>
	jQuery('#backprod').click(function(ev){
	
		ev.preventDefault();
		
		if (jQuery('#deptid').val() == '' || jQuery('#deptid').val() == 0)
			jQuery('#prodid').val('');		
Exemple #4
0
 function doOpenTicket()
 {
     if (!FSS_Permission::auth("fss.ticket.open", "com_fss.support_user")) {
         return FSS_Helper::NoPerm();
     }
     $mainframe = JFactory::getApplication();
     $user = JFactory::getUser();
     $userid = $user->get('id');
     $this->userid = $userid;
     $this->email = '';
     $this->admin_create = 0;
     $session = JFactory::getSession();
     if (FSS_Input::getInt('admincreate') > 0) {
         $session->Set("admin_create", FSS_Input::getInt('admincreate'));
         if ($session->Get("admin_create") == 1 && FSS_Input::getInt('user_id') > 0) {
             $session->Set('admin_create_user_id', FSS_Input::getInt('user_id'));
         } else {
             if ($session->Get("admin_create") == 2 && (FSS_Input::getString('admin_create_email') || FSS_Input::getString('admin_create_name'))) {
                 $session->Set('ticket_email', FSS_Input::getEMail('admin_create_email'));
                 $session->Set('ticket_name', FSS_Input::getString('admin_create_name'));
             }
         }
     }
     if ($session->Get("admin_create") == 1) {
         $this->admin_create = 1;
         $model = $this->getModel();
         $this->user = $model->getUser($session->Get('admin_create_user_id'));
     } else {
         if ($session->Get("admin_create") == 2) {
             $this->unreg_email = $session->Get('ticket_email');
             $this->unreg_name = $session->Get('ticket_name');
             $this->admin_create = 2;
         }
     }
     if (FSS_Settings::Get('support_only_admin_open') && $this->admin_create < 1) {
         return $this->noPermission("Access Denied", "CREATING_NEW_TICKETS_BY_USERS_IS_CURRENTLY_DISABLED");
     }
     // store in session and data for an unregistered ticket
     $type = FSS_Input::getCmd('type');
     if ($type == "without") {
         $email = FSS_Input::getEMail('email');
         $name = FSS_Input::getString('name');
         if ($name == "") {
             $name = $email;
         }
         if ($email != "") {
             $session->Set('ticket_email', $email);
             $session->Set('ticket_name', $name);
         }
     }
     if (!$this->ValidateUser('open')) {
         return;
     }
     // defaults for blank ticket
     $ticket['priid'] = FSS_Input::getInt('priid', FSS_Settings::get('support_default_priority'));
     $ticket['body'] = FSS_Input::GetString('body');
     $ticket['subject'] = FSS_Input::GetString('subject');
     $ticket['handler'] = FSS_Input::getInt('handler', 0);
     $this->ticket = $ticket;
     $errors['subject'] = '';
     $errors['body'] = '';
     $errors['cat'] = '';
     $errors['captcha'] = '';
     $this->errors = $errors;
     $prodid = FSS_Input::getInt('prodid');
     // prod id not set, should we display product list???
     if ($prodid < 1) {
         $this->products = $this->get('Products');
         if (count($this->products) > 1) {
             $this->search = "";
             $pagination = $this->get('ProdPagination');
             $this->pagination = $pagination;
             $this->limit = $this->get("ProdLimit");
             parent::display("product");
             return;
         } else {
             if (count($this->products) == 1) {
                 $prodid = $this->products[0]['id'];
                 JRequest::setVar('prodid', $prodid);
                 //echo "Setting prodid to $prodid<br>";
             }
         }
     }
     $this->assign('prodid', $prodid);
     $deptid = FSS_Input::getInt('deptid');
     // dept id not set, should we display department list?
     if ($deptid < 1) {
         $this->search = "";
         $this->depts = $this->get('Departments');
         $this->limit = $this->get("ProdLimit");
         if (count($this->depts) > 1) {
             $this->pagination = $this->get('DeptPagination');
             $this->product = $this->get('Product');
             parent::display("department");
             return;
         } else {
             if (count($this->depts) == 1) {
                 $deptid = $this->depts[0]['id'];
                 JRequest::setVar('deptid', $deptid);
                 //echo "Setting deptid to $deptid<br>";
             }
         }
     }
     $what = FSS_Input::getCmd('what');
     // done with ticket, try and save, if not, display any errors
     if ($what == "add") {
         if ($this->saveTicket()) {
             $message = FSS_Helper::HelpText("support_open_thanks", true);
             if ($message != "") {
                 FSS_Helper::enqueueMessage($message, "success");
             }
             //exit;
             if ($this->admin_create > 0) {
                 $link = 'index.php?option=com_fss&view=admin_support&Itemid=' . FSS_Input::getInt('Itemid', '') . '&ticketid=' . $this->ticketid;
                 $mainframe->redirect(FSSRoute::_($link, false));
             } else {
                 // need to set the session info that will display the ticket to the user here!
                 $link = 'index.php?option=com_fss&view=ticket&layout=view&Itemid=' . FSS_Input::getInt('Itemid', '') . '&ticketid=' . $this->ticketid;
                 $mainframe->redirect(FSSRoute::_($link, false));
             }
             return;
         } else {
             //echo "Error saving ticket<br>";
         }
     }
     // load handlers if required. This depends on what product and department have been selected
     if (FSS_Settings::get('support_choose_handler') != "none") {
         $allow_no_auto = 0;
         if ($this->admin_create > 0) {
             $allow_no_auto = 1;
             $this->autohandlers = SupportUsers::getHandlersTicket($prodid, $deptid, 0);
         }
         $handlers = SupportUsers::getHandlersTicket($prodid, $deptid, 0, $allow_no_auto);
         /**
          * I DONT KNOW IF THIS IS A GOOD CHANGE OR NOT, BUT IT MAKES IT CONSISTANT EVERYWHERE I THINK 
          **/
         // if the hide super users checkbox is tickets, hide them all from the dropdown
         if (FSS_Settings::get('support_hide_super_users')) {
             foreach ($handlers as $offset => $handler) {
                 $fssuser = SupportUsers::getUser($handler);
                 $juser = JFactory::getUser($handler);
                 if ($juser->get('isRoot') && $userid != $juser->id) {
                     unset($handlers[$offset]);
                 }
             }
         }
         if (count($handlers) == 0) {
             $handlers[] = 0;
         }
         $qry = "SELECT * FROM #__users WHERE id IN (" . implode(", ", $handlers) . ")";
         $db = JFactory::getDBO();
         $db->setQuery($qry);
         $handlers = $db->loadAssocList();
         $this->handlers = array();
         $h = array();
         $h['id'] = 0;
         $h['name'] = JText::_('AUTO_ASSIGN');
         $this->handlers[] = $h;
         if (is_array($handlers)) {
             foreach ($handlers as $handler) {
                 $this->handlers[] = $handler;
             }
         }
     }
     $this->assign('deptid', $deptid);
     $this->product = $this->get('Product');
     $this->dept = $this->get('Department');
     $this->cats = $this->get('Cats');
     $this->pris = $this->get('Priorities');
     $this->support_user_attach = FSS_Settings::get('support_user_attach');
     $this->fields = FSSCF::GetCustomFields(0, $prodid, $deptid);
     // load in captch and display if needed
     $this->sortCaptchaType();
     $captcha = new FSS_Captcha();
     $this->captcha = $captcha->GetCaptcha('support_captcha_type');
     parent::display();
 }
Exemple #5
0
    echo JText::_("YOU_MUST_BE_LOGGED_IN_TO_VIEW_A_SUPPORT_TICKET");
    ?>
</div>
<?php 
} elseif ($this->type == 2) {
    ?>
	<div class="alert alert-error"><?php 
    echo JText::_("UNABLE_TO_FIND_A_SUPPORT_TICKET_WITH_THE_PROVIDED_EMAIL_AND_PASSWORD");
    ?>
</div>
<?php 
}
?>

<?php 
FSS_Helper::HelpText("support_view_login_header");
?>

<?php 
if (FSS_Settings::get('support_no_logon') == 0) {
    ?>
	<?php 
    include $this->snippet(JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'ticket' . DS . 'snippet' . DS . '_login_form.php');
}
?>

<?php 
if (FSS_Settings::get('support_no_register') == 2) {
    ?>
	<?php 
    include $this->snippet(JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'ticket' . DS . 'snippet' . DS . '_register_form.php');
	
	<?php 
if (!FSS_Settings::get('support_next_prod_click')) {
    ?>
		<div><input class='btn btn-primary pickproduct' type='submit' value='<?php 
    echo JText::_("NEXT");
    ?>
' /></div>
	<?php 
}
?>

</form>

<?php 
FSS_Helper::HelpText("support_open_prod_footer");
?>

<script>

var productpicked = false;

function setCheckedValue(radioObj, newValue) {
	
	if(!radioObj)
		return;
	
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		productpicked = true;
    echo JText::_("NEXT");
    ?>
'>
		<?php 
}
?>
	</p>

	<input type=hidden name='prodid' id='prodid' value='<?php 
echo (int) $this->prodid;
?>
'>
</form>

<?php 
FSS_Helper::HelpText("support_open_dept_footer");
?>

<script>

var productpicked = false;

function setCheckedValue(radioObj, newValue) {
	if(!radioObj)
		return;
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		//alert(radioObj.checked);
		productpicked = true;
		return;
Exemple #8
0
$border_class = "table-bordered";
if ($this->border > 0) {
    $border_class = "table-borderless";
}
$style = "";
if ($this->template == "grid") {
    $style = 'text-align:center';
}
$this->centerTable($this->menus, array('cols' => $this->maincolums, 'table-class' => 'table ' . $border_class . ' table-condensed fss_mainmenu', 'table-width' => $this->mainwidth, 'td-attrs' => 'valign="top"', 'td-style' => $style, 'td-class' => '', 'tmpl' => JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'main' . DS . 'snippet' . DS . '_' . $this->template . '.php'));
?>

<?php 
// phone version
$this->centerTable($this->menus, array('cols' => 1, 'table-class' => 'table ' . $border_class . ' table-condensed fss_mainmenu_phone', 'table-width' => $this->mainwidth, 'td-attrs' => 'valign="top"', 'td-style' => '', 'td-class' => '', 'tmpl' => JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'main' . DS . 'snippet' . DS . '_phone.php'));
?>

<?php 
if ($this->showadmin && !$this->info_top) {
    ?>
	<?php 
    include $this->snippet(JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'main' . DS . 'snippet' . DS . 'supportinfo.php');
}
?>

<?php 
FSS_Helper::HelpText("menu_footer");
?>

<?php 
include JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . '_powered.php';
echo FSS_Helper::PageStyleEnd();
Exemple #9
0
    }
    ?>

			</td>
		</tr>

		<?php 
    $first = false;
    ?>
	<?php 
}
?>
</table>

<?php 
FSS_Helper::HelpText("support_user_view_mes_key");
?>

<?php 
if (!FSS_Settings::get('user_hide_key')) {
    ?>
	<p>
		<?php 
    echo JText::_('MESSAGE_KEY');
    ?>
		<span class="label label-warning"><?php 
    echo JText::_('MESSAGE_KEY_USER');
    ?>
</span>
		<span class="label label-success"><?php 
    echo JText::_('MESSAGE_KEY_HANDLER');
Exemple #10
0
    ?>
			<textarea name='body' id='body' class='sceditor' rows='<?php 
    echo (int) FSS_Settings::get('support_user_reply_height');
    ?>
' cols='<?php 
    echo (int) FSS_Settings::get('support_user_reply_width');
    ?>
' style='width:95%;height:<?php 
    echo (int) (FSS_Settings::get('support_user_reply_height') * 15 + 80);
    ?>
px'><?php 
    echo FSS_Helper::escape($this->ticket->body);
    ?>
</textarea>
			<?php 
    FSS_Helper::HelpText("support_open_main_message_after");
    ?>
		<?php 
}
?>
	</div>

	<?php 
if ($this->support_user_attach) {
    ?>
		<?php 
    echo FSS_Helper::PageSubTitle(JText::sprintf("UPLOAD_FILE", FSS_Helper::display_filesize(FSS_Helper::getMaximumFileUploadSize())), false);
    ?>
		<?php 
    include JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'tmpl' . DS . 'attach.php';
    ?>
Exemple #11
0
    echo JText::_("THIS_EMAIL_ADDRESS_IS_ALREADY_IN_USE_PLEASE_LOG_INTO_YOUR_ACCOUNT_BELOW");
    ?>
</div>
<?php 
} elseif ($this->type == 3) {
    ?>
	<div class="alert alert-error"><?php 
    echo JText::_("YOU_HAVE_ENTERED_AN_INVALID_EMAIL_ADDRESS_PLEASE_ENTER_A_VAILD_ONE");
    ?>
</div>
<?php 
}
?>

<?php 
FSS_Helper::HelpText("support_open_login_header");
?>

<?php 
if (FSS_Settings::get('support_no_logon') == 0) {
    ?>
	<?php 
    include $this->snippet(JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'ticket' . DS . 'snippet' . DS . '_login_form.php');
}
?>

<?php 
if (FSS_Settings::get('support_no_register') != 1) {
    ?>
	<?php 
    include $this->snippet(JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'views' . DS . 'ticket' . DS . 'snippet' . DS . '_register_form.php');
Exemple #12
0
        ?>
	
<?php 
    }
    ?>

</table>

	<?php 
    echo $this->pagination->getListFooter();
}
?>
</form>

<?php 
FSS_Helper::HelpText("support_user_list_after_footer");
?>

<?php 
include JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . '_powered.php';
echo FSS_Helper::PageStyleEnd();
?>
</div>
<script>

/*function highlightticket(ticketid)
{
	jQuery('.ticket_' + ticketid).each(function(){
		jQuery(this).attr('data-old_back',jQuery(this).css('background-color'));
		jQuery(this).css('background-color','<?php 
echo FSS_Settings::get('css_hl');