<?php
include("../connection.php");
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $user_id = mysqli_real_escape_string($conn, $_POST['user_id']);
    $full_name = mysqli_real_escape_string($conn, $_POST['full_name']);
    $rank = mysqli_real_escape_string($conn, $_POST['rank']);
    $leave_type = mysqli_real_escape_string($conn, $_POST['leave_type']);
    $start_date = $_POST['start_date'];
    $end_date = $_POST['end_date'];
    $reason = mysqli_real_escape_string($conn, $_POST['reason']);

    $stmt = $conn->prepare("INSERT INTO military_leave_applications (user_id, full_name, rank, leave_type, start_date, end_date, reason)
                            VALUES (?, ?, ?, ?, ?, ?, ?)");
    $stmt->bind_param("sssssss", $user_id, $full_name, $rank, $leave_type, $start_date, $end_date, $reason);

    if ($stmt->execute()) {
        $success = true;
    } else {
        $error = "Error submitting application: " . $stmt->error;
    }
}
?>
<!DOCTYPE html>
<html lang="en">



<!-- Mirrored from online.vacationdepartment.online/leave by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 06 Mar 2024 12:19:35 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<head>
    <meta charset="UTF-8">
    <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
    <meta name="apple-itunes-app" content="app-id=342689843">
    <meta property="og:title" content="The Official Home Page of the United States Army" />
<meta property="og:type" content="website" />
<meta property="og:description" content="The latest news, images, videos, career information, and links from the U.S. Army." />
<meta property="og:image" content="api.army.mil/e2/c/images/2017/06/08/480974/size1.html" />
<meta property="og:twitter:card" content="summary_large_image" />
<meta property="og:twitter:site" content="@USArmy" />
<meta property="og:twitter:title" content="The Official Home Page of the United States Army" />
<meta property="og:twitter:description" content="The latest news, images, videos, career information, and links from the U.S. Army." />
<meta property="og:twitter:image" content="api.army.mil/e2/c/images/2017/06/08/480974/size1.html" />
<meta property="og:site_name" content="https://www.armywlf.com/" />
<meta property="og:url" content="https://www.armywlf.com/" />

    <title>The Official Home Page of the United States Army</title>
    <meta name="description" content="The latest news, images, videos, career information, and links from the U.S. Army">
    <meta name="keywords" content="united states army, army, us army, usarmy, army.mil, army news, army home page, army public affairs">
    <meta name="google-site-verification" content="B37UIocMPk5H2dDE3VKm-NOPvTJaLErF-mFsdEzQN0g" />
    <link rel="canonical" href="https://www.army.mil/">
    <link rel="stylesheet" href="style.css" >
    <link rel="apple-touch-icon" href="e2/images/rv7/army_star_icon_60.png">
    <link rel="apple-touch-icon" sizes="76x76" href="e2/images/rv7/army_star_icon_76.png">
    <link rel="apple-touch-icon" sizes="120x120" href="e2/images/rv7/army_star_icon_120.png">
    <link rel="apple-touch-icon" sizes="152x152" href="e2/images/rv7/army_star_icon_152.png">
    <link href="css/organization.css" rel="stylesheet">
    <link rel="canonical" href="https://www.army.mil/news">
    <link href="https://www.army.mil/leaders/sa/" rel="canonical">
    <link rel="stylesheet" href="css/news.css"  >
    <link rel="stylesheet" href="css/stand.css" >
    <link rel="stylesheet" href="css/leave.css">
    <link href="css/leadstyle.css" rel="stylesheet">

</head>
<body>
    <!--[if lt IE 9]>
<div class="oldie-warning">
    <p class="warning">!</p>
      <p>Your version of Internet Explorer is out of date. It has known security flaws and can cause issues displaying content on this page, and other websites.</p>
      <p><a href="/upgrade" title="Learn how to update your browser">Learn how to update your browser</a></p>
