index.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. {extend name="default/base/base_member" /}
  2. {block name="member_main"}
  3. <div class="dsm-user-profile">
  4. <div class="user-avatar"><span><img src="{:get_member_avatar($member_info.member_avatar)}?{$Think.TIMESTAMP}"></span></div>
  5. <div class="dsm-default-form fr">
  6. <form method="post" id="profile_form" action="{:url('Memberinformation/index')}">
  7. <input type="hidden" name="old_member_avatar" value="{$member_info.member_avatar}" />
  8. <dl>
  9. <dt>{$Think.lang.home_member_username}{$Think.lang.ds_colon}</dt>
  10. <dd>
  11. <span class="w400">{$member_info.member_nickname}&nbsp;&nbsp;
  12. {if $member_info.level_name}
  13. <div class="ds-grade-mini" style="cursor:pointer;" onclick="javascript:go('{:url('Pointgrade/index')}');">{$member_info.level_name}</div>
  14. {/if}
  15. </span>
  16. <span>&nbsp;&nbsp;{$Think.lang.home_member_privacy_set}</span>
  17. </dd>
  18. </dl>
  19. <dl>
  20. <dt>{$Think.lang.home_member_email}{$Think.lang.ds_colon}</dt>
  21. <dd>
  22. <span class="w400">{$member_info.member_email}&nbsp;&nbsp;
  23. {if $member_info.member_emailbind == '1'}
  24. <a href="{:url('Membersecurity/auth',['type'=>'modify_email'])}">{$Think.lang.change_mailbox}</a>
  25. {else}
  26. <a href="{:url('Membersecurity/auth',['type'=>'modify_email'])}">{$Think.lang.bind_mailbox}</a>
  27. {/if}
  28. </span>
  29. <span>
  30. <select name="privacy[email]">
  31. <option value="0" {present name="member_info.member_privacy.email"} selected="selected"{/present}>{$Think.lang.home_member_public}</option>
  32. <option value="1" {present name="member_info.member_privacy.email"}{if $member_info.member_privacy.email== '1'}selected="selected"{/if}{/present}>{$Think.lang.home_member_friend}</option>
  33. <option value="2" {present name="member_info.member_privacy.email"}{if $member_info.member_privacy.email== '2'}selected="selected"{/if}{/present}>{$Think.lang.home_member_privary}</option>
  34. </select>
  35. </span>
  36. </dd>
  37. </dl>
  38. <dl>
  39. <dt>{$Think.lang.home_member_nickname}{$Think.lang.ds_colon}</dt>
  40. <dd><span class="w400">
  41. <input name="member_nickname" type="text" class="text" maxlength="50" id="member_nickname" value="{$member_info.member_nickname}" />
  42. </span>
  43. <span>
  44. <select name="privacy[nickname]">
  45. <option value="0" {present name="member_info.member_privacy.nickname"}{if $member_info.member_privacy.nickname== '0'}selected="selected"{/if}{/present}>{$Think.lang.home_member_public}</option>
  46. <option value="1" {present name="member_info.member_privacy.nickname"}{if $member_info.member_privacy.nickname== '1'}selected="selected"{/if}{/present}>{$Think.lang.home_member_friend}</option>
  47. <option value="2" {present name="member_info.member_privacy.nickname"}{if $member_info.member_privacy.nickname== '2'}selected="selected"{/if}{/present}>{$Think.lang.home_member_privary}</option>
  48. </select>
  49. </span></dd>
  50. </dl>
  51. <dl>
  52. <dt>{$Think.lang.home_member_sex}{$Think.lang.ds_colon}</dt>
  53. <dd>
  54. <span class="w400">
  55. <label><input type="radio" name="member_sex" value="3" {if $member_info.member_sex== '3' || $member_info.member_sex !== '2' && $member_info.member_sex !== '1'}checked="checked"{/if}/>{$Think.lang.home_member_secret}</label>
  56. &nbsp;&nbsp;
  57. <label><input type="radio" name="member_sex" value="2" {if $member_info.member_sex== '2'}checked="checked"{/if} />{$Think.lang.home_member_female}</label>
  58. &nbsp;&nbsp;
  59. <label><input type="radio" name="member_sex" value="1" {if $member_info.member_sex== '1'}checked="checked"{/if} />{$Think.lang.home_member_male}</label>
  60. </span>
  61. <span>
  62. <select name="privacy[sex]">
  63. <option value="0" {present name="member_info.member_privacy.sex"}{if $member_info.member_privacy.sex== '0'}selected="selected"{/if}{/present}>{$Think.lang.home_member_public}</option>
  64. <option value="1" {present name="member_info.member_privacy.sex"}{if $member_info.member_privacy.sex== '1'}selected="selected"{/if}{/present}>{$Think.lang.home_member_friend}</option>
  65. <option value="2" {present name="member_info.member_privacy.sex"}{if $member_info.member_privacy.sex== '2'}selected="selected"{/if}{/present}>{$Think.lang.home_member_privary}</option>
  66. </select>
  67. </span>
  68. </dd>
  69. </dl>
  70. <dl>
  71. <dt>{$Think.lang.home_member_birthday}{$Think.lang.ds_colon}</dt>
  72. <dd><span class="w400">
  73. <input type="text" class="text" name="birthday" maxlength="10" id="birthday" value="{:date('Y-m-d',$member_info.member_birthday)}" />
  74. </span>
  75. <span>
  76. <select name="privacy[birthday]">
  77. <option value="0" {present name="member_info.member_privacy.birthday"}{if $member_info.member_privacy.birthday== '0'}selected="selected"{/if}{/present}>{$Think.lang.home_member_public}</option>
  78. <option value="1" {present name="member_info.member_privacy.birthday"}{if $member_info.member_privacy.birthday== '1'}selected="selected"{/if}{/present}>{$Think.lang.home_member_friend}</option>
  79. <option value="2" {present name="member_info.member_privacy.birthday"}{if $member_info.member_privacy.birthday== '2'}selected="selected"{/if}{/present}>{$Think.lang.home_member_privary}</option>
  80. </select>
  81. </span>
  82. </dd>
  83. </dl>
  84. <dl>
  85. <dt>{$Think.lang.home_member_areainfo}{$Think.lang.ds_colon}</dt>
  86. <dd>
  87. <span class="w400">
  88. <input type="hidden" value="{$member_info.member_provinceid|default=''}" name="province_id" id="_area_1">
  89. <input type="hidden" value="{$member_info.member_cityid|default=''}" name="city_id" id="_area_2">
  90. <input type="hidden" value="{$member_info.member_areaid|default=''}" name="area_id" id="_area_3">
  91. <input type="hidden" name="area_info" id="region" value="{$member_info.member_areainfo|default=''}"/>
  92. </span>
  93. <span>
  94. <select name="privacy[area]">
  95. <option value="0" {present name="member_info.member_privacy.area"}{if $member_info.member_privacy.area== '0'}selected="selected"{/if}{/present}>{$Think.lang.home_member_public}</option>
  96. <option value="1" {present name="member_info.member_privacy.area"}{if $member_info.member_privacy.area== '1'}selected="selected"{/if}{/present}>{$Think.lang.home_member_friend}</option>
  97. <option value="2" {present name="member_info.member_privacy.area"}{if $member_info.member_privacy.area== '2'}selected="selected"{/if}{/present}>{$Think.lang.home_member_privary}</option>
  98. </select>
  99. </span>
  100. </dd>
  101. </dl>
  102. <dl>
  103. <dt>QQ{$Think.lang.ds_colon}</dt>
  104. <dd><span class="w400">
  105. <input type="text" class="text" maxlength="30" name="member_qq" value="{$member_info.member_qq}" />
  106. </span>
  107. <span>
  108. <select name="privacy[qq]">
  109. <option value="0" {present name="member_info.member_privacy.qq"}{if $member_info.member_privacy.qq== '0'}selected="selected"{/if}{/present}>{$Think.lang.home_member_public}</option>
  110. <option value="1" {present name="member_info.member_privacy.qq"}{if $member_info.member_privacy.qq== '1'}selected="selected"{/if}{/present}>{$Think.lang.home_member_friend}</option>
  111. <option value="2" {present name="member_info.member_privacy.qq"}{if $member_info.member_privacy.qq== '2'}selected="selected"{/if}{/present}>{$Think.lang.home_member_privary}</option>
  112. </select>
  113. </span></dd>
  114. </dl>
  115. <dl>
  116. <dt>{$Think.lang.home_member_wangwang}{$Think.lang.ds_colon}</dt>
  117. <dd><span class="w400">
  118. <input name="member_ww" type="text" class="text" maxlength="50" id="member_ww"
  119. value="{$member_info.member_ww}" />
  120. </span>
  121. <span>
  122. <select name="privacy[ww]">
  123. <option value="0" {present name="member_info.member_privacy.ww"}{if $member_info.member_privacy.ww== '0'}selected="selected"{/if}{/present}>{$Think.lang.home_member_public}</option>
  124. <option value="1" {present name="member_info.member_privacy.ww"}{if $member_info.member_privacy.ww== '1'}selected="selected"{/if}{/present}>{$Think.lang.home_member_friend}</option>
  125. <option value="2" {present name="member_info.member_privacy.ww"}{if $member_info.member_privacy.ww== '2'}selected="selected"{/if}{/present}>{$Think.lang.home_member_privary}</option>
  126. </select>
  127. </span></dd>
  128. </dl>
  129. <dl class="bottom">
  130. <dt></dt>
  131. <dd>
  132. <input type="submit" class="submit" value="{$Think.lang.home_member_save_modify}" />
  133. </dd>
  134. </dl>
  135. </form>
  136. </div>
  137. </div>
  138. <script src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js"></script>
  139. <script type="text/javascript">
  140. //注册表单验证
  141. $(function(){
  142. $("#region").ds_region();
  143. $('#birthday').datepicker({
  144. dateFormat:'yy-mm-dd',
  145. changeMonth:true,
  146. minDate:'1900-01-01',
  147. maxDate: new Date(),
  148. yearRange: "-200:+0",
  149. monthNamesShort: ['{$Think.lang.month_1}','{$Think.lang.month_2}','{$Think.lang.month_3}','{$Think.lang.month_4}','{$Think.lang.month_5}','{$Think.lang.month_6}','{$Think.lang.month_7}','{$Think.lang.month_8}','{$Think.lang.month_9}','{$Think.lang.month_10}','{$Think.lang.month_11}','{$Think.lang.month_12}'],
  150. changeYear:true
  151. });
  152. $('#profile_form').validate({
  153. submitHandler:function(form){
  154. if ($('select[class="valid"]').eq(0).val()>0) $('#province_id').val($('select[class="valid"]').eq(0).val());
  155. if ($('select[class="valid"]').eq(1).val()>0) $('#city_id').val($('select[class="valid"]').eq(1).val());
  156. ds_ajaxpost('profile_form','default');
  157. },
  158. rules : {
  159. member_qq : {
  160. digits : true,
  161. minlength : 5,
  162. maxlength : 12
  163. }
  164. },
  165. messages : {
  166. member_qq : {
  167. digits : '{$Think.lang.home_member_input_qq}',
  168. minlength : '{$Think.lang.home_member_input_qq}',
  169. maxlength : '{$Think.lang.home_member_input_qq}'
  170. }
  171. }
  172. });
  173. });
  174. </script>
  175. {/block}