ok
Direktori : /home/importfo/public_html/goldluxuryspa.com/admin/ |
Current File : //home/importfo/public_html/goldluxuryspa.com/admin/mission.php |
<?php include("config.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/favicon_1.png"> <title>Admin | mission</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> <script src="ckeditor/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">mission</h4> <ol class="breadcrumb pull-right"> <li><a href="dashboard.php">Dashboard</a></li> <li class="active">mission</li> </ol> </div> </div> <?php if(isset($_GET['delete'])) { $delete=$_GET['delete']; } else { $delete=0; $slug=""; } $sql="delete from mission where id='$delete'"; $res=mysqli_query($db,$sql); ?> <?php if(isset($_GET['slug'])) { $slug=$_GET['slug']; } else { $slug=0; } $sql1="select * from `mission` where id='$slug' "; $res1=mysqli_query($db,$sql1); $row6=mysqli_fetch_array($res1); $title1=$row6['title1']; $post_desc1=$row6['post_desc1']; $title2=$row6['title2']; $post_desc2=$row6['post_desc2']; $title3=$row6['title3']; $post_desc3=$row6['post_desc3']; ?> <div class="row"> <div class="col-sm-12"> <div class="panel panel-default"> <div class="panel-heading"><h3 class="panel-title">Mission/Vison </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"> Title 1</label> <div class="col-md-6"> <input type="text" class="form-control" name="title1" value="<?php echo $title1; ?>" placeholder=" Title"> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Desc 1</label> <div class="col-md-10"> <textarea class="ckeditor m input sm" id="editor" rows="5" name="post_desc1"><?php echo $post_desc1 ?></textarea> </div> </div> <div class="form-group"> <label class="col-md-2 control-label"> Title2</label> <div class="col-md-6"> <input type="text" class="form-control" name="title2" value="<?php echo $title2; ?>" placeholder=" Title"> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Desc 2</label> <div class="col-md-10"> <textarea class="ckeditor m input sm" id="editor" rows="5" name="post_desc2"><?php echo $post_desc2 ?></textarea> </div> </div> <div class="form-group"> <label class="col-md-2 control-label"> Title 3</label> <div class="col-md-6"> <input type="text" class="form-control" name="title3" value="<?php echo $title3; ?>" placeholder="mission Title"> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Desc 3</label> <div class="col-md-10"> <textarea class="ckeditor m input sm" id="editor" rows="5" name="post_desc3"><?php echo $post_desc3 ?></textarea> </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['slug'])){ echo "Update"; }else { echo "Submit";} ?>" class="btn btn-purple waves-effect waves-light"><?php if(isset($_GET['slug'])){ echo "Update"; }else { echo "Submit";} ?></button> </div> </div> </form> <?php if(isset($_POST['Submit'])) { $post_desc1=$_POST['post_desc1']; $post_desc2=$_POST['post_desc2']; $post_desc3=$_POST['post_desc3']; $title1=$_POST['title1']; $title2=$_POST['title2']; $title3=$_POST['title3']; $title_slug = strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $title))); $sql="INSERT INTO `mission` (`id`, `title1`, `title2`, `title3`, `post_desc1`, `post_desc2`, `post_desc3`, `status`) VALUES (NULL, '$title1', '$title2', '$title3', '$post_desc1', '$post_desc2', '$post_desc3', '1')"; $res=mysqli_query($db,$sql); if($res==1) { echo ("<script LANGUAGE='JavaScript'>window.alert('Succesfully added.!!');window.location.href='mission.php';</script>"); /*echo "data save";*/ } else { echo ("<script LANGUAGE='JavaScript'>window.alert('Product Not Added.!!');window.location.href='mission.php';</script>"); /*echo "data Not save";*/ } } ?> <?php if(isset($_POST['Update'])) { $slug=$_GET['slug']; $title1=$_POST['title1']; $title2=$_POST['title2']; $title3=$_POST['title3']; $post_desc1=$_POST['post_desc1']; $post_desc2=$_POST['post_desc2']; $post_desc3=$_POST['post_desc3']; $sql="update `mission` set `title1`='$title1',`title2`='$title2',`title3`='$title3',`post_desc1`='$post_desc1',`post_desc2`='$post_desc2',`post_desc3`='$post_desc3' where id='$slug'"; $res=mysqli_query($db,$sql); if($res==1) { echo ("<script LANGUAGE='JavaScript'>window.alert('Succesfully Updated'); window.location.href='mission.php';</script>"); /*echo "data update";*/ } else { echo ("<script LANGUAGE='JavaScript'>window.alert('Not Updated Data.!'); window.location.href='mission.php';</script>"); /*echo "data not save";*/ } } ?> </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 mission</h3> </div> <div class="panel-body"> <div class="row"> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="table-responsive"> <table id="datatable" class="table table-striped table-bordered"> <thead> <tr> <th>ID</th> <th>Title 1</th> <th>Post Desc1</th> <th>Title 2</th> <th>Post Desc2</th> <th>Title 3</th> <th>Post Desc3</th> <th>Setting</th> </tr> </thead> <tbody> <?php $sql="SELECT * FROM `mission`"; $res=mysqli_query($db,$sql); while($row=mysqli_fetch_array($res)) { ?> <tr> <td><?php echo $row['id']; ?></td> <td><?php echo $row['title1']; ?></td> <td><?php echo $row['post_desc1']; ?></td> <td><?php echo $row['title2']; ?></td> <td><?php echo $row['post_desc2']; ?></td> <td><?php echo $row['title3']; ?></td> <td><?php echo $row['post_desc3']; ?></td> <td> <a href="mission.php?slug=<?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="mission.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> </div> <!-- End Row --> </div> <!-- container --> </div> <!-- content --> <?php include("footer.php") ?> </div> <!-- ============================================================== --> <!-- End Right content here --> <!-- ============================================================== --> <!-- Right Sidebar --> <!-- /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 src="assets/select2/select2.min.js" type="text/javascript"></script> <script> CKEDITOR.replace( 'editor1' ); </script> <script> CKEDITOR.replace( 'editor2' ); </script> <script src="assets/select2/select2.min.js" type="text/javascript"></script> <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> <!--form validation init--> <script> $(document).on("change keyup blur", "#chDiscount", function() { var main = $('#cBalance').val(); var disc = $('#chDiscount').val(); var dec = (disc / 100).toFixed(2); //its convert 10 into 0.10 var mult = main * dec; // gives the value for subtract from main value var discont = main - mult; $('#result').val(discont); }); </script> </body> </html>