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

/tools/smarty_v2/compile/%%B0^B05^B050FA28%%authentication.tpl.php

http://marocmall.googlecode.com/
PHP | 644 lines | 621 code | 21 blank | 2 comment | 150 complexity | 255a480e0d62fa738e4a82f2684ae46d MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php /* Smarty version 2.6.20, created on 2011-12-03 00:32:39
  2. compiled from C:%5CD%5CMarocMall/themes/prestashop/authentication.tpl */ ?>
  3. <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
  4. smarty_core_load_plugins(array('plugins' => array(array('function', 'l', 'C:\\D\\MarocMall/themes/prestashop/authentication.tpl', 48, false),array('modifier', 'intval', 'C:\\D\\MarocMall/themes/prestashop/authentication.tpl', 53, false),array('modifier', 'escape', 'C:\\D\\MarocMall/themes/prestashop/authentication.tpl', 62, false),array('modifier', 'stripslashes', 'C:\\D\\MarocMall/themes/prestashop/authentication.tpl', 108, false),)), $this); ?>
  5. <?php if (! isset ( $this->_tpl_vars['dlv_all_fields'] )): ?>
  6. <?php echo $this->_tpl_vars['dlv_all_fields']['0']; ?>
  7. <?php echo $this->_tpl_vars['dlv_all_fields']['1']; ?>
  8. <?php echo $this->_tpl_vars['dlv_all_fields']['2']; ?>
  9. <?php echo $this->_tpl_vars['dlv_all_fields']['3']; ?>
  10. <?php echo $this->_tpl_vars['dlv_all_fields']['4']; ?>
  11. <?php echo $this->_tpl_vars['dlv_all_fields']['5']; ?>
  12. <?php echo $this->_tpl_vars['dlv_all_fields']['6']; ?>
  13. <?php echo $this->_tpl_vars['dlv_all_fields']['7']; ?>
  14. <?php echo $this->_tpl_vars['dlv_all_fields']['8']; ?>
  15. <?php endif; ?>
  16. <?php ob_start(); ?><?php echo smartyTranslate(array('s' => 'Login'), $this);?>
  17. <?php $this->_smarty_vars['capture']['path'] = ob_get_contents(); ob_end_clean(); ?>
  18. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  19. $this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['tpl_dir'])."./breadcrumb.tpl", 'smarty_include_vars' => array()));
  20. $this->_tpl_vars = $_smarty_tpl_vars;
  21. unset($_smarty_tpl_vars);
  22. ?>
  23. <script type="text/javascript">
  24. // <![CDATA[
  25. idSelectedCountry = <?php if (isset ( $_POST['id_state'] )): ?><?php echo ((is_array($_tmp=$_POST['id_state'])) ? $this->_run_mod_handler('intval', true, $_tmp) : intval($_tmp)); ?>
  26. <?php else: ?>false<?php endif; ?>;
  27. countries = new Array();
  28. countriesNeedIDNumber = new Array();
  29. countriesNeedZipCode = new Array();
  30. <?php if (isset ( $this->_tpl_vars['countries'] )): ?>
  31. <?php $_from = $this->_tpl_vars['countries']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  32. foreach ($_from as $this->_tpl_vars['country']):
  33. ?>
  34. <?php if (isset ( $this->_tpl_vars['country']['states'] ) && $this->_tpl_vars['country']['contains_states']): ?>
  35. countries[<?php echo ((is_array($_tmp=$this->_tpl_vars['country']['id_country'])) ? $this->_run_mod_handler('intval', true, $_tmp) : intval($_tmp)); ?>
  36. ] = new Array();
  37. <?php $_from = $this->_tpl_vars['country']['states']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['states'] = array('total' => count($_from), 'iteration' => 0);
  38. if ($this->_foreach['states']['total'] > 0):
  39. foreach ($_from as $this->_tpl_vars['state']):
  40. $this->_foreach['states']['iteration']++;
  41. ?>
  42. countries[<?php echo ((is_array($_tmp=$this->_tpl_vars['country']['id_country'])) ? $this->_run_mod_handler('intval', true, $_tmp) : intval($_tmp)); ?>
  43. ].push({'id' : '<?php echo $this->_tpl_vars['state']['id_state']; ?>
  44. ', 'name' : '<?php echo ((is_array($_tmp=$this->_tpl_vars['state']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  45. '});
  46. <?php endforeach; endif; unset($_from); ?>
  47. <?php endif; ?>
  48. <?php if ($this->_tpl_vars['country']['need_identification_number']): ?>
  49. countriesNeedIDNumber.push(<?php echo ((is_array($_tmp=$this->_tpl_vars['country']['id_country'])) ? $this->_run_mod_handler('intval', true, $_tmp) : intval($_tmp)); ?>
  50. );
  51. <?php endif; ?>
  52. <?php if (isset ( $this->_tpl_vars['country']['need_zip_code'] )): ?>
  53. countriesNeedZipCode[<?php echo ((is_array($_tmp=$this->_tpl_vars['country']['id_country'])) ? $this->_run_mod_handler('intval', true, $_tmp) : intval($_tmp)); ?>
  54. ] = <?php echo $this->_tpl_vars['country']['need_zip_code']; ?>
  55. ;
  56. <?php endif; ?>
  57. <?php endforeach; endif; unset($_from); ?>
  58. <?php endif; ?>
  59. $(function(){
  60. $('.id_state option[value=<?php if (isset ( $_POST['id_state'] )): ?><?php echo $_POST['id_state']; ?>
  61. <?php else: ?><?php if (isset ( $this->_tpl_vars['address'] )): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['address']->id_state)) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  62. <?php endif; ?><?php endif; ?>]').attr('selected', 'selected');
  63. });
  64. //]]>
  65. <?php if ($this->_tpl_vars['vat_management']): ?>
  66. <?php echo '
  67. $(document).ready(function() {
  68. $(\'#company\').blur(function(){
  69. vat_number();
  70. });
  71. vat_number();
  72. function vat_number()
  73. {
  74. if ($(\'#company\').val() != \'\')
  75. $(\'#vat_number\').show();
  76. else
  77. $(\'#vat_number\').hide();
  78. }
  79. });
  80. '; ?>
  81. <?php endif; ?>
  82. </script>
  83. <h1><?php if (! isset ( $this->_tpl_vars['email_create'] )): ?><?php echo smartyTranslate(array('s' => 'Log in'), $this);?>
  84. <?php else: ?><?php echo smartyTranslate(array('s' => 'Create your account'), $this);?>
  85. <?php endif; ?></h1>
  86. <?php $this->assign('current_step', 'login'); ?>
  87. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  88. $this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['tpl_dir'])."./order-steps.tpl", 'smarty_include_vars' => array()));
  89. $this->_tpl_vars = $_smarty_tpl_vars;
  90. unset($_smarty_tpl_vars);
  91. ?>
  92. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  93. $this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['tpl_dir'])."./errors.tpl", 'smarty_include_vars' => array()));
  94. $this->_tpl_vars = $_smarty_tpl_vars;
  95. unset($_smarty_tpl_vars);
  96. ?>
  97. <?php $this->assign('stateExist', false); ?>
  98. <?php if (! isset ( $this->_tpl_vars['email_create'] )): ?>
  99. <form action="<?php echo $this->_tpl_vars['link']->getPageLink('authentication.php',true); ?>
  100. " method="post" id="create-account_form" class="std">
  101. <fieldset>
  102. <h3><?php echo smartyTranslate(array('s' => 'Create your account'), $this);?>
  103. </h3>
  104. <h4><?php echo smartyTranslate(array('s' => 'Enter your e-mail address to create an account'), $this);?>
  105. .</h4>
  106. <p class="text">
  107. <label for="email_create"><?php echo smartyTranslate(array('s' => 'E-mail address'), $this);?>
  108. </label>
  109. <span><input type="text" id="email_create" name="email_create" value="<?php if (isset ( $_POST['email_create'] )): ?><?php echo ((is_array($_tmp=((is_array($_tmp=$_POST['email_create'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')))) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
  110. <?php endif; ?>" class="account_input" /></span>
  111. </p>
  112. <p class="submit">
  113. <?php if (isset ( $this->_tpl_vars['back'] )): ?><input type="hidden" class="hidden" name="back" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['back'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  114. " /><?php endif; ?>
  115. <input type="submit" id="SubmitCreate" name="SubmitCreate" class="button_large" value="<?php echo smartyTranslate(array('s' => 'Create your account'), $this);?>
  116. " />
  117. <input type="hidden" class="hidden" name="SubmitCreate" value="<?php echo smartyTranslate(array('s' => 'Create your account'), $this);?>
  118. " />
  119. </p>
  120. </fieldset>
  121. </form>
  122. <form action="<?php echo $this->_tpl_vars['link']->getPageLink('authentication.php',true); ?>
  123. " method="post" id="login_form" class="std">
  124. <fieldset>
  125. <h3><?php echo smartyTranslate(array('s' => 'Already registered ?'), $this);?>
  126. </h3>
  127. <p class="text">
  128. <label for="email"><?php echo smartyTranslate(array('s' => 'E-mail address'), $this);?>
  129. </label>
  130. <span><input type="text" id="email" name="email" value="<?php if (isset ( $_POST['email'] )): ?><?php echo ((is_array($_tmp=((is_array($_tmp=$_POST['email'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')))) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
  131. <?php endif; ?>" class="account_input" /></span>
  132. </p>
  133. <p class="text">
  134. <label for="passwd"><?php echo smartyTranslate(array('s' => 'Password'), $this);?>
  135. </label>
  136. <span><input type="password" id="passwd" name="passwd" value="<?php if (isset ( $_POST['passwd'] )): ?><?php echo ((is_array($_tmp=((is_array($_tmp=$_POST['passwd'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')))) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
  137. <?php endif; ?>" class="account_input" /></span>
  138. </p>
  139. <p class="submit">
  140. <?php if (isset ( $this->_tpl_vars['back'] )): ?><input type="hidden" class="hidden" name="back" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['back'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  141. " /><?php endif; ?>
  142. <input type="submit" id="SubmitLogin" name="SubmitLogin" class="button" value="<?php echo smartyTranslate(array('s' => 'Log in'), $this);?>
  143. " />
  144. </p>
  145. <p class="lost_password"><a href="<?php echo $this->_tpl_vars['link']->getPageLink('password.php'); ?>
  146. "><?php echo smartyTranslate(array('s' => 'Forgot your password?'), $this);?>
  147. </a></p>
  148. </fieldset>
  149. </form>
  150. <?php if (isset ( $this->_tpl_vars['inOrderProcess'] ) && $this->_tpl_vars['inOrderProcess'] && $this->_tpl_vars['PS_GUEST_CHECKOUT_ENABLED']): ?>
  151. <form action="<?php echo $this->_tpl_vars['link']->getPageLink('authentication.php',true); ?>
  152. ?back=<?php echo $this->_tpl_vars['back']; ?>
  153. " method="post" id="new_account_form" class="std">
  154. <fieldset>
  155. <h3><?php echo smartyTranslate(array('s' => 'Instant Checkout'), $this);?>
  156. </h3>
  157. <div id="opc_account_form" style="display: block; ">
  158. <!-- Account -->
  159. <p class="required text">
  160. <label for="email"><?php echo smartyTranslate(array('s' => 'E-mail address'), $this);?>
  161. </label>
  162. <input type="text" class="text" id="guest_email" name="guest_email" value="<?php if (isset ( $_POST['guest_email'] )): ?><?php echo $_POST['guest_email']; ?>
  163. <?php endif; ?>">
  164. <sup>*</sup>
  165. </p>
  166. <p class="radio required">
  167. <span><?php echo smartyTranslate(array('s' => 'Title'), $this);?>
  168. </span>
  169. <input type="radio" name="id_gender" id="id_gender1" value="1" <?php if (isset ( $_POST['id_gender'] ) && $_POST['id_gender'] == '1'): ?>checked="checked"<?php endif; ?>>
  170. <label for="id_gender1" class="top"><?php echo smartyTranslate(array('s' => 'Mr.'), $this);?>
  171. </label>
  172. <input type="radio" name="id_gender" id="id_gender2" value="2" <?php if (isset ( $_POST['id_gender'] ) && $_POST['id_gender'] == '2'): ?>checked="checked"<?php endif; ?>>
  173. <label for="id_gender2" class="top"><?php echo smartyTranslate(array('s' => 'Ms.'), $this);?>
  174. </label>
  175. </p>
  176. <p class="required text">
  177. <label for="firstname"><?php echo smartyTranslate(array('s' => 'First name'), $this);?>
  178. </label>
  179. <input type="text" class="text" id="firstname" name="firstname" onblur="$('#customer_firstname').val($(this).val());" value="<?php if (isset ( $_POST['firstname'] )): ?><?php echo $_POST['firstname']; ?>
  180. <?php endif; ?>">
  181. <input type="hidden" class="text" id="customer_firstname" name="customer_firstname" value="<?php if (isset ( $_POST['firstname'] )): ?><?php echo $_POST['firstname']; ?>
  182. <?php endif; ?>">
  183. <sup>*</sup>
  184. </p>
  185. <p class="required text">
  186. <label for="lastname"><?php echo smartyTranslate(array('s' => 'Last name'), $this);?>
  187. </label>
  188. <input type="text" class="text" id="lastname" name="lastname" onblur="$('#customer_lastname').val($(this).val());" value="<?php if (isset ( $_POST['lastname'] )): ?><?php echo $_POST['lastname']; ?>
  189. <?php endif; ?>">
  190. <input type="hidden" class="text" id="customer_lastname" name="customer_lastname" value="<?php if (isset ( $_POST['lastname'] )): ?><?php echo $_POST['lastname']; ?>
  191. <?php endif; ?>">
  192. <sup>*</sup>
  193. </p>
  194. <p class="select">
  195. <span><?php echo smartyTranslate(array('s' => 'Date of Birth'), $this);?>
  196. </span>
  197. <select id="days" name="days">
  198. <option value="">-</option>
  199. <?php $_from = $this->_tpl_vars['days']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  200. foreach ($_from as $this->_tpl_vars['day']):
  201. ?>
  202. <option value="<?php echo ((is_array($_tmp=$this->_tpl_vars['day'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  203. " <?php if (( $this->_tpl_vars['sl_day'] == $this->_tpl_vars['day'] )): ?> selected="selected"<?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['day'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  204. &nbsp;&nbsp;</option>
  205. <?php endforeach; endif; unset($_from); ?>
  206. </select>
  207. <select id="months" name="months">
  208. <option value="">-</option>
  209. <?php $_from = $this->_tpl_vars['months']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  210. foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['month']):
  211. ?>
  212. <option value="<?php echo ((is_array($_tmp=$this->_tpl_vars['k'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  213. " <?php if (( $this->_tpl_vars['sl_month'] == $this->_tpl_vars['k'] )): ?> selected="selected"<?php endif; ?>><?php echo smartyTranslate(array('s' => ($this->_tpl_vars['month'])), $this);?>
  214. &nbsp;</option>
  215. <?php endforeach; endif; unset($_from); ?>
  216. </select>
  217. <select id="years" name="years">
  218. <option value="">-</option>
  219. <?php $_from = $this->_tpl_vars['years']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  220. foreach ($_from as $this->_tpl_vars['year']):
  221. ?>
  222. <option value="<?php echo ((is_array($_tmp=$this->_tpl_vars['year'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  223. " <?php if (( $this->_tpl_vars['sl_year'] == $this->_tpl_vars['year'] )): ?> selected="selected"<?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['year'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  224. &nbsp;&nbsp;</option>
  225. <?php endforeach; endif; unset($_from); ?>
  226. </select>
  227. </p>
  228. <?php if (isset ( $this->_tpl_vars['newsletter'] ) && $this->_tpl_vars['newsletter']): ?>
  229. <p class="checkbox">
  230. <input type="checkbox" name="newsletter" id="newsletter" value="1" <?php if (isset ( $_POST['newsletter'] ) && $_POST['newsletter'] == '1'): ?>checked="checked"<?php endif; ?>>
  231. <label for="newsletter"><?php echo smartyTranslate(array('s' => 'Sign up for our newsletter'), $this);?>
  232. </label>
  233. </p>
  234. <p class="checkbox">
  235. <input type="checkbox" name="optin" id="optin" value="1" <?php if (isset ( $_POST['optin'] ) && $_POST['optin'] == '1'): ?>checked="checked"<?php endif; ?>>
  236. <label for="optin"><?php echo smartyTranslate(array('s' => 'Receive special offers from our partners'), $this);?>
  237. </label>
  238. </p>
  239. <?php endif; ?>
  240. <h3><?php echo smartyTranslate(array('s' => 'Delivery address'), $this);?>
  241. </h3>
  242. <?php $_from = $this->_tpl_vars['dlv_all_fields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  243. foreach ($_from as $this->_tpl_vars['field_name']):
  244. ?>
  245. <?php if ($this->_tpl_vars['field_name'] == 'company'): ?>
  246. <p class="text">
  247. <label for="company"><?php echo smartyTranslate(array('s' => 'Company'), $this);?>
  248. </label>
  249. <input type="text" class="text" id="company" name="company" value="<?php if (isset ( $_POST['company'] )): ?><?php echo $_POST['company']; ?>
  250. <?php endif; ?>" />
  251. </p>
  252. <?php elseif ($this->_tpl_vars['field_name'] == 'vat_number'): ?>
  253. <div id="vat_number" style="display:none;">
  254. <p class="text">
  255. <label for="vat_number"><?php echo smartyTranslate(array('s' => 'VAT number'), $this);?>
  256. </label>
  257. <input type="text" class="text" name="vat_number" value="<?php if (isset ( $_POST['vat_number'] )): ?><?php echo $_POST['vat_number']; ?>
  258. <?php endif; ?>" />
  259. </p>
  260. </div>
  261. <?php elseif ($this->_tpl_vars['field_name'] == 'address1'): ?>
  262. <p class="required text">
  263. <label for="address1"><?php echo smartyTranslate(array('s' => 'Address'), $this);?>
  264. </label>
  265. <input type="text" class="text" name="address1" id="address1" value="<?php if (isset ( $_POST['address1'] )): ?><?php echo $_POST['address1']; ?>
  266. <?php endif; ?>">
  267. <sup>*</sup>
  268. </p>
  269. <?php elseif ($this->_tpl_vars['field_name'] == 'postcode'): ?>
  270. <p class="required postcode text">
  271. <label for="postcode"><?php echo smartyTranslate(array('s' => 'Zip / Postal Code'), $this);?>
  272. </label>
  273. <input type="text" class="text" name="postcode" id="postcode" value="<?php if (isset ( $_POST['postcode'] )): ?><?php echo $_POST['postcode']; ?>
  274. <?php endif; ?>" onblur="$('#postcode').val($('#postcode').val().toUpperCase());">
  275. <sup>*</sup>
  276. </p>
  277. <?php elseif ($this->_tpl_vars['field_name'] == 'city'): ?>
  278. <p class="required text">
  279. <label for="city"><?php echo smartyTranslate(array('s' => 'City'), $this);?>
  280. </label>
  281. <input type="text" class="text" name="city" id="city" value="<?php if (isset ( $_POST['city'] )): ?><?php echo $_POST['city']; ?>
  282. <?php endif; ?>">
  283. <sup>*</sup>
  284. </p>
  285. <!--
  286. if customer hasn't update his layout address, country has to be verified
  287. but it's deprecated
  288. -->
  289. <?php elseif ($this->_tpl_vars['field_name'] == "Country:name" || $this->_tpl_vars['field_name'] == 'country'): ?>
  290. <p class="required select">
  291. <label for="id_country"><?php echo smartyTranslate(array('s' => 'Country'), $this);?>
  292. </label>
  293. <select name="id_country" id="id_country">
  294. <option value="">-</option>
  295. <?php $_from = $this->_tpl_vars['countries']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  296. foreach ($_from as $this->_tpl_vars['v']):
  297. ?>
  298. <option value="<?php echo $this->_tpl_vars['v']['id_country']; ?>
  299. " <?php if (( $this->_tpl_vars['sl_country'] == $this->_tpl_vars['v']['id_country'] )): ?> selected="selected"<?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['v']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  300. </option>
  301. <?php endforeach; endif; unset($_from); ?>
  302. </select>
  303. <sup>*</sup>
  304. </p>
  305. <?php elseif ($this->_tpl_vars['field_name'] == "State:name" || $this->_tpl_vars['field_name'] == 'state'): ?>
  306. <?php $this->assign('stateExist', true); ?>
  307. <p class="required id_state select">
  308. <label for="id_state"><?php echo smartyTranslate(array('s' => 'State'), $this);?>
  309. </label>
  310. <select name="id_state" id="id_state">
  311. <option value="">-</option>
  312. </select>
  313. <sup>*</sup>
  314. </p>
  315. <?php elseif ($this->_tpl_vars['field_name'] == 'phone'): ?>
  316. <p class="text">
  317. <label for="phone"><?php echo smartyTranslate(array('s' => 'Phone'), $this);?>
  318. </label>
  319. <input type="text" class="text" name="phone" id="phone" value="<?php if (isset ( $_POST['phone'] )): ?><?php echo $_POST['phone']; ?>
  320. <?php endif; ?>"> <sup style="color:red;">*</sup>
  321. </p>
  322. <?php endif; ?>
  323. <?php endforeach; endif; unset($_from); ?>
  324. <?php if ($this->_tpl_vars['stateExist'] == false): ?>
  325. <p class="required id_state select">
  326. <label for="id_state"><?php echo smartyTranslate(array('s' => 'State'), $this);?>
  327. </label>
  328. <select name="id_state" id="id_state">
  329. <option value="">-</option>
  330. </select>
  331. <sup>*</sup>
  332. </p>
  333. <?php endif; ?>
  334. <input type="hidden" name="alias" id="alias" value="<?php echo smartyTranslate(array('s' => 'My address'), $this);?>
  335. ">
  336. <input type="hidden" name="is_new_customer" id="is_new_customer" value="0">
  337. <!-- END Account -->
  338. </div>
  339. </fieldset>
  340. <fieldset class="account_creation dni">
  341. <h3><?php echo smartyTranslate(array('s' => 'Tax identification'), $this);?>
  342. </h3>
  343. <p class="required text">
  344. <label for="dni"><?php echo smartyTranslate(array('s' => 'Identification number'), $this);?>
  345. </label>
  346. <input type="text" class="text" name="dni" id="dni" value="<?php if (isset ( $_POST['dni'] )): ?><?php echo $_POST['dni']; ?>
  347. <?php endif; ?>" />
  348. <span class="form_info"><?php echo smartyTranslate(array('s' => 'DNI / NIF / NIE'), $this);?>
  349. </span>
  350. <sup>*</sup>
  351. </p>
  352. </fieldset>
  353. <p class="cart_navigation required submit">
  354. <span><sup>*</sup><?php echo smartyTranslate(array('s' => 'Required field'), $this);?>
  355. </span>
  356. <input type="submit" class="button" name="submitGuestAccount" id="submitGuestAccount" style="float:right" value="<?php echo smartyTranslate(array('s' => 'Continue'), $this);?>
  357. ">
  358. </p>
  359. </form>
  360. <?php endif; ?>
  361. <?php else: ?>
  362. <form action="<?php echo $this->_tpl_vars['link']->getPageLink('authentication.php',true); ?>
  363. " method="post" id="account-creation_form" class="std">
  364. <?php echo $this->_tpl_vars['HOOK_CREATE_ACCOUNT_TOP']; ?>
  365. <fieldset class="account_creation">
  366. <h3><?php echo smartyTranslate(array('s' => 'Your personal information'), $this);?>
  367. </h3>
  368. <p class="radio required">
  369. <span><?php echo smartyTranslate(array('s' => 'Title'), $this);?>
  370. </span>
  371. <input type="radio" name="id_gender" id="id_gender1" value="1" <?php if (isset ( $_POST['id_gender'] ) && $_POST['id_gender'] == 1): ?>checked="checked"<?php endif; ?> />
  372. <label for="id_gender1" class="top"><?php echo smartyTranslate(array('s' => 'Mr.'), $this);?>
  373. </label>
  374. <input type="radio" name="id_gender" id="id_gender2" value="2" <?php if (isset ( $_POST['id_gender'] ) && $_POST['id_gender'] == 2): ?>checked="checked"<?php endif; ?> />
  375. <label for="id_gender2" class="top"><?php echo smartyTranslate(array('s' => 'Ms.'), $this);?>
  376. </label>
  377. </p>
  378. <p class="required text">
  379. <label for="customer_firstname"><?php echo smartyTranslate(array('s' => 'First name'), $this);?>
  380. </label>
  381. <input onkeyup="$('#firstname').val(this.value);" type="text" class="text" id="customer_firstname" name="customer_firstname" value="<?php if (isset ( $_POST['customer_firstname'] )): ?><?php echo $_POST['customer_firstname']; ?>
  382. <?php endif; ?>" />
  383. <sup>*</sup>
  384. </p>
  385. <p class="required text">
  386. <label for="customer_lastname"><?php echo smartyTranslate(array('s' => 'Last name'), $this);?>
  387. </label>
  388. <input onkeyup="$('#lastname').val(this.value);" type="text" class="text" id="customer_lastname" name="customer_lastname" value="<?php if (isset ( $_POST['customer_lastname'] )): ?><?php echo $_POST['customer_lastname']; ?>
  389. <?php endif; ?>" />
  390. <sup>*</sup>
  391. </p>
  392. <p class="required text">
  393. <label for="email"><?php echo smartyTranslate(array('s' => 'E-mail'), $this);?>
  394. </label>
  395. <input type="text" class="text" id="email" name="email" value="<?php if (isset ( $_POST['email'] )): ?><?php echo $_POST['email']; ?>
  396. <?php endif; ?>" />
  397. <sup>*</sup>
  398. </p>
  399. <p class="required password">
  400. <label for="passwd"><?php echo smartyTranslate(array('s' => 'Password'), $this);?>
  401. </label>
  402. <input type="password" class="text" name="passwd" id="passwd" />
  403. <sup>*</sup>
  404. <span class="form_info"><?php echo smartyTranslate(array('s' => '(5 characters min.)'), $this);?>
  405. </span>
  406. </p>
  407. <p class="select">
  408. <span><?php echo smartyTranslate(array('s' => 'Date of Birth'), $this);?>
  409. </span>
  410. <select id="days" name="days">
  411. <option value="">-</option>
  412. <?php $_from = $this->_tpl_vars['days']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  413. foreach ($_from as $this->_tpl_vars['day']):
  414. ?>
  415. <option value="<?php echo ((is_array($_tmp=$this->_tpl_vars['day'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  416. " <?php if (( $this->_tpl_vars['sl_day'] == $this->_tpl_vars['day'] )): ?> selected="selected"<?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['day'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  417. &nbsp;&nbsp;</option>
  418. <?php endforeach; endif; unset($_from); ?>
  419. </select>
  420. <select id="months" name="months">
  421. <option value="">-</option>
  422. <?php $_from = $this->_tpl_vars['months']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  423. foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['month']):
  424. ?>
  425. <option value="<?php echo ((is_array($_tmp=$this->_tpl_vars['k'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  426. " <?php if (( $this->_tpl_vars['sl_month'] == $this->_tpl_vars['k'] )): ?> selected="selected"<?php endif; ?>><?php echo smartyTranslate(array('s' => ($this->_tpl_vars['month'])), $this);?>
  427. &nbsp;</option>
  428. <?php endforeach; endif; unset($_from); ?>
  429. </select>
  430. <select id="years" name="years">
  431. <option value="">-</option>
  432. <?php $_from = $this->_tpl_vars['years']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  433. foreach ($_from as $this->_tpl_vars['year']):
  434. ?>
  435. <option value="<?php echo ((is_array($_tmp=$this->_tpl_vars['year'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  436. " <?php if (( $this->_tpl_vars['sl_year'] == $this->_tpl_vars['year'] )): ?> selected="selected"<?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['year'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  437. &nbsp;&nbsp;</option>
  438. <?php endforeach; endif; unset($_from); ?>
  439. </select>
  440. </p>
  441. <?php if (isset ( $this->_tpl_vars['newsletter'] ) && $this->_tpl_vars['newsletter']): ?>
  442. <p class="checkbox" >
  443. <input type="checkbox" name="newsletter" id="newsletter" value="1" <?php if (isset ( $_POST['newsletter'] ) && $_POST['newsletter'] == 1): ?> checked="checked"<?php endif; ?> />
  444. <label for="newsletter"><?php echo smartyTranslate(array('s' => 'Sign up for our newsletter'), $this);?>
  445. </label>
  446. </p>
  447. <p class="checkbox" >
  448. <input type="checkbox"name="optin" id="optin" value="1" <?php if (isset ( $_POST['optin'] ) && $_POST['optin'] == 1): ?> checked="checked"<?php endif; ?> />
  449. <label for="optin"><?php echo smartyTranslate(array('s' => 'Receive special offers from our partners'), $this);?>
  450. </label>
  451. </p>
  452. <?php endif; ?>
  453. </fieldset>
  454. <fieldset class="account_creation">
  455. <h3><?php echo smartyTranslate(array('s' => 'Your address'), $this);?>
  456. </h3>
  457. <?php $_from = $this->_tpl_vars['dlv_all_fields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  458. foreach ($_from as $this->_tpl_vars['field_name']):
  459. ?>
  460. <?php if ($this->_tpl_vars['field_name'] == 'company'): ?>
  461. <p class="text">
  462. <label for="company"><?php echo smartyTranslate(array('s' => 'Company'), $this);?>
  463. </label>
  464. <input type="text" class="text" id="company" name="company" value="<?php if (isset ( $_POST['company'] )): ?><?php echo $_POST['company']; ?>
  465. <?php endif; ?>" />
  466. </p>
  467. <?php elseif ($this->_tpl_vars['field_name'] == 'vat_number'): ?>
  468. <div id="vat_number" style="display:none;">
  469. <p class="text">
  470. <label for="vat_number"><?php echo smartyTranslate(array('s' => 'VAT number'), $this);?>
  471. </label>
  472. <input type="text" class="text" name="vat_number" value="<?php if (isset ( $_POST['vat_number'] )): ?><?php echo $_POST['vat_number']; ?>
  473. <?php endif; ?>" />
  474. </p>
  475. </div>
  476. <?php elseif ($this->_tpl_vars['field_name'] == 'firstname'): ?>
  477. <p class="required text">
  478. <label for="firstname"><?php echo smartyTranslate(array('s' => 'First name'), $this);?>
  479. </label>
  480. <input type="text" class="text" id="firstname" name="firstname" value="<?php if (isset ( $_POST['firstname'] )): ?><?php echo $_POST['firstname']; ?>
  481. <?php endif; ?>" />
  482. <sup>*</sup>
  483. </p>
  484. <?php elseif ($this->_tpl_vars['field_name'] == 'lastname'): ?>
  485. <p class="required text">
  486. <label for="lastname"><?php echo smartyTranslate(array('s' => 'Last name'), $this);?>
  487. </label>
  488. <input type="text" class="text" id="lastname" name="lastname" value="<?php if (isset ( $_POST['lastname'] )): ?><?php echo $_POST['lastname']; ?>
  489. <?php endif; ?>" />
  490. <sup>*</sup>
  491. </p>
  492. <?php elseif ($this->_tpl_vars['field_name'] == 'address1'): ?>
  493. <p class="required text">
  494. <label for="address1"><?php echo smartyTranslate(array('s' => 'Address'), $this);?>
  495. </label>
  496. <input type="text" class="text" name="address1" id="address1" value="<?php if (isset ( $_POST['address1'] )): ?><?php echo $_POST['address1']; ?>
  497. <?php endif; ?>" />
  498. <sup>*</sup>
  499. <span class="inline-infos"><?php echo smartyTranslate(array('s' => 'Street address, P.O. box, company name, c/o'), $this);?>
  500. </span>
  501. </p>
  502. <?php elseif ($this->_tpl_vars['field_name'] == 'address2'): ?>
  503. <p class="text">
  504. <label for="address2"><?php echo smartyTranslate(array('s' => 'Address (Line 2)'), $this);?>
  505. </label>
  506. <input type="text" class="text" name="address2" id="address2" value="<?php if (isset ( $_POST['address2'] )): ?><?php echo $_POST['address2']; ?>
  507. <?php endif; ?>" />
  508. <span class="inline-infos"><?php echo smartyTranslate(array('s' => 'Apartment, suite, unit, building, floor, etc.'), $this);?>
  509. </span>
  510. </p>
  511. <?php elseif ($this->_tpl_vars['field_name'] == 'postcode'): ?>
  512. <p class="required postcode text">
  513. <label for="postcode"><?php echo smartyTranslate(array('s' => 'Zip / Postal Code'), $this);?>
  514. </label>
  515. <input type="text" class="text" name="postcode" id="postcode" value="<?php if (isset ( $_POST['postcode'] )): ?><?php echo $_POST['postcode']; ?>
  516. <?php endif; ?>" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" />
  517. <sup>*</sup>
  518. </p>
  519. <?php elseif ($this->_tpl_vars['field_name'] == 'city'): ?>
  520. <p class="required text">
  521. <label for="city"><?php echo smartyTranslate(array('s' => 'City'), $this);?>
  522. </label>
  523. <input type="text" class="text" name="city" id="city" value="<?php if (isset ( $_POST['city'] )): ?><?php echo $_POST['city']; ?>
  524. <?php endif; ?>" />
  525. <sup>*</sup>
  526. </p>
  527. <!--
  528. if customer hasn't update his layout address, country has to be verified
  529. but it's deprecated
  530. -->
  531. <?php elseif ($this->_tpl_vars['field_name'] == "Country:name" || $this->_tpl_vars['field_name'] == 'country'): ?>
  532. <p class="required select">
  533. <label for="id_country"><?php echo smartyTranslate(array('s' => 'Country'), $this);?>
  534. </label>
  535. <select name="id_country" id="id_country">
  536. <option value="">-</option>
  537. <?php $_from = $this->_tpl_vars['countries']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  538. foreach ($_from as $this->_tpl_vars['v']):
  539. ?>
  540. <option value="<?php echo $this->_tpl_vars['v']['id_country']; ?>
  541. " <?php if (( $this->_tpl_vars['sl_country'] == $this->_tpl_vars['v']['id_country'] )): ?> selected="selected"<?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['v']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  542. </option>
  543. <?php endforeach; endif; unset($_from); ?>
  544. </select>
  545. <sup>*</sup>
  546. </p>
  547. <?php elseif ($this->_tpl_vars['field_name'] == "State:name" || $this->_tpl_vars['field_name'] == 'state'): ?>
  548. <?php $this->assign('stateExist', true); ?>
  549. <p class="required id_state select">
  550. <label for="id_state"><?php echo smartyTranslate(array('s' => 'State'), $this);?>
  551. </label>
  552. <select name="id_state" id="id_state">
  553. <option value="">-</option>
  554. </select>
  555. <sup>*</sup>
  556. </p>
  557. <?php endif; ?>
  558. <?php endforeach; endif; unset($_from); ?>
  559. <?php if ($this->_tpl_vars['stateExist'] == false): ?>
  560. <p class="required id_state select">
  561. <label for="id_state"><?php echo smartyTranslate(array('s' => 'State'), $this);?>
  562. </label>
  563. <select name="id_state" id="id_state">
  564. <option value="">-</option>
  565. </select>
  566. <sup>*</sup>
  567. </p>
  568. <?php endif; ?>
  569. <p class="textarea">
  570. <label for="other"><?php echo smartyTranslate(array('s' => 'Additional information'), $this);?>
  571. </label>
  572. <textarea name="other" id="other" cols="26" rows="3"><?php if (isset ( $_POST['other'] )): ?><?php echo $_POST['other']; ?>
  573. <?php endif; ?></textarea>
  574. </p>
  575. <p style="margin-left:50px;"><?php echo smartyTranslate(array('s' => 'You must register at least one phone number'), $this);?>
  576. <sup style="color:red;">*</sup></p>
  577. <p class="text">
  578. <label for="phone"><?php echo smartyTranslate(array('s' => 'Home phone'), $this);?>
  579. </label>
  580. <input type="text" class="text" name="phone" id="phone" value="<?php if (isset ( $_POST['phone'] )): ?><?php echo $_POST['phone']; ?>
  581. <?php endif; ?>" />
  582. </p>
  583. <p class="text">
  584. <label for="phone_mobile"><?php echo smartyTranslate(array('s' => 'Mobile phone'), $this);?>
  585. </label>
  586. <input type="text" class="text" name="phone_mobile" id="phone_mobile" value="<?php if (isset ( $_POST['phone_mobile'] )): ?><?php echo $_POST['phone_mobile']; ?>
  587. <?php endif; ?>" />
  588. </p>
  589. <p class="required text" id="address_alias">
  590. <label for="alias"><?php echo smartyTranslate(array('s' => 'Assign an address title for future reference'), $this);?>
  591. </label>
  592. <input type="text" class="text" name="alias" id="alias" value="<?php if (isset ( $_POST['alias'] )): ?><?php echo $_POST['alias']; ?>
  593. <?php else: ?><?php echo smartyTranslate(array('s' => 'My address'), $this);?>
  594. <?php endif; ?>" />
  595. <sup>*</sup>
  596. </p>
  597. </fieldset>
  598. <fieldset class="account_creation dni">
  599. <h3><?php echo smartyTranslate(array('s' => 'Tax identification'), $this);?>
  600. </h3>
  601. <p class="required text">
  602. <label for="dni"><?php echo smartyTranslate(array('s' => 'Identification number'), $this);?>
  603. </label>
  604. <input type="text" class="text" name="dni" id="dni" value="<?php if (isset ( $_POST['dni'] )): ?><?php echo $_POST['dni']; ?>
  605. <?php endif; ?>" />
  606. <span class="form_info"><?php echo smartyTranslate(array('s' => 'DNI / NIF / NIE'), $this);?>
  607. </span>
  608. <sup>*</sup>
  609. </p>
  610. </fieldset>
  611. <?php echo $this->_tpl_vars['HOOK_CREATE_ACCOUNT_FORM']; ?>
  612. <p class="cart_navigation required submit">
  613. <input type="hidden" name="email_create" value="1" />
  614. <input type="hidden" name="is_new_customer" value="1" />
  615. <?php if (isset ( $this->_tpl_vars['back'] )): ?><input type="hidden" class="hidden" name="back" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['back'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>
  616. " /><?php endif; ?>
  617. <input type="submit" name="submitAccount" id="submitAccount" value="<?php echo smartyTranslate(array('s' => 'Register'), $this);?>
  618. " class="exclusive" />
  619. <span><sup>*</sup><?php echo smartyTranslate(array('s' => 'Required field'), $this);?>
  620. </span>
  621. </p>
  622. </form>
  623. <?php endif; ?>