<?php
include 'dbcon.php';
if(isset($_POST['submit']))

{
    $country=$_POST['country'];
    $college=$_POST['name'];
    $name=$_FILES['photo']['name'];
    $tmp_name=$_FILES['photo']['tmp_name'];
    move_uploaded_file($tmp_name,'images/'.$name);
  $video=$_POST['video'];
   $file=$_POST['file'];
    $file1=$_POST['file1'];
     $file2=$_POST['file2'];
      $file3=$_POST['file3'];
       $file4=$_POST['file4'];
    $query=mysqli_query($con,"insert into college(country,name,photo,video,file,file1,file2,file3,file4) values('$country','$college','$name','$video','$file','$file1','$file2','$file3','$file4')");
    if($query){
        echo"<script>alert('completeed');</script>";
    }
}
?>
<!doctype html>
<html class="no-js" lang="">


<!-- Mirrored from www.radiustheme.com/demo/html/psdboss/global-abroadstudy/global-abroadstudy/admit-form.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 06 Sep 2022 11:11:33 GMT -->
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>Global-abroadstudy | Add Country-Courses </title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Favicon -->
    <link rel="shortcut icon" type="image/x-icon" href="images/logo-mobile.jpg">
    <!-- Normalize CSS -->
    <link rel="stylesheet" href="css/normalize.css">
    <!-- Main CSS -->
    <link rel="stylesheet" href="css/main.css">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <!-- Fontawesome CSS -->
    <link rel="stylesheet" href="css/all.min.css">
    <!-- Flaticon CSS -->
    <link rel="stylesheet" href="fonts/flaticon.css">
    <!-- Animate CSS -->
    <link rel="stylesheet" href="css/animate.min.css">
    <!-- Select 2 CSS -->
    <link rel="stylesheet" href="css/select2.min.css">
    <!-- Date Picker CSS -->
    <link rel="stylesheet" href="css/datepicker.min.css">
    <!-- Custom CSS -->
    <link rel="stylesheet" href="style.css">
        <link rel="stylesheet" href="ckeditor/ckeditor.css">
    <!-- Modernize js -->
    <script src="js/modernizr-3.6.0.min.js"></script>
</head>

