ok
Direktori : /home/u528428458/domains/jinews.co.in/public_html/ |
Current File : /home/u528428458/domains/jinews.co.in/public_html/upload_news.php |
<?php session_start(); if(!isset($_SESSION['kheti'])) { header("location:login.php"); } $uname = $_SESSION['kheti']; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/> <meta name="description" content=""/> <meta name="author" content=""/> <title>Journalist Investigation News</title> <!--favicon--> <link rel="icon" href="cadmin/assets/images/favicon.ico" type="image/x-icon"> <!-- simplebar CSS--> <link href="cadmin/assets/plugins/simplebar/css/simplebar.css" rel="stylesheet"/> <!-- Bootstrap core CSS--> <link href="cadmin/assets/css/bootstrap.min.css" rel="stylesheet"/> <!-- animate CSS--> <link href="cadmin/assets/css/animate.css" rel="stylesheet" type="text/css"/> <!-- Icons CSS--> <link href="cadmin/assets/css/icons.css" rel="stylesheet" type="text/css"/> <!-- Sidebar CSS--> <link href="cadmin/assets/css/sidebar-menu.css" rel="stylesheet"/> <!-- Custom Style--> <link href="cadmin/assets/css/app-style.css" rel="stylesheet"/> <link rel="stylesheet" href="cadmin/assets/plugins/summernote/dist/summernote-bs4.css"/> <style>.note-btn{ background: #323c46 !important;}</style> </head> <body class="bg-theme bg-theme1"> <!-- Start wrapper--> <div id="wrapper"> <!-- header--> <?php include("cadmin/head.php"); ?> <!--End header--> <div class="clearfix"></div> <div class="content-wrapper"> <div class="container-fluid"> <div class="row pt-2 pb-2"> <div class="col-sm-12"> <h4 class="page-title">Upload News</h4> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="javaScript:void();">Dashboard</a></li> <li class="breadcrumb-item active" aria-current="page">Upload News</li> </ol> </div> </div> <?php @$cc = $_GET['c']; if($cc == '1') { echo "<p style='color: #0fa70c;font-weight: bold; text-align: center; font-size: 16px;'>Details Successfully Submitted.</p>"; } elseif($cc == '2') { echo "<p style='color: red;font-weight: bold; text-align: center; font-size: 16px;'>Details don't saved.</p>"; } ?> <div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-body"> <div class="card-title">Upload News</div> <hr> <form method='post' action='save_news.php' enctype='multipart/form-data'> <div class='item form-group'> <label class='control-label' for='name'> Category*</label> <div class=''> <select id='category' class='form-control' name='category'> <?php $sql = $MySQLiconn->query('select * from category order by id ASC'); $count = $sql->num_rows; $i=1; while($row = $sql->fetch_array()) { $catid = $row['catid']; $category = $row['category']; ?> <option value="<?php echo $catid; ?>"> <?php echo $category; ?> </option> <?php } ?> </select> </div> </div> <div class='item form-group'> <label class='control-label' for='name'> Headline*</label> <div class=''> <input id='headline' class='form-control' name='headline' placeholder='Enter Headline' required='required' type='text'> </div> </div> <div class='item form-group'> <label class='control-label' for='name'> Subheading*</label> <div class=''> <input id='subheading' class='form-control' name='subheading' placeholder='Enter Subheading' type='text'> </div> </div> <div class='item form-group'> <label class='control-label' for='name'> Description*</label> <div class=''> <!-- <textarea id='des' class='form-control' name='des' placeholder='Enter Description' required></textarea> --> <textarea name="summernoteEditor" id="summernoteEditor" required></textarea> </div> </div> <div class='item form-group'> <label class='control-label' for='name'> Bite</label> <div class=''> <input id='bite' class='form-control' name='bite' type='text'> </div> </div> <div class='item form-group'> <label class='control-label' for='name'> Bite's Name</label> <div class=''> <input id='bitename' class='form-control' name='bitename' type='text'> </div> </div> <div class='item form-group'> <label class='control-label' for='name'> Video Url</label> <div class=''> <input id='url' class='form-control' name='url' placeholder='Enter Video Url' type='text'> </div> </div> <div class='item form-group'> <label class='control-label' for='name'> Upload Pic * </label> <div class=''> <input id='file' class='form-control' name='file' placeholder='' required='required' type='file'> </div> </div> <br/> <input type='submit' name='uploadnews' style='width:100%;' class='btn btn-primary' /> </form> </div> </div> </div> </div> </div> <!-- End container-fluid--> </div> <!--End content-wrapper--> <!--Start Back To Top Button--> <a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a> <!--End Back To Top Button--> <!--Start footer--> <?php include("cadmin/foot.php"); ?> <!--End footer--> </div> <!--End wrapper--> <!-- Bootstrap core JavaScript--><script src="cadmin/assets/js/jquery.min.js"></script> <script src="cadmin/assets/js/popper.min.js"></script> <script src="cadmin/assets/js/bootstrap.min.js"></script> <!-- simplebar js --> <script src="cadmin/assets/plugins/simplebar/js/simplebar.js"></script> <!-- sidebar-menu js --> <script src="cadmin/assets/js/sidebar-menu.js"></script> <!-- Custom scripts --> <script src="cadmin/assets/js/app-script.js"></script> <!-- Chart js --> <script src="cadmin/assets/plugins/Chart.js/Chart.min.js"></script> <!-- Index2 js --> <script src="cadmin/assets/js/index2.js"></script> <script src="cadmin/assets/plugins/summernote/dist/summernote-bs4.min.js"></script> <script> $('#summernoteEditor').summernote({ placeholder: 'enter directions here...', height: 300, callbacks: { onImageUpload : function(files, editor, welEditable) { for(var i = files.length - 1; i >= 0; i--) { sendFile(files[i], this); } } } }); function sendFile(file, el) {var form_data = new FormData();form_data.append('file', file);$.ajax({ data: form_data, type: "POST", url: 'editor-upload.php', cache: false, contentType: false, processData: false, success: function(url) { $(el).summernote('editor.insertImage', url); }});} </script> </body> </html>