Exemple #1
0
    } else {
        if (!empty($_FILES['Attachment']['name'])) {
            $IDTicket = $ObjTicket->createUserTicket(getSessionProp('IDClient'), $IDCategory, $IDPriority, $StTitle, $TxMessage, $IDDepartment, $_FILES);
        } else {
            $IDTicket = $ObjTicket->createUserTicket(getSessionProp('IDClient'), $IDCategory, $IDPriority, $StTitle, $TxMessage, $IDDepartment);
        }
    }
    if (!empty($ArAttached)) {
        foreach ($ArAttached as $IDAttach) {
            if (!F1DeskUtils::isAttached($IDTicket, $IDAttach)) {
                $ObjTicket->attachTicket($IDTicket, $IDAttach);
            }
        }
    }
} elseif (!empty($_POST) && $_POST['StAction'] == 'addSupporters') {
    $ArSupporters = F1DeskUtils::getAllSupporters();
    if ($ArSupporters[0]['IDSupporter'] == 0) {
        array_shift($ArSupporters);
    }
}
/***************************************
 *           Create Data               *
****************************************/
if (F1DeskUtils::isSupporter()) {
    $BoCreate = F1DeskUtils::getPermission('BoCreateTicket', getSessionProp('IDSupporter'));
    if ($BoCreate) {
        $ArDepartments = F1DeskUtils::getPublicDepartments(false);
    } else {
        $ArDepartments = F1DeskUtils::getDepartmentsFormatted(getSessionProp('IDSupporter'));
    }
} else {