hjkhhrtertererrrrrerrtertertertertertertert
bnmbnerterterterterterdfgdfgdfgdfgdfgdfgdfgdfgdfg
/
home4
/
digil8bw
/
asciitechsolution.com
/
admin
/
Upload FileeE
HOME
<?php ob_start(); include("../configuration/function-include.php"); $nav = 'addservices'; if(!empty($_REQUEST['DID'])){ $_REQUEST['DID'] = $_REQUEST['DID']; } else { $_REQUEST['DID'] = ''; } if(!empty($_REQUEST['datafrmSubmit'])){ $_REQUEST['datafrmSubmit'] = $_REQUEST['datafrmSubmit']; } else { $_REQUEST['datafrmSubmit'] = ''; } //Fetch Data From Database............... $sql_select = "Select * from services where id = '".$_REQUEST['DID']."'"; $query_select = mysqli_query($conn, $sql_select); $res_select = mysqli_fetch_array($query_select); //Insert & Update Data in Database...... if($_REQUEST['datafrmSubmit'] == 'Submit'){ if(!empty($_REQUEST['DID'])){ $sql_update = "update services set name = '".$_REQUEST['name']."',title = '".$_REQUEST['title']."', description = '".$_REQUEST['description']."',list = '".$_REQUEST['list']."', update_date_time = '".date("Y-m-d h:i:sa")."' where id = '".$_REQUEST['DID']."'"; $query_update = mysqli_query($conn, $sql_update); $_SESSION['msg'] = "Record updated successfully."; header("location:manageservices.php"); } else { $sql_insert = "insert into services set name = '".$_REQUEST['name']."',title = '".$_REQUEST['title']."', description = '".$_REQUEST['description']."',list = '".$_REQUEST['list']."', update_date_time = '".date("Y-m-d h:i:sa")."', status = '1'"; $query_insert = mysqli_query($conn, $sql_insert); $_SESSION['msg'] = "New record added successfully."; header("location:manageservices.php"); } } /********To Delete Image**********/ if(!empty($_GET['delimg'])){ $sql_img = "select * from services where id = '".$_GET['delimg']."'"; $result = mysqli_query($conn, $sql_img); $row_img = mysqli_fetch_array($result); $sql = "update services set img = '' where id='".$_GET['delimg']."'"; $result = mysqli_query($conn, $sql); @unlink("../upload/services/".$row_img['img']); header("location: $_SERVER[HTTP_REFERER]"); exit(); } /**********End of Code************/ /********To Delete Image**********/ /**********End of Code************/ ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Add Services</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.5 --> <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> <!-- Font Awesome --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> <!-- Ionicons --> <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> <!-- Theme style --> <link rel="stylesheet" href="dist/css/AdminLTE.min.css"> <link rel="stylesheet" href="dist/css/skins/_all-skins.min.css"> </head> <body class="hold-transition skin-blue sidebar-mini"> <!-- Site wrapper --> <div class="wrapper"> <?php include("top-include.php");?> <!-- Left side column. contains the sidebar --> <?php include("left-include.php");?> <!-- Content Wrapper. Contains samagri content --> <div class="content-wrapper"> <!-- Content Header (samagri header) --> <section class="content-header"> <h1> Add Services <small> Services</small> </h1> <ol class="breadcrumb"> <li><a href="dashboard.php"><i class="fa fa-dashboard"></i> Home</a></li> <li><a href="#">Services</a></li> <li class="active">Add Services</li> </ol> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-md-12"> <div class="box box-primary"> <div class="box-header"> <h3 class="box-title">Add Services</h3> <hr> </div> <form method="post" action="" name="datafrm" id="datafrm" enctype="multipart/form-data"> <div class="box-body"> <div class="row"> <div class="col-lg-9"> <div class="form-group"> <label>Service Name</label> <input class="form-control input-lg" type="text" name="name" id="name" value="<?php echo $res_select['name'];?>" /> </div> <div class="form-group"> <label>Title</label> <input class="form-control input-lg" type="text" name="title" id="title" value="<?php echo $res_select['title'];?>" /> </div> <div class="form-group"> <label>Description</label> <textarea class="form-control input-lg" rows="8" name="description" id="description"/><?php echo $res_select['description'];?></textarea> </div> <div class="form-group"> <label>Service List</label> <textarea id="editor1" name="list" rows="10" cols="80"><?php echo $res_select['list'];?></textarea> </div> <div class="form-group"> <input type="submit" class="btn btn-block btn-primary btn-lg" style="width:140px;" name="datafrmSubmit" id="datafrmSubmit" value="Submit" /> </div> </div> </div> </div> </form> </div> </div> </div> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <?php include("footer-include.php");?> <!-- Control Sidebar --> <?php include("sidebar-include.php");?> <!-- /.control-sidebar --> </div> <!-- ./wrapper --> <!-- jQuery 2.2.0 --> <script src="plugins/jQuery/jQuery-2.2.0.min.js"></script> <!-- Bootstrap 3.3.5 --> <script src="bootstrap/js/bootstrap.min.js"></script> <!-- SlimScroll --> <script src="plugins/slimScroll/jquery.slimscroll.min.js"></script> <!-- FastClick --> <script src="plugins/fastclick/fastclick.js"></script> <!-- AdminLTE App --> <script src="dist/js/app.min.js"></script> <!-- AdminLTE for demo purposes --> <script src="dist/js/demo.js"></script> <!-- CK Editor --> <script src="https://cdn.ckeditor.com/4.4.3/standard/ckeditor.js"></script> <!-- Bootstrap WYSIHTML5 --> <script src="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script> <script> $(function () { // Replace the <textarea id="editor1"> with a CKEditor // instance, using default configuration. CKEDITOR.replace('editor1'); //bootstrap WYSIHTML5 - text editor $(".textarea").wysihtml5(); }); </script> </body> </html>