<body>
    <!-- Preloader Start Here -->
    <div id="preloader"></div>
    <!-- Preloader End Here -->
    <div id="wrapper" class="wrapper bg-ash">
        <!-- Header Menu Area Start Here -->
        <?php include 'header.php'; ?>
        <!-- Header Menu Area End Here -->
        <!-- Page Area Start Here -->
        <div class="dashboard-page-one">
            <!-- Sidebar Area Start Here -->
          <?php include 'sidebar.php'; ?>
            <!-- Sidebar Area End Here -->
            <div class="dashboard-content-one">
                <!-- Breadcubs Area Start Here -->
                <div class="breadcrumbs-area">
                    <h3>Add Colleges</h3>
                    <ul>
                        <li>
                            <a href="dashboard.php">Home</a>
                        </li>
                        <li>Add Colleges</li>
                    </ul>
                </div>
                <!-- Breadcubs Area End Here -->
                <!-- Admit Form Area Start Here -->
                <div class="card height-auto">
                    <div class="card-body">
                        <div class="heading-layout1">
                            <div class="item-title">
                                <h3>Add College</h3>
                            </div>
                            <!-- <div class="dropdown">
                                <a class="dropdown-toggle" href="#" role="button" data-toggle="dropdown"
                                    aria-expanded="false">...</a>

                                <div class="dropdown-menu dropdown-menu-right">
                                    <a class="dropdown-item" href="#"><i
                                            class="fas fa-times text-orange-red"></i>Close</a>
                                    <a class="dropdown-item" href="#"><i
                                            class="fas fa-cogs text-dark-pastel-green"></i>Edit</a>
                                    <a class="dropdown-item" href="#"><i
                                            class="fas fa-redo-alt text-orange-peel"></i>Refresh</a>
                                </div>
                            </div> -->
                        </div>
                        <form class="new-added-form" method="post" enctype="multipart/form-data">
                            <div class="row">
                            <div class="col-lg-6 col-12 form-group mg-t-30">
                                    <label class="text-dark-medium">Select Country</label>
                                    <select  class="form-control" name="country">
                                        <option value="">Select Country</option>
                                        <?php include 'dbcon.php';
                                        $query=mysqli_query($con,"select * from country");
                                        while($row=mysqli_fetch_array($query)){?>
                                        <option value="<?php echo $row['name'] ?>"><?php echo strtoupper($row['name']); ?></option>
                                        <?php  } ?>
                                    </select>
                                </div>
                                <div class="col-lg-6 col-12 form-group mg-t-30">
                                    <label class="text-dark-medium">Add College Name</label>
                                    <input type="text" class="form-control" name="name">
                                </div>
                                <div class="col-lg-6 col-12 form-group mg-t-30">
                                    <label class="text-dark-medium">Add College Photo</label>
                                    <input type="file" class="form-control" name="photo">
                                </div>
                               <div class="col-lg-6 col-12 form-group mg-t-30">
                                    <label class="text-dark-medium">Add  Videos</label>
                                    <input type="text" class="form-control" placeholder="YOUTUBE LINKS SEPERATE WITH COMMA" name="video">
                                </div>
                                <div class="col-lg-12 col-12 form-group mg-t-30">
                                    <label class="text-dark-medium">Add Fast Facts </label>
                                  <textarea name="file" class="ckeditor"></textarea>
                                </div>
                             
                                <div class="col-lg-12 col-12 form-group mg-t-30">
                                    <label class="text-dark-medium">Add Cost of Study detail </label>
                                  <textarea name="file1" class="ckeditor"></textarea>
                                </div>
                                <div class="col-lg-12 col-12 form-group mg-t-30">
                                    <label class="text-dark-medium">Add Admission detail </label>
                                  <textarea name="file2" class="ckeditor"></textarea>
                             </div>
                                <div class="col-lg-12 col-12 form-group mg-t-30">
                                    <label class="text-dark-medium">Add Cost of living </label>
                                  <textarea name="file3" class="ckeditor"></textarea>
                                </div>
                                 <div class="col-lg-12 col-12 form-group mg-t-30">
                                    <label class="text-dark-medium">Add Faq </label>
                                  <textarea name="file4" class="ckeditor"></textarea>
                                </div>
                              
                                <div class="col-12 form-group mg-t-8">
                                    <button type="submit" name="submit" class="btn-fill-lg btn-gradient-yellow btn-hover-bluedark">Save</button>
                                    <button type="reset" class="btn-fill-lg bg-blue-dark btn-hover-yellow">Reset</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <!-- Admit Form Area End Here -->
               <?php include 'footer.php'; ?>
            </div>
        </div>
        <!-- Page Area End Here -->
    </div>
    <!-- jquery-->
        <script src="ckeditor/ckeditor.js"></script>
    <script src="js/jquery-3.3.1.min.js"></script>
    <!-- Plugins js -->
    <script src="js/plugins.js"></script>
    <!-- Popper js -->
    <script src="js/popper.min.js"></script>
    <!-- Bootstrap js -->
    <script src="js/bootstrap.min.js"></script>
    <!-- Select 2 Js -->
    <script src="js/select2.min.js"></script>
    <!-- Date Picker Js -->
    <script src="js/datepicker.min.js"></script>
    <!-- Scroll Up Js -->
    <script src="js/jquery.scrollUp.min.js"></script>
    <!-- Custom Js -->
    <script src="js/main.js"></script>

</body>


<!-- Mirrored from www.radiustheme.com/demo/html/psdboss/global-abroadstudy/global-abroadstudy/admit-form.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 06 Sep 2022 11:11:34 GMT -->
</html>