function UpdateRequest() { global $dbh; $this->MakeSafe(); $old = new RackRequest(); $old->RequestID = $this->RequestID; $old->GetRequest(); $sql = "UPDATE fac_RackRequest SET RequestTime=now(), RequestorID={$this->RequestorID},\r\n\t\tLabel=\"{$this->Label}\", SerialNo=\"{$this->SerialNo}\", MfgDate=\"{$this->MfgDate}\", \r\n\t\tAssetTag=\"{$this->AssetTag}\", ESX={$this->ESX}, Owner={$this->Owner}, \r\n\t\tDeviceHeight=\"{$this->DeviceHeight}\", EthernetCount={$this->EthernetCount}, \r\n\t\tVLANList=\"{$this->VLANList}\", SANCount={$this->SANCount}, SANList=\"{$this->SANList}\",\r\n\t\tDeviceClass=\"{$this->DeviceClass}\", DeviceType=\"{$this->DeviceType}\",\r\n\t\tLabelColor=\"{$this->LabelColor}\", CurrentLocation=\"{$this->CurrentLocation}\",\r\n\t\tSpecialInstructions=\"{$this->SpecialInstructions}\"\r\n\t\tWHERE RequestID={$this->RequestID};"; if ($dbh->query($sql)) { class_exists('LogActions') ? LogActions::LogThis($this, $old) : ''; $this->MakeDisplay(); return true; } else { return false; } }
header('Location: ' . redirect()); exit; } $Dept = new Department(); $cab = new Cabinet(); $dev = new Device(); $req = new RackRequest(); $contact = new People(); $tmpContact = new People(); $formfix = $error = ''; $contactList = $person->GetUserList(); //We only need to worry about sending email in the event this is a new submission and no other time. if (isset($_POST["action"])) { if (isset($_REQUEST['requestid']) && $_REQUEST['requestid'] > 0) { $req->RequestID = $_REQUEST['requestid']; $req->GetRequest(); $contact->PersonID = $req->RequestorID; $contact->GetPerson(); } $tmpContact->PersonID = $_POST["requestorid"]; $tmpContact->GetPerson(); // If any port other than 25 is specified, assume encryption and authentication if ($config->ParameterArray['SMTPPort'] != 25) { $transport = Swift_SmtpTransport::newInstance()->setHost($config->ParameterArray['SMTPServer'])->setPort($config->ParameterArray['SMTPPort'])->setEncryption('ssl')->setUsername($config->ParameterArray['SMTPUser'])->setPassword($config->ParameterArray['SMTPPassword']); } else { $transport = Swift_SmtpTransport::newInstance()->setHost($config->ParameterArray['SMTPServer'])->setPort($config->ParameterArray['SMTPPort']); } $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::NewInstance()->setSubject($config->ParameterArray['MailSubject']); // Set from address try {