?
Current Path : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Policies/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Policies/editdeclaration.php |
<script type="text/javascript" src="<?=base_url()?>/assets/js/jquery.form.js"></script> <script> $(document).ready(function(){ if(<?=$declid?>==1) { declpayment(<?=$id?>); } checkfiscalyear("begin","mycompany"); }); </script> <?php $this->load->view('Documents/editdocumentcreation'); foreach($viewinfo as $updata) { $cover_id=$updata['cover_id']; $header=$updata['template_header']; $customer_id=$updata['customer_id']; $declaration_id=$updata['id']; $qrefno=$updata['quotation_ref']; $currency=$updata['currencytype']; $est_suminsured=$updata['est_suminsured']; $certificate_refno=$updata['certificate_refno']; $certificate_no=$updata['certificate_no']; $policyid=$updata['policyid']; $declarationdate=$updata['declarationdate']; $descriptiontitle=$updata['suminsured_desctitle']; $suminsuredtitle=$updata['suminsured_sumtitle']; $total_sumtitle=$updata['total_sumtitle']; $total_sumtitle_amount=$updata['total_sumtitle_amount']; } $declarationdate=$this->mastermodel->convdatformat($declarationdate); $currency_type=$this->mastermodel->get_data_srow('country',$currency,'id'); $cr=$this->mastermodel->get_data_srow('covers',$cover_id,'id'); $policyno=$this->mastermodel->get_data_srow('policynote',$policyid,'id'); $type=$this->customermodel->getSingleFieldValue('customers','type','id',$customer_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'); $declarationform=$this->mastermodel->get_data('declaration_form',$declaration_id,'declaration_id'); $declaration_insured=$this->mastermodel->get_data('declaration_section',$declaration_id,'declaration_id'); $declaration_project_period=$this->mastermodel->get_data_srow('declaration_project_period',$declaration_id,'declaration_id'); $declaration_voyage=$this->mastermodel->get_data('declaration_voyage',$declaration_id,'declaration_id'); $declaration_moofconv=$this->mastermodel->get_data('declaration_mofconveyance',$declaration_id,'declaration_id'); $premium=$this->customermodel->getSingleFieldValue('declaration_premiumdetails','premium','declaration_id',$declaration_id); $brokerage=$this->customermodel->getSingleFieldValue('declaration_premiumdetails','brokerage','declaration_id',$declaration_id); ?> <div class="select-bar"> <label> <img src="<?=base_url()?>/assets/images/backbutton.png" title="Back" class="clickimage" onclick="loaddeclaration('<?=$_SESSION['pagenum']?>','<?=$_SESSION['searchoption']?>','<?=$_SESSION['searchtxt']?>')" alt="Back" align = "center" width="25" height="25" /></label> </div> <?php $attributes = array('id' => 'customForm','class' => 'news'); echo form_open_multipart('policies/editdeclaration',$attributes);?> <fieldset> <legend>Update Declaration</legend> <label style="width:80px;"><img src="<?=base_url()?>/assets/images/document_white.jpg" class="clickimage" onclick="editdeclaration(1,<?=$id?>)" alt="Payment" align = "center" /></label> <label style="width:80px;"> <img src="<?=base_url()?>/assets/images/premium_blue.jpg" class="clickimage" onclick="declpayment(<?=$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 style="float:right;"> <div> <label style="width:60px; ">Date</label> <input type="text" name="declarationdate" style="background-image: url(../../../../assets/images/datefocus.gif);" class="one" id="quotationdate" value="<?php echo $declarationdate;?>" 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='custid' value="<?=$customer_id?>"/> <input type='hidden' name='declarationid' value="<?=$declaration_id?>"/> <input type="hidden" name="quotation_ref" id="quotation_ref" value="<?=$qrefno?>"> <input type="hidden" name="policyid" id="policyid_hidden" value="<?=$policyid?>"> <input type="hidden" name="policyperiodid" id="policyperiodid"> </li> <?php $counterText=1; $counterTextArea=1; $counterComboBox=1; $counterstatic=1; $countercheckbox=1; foreach($declarationform 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) { 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><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($cmb)-1;$k++) { echo "<option value=''>".$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($declaration_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($declaration_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> </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('declaration_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> </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> </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' ><label> </label> <tr><td> </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> </label> <tr><td> </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 "</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 ' <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" >'; 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" style="width:250px;" value="'.$premium.'"> <input type="button" onclick="calculatetotalpremium(document.getElementById(\'sec\').value)" class="clickimage" value="Calculate"/> <img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'premium_txt\')" /> </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" value="'.$brokerage.'" style="width:250px;">%<img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'brokerage_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"> <input type="text" name="periodofinsurance" id="periodofinsurance" style="width:250px;" value="'.$tform['value'].'" ><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'periodofinsurance_txt\')" /></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('declaration_rate',$declaration_id,'declaration_id'); foreach($rate_section as $ratesection) { echo ' <table border="0" id="ratesumdiv'.$ratecount.'" >'; echo '<tr ><td><label> </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; case 'policyno': echo ' <li id="policyno_txt"> <input type="hidden" id="labelname" name="labelname[]" value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label> <input type="hidden" name="fieldtype[]" value="policyno"> <input type="text" name="policyno" id="policyno" style="width:250px;" readonly value="'.$policyno->policyno.'" ><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'policyno_txt\')" /></li>'; break; case 'certificaterefno': echo ' <li id="certificaterefno_txt"> <input type="hidden" id="labelname" name="labelname[]" value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label> <input type="hidden" name="fieldtype[]" value="certificaterefno"> <input type="text" name="certificaterefno" id="certificaterefno" style="width:250px;" value="'.$certificate_refno.'" readonly><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'certificaterefno_txt\')" /></li>'; break; case 'modeofconveyance': echo '<li id="modeofconveyance_txt"> <input type="hidden" id="labelname" name="labelname[]" value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label> <input type="hidden" name="fieldtype[]" value="modeofconveyance"> <table><tr><td><input type="text" id="modeofconv" style="width:250px;"><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'modeofconveyance_txt\')" /></td><td> <input type="button" onclick="addmodeofconveyance(document.getElementById(\'modeofconv\').value)" class="clickimage" value="Add"/></td></tr></table>'; if(count($declaration_moofconv)>0) { echo "<label> </label><table border=0><tr><th>Description</th></tr>"; foreach($declaration_moofconv as $moofc) { echo "<tr><td><input type='text' style='width:250px;' name='modeofconveyance[]' value='$moofc[description]'></td></tr>"; } echo "</table>"; } echo '<div id="modeaddmore"></div></li> '; break; case 'voyage': echo '<li id="voyage_txt"> <input type="hidden" id="labelname" name="labelname[]" value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label> <input type="hidden" name="fieldtype[]" value="voyage"> <table><tr><td><input type="text" id="voyageid" style="width:250px;"></td><td><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'voyage_txt\')" /></td><td> <input type="button" onclick="addvoyage(document.getElementById(\'voyageid\').value)" class="clickimage" value="Add"/></td></tr></table>'; if(count($declaration_voyage)>0) { echo "<label> </label><table><tr><th>Description</th></tr>"; foreach($declaration_voyage as $voyage) { echo "<tr><td><input type='text' style='width:250px;' name='voyage[]' value='$voyage[description]'></td></tr>"; } echo "</table>"; } echo '<div id="voyageaddmore"></div> </li> '; break; case 'projectperiod': $frompp_dat = $this->mastermodel->convdatformat($declaration_project_period->fromdate); $topp_dat = $this->mastermodel->convdatformat($declaration_project_period->todate); echo ' <li id="projectperiod_txt"> <input type="hidden" id="labelname" name="labelname[]" value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label> <input type="hidden" name="fieldtype[]" value="projectperiod"> <table><tr><td><input type="text" name="frmprojdate" style="background-image: url(../../../../assets/images/datefocus.gif);" class="one" id="frmprojdate" value="'.$frompp_dat.'" readonly></td> <td><label style="width:30px;">To</label> </td><td><input type="text" name="toprojdate" style="background-image: url(../../../../assets/images/datefocus.gif);" class="one" id="toprojdate" value="'.$topp_dat.'" readonly></td><td> <img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'projectperiod_txt\')" /></td></tr></table></li><li></li>'; break; case 'cover': echo ' <li id="cover_txt"> <input type="hidden" id="labelname" name="labelname[]" value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label> <input type="hidden" name="fieldtype[]" value="cover"> <input type="text" name="cover" id="cover" style="width:250px;" value="'.$cr->cover.'"><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'cover_txt\')" /></li>'; break; case 'policyperiod': echo ' <li id="policyperiod_txt"> <input type="hidden" id="labelname" name="labelname[]" value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label> <input type="hidden" name="fieldtype[]" value="policyperiod"> <input type="text" name="policyperiod" id="policyperiod" style="width:250px;" ><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'policyperiod_txt\')" /></li>'; break; case 'certificateno': echo ' <li id="certificateno_txt"> <input type="hidden" id="labelname" name="labelname[]" value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label> <input type="hidden" name="fieldtype[]" value="certificateno"> <input type="text" name="certificateno" id="certificateno" style="width:250px;" value="'.$certificate_no.'"><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'certificateno_txt\')" /></li>'; break; case 'estimatedsuminsured': echo ' <li id="estimatedsuminsured_txt"> <input type="hidden" id="labelname" name="labelname[]" value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label> <input type="hidden" name="fieldtype[]" value="estimatedsuminsured"> <input type="text" name="estimatedsuminsured" id="estimatedsuminsured" value="'.$est_suminsured.'" style="width:250px;"><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'estimatedsuminsured_txt\')" /></li>'; break; case 'estimatedturnover': echo ' <li id="estimatedturnover_txt"> <input type="hidden" id="labelname" name="labelname[]" value="'.$tform['labelname'].'"><label>'.$tform['labelname'].'</label> <input type="hidden" name="fieldtype[]" value="estimatedturnover"> <input type="text" name="estimatedturnover" id="estimatedturnover" value="'.$est_suminsured.'" style="width:250px;"><img class=\'clickimage\' src="'.base_url().'/assets/images/x-icon.png" onClick="removeElement(\'templateform\',\'estimatedturnover_txt\')" /></li>'; break; } } ?> <div id="extratemplateform"> </div> <input type="hidden" name="isnewadded" id="isnewadded" value=""/> <li> <button type="submit" id="submit" class="clickimage" onclick="valiupdate()">Save</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>