Subversion Repositories web_pages

Rev

Blame | Last modification | View Log | Download | RSS feed

<?php
$config = json_decode(file_get_contents('config.json'), true);
// if we have success in the query string, display a success message
if (isset($_GET['success']) && $_GET['success'] == 1) {
    // Create a variable to hold the success message
    $success_message = "Your workstation request has been submitted successfully.";
}
else {
    // If no success, set the message to an empty string
    $success_message = "";
}
// if there is an error in the query string, display an error message
if (isset($_GET['error'])) {
    $error_message = "There was an error submitting your request. Please try again.";
} else {
    $error_message = "";
}

?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>MedCAD Workstation Build Out</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <form method="POST" action="send.php">
    <?php if (isset($success_message)): ?>
      <div class="success-message"><?= htmlspecialchars($success_message) ?></div>
    <?php endif; ?>
    <?php if (isset($_GET['error'])): ?>
      <div class="error-message">There was an error submitting your request. Please try again.</div>
    <?php endif; ?>

    <h2>MedCAD Workstation Build Out</h2>

    <label for="requestor">Requestor Name</label>
    <input type="text" name="requestor" required>

    <label for="requestor_email">Requestor Email</label>
    <input type="email" name="requestor_email" required>

    <label for="workstation">Workstation Name</label>
    <input type="text" name="workstation">

    <label for="username">User Name</label>
    <input type="text" name="username">

    <label for="remote_access">Remote Access</label>
    <select name="remote_access">
      <?php foreach ($config['remote_access'] as $option): ?>
        <option value="<?= htmlspecialchars($option) ?>"><?= htmlspecialchars($option) ?></option>
      <?php endforeach; ?>
    </select>

    <label>Software List</label>
    <?php foreach ($config['software'] as $software): ?>
      <input type="checkbox" name="software[]" value="<?= htmlspecialchars($software) ?>">
      <?= htmlspecialchars($software) ?><br>
    <?php endforeach; ?>

    <label for="notes">Notes</label>
    <textarea name="notes"></textarea>

    <button type="submit">Submit</button>
  </form>
</body>
</html>

Generated by GNU Enscript 1.6.5.90.