<?php include("parent/callMe.php"); ?>
<?php include("sessioncheck.php"); ?>
<?php   


 $m->where("page_name", $pageName);
 $pageNameAccess=$m->get("eduportal_modules_pages_detail");


$m->where("user_id", $_SESSION['user_id']);
$m->where ("branch_id", $_SESSION['branch']);
$m->where("page_id", $pageNameAccess[0]['page_id']);
$access = $m->get("users_privilege_detail");



 $date;
if($_REQUEST['diaryDate']!=" " && $_REQUEST['diaryDate']!=NULL ) {
        $date=date("Y-m-d",strtotime($_REQUEST['diaryDate']));  

      }else {
        $date=date("Y-m-d");  
      }
?>

<!DOCTYPE html>
<html lang="en">
<head>

<title>Add Suggestion | Eduportal</title>

<?php include('RootMe/css_links.php');?>

</head>

<body class="nav-md">
<div class="container body">
<div class="main_container">
<div class="col-md-3 left_col">

<?php include('RootMe/sidebar.php');?>
<?php include('RootMe/header.php');?>


<!-- page content -->
<div class="right_col" role="main">
  <br>
 <a href="suggestions_dashboard.php">Suggestion Dashboard </a> &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp; 
            Add Suggestions Log

<div class="row" style="background-color: white;">

<section class="add_sub_agent" id="table_sub_agent">
<div class="container">

<div class="" style="margin-top:10px;">

<!-- page content -->

<div class="">
<div class="page-title">

<div class="title_left">

  <h2 class="col-md-offset-1">Add Suggestion </h2>

</div>

</div>

<div class="clearfix"></div>
<div class="row">

<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">

<div class="x_content">


<form action="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php" method="post" enctype="multipart/form-data" class="form-horizontal form-label-left" >
<?php

$month;
$posted_date;
if(!isset($_GET['tikup'])){

$posted_date=date('Y-m-d');
?>
<input type="hidden" name="action" value="addSuggestion" />

<?php $month=date("m");}else {

$query="select * from eduportal_suggestions_center where suggest_id =".$_GET['tikup'];
$ticketdata = $m->query($query);

$month=$ticketdata[0]['month_id'];

$posted_date=$ticketdata[0]['posted_date'];
?>
<input type="hidden" name="action" value="updateSuggestion" />
<input type="hidden" name="suggest_id"  value="<?php echo $_GET['tikup'];?>">

<?php } ?>        
   

<div class="col-md-4 col-sm-3 col-xs-12" style="margin-top:8px;" >

<div class="form-group" >

<label  class="control-label" >  Module <span class="required">*</span></label>



<div class="form-group" >


<select name="modules_id" class="chosen-multi-select form-control"  >
<option value="">Select Module</option>

<?php
$query="select * From eduportal_modules_detail";

$modules = $m->query($query);

foreach($modules as $module) { ?>

<option <?php if($ticketdata[0]['module_id']==$module['modules_id']){echo "selected";} ?>   value="<?php echo $module['modules_id']; ?>"><?php echo $module['modules_name']; ?></option>

<?php } ?>


</select>
</div>

</div>
</div> 


<div class="col-md-4 col-sm-12 col-xs-12" style="padding:8px; float:left;  margin-top:3px;"  id="col1">
<div class="form-group ">
<label class="required"> Priority</label>
<select id="medium" name="priority" class="chosen-multi-select form-control">

<option value="">Select Priority   </option>
<option <?php if($ticketdata[0]['priority']=="High"){echo "Selected";} ?> value="High">High</option>
<option <?php if($ticketdata[0]['priority']=="Medium"){echo "Selected";} ?> value="Medium">Medium</option> 
<option <?php if($ticketdata[0]['priority']=="Low"){echo "Selected";} ?> value="Low">Low</option>                   

</select>

</div>
</div>

<div class="col-md-4 col-sm-12 col-xs-12" style="margin-top: 11px;">
<div class="form-group ">
<label class="required"> Posted Date</label>

<input type="date" name="posted_date" value="<?php echo $posted_date;?>" class="form-control">

</div>
</div>

<div class="row">

 <div class="col-md-12 col-sm-12 col-xs-12">


