  <link href="<?php echo base_url(); ?>assets/autocomplete/jquery-ui.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/autocomplete/ui.theme.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/autocomplete/autocomplete.css" rel="stylesheet">
    <script src="<?php echo base_url(); ?>assets/autocomplete/jquery-ui.min.js"></script>
	  


         <script type="text/javascript">
  
		
		 $(document).on("click", "#managebtndelete", function()
        {
          var itemid = $(this).data('id');
		  $("#itemid1").val(itemid); 
		  
		  
		   
        });
		$(document).on("click", "#editbtn", function()
        {
          var mycategoryid = $(this).data('id');
		  $("#mycategoryid").val(mycategoryid); 
		   
		   		   
   var maincategory = $(this).data('maincategory');
		   $("#maincategory").val(maincategory);
 
		    var name = $(this).data('name');
		   $("#name").val(name); 
		   
		     var description = $(this).data('description');
		   $("#description").val(description); 
	
		  
		       var category = $(this).data('category');
		   $("#category").val(category); 
		   
		   
		     var invoice = $(this).data('invoice');
		   $("#invoice").val(invoice); 
		   
        });
		
		
		
		
		
			$(document).on("click", "#requestbtn", function()
        {
          var requestid = $(this).data('id');
		  $("#requestid").val(requestid); 
		   
	
		   
		     var taskid = $(this).data('taskid');
		   $("#taskid").val(taskid); 
		   
        });
		
		
		
		
		
		
		
		
		
		
		$(document).on("click", "#copybtn", function()
        {
          var mycategoryid = $(this).data('id');
		  $("#mycategoryid2").val(mycategoryid); 
		   
		   		   
   var maincategory = $(this).data('maincategory');
		   $("#maincategory2").val(maincategory);
 
		    var name = $(this).data('name');
		   $("#name2").val(name); 
		   
		     var description = $(this).data('description');
		   $("#description2").val(description); 
	
		  
		       var category = $(this).data('category');
		   $("#category2").val(category); 
		   
		   
		     var invoice = $(this).data('invoice');
		   $("#invoice2").val(invoice); 
		   
        });
		
		
		
		
		
		
		$(document).on("click", "#taskbtn", function()
        {
          var taskid = $(this).data('id');
		  $("#taskid").val(taskid); 
		   
		   	
		   
        });
		
		
		
    </script>   
	
	
	
	
	
	
	
	
	
	       <script type="text/javascript">
	
	
	
	
	
		
				 $(this).ready( function() {  
            $("#mycode").autocomplete({  
 
                minLength: 1,  
                source:   
                function(req, add){  
                    $.ajax({  
                        url: "<?php echo base_url(); ?>Systemusers/purchaselookup",  
                        dataType: 'json',  
                        type: 'POST',  
                        data: req,  
                        success:      
                        function(data){  
                            if(data.response =="true"){  
                                add(data.message);  
                                console.log(data);
                            }  
                        },  
                    });  
                },  
                     
            });  
        });
		
		
		
    </script> 
 
 <div class="row">
  
   	

   	<div class="col-md-10">
	
  
		<div class="panel panel-default" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>

			<a  id="more" target="blank" class="btn btn-default" href="<?php echo base_url();?>user/viewprojets">Back Project </a>

						 <a data-toggle='modal' data-target='#purchaseModal' class="btn btn-default">View Budget task Reports</a>
 
 
 
				
            	</div>
            </div>
			<div class="panel-body">

				<div class="widget-content nopadding table_holder table-responsive" >				
	<?PHP
//
 $session_data = $this->session->userdata('logged_in');

  		  $year=date("Y");

 	$data['id'] = $session_data['id'];
        
		 $userid = $data['id'];

 $data['companyid'] = $session_data['companyid'];
	 $companyid = $data['companyid'];
		 $data['usertype'] = $session_data['usertype'];
	 $usertype = $data['usertype'];	
	  echo $this->session->flashdata('deletemsg'); 

				echo $this->session->flashdata('msg');

 $fromdate=date("Y-m-d 00:00:00");
 $todate=date("Y-m-30 23:59:59");

