|
| 1 | +<?php |
| 2 | +session_start(); |
| 3 | +require_once("php/databaseConnect.php"); |
| 4 | + |
| 5 | + |
| 6 | +if(!isset($_SESSION['username'])) |
| 7 | +{ |
| 8 | + header("location: index.php"); |
| 9 | +} |
| 10 | + |
| 11 | +?> |
| 12 | + |
| 13 | +<!DOCTYPE html> |
| 14 | +<html lang="en"> |
| 15 | + |
| 16 | +<head> |
| 17 | + <meta charset="utf-8"> |
| 18 | + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> |
| 19 | + <meta http-equiv="x-ua-compatible" content="ie=edge"> |
| 20 | + <title>Insurance</title> |
| 21 | + <!-- Font Awesome --> |
| 22 | + <link rel="stylesheet" href="../css/fontawesome.min.css"> |
| 23 | + <link rel="stylesheet" href="../css/all.min.css"> |
| 24 | + <link rel="stylesheet" href="../css/brands.css"> |
| 25 | + <link rel="stylesheet" href="../css/solid.css"> |
| 26 | + <!-- Bootstrap core CSS --> |
| 27 | + <link href="../css/bootstrap.min.css" rel="stylesheet"> |
| 28 | + <!-- Material Design Bootstrap --> |
| 29 | + <!-- <link href="css/mdb.min.css" rel="stylesheet"> --> |
| 30 | + <!-- Animation core CSS --> |
| 31 | + <link href="../css/animate.min.css" rel="stylesheet"> |
| 32 | + <!-- Your custom styles (optional) --> |
| 33 | + <link href="css/dashboard.css" rel="stylesheet"> |
| 34 | + |
| 35 | + |
| 36 | + <style> |
| 37 | + .shadow_top_btn{ |
| 38 | + color: #003399 ; |
| 39 | + background-color: #fff; |
| 40 | + box-shadow: #003399; |
| 41 | + } |
| 42 | + .shadow_top_btn:hover{ |
| 43 | + color: #fff; |
| 44 | + background-color: #003399 ; |
| 45 | + } |
| 46 | + </style> |
| 47 | + |
| 48 | +</head> |
| 49 | + |
| 50 | +<body data-spy="scroll" data-target="#demo" data-offset="70"> |
| 51 | + |
| 52 | +<!------------------------------------------------------------- |
| 53 | +-------------Top navber Start Here for Full screen------------- |
| 54 | +---------------------------------------------------------------> |
| 55 | +<?php include 'navBar.php';?> |
| 56 | + |
| 57 | + |
| 58 | +<div class="container-fluid d-flex"> |
| 59 | +<!------------------------------------------------------------- |
| 60 | +------------- Left sidebar start ---------------------------------- |
| 61 | +---------------------------------------------------------------> |
| 62 | + |
| 63 | +<?php include 'sidebar.php';?> |
| 64 | + |
| 65 | +<!-- ======================================================= left side end ===================================== --> |
| 66 | + |
| 67 | +<div class="clearfix"></div> |
| 68 | +<!-- ===================================== Right Side Start ========================================= |
| 69 | + ================================================================================================ |
| 70 | + =================================================================================================== --> |
| 71 | + |
| 72 | + <div class="py-2 pl-3 border border-primary my-1 mx-auto w-100 d-flex " style="height: auto;"> |
| 73 | + <div class="mx-3 w-100" id="moneyRecharge" style="display: block;"> |
| 74 | + <h3 class="d-flex flex-row justify-content-between"> |
| 75 | + |
| 76 | + <div class="font-weight-bolder"> Add New Facilities </div> |
| 77 | + </h3> |
| 78 | + <form action="php/addnewFacilities.php" method="POST" enctype="multipart/form-data"> |
| 79 | + <table class="table table-striped table-hover table-responsive "> |
| 80 | + <tbody class="text-primary"> |
| 81 | + <tr class="text-light font-weight-bold"> |
| 82 | + <td class="w-25 text-primary " >Package Name</td> |
| 83 | + <td class="w-75"> |
| 84 | + <div class="input-group w-100 "> |
| 85 | + <select class="custom-select font-weight-bolder border border-primary" id="selectInsurance" aria-label="Example select with button addon" required> |
| 86 | + <option value="">Select Package Name</option> |
| 87 | + <?php |
| 88 | + $sql = "SELECT * FROM `package`"; |
| 89 | + $result=mysqli_query($connect, $sql); |
| 90 | + |
| 91 | + if ($result == true) { |
| 92 | + while($row=mysqli_fetch_array($result)) |
| 93 | + { |
| 94 | + $package_id=$row['package_id']; |
| 95 | + $package_name=$row['package_name']; |
| 96 | + $package_delete=$row['package_delete']; |
| 97 | + |
| 98 | + if ($package_delete == 0) { |
| 99 | + ?> |
| 100 | + <option value="<?php echo $package_id; ?>"> |
| 101 | + <?php echo $package_name; ?> |
| 102 | + </option> |
| 103 | + <?php |
| 104 | + } |
| 105 | + } |
| 106 | + } |
| 107 | + ?> |
| 108 | + </select> |
| 109 | + <div class="input-group-append "> |
| 110 | + <button onclick="selectPackage();" class="btn btn-outline-primary font-weight-bolder" type="button" >Select Package</button> |
| 111 | + </div> |
| 112 | + </div> |
| 113 | + </td> |
| 114 | + </tr> |
| 115 | + <tr class="text-light font-weight-bold"> |
| 116 | + <td class="w-25 text-primary " >Package Id</td> |
| 117 | + <td class="w-75"> |
| 118 | + <input type="number" name="package_id" class="w-100" placeholder="Package Id" class="bg-light" readonly id="package_id" min="1"> |
| 119 | + </td> |
| 120 | + </tr> |
| 121 | + <tr class="text-light font-weight-bold"> |
| 122 | + <td class="w-25 text-primary " >Facilities Name</td> |
| 123 | + <td class="w-75"> |
| 124 | + <textarea name="FacilitiesName" id="" cols="100" rows="1" required placeholder="Enter Facilities Name" class="bg-light" ></textarea> |
| 125 | + </td> |
| 126 | + </tr> |
| 127 | + <tr class="text-light font-weight-bold"> |
| 128 | + <td class="w-25 text-primary " >Facilities Price</td> |
| 129 | + <td class="w-75"> |
| 130 | + <input type="number" name="facilities_Price" class="w-100" required placeholder="Enter Facilities Price" class="bg-light" > |
| 131 | + </td> |
| 132 | + </tr> |
| 133 | + </tr> |
| 134 | + <tr class=" text-light font-weight-bold w-100"> |
| 135 | + <td class="w-100"> |
| 136 | + <a href="viewFacilitiesList.php" class="btn btn-outline-danger w-100" >Cancel</a> |
| 137 | + </td> |
| 138 | + <td class="w-100"> |
| 139 | + <button type="submit" [disabled]="!form.form.valid" class="btn btn-outline-success w-100" >Save</button> |
| 140 | + </td> |
| 141 | + |
| 142 | + </tr> |
| 143 | + </tbody> |
| 144 | + </table> |
| 145 | + </form> |
| 146 | + |
| 147 | + |
| 148 | + </div> |
| 149 | +<!-- ============================= End ========================================--> |
| 150 | + </div> |
| 151 | +</div> |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | +<!------------------------------------------------------------- |
| 161 | +--------------------------Footer Start here-------------------- |
| 162 | +---------------------------------------------------------------> |
| 163 | +<?php include 'footer.php';?> |
| 164 | +<!------------------------------------------------------------- |
| 165 | +--------------------------Footer End here----------------------- |
| 166 | +---------------------------------------------------------------> |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | +<button class="btn float-right shadow_top_btn " onclick="topFunction()" id="topBtn" title="Go to top"> |
| 172 | + <i class="fas fa-arrow-circle-up"></i> |
| 173 | +</button> |
| 174 | + <script> |
| 175 | +//Get the button |
| 176 | +var mybutton = document.getElementById("topBtn"); |
| 177 | + |
| 178 | +// When the user scrolls down 20px from the top of the document, show the button |
| 179 | +window.onscroll = function() {scrollFunction()}; |
| 180 | + |
| 181 | +function scrollFunction() { |
| 182 | + if (document.body.scrollTop > 40 || document.documentElement.scrollTop > 40) { |
| 183 | + mybutton.style.display = "block"; |
| 184 | + } else { |
| 185 | + mybutton.style.display = "none"; |
| 186 | + } |
| 187 | +} |
| 188 | + |
| 189 | +// When the user clicks on the button, scroll to the top of the document |
| 190 | +function topFunction() { |
| 191 | + document.body.scrollTop = 0; |
| 192 | + document.documentElement.scrollTop = 0; |
| 193 | +} |
| 194 | + |
| 195 | +function selectPackage(){ |
| 196 | + |
| 197 | + var no = document.getElementById("selectInsurance"); |
| 198 | + var option = no.options[no.selectedIndex].value; |
| 199 | + document.getElementById("package_id").value = option; |
| 200 | + |
| 201 | + } |
| 202 | + |
| 203 | +</script> |
| 204 | + |
| 205 | +<!-- SCRIPTS --> |
| 206 | + <!-- JQuery --> |
| 207 | + <script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script> |
| 208 | + <!-- Bootstrap tooltips --> |
| 209 | + <script type="text/javascript" src="../js/popper.min.js"></script> |
| 210 | + <!-- Bootstrap core JavaScript --> |
| 211 | + <script type="text/javascript" src="../js/bootstrap.min.js"></script> |
| 212 | + <!-- MDB core JavaScript --> |
| 213 | + <script type="text/javascript" src="../js/mdb.min.js"></script> |
| 214 | + <!-- Company Brand Slider --> |
| 215 | + <script src="../js/brandSlider.js"></script> |
| 216 | + |
| 217 | +</body> |
| 218 | + |
| 219 | +</html> |
0 commit comments