Example #1
0
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * @link 		http://www.easyscp.net
 * @author 		EasySCP Team
 */
require '../../include/easyscp-lib.php';
check_login(__FILE__);
$cfg = EasySCP_Registry::get('Config');
$tpl = EasySCP_TemplateEngine::getInstance();
$template = 'common/ticket_view.tpl';
// dynamic page data
$admin_id = $_SESSION['user_created_by'];
if (!hasTicketSystem($admin_id)) {
    user_goto('index.php');
}
if (isset($_GET['ticket_id'])) {
    $ticket_id = $_GET['ticket_id'];
    $user_id = $_SESSION['user_id'];
    $screenwidth = 1024;
    if (isset($_GET['screenwidth'])) {
        $screenwidth = $_GET['screenwidth'];
    } else {
        if (isset($_POST['screenwidth'])) {
            $screenwidth = $_POST['screenwidth'];
        }
    }
    if ($screenwidth < 639) {
        $screenwidth = 1024;
Example #2
0
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * @link 		http://www.easyscp.net
 * @author 		EasySCP Team
 */
require '../../include/easyscp-lib.php';
check_login(__FILE__);
$reseller_id = $_SESSION['user_created_by'];
if (!hasTicketSystem($reseller_id)) {
    user_goto('index.php');
}
$back_url = 'ticket_system.php';
$user_id = $_SESSION['user_id'];
if (isset($_GET['ticket_id']) && $_GET['ticket_id'] != '') {
    $ticket_id = $_GET['ticket_id'];
    $user_id = $_SESSION['user_id'];
    $query = "\n\t\tSELECT\n\t\t\t`ticket_status`\n\t\tFROM\n\t\t\t`tickets`\n\t\tWHERE\n\t\t\t`ticket_id` = ?\n\t\tAND\n\t\t\t(`ticket_from` = ? OR `ticket_to` = ?)\n\t;";
    $rs = exec_query($sql, $query, array($ticket_id, $user_id, $user_id));
    if ($rs->recordCount() == 0) {
        user_goto('ticket_system.php');
    }
    $back_url = getTicketStatus($ticket_id) == 0 ? 'ticket_closed.php' : 'ticket_system.php';
    deleteTicket($ticket_id);
    write_log(sprintf("%s: deletes support ticket %d", $_SESSION['user_logged'], $ticket_id));
Example #3
0
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * @link 		http://www.easyscp.net
 * @author 		EasySCP Team
 */
require '../../include/easyscp-lib.php';
check_login(__FILE__);
$cfg = EasySCP_Registry::get('Config');
$tpl = EasySCP_TemplateEngine::getInstance();
$template = 'common/ticket_closed.tpl';
// dynamic page data
if (!hasTicketSystem()) {
    user_goto('index.php');
}
if (isset($_GET['psi'])) {
    $start = $_GET['psi'];
} else {
    $start = 0;
}
generateTicketList($tpl, $_SESSION['user_id'], $start, $cfg->DOMAIN_ROWS_PER_PAGE, 'admin', 'closed');
// static page messages
$tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Client/Questions & Comments'), 'TR_SUPPORT_SYSTEM' => tr('Support system'), 'TR_SUPPORT_TICKETS' => tr('Support tickets'), 'TR_STATUS' => tr('Status'), 'TR_NEW' => ' ', 'TR_ACTION' => tr('Action'), 'TR_URGENCY' => tr('Priority'), 'TR_SUBJECT' => tr('Subject'), 'TR_LAST_DATA' => tr('Last reply'), 'TR_DELETE_ALL' => tr('Delete all'), 'TR_OPEN_TICKETS' => tr('Open tickets'), 'TR_CLOSED_TICKETS' => tr('Closed tickets'), 'TR_DELETE' => tr('Delete'), 'TR_TICKET_FROM' => tr('From'), 'TR_MESSAGE_DELETE' => tr('Are you sure you want to delete %s?', true, '%s'), 'TR_EDIT' => tr('Edit')));
gen_admin_mainmenu($tpl, 'admin/main_menu_ticket_system.tpl');
gen_admin_menu($tpl, 'admin/menu_ticket_system.tpl');
gen_page_message($tpl);
if ($cfg->DUMP_GUI_DEBUG) {
    dump_gui_debug($tpl);
Example #4
0
 * i-MSCP - internet Multi Server Control Panel. All Rights Reserved.
 */
/************************************************************************************
 * Main script
 */
// Include core library
require_once 'imscp-lib.php';
require_once LIBRARY_PATH . '/Functions/Tickets.php';
iMSCP_Events_Aggregator::getInstance()->dispatch(iMSCP_Events::onResellerScriptStart);
check_login('reseller');
resellerHasFeature('support') or showBadRequestErrorPage();
/** @var $cfg iMSCP_Config_Handler_File */
$cfg = iMSCP_Registry::get('config');
$userId = $_SESSION['user_id'];
// Checks if support ticket system is activated and if the reseller can access to it
if (!hasTicketSystem($userId)) {
    redirectTo('index.php');
} elseif (isset($_GET['ticket_id']) && !empty($_GET['ticket_id'])) {
    reopenTicket((int) $_GET['ticket_id']);
}
if (isset($_GET['psi'])) {
    $start = $_GET['psi'];
} else {
    $start = 0;
}
$tpl = new iMSCP_pTemplate();
$tpl->define_dynamic(array('layout' => 'shared/layouts/ui.tpl', 'page' => 'reseller/ticket_closed.tpl', 'page_message' => 'layout', 'tickets_list' => 'page', 'tickets_item' => 'tickets_list', 'scroll_prev_gray' => 'page', 'scroll_prev' => 'page', 'scroll_next_gray' => 'page', 'scroll_next' => 'page'));
$tpl->assign(array('TR_PAGE_TITLE' => tr('Reseller / Support / Closed Tickets'), 'TR_TICKET_STATUS' => tr('Status'), 'TR_TICKET_FROM' => tr('From'), 'TR_TICKET_SUBJECT' => tr('Subject'), 'TR_TICKET_URGENCY' => tr('Priority'), 'TR_TICKET_LAST_ANSWER_DATE' => tr('Last reply date'), 'TR_TICKET_ACTION' => tr('Actions'), 'TR_TICKET_DELETE' => tr('Delete'), 'TR_TICKET_READ_LINK' => tr('Read ticket'), 'TR_TICKET_DELETE_LINK' => tr('Delete ticket'), 'TR_TICKET_REOPEN' => tr('Reopen'), 'TR_TICKET_REOPEN_LINK' => tr('Reopen ticket'), 'TR_TICKET_DELETE_ALL' => tr('Delete all tickets'), 'TR_TICKETS_DELETE_MESSAGE' => tr("Are you sure you want to delete the '%s' ticket?", '%s'), 'TR_TICKETS_DELETE_ALL_MESSAGE' => tr('Are you sure you want to delete all closed tickets?'), 'TR_PREVIOUS' => tr('Previous'), 'TR_NEXT' => tr('Next')));
generateNavigation($tpl);
generateTicketList($tpl, $userId, $start, $cfg->DOMAIN_ROWS_PER_PAGE, 'reseller', 'closed');
generatePageMessage($tpl);