function formatMoney($number, $fractional=false) {
						if ($fractional) {
							$number = sprintf('%.2f', $number);
						}
						while (true) {
							$replaced = preg_replace('/(-?\d+)(\d\d\d)/', '$1,$2', $number);
							if ($replaced != $number) {
								$number = $replaced;
							} else {
								break;
							}
						}
						return $number;
					}






				
								?>	
										
					<div class="row">
						<div class="col-md-12">
							
							<div class="panel-body">
	
									
									
  <table cellpadding="0" cellspacing="0" border="0" class="table  table-striped" id="example" style="border-color:#CCCCCC; width:100%;"  >

             <thead>
         <tr>
     <th>NO</th>
     <th>Request Title</th>
	    <th>Request By</th>
<th>Project Name</th>
	      <th>Description</th>
	
<th>Status</th>		 
		<th>View</th>		 
	<th>More</th>	

                 </tr>
             </thead><tbody>
<?php

 if(!is_array($viewbudget)) 

 {


   echo "<tr  style='margin-bottom:0px;margin-top:0px;' '>";
      echo "<td colspan='6'>";
    
       echo '<div class="alert alert-warning text-center">There no records found..</div>';
    echo "</td>";
   echo "</tr>";
    }else {
?>
    
             <?php 
  
  	foreach ($viewbudget as $c): 

		 

             ?>



             <tr>
                
            <?php 
$id=$c->id;


?>

    
  <td><?php echo $c->id ; ?></td>          

  <td><?php echo $c->name ; ?></td>
    <td><?php echo $c->orderedby ; ?></td>

      <td><?php 
	  if($c->taskid !=""){
			$allprojects = $this->usermodel->populateallarray('projects','id',$c->taskid);

      echo$allprojects[0]["name"];	
	}
	
	  
	  
	  ?></td>

    <td><?php echo $c->description ; ?></td>


  
  
  
	  <td><?php echo $c->status ; ?></td>
	  
	  
	  	  <td>
		  
	  	 <a  id="more" class="btn btn-primary" href="<?php echo base_url();?>user/viewrequesteditems?randomitemidentifier=<?php     if(isset($c->invoice)) {echo $c->invoice; } ?>&type=receiving"> View Items  </a>


		  </td>
		  
		  
		  
		  
		 
		  
		  
		  
		  
		  
		  
		  
		  
		  
	  

	 <td> 

 
 
					<div class="btn-group">
                                    <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown">
                                        More <span class="caret"></span>
                                    </button>
									
                                    <ul class="dropdown-menu dropdown-primary pull-right" role="menu">
                                        
                                        <!-- teacher EDITING LINK -->
                                      
									  
									  
              
		                                        <li class="divider"></li>

									  
									  
									  
									  
									  
									  
									  <?php
										if($usertype=="admin"){
											
											?>
										
											  <li> 
										 <a class="btn btn-danger managebtn" id="managebtndelete"		 data-id='<?php echo  $c->id;?>'    data-toggle='modal' data-target='#myModal<?php  $c->id; ?>'>	 


                                                <i class="glyphicon glyphicon-pencil"></i>
																Delete
                                                </a>
                                                        </li>
										<?php
										}
										?>
									
										                                        <li class="divider"></li>

                                     	  <li> 

	 <a class="btn btn-primary editbtn" id="editbtn"data-name='<?php echo  $c->name;?>'  data-category='<?php echo  $c->category;?>' data-invoice='<?php echo  $c->invoice;?>'  data-description='<?php echo  $c->description;?>'  data-id='<?php echo  $c->id;?>' data-toggle='modal' data-target='#editProductModel'> 	 

                                                <i class="glyphicon glyphicon-pencil"></i>
																Approve/Reject
                                                </a>
                                                        </li>
                                        
										                                        <li class="divider"></li>

										
										
										
										
                                    </ul>
										
                                </div>
</td>
		 
		 
		 
             </tr>

	<?php endforeach;} ?>

             
<tbody>
        </table>

									
									
									
					</div>	

					
						
					
<div id="editProductModel" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Update Status</h4>
      </div>
      <div class="modal-body">
      
	  	

				<?PHP
