PK

ADDRLIN : /home/questend/public_html/domains/rwa40.com/admin/news-events/
FLL :
Current File : /home/questend/public_html/domains/rwa40.com/admin/news-events/create-past-event.php

<?php
   ob_start();
   //error_reporting(E_ALL ^ E_NOTICE);
   @session_start();
   ini_set('allow_url_include',1);    
   date_default_timezone_set("Asia/Kolkata");
   set_time_limit(600);
   ini_set('max_execution_time',600);
   include '../includes/settings/constant.php';
   //include '../includes/settings/db.php';
   require_once '../includes/settings/PDODB.php';
   include '../includes/modules/functions.php';
   
   if (!empty($_SESSION['adminId']) && !empty($_SESSION['admin_role_id'])) {
     if($_SESSION['admin_role_id']==1){
      //header("Location: index.php");
    }elseif($_SESSION['admin_role_id']==2){
      header("Location: ../dashboard/index.php");
    }
   }else{
    header("Location: ../index.php");
    exit();
   }

   $function = new FUNCTIONS();
   
   if(isset($_POST['btnAddpast']) && !empty($_POST)){
        //print_r($_FILES); //exit;        
        $title = !empty($_POST['title'])?trim($_POST['title']):"";
        $title = htmlentities($title, ENT_QUOTES);
        $file = $_FILES['file'];
        $descripation = !empty($_POST['descripation'])?trim($_POST['descripation']):"";
        $descripation = htmlentities($descripation, ENT_QUOTES);
        $news_date = !empty($_POST['news_date'])?trim($_POST['news_date']):"";
        
        $error_msg = "";
        $ipaddress = $function->getRealIpAddr();
      
        $newfilename = uniqid('pastEvent-',false);
        $foldername = "../uploads/past-event/";
        $imggg = $function->uploadFile($newfilename, $foldername, 'file');
        //print_r($imggg[2]); exit();
        $pdodb = PDODB::getInstance();
        //echo "cmdm"; exit;
        $sql = "INSERT INTO tb_past_event  SET title='".$title."',descripation='".$descripation."',news_date='".$news_date."',file='".$imggg[2]."',ipaddress='".$ipaddress."'";
        //print_r($sql); exit;
        $result = $pdodb->query($sql);
        //print_r($result); exit;
        PDODB::closeInstance();
        if($result) {
          header("Location: past-events.php");
        }
    }
