|
zencart模板系统文件笔记5:tpl_modules_create_account.php
zencart模板系统文件笔记5:tpl_modules_create_account.php
(zencart建站vip内部交流俱乐部--体验)
文件名:tpl_modules_create_account.php
文件隶属于:英文版zen-cart-v139h
文件路径:includes\templates\template_default\templates\tpl_modules_create_account.php
系统上隶属于:模板页面前台显示文件tpl_modules_create_account.php
主要功能:前台显示用户注册表单页面
<?php
/**
*PageTemplate
*/
?>
//判断信息堆栈输出表单请求信息
<?phpif($messageStack->size('create_account')>0)echo$messageStack->output('create_account');?>
<divclass="alertforward"><?phpechoFORM_REQUIRED_INFORMATION;?></div>
<brclass="clearBoth"/>
//判断是否输出隐私条款
<?php
if(DISPLAY_PRIVACY_CONDITIONS=='true'){
?>
<fieldset>
<legend><?phpechoTABLE_HEADING_PRIVACY_CONDITIONS;?></legend>
<divclass="information"><?phpechoTEXT_PRIVACY_CONDITIONS_DESCRIPTION;?></div>
<?phpechozen_draw_checkbox_field('privacy_conditions','1',false,'id="privacy"');?>
<labelclass="checkboxLabel"for="privacy"><?phpechoTEXT_PRIVACY_CONDITIONS_CONFIRM;?></label>
</fieldset>
<?php
}
?>
//公司名称表单文本输入框
<?php
if(ACCOUNT_COMPANY=='true'){
?>
<fieldset>
<legend><?phpechoCATEGORY_COMPANY;?></legend>
<labelclass="inputLabel"for="company"><?phpechoENTRY_COMPANY;?></label>
<?phpechozen_draw_input_field('company','',zen_set_field_length(TABLE_ADDRESS_BOOK,'entry_company','40').'id="company"').(zen_not_null(ENTRY_COMPANY_TEXT)?'<spanclass="alert">'.ENTRY_COMPANY_TEXT.'</span>':'');?>
</fieldset>
<?php
}
?>
<fieldset>
<legend><?phpechoTABLE_HEADING_ADDRESS_DETAILS;?></legend>
//性别输入
<?php
if(ACCOUNT_GENDER=='true'){
?>
<?phpechozen_draw_radio_field('gender','m','','id="gender-male"').'<labelclass="radioButtonLabel"for="gender-male">'.MALE.'</label>'.zen_draw_radio_field('gender','f','','id="gender-female"').'<labelclass="radioButtonLabel"for="gender-female">'.FEMALE.'</label>'.(zen_not_null(ENTRY_GENDER_TEXT)?'<spanclass="alert">'.ENTRY_GENDER_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
<?php
}
?>
//名字输入
<labelclass="inputLabel"for="firstname"><?phpechoENTRY_FIRST_NAME;?></label>
<?phpechozen_draw_input_field('firstname','',zen_set_field_length(TABLE_CUSTOMERS,'customers_firstname','40').'id="firstname"').(zen_not_null(ENTRY_FIRST_NAME_TEXT)?'<spanclass="alert">'.ENTRY_FIRST_NAME_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
//姓输入
<labelclass="inputLabel"for="lastname"><?phpechoENTRY_LAST_NAME;?></label>
<?phpechozen_draw_input_field('lastname','',zen_set_field_length(TABLE_CUSTOMERS,'customers_lastname','40').'id="lastname"').(zen_not_null(ENTRY_LAST_NAME_TEXT)?'<spanclass="alert">'.ENTRY_LAST_NAME_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
//地址
<labelclass="inputLabel"for="street-address"><?phpechoENTRY_STREET_ADDRESS;?></label>
<?phpechozen_draw_input_field('street_address','',zen_set_field_length(TABLE_ADDRESS_BOOK,'entry_street_address','40').'id="street-address"').(zen_not_null(ENTRY_STREET_ADDRESS_TEXT)?'<spanclass="alert">'.ENTRY_STREET_ADDRESS_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
<?php
if(ACCOUNT_SUBURB=='true'){
?>
<labelclass="inputLabel"for="suburb"><?phpechoENTRY_SUBURB;?></label>
<?phpechozen_draw_input_field('suburb','',zen_set_field_length(TABLE_ADDRESS_BOOK,'entry_suburb','40').'id="suburb"').(zen_not_null(ENTRY_SUBURB_TEXT)?'<spanclass="alert">'.ENTRY_SUBURB_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
<?php
}
?>
//城市
<labelclass="inputLabel"for="city"><?phpechoENTRY_CITY;?></label>
<?phpechozen_draw_input_field('city','',zen_set_field_length(TABLE_ADDRESS_BOOK,'entry_city','40').'id="city"').(zen_not_null(ENTRY_CITY_TEXT)?'<spanclass="alert">'.ENTRY_CITY_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
//州/省
<?php
if(ACCOUNT_STATE=='true'){
if($flag_show_pulldown_states==true){
?>
<labelclass="inputLabel"for="stateZone"id="zoneLabel"><?phpechoENTRY_STATE;?></label>
<?php
echozen_draw_pull_down_menu('zone_id',zen_prepare_country_zones_pull_down($selected_country),$zone_id,'id="stateZone"');
if(zen_not_null(ENTRY_STATE_TEXT))echo'<spanclass="alert">'.ENTRY_STATE_TEXT.'</span>';
}
?>
<?phpif($flag_show_pulldown_states==true){?>
<brclass="clearBoth"id="stBreak"/>
<?php}?>
<labelclass="inputLabel"for="state"id="stateLabel"><?phpecho$state_field_label;?></label>
<?php
echozen_draw_input_field('state','',zen_set_field_length(TABLE_ADDRESS_BOOK,'entry_state','40').'id="state"');
if(zen_not_null(ENTRY_STATE_TEXT))echo'<spanclass="alert"id="stText">'.ENTRY_STATE_TEXT.'</span>';
if($flag_show_pulldown_states==false){
echozen_draw_hidden_field('zone_id',$zone_name,'');
}
?>
<brclass="clearBoth"/>
<?php
}
?>
//邮政编码
<labelclass="inputLabel"for="postcode"><?phpechoENTRY_POST_CODE;?></label>
<?phpechozen_draw_input_field('postcode','',zen_set_field_length(TABLE_ADDRESS_BOOK,'entry_postcode','40').'id="postcode"').(zen_not_null(ENTRY_POST_CODE_TEXT)?'<spanclass="alert">'.ENTRY_POST_CODE_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
//国家
<labelclass="inputLabel"for="country"><?phpechoENTRY_COUNTRY;?></label>
<?phpechozen_get_country_list('zone_country_id',$selected_country,'id="country"'.($flag_show_pulldown_states==true?'onchange="update_zone(this.form);"':'')).(zen_not_null(ENTRY_COUNTRY_TEXT)?'<spanclass="alert">'.ENTRY_COUNTRY_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
</fieldset>
//电话号码
<fieldset>
<legend><?phpechoTABLE_HEADING_PHONE_FAX_DETAILS;?></legend>
<labelclass="inputLabel"for="telephone"><?phpechoENTRY_TELEPHONE_NUMBER;?></label>
<?phpechozen_draw_input_field('telephone','',zen_set_field_length(TABLE_CUSTOMERS,'customers_telephone','40').'id="telephone"').(zen_not_null(ENTRY_TELEPHONE_NUMBER_TEXT)?'<spanclass="alert">'.ENTRY_TELEPHONE_NUMBER_TEXT.'</span>':'');?>
//传真号码
<?php
if(ACCOUNT_FAX_NUMBER=='true'){
?>
<brclass="clearBoth"/>
<labelclass="inputLabel"for="fax"><?phpechoENTRY_FAX_NUMBER;?></label>
<?phpechozen_draw_input_field('fax','','id="fax"').(zen_not_null(ENTRY_FAX_NUMBER_TEXT)?'<spanclass="alert">'.ENTRY_FAX_NUMBER_TEXT.'</span>':'');?>
<?php
}
?>
</fieldset>
//生日
<?php
if(ACCOUNT_DOB=='true'){
?>
<fieldset>
<legend><?phpechoTABLE_HEADING_DATE_OF_BIRTH;?></legend>
<labelclass="inputLabel"for="dob"><?phpechoENTRY_DATE_OF_BIRTH;?></label>
<?phpechozen_draw_input_field('dob','','id="dob"').(zen_not_null(ENTRY_DATE_OF_BIRTH_TEXT)?'<spanclass="alert">'.ENTRY_DATE_OF_BIRTH_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
</fieldset>
<?php
}
?>
//email地址
<fieldset>
<legend><?phpechoTABLE_HEADING_LOGIN_DETAILS;?></legend>
<labelclass="inputLabel"for="email-address"><?phpechoENTRY_EMAIL_ADDRESS;?></label>
<?phpechozen_draw_input_field('email_address','',zen_set_field_length(TABLE_CUSTOMERS,'customers_email_address','40').'id="email-address"').(zen_not_null(ENTRY_EMAIL_ADDRESS_TEXT)?'<spanclass="alert">'.ENTRY_EMAIL_ADDRESS_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
//判断昵称
<?php
if($phpBB->phpBB['installed']==true){
?>
<labelclass="inputLabel"for="nickname"><?phpechoENTRY_NICK;?></label>
<?phpechozen_draw_input_field('nick','','id="nickname"').(zen_not_null(ENTRY_NICK_TEXT)?'<spanclass="alert">'.ENTRY_NICK_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
<?php
}
?>
//密码
<labelclass="inputLabel"for="password-new"><?phpechoENTRY_PASSWORD;?></label>
<?phpechozen_draw_password_field('password','',zen_set_field_length(TABLE_CUSTOMERS,'customers_password','20').'id="password-new"').(zen_not_null(ENTRY_PASSWORD_TEXT)?'<spanclass="alert">'.ENTRY_PASSWORD_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
//密码确定
<labelclass="inputLabel"for="password-confirm"><?phpechoENTRY_PASSWORD_CONFIRMATION;?></label>
<?phpechozen_draw_password_field('confirmation','',zen_set_field_length(TABLE_CUSTOMERS,'customers_password','20').'id="password-confirm"').(zen_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT)?'<spanclass="alert">'.ENTRY_PASSWORD_CONFIRMATION_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
</fieldset>
//Email订阅
<fieldset>
<legend><?phpechoENTRY_EMAIL_PREFERENCE;?></legend>
<?php
if(ACCOUNT_NEWSLETTER_STATUS!=0){
?>
<?phpechozen_draw_checkbox_field('newsletter','1',$newsletter,'id="newsletter-checkbox"').'<labelclass="checkboxLabel"for="newsletter-checkbox">'.ENTRY_NEWSLETTER.'</label>'.(zen_not_null(ENTRY_NEWSLETTER_TEXT)?'<spanclass="alert">'.ENTRY_NEWSLETTER_TEXT.'</span>':'');?>
<brclass="clearBoth"/>
<?php}?>
//订阅形式支持html或text
<?phpechozen_draw_radio_field('email_format','HTML',($email_format=='HTML'?true:false),'id="email-format-html"').'<labelclass="radioButtonLabel"for="email-format-html">'.ENTRY_EMAIL_HTML_DISPLAY.'</label>'.zen_draw_radio_field('email_format','TEXT',($email_format=='TEXT'?true:false),'id="email-format-text"').'<labelclass="radioButtonLabel"for="email-format-text">'.ENTRY_EMAIL_TEXT_DISPLAY.'</label>';?>
<brclass="clearBoth"/>
</fieldset>
<?php
if(CUSTOMERS_REFERRAL_STATUS==2){
?>
<fieldset>
<legend><?phpechoTABLE_HEADING_REFERRAL_DETAILS;?></legend>
<labelclass="inputLabel"for="customers_referral"><?phpechoENTRY_CUSTOMERS_REFERRAL;?></label>
<?phpechozen_draw_input_field('customers_referral','',zen_set_field_length(TABLE_CUSTOMERS,'customers_referral','15').'id="customers_referral"');?>
<brclass="clearBoth"/>
</fieldset>
<?php}?>
这是“外贸建站推广分享社区"zencart自主开发建站的系列免费体验教程,如你想自主建站,更深入地了解zencart建站仿站和定制,欢迎你加入我们的vip内部交流俱乐部.
《zencart模板系统文件笔记》是内部会员特权,只分享到第十篇
更多内容请百度一下:
zencart模板系统文件笔记 |
|