</div>
<![endif]-->
<header>
  <div class="navbar">
    <div class="navbar-container">
      <a aria-expanded="false" class="nav-button menu-button" href="javascript:;" role="button"><span>MENU</span></a> <a class="nav-army-star" href="index-2.html"><span>HOME</span></a> <a aria-expanded="false" class="nav-button search-button" href="javascript:;" role="button"><span>SEARCH</span></a>
    </div>
  </div>


  <div class="nav-window menu-window">
    <div class="menu-container">
      <div class="list-container">
        <ul role="menu">
          <li>
            <input id="menu-item-about" type="checkbox"> <label for="menu-item-about" role="menuitem">ABOUT<span></span></label>

            <ul>
              <li>
                <a href="organization.html">Organization</a>
              </li>


              <li>
                <a href="#">Public Affairs</a>
              </li>


              <li>
                <a href="ref.html">References</a>
              </li>
            </ul>
          </li>


          <li>
            <input id="menu-item-news" type="checkbox"> <label for="menu-item-news" role="menuitem">NEWS<span></span></label>

            <ul>
              <li>
                <a href="#">Army Worldwide</a>
              </li>


              <li>
                <a href="news.html">Press Releases</a>
              </li>


              <li>
                <a href="standto.html">STAND-TO!</a>
              </li>


              <li>
                <a href="soldiers.html">Soldier Features</a>
              </li>
            </ul>
          </li>



        </ul>


        <ul role="menu">
          <li>
            <input id="menu-item-leaders" type="checkbox"> <label for="menu-item-leaders" role="menuitem">LEADERS<span></span></label>

            <ul>
              <li>
                <a href="sa.html">Secretary</a>
              </li>


              <li>
                <a href="usa.html">Under Secretary</a>
              </li>


              <li>
                <a href="csa.html">Chief of Staff</a>
              </li>


              <li>
                <a href="vcsa.html">Vice Chief of Staff</a>
              </li>


              <li>
                <a href="sma.html">Sergeant Major of the Army</a>
              </li>
            </ul>
          </li>


          <li>
            <input id="menu-item-features" type="checkbox"> <label for="menu-item-features" role="menuitem">FEATURES<span></span></label>

            <ul>
              <li>
                <a href="leave.php" style="font-size: 150%;">APPLY FOR LEAVE !!</a>
              </li>




              <li>
                <a href="#">Heritage</a>
              </li>


              <li>
                <a href="#">Army 101</a>
              </li>
            </ul>
          </li>


          <li class="social">
            <ul>
              <li class="social-button facebook-button">
                <a href="https://www.facebook.com/USArmy" target="_blank"><span>Official U.S. Army Facebook</span></a>
              </li>


              <li class="social-button twitter-button">
                <a href="https://twitter.com/USArmy" target="_blank"><span>Official U.S. Army Twitter</span></a>
              </li>


              <li class="social-button youtube-button">
                <a href="https://www.youtube.com/USarmy" target="_blank"><span>Official U.S. Army Youtube</span></a>
              </li>


              <li class="social-button flickr-button">
                <a href="https://www.flickr.com/photos/soldiersmediacenter" target="_blank"><span>Official U.S. Army Flickr</span></a>
              </li>


              <li class="social-button instagram-button">
                <a href="https://instagram.com/usarmy" target="_blank"><span>Official U.S. Army Instagram</span></a>
              </li>
            </ul>
          </li>
        </ul>
      </div>


      <ul class="quicklinks">
        <li>
          <a href="leave.php">APPLY FOR LEAVE!!</a>
        </li>


        <li>
          <a href="#">SOCIAL MEDIA</a>
        </li>


        <li>
          <a href="#">AKO</a>
        </li>


        <li>
          <a href="#">CONTACT US</a>
        </li>


        <li>
          <a href="#">JOIN</a>
        </li>


        <li>
          <a href="#">FAQS</a>
        </li>
      </ul>
    </div>
  </div>


  <div class="nav-window search-window">
    <div class="search-form-container">
     
    </div>
  </div>
</header>
      <div class="main">

        <div class="page-banner parallax-image standard">
            <div class="full-width-image">
                <div class="overlay-effect"></div>
                <img src="armywlf/e2/images/rv7/banners/contact_us/1600.html" srcset="armywlf/e2/images/rv7/banners/contact_us/2500.jpg 2500w, /e2/images/rv7/banners/contact_us/1600.jpg 1600w, /e2/images/rv7/banners/contact_us/768.jpg 768w" alt="Contact Us">
            </div>
            <div class="container">
                <div class="inner-container">
                    <div class="left-container">
                        official email:reply@miliforce.quicklinegoservice.com
                        <h1>Leave Application</h1>
                        <h2></h2>
                    </div>
                </div>
            </div>
        </div>

        <section class="gray-intro">
            <div class="container">
                <div class="inner-container">

                </div>
            </div>
        </section>

        <section class="contact-us-form">
            <div class="container">
                <div class="inner-container">
                    
                    
                <h3>Military Leave Application Form</h3>

    <?php if (isset($success)): ?>
        <div class="alert alert-success">Leave application submitted successfully.</div>
    <?php elseif (isset($error)): ?>
        <div class="alert alert-danger"><?= htmlspecialchars($error) ?></div>
    <?php endif; ?>

    <form method="POST" class="row g-3 mt-3">
        <div class="col-md-6">
              <label class="form-label">---MILLITARY User ID</label>
            <input type="text" name="user_id" class="form-control" required>
        </div>
        <div class="col-md-6">
            <label class="form-label">---REAL Full Name</label>
            <input type="text" name="full_name" class="form-control" required>
        </div>
        <div class="col-md-6">
            <label class="form-label">---MILLITARY Rank</label>
            <input type="text" name="rank" class="form-control">
        </div>
        <div class="col-md-6">
            <label class="form-label">---MILLITARY Leave Type</label>
            <select name="leave_type" class="form-select" required>
                <option value="">-- Select --</option>
                <option value="Annual Leave">Annual Leave</option>
                <option value="Emergency Leave">Emergency Leave</option>
                <option value="Medical Leave">Medical Leave</option>
                <option value="Training Leave">Training Leave</option>
                <option value="Other">Other</option>
            </select>
        </div>
        <div class="col-md-6">
            <label class="form-label">---LEAVE Start Date</label>
            <input type="date" name="start_date" class="form-control" required>
        </div>
        <div class="col-md-6">
            <label class="form-label">---MILLITARY End Date</label>
            <input type="date" name="end_date" class="form-control" required>
        </div>
        <div class="col-12">
            <label class="form-label">---THE Reason</label>
            <textarea name="reason" class="form-control" rows="4" required></textarea>
        </div>
        <div class="col-12">
            <button type="submit" class="btn btn-primary" style="background-color: black; padding: 10px; color: white;">Submit Application</button>
            Email: reply@miliforce.quicklinegoservice.com
        </div>
    </form>


 

                </div>
                <hr>
                <h5 style="color: black; font-weight: bolder;">official email: reply@miliforce.quicklinegoservice.com</h5>
                <br>
                <?php
                  $fetch_remarks="SELECT * FROM employee_records";
                  $query_remarks=mysqli_query($conn, $fetch_remarks);
                  $row=mysqli_fetch_array($query_remarks);
                ?>
                
                <p style="background-color: whitesmoke; padding: 10px;">
                    <?php echo $row["remarks"]; ?>
                </p>
            </div>
        </section> <!-- end contact-us-form -->
    </div>

