ok

Mini Shell

Direktori : /home/importfo/public_html/importfolio.in/admin/
Upload File :
Current File : /home/importfo/public_html/importfolio.in/admin/hotels.php

    <?php include("function.php") ?>

    <!DOCTYPE html>
    <html>
        <head>
             <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
       <meta http-equiv="Pragma" content="no-cache" />
       <meta http-equiv="Expires" content="0" />
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <meta name="description" content="">
            <meta name="author" content="">

            <link rel="shortcut icon" href="images/favicon_1.png">
            <title>Hotels</title>
            <!-- Base Css Files -->
            <link href="css/bootstrap.min.css" rel="stylesheet" />
            <!-- Font Icons -->
            <link href="assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
            <link href="assets/ionicon/css/ionicons.min.css" rel="stylesheet" />
            <link href="css/material-design-iconic-font.min.css" rel="stylesheet">

            <!-- animate css -->
            <link href="css/animate.css" rel="stylesheet" />

            <!-- Waves-effect -->
            <link href="css/waves-effect.css" rel="stylesheet">

            <!-- Custom Files -->
            <link href="css/helper.css" rel="stylesheet" type="text/css" />
            <link href="css/style.css" rel="stylesheet" type="text/css" />

            <script src="js/modernizr.min.js"></script>
            <link href="assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
            <link href="assets/select2/select2.css" rel="stylesheet" type="text/css" />
            <script src="https://cdn.ckeditor.com/4.14.1/standard/ckeditor.js"></script>
            
        </head>



        <body class="fixed-left">
            
            <!-- Begin page -->
            <div id="wrapper">
            
                <!-- Top Bar Start -->
               <?php include("top.php"); ?>
                <!-- Top Bar End -->


                <!-- ========== Left Sidebar Start ========== -->
                <?php include("sidebar.php"); ?>
                <!-- Left Sidebar End --> 



                <!-- ============================================================== -->
                <!-- Start right Content here -->
                <!-- ============================================================== -->                      
                <div class="content-page">
                    <!-- Start content -->
                    <div class="content">
                        <div class="container">

                            <!-- Page-Title -->
                            <div class="row">
                                <div class="col-sm-12">
                                    <h4 class="pull-left page-title">Dentist </h4>
                                    <ol class="breadcrumb pull-right">
                                        <li><a href="dashboard.php">Dashboard</a></li>
                                        <li class="active">Dentist </li>
                                    </ol>
                                </div>
                            </div>
                             <?php 
                                if(isset($_GET['delete']))
                                {
                                  $delete=$_GET['delete'];
                                }
                                else
                                {
                                  $delete=0;
                                  
                                }
                                  $sql="delete from hotels where a_id='$delete'";
                                  $res=mysqli_query($db,$sql);
                                ?>


                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="panel panel-default">
                                        <div class="panel-heading"><h3 class="panel-title">Add image</h3></div>
                                        <div class="panel-body">
                                            <form class="form-horizontal" role="form" method="post" enctype="multipart/form-data">            
                                              
                                              
                                              
                                               <div class="form-group">
                                                    <label class="col-md-2 control-label">SM link</label>
                                                    <div class="col-md-6"> 
                                                        <input type="text" class="form-control" name="link" value="<?php echo $row['link'] ?>" placeholder="Link" required> 
                                                    </div>
                                                </div> 
                                                
                                                
                                              
                                             <div class="form-group">
                                                    <label class="col-md-2 control-label">Select City</label>
                                                    <div class="col-md-6"> 
                                                                                    
                                    <select name="city" class="form-control">
                                     <option value="ahmedabad">Ahmedabad</option>
                                     <option value="gandhinagar">Gandhinaga</option>
                                     <option value="baroda">Baroda</option>
                                     <option value="surat">Surat</option>
                                      <option value="rajkot">Rajkot</option>
                                    <option value="mumbai">Mumbai</option>
                                        <option value="dilhi">Dilhi</option>
                                    </select>
                                
                                                     
                                                    </div>
                                                </div> 
                                                
                                 
                                              
                                                 <div class="form-group">
                                                        <label class="col-md-2 control-label">Post</label>
                                                        <div class="col-md-3">
                                                            <div class="fileUpload btn btn-primary waves-effect waves-light">
                                                                <span>upload image here...</span>
                                                                <input type="file" name="image[]" required="" multiple class="upload">
                                                            </div>
                                                        </div>
                                                        <div class="col-md-4">
                                                            <img src="upload/<?php echo $row['app_image']; ?>" style="width: 100px;">
                                                        </div>

                                                    </div>

                                                <div class="form-group">
                                                    <label class="col-md-2 control-label"></label>
                                                    <div class="col-md-10">
                                                      <button type="submit" name="<?php if(isset($_GET['edit'])){ echo "Update"; }else { echo "Submit";} ?>" class="btn btn-purple waves-effect waves-light"><?php if(isset($_GET['edit'])){ echo "Update"; }else { echo "Submit";} ?></button>
                                                    </div>
                                                </div>
                                            </form>
                                             <?php
                                                if(isset($_POST['Submit']))
                                                {
                                                    $link=$_POST['link'];
                                                   
                                                    $city=$_POST['city'];
                                                   
                                                    $imgc = count($_FILES['image']['name']);
                                                    for ($i=0;$i<$imgc;$i++) 
                                                {
                                                    $target = "upload/";
                                                   
                                                    $photoname = ($_FILES['image']['name'][$i]);
                                                      $rename = uniqid(rand()).$photoname;
                                                    $file = $rename;
                                                     date_default_timezone_set('Asia/Kolkata');
                                                     $currentTime = date( 'd-m-Y h:i:s A', time () );
                                                    $sql="INSERT INTO `hotels` (`a_id`, `app_image`,`link`,`city`) VALUES (NULL,'$file','$link','$city')";
                                                    $res=mysqli_query($db,$sql);
                                                    if($res && compress($_FILES['image']['tmp_name'][$i], $target.$rename,10))
                                                    {
                                                        echo ("<script LANGUAGE='JavaScript'>window.alert('Succesfully added.!!');window.location.href='hotels.php';</script>");
                                                    }
                                                    else
                                                    {
                                                        echo ("<script LANGUAGE='JavaScript'>window.alert('data Not Save.!!');window.location.href='hotels.php';</script>");
                                                    }
                                                    
                                                    }
                                                }
                                            ?>
                                            
                                           
                                        </div> <!-- panel-body -->
                                    </div> <!-- panel -->
                                </div> <!-- col -->
                            </div> <!-- End row -->


                                <div class="row">
                                <div class="col-md-12">
                                    <div class="panel panel-default">
                                        <div class="panel-heading">
                                            <h3 class="panel-title">View Post</h3>
                                            
                                        </div>
                                        
                                        <div class="panel-body">
                                            <div class="row">
                                                <div class="col-md-12 col-sm-12 col-xs-12">
                                                    <table id="datatable" class="table table-striped table-bordered">
                                                        <thead>
                                                            <tr>
                                                                <th>Id</th>
                                                              
                                                                <th>Image</th>
                                                                <th>Link</th>
                                                                 
                                                                <th>Setting</th>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                            <?php
                                                $sql="SELECT * from hotels";
                                                $res=mysqli_query($db,$sql);
                                             while($row=mysqli_fetch_array($res))
                                                                {
                                                            ?>
                                                            <tr>
                                                                <td><?php echo $row['a_id']; ?></td>
                                                            
                                                                
                                                                <td><img src="upload/<?php echo $row['app_image']; ?>" style="width: 100px;"></td>
                                                <td><?php echo $row['link']; ?></td>
                                                 
                                                               <td>
                                                                    <a href="hotels.php?delete=<?php echo $row['a_id']; ?>">
                                                                        <button class="btn btn-icon waves-effect waves-light btn-danger m-b-5" onclick="return confirm('Are you sure you want to delete this item?');"> <i class="fa fa-remove"></i> </button>
                                                                    </a>
                                                                </td>
                                                            </tr>
                                                        <?php } ?>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                            </div> <!-- End Row -->
                        </div> <!-- container -->
                                   
                    </div> <!-- content -->

                    <?php include("footer.php") ?>

                </div>
                <!-- ============================================================== -->
                <!-- End Right content here -->
                <!-- ============================================================== -->


              


            </div>
            <!-- END wrapper -->
        
            <script>
                var resizefunc = [];
            </script>

            <!-- jQuery  -->
            <script src="js/jquery.min.js"></script>
            <script src="js/bootstrap.min.js"></script>
            <script src="js/waves.js"></script>
            <script src="js/wow.min.js"></script>
            <script src="js/jquery.nicescroll.js" type="text/javascript"></script>
            <script src="js/jquery.scrollTo.min.js"></script>
            <script src="assets/jquery-detectmobile/detect.js"></script>
            <script src="assets/fastclick/fastclick.js"></script>
            <script src="assets/jquery-slimscroll/jquery.slimscroll.js"></script>
            <script src="assets/jquery-blockui/jquery.blockUI.js"></script>


            <!-- CUSTOM JS -->
            <script src="js/jquery.app.js"></script>
            <script src="assets/datatables/jquery.dataTables.min.js"></script>
            <script src="assets/datatables/dataTables.bootstrap.js"></script>
            <script type="text/javascript">
                $(document).ready(function() {
                    $('#datatable').dataTable();
                } );
            </script>
             <script type="text/javascript">
                jQuery(document).ready(function() {
                jQuery(".select2").select2({
                        width: '100%'
                    });
                 });
            </script>
            <script>
                CKEDITOR.replace( 'editor1' );
            </script>
            <script>
                CKEDITOR.replace( 'editor2' );
            </script>
            <script src="assets/select2/select2.min.js" type="text/javascript"></script>
            <!-- CUSTOM JS -->
            
            <script type="text/javascript" src="assets/bootstrap-wysihtml5/wysihtml5-0.3.0.js"></script>
            <script type="text/javascript" src="assets/bootstrap-wysihtml5/bootstrap-wysihtml5.js"></script>
            <script src="//cdn.ckeditor.com/4.11.1/standard/ckeditor.js"></script>
            <!--form validation init-->
            <script src="https://cdn.ckeditor.com/[version.number]/[distribution]/ckeditor.js"></script>

           

        </body>
    </html>

Zerion Mini Shell 1.0