<?php /*** * fadd.php - followup add * * Created by Scott Sakai (ssakai@sdsc.edu) * * March 2008 ***/ require_once "irtauth.php"; require_once "irtdb.php"; // connect to the database $irtdb = new irtdb(); // get incident detail $i = $irtdb->getIncident($_REQUEST['i']); // no detail? someone is messing with us. if (empty($i)) { die("Bad incident id"); } // process form info, if any $errors = ''; $n = array(); if (isset($_POST['submit'])) { // type (manditory) if (!isset($_POST['type']) || trim($_POST['type']) == '') { $errors .= "\"Type of follow-up\" is a manditory field<br>"; } else { $n['type'] = trim($_POST['type']); } // body (manditory) if (!isset($_POST['body']) || trim($_POST['body']) == '') {
<?php /*** * idetail.php - incident detail * * Created by Scott Sakai (ssakai@sdsc.edu) * * March 2008 ***/ require_once "irtauth.php"; require_once "irtdb.php"; // connect to the database $irtdb = new irtdb(); // get incident detail $i = $irtdb->getIncident($_REQUEST['i']); // process form info, if any $errors = ''; $n = array(); if (isset($_POST['submit'])) { // type (manditory) if (!isset($_POST['type']) || trim($_POST['type']) == '') { $errors .= "\"Type of follow-up\" is a manditory field<br>"; } else { $n['type'] = trim($_POST['type']); } // body (manditory) if (!isset($_POST['body']) || trim($_POST['body']) == '') { $errors .= "\"Body\" is a manditory field<br>"; } else { $n['body'] = trim($_POST['body']); }
<?php /*** * ilist.php - list incidents * * Created by Scott Sakai (ssakai@sdsc.edu) * * March 2008 ***/ require_once "irtauth.php"; require_once "irtdb.php"; // connect to the database $irtdb = new irtdb(); // get a list of incidents $ilist = $irtdb->listIncidents(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>IR Tracker Prototype - Incident List</title> <style type="text/css"> .odd{ background-color: #f0f0f0; color: black; } .even{ background-color: #ffffff; color: black; } table.ilist{
<?php /*** * iadd.php - add incident * * Created by Scott Sakai (ssakai@sdsc.edu) * * March 2008 ***/ require_once "irtauth.php"; require_once "irtdb.php"; // connect to the database $irtdb = new irtdb(); // check form data $i = array(); // incident $h = array(); // hotlist $s = array(); // status $errors = ''; if (isset($_POST['submit'])) { // name (manditory) if (!isset($_POST['name']) || trim($_POST['name']) == '') { $errors .= "\"Name\" is a manditory field<br>"; } else { $i['name'] = trim($_POST['name']); } // description (manditory) if (!isset($_POST['description']) || trim($_POST['description']) == '') { $errors .= "\"Description\" is a manditory field<br>";