KUJUNTI.ID MINISH3LL
Path : /home/jpenter/conceptacademicclasses.com/admin/
(S)h3ll Cr3at0r :
F!le Upl0ad :

B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H

Current File : /home/jpenter/conceptacademicclasses.com/admin/add_page.php


<?php


if(!isset($_SERVER['HTTP_REFERER'])){
    // redirect them to your desired location
    header('location:../admin/index.php');
    exit;
}

include_once 'dbconfig.php';

if(isset($_POST['btn-save']))
{
 // variables for input data
     $page_name = $_POST['page_name'];
      $image =  $_FILES["image"]["name"];
 $file_name = $_FILES["image"]["name"];
$file_tmp = $_FILES["image"]["tmp_name"];
  if($file_name!=''){
        move_uploaded_file($file_tmp,"uploads/page/".$file_name);
  }
      $section1_title = $_POST['section1_title'];
      $section1_content = $_POST['section1_content'];
      $section2_title = $_POST['section2_title'];
      $section2_content = $_POST['section2_content'];
    // variables for input data

 // sql query for inserting data into database
 
$sql_query="INSERT INTO page (`page_name`,`image`,`section1_title`,`section1_content`,`section2_title`,`section2_content`) VALUES('".$page_name."','".$image."','".$section1_title."','".$section1_content."','".$section2_title."','".$section2_content."')";
 // sql query for inserting data into database
 
 // sql query execution function
 if(mysqli_query($con,$sql_query))
 {
  ?>
  <script type="text/javascript">
  alert('page added Successfully ');
  window.location.href='page.php';
  </script>
  <?php
 }
 else
 {
  ?>
  <script type="text/javascript">
  alert('error occured while inserting your data');
  </script>
  <?php
 }
 // sql query execution function
}
?>

<?php include('header.php'); ?>
        <!-- ============================================================== -->
        <!-- End Left Sidebar - style you can find in sidebar.scss  -->
        <!-- ============================================================== -->
        <!-- ============================================================== -->
        <!-- Page wrapper  -->
        <!-- ============================================================== -->
        <div class="page-wrapper">
            <!-- ============================================================== -->
            <!-- Bread crumb and right sidebar toggle -->
            <!-- ============================================================== -->
            <div class="page-breadcrumb">
                <div class="row">
                    <div class="col-12 d-flex no-block align-items-center">
                        <h4 class="page-title">Extra Pages</h4>
                        <div class="ml-auto text-right">
                            <nav aria-label="breadcrumb">
                                <ol class="breadcrumb">
                                    <li class="breadcrumb-item"><a href="#">Pages</a></li>
                                    <li class="breadcrumb-item active" aria-current="page">Add</li>
                                </ol>
                            </nav>
                        </div>
                    </div>
                </div>
            </div>
            <!-- ============================================================== -->
            <!-- End Bread crumb and right sidebar toggle -->
            <!-- ============================================================== -->
            <!-- ============================================================== -->
            <!-- Container fluid  -->
            <!-- ============================================================== -->
            <div class="container-fluid">
                <!-- ============================================================== -->
                <!-- Start Page Content -->
                <!-- ============================================================== -->
                <div class="row">
                    <div class="col-md-8">
                        <div class="card">
                            <form class="form-horizontal" enctype="multipart/form-data" method="post">
                                <div class="card-body">
                                    <h4 class="card-title">Personal Info</h4>
                                    <div class="form-group row">
                                        <label for="fname" class="col-sm-3 text-right control-label col-form-label">Page Name</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="page_name" name="page_name" required placeholder="Page_name">
                                        </div>
                                    </div>
									<div class="form-group row">
                                    <label class="col-sm-3 text-right control-label col-form-label">Image</label>
                                    <div class="col-md-9">
                                        <div class="custom-file">
                                            <input type="file" class="custom-file-input" id="image" name="image">
                                            <label class="custom-file-label" for="validatedCustomFile">Choose file...</label>
                                            
                                        </div>
                                    </div>
                                </div>
                                    <div class="form-group row">
                                        <label for="lname" class="col-sm-3 text-right control-label col-form-label">Section 1 Title</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="section1_title" name="section1_title"  placeholder="Section1_title">
                                        </div>
                                    </div>
                                    <div class="form-group row">
                                        <label for="lname" class="col-sm-3 text-right control-label col-form-label">Section 1 Content</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="section1_content" name="section1_content">
                                        </div>
                                    </div>
									<div class="form-group row">
                                        <label for="lname" class="col-sm-3 text-right control-label col-form-label">Section 2 Title</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="section2_title" name="section2_title" placeholder="Section2_title">
                                        </div>
                                    </div>
                                    <div class="form-group row">
                                        <label for="lname" class="col-sm-3 text-right control-label col-form-label">Section 2 Content</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="section2_content" name="section2_content">
                                        </div>
                                    </div>
                                    
									
                                
                                </div>
                                <div class="border-top">
                                    <div class="card-body" style="float:right;">
                                        <button type="submit" name="btn-save"class="btn btn-success">Submit</button>
										
                                    </div>
                                </div>
                            </form>
                        </div>
                        
                        
                </div>
                
                <!-- ============================================================== -->
                <!-- End PAge Content -->
                <!-- ============================================================== -->
                <!-- ============================================================== -->
                <!-- Right sidebar -->
                <!-- ============================================================== -->
                <!-- .right-sidebar -->
                <!-- ============================================================== -->
                <!-- End Right sidebar -->
                <!-- ============================================================== -->
            </div>
            <!-- ============================================================== -->
            <!-- End Container fluid  -->
            <!-- ============================================================== -->
            <!-- ============================================================== -->
            <!-- footer -->
            <!-- ============================================================== -->
            <?php include('footer.php'); ?>

© KUJUNTI.ID