Exemplo n.º 1
0
function Attachments()
{
    global $CFG;
    // What are they wanting to do?
    switch ($_REQUEST['action']) {
        case 'add':
            AddAttachment();
        case 'remove':
            RemoveAttachment();
        case 'edit':
            EditAttachment();
    }
    // Are they coming for the first time or submitting information?
    if (isset($_REQUEST['submit'])) {
        // Submitting information, so store it.
        $aOptions['maxsize'] = (int) $_REQUEST['maxsize'];
        // Validate the information, and submit it to the database if everything's okay.
        UpdateAttachments($aOptions);
    } else {
        // Coming for the first time, so set the defaults.
        $aOptions['maxsize'] = $CFG['uploads']['maxsize'];
    }
    // Template
    require "./skins/{$CFG['skin']}/admincp/attachments.tpl.php";
    // Send the page.
    exit;
}
Exemplo n.º 2
0
    $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') {
        UpdateComment();
    }
    if ($_REQUEST['fun'] == 'close_ticket') {
        $ticketid = $_REQUEST['ticketid'];
        $res = Close_Ticket($ticketid);
    }
    if ($_REQUEST['fun'] == 'uploadfile') {
        $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 
} elseif ($_REQUEST['fun'] == 'detail') {