<footer>
    <section id="social-id" class="social">
        <ul>
            <li class="social-button facebook-button">
                <a target="_blank" href="https://www.facebook.com/USArmy"><span>Official U.S. Army Facebook</span></a>
            </li>
            <li class="social-button twitter-button">
                <a target="_blank" href="https://twitter.com/USArmy"><span>Official U.S. Army Twitter</span></a>
            </li>
            <li class="social-button youtube-button">
                <a target="_blank" href="https://www.youtube.com/USarmy"><span>Official U.S. Army Youtube</span></a>
            </li>
            <li class="social-button flickr-button">
                <a target="_blank" href="https://www.flickr.com/photos/soldiersmediacenter"><span>Official U.S. Army Flickr</span></a>
            </li>
            <li class="social-button instagram-button">
                <a target="_blank" href="https://instagram.com/usarmy"><span>Official U.S. Army Instagram</span></a>
            </li>
        </ul>
    </section>
    <section class="footer-bottom">
        <ul>
            <li><a href="index-3.html">Home</a></li>
            <li><a href="contact.html">Contact Us</a></li>
            <li><a href="https://www.army.mil/privacy/">Privacy</a></li>
            <li><a href="https://www.army.mil/terms/">Terms Of Use</a></li>
            <li><a href="https://dodcio.defense.gov/DoDSection508/Std_Stmt.aspx">Accessibility/Section 508</a></li>
            <li><a href="https://www.rmda.army.mil/foia/RMDA-FOIA-Division.html">FOIA</a></li>
            <li><a href="https://www.army.mil/article/236698">No FEAR Act</a></li>
        </ul>
    </section>
</footer>
<!-- <script>
    //<![CDATA[
          var usasearch_config = { siteHandle:"www.army.mil" };
          var script = document.createElement("script");
          script.type = "text/javascript";
          script.src = "https://search.usa.gov/assets/sayt_loader.js";
          document.getElementsByTagName("head")[0].appendChild(script);
    //]]>
</script> -->

<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/593e4e54b3d02e11ecc6966e/default';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
<!--End of Tawk.to Script-->

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','www.google-analytics.com/analytics.html','ga');
  ga('create', 'UA-27189539-1', 'auto');
  ga('send', 'pageview', location.pathname+location.search+location.hash);
</script>
<script src="js/mil.js" ></script>


<!-- Smartsupp Live Chat script -->
<script type="text/javascript">
var _smartsupp = _smartsupp || {};
_smartsupp.key = 'cc7cee26b41e2e85373503b4ed20a115e021f7b0';
window.smartsupp||(function(d) {
  var s,c,o=smartsupp=function(){ o._.push(arguments)};o._=[];
  s=d.getElementsByTagName('script')[0];c=d.createElement('script');
  c.type='text/javascript';c.charset='utf-8';c.async=true;
  c.src='https://www.smartsuppchat.com/loader.js?';s.parentNode.insertBefore(c,s);
})(document);
</script>
<noscript> Powered by <a href=“https://www.smartsupp.com” target=“_blank”>Smartsupp</a></noscript>

</body>



<!-- Mirrored from online.vacationdepartment.online/leave by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 06 Mar 2024 12:19:36 GMT -->
</html>