?>
<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>INSPINIA | Basic Form</title>
      <?php include_once '../layout/style.php'; ?>
   </head>
   <body>
      <div id="wrapper">
         <?php include_once '../layout/side-bar.php'; ?>
         <div id="page-wrapper" class="gray-bg">
            <div class="row border-bottom">
               <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                  <div class="navbar-header">
                     <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
                     <form role="search" class="navbar-form-custom" action="search_results.html">
                        <div class="form-group">
                           <input type="text" placeholder="Search for something..." class="form-control" name="top-search" id="top-search">
                        </div>
                     </form>
                  </div>
                  <ul class="nav navbar-top-links navbar-right">
                     <li>
                        <span class="m-r-sm text-muted welcome-message">Welcome to INSPINIA+ Admin Theme.</span>
                     </li>
                     <li class="dropdown">
                        <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#">
                        <i class="fa fa-envelope"></i>  <span class="label label-warning">16</span>
                        </a>
                        <ul class="dropdown-menu dropdown-messages">
                           <li>
                              <div class="dropdown-messages-box">
                                 <a href="#" class="pull-left">
                                 <img alt="image" class="img-circle" src="../img/a7.jpg">
                                 </a>
                                 <div class="media-body">
                                    <small class="pull-right">46h ago</small>
                                    <strong>Mike Loreipsum</strong> started following <strong>Monica Smith</strong>. <br>
                                    <small class="text-muted">3 days ago at 7:58 pm - 10.06.2014</small>
                                 </div>
                              </div>
                           </li>
                           <li class="divider"></li>
                           <li>
                              <div class="dropdown-messages-box">
                                 <a href="#" class="pull-left">
                                 <img alt="image" class="img-circle" src="../img/a4.jpg">
                                 </a>
                                 <div class="media-body ">
                                    <small class="pull-right text-navy">5h ago</small>
                                    <strong>Chris Johnatan Overtunk</strong> started following <strong>Monica Smith</strong>. <br>
                                    <small class="text-muted">Yesterday 1:21 pm - 11.06.2014</small>
                                 </div>
                              </div>
                           </li>
                           <li class="divider"></li>
                           <li>
                              <div class="dropdown-messages-box">
                                 <a href="#" class="pull-left">
                                 <img alt="image" class="img-circle" src="../img/profile.jpg">
                                 </a>
                                 <div class="media-body ">
                                    <small class="pull-right">23h ago</small>
                                    <strong>Monica Smith</strong> love <strong>Kim Smith</strong>. <br>
                                    <small class="text-muted">2 days ago at 2:30 am - 11.06.2014</small>
                                 </div>
                              </div>
                           </li>
                           <li class="divider"></li>
                           <li>
                              <div class="text-center link-block">
                                 <a href="mailbox.html">
                                 <i class="fa fa-envelope"></i> <strong>Read All Messages</strong>
                                 </a>
                              </div>
                           </li>
                        </ul>
                     </li>
                     <li class="dropdown">
                        <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#">
                        <i class="fa fa-bell"></i>  <span class="label label-primary">8</span>
                        </a>
                        <ul class="dropdown-menu dropdown-alerts">
                           <li>
                              <a href="mailbox.html">
                                 <div>
                                    <i class="fa fa-envelope fa-fw"></i> You have 16 messages
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                 </div>
                              </a>
                           </li>
                           <li class="divider"></li>
                           <li>
                              <a href="#">
                                 <div>
                                    <i class="fa fa-twitter fa-fw"></i> 3 New Followers
                                    <span class="pull-right text-muted small">12 minutes ago</span>
                                 </div>
                              </a>
                           </li>
                           <li class="divider"></li>
                           <li>
                              <a href="grid_options.html">
                                 <div>
                                    <i class="fa fa-upload fa-fw"></i> Server Rebooted
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                 </div>
                              </a>
                           </li>
                           <li class="divider"></li>
                           <li>
                              <div class="text-center link-block">
                                 <a href="notifications.html">
                                 <strong>See All Alerts</strong>
                                 <i class="fa fa-angle-right"></i>
                                 </a>
                              </div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <a href="login.html">
                        <i class="fa fa-sign-out"></i> Log out
                        </a>
                     </li>
                  </ul>
               </nav>
            </div>
            <div class="row wrapper border-bottom white-bg page-heading">
               <div class="col-lg-10">
                  <h2>Add Past Event Form</h2>
                  <ol class="breadcrumb">
                     <li>
                        <a href="index.html">Home</a>
                     </li>
                     <li>
                        <a>Forms</a>
                     </li>
                     <li class="active">
                        <strong>Add Past Event</strong>
                     </li>
                  </ol>
               </div>
               <div class="col-lg-2">
               </div>
            </div>           
            <div class="row">
               <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title  back-change">
                        <!-- <h5>Image cropper <small>http://fengyuanchen.github.io/cropper/</small></h5> -->
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                <i class="fa fa-wrench"></i>
                            </a>
                            <ul class="dropdown-menu dropdown-user">
                                <li><a href="#">Config option 1</a>
                                </li>
                                <li><a href="#">Config option 2</a>
                                </li>
                            </ul>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                          <form method="POST" action="" enctype="multipart/form-data" id="addnews">
                            <div class="col-sm-6 b-r">
                              <div class="form-group"><label>Title</label> <input type="text" placeholder="Enter Title" name="title" id="title" class="form-control">
                              </div>
                              <div class="form-group"><label>Descripation</label> <textarea class="form-control" rows="5" id="comment" name="descripation"></textarea>
                              </div>
                              <div class="form-group">
                               <input type="date" name="news_date" id="news_date" class="form-control">
                              </div>
                              <div>
                                <button class="btn btn-sm btn-primary pull-right m-t-n-xs" name="btnAddpast" id="btnAddpast" type="submit"><strong>Submit</strong></button>
                              </div>
                            </div>
                            <div class="col-md-6">
                                <h4>Preview image</h4>
                                <div class="img-preview img-preview-sm" style="margin-bottom: 10px;"><img alt="Image Display Here" id="test" src="../img/350x250.png" style="min-width: 0px !important; min-height: 0px !important; max-width: none !important; max-height: none !important; width: 250px; height: 167px; margin-left: -25px; margin-top: -22px;"></div>
                                <form id="form1" runat="server">
                                  <input type="file" id="file" class="btn btn-primary" onchange="readURL(this);" name="file">
                                </form>
                            </div>
                          </form>
                        </div>
                    </div>
                </div>
            </div>
            </div>
         </div>         
      </div>
      <?php include_once '../layout/script.php'; ?>
      <script>
         function tossterMsgAlert(msg='Welcome',title='') {
             toastr.options = {
                 closeButton: true,
                 //debug: false,
                 newestOnTop: false,
                 //progressBar: false,
                 positionClass: 'toast-top-center',
                 preventDuplicates: true,
                 //onclick: null,
                 //showDuration: 300,
                 //hideDuration: 1000,
                 timeOut: 2000,
                 //extendedTimeOut: 1000,
                 //showEasing: 'swing',
                 //hideEasing: 'linear',
                 //showMethod: 'fadeIn',
                 hideMethod: 'fadeOut'
             };
             toastr.warning(title,msg);
         }
      </script>
      <script type="text/javascript">     
        $("#addnews").validate({
          rules: {
              title: {
                  required: true
              },
              news_date: {
                  required: true
              },
              file: {
                  required: true
              }
          },
          messages: {
              title: {
                  required: "Please Enter News Title"
              },
              news_date: {
                  required: "Please Enter the Date"
              },
              file: {
                  required: "Please Upload Photo"
              }       
          },
          submitHandler: function(form) { 
            form.submit();
          }   
        });
      </script>
      <script type="text/javascript">
         function readURL(input) {
          if (input.files && input.files[0]) {
              var reader = new FileReader();
              reader.onload = function (e) {
              $('#test').attr('src', e.target.result);
             }
              reader.readAsDataURL(input.files[0]);
             }
          };
      </script>
   </body>
</html>


PK 99
E-SHOP || DASHBOARD
404

Page Not Found

It looks like you found a glitch in the matrix...

← Back to Home