prepare($query); if($sth) { $res = $sth->execute(); $numRows = $sth->rows(); } if($numRows != 1) { commonHeader("IRM Tracking - Bad IRM ID Number"); PRINT "It appears that you have entered an invalid IRM server ID\n"; commonFooter(); exit(); } } commonHeader("IRM Tracking - Added"); $opendate = date("Y-m-d H:i:s"); if($cfg_userupdates == 1) { $emailupdates = "yes"; } else { $emailupdates = "no"; } if($status == "old" || $status == "complete") { $closedate = date("Y-m-d H:i:s"); $emailupdates = "no"; } if($IDTYPE == "IRMID") { $is_group = "no"; } else if($IDTYPE == "GROUP") { $is_group = "yes"; $ID = $gID; } //$contents = "By: $ufname ($uemail)\n" . $contents; $track = new Tracking(); $track->setDateEntered($opendate); $track->setCloseDate($closedate); $track->setStatus($status); $track->setAuthor($IRMName); $auth = $track->getAuthor(); $track->setAssign($user); $track->setComputerID($ID); $track->setWorkRequest($contents); $track->setPriority($priority); $track->setIsGroup($is_group); $track->setAuthorEmail($uemail); $track->setEmailUpdatesToAuthor($emailupdates); if($solution != "") { $follow = new Followup(); $follow->setDateEntered($opendate); $follow->setAuthor($IRMName); $follow->setFollowupInfo($solution); $track->addFollowup(&$follow); } $track->add(); $trackingID = $track->getID(); logevent($ID, "servers", 4, "tracking", "New tracking job opened"); PRINT "That tracking job has been placed into the database.\n"; commonFooter(); ?>