//$session_data = $this->session->userdata('logged_in');



				echo $this->session->flashdata('msg'); 
		
                 echo form_open('user/updateproject' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
	<input type="hidden" name="mycategoryid" value=""id="mycategoryid" class="form-control" required placeholder="Enter mycategoryid">
			  		
	<div class="form-group">
    <label for="inputname" class="col-sm-2 control-label">	Name </label>
    <div class="col-sm-10">
			  		<input type="hidden" name="invoice" value="" id="invoice" class="form-control" required placeholder="Enter name">

		  		<input type="text" name="name" value="<?php echo set_value('name'); ?>" id="name" class="form-control" required placeholder="Enter name">
		 
				
		<span class="text-danger"> <?php echo form_error('name'); ?>
		
		</span>
	</div>
  </div>
  
  
  
  
  

	<div class="form-group">
    <label for="inputdescription" class="col-sm-2 control-label">	Description</label>
    <div class="col-sm-10">

				<textarea name="description" value="<?php echo set_value('description'); ?>"  id="description" class="form-control"  placeholder="Enter description"></textarea>
			
		<span class="text-danger"> <?php echo form_error('description'); ?>
		
		</span>
	</div>
  </div>

	
     <div class="form-group">
    <label for="inputcategory" class="col-sm-2 control-label">Category?</label>
    <div class="col-sm-10">
	<select class="form-control" name="category" id="category"required>
	
	<option value="" selected></option>
		<option value=""  >---Select Category---</option>

	<?php 
					//	$mycategory = $this->usermodel->populateproductcategorybyid($companyid);
		 
							 		$mycategory = $this->usermodel->populatealldatawhere('category','name','ASC','companyid',$companyid);



if(is_array($mycategory)) {

   foreach($mycategory as $mycategoryrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $mycategoryrow->id;   ?>"><?=  $mycategoryrow->name; ?></option>



	<?php

}} else {
    echo 'No category available.';
}
	
?>
</select>
		
						<span class="text-danger"><?php echo form_error('category'); ?>

	</div>
  </div>
  	



	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="project" name="btn_updateproject" class="btn btn-primary"> Update Project   </button>

    </div>
  </div>
  					<?php echo form_close();?>
			</div>							   
				
									
							
								
			<div class="modal-footer">

    

				</div>

		</div>
	    </div>
    </div>
					
					
					
					
					
<div id="requestProductModel" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Make A requistion of items</h4>
      </div>
      <div class="modal-body">
      
	  	

				<?PHP
//$session_data = $this->session->userdata('logged_in');

	 	$finalsalesid = $userid.time();


				echo $this->session->flashdata('msg'); 
		
                 echo form_open('user/addrequistion' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
	<input type="hidden" name="subtaskid" value=""id="requestid" class="form-control" required placeholder="Enter mycategoryid">
	<input type="hidden" name="taskid" value=""id="taskid" class="form-control" required placeholder="Enter taskid">
 			<input type="hidden" name="invoice" value="<?php echo set_value('name',$finalsalesid ); ?>"id="invoice" class="form-control" required placeholder="Enter taskid">

	<div class="form-group">
    <label for="inputname" class="col-sm-2 control-label">Request Title </label>
    <div class="col-sm-10">

		  		<input type="text" name="name" value="<?php echo set_value('name'); ?>" id="name" class="form-control" required placeholder="Enter title">
		 
				
		<span class="text-danger"> <?php echo form_error('name'); ?>
		
		</span>
	</div>
  </div>
  
  
  
   		
	<div class="form-group">
    <label for="inputorderedby" class="col-sm-2 control-label">Request By? </label>
    <div class="col-sm-10">

		  		<input type="text" name="orderedby" value="<?php echo set_value('orderedby'); ?>" id="orderedby" class="form-control" required placeholder="Enter name">
		 
				
		<span class="text-danger"> <?php echo form_error('orderedby'); ?>
		
		</span>
	</div>
  </div>
  
  
  
  
  
  
  
  <div class="form-group">
    <label for="inputbranchid" class="col-sm-2 control-label">Counter</label>
    <div class="col-sm-10">
	<select class="form-control" name="branchid"  id="branchid" required>
	
	
	<option value=""  >---Select Branch/Counter Name--</option>

					<option value="all"  >All branches/Counters</option>
			
	
	<?php 
					 
					 		$maincategory = $this->usermodel->populateall('branch','companyid',$companyid);


							


if(is_array($maincategory)) {

   foreach($maincategory as $maincategoryrow){

   //echo $courserow->coursename;
    ?>
					<option selected="selected" value="<?=  $maincategoryrow->id;   ?>"><?=  $maincategoryrow->name; ?></option>



	<?php

}} else {
    echo 'No main counter available.';
}
	
?>
</select>
		

		
	</div>
  </div>
	
	
	
	
	
	
	
	
	
  <div class="form-group">
    <label for="inputorderdate" class="col-sm-2 control-label">Request Date </label>
    <div class="col-sm-10">
	
		  		<input type="date" name="orderdate" value="<?php echo set_value('orderdate') ?>" class="form-control" required placeholder="Enter start date">
		 
				
		<span class="text-danger"> <?php echo form_error('orderdate'); ?>
		
		</span>
	</div>
  </div>
  
  
  
  
  

	<div class="form-group">
    <label for="inputdescription" class="col-sm-2 control-label">	Description / Comment</label>
    <div class="col-sm-10">

				<textarea name="description" value="<?php echo set_value('description'); ?>"  id="description" class="form-control"  placeholder="Enter description"></textarea>
			
		<span class="text-danger"> <?php echo form_error('description'); ?>
		
		</span>
	</div>
  </div>

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="request" name="btn_postrequest" class="btn btn-primary"> Start Requistion   </button>

    </div>
  </div>
  					<?php echo form_close();?>
			</div>							   
				
									
							
								
			<div class="modal-footer">

    

				</div>

		</div>
	    </div>
    </div>
					
					
						
					
<div id="copyProductModel" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">	Copy Project</h4>
      </div>
      <div class="modal-body">
      
	  	

				<?PHP
//$session_data = $this->session->userdata('logged_in');



				echo $this->session->flashdata('msg'); 
		
                 echo form_open('user/copyproject' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
	<input type="hidden" name="mycategoryid" value=""id="mycategoryid2" class="form-control" required placeholder="Enter mycategoryid">
			  		
	<div class="form-group">
    <label for="inputname" class="col-sm-2 control-label">	Name </label>
    <div class="col-sm-10">
			  		<input type="hidden" name="invoice" value="" id="invoice2" class="form-control" required placeholder="Enter name">

		  		<input type="text" name="name" value="<?php echo set_value('name'); ?>" id="name2" class="form-control" required placeholder="Enter name">
		 
				
		<span class="text-danger"> <?php echo form_error('name'); ?>
		
		</span>
	</div>
  </div>
  
  
  
  
  

	<div class="form-group">
    <label for="inputdescription" class="col-sm-2 control-label">	Description</label>
    <div class="col-sm-10">

				<textarea name="description" value="<?php echo set_value('description'); ?>"  id="description2" class="form-control"  placeholder="Enter description"></textarea>
			
		<span class="text-danger"> <?php echo form_error('description'); ?>
		
		</span>
	</div>
  </div>

	
     <div class="form-group">
    <label for="inputcategory" class="col-sm-2 control-label">Category?</label>
    <div class="col-sm-10">
	<select class="form-control" name="category" id="category2"required>
	
	<option value="" selected></option>
		<option value=""  >---Select Category---</option>

	<?php 
					//	$mycategory = $this->usermodel->populateproductcategorybyid($companyid);
		 
							 		$mycategory = $this->usermodel->populatealldatawhere('category','name','ASC','companyid',$companyid);



if(is_array($mycategory)) {

   foreach($mycategory as $mycategoryrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $mycategoryrow->id;   ?>"><?=  $mycategoryrow->name; ?></option>



	<?php

}} else {
    echo 'No category available.';
}
	
?>
</select>
		
						<span class="text-danger"><?php echo form_error('category'); ?>

	</div>
  </div>
  	

 <div class="form-group">
    <label for="inputdescription" class="col-sm-1 control-label"></label>

    <div class="col-sm-5">Start date
   				<input type="text" name="fromdate" value="<?php echo set_value('fromdate',$fromdate); ?>" id="idno" class="form-control"  placeholder="Enter fromdate">
    End Date:
	   				<input type="text" name="todate" value="<?php echo set_value('todate',$todate); ?>" id="idno" class="form-control"  placeholder="Enter end date">


    </div>
  </div>

	
		<div class="form-group">
    <label for="inputyear" class="col-sm-1 control-label">Year: </label>
    <div class="col-sm-5">
	
   				<input type="text" name="year" value="<?php echo set_value('year',$year); ?>" id="idno" class="form-control"  placeholder="Enter year">
		 
				
		<span class="text-danger"> <?php echo form_error('year'); ?>
		
		</span>
	</div>
  </div>
	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="project" name="btn_updateproject" class="btn btn-primary"> 	Copy this Project   </button>

    </div>
  </div>
  					<?php echo form_close();?>
			</div>							   
				
									
							
								
			<div class="modal-footer">

    

				</div>

		</div>
	    </div>
    </div>	
					
					
					
			
					
<div id="taskProductModel" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">	Create  Project Task</h4>
      </div>
      <div class="modal-body">
      
	  	

				<?PHP
//$session_data = $this->session->userdata('logged_in');



				echo $this->session->flashdata('msg'); 
		
                 echo form_open('user/createprojecttask' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
	<input type="hidden" name="taskid" value=""id="taskid" class="form-control" required placeholder="Enter taskid">
			  		<input type="invoice" name="invoice" value=""id="invoice3" class="form-control" required placeholder="Enter invoice">
	
	<div class="form-group">
    <label for="inputname" class="col-sm-2 control-label"> Task	Name </label>
    <div class="col-sm-10">

		  		<input type="text" name="name" value="<?php echo set_value('name'); ?>" id="name2" class="form-control" required placeholder="Enter name">
		 
				
		<span class="text-danger"> <?php echo form_error('name'); ?>
		
		</span>
	</div>
  </div>
  
  
  
  
  

	<div class="form-group">
    <label for="inputdescription" class="col-sm-2 control-label">	Description</label>
    <div class="col-sm-10">

				<textarea name="description" value="<?php echo set_value('description'); ?>"  id="description2" class="form-control"  placeholder="Enter description"></textarea>
			
		<span class="text-danger"> <?php echo form_error('description'); ?>
		
		</span>
	</div>
  </div>

	

 <div class="form-group">
    <label for="inputdescription" class="col-sm-1 control-label"></label>

    <div class="col-sm-5">Start date
   				<input type="text" name="fromdate" value="<?php echo set_value('fromdate',$fromdate); ?>" id="idno" class="form-control"  placeholder="Enter fromdate">
    End Date:
	   				<input type="text" name="todate" value="<?php echo set_value('todate',$todate); ?>" id="idno" class="form-control"  placeholder="Enter end date">


    </div>
  </div>

	
		<div class="form-group">
    <label for="inputyear" class="col-sm-1 control-label">Year: </label>
    <div class="col-sm-5">
	
   				<input type="text" name="year" value="<?php echo set_value('year',$year); ?>" id="idno" class="form-control"  placeholder="Enter year">
		 
				
		<span class="text-danger"> <?php echo form_error('year'); ?>
		
		</span>
	</div>
  </div>
	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="project" name="btn_createtaskproject" class="btn btn-primary"> 	Save this Project   </button>

    </div>
  </div>
  					<?php echo form_close();?>
			</div>							   
				
									
							
								
			<div class="modal-footer">

    

				</div>

		</div>
	    </div>
    </div>	
					
					
					
					
			
<div id="purchaseModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Budget Report</h4>
      </div>
      <div class="modal-body">
      
	  	

				<?PHP
//$session_data = $this->session->userdata('logged_in');
					  $mydate=date("Y-m-d H:i:s");
					  $frommydate=date("Y-m-d 00:00:00");

         $YEAR = date('Y');
				echo $this->session->flashdata('msg'); 
		
                 echo form_open('user/viewprojectbudgetreport' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>

	
	
	
	
	
	
	

  	
	
	<div class="form-group">
    <label for="inputbmonth" class="col-sm-2 control-label">	Project Name </label>
    <div class="col-sm-10">
	
   <select class="form-control" name="projectid" required >
	
	<option value=""  selected >---Select Project Name --</option>

	
	<option value="all">---All Projects task--</option>


	<?php 
					 
		
											$myprojects= $this->usermodel->populatealldatanoarray('projectstask','companyid',$companyid,'id >',0);


if(is_array($myprojects)) {

   foreach($myprojects as $myprojectsrow){

   ?>
					<option value="<?=  $myprojectsrow->id;   ?>"><?=  $myprojectsrow->name," " .$myprojectsrow->description; ?></option>




	<?php

}} else {
    echo 'No project available.';
}
	
?>
</select>		
		  		
	</div>
  </div>

  
	 <div class="form-group">
    <label for="inputcode" class="col-sm-2 control-label">Budgeted	Items </label>
    <div class="col-sm-10">


		  		<input type="text" autofocus id="mycode" name="code" value="<?php echo set_value('code'); ?>" class="form-control" required placeholder="Enter item name or code">
		 

		<span class="text-danger"> <?php echo form_error('code'); ?>
		
		</span>
	</div>
  </div>
  
	 <div class="form-group">
    <label for="inputdownload" class="col-sm-2 control-label">Download?</label>
    <div class="col-sm-10">
	<select class="form-control" name="download" required>
	
	<option value=""  >---Select your option---</option>

		<option value="no" selected="selected" >--I want to view the budget---</option>
			<option value="yes"  >--I want to download the budget---</option>

</select>
		

	</div>
  </diV>
	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="event" name="btn_invoice" class="btn btn-primary"> View Budget  </button>

    </div>
  </div>
  					<?php echo form_close();?>
			</div>							   
				
									
							
								
			<div class="modal-footer">

    

				</div>

		</div>
	    </div>
    </div>	
	
					
					
					
					
					
					
						<div id="myModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Delete</h4>
      </div>
      <div class="modal-body">
        <h3>Are you sure you want to delete this item? </h3>
      </div>
      <div class="modal-footer">
	  	

     
		<?PHP
				$session_data = $this->session->userdata('logged_in');
 echo $this->session->flashdata('deletemsg'); 

		
                 echo form_open('user/deletebyid' , array('class' => 'form-horizontal ', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
 <input type="hidden" id="table"name="table" class="table" placeholder="view" value="projectstask">

 <input type="hidden" id="view"name="view" class="view" placeholder="view" value="user/viewprojets">
 <input type="hidden" id="itemid1"name="itemid" class="itemid" placeholder="itemid" value=""><br>
 <button type="button" class="btn btn-success" data-dismiss="modal">No</button>
 		  	         <button type="submit" name="btn_delete" value="deletebyid" class="btn btn-danger"> Delete  </button>

	<?php echo form_close();?>
      </div>
    </div>

  </div>

  </div>					
<div id="addModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Add new Projects</h4>
      </div>
      <div class="modal-body">
      
	  	

				<?PHP
//$session_data = $this->session->userdata('logged_in');

				echo $this->session->flashdata('deletemsg'); 


				echo $this->session->flashdata('msg'); 
		
                 echo form_open('user/addproject' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
				  		
	<div class="form-group">
    <label for="inputname" class="col-sm-2 control-label">	Name </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="name" value="<?php echo set_value('name'); ?>" class="form-control" required placeholder="Enter name">
		 
				
		<span class="text-danger"> <?php echo form_error('name'); ?>
		
		</span>
	</div>
  </div>

  	
 <div class="form-group">
    <label for="inputcategory" class="col-sm-2 control-label">Category</label>
    <div class="col-sm-10">
				
				
				<select class="form-control" name="category"  id="category" >
	
	
	<option value=""  >---Select Category to Open--</option>

		<option value="" selected="" >---Na--</option>

	
	
	
	<?php 
					 
					 		$maincategory = $this->usermodel->populateall('category','companyid',$companyid);


							


if(is_array($maincategory)) {

   foreach($maincategory as $maincategoryrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $maincategoryrow->id;   ?>"><?=  $maincategoryrow->name; ?></option>



	<?php

}} else {
    echo 'No main counter available.';
}
	
?>
</select>
				
		</div>
  </div>
			
  
  
	<div class="form-group">
    <label for="inputdescription" class="col-sm-2 control-label">	Description</label>
    <div class="col-sm-10">

				<textarea name="description" value="<?php echo set_value('description'); ?>"  class="form-control"  placeholder="Enter description"></textarea>
			
		<span class="text-danger"> <?php echo form_error('description'); ?>
		
		</span>
	</div>
  </div>
		

	

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="addproject" name="btn_addproject" class="btn btn-primary"> Add PROJECTS   </button>

    </div>
  </div>
  					<?php echo form_close();?>
			</div>							   
				
									
							
								
			<div class="modal-footer">

    

				</div>

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





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

			
			</div>
		</div>
  
  </div>
			
		<div class="col-md-2">
			  <div class="panel panel-default" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				<p>Help/More Explanation </p>

				
            	</div>
            </div>
      
			<p>Create various  branches.</p>
			
			
		</div>			
	</div>			
		
		
  

 
</div>















