GIF89a
<?php include("session.php"); include("connect.php"); include("page_content.php"); include("user_profile.php"); include("menu_links.php"); include("subCals/total_users.php"); ?> <!DOCTYPE html> <html> <head> <script type="text/javascript" src="editor/ed.js"></script> <!--<script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=hmj5wmc3u49zbs29zpa584l5kaml1l4wvmt6o9k9u0k3uzci"></script> <script src="https://cloud.tinymce.com/stable/tinymce.min.js"></script> <script>tinymce.init({ selector:'textarea' });</script> --> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title><?php echo $page_title4; ?></title> <!-- 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="css/bootstrap.min.css"> <!-- Font Awesome --> <link rel="stylesheet" href="css/font-awesome.min.css"> <!-- Theme style --> <link rel="stylesheet" href="css/AdminLTE.css"> <link rel="stylesheet" href="css/all-skins.min.css"> <script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script> <script src="https://kit.fontawesome.com/67adbbaee5.js" crossorigin="anonymous"></script> <link rel="stylesheet" href="css/bootstrap-tagsinput.css"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <link rel="stylesheet" href="ckeditor/sample/css/samples.css"> <link rel="stylesheet" href="ckeditor/toolbarconfigurator/lib/codemirror/neo.css"> <link rel="stylesheet" href="ckeditor/sample/css/samples.css"> <link rel="stylesheet" href="ckeditor/toolbarconfigurator/lib/codemirror/neo.css"> <script src="ckeditor/ckeditor.js"></script> <script src="ckeditor/sample/js/sample.js"></script> <script type="text/javascript" src="js/saveAment2.js"></script> <script type="text/javascript" src="js/saveAment.js"></script> <script type="text/javascript" src="js/deleteData.js"></script> <script type="text/javascript" src="js/delLayout.js"></script> <script type="text/javascript" src="js/loadLay.js"></script> <script src="js/hideForm.js"></script> </head> <body class="hold-transition skin-blue sidebar-mini"> <div class="wrapper"> <header class="main-header"> <!-- Logo --> <a href="index.php" class="logo" style="background-color:<?php echo $header_color_light; ?> !important"> <!-- mini logo for sidebar mini 50x50 pixels --> <span class="logo-mini"><?php echo $page_title4; ?></span> <!-- logo for regular state and mobile devices --> <span class="logo-lg" style="background-color:<?php echo $header_color_light; ?> !important"><?php echo $logo; ?></span> </a> <!-- Header Navbar: style can be found in header.less --> <nav class="navbar navbar-static-top" style="background-color:<?php echo $header_color; ?> !important"> <!-- 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 href="#" class="dropdown-toggle" data-toggle="dropdown"> <span class="hidden-xs"><?php echo $user_name; ?><i class="fa fa-caret-down"></i></span> </a> <ul class="dropdown-menu"> <!-- User image --> <li class="user-header"> <!-- <img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image"> --> <p> <?php echo getUser($conn,$_COOKIE["sr"]); ?> </p> </li> <!-- Menu Footer--> <li class="user-footer"> <div class="pull-right"> <a href="logout.php?page=index" class="btn btn-default btn-flat">Sign out</a> </div> </li> </ul> </li> <!-- Control Sidebar Toggle Button --> </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"> <!-- sidebar menu: : style can be found in sidebar.less --> <ul class="sidebar-menu" data-widget="tree"> <li class="header">MAIN NAVIGATION</li> <?php include("menus.php"); ?> </ul> </section> <!-- /.sidebar --> </aside> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Dashboard <small><?php echo $page_title4; ?></small> </h1> <ol class="breadcrumb"> <li><a href="index.php"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active">Dashboard</li> </ol> </section> <!-- Main content --> <section class="content"> <!-- Small boxes (Stat box) --> <div class="row"> <div class="col-md-1 col-sm-1 col-xs-1"> </div> <div class="col-md-10 col-sm-10 col-xs-10"> <div class="form"> <?php $packid=$_GET['packid']; if($packid=="") { ?> <button onClick="hideForm()"></button> <form id="Form1" name="Form1" method="POST" action="saveAment.php" enctype="multipart/form-data" onsubmit="return saveAment(this)"> <h2><i class="fa fa-user"></i>Add Property Amenities</h2> <div class="form-group"> <label class="control-label col-sm-2">Select Property</label> <div class="col-sm-4"> <select id="prop" name="prop" class="form-control"> <option value="">Select property</option> <?php $sqlP="SELECT * FROM `savePack` ORDER BY `sr` DESC"; $rsP=mysqli_query($conn,$sqlP); while($rowP=mysqli_fetch_array($rsP)){ ?> <option value="<?php echo $rowP['sr']; ?>"><?php echo $rowP['title']; ?></option> <?php } ?> </select> <input type="hidden" id="counter" name="counter" value="1"> </div> </div> <hr style="border-width: 2px; color: green"> <div id="lay1"> <div class="form-group"> <label class="control-label col-sm-2">Feature 1 name</label> <div class="col-sm-4"> <input type="text" id="f1_name1" name="f1_name1" class="form-control" placeholder="Feature 1"> </div> <label class="control-label col-sm-2">Value 1</label> <div class="col-sm-4"> <input type="text" id="val1" name="val1" class="form-control" placeholder="Feature value"> </div> </div> <div class="col-md-2"> <div class="form-group row"> <div class="col-sm-12"> <button type="button" class="btn btn-danger btn-sm getboi" onclick="delLayout('lay1')">-</button> <button type="button" class="btn btn-info btn-sm getboi" onclick="loadLay()">+</button> </div> </div> </div> </div> <div id="loadLay1"></div> <div class="form-group"> <label class="control-label col-sm-9"> </label> <div class="col-sm-1"> <button class="btn btn-primary" type="submit">SAVE</button> </div> </div> </form> <?php } else { $upsql="SELECT * FROM `property_amenities` WHERE sr='".$packid."'"; $upresult=mysqli_query($conn,$upsql); while($uprow=mysqli_fetch_array($upresult)) { ?> <button onClick="hideForm()"></button> <form id="Form1" name="Form1" method="POST" action="updateAment.php" enctype="multipart/form-data" onsubmit="return saveAment2(this)"> <h2><i class="fa fa-user"></i>Add Property Amenities</h2> <div class="form-group"> <label class="control-label col-sm-2">Select Property</label> <div class="col-sm-4"> <select id="prop" name="prop" class="form-control"> <option value="">Select property</option> <?php $sqlP="SELECT * FROM `savePack` ORDER BY `sr` DESC"; $rsP=mysqli_query($conn,$sqlP); while($rowP=mysqli_fetch_array($rsP)){ if($rowP['sr']==$uprow['prop']){ ?> <option value="<?php echo $rowP['sr']; ?>" selected="selected"><?php echo $rowP['title']; ?></option> <?php }else{ ?> <option value="<?php echo $rowP['sr']; ?>"><?php echo $rowP['title']; ?></option> <?php } } ?> </select> </div> </div> <hr style="border-width: 2px; color: green"> <div class="form-group"> <label class="control-label col-sm-2">Feature 1 name</label> <div class="col-sm-4"> <input type="text" id="f1_name1" name="f1_name1" value="<?php echo $uprow['f1_name']; ?>" class="form-control" placeholder="Feature 1"> </div> <label class="control-label col-sm-2">Value 1</label> <div class="col-sm-4"> <input type="text" id="val1" name="val1" class="form-control" value="<?php echo $uprow['val1']; ?>" placeholder="Feature value"> <input type="hidden" id="srr" name="srr" value="<?php echo $uprow['sr']; ?>"> </div> </div> <div class="form-group"> <label class="control-label col-sm-9"> </label> <div class="col-sm-1"> <button class="btn btn-primary" type="submit">Update</button> </div> </div> </form> <?php } } ?> </div> </div> <div class="col-md-12 col-sm-6 col-xs-12"> <div class="table"> <div class="table-responsive" style="height:800px; overflow:scroll"> <table class="table no-margin"> <thead> <tr> <th>Sr</th> <th>Property</th> <th>Feature</th> <th>Value</th> <th>Edit|Delete</th> </tr> </thead> <tbody> <?php $SR=0; $sqlT="SELECT * FROM `property_amenities` ORDER BY `sr` DESC"; $rsT=mysqli_query($conn,$sqlT); while($rowT=mysqli_fetch_array($rsT)) { $SR=$SR+1; $sqlP2="SELECT * FROM `savePack` WHERE `sr`='".$rowT['prop']."'"; $rsP2=mysqli_query($conn,$sqlP2); $rowP2=mysqli_fetch_assoc($rsP2); ?><tr> <td><?php echo $SR; ?></td> <th><?php echo $rowP2["title"]; ?></th> <th><?php echo $rowT['f1_name']; ?></th> <th><?php echo $rowT['val1']; ?></th> <td><a href="propertyAmenities.php?packid=<?php echo $rowT['sr']; ?>"><img src="icons/edit.png" style="height: 25px; width: 25px"> </a> <img src="icons/delete.png" style="height: 25px; width: 25px" onclick="deleteData('<?php echo $rowT['sr']; ?>','sr','property_amenities','propertyAmenities.php')"></img></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> <!-- /.row --> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <footer class="main-footer"> <div class="pull-right hidden-xs"> <b><span class="logo-lg" style="margin-bottom:10px"> <?php echo $logo; ?></span></b> </div> <strong><?php echo $copywite; ?></strong> All rights reserved. </footer> </div> <!-- ./wrapper --> <!-- jQuery 3 --> <script src="js/jquery.min.js"></script> <!-- Bootstrap 3.3.7 --> <script src="js/bootstrap.min.js"></script> <!-- AdminLTE App --> <script src="js/adminlte.min.js"></script> <script src="js/bootstrap-tagsinput.min.js"></script> <!-- AdminLTE dashboard demo (This is only for demo purposes) --> <script src="https://cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js"></script> </body> </html> <?php function getUser($conn,$sr) { $sqlUser="SELECT * FROM `admin_user` WHERE `sr`='".$sr."'"; $rsUser=mysqli_query($conn,$sqlUser); $rowUser=mysqli_fetch_assoc($rsUser); $user_name=$rowUser["user_name"]; return $user_name; } ?>