PageRenderTime 56ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/bbcsadmin/templates_c/6fcd78d08ae72f493e78dba05715eb88db712faf.file.homebanners.tpl.php

https://gitlab.com/zohaibsaleem/shipcliq
PHP | 210 lines | 206 code | 3 blank | 1 comment | 25 complexity | 9b9d53af00a4514572bb790d8cf79edf MD5 | raw file
  1. <?php /* Smarty version Smarty-3.0.7, created on 2015-12-09 12:59:44
  2. compiled from "/home/www/cargosharing1/bbcsadmin/templates/tools/homebanners.tpl" */ ?>
  3. <?php /*%%SmartyHeaderCode:1994751711566825c04e9566-39861082%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
  4. $_smarty_tpl->decodeProperties(array (
  5. 'file_dependency' =>
  6. array (
  7. '6fcd78d08ae72f493e78dba05715eb88db712faf' =>
  8. array (
  9. 0 => '/home/www/cargosharing1/bbcsadmin/templates/tools/homebanners.tpl',
  10. 1 => 1432032830,
  11. 2 => 'file',
  12. ),
  13. ),
  14. 'nocache_hash' => '1994751711566825c04e9566-39861082',
  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. validate.js"></script>
  22. <div class="contentcontainer" id="tabs">
  23. <div class="headings">
  24. <?php if ($_smarty_tpl->getVariable('mode')->value=='edit'){?>
  25. <h2 class="left">Edit Home Page Banners</h2>
  26. <?php }else{ ?>
  27. <h2 class="left">Add Home Page Banners</h2>
  28. <?php }?>
  29. </div>
  30. <div class="contentbox" id="tabs-1">
  31. <?php if ($_smarty_tpl->getVariable('var_msg')->value!=''){?>
  32. <div class="status error" id="errormsgdiv">
  33. <p class="closestatus"><a href="javascript:void(0);" title="Close" onclick="hidemessage();">x</a></p>
  34. <p><img src="<?php echo $_smarty_tpl->getVariable('tconfig')->value['tpanel_img'];?>
  35. icons/icon_error.png" title="Success" />
  36. <?php echo $_smarty_tpl->getVariable('var_msg')->value;?>
  37. </p>
  38. </div>
  39. <div></div>
  40. <?php }?>
  41. <?php if ($_GET['var_msg_new']!=''){?>
  42. <div class="status success" id="errormsgdiv">
  43. <p class="closestatus"><a href="javascript:void(0);" title="Close" onclick="hidemessage();">x</a></p>
  44. <p><img src="<?php echo $_smarty_tpl->getVariable('tconfig')->value['tpanel_img'];?>
  45. icons/icon_success.png" title="Success" />
  46. <?php echo $_GET['var_msg_new'];?>
  47. </p>
  48. </div>
  49. <div></div>
  50. <?php }?>
  51. <?php if ($_smarty_tpl->getVariable('var_msg_error')->value!=''){?>
  52. <div class="status error" id="errormsgdiv">
  53. <p class="closestatus"><a href="javascript:void(0);" title="Close" onclick="hidemessage();">x</a></p>
  54. <p><img src="<?php echo $_smarty_tpl->getVariable('tconfig')->value['tpanel_img'];?>
  55. icons/icon_error.png" title="Success" />
  56. <?php echo $_smarty_tpl->getVariable('var_msg_error')->value;?>
  57. </p>
  58. </div>
  59. <div></div>
  60. <?php }?>
  61. <form id="frmadd" name="frmadd" action="index.php?file=to-homebanners_a" method="post" enctype="multipart/form-data">
  62. <input type="hidden" name="iBannerId" id="iBannerId" value="<?php echo $_smarty_tpl->getVariable('iBannerId')->value;?>
  63. " />
  64. <input type="hidden" name="action" id="action" value="<?php echo $_smarty_tpl->getVariable('mode')->value;?>
  65. " />
  66. <input type="hidden" name="eSection" id="eSection" value="Home" />
  67. <input type="hidden" name="imagemode" id="imagemode"/>
  68. <p>
  69. <label for="textfield"><strong>Select Type :<em>*</em></strong></label>
  70. <select id="eType" name="Data[eType]" onchange="getType(this.value);">
  71. <option value="Image" <?php if ($_smarty_tpl->getVariable('db_design')->value[0]['eType']=='Image'){?> selected <?php }?>>Image</option>
  72. <option value="Video" <?php if ($_smarty_tpl->getVariable('db_design')->value[0]['eType']=='Video'){?> selected <?php }?>>Video</option>
  73. </select>
  74. </p>
  75. <p>
  76. <label for="textfield"><strong>Title :<em>*</em></strong></label>
  77. <input type="text" id="vTitle" name="Data[vTitle]" class="inputbox" value="<?php echo $_smarty_tpl->getVariable('db_design')->value[0]['vTitle'];?>
  78. " lang="*" title="Title"/>
  79. </p>
  80. <p id="imgurl">
  81. <label for="textfield"><strong>URL :</strong></label>
  82. <textarea id="tURL" name="Data[tURL]" class="inputbox" title="URL"><?php echo $_smarty_tpl->getVariable('db_design')->value[0]['tURL'];?>
  83. </textarea>
  84. <br />
  85. [Note: Please include <b>http://</b> in URL. Else it will not work properly on site.]
  86. </p>
  87. <p id="img">
  88. <label for="textfield"><strong>Upload Banner :</strong></label>
  89. <input type="file" id="vImage" name="Data[vImage]" class="inputbox" title="Design" title="Upload Banner" />
  90. <?php if ($_smarty_tpl->getVariable('db_design')->value[0]['thumb_url']!=''){?>
  91. &nbsp;&nbsp;[<a href="<?php echo $_smarty_tpl->getVariable('db_design')->value[0]['thumb_url'];?>
  92. " target="_blank" title="<?php echo $_smarty_tpl->getVariable('db_design')->value[0]['vTitle'];?>
  93. " rel="[images]">View</a>]
  94. &nbsp;&nbsp;[<a href="javascript:void(0);" onclick="confirm_delete();" title="Delete Image">Delete</a>]
  95. <?php }?>
  96. <br>[Note : Please upload Home Page Top banner of width : 1320 and height : 666]
  97. <!--
  98. <br>[Note : Please upload Inner Page banner of width : 1021 and height : 324]
  99. <br>[Note : Please upload Home Page Middle banner of width : 477 and height : 141]
  100. <br>[Note : Please upload Home Page Bottom banner of width : 321 and height : 171]
  101. -->
  102. <!--<br>[Note: Please upload Left - Right banner of width : 112px and height : 600px]-->
  103. <br>[Note: Supported File Types are *.jpg,*.jpeg,*.png,*.gif]
  104. </p>
  105. <p id="cd" style="display:none;">
  106. <label for="textfield"><strong>Code :</strong></label>
  107. <textarea id="tCode" name="Data[tCode]" class="inputbox" title="Code"><?php echo $_smarty_tpl->getVariable('db_design')->value[0]['tCode'];?>
  108. </textarea>
  109. </p>
  110. <p id="imgord">
  111. <label for="textfield"><strong>Display Order :</strong></label>
  112. <select id="iDisplayOrder" name="Data[iDisplayOrder]" lang="" title="Category Display Order" />
  113. <option value="">Please Select Display Order</option>
  114. <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['i']);
  115. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['name'] = 'i';
  116. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('num_rows')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
  117. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = true;
  118. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
  119. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] = 1;
  120. $_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;
  121. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']) {
  122. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
  123. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] == 0)
  124. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = false;
  125. } else
  126. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = 0;
  127. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']):
  128. 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;
  129. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'];
  130. $_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']++):
  131. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'];
  132. $_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'];
  133. $_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'];
  134. $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['first'] = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == 1);
  135. $_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']);
  136. ?>
  137. <option <?php if ($_smarty_tpl->getVariable('db_design')->value[0]['iDisplayOrder']==$_smarty_tpl->getVariable('smarty')->value['section']['i']['index_next']){?>selected<?php }?> value="<?php echo $_smarty_tpl->getVariable('smarty')->value['section']['i']['index_next'];?>
  138. "><?php echo $_smarty_tpl->getVariable('smarty')->value['section']['i']['index_next'];?>
  139. </option>
  140. <?php endfor; endif; ?>
  141. </select>
  142. </p>
  143. <p>
  144. <label for="textfield"><strong>Status :</strong></label>
  145. <select id="eStatus" name="Data[eStatus]">
  146. <option value="Active" <?php if ($_smarty_tpl->getVariable('db_design')->value[0]['eStatus']=='Active'){?>selected<?php }?>>Active</option>
  147. <option value="Inactive" <?php if ($_smarty_tpl->getVariable('db_design')->value[0]['eStatus']=='Inactive'){?>selected<?php }?>>Inactive</option>
  148. </select>
  149. </p>
  150. <?php if ($_smarty_tpl->getVariable('mode')->value=='edit'){?>
  151. <input type="submit" value="Save Banner" class="btn" onclick="return validate(document.frmadd);" title="Save Banner"/>
  152. <?php }else{ ?>
  153. <input type="submit" value="Add Banner" class="btn" onclick="return validate(document.frmadd);" title="Add Banner"/>
  154. <?php }?>
  155. <input type="button" value="Cancel" class="btnalt" title="Cancel" onclick="redirectcancel();"/>
  156. </form>
  157. </div>
  158. </div>
  159. <script>
  160. function redirectcancel()
  161. {
  162. window.location="<?php echo $_smarty_tpl->getVariable('tconfig')->value['tpanel_url'];?>
  163. /index.php?file=to-homebanners&mode=view";
  164. return false;
  165. }
  166. function hidemessage(){
  167. jQuery("#errormsgdiv").slideUp();
  168. }
  169. function getType(val)
  170. {
  171. //alert(val);
  172. if(val=="Image")
  173. {
  174. document.getElementById('tCode').value='';
  175. document.getElementById('cd').style.display='none';
  176. document.getElementById('img').style.display='';
  177. document.getElementById('imgurl').style.display='block';
  178. document.getElementById('imgord').style.display='block';
  179. }
  180. else if(val=="Video")
  181. {
  182. document.getElementById('vImage').value='';
  183. document.getElementById('cd').style.display='';
  184. document.getElementById('img').style.display='none';
  185. document.getElementById('imgurl').style.display='none';
  186. document.getElementById('imgord').style.display='none';
  187. }
  188. }
  189. function confirm_delete()
  190. {
  191. ans = confirm('Are you sure for Delete Image?');
  192. if(ans == true)
  193. {
  194. document.frmadd.imagemode.value = 'confirm_delete';
  195. document.frmadd.submit();
  196. }
  197. else
  198. {
  199. return false;
  200. }
  201. }
  202. if('<?php echo $_smarty_tpl->getVariable('mode')->value;?>
  203. ' == 'edit'){
  204. getType('<?php echo $_smarty_tpl->getVariable('db_design')->value[0]['eType'];?>
  205. ');
  206. }
  207. </script>