PageRenderTime 25ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/bbcsadmin/templates_c/8985856b1386f230a5c69cc67e20af8dcaf788c1.file.view-currency.tpl.php

https://gitlab.com/zohaibsaleem/shipcliq
PHP | 225 lines | 201 code | 21 blank | 3 comment | 24 complexity | e8e8e47942a4cd1268eda280c5753eda MD5 | raw file
  1. <?php /* Smarty version Smarty-3.0.7, created on 2015-10-05 16:56:06
  2. compiled from "/home/www/cargosharing1/cargoadmin/templates/utility/view-currency.tpl" */ ?>
  3. <?php /*%%SmartyHeaderCode:127252012856125e4e7820e2-15975802%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
  4. $_smarty_tpl->decodeProperties(array (
  5. 'file_dependency' =>
  6. array (
  7. '8985856b1386f230a5c69cc67e20af8dcaf788c1' =>
  8. array (
  9. 0 => '/home/www/cargosharing1/cargoadmin/templates/utility/view-currency.tpl',
  10. 1 => 1435040852,
  11. 2 => 'file',
  12. ),
  13. ),
  14. 'nocache_hash' => '127252012856125e4e7820e2-15975802',
  15. 'function' =>
  16. array (
  17. ),
  18. 'has_nocache_code' => false,
  19. )); /*/%%SmartyHeaderCode%%*/?>
  20. <script language="JavaScript" src="<?php echo $_smarty_tpl->getVariable('tconfig')->value['tcp_javascript'];?>
  21. jlist.js"></script>
  22. <div class="contentcontainer">
  23. <div class="headings altheading">
  24. <h2>Currency Rates</h2>
  25. </div>
  26. <div class="contentbox">
  27. <?php if ($_smarty_tpl->getVariable('var_msg_new')->value!=''){?>
  28. <div class="status success" id="errormsgdiv">
  29. <p class="closestatus"><a href="javascript:void(0);" title="Close" onclick="hidemessage();">x</a></p>
  30. <p><img src="<?php echo $_smarty_tpl->getVariable('tconfig')->value['tpanel_img'];?>
  31. icons/icon_success.png" title="Success" />
  32. <?php echo $_smarty_tpl->getVariable('var_msg_new')->value;?>
  33. </p>
  34. </div>
  35. <div></div>
  36. <?php }elseif($_smarty_tpl->getVariable('var_msg')->value!=''){?>
  37. <div class="status success" id="errormsgdiv">
  38. <p class="closestatus"><a href="javascript:void(0);" title="Close" onclick="hidemessage();">x</a></p>
  39. <p><img src="<?php echo $_smarty_tpl->getVariable('tconfig')->value['tpanel_img'];?>
  40. icons/icon_success.png" title="Success" />
  41. <?php echo $_smarty_tpl->getVariable('var_msg')->value;?>
  42. </p>
  43. </div>
  44. <div></div>
  45. <?php }?>
  46. <form name="frmlist" id="frmlist" action="index.php?file=u-currency_a" method="post">
  47. <table width="100%" border="0">
  48. <thead>
  49. <tr>
  50. <th>Currency</th>
  51. <th>Front Status</th>
  52. <th>Symbol</th>
  53. <th>Display Order</th>
  54. <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['i']);
  55. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['name'] = 'i';
  56. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('db_curr')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
  57. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = true;
  58. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
  59. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] = 1;
  60. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop']-1;
  61. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']) {
  62. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
  63. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] == 0)
  64. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = false;
  65. } else
  66. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = 0;
  67. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']):
  68. for ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] = 1;
  69. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'];
  70. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration']++):
  71. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'];
  72. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
  73. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
  74. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['first'] = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == 1);
  75. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['last'] = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total']);
  76. ?>
  77. <th><?php echo $_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]['vName'];?>
  78. </th>
  79. <?php endfor; endif; ?>
  80. </tr>
  81. </thead>
  82. <tbody>
  83. <?php if (count($_smarty_tpl->getVariable('db_curr')->value)>0){?>
  84. <?php $_smarty_tpl->tpl_vars['v1'] = new Smarty_Variable;
  85. $_smarty_tpl->tpl_vars['k1'] = new Smarty_Variable;
  86. $_from = $_smarty_tpl->getVariable('db_curr')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  87. if ($_smarty_tpl->_count($_from) > 0){
  88. foreach ($_from as $_smarty_tpl->tpl_vars['v1']->key => $_smarty_tpl->tpl_vars['v1']->value){
  89. $_smarty_tpl->tpl_vars['k1']->value = $_smarty_tpl->tpl_vars['v1']->key;
  90. ?>
  91. <tr>
  92. <td ><?php echo $_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value]['vName'];?>
  93. </td>
  94. <td >
  95. <?php echo $_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]['eFrontStatus'];?>
  96. <select name="eFrontStatus[]" id="eFrontStatus<?php echo $_smarty_tpl->getVariable('smarty')->value['section']['i']['index'];?>
  97. " class="inputbox" lang="*" style="width:100px;">
  98. <option value='Yes' <?php if ($_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value]['eFrontStatus']=='Yes'){?> selected<?php }?> >Yes</option>
  99. <option value='No' <?php if ($_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value]['eFrontStatus']=='No'){?> selected<?php }?>>No</option>
  100. </select>
  101. </td>
  102. <td><input type="text" name="vSymbole[]" class="inputbox" value="<?php echo $_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value]['vSymbole'];?>
  103. " lang="*" title="<?php echo $_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value]['vSymbole'];?>
  104. " style="width:100px;"></td>
  105. <td><input type="text" name="iDispOrder[]" class="inputbox" value="<?php echo $_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value]['iDispOrder'];?>
  106. " lang="*{N}-{0}" title="Dispaly Order" style="width:100px;" onChange="disporder(this,<?php echo $_smarty_tpl->getVariable('db_count')->value;?>
  107. ,<?php echo $_smarty_tpl->tpl_vars['k1']->value;?>
  108. );" id="iDispOrder[<?php echo $_smarty_tpl->tpl_vars['k1']->value;?>
  109. ]"></td>
  110. <?php $_smarty_tpl->tpl_vars['v2'] = new Smarty_Variable;
  111. $_smarty_tpl->tpl_vars['k2'] = new Smarty_Variable;
  112. $_from = $_smarty_tpl->getVariable('db_name')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  113. if ($_smarty_tpl->_count($_from) > 0){
  114. foreach ($_from as $_smarty_tpl->tpl_vars['v2']->key => $_smarty_tpl->tpl_vars['v2']->value){
  115. $_smarty_tpl->tpl_vars['k2']->value = $_smarty_tpl->tpl_vars['v2']->key;
  116. ?>
  117. <td>
  118. <!-- <input type="text" name="<?php echo $_smarty_tpl->tpl_vars['v2']->value;?>
  119. []" class="inputbox" value="<?php echo $_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value][$_smarty_tpl->getVariable('v2')->value];?>
  120. " lang="*{N}" style="width:100px;" onkeyup="numericFilter(this)" <?php if ($_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k2']->value]['vName']==$_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value]['vName']){?> readonly <?php }?> onChange="validzero(this);" /> -->
  121. <?php if ($_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k2']->value]['vName']==$_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value]['vName']){?>
  122. <input type="hidden" name="<?php echo $_smarty_tpl->tpl_vars['v2']->value;?>
  123. []" id="<?php echo $_smarty_tpl->tpl_vars['k1']->value;?>
  124. <?php echo $_smarty_tpl->tpl_vars['k2']->value;?>
  125. " value="<?php echo $_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value][$_smarty_tpl->getVariable('v2')->value];?>
  126. " />
  127. <?php echo $_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value][$_smarty_tpl->getVariable('v2')->value];?>
  128. <?php }?>
  129. <?php if ($_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k2']->value]['vName']!=$_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value]['vName']){?>
  130. <input type="text" name="<?php echo $_smarty_tpl->tpl_vars['v2']->value;?>
  131. []" id="<?php echo $_smarty_tpl->tpl_vars['k1']->value;?>
  132. <?php echo $_smarty_tpl->tpl_vars['k2']->value;?>
  133. " class="inputbox" value="<?php echo $_smarty_tpl->getVariable('db_curr')->value[$_smarty_tpl->tpl_vars['k1']->value][$_smarty_tpl->getVariable('v2')->value];?>
  134. " lang="*{N}" style="width:100px;" onkeyup="numericFilter(this)" onChange="validzero(this,<?php echo $_smarty_tpl->tpl_vars['k1']->value;?>
  135. <?php echo $_smarty_tpl->tpl_vars['k2']->value;?>
  136. );" />
  137. <?php }?>
  138. </td>
  139. <?php }} ?>
  140. <?php }} ?>
  141. </tr>
  142. <tr><td></td><td ><input class="btn" type="submit" title="Edit Currency" onclick="return validate(document.frmlist);" value="Edit Currency"></td><tr>
  143. <?php }else{ ?>
  144. <tr>
  145. <td height="70px;" colspan="8" style="text-align:center; color:#C44C22; font-size:14px; font-weight:bold;">No Record Found.</td>
  146. </tr>
  147. <?php }?>
  148. </tbody>
  149. </table>
  150. </form>
  151. <div style="clear: both;"></div></div>
  152. </div>
  153. <script>
  154. function Searchoption(){
  155. document.getElementById('frmsearch').submit();
  156. }
  157. function numericFilter(txb) {
  158. //alert(txb.value);
  159. txb.value = txb.value.replace(/[^0-9.]/g,"");
  160. // txb = parseFloat((txb + "").replace(/^(.*\.\d\d)\d*$/, '$1'));
  161. return txb > 0 ;
  162. }
  163. function disporder(num,len,r)
  164. {
  165. var n1=num.value;
  166. var count=0;
  167. var arr=[];
  168. for(k=0;k<len;k++)
  169. {
  170. arr[k]=document.getElementById('iDispOrder[' + k + ']').value;
  171. //alert(arr[k]);
  172. if(arr[k]==n1)
  173. {
  174. count++;
  175. if(count>1)
  176. {
  177. document.getElementById('iDispOrder[' + r + ']').value='';
  178. }
  179. }
  180. }
  181. }
  182. function validzero(num)
  183. {
  184. var n1=num.value;
  185. if(num<=0)
  186. {
  187. alert("Number should be greater than 0");
  188. }
  189. }
  190. function AlphaSearch(val){
  191. var alphavalue = val;
  192. var file = 'pr-currency';
  193. window.location="index.php?file="+file+"&alp="+alphavalue+"&mode=view";
  194. return false;
  195. }
  196. function MakeAction(loopid,type){
  197. document.frmlist.iLanguageMasId.value = loopid;
  198. document.frmlist.action.value = type;
  199. document.frmlist.submit();
  200. }
  201. function hidemessage(){
  202. jQuery("#errormsgdiv").slideUp();
  203. }
  204. </script>