<?php /********************************************************************************* ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 * ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. * ********************************************************************************/ global $client; global $result; if (requestValidateWriteAccess()) { $ticket = array('title' => 'title', 'productid' => 'productid', 'description' => 'description', 'priority' => 'priority', 'category' => 'category', 'owner' => 'owner', 'module' => 'module'); foreach ($ticket as $key => $val) { $ticket[$key] = $_REQUEST[$key]; } $ticket['owner'] = $username; $ticket['productid'] = $ticket['productid']; $title = $_REQUEST['title']; $description = $_REQUEST['description']; $priority = $_REQUEST['priority']; $severity = $_REQUEST['severity']; $category = $_REQUEST['category']; $parent_id = $_SESSION['customer_id']; $productid = $_REQUEST['productid']; $module = $_REQUEST['ticket_module']; $customerid = $_SESSION['customer_id']; $sessionid = $_SESSION['customer_sessionid']; $serviceid = $_REQUEST['servicename'];
* ********************************************************************************/ session_start(); require_once 'csrf-protect.php'; $errormsg = ''; require_once "PortalConfig.php"; if (!isset($_SESSION['customer_id']) || $_SESSION['customer_id'] == '') { @header("Location: {$Authenticate_Path}/login.php"); exit; } require_once "include/utils/utils.php"; $default_language = getPortalCurrentLanguage(); require_once "language/" . $default_language . ".lang.php"; global $default_charset; header('Content-Type: text/html; charset=' . $default_charset); if ($_REQUEST['fun'] != '' && $_REQUEST['fun'] == 'savepassword' && requestValidateWriteAccess()) { include "include.php"; require_once "HelpDesk/Utils.php"; include "version.php"; global $version; $errormsg = SavePassword($version); } if ($_REQUEST['last_login'] != '') { $last_login = portal_purify(stripslashes($_REQUEST['last_login'])); $_SESSION['last_login'] = $last_login; } elseif ($_SESSION['last_login'] != '') { $last_login = $_SESSION['last_login']; } if ($_REQUEST['support_start_date'] != '') { $_SESSION['support_start_date'] = $support_start_date = portal_purify(stripslashes($_REQUEST['support_start_date'])); } elseif ($_SESSION['support_start_date'] != '') {
$match_condition = isset($_REQUEST['search_match']) ? $_REQUEST['search_match'] : ''; $where = getTicketSearchQuery(); $params = array(array('id' => "{$customerid}", 'sessionid' => "{$sessionid}", 'user_name' => "{$username}", 'onlymine' => $onlymine, 'where' => "{$where}", 'match' => "{$match_condition}")); $result = $client->call('get_tickets_list', $params, $Server_Path, $Server_Path); include "TicketsList.php"; } elseif ($_REQUEST['fun'] == 'newticket') { include "NewTicket.php"; } elseif ($_REQUEST['fun'] == 'updatecomment' || $_REQUEST['fun'] == 'close_ticket' || $_REQUEST['fun'] == 'uploadfile') { if ($_REQUEST['fun'] == 'updatecomment' && requestValidateWriteAccess()) { UpdateComment(); } if ($_REQUEST['fun'] == 'close_ticket' && requestValidateWriteAccess()) { $ticketid = $_REQUEST['ticketid']; $res = Close_Ticket($ticketid); } if ($_REQUEST['fun'] == 'uploadfile' && requestValidateWriteAccess()) { $upload_status = AddAttachment(); if ($upload_status != '') { echo $upload_status; exit(0); } } ?> <script> var ticketid = <?php echo Zend_Json::encode($_REQUEST['ticketid']); ?> ; window.location.href = "index.php?module=HelpDesk&action=index&fun=detail&ticketid="+ticketid </script> <?php