<?php

session_start();

if (!isset($_SESSION['email'])) {
  echo ("<script>location.href = 'login.php';</script>");
}
?>



<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" href="assects/css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="assects/css/font-awesome.min.css">
  <link rel="stylesheet" href="assects/css/font-awesome-animation.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="assects/css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
  folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="assects/css/_all-skins.min.css">
  <!-- DataTables -->
  <link rel="stylesheet" href="assects/css/dataTables.bootstrap.min.css">
  <script src="https://use.fontawesome.com/2aec379aeb.js"></script>

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->

  <!-- Google Font -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>

<body class="hold-transition skin-purple sidebar-mini">
  <div class="wrapper">

    <title>Admin Panel | Courier Cargo</title>
    <header class="main-header">
      <!-- Logo -->
      <a href="index.php" class="logo">
        <!-- mini logo for sidebar mini 50x50 pixels -->
        <span class="logo-mini"><b>Admin</b></span>
        <!-- logo for regular state and mobile devices -->
        <span class="logo-lg"><b>Admin</b> Panel</span>
      </a>
      <!-- Header Navbar: style can be found in header.less -->
      <nav class="navbar navbar-static-top">
        <!-- Sidebar toggle button-->
        <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
          <span class="sr-only">Toggle navigation</span>
        </a>

        <div class="navbar-custom-menu">
          <ul class="nav navbar-nav">
            <li class="dropdown user user-menu">
              <a><span class="hidden-xs">Welcome Admin</span></a>
            </li>
          </ul>
        </div>
      </nav>
    </header>
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">
      <!-- sidebar: style can be found in sidebar.less -->
      <section class="sidebar">

        <ul class="sidebar-menu" data-widget="tree">
          <li><a href="index.php"><i class="fa fa-dashboard"></i> <span>Dashboard</span></a></li>
          <li class="treeview active">
            <a href="#">
              <i class="fa fa-truck"></i> <span>Shipment</span>
              <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
            </a>
            <ul class="treeview-menu">
              <li><a href="new.php"><i class="fa fa-angle-double-right"></i> Add Shipment</a></li>
              <li class='active'><a href="index.php"><i class="fa fa-angle-double-right"></i> List of Pending Shipment</a></li>
            </ul>
          </li>

          <li><a href="logout.php"><i class="fa fa-sign-out"></i> <span>Logout</span></a></li>
        </ul>
      </section>
      <!-- /.sidebar -->
    </aside>

    <link rel="stylesheet" href="assects/css/bootstrap-timepicker.min.css">
    <link href="assects/css/jquery-ui.min.css" rel="stylesheet" type="text/css" />
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <!-- Content Header (Page header) -->
      <section class="content-header">
        <h1>
          Shipment
          <small>Add Shipment</small>
        </h1>
        <ol class="breadcrumb">
          <li><a href="index.php"><i class="fa fa-dashboard"></i> Home</a></li>
          <li class="active">Shipment - Add Shipment</li>
        </ol>
      </section>

      <!-- Main content -->
      <section class="content">
        <!-- Small boxes (Stat box) -->
        <div class="row">

          <div class="col-md-12">
            <form name="addshipment" id="addshipment" method="post" action="process.php" enctype="multipart/form-data">
              <div class="box">
                <div class="box-header">
                  <h3 class="box-title">Add Shipment</h3>
                </div>


                <!-- /.box-header -->
                <div class="box-body">
                  <div class="col-md-12">

                    <?php

                    if (isset($_SESSION['msg-s'])) { ?>
                      <div class="alert alert-success alert-dismissible">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                        <h4><i class="icon fa fa-check"></i> Success!</h4> <?php echo $_SESSION['msg-s']; ?>
                      </div>
                    <?php unset($_SESSION['msg-s']);
                    } ?>

                    <?php if (isset($_SESSION['msg-e'])) { ?>
                      <div class="alert alert-danger alert-dismissible">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                        <h4><i class="icon fa fa-check"></i> Error!</h4> <?php echo $_SESSION['msg-e']; ?>

                      </div>
                    <?php unset($_SESSION['msg-e']);
                    } ?>


                    <div class="col-md-6">
                      <h3 class="box-title">Shipper info :</h3>
                      <div class="form-group">

                      </div>
                      <div class="form-group">
                        <label for="shippername">Shipper Name<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Enter Shipper Name" name="shippername" id="shippername" maxlength="35" required="required">
                      </div>
                      <div class="form-group">
                        <label for="phone">Phone</label>
                        <input type="text" class="form-control" placeholder="Enter Phone Number" name="shipperphone" id="shipperphone" maxlength="30">
                      </div>
                      <div class="form-group">
                        <label for="shipperaddress">Address<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Address Line 1" name="shipperaddress1" id="shipperaddress1">
                      </div>
                      <div class="form-group">
                        <label for="email">Email</label>
                        <input type="email" class="form-control" placeholder="Enter Email Address" name="shipperemail" id="shipperemail" maxlength="55">
                      </div>
                    </div>

                    <div class="col-md-6">
                      <h3 class="box-title">Receiver info :</h3>
                      <div class="form-group">

                      </div>
                      <div class="form-group">
                        <label for="name">Name<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Enter Name" name="receivername" id="receivername" maxlength="35" required="required">
                      </div>
                      <div class="form-group">
                        <label for="phone">Phone</label>
                        <input type="text" class="form-control" placeholder="Enter Phone Number" name="receiverphone" id="receiverphone" maxlength="35">
                      </div>
                      <div class="form-group">
                        <label for="receiveraddress">Address<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Address Line 1" name="receiveraddress1" id="receiveraddress1">
                      </div>
                      <div class="form-group">
                        <label for="email">Email</label>
                        <input type="email" class="form-control" placeholder="Enter Email Address" name="receiveremail" id="receiveremail" maxlength="55">
                      </div>
                    </div>
                  </div>

                  <div class="col-md-12">
                    <h3 class="box-title">Shipment info :</h3>
                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="consignmentnumber">Consignment No<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Enter Consignment No" name="consignmentnumber" id="consignmentnumber" maxlength="50" required="required">
                      </div>
                    </div>
                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="origin">Origin<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Origin/Departure" name="origin" id="carno"  required>
                      </div>
                    </div>
                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="destination">Destination<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Destination" name="destination" id="carno" required>
                      </div>
                    </div>
                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="destination">Delivery Mode<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Enter mode of delivery" name="delivery_mode" id="delivery_mode"  required>
                      </div>
                    </div>
                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="destination">Service Type<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Service Type" name="service_type" id="service_type"  required>
                      </div>
                    </div>

                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="destination">Bill Of Lading<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Bill Of Lading" name="bol" id="bol"  required>
                      </div>
                    </div>
                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="destination">Item<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Item" name="item" id="item"  required>
                      </div>
                    </div>
                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="destination">Quantity<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Quantity" name="qty" id="qty"  required>
                      </div>
                    </div>
                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="destination">Weight<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Weight" name="weight" id="weight"  required>
                      </div>
                    </div>
                    
                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="destination">Status</label>
                        <select name="status" id="status" class="form-control">
                          <option value="In Transit" selected>In Transit</option>
                          <option value="Pending">Pending</option>
                          <option value="Delivered">Delivered</option>
                          <option value="Delayed">Delayed</option>
                          <option value="On Hold">On Hold</option>
                          <option value="Landing">Landing</option>
                          <option value="Clearance">Clearance </option>
                          <option value="In  Sorting">In Sorting</option>
                          <option value="In  Process">In Process</option>
                          <option value="In  Progress">In Progress</option>
                          <option value="Arrived">Arrived</option>
                          <option value="Shipment Pickup">Shipment Pickup</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="exptdeliverydate">Expected Delivery date<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Enter Expected Delivery date" name="exptdeliverydate" id="exptdeliverydate" m required>
                      </div>
                    </div>

                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="payment_mode">Payment Mode<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Enter Expected Delivery date" name="payment_mode" id="payment_mode"  required>
                      </div>
                    </div>
                     
                     <div class="col-md-6">
                      <div class="form-group">
                        <label for="payment_mode">Type of Shipment<span class="text-red">*</span></label>
                        <input type="text" class="form-control" placeholder="Enter Shipment Type(Parcel)" name="shipment_type" id="shipment_type"  required>
                      </div>
                    </div>
                    
                    

                    
                    <div class="col-md-6">
                      <div class="form-group">
                        <label for="destination">Total Charge</label>
                        <input type="text" class="form-control" placeholder="Total Charge" name="total" id="total" required>
                      </div>
                    </div>
                    
                    
                  <!--  <div class="col-md-6">
                      <div class="form-group">
                        <label for="exptdeliverydate">Parcel Image<span class="text-red">*</span></label>
                        <input type="file" class="form-control"  name="image"   required>
                      </div>
                    </div> -->
                    
                    
                  </div>
                  <input type="hidden" name="add" id="add" value="Add">
                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                  <button type="submit" name="new" class="btn btn-primary pull-right">Add New</button>
                </div>
              </div>
            </form>
          </div>

        </div>
        <!-- /.row -->

      </section>
      <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
    <footer class="main-footer">
      <strong>Copyright &copy; 2022.</strong> All rights reserved.
    </footer>
  </div>
  <!-- ./wrapper -->

  <!-- jQuery 3 -->
  <script src="assects/js/jquery.min.js"></script>
  <!-- jQuery UI 1.11.4 -->
  <script src="assects/js/jquery-ui.min.js"></script>
  <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <!-- Bootstrap 3.3.7 -->
  <script src="assects/js/bootstrap.min.js"></script>
  <!-- DataTables -->
  <script src="assects/js/jquery.dataTables.min.js"></script>
  <script src="assects/js/dataTables.bootstrap.min.js"></script>
  <!-- AdminLTE App -->
  <script src="assects/js/adminlte.min.js"></script>
  <!-- AdminLTE for demo purposes -->
  <script src="assects/js/demo.js"></script>
</body>

</html>
<script src="assects/js/bootstrap-timepicker.min.js"></script>

<script src="assects/js/jquery.validate.min.js"></script>