<div class="col-md-4 col-sm-12 col-xs-12">
<div class="form-group ">

<label class="required"> Suggestion Title</label>
<input class="form-control col-md-7 col-xs-12"  name="suggest_title" placeholder="eg Write Query Title " value="<?php echo $ticketdata[0]['suggest_title']; ?>">

</div>
</div>

<div class="col-md-4 col-sm-12 col-xs-12" style="margin-bottom: 2em;">
<div class="form-group ">

<label class="required"> Portal</label>
<input class="form-control col-md-7 col-xs-12" disabled="" name="portal" value="AdminPortal">

</div>
</div>

<?php

if(!isset($_GET['tikup'])){?>


<div class="col-md-4 col-sm-12 col-xs-12" style="float:left;" >
<div class="form-group ">

<label> Upload Image</label>
<input type="file" class="form-control has-feedback-left" name="img_file" value="<?php echo $ticketdata[0]['images']; ?>" id="img_file" />

</div>
</div>

<?php } ?> 

</div>
</div>





<div class="item form-group">
<div class="col-md-12 col-sm-12 col-xs-12">
<textarea id="textarea" required="required" name="description" class="ckeditor"> <?php echo $ticketdata[0]['description']; ?></textarea>
</div>
</div>





<div class="ln_solid" style="border-top:none;"></div>
<div class="form-group">
<div class="col-md-6 col-md-3 pull-left">

<button id="send" type="submit" class="btn btn-primary" >Submit</button>
<a href="view_suggest.php"><button type="button" class="btn btn-primary" >Cancel</button> </a>

</div>
</div>

</form>

</div>
</div>
</div>
</div>
</div>



<!-- /page content -->



<!-- /page content -->



</div>
<div class="clearfix"></div>
</section>           

</div>
</div>


</div>
</div>

    <!-- jQuery -->
    <script src="../vendors/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="../vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="../vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="../vendors/nprogress/nprogress.js"></script>
    <!-- iCheck -->
    <script src="../vendors/iCheck/icheck.min.js"></script>
    <!-- Datatables -->
    <script src="../vendors/datatables.net/js/jquery.dataTables.min.js"></script>
    <script src="../vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
    <script src="../vendors/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
    <script src="../vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
    <script src="../vendors/datatables.net-buttons/js/buttons.flash.min.js"></script>
    <script src="../vendors/datatables.net-buttons/js/buttons.html5.min.js"></script>
    <script src="../vendors/datatables.net-buttons/js/buttons.print.min.js"></script>
    <script src="../vendors/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
    <script src="../vendors/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
    <script src="../vendors/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
    <script src="../vendors/datatables.net-responsive-bs/js/responsive.bootstrap.js"></script>
    <script src="../vendors/datatables.net-scroller/js/dataTables.scroller.min.js"></script>
    <script src="../vendors/jszip/dist/jszip.min.js"></script>
    <script src="../vendors/pdfmake/build/pdfmake.min.js"></script>
    <script src="../vendors/pdfmake/build/vfs_fonts.js"></script>

    <!-- Custom Theme Scripts -->
    <script src="../build/js/custom.min.js"></script>

 <link rel="stylesheet" href="colorbox.css" />

<script src="jquery.colorbox.js"></script>

 <script>

$(document).ready(function(){

$(".iframePupop").colorbox({iframe:true, width:"50%", height:"85%"});

});

</script>


    <link href="autosearch_select/select2.css" rel="stylesheet">
    <link href="autosearch_select/select2-default.css" rel="stylesheet">
    <script src="autosearch_select/select2.min.js"></script>

    <script>
    $(function() {
    $('.chosen-select').select2( { width:'100%', maximumSelectionSize: 1 } );
    $(document).ready(function() {
    $(".chosen-multi-select").select2( { width:'100%', } ); }); }); function slideout(){ setTimeout(function(){
    $(".alert-success").fadeOut("slow", function () { });
    $(".alert-danger").fadeOut("slow", function () { }); }, 4000);}
    </script>

    <script src="https://cdn.ckeditor.com/4.12.1/standard/ckeditor.js"></script>

</body>
</html>