예제 #1
0
        $req->SerialNo = $_POST['serialno'];
        $req->MfgDate = $_POST['mfgdate'];
        $req->AssetTag = $_POST['assettag'];
        $req->ESX = $_POST['esx'];
        $req->Owner = $_POST['owner'];
        $req->DeviceHeight = $_POST['deviceheight'];
        $req->EthernetCount = $_POST['ethernetcount'];
        $req->VLANList = $_POST['vlanlist'];
        $req->SANCount = $_POST['sancount'];
        $req->SANList = $_POST['sanlist'];
        $req->DeviceClass = $_POST['deviceclass'];
        $req->DeviceType = $_POST['devicetype'];
        $req->LabelColor = $_POST['labelcolor'];
        $req->CurrentLocation = $_POST['currentlocation'];
        $req->SpecialInstructions = $_POST['specialinstructions'];
        $req->CreateRequest();
        $htmlMessage .= "<p>" . sprintf(__('Your request for racking up the device labeled %1$s has been received.
			The Network Operations Center will examine the request and contact you if more information is needed
			before the request can be processed.  You will receive a notice when this request has been completed.
			Please allow up to 2 business days for requests to be completed.'), $req->Label) . "</p>\n\n\t\t\t<p>" . sprintf(__('Your Request ID is %1$d and you may view the request online at'), $req->RequestID) . "\n\t\t\t<a href=\"https://{$_SERVER['SERVER_NAME']}{$_SERVER['PHP_SELF']}?requestid={$req->RequestID}\">\n\t\t\t" . __("this link") . "</a>.</p>\n\t\t\t\n\t\t\t</body></html>";
        $message->setBody($htmlMessage, 'text/html');
        try {
            $result = $mailer->send($message);
        } catch (Swift_RfcComplianceException $e) {
            $error .= "Send: " . $e->getMessage() . "<br>\n";
        } catch (Swift_TransportException $e) {
            $error .= "Server: <span class=\"errmsg\">" . $e->getMessage() . "</span><br>\n";
        }
    } elseif (($_POST['action'] == 'Update Request' || $_POST['action'] == 'Move to Rack') && ($person->RackRequest && $person->UserID == $contact->UserID || $person->RackAdmin)) {
        $req->RequestorID = $_POST['requestorid'];
        $req->Label = $_POST['label'];