<?php
session_start();
$activePage = 'CaptivePortal'; 
$activeSubPage='Configuration';
include("../elements/master.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../css/style.css" type="text/css">
    <link rel="stylesheet" href="../css/create_user.css" type="text/css">
    <title>Captive Portal</title>
</head>
<body>

<div class="user_container">
<maincontent>
<div class="usertable">


  <h3>Captive Portal</h3>
  <div class="userdetails">
  <form action="#" class="form" id="createUserForm" method="POST">
    <div>
      <div class="col-10">
        <label>PID</label>
      </div>
      <div class="col-40">
        <input type="text" name="pid" placeholder="Enter Your Pid" required />
      </div>
     
      <div class="col-10">
        <label>E-MAIL</label>
      </div>
      <div class="col-40">
        <input type="text" name="email" placeholder="Enter your Email" />
      </div>
      
    </div>

    <div>
    <div class="col-10">
        <label>FIRST NAME</label>
      </div>
      <div class="col-40">
        <input type="text" name="firstname" placeholder="Enter Your First Name" required />
      </div>

    </div>

    <div>

    <div class="col-10">
        <label>LAST NAME</label>
      </div>
      <div class="col-40">
        <input type="text" name="lastname" placeholder="Enter Your Last Name" required />
      </div>
      <div class="col-10">
        <label>DESIGNATION</label>
      </div>
      <div class="col-40">
        <input type="text" name="designation" placeholder="Enter Designation" />
      </div>
    </div>

    <div>
    <div class="col-10">
        <label>VALID FROM</label>
      </div>
      <div class="col-40">
        <input type="datetime-local" id="validFrom" name="valid_from" required />
      </div>
      <!------------------------------------CALENDAR FUNCTION----------------------------------------->
      <div class="col-10 hidden">
        <label>cust_field4</label>
      </div>
      <div class="col-40 hidden">
        <input type="text" name="cust_field4" placeholder="Enter cust_field4" />
      </div>
    </div>

      <div>
      <div class="col-10">
        <label>EXPIRATION</label>
      </div>
      <div class="col-40">
        <input type="datetime-local" name="expire" required />
      </div>
    </div>

      <!------------------------------------CALENDAR FUNCTION ENDS----------------------------------------->

    <!------------- HIDDEN FIELDS------------------------>
    <div>
      <div class="col-10 hidden">
        <label>cust_field3</label>
      </div>
      <div class="col-40 hidden">
        <input type="text" name="cust_field3" placeholder="Enter cust_field3" />
      </div>


      
      <div class="col-10">
          <label for="role">ROLE</label>
        </div>
        <div class="col-40">
          <select name="role" id="role">
            <option>-----------</option>
            <?php foreach ($user_list as $role): ?>
            <option value= <?php echo $role['category_id']; ?> >    <?php echo htmlspecialchars($role['name']); ?>  </option>
            <?php endforeach; ?>
          </select>
        </div>
      </div>
      




<!---------------------------      DYNAMIC DROPDOWN ENDS                 -------------------->
    <?php echo  $_SESSION['message']?>

    <div class="submit">
      <div class="col-10-submit">
        <input type="submit" name="submit" id="submit2" value="submit" />
      </div>
    </div>
 </form>
</div>
</div>
    </maincontent>
</div>


</body>
</html>
