Changeset 1083 in ExiteCMS
- Timestamp:
- 11/07/07 18:29:04 (4 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
administration/upgrade/rev01082.php (modified) (1 diff)
-
edit_profile.php (modified) (2 diffs)
-
includes/templates/main.edit_profile.tpl (modified) (1 diff)
-
includes/templates/main.register.tpl (modified) (1 diff)
-
register.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/upgrade/rev01082.php
r1082 r1083 31 31 32 32 // add the new fields to the locales table 33 $commands[] = array('type' => 'db', 'value' => "ALTER TABLE ##PREFIX##locale sADD locale_locale VARCHAR(25) NOT NULL DEFAULT '' AFTER locale_name");34 $commands[] = array('type' => 'db', 'value' => "ALTER TABLE ##PREFIX##locale sADD locale_charset VARCHAR(25) NOT NULL DEFAULT '' AFTER locale_locale");33 $commands[] = array('type' => 'db', 'value' => "ALTER TABLE ##PREFIX##locale ADD locale_locale VARCHAR(25) NOT NULL DEFAULT '' AFTER locale_name"); 34 $commands[] = array('type' => 'db', 'value' => "ALTER TABLE ##PREFIX##locale ADD locale_charset VARCHAR(25) NOT NULL DEFAULT '' AFTER locale_locale"); 35 35 36 // and p upulate them with default values37 $commands[] = array('type' => 'db', 'value' => "UPDATE ##PREFIX##locale sSET locale_locale = 'en_US|en_GB|english|eng', locale_charset = 'iso-8859-1'");36 // and populate them with a default value 37 $commands[] = array('type' => 'db', 'value' => "UPDATE ##PREFIX##locale SET locale_locale = 'en_US|en_GB|english|eng', locale_charset = 'iso-8859-1'"); 38 38 39 39 ?> -
trunk/edit_profile.php
r1071 r1083 134 134 $user_hide_email = isNum($_POST['user_hide_email']) ? $_POST['user_hide_email'] : "1"; 135 135 $user_location = isset($_POST['user_location']) ? stripinput(trim($_POST['user_location'])) : ""; 136 if ($_POST['user_ month'] != "--" && $_POST['user_day'] != "--" && $_POST['user_year'] != "----") {137 $user_birthdate = (isNum($_POST['user_ year']) ? $_POST['user_year'] : "0000")138 ."-".(isNum($_POST['user_ month']) ? $_POST['user_month'] : "00")139 ."-".(isNum($_POST['user_ day']) ? $_POST['user_day'] : "00");136 if ($_POST['user_Month'] != "--" && $_POST['user_Day'] != "--" && $_POST['user_Year'] != "----") { 137 $user_birthdate = (isNum($_POST['user_Year']) ? $_POST['user_Year'] : "0000") 138 ."-".(isNum($_POST['user_Month']) ? $_POST['user_Month'] : "00") 139 ."-".(isNum($_POST['user_Day']) ? $_POST['user_Day'] : "00"); 140 140 } else { 141 141 $user_birthdate = "0000-00-00"; … … 227 227 } 228 228 229 if ($this_userdata['user_birthdate']!="0000-00-00") { 230 $user_birthdate = explode("-", $this_userdata['user_birthdate']); 231 $variables['user_day'] = number_format($user_birthdate['2']); 232 $variables['user_month'] = number_format($user_birthdate['1']); 233 $variables['user_year'] = $user_birthdate['0']; 234 } else { 235 $variables['user_day'] = 0; $variables['user_month'] = 0; $variables['user_year'] = 0; 236 } 229 $this_userdata['user_birthdate'] = str_replace("00", "--", $this_userdata['user_birthdate']); 230 237 231 if (!isset($this_userdata['user_fullname']) or empty($this_userdata['user_fullname'])) { 238 232 $this_userdata['user_fullname'] = $this_userdata['user_name']; -
trunk/includes/templates/main.edit_profile.tpl
r1082 r1083 117 117 </td> 118 118 <td class='tbl'> 119 <select name='user_year' class='textbox'> 120 <option> </option> 121 {section name=y start=1900 loop=$smarty.now|date_format:"%Y"} 122 <option{if $smarty.section.y.index == $user_year} selected="selected"{/if}>{$smarty.section.y.index}</option> 123 {/section} 124 </select> 125 <select name='user_month' class='textbox'> 126 <option> </option> 127 {section name=m start=1 loop=13} 128 <option{if $smarty.section.m.index == $user_month} selected="selected"{/if}>{$smarty.section.m.index}</option> 129 {/section} 130 </select> 131 <select name='user_day' class='textbox'> 132 <option> </option> 133 {section name=d start=1 loop=32} 134 <option{if $smarty.section.d.index == $user_day} selected="selected"{/if}>{$smarty.section.d.index}</option> 135 {/section} 136 </select> 119 {html_select_date prefix='user_' time=$this_userdata.user_birthdate start_year="1900" end_year="-1" all_extra="class='textbox" field_order="YMD"} 137 120 <span class='small2'>(yyyy/mm/dd)</span> 138 121 </td> -
trunk/includes/templates/main.register.tpl
r1082 r1083 125 125 </td> 126 126 <td class='tbl'>} 127 <select name='user_year' class='textbox'> 128 <option> </option> 129 {section name=y start=1900 loop=$smarty.now|date_format:"%Y"} 130 <option{if $smarty.section.y.index == $user_year} selected{/if}>{$smarty.section.y.index}</option> 131 {/section} 132 </select> 133 <select name='user_month' class='textbox'> 134 <option> </option> 135 {section name=m start=1 loop=13} 136 <option{if $smarty.section.m.index == $user_month} selected{/if}>{$smarty.section.m.index}</option> 137 {/section} 138 </select> 139 <select name='user_day' class='textbox'> 140 <option> </option> 141 {section name=d start=1 loop=32} 142 <option{if $smarty.section.d.index == $user_day} selected{/if}>{$smarty.section.d.index}</option> 143 {/section} 144 </select> 127 {html_select_date prefix='user_' time=$this_userdata.user_birthdate start_year="1900" end_year="-1" all_extra="class='textbox" field_order="YMD"} 145 128 </td> 146 129 </tr> -
trunk/register.php
r1071 r1083 144 144 if ($settings['email_verification'] == "0") { 145 145 $user_location = isset($_POST['user_location']) ? stripinput(trim($_POST['user_location'])) : ""; 146 if ($_POST['user_ month'] != 0 && $_POST['user_day'] != 0 && $_POST['user_year'] != 0) {147 $user_birthdate = (isNum($_POST['user_ year']) ? $_POST['user_year'] : "0000")148 ."-".(isNum($_POST['user_ month']) ? $_POST['user_month'] : "00")149 ."-".(isNum($_POST['user_ day']) ? $_POST['user_day'] : "00");146 if ($_POST['user_Month'] != 0 && $_POST['user_Day'] != 0 && $_POST['user_Year'] != 0) { 147 $user_birthdate = (isNum($_POST['user_Year']) ? $_POST['user_Year'] : "0000") 148 ."-".(isNum($_POST['user_Month']) ? $_POST['user_Month'] : "00") 149 ."-".(isNum($_POST['user_Day']) ? $_POST['user_Day'] : "00"); 150 150 } else { 151 151 $user_birthdate = "0000-00-00";
Note: See TracChangeset
for help on using the changeset viewer.
