You should have received a copy of the GNU General Public License along with GLPI; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -------------------------------------------------------------------------- */ // ---------------------------------------------------------------------- // Original Author of file: // Purpose of file: // ---------------------------------------------------------------------- define('GLPI_ROOT', '..'); include GLPI_ROOT . "/inc/includes.php"; checkCentralAccess(); $task = new TicketTask(); if (isset($_POST["add"])) { $task->check(-1, 'w', $_POST); $task->add($_POST); Event::log($task->getField('tickets_id'), "ticket", 4, "tracking", $_SESSION["glpiname"] . " " . $LANG['log'][21]); glpi_header(getItemTypeFormURL('Ticket') . "?id=" . $task->getField('tickets_id')); } else { if (isset($_POST["delete"])) { $task->check($_POST['id'], 'd'); $task->delete($_POST); Event::log($task->getField('tickets_id'), "ticket", 4, "tracking", $_SESSION["glpiname"] . " " . $LANG['log'][21]); glpi_header(getItemTypeFormURL('Ticket') . "?id=" . $task->getField('tickets_id')); } else { if (isset($_POST["update"])) { $task->check($_POST["id"], 'w'); $task->update($_POST); Event::log($task->getField('tickets_id'), "ticket", 4, "tracking", $_SESSION["glpiname"] . " " . $LANG['log'][21]); glpi_header($_SERVER['HTTP_REFERER']);
include '../../../inc/includes.php'; Session::checkLoginUser(); //add followup if (isset($_REQUEST['ticketfollowup'])) { $fup = new TicketFollowup(); if (isset($_POST["add"])) { $fup->check(-1, 'w', $_POST); $fup->add($_POST); Event::log($fup->getField('tickets_id'), "ticket", 4, "tracking", sprintf(__('%s adds a followup'), $_SESSION["glpiname"])); } } //add task if (isset($_REQUEST['tickettask'])) { $ttask = new TicketTask(); if (isset($_POST["add"])) { $ttask->check(-1, 'w', $_POST); $ttask->add($_POST); Event::log($ttask->getField('tickets_id'), "ticket", 4, "tracking", sprintf(__('%s adds a task'), $_SESSION["glpiname"])); } } //add document if (isset($_REQUEST['filename']) && !empty($_REQUEST['filename'])) { $doc = new Document(); if (isset($_POST["add"])) { $doc->check(-1, 'w', $_POST); if ($newID = $doc->add($_POST)) { Event::log($newID, "documents", 4, "login", sprintf(__('%1$s adds the item %2$s'), $_SESSION["glpiname"], $doc->fields["name"])); } } } //change ticket status