<?php

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function dater(){
$dated1 = date('d-m-Y H:i:s');
$dated=date( "d-m-Y H:i:s", strtotime( $dated1 )+5*60*60 );

return $dated;
}
/////////////////////////////// Function starts
////////////////////// HTML FUNCTION | HTML FUNCTION (c) i2d Technologies //////////////////////////////////

if (!function_exists('dater2')) {
	function dater2($found=0){
   //////////////////////////
   //$dte = strtotime("-10 day");
   $dt1=date('m/d/Y');
   /////////////////////////////
   //$dt1=date('m/d/Y');
   /////////////////////////////
   $field_id=insertion_date."_id";
   $field_name=insertion_date;
   $field_name2=insertion_date."_field";
   
   if($found!=0){
   //$found=date('m/d/Y',$found);
   }
      
   ?>
   
   

 
 <div class="col-md-4">
<?php if($found!=0){ ?>

                <label>Dated</label>
                <div class="input-group">
                
<input type="text" class="form-control" name="<?php echo $field_name2; ?>" value="<?php echo $found;?>" readonly>
<input type="hidden" name="<?php echo $field_name; ?>" value="<?php echo $found;?>">
<?php } else { ?>
                <label>Please Select a Date</label>
                <div class="input-group">

<input type="text" class="form-control" name="<?php echo $field_name; ?>" value="<?php echo $dt1;?>" id="datepicker">
				<span class="input-group-addon bg-custom b-0"><i class="mdi mdi-calendar text-white"></i></span>

<?php } ?>           
     
                                                            </div><!-- input-group -->
                                                        </div>

			
   
<?php   
}
}
//////////////////////////// HTML FUNCTION ENDS (c) i2d Technologies ///////////////////////////////////////

////////////////////// HTML FUNCTION | HTML FUNCTION (c) i2d Technologies //////////////////////////////////

if (!function_exists('dater3')) {
	function dater3($settings){
   //////////////////////////
   //$dte = strtotime("-10 day");
   $dt1=date('m/d/Y');
if (array_key_exists('label', $settings)) {
   $label=$settings['label'];
   }
if (array_key_exists('fname', $settings)) {
   $fname=$settings['fname'];
   }
if (array_key_exists('date', $settings)) {
   $date=$settings['date'];
   }

   /////////////////////////////
   //$dt1=date('m/d/Y');
   /////////////////////////////
   $field_id=$fname."_id";
   $field_name=$fname;
   $field_name2=$fname."_field";
   
      
   ?>
   
   

 <div class="col-md-12">
<div class="form-group m-t-50">
                                                <label><?php echo $label; ?></label>
                                                <div>
                                                    <input class="form-control input-daterange-datepicker" type="text" name="<?php echo $field_name; ?>" value="<?php echo $dt1; ?> - <?php echo $dt1; ?>">
                                                </div>
                                            </div>
                                            </div>



 
 			
   
<?php   
}
}
//////////////////////////// HTML FUNCTION ENDS (c) i2d Technologies ///////////////////////////////////////






















?>