ok
Direktori : /home/importfo/public_html/goldluxuryspa.com/admin/ |
Current File : //home/importfo/public_html/goldluxuryspa.com/admin/header.php |
<?php include("function.php") ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <link rel="shortcut icon" href="images/spgt.png"> <title>Admin | Heder</title> <!-- Base Css Files --> <link href="css/bootstrap.min.css" rel="stylesheet" /> <!-- Font Icons --> <link href="assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" /> <link href="assets/ionicon/css/ionicons.min.css" rel="stylesheet" /> <link href="css/material-design-iconic-font.min.css" rel="stylesheet"> <!-- animate css --> <link href="css/animate.css" rel="stylesheet" /> <!-- Waves-effect --> <link href="css/waves-effect.css" rel="stylesheet"> <!-- Custom Files --> <link href="css/helper.css" rel="stylesheet" type="text/css" /> <link href="css/style.css" rel="stylesheet" type="text/css" /> <script src="js/modernizr.min.js"></script> <link href="assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" /> <link href="assets/select2/select2.css" rel="stylesheet" type="text/css" /> <script src="https://cdn.ckeditor.com/4.14.1/standard/ckeditor.js"></script> </head> <body class="fixed-left"> <!-- Begin page --> <div id="wrapper"> <!-- Top Bar Start --> <?php include("top.php"); ?> <!-- Top Bar End --> <!-- ========== Left Sidebar Start ========== --> <?php include("sidebar.php"); ?> <!-- Left Sidebar End --> <!-- ============================================================== --> <!-- Start right Content here --> <!-- ============================================================== --> <div class="content-page"> <!-- Start content --> <div class="content"> <div class="container"> <!-- Page-Title --> <div class="row"> <div class="col-sm-12"> <h4 class="pull-left page-title">Add header </h4> <ol class="breadcrumb pull-right"> <li><a href="dashboard.php">Dashboard</a></li> <li class="active">Add header </li> </ol> </div> </div> <?php if(isset($_GET['delete'])) { $delete=$_GET['delete']; } else { $delete=0; } $sql="delete from header where id='$delete'"; $res=mysqli_query($db,$sql); ?> <?php if(isset($_GET['edit'])) { $edit=$_GET['edit']; } else { $edit=0; } $sql="SELECT * FROM header where id='$edit'"; $res=mysqli_query($db,$sql); $row=mysqli_fetch_array($res); $img=$row['app_image']; // $img1=$row['app_image1']; ?> <div class="row"> <div class="col-sm-12"> <div class="panel panel-default"> <div class="panel-heading"><h3 class="panel-title">Add header</h3></div> <div class="panel-body"> <form class="form-horizontal" role="form" method="post" enctype="multipart/form-data"> <div class="form-group"> <label class="col-md-2 control-label">Opennig Hour</label> <div class="col-md-6"> <input type="text" class="form-control" name="time" value="<?php echo $row['time'] ?>" placeholder="Enter Title" required> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Mail</label> <div class="col-md-6"> <input type="text" class="form-control" name="mail" value="<?php echo $row['mail'] ?>" placeholder="Enter Title" required> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Contact</label> <div class="col-md-6"> <input type="text" class="form-control" name="phone" value="<?php echo $row['phone'] ?>" placeholder="Enter Title" required> </div> </div> <div class="form-group"> <label class="col-md-2 control-label"> Add Menu</label> <div class="col-md-2"> <input type="text" class="form-control" name="m1" value="<?php echo $row['m1'] ?>" placeholder="Enter Title" required> <input type="text" class="form-control" name="m2" value="<?php echo $row['m2'] ?>" placeholder="Enter Title" required> <input type="text" class="form-control" name="m3" value="<?php echo $row['m3'] ?>" placeholder="Enter Title" required> <input type="text" class="form-control" name="m4" value="<?php echo $row['m4'] ?>" placeholder="Enter Title" required> <input type="text" class="form-control" name="m5" value="<?php echo $row['m5'] ?>" placeholder="Enter Title" required> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Address</label> <div class="col-md-6"> <input type="text" class="form-control" name="address" value="<?php echo $row['address'] ?>" placeholder="Enter address Content" required> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Footer Content</label> <div class="col-md-6"> <input type="text" class="form-control" name="footer" value="<?php echo $row['footer'] ?>" placeholder="Enter footer Content" required> </div> </div> <div class="form-group"> <label class="col-md-2 control-label"> Add Social Media Link</label> <div class="col-md-2"> <input type="text" class="form-control" name="link1" value="<?php echo $row['link1'] ?>" placeholder="Facebook Link" > <input type="text" class="form-control" name="link2" value="<?php echo $row['link2'] ?>" placeholder="Instagram Link" > <input type="text" class="form-control" name="link3" value="<?php echo $row['link3'] ?>" placeholder="Tweeter Link" > <input type="text" class="form-control" name="link4" value="<?php echo $row['link4'] ?>" placeholder="Linkedin Link" > </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Logo</label> <div class="col-md-3"> <div class="fileUpload btn btn-primary waves-effect waves-light"> <span>upload image here...</span> <input type="file" name="image" class="upload"> </div> </div> <div class="col-md-4"> <img src="upload/<?php echo $row['app_image']; ?>" style="width: 100px;"> </div> </div> <div class="form-group"> <label class="col-md-2 control-label"></label> <div class="col-md-10"> <button type="submit" name="<?php if(isset($_GET['edit'])){ echo "Update"; }else { echo "Submit";} ?>" class="btn btn-purple waves-effect waves-light"><?php if(isset($_GET['edit'])){ echo "Update"; }else { echo "Submit";} ?></button> </div> </div> </form> <?php if(isset($_POST['Submit'])) { $time=$_POST['time']; $mail=$_POST['mail']; $phone=$_POST['phone']; $m1=$_POST['m1']; $m2=$_POST['m2']; $m3=$_POST['m3']; $m4=$_POST['m4']; $m5=$_POST['m5']; $address=$_POST['address']; $link1=$_POST['link1']; $link2=$_POST['link2']; $link3=$_POST['link3']; $link4=$_POST['link4']; $footer=$_POST['footer']; $image = $_FILES['image']['name']; if(!$image) { $image=$img; } else { $file_path = 'upload/'; $file_path = $file_path . basename( $_FILES['image']['name']); if(move_uploaded_file($_FILES['image']['tmp_name'], $file_path)) { } } $sql="INSERT INTO `header` (`id`,`time`, `mail`, `phone`, `app_image`,`m1`,`m2`,`m3`,`m4`,`m5`,`address`,`footer`,`link1`,`link2`,`link3`,`link4`,`status`) VALUES (NULL,'$time','$mail','$phone','$image','$m1','$m2','$m3','$m4','$m5', '$address','$footer','$link1','$link2','$link3','$link4','1')"; $res=mysqli_query($db,$sql); if($res==1) { echo ("<script LANGUAGE='JavaScript'>window.alert('Succesfully added.!!');window.location.href='header.php';</script>"); } else { echo ("<script LANGUAGE='JavaScript'>window.alert('data Not Save.!!');window.location.href='header.php';</script>"); } } ?> <?php if(isset($_POST['Update'])) { $edit=$_GET['edit']; $time=$_POST['time']; $mail=$_POST['mail']; $phone=$_POST['phone']; $m1=$_POST['m1']; $m2=$_POST['m2']; $m3=$_POST['m3']; $m4=$_POST['m4']; $m5=$_POST['m5']; $address=$_POST['address']; $footer=$_POST['footer']; $link1=$_POST['link1']; $link2=$_POST['link2']; $link3=$_POST['link3']; $link4=$_POST['link4']; $image = $_FILES['image']['name']; if(!$image) { $image=$img; } else { $file_path = 'upload/'; $file_path = $file_path . basename( $_FILES['image']['name']); if(move_uploaded_file($_FILES['image']['tmp_name'], $file_path)) { } } $sql="update `header` set `time`='$time',`mail`='$mail',`phone`='$phone',`m1`='$m1',`m2`='$m2',`m3`='$m3',`m4`='$m4',`m5`='$m5',`app_image`='$image',`address`='$address',`footer`='$footer',`link1`='$link1',`link2`='$link2',`link3`='$link3',`link4`='$link4' where id='$edit'"; $res=mysqli_query($db,$sql); if($res==1) { echo ("<script LANGUAGE='JavaScript'>window.alert('Succesfully Updated'); window.location.href='header.php';</script>"); } else { echo ("<script LANGUAGE='JavaScript'>window.alert('Not Updated Data.!'); window.location.href='header.php';</script>"); echo "data not update"; } } ?> </div> <!-- panel-body --> </div> <!-- panel --> </div> <!-- col --> </div> <!-- End row --> <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">View Header</h3> </div> <div class="panel-body"> <div class="row"> <div class="col-md-12 col-sm-12 col-xs-12"> <table id="datatable" class="table table-striped table-bordered"> <thead> <tr> <th>Id</th> <th>Opennig Time</th> <th>Mail</th> <th>Phone</th> <th>Menu 1</th> <th>Menu 2</th> <th>Menu 3</th> <th>Menu 4</th> <th>Menu 5</th> <th>Address</th> <th>Footer</th> <!-- <th>LOGO</th> --> <th>Setting</th> </tr> </thead> <tbody> <?php $sql="SELECT * from header"; $res=mysqli_query($db,$sql); while($row=mysqli_fetch_array($res)) { ?> <tr> <td><?php echo $row['id']; ?></td> <td><?php echo $row['time']; ?></td> <td><?php echo $row['mail']; ?></td> <td><?php echo $row['phone']; ?></td> <td><?php echo $row['m1']; ?></td> <td><?php echo $row['m2']; ?></td> <td><?php echo $row['m3']; ?></td> <td><?php echo $row['m4']; ?></td> <td><?php echo $row['m5']; ?></td> <td><?php echo $row['address']; ?></td> <td><?php echo $row['footer']; ?></td> <!-- <td><img src="upload/<?php echo $row['app_image']; ?>" style="width: 100px;"></td> --> <td> <a href="header.php?edit=<?php echo $row['id']; ?>"> <button class="btn btn-icon waves-effect waves-light btn-primary m-b-5"> <i class="fa fa-pencil"></i> </button> </a> <a href="header.php?delete=<?php echo $row['id']; ?>"> <button class="btn btn-icon waves-effect waves-light btn-danger m-b-5" onclick="return confirm('Are you sure you want to delete this item?');"> <i class="fa fa-remove"></i> </button> </a> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> <!-- End Row --> </div> <!-- container --> </div> <!-- content --> <?php include("footer.php") ?> </div> <!-- ============================================================== --> <!-- End Right content here --> <!-- ============================================================== --> <!-- Right Sidebar --> <div class="side-bar right-bar nicescroll"> <h4 class="text-center">Chat</h4> <div class="contact-list nicescroll"> <ul class="list-group contacts-list"> <li class="list-group-item"> <a href="#"> <div class="avatar"> <img src="images/users/avatar-1.jpg" alt=""> </div> <span class="name">Chadengle</span> <i class="fa fa-circle online"></i> </a> <span class="clearfix"></span> </li> <li class="list-group-item"> <a href="#"> <div class="avatar"> <img src="images/users/avatar-2.jpg" alt=""> </div> <span class="name">Tomaslau</span> <i class="fa fa-circle online"></i> </a> <span class="clearfix"></span> </li> <li class="list-group-item"> <a href="#"> <div class="avatar"> <img src="images/users/avatar-3.jpg" alt=""> </div> <span class="name">Stillnotdavid</span> <i class="fa fa-circle online"></i> </a> <span class="clearfix"></span> </li> <li class="list-group-item"> <a href="#"> <div class="avatar"> <img src="images/users/avatar-4.jpg" alt=""> </div> <span class="name">Kurafire</span> <i class="fa fa-circle online"></i> </a> <span class="clearfix"></span> </li> <li class="list-group-item"> <a href="#"> <div class="avatar"> <img src="images/users/avatar-5.jpg" alt=""> </div> <span class="name">Shahedk</span> <i class="fa fa-circle away"></i> </a> <span class="clearfix"></span> </li> <li class="list-group-item"> <a href="#"> <div class="avatar"> <img src="images/users/avatar-6.jpg" alt=""> </div> <span class="name">Adhamdannaway</span> <i class="fa fa-circle away"></i> </a> <span class="clearfix"></span> </li> <li class="list-group-item"> <a href="#"> <div class="avatar"> <img src="images/users/avatar-7.jpg" alt=""> </div> <span class="name">Ok</span> <i class="fa fa-circle away"></i> </a> <span class="clearfix"></span> </li> <li class="list-group-item"> <a href="#"> <div class="avatar"> <img src="images/users/avatar-8.jpg" alt=""> </div> <span class="name">Arashasghari</span> <i class="fa fa-circle offline"></i> </a> <span class="clearfix"></span> </li> <li class="list-group-item"> <a href="#"> <div class="avatar"> <img src="images/users/avatar-9.jpg" alt=""> </div> <span class="name">Joshaustin</span> <i class="fa fa-circle offline"></i> </a> <span class="clearfix"></span> </li> <li class="list-group-item"> <a href="#"> <div class="avatar"> <img src="images/users/avatar-10.jpg" alt=""> </div> <span class="name">Sortino</span> <i class="fa fa-circle offline"></i> </a> <span class="clearfix"></span> </li> </ul> </div> </div> <!-- /Right-bar --> </div> <!-- END wrapper --> <script> var resizefunc = []; </script> <!-- jQuery --> <script src="js/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/waves.js"></script> <script src="js/wow.min.js"></script> <script src="js/jquery.nicescroll.js" type="text/javascript"></script> <script src="js/jquery.scrollTo.min.js"></script> <script src="assets/jquery-detectmobile/detect.js"></script> <script src="assets/fastclick/fastclick.js"></script> <script src="assets/jquery-slimscroll/jquery.slimscroll.js"></script> <script src="assets/jquery-blockui/jquery.blockUI.js"></script> <!-- CUSTOM JS --> <script src="js/jquery.app.js"></script> <script src="assets/datatables/jquery.dataTables.min.js"></script> <script src="assets/datatables/dataTables.bootstrap.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#datatable').dataTable(); } ); </script> <script type="text/javascript"> jQuery(document).ready(function() { jQuery(".select2").select2({ width: '100%' }); }); </script> <script> CKEDITOR.replace( 'editor1' ); </script> <script> CKEDITOR.replace( 'editor2' ); </script> <script src="assets/select2/select2.min.js" type="text/javascript"></script> <!-- CUSTOM JS --> <script type="text/javascript" src="assets/bootstrap-wysihtml5/wysihtml5-0.3.0.js"></script> <script type="text/javascript" src="assets/bootstrap-wysihtml5/bootstrap-wysihtml5.js"></script> <script src="//cdn.ckeditor.com/4.11.1/standard/ckeditor.js"></script> <!--form validation init--> <script src="https://cdn.ckeditor.com/[version.number]/[distribution]/ckeditor.js"></script> </body> </html>