Changeset 1065 in ExiteCMS
- Timestamp:
- 11/05/07 22:23:47 (4 years ago)
- Location:
- branches/PLi-Fusion
- Files:
-
- 19 edited
- 1 copied
-
administration/members.php (modified) (1 diff)
-
administration/upgrade.php (modified) (1 diff)
-
administration/upgrade/rev01060.php (copied) (copied from trunk/administration/upgrade/rev01060.php)
-
edit_profile.php (modified) (4 diffs)
-
includes/templates/admin.members.tpl (modified) (1 diff)
-
includes/templates/main.edit_profile.tpl (modified) (1 diff)
-
includes/templates/main.pm.post.tpl (modified) (3 diffs)
-
includes/templates/main.profile.members.tpl (modified) (1 diff)
-
includes/templates/main.setuser.tpl (modified) (2 diffs)
-
includes/theme_functions.php (modified) (2 diffs)
-
includes/user_functions.php (modified) (3 diffs)
-
locale/English/admin/members.php (modified) (2 diffs)
-
locale/English/global.php (modified) (1 diff)
-
locale/English/members-profile.php (modified) (2 diffs)
-
members.php (modified) (3 diffs)
-
modules/user_info_panel/templates/modules.user_info_panel.tpl (modified) (1 diff)
-
modules/user_info_panel/user_info_panel.php (modified) (2 diffs)
-
pm.php (modified) (1 diff)
-
profile.php (modified) (1 diff)
-
setuser.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/PLi-Fusion/administration/members.php
r1056 r1065 99 99 100 100 } elseif ($step == "unban") { 101 $result = dbquery("UPDATE ".$db_prefix."users SET user_status='0' WHERE user_id='$user_id'");101 $result = dbquery("UPDATE ".$db_prefix."users SET user_status='0', user_bad_email='0' WHERE user_id='$user_id'"); 102 102 $message = $locale['431']; 103 103 $variables['message'] = isset($message) ? $message : ""; -
branches/PLi-Fusion/administration/upgrade.php
r945 r1065 34 34 } 35 35 } 36 37 // sort upgraded descending, to show the latest one first 38 krsort($upgraded); 36 39 37 40 // set a constant to define the upgrades available -
branches/PLi-Fusion/edit_profile.php
r1027 r1065 19 19 $variables = array(); 20 20 21 // members only function 22 if (!iMEMBER) fallback(BASEDIR."index.php"); 23 21 24 // load the DNS functions include 22 25 include PATH_INCLUDES."dns_functions.php"; … … 49 52 if ($data = dbarray($result)) { 50 53 if ($data['locale_name'] != $settings['locale']) { 51 die(' setting locale cookie: '.$data['locale_code']);54 die('TODO: setting locale cookie: '.$data['locale_code']); 52 55 setcookie("locale", $data['locale_code'], time() + 31536000, "/", "", "0"); 53 56 } … … 186 189 } 187 190 if ($user_newpassword != "") { $newpass = " user_password=md5(md5('$user_newpassword')), "; } else { $newpass = " "; } 188 $result = dbquery("UPDATE ".$db_prefix."users SET user_name='$username', user_fullname='$user_fullname', ".$newpass."user_email='".$_POST['user_email']."', user_ hide_email='$user_hide_email', user_location='$user_location', user_birthdate='$user_birthdate', user_aim='$user_aim', user_icq='$user_icq', user_msn='$user_msn', user_yahoo='$user_yahoo', user_web='$user_web', user_forum_fullscreen='$user_forum_fullscreen', user_newsletters='$user_newsletters', user_theme='$user_theme', user_offset='$user_offset', ".$set_avatar."user_sig='$user_sig' WHERE user_id='".$this_userdata['user_id']."'");191 $result = dbquery("UPDATE ".$db_prefix."users SET user_name='$username', user_fullname='$user_fullname', ".$newpass."user_email='".$_POST['user_email']."', user_bad_email = '0', user_hide_email='$user_hide_email', user_location='$user_location', user_birthdate='$user_birthdate', user_aim='$user_aim', user_icq='$user_icq', user_msn='$user_msn', user_yahoo='$user_yahoo', user_web='$user_web', user_forum_fullscreen='$user_forum_fullscreen', user_newsletters='$user_newsletters', user_theme='$user_theme', user_offset='$user_offset', ".$set_avatar."user_sig='$user_sig' WHERE user_id='".$this_userdata['user_id']."'"); 189 192 if ($user_theme != $userdata['user_theme']) redirect(FUSION_SELF."?status=1"); 190 193 $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$this_userdata['user_id']."'"); … … 203 206 } 204 207 205 if (iMEMBER) { 206 if ($this_userdata['user_birthdate']!="0000-00-00") { 207 $user_birthdate = explode("-", $this_userdata['user_birthdate']); 208 $variables['user_day'] = number_format($user_birthdate['2']); 209 $variables['user_month'] = number_format($user_birthdate['1']); 210 $variables['user_year'] = $user_birthdate['0']; 211 } else { 212 $variables['user_day'] = 0; $variables['user_month'] = 0; $variables['user_year'] = 0; 213 } 214 if (!isset($this_userdata['user_fullname']) or empty($this_userdata['user_fullname'])) { 215 $this_userdata['user_fullname'] = $this_userdata['user_name']; 216 } 217 // generate a list of available themes 218 $theme_files = makefilelist(PATH_THEMES, ".|..|.svn", true, "folders", $this_userdata['user_level'] >= 102); 219 array_unshift($theme_files, "Default"); 220 $variables['theme_files'] = $theme_files; 221 222 // check if the user's avatar exists 223 if (!file_exists(PATH_IMAGES_AV.$this_userdata['user_avatar'])) $this_userdata['user_avatar'] = "imagenotfound.jpg"; 224 $variables['avatar'] = array('size' => parsebytesize(30720), 'x' => 100, 'y' => 100); 225 $variables['timezone'] = sprintf($locale['u023'], "GMT ".(date('O')=="+0000"?"":date('O'))); 226 $variables['serveroffset'] = substr(date('O'),0,1).(substr(date('O'),1)/100); 227 } 208 // called because of a profile setting check? 209 if (isset($check)) { 210 switch ($check) { 211 case "email": 212 // define the search body panel variables 213 $check_message = sprintf($locale['491'], isset($value)?$value:"?").$locale['499']; 214 break; 215 } 216 } else { 217 // any profile checks we want to do? 218 if ($this_userdata['user_bad_email']) { 219 $value = 90 - intval((time() - $this_userdata['user_bad_email']) / 86400); 220 $check_message = sprintf($locale['491'], isset($value)?$value:"?").$locale['499']; 221 } 222 } 223 224 if (isset($check_message)) { 225 $template_panels[] = array('type' => 'body', 'name' => 'edit_profile_message', 'title' => $locale['424'], 'template' => '_message_table_panel.tpl', 'locale' => PATH_LOCALE.LOCALESET."members-profile.php"); 226 $template_variables['edit_profile_message'] = array('message' => $check_message, 'bold' => true); 227 } 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 } 237 if (!isset($this_userdata['user_fullname']) or empty($this_userdata['user_fullname'])) { 238 $this_userdata['user_fullname'] = $this_userdata['user_name']; 239 } 240 // generate a list of available themes 241 $theme_files = makefilelist(PATH_THEMES, ".|..|.svn", true, "folders", $this_userdata['user_level'] >= 102); 242 array_unshift($theme_files, "Default"); 243 $variables['theme_files'] = $theme_files; 244 245 // check if the user's avatar exists 246 if (!file_exists(PATH_IMAGES_AV.$this_userdata['user_avatar'])) $this_userdata['user_avatar'] = "imagenotfound.jpg"; 247 $variables['avatar'] = array('size' => parsebytesize(30720), 'x' => 100, 'y' => 100); 248 $variables['timezone'] = sprintf($locale['u023'], "GMT ".(date('O')=="+0000"?"":date('O'))); 249 $variables['serveroffset'] = substr(date('O'),0,1).(substr(date('O'),1)/100); 228 250 229 251 $variables['this_userdata'] = $this_userdata; -
branches/PLi-Fusion/includes/templates/admin.members.tpl
r864 r1065 179 179 {section name=id loop=$members} 180 180 {if $smarty.section.id.first} 181 <table align='center' cellpadding='0' cellspacing='1' width=' 700' class='tbl-border'>181 <table align='center' cellpadding='0' cellspacing='1' width='600' class='tbl-border'> 182 182 <tr> 183 183 <td class='tbl2'> -
branches/PLi-Fusion/includes/templates/main.edit_profile.tpl
r935 r1065 16 16 {***************************************************************************} 17 17 {include file="_opentable.tpl" name=$_name title=$locale.440 state=$_state style=$_style} 18 {if !$smarty.const.iMEMBER} 19 <center><br /><b>{$locale.003}</b><br /><br /></center> 20 {else} 21 <form name='edit_profile_form' method='post' action='{$smarty.const.FUSION_SELF}{if $is_admin}{$aidlink}&user_id={$this_userdata.user_id}{/if}' enctype='multipart/form-data'> 22 <table align='center' cellpadding='0' cellspacing='0'> 23 {if $update_profile} 24 {if $error|default:"" == ""} 25 <tr> 26 <td align='center' colspan='2' class='tbl'> 27 <b>{$locale.441}</b> 28 <br /><br /> 29 </td> 30 </tr> 31 {else} 32 <tr> 33 <td align='center' colspan='2' class='tbl'> 34 <b>{$locale.442} 35 <br /> 36 {$error}</b> 37 <br /> 38 </td> 39 </tr> 40 {/if} 41 {/if} 18 <form name='inputform' method='post' action='{$smarty.const.FUSION_SELF}{if $is_admin}{$aidlink}&user_id={$this_userdata.user_id}{/if}' enctype='multipart/form-data'> 19 <table align='center' cellpadding='0' cellspacing='0'> 20 {if $update_profile} 21 {if $error|default:"" == ""} 42 22 <tr> 43 <td class='tbl'> 44 {$locale.u001}<span style='color:#ff0000'>*</span> 45 </td> 46 <td class='tbl'> 47 <input type='text' name='user_name' value='{$this_userdata.user_name}' maxlength='30' class='textbox' style='width:200px;' /> 23 <td align='center' colspan='2' class='tbl'> 24 <b>{$locale.441}</b> 25 <br /><br /> 48 26 </td> 49 27 </tr> 28 {else} 50 29 <tr> 51 <td class='tbl'> 52 {$locale.u901}<span style='color:#ff0000'>*</span> 53 </td> 54 <td class='tbl'> 55 <input type='text' name='user_fullname' value='{$this_userdata.user_fullname}' maxlength='50' class='textbox' style='width:200px;' /> 56 </td> 57 </tr> 58 <tr> 59 <td class='tbl'> 60 {$locale.u003} 61 </td> 62 <td class='tbl'> 63 <input type='password' name='user_newpassword' maxlength='20' class='textbox' style='width:200px;' /> 64 </td> 65 </tr> 66 <tr> 67 <td class='tbl'> 68 {$locale.u004}</td> 69 <td class='tbl'> 70 <input type='password' name='user_newpassword2' maxlength='20' class='textbox' style='width:200px;' /> 71 </td> 72 </tr> 73 <tr> 74 <td class='tbl'> 75 {$locale.u005}<span style='color:#ff0000'>*</span> 76 </td> 77 <td class='tbl'> 78 <input type='text' name='user_email' value='{$this_userdata.user_email}' maxlength='100' class='textbox' style='width:200px;' /> 79 </td> 80 </tr> 81 <tr> 82 <td class='tbl'> 83 {$locale.u006} 84 </td> 85 <td class='tbl'> 86 <input type='radio' name='user_hide_email' value='1' {if $this_userdata.user_hide_email == "1"}checked="checked"{/if} />{$locale.u007} 87 <input type='radio' name='user_hide_email' value='0' {if $this_userdata.user_hide_email == "0"}checked="checked"{/if} />{$locale.u008} 88 </td> 89 </tr> 90 <tr> 91 <td class='tbl'> 92 {$locale.u026} 93 </td> 94 <td class='tbl'> 95 <input type='radio' name='user_newsletters' value='1' {if $this_userdata.user_newsletters == "1"}checked="checked"{/if} />{$locale.u037} 96 <input type='radio' name='user_newsletters' value='2' {if $this_userdata.user_newsletters == "2"}checked="checked"{/if} />{$locale.u038} 97 <input type='radio' name='user_newsletters' value='0' {if $this_userdata.user_newsletters == "0"}checked="checked"{/if} />{$locale.u039} 98 </td> 99 </tr> 100 <tr> 101 <td class='tbl'> 102 {$locale.u024} 103 </td> 104 <td class='tbl'> 105 <input type='radio' name='user_forum_fullscreen' value='1' {if $this_userdata.user_forum_fullscreen == "1"}checked="checked"{/if} />{$locale.u007} 106 <input type='radio' name='user_forum_fullscreen' value='0' {if $this_userdata.user_forum_fullscreen == "0"}checked="checked"{/if} />{$locale.u008} 107 </td> 108 </tr> 109 <tr> 110 <td class='tbl'> 111 {$locale.u009} 112 </td> 113 <td class='tbl'> 114 <input type='text' name='user_location' value='{$this_userdata.user_location}' maxlength='50' class='textbox' style='width:200px;' /> 115 </td> 116 </tr> 117 <tr> 118 <td class='tbl'> 119 {$locale.u010} 120 </td> 121 <td class='tbl'> 122 {foreach from=$locale.datesequence item=field} 123 {if $field == "D"} 124 <select name='user_day' class='textbox'> 125 <option> </option> 126 {section name=d start=1 loop=32} 127 <option{if $smarty.section.d.index == $user_day} selected="selected"{/if}>{$smarty.section.d.index}</option> 128 {/section} 129 </select> 130 {elseif $field == "M"} 131 <select name='user_month' class='textbox'> 132 <option> </option> 133 {section name=m start=1 loop=13} 134 <option{if $smarty.section.m.index == $user_month} selected="selected"{/if}>{$smarty.section.m.index}</option> 135 {/section} 136 </select> 137 {elseif $field == "Y"} 138 <select name='user_year' class='textbox'> 139 <option> </option> 140 {section name=y start=1900 loop=$smarty.now|date_format:"%Y"} 141 <option{if $smarty.section.y.index == $user_year} selected="selected"{/if}>{$smarty.section.y.index}</option> 142 {/section} 143 </select> 144 {/if} 145 {/foreach} 146 <span class='small2'>({$locale.dateformat})</span> 147 </td> 148 </tr> 149 <tr> 150 <td class='tbl'> 151 {$locale.u021} 152 </td> 153 <td class='tbl'> 154 <input type='text' name='user_aim' value='{$this_userdata.user_aim}' maxlength='16' class='textbox' style='width:200px;' /> 155 </td> 156 </tr> 157 <tr> 158 <td class='tbl'> 159 {$locale.u011} 160 </td> 161 <td class='tbl'> 162 <input type='text' name='user_icq' value='{$this_userdata.user_icq}' maxlength='15' class='textbox' style='width:200px;' /> 163 </td> 164 </tr> 165 <tr> 166 <td class='tbl'> 167 {$locale.u012} 168 </td> 169 <td class='tbl'> 170 <input type='text' name='user_msn' value='{$this_userdata.user_msn}' maxlength='100' class='textbox' style='width:200px;' /> 171 </td> 172 </tr> 173 <tr> 174 <td class='tbl'> 175 {$locale.u013} 176 </td> 177 <td class='tbl'> 178 <input type='text' name='user_yahoo' value='{$this_userdata.user_yahoo}' maxlength='100' class='textbox' style='width:200px;' /> 179 </td> 180 </tr> 181 <tr> 182 <td class='tbl'> 183 {$locale.u014} 184 </td> 185 <td class='tbl'> 186 <input type='text' name='user_web' value='{$this_userdata.user_web}' maxlength='100' class='textbox' style='width:200px;' /> 187 </td> 188 </tr> 189 <tr> 190 <td class='tbl'> 191 {$locale.u028} 192 </td> 193 <td class='tbl'> 194 <select name='user_locale' class='textbox' style='width:200px;'> 195 {section name=locales loop=$locales} 196 <option value='{$locales[locales].locale_id}'{if $locales[locales].selected} selected="selected"{/if}>{$locales[locales].locale_name}</option> 197 {/section} 198 </select> 199 </td> 200 </tr> 201 <tr> 202 <td class='tbl'> 203 {$locale.u015} 204 </td> 205 <td class='tbl'> 206 <select name='user_theme' class='textbox' style='width:200px;'> 207 {foreach from=$theme_files item=theme} 208 <option{if $this_userdata.user_theme == $theme} selected="selected"{/if}>{$theme}</option> 209 {/foreach} 210 </select> 211 </td> 212 </tr> 213 <tr> 214 <td class='tbl'> 215 {$locale.u016} 216 </td> 217 <td class='tbl'> 218 <select name='user_offset' class='textbox'> 219 {section name=offset loop=$settings.timezones} 220 <option{if $this_userdata.user_offset == $settings.timezones[offset]} selected="selected"{/if} value='{$settings.timezones[offset]}'>{$settings.timezones[offset]}</option> 221 {/section} 222 </select> 223 224 <input type='button' value='{$locale.u027}' class='button' onclick="autotimezone();return false;" /> 225 226 {$timezone} 227 </td> 228 </tr> 229 {if $this_userdata.user_avatar|default:"" == ""} 230 <tr> 231 <td class='tbl'> 232 {$locale.u017} 233 </td> 234 <td class='tbl'> 235 <input type='file' name='user_avatar' class='textbox' style='width:200px;' /> 30 <td align='center' colspan='2' class='tbl'> 31 <b>{$locale.442} 236 32 <br /> 237 <span class='small2'>{$locale.u018}</span>33 {$error}</b> 238 34 <br /> 239 <span class='small2'>{ssprintf format=$locale.u022 var1=$avatar.size var2=$avatar.x var3=$avatar.y}</span>240 35 </td> 241 36 </tr> 242 37 {/if} 243 <tr> 244 <td valign='top'> 245 {$locale.u020} 246 </td> 247 <td class='tbl'> 248 <textarea name='user_sig' rows='5' cols='80' class='textbox' style='width:295px'>{$this_userdata.user_sig}</textarea><br /> 249 <input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onclick="addText('user_sig', '[b]', '[/b]');" /> 250 <input type='button' value='i' class='button' style='font-style:italic;width:25px;' onclick="addText('user_sig', '[i]', '[/i]');" /> 251 <input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onclick="addText('user_sig', '[u]', '[/u]');" /> 252 <input type='button' value='url' class='button' style='width:30px;' onclick="addText('user_sig', '[url]', '[/url]');" /> 253 <input type='button' value='mail' class='button' style='width:35px;' onclick="addText('user_sig', '[mail]', '[/mail]');" /> 254 <input type='button' value='img' class='button' style='width:30px;' onclick="addText('user_sig', '[img]', '[/img]');" /> 255 <input type='button' value='center' class='button' style='width:45px;' onclick="addText('user_sig', '[center]', '[/center]');" /> 256 <input type='button' value='small' class='button' style='width:40px;' onclick="addText('user_sig', '[small]', '[/small]');" /> 257 </td> 258 </tr> 259 <tr> 260 <td align='center' colspan='2' class='tbl'> 38 {/if} 39 <tr> 40 <td class='tbl'> 41 {$locale.u001}<span style='color:#ff0000'>*</span> 42 </td> 43 <td class='tbl'> 44 <input type='text' name='user_name' value='{$this_userdata.user_name}' maxlength='30' class='textbox' style='width:200px;' /> 45 </td> 46 </tr> 47 <tr> 48 <td class='tbl'> 49 {$locale.u901}<span style='color:#ff0000'>*</span> 50 </td> 51 <td class='tbl'> 52 <input type='text' name='user_fullname' value='{$this_userdata.user_fullname}' maxlength='50' class='textbox' style='width:200px;' /> 53 </td> 54 </tr> 55 <tr> 56 <td class='tbl'> 57 {$locale.u003} 58 </td> 59 <td class='tbl'> 60 <input type='password' name='user_newpassword' maxlength='20' class='textbox' style='width:200px;' /> 61 </td> 62 </tr> 63 <tr> 64 <td class='tbl'> 65 {$locale.u004}</td> 66 <td class='tbl'> 67 <input type='password' name='user_newpassword2' maxlength='20' class='textbox' style='width:200px;' /> 68 </td> 69 </tr> 70 <tr> 71 <td class='tbl'> 72 {$locale.u005}<span style='color:#ff0000'>*</span> 73 </td> 74 <td class='tbl'> 75 <input type='text' name='user_email' value='{$this_userdata.user_email}' maxlength='100' class='textbox' style='width:200px;' /> 76 </td> 77 </tr> 78 <tr> 79 <td class='tbl'> 80 {$locale.u006} 81 </td> 82 <td class='tbl'> 83 <input type='radio' name='user_hide_email' value='1' {if $this_userdata.user_hide_email == "1"}checked="checked"{/if} />{$locale.u007} 84 <input type='radio' name='user_hide_email' value='0' {if $this_userdata.user_hide_email == "0"}checked="checked"{/if} />{$locale.u008} 85 </td> 86 </tr> 87 <tr> 88 <td class='tbl'> 89 {$locale.u026} 90 </td> 91 <td class='tbl'> 92 <input type='radio' name='user_newsletters' value='1' {if $this_userdata.user_newsletters == "1"}checked="checked"{/if} />{$locale.u037} 93 <input type='radio' name='user_newsletters' value='2' {if $this_userdata.user_newsletters == "2"}checked="checked"{/if} />{$locale.u038} 94 <input type='radio' name='user_newsletters' value='0' {if $this_userdata.user_newsletters == "0"}checked="checked"{/if} />{$locale.u039} 95 </td> 96 </tr> 97 <tr> 98 <td class='tbl'> 99 {$locale.u024} 100 </td> 101 <td class='tbl'> 102 <input type='radio' name='user_forum_fullscreen' value='1' {if $this_userdata.user_forum_fullscreen == "1"}checked="checked"{/if} />{$locale.u007} 103 <input type='radio' name='user_forum_fullscreen' value='0' {if $this_userdata.user_forum_fullscreen == "0"}checked="checked"{/if} />{$locale.u008} 104 </td> 105 </tr> 106 <tr> 107 <td class='tbl'> 108 {$locale.u009} 109 </td> 110 <td class='tbl'> 111 <input type='text' name='user_location' value='{$this_userdata.user_location}' maxlength='50' class='textbox' style='width:200px;' /> 112 </td> 113 </tr> 114 <tr> 115 <td class='tbl'> 116 {$locale.u010} 117 </td> 118 <td class='tbl'> 119 {foreach from=$locale.datesequence item=field} 120 {if $field == "D"} 121 <select name='user_day' class='textbox'> 122 <option> </option> 123 {section name=d start=1 loop=32} 124 <option{if $smarty.section.d.index == $user_day} selected="selected"{/if}>{$smarty.section.d.index}</option> 125 {/section} 126 </select> 127 {elseif $field == "M"} 128 <select name='user_month' class='textbox'> 129 <option> </option> 130 {section name=m start=1 loop=13} 131 <option{if $smarty.section.m.index == $user_month} selected="selected"{/if}>{$smarty.section.m.index}</option> 132 {/section} 133 </select> 134 {elseif $field == "Y"} 135 <select name='user_year' class='textbox'> 136 <option> </option> 137 {section name=y start=1900 loop=$smarty.now|date_format:"%Y"} 138 <option{if $smarty.section.y.index == $user_year} selected="selected"{/if}>{$smarty.section.y.index}</option> 139 {/section} 140 </select> 141 {/if} 142 {/foreach} 143 <span class='small2'>({$locale.dateformat})</span> 144 </td> 145 </tr> 146 <tr> 147 <td class='tbl'> 148 {$locale.u021} 149 </td> 150 <td class='tbl'> 151 <input type='text' name='user_aim' value='{$this_userdata.user_aim}' maxlength='16' class='textbox' style='width:200px;' /> 152 </td> 153 </tr> 154 <tr> 155 <td class='tbl'> 156 {$locale.u011} 157 </td> 158 <td class='tbl'> 159 <input type='text' name='user_icq' value='{$this_userdata.user_icq}' maxlength='15' class='textbox' style='width:200px;' /> 160 </td> 161 </tr> 162 <tr> 163 <td class='tbl'> 164 {$locale.u012} 165 </td> 166 <td class='tbl'> 167 <input type='text' name='user_msn' value='{$this_userdata.user_msn}' maxlength='100' class='textbox' style='width:200px;' /> 168 </td> 169 </tr> 170 <tr> 171 <td class='tbl'> 172 {$locale.u013} 173 </td> 174 <td class='tbl'> 175 <input type='text' name='user_yahoo' value='{$this_userdata.user_yahoo}' maxlength='100' class='textbox' style='width:200px;' /> 176 </td> 177 </tr> 178 <tr> 179 <td class='tbl'> 180 {$locale.u014} 181 </td> 182 <td class='tbl'> 183 <input type='text' name='user_web' value='{$this_userdata.user_web}' maxlength='100' class='textbox' style='width:200px;' /> 184 </td> 185 </tr> 186 <tr> 187 <td class='tbl'> 188 {$locale.u028} 189 </td> 190 <td class='tbl'> 191 <select name='user_locale' class='textbox' style='width:200px;'> 192 {section name=locales loop=$locales} 193 <option value='{$locales[locales].locale_id}'{if $locales[locales].selected} selected="selected"{/if}>{$locales[locales].locale_name}</option> 194 {/section} 195 </select> 196 </td> 197 </tr> 198 <tr> 199 <td class='tbl'> 200 {$locale.u015} 201 </td> 202 <td class='tbl'> 203 <select name='user_theme' class='textbox' style='width:200px;'> 204 {foreach from=$theme_files item=theme} 205 <option{if $this_userdata.user_theme == $theme} selected="selected"{/if}>{$theme}</option> 206 {/foreach} 207 </select> 208 </td> 209 </tr> 210 <tr> 211 <td class='tbl'> 212 {$locale.u016} 213 </td> 214 <td class='tbl'> 215 <select name='user_offset' class='textbox'> 216 {section name=offset loop=$settings.timezones} 217 <option{if $this_userdata.user_offset == $settings.timezones[offset]} selected="selected"{/if} value='{$settings.timezones[offset]}'>{$settings.timezones[offset]}</option> 218 {/section} 219 </select> 220 221 <input type='button' value='{$locale.u027}' class='button' onclick="autotimezone();return false;" /> 222 223 {$timezone} 224 </td> 225 </tr> 226 {if $this_userdata.user_avatar|default:"" == ""} 227 <tr> 228 <td class='tbl'> 229 {$locale.u017} 230 </td> 231 <td class='tbl'> 232 <input type='file' name='user_avatar' class='textbox' style='width:200px;' /> 233 <br /> 234 <span class='small2'>{$locale.u018}</span> 235 <br /> 236 <span class='small2'>{ssprintf format=$locale.u022 var1=$avatar.size var2=$avatar.x var3=$avatar.y}</span> 237 </td> 238 </tr> 239 {/if} 240 <tr> 241 <td valign='top'> 242 {$locale.u020} 243 </td> 244 <td class='tbl'> 245 <textarea name='user_sig' rows='5' cols='80' class='textbox' style='width:295px'>{$this_userdata.user_sig}</textarea><br /> 246 <input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onclick="addText('user_sig', '[b]', '[/b]');" /> 247 <input type='button' value='i' class='button' style='font-style:italic;width:25px;' onclick="addText('user_sig', '[i]', '[/i]');" /> 248 <input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onclick="addText('user_sig', '[u]', '[/u]');" /> 249 <input type='button' value='url' class='button' style='width:30px;' onclick="addText('user_sig', '[url]', '[/url]');" /> 250 <input type='button' value='mail' class='button' style='width:35px;' onclick="addText('user_sig', '[mail]', '[/mail]');" /> 251 <input type='button' value='img' class='button' style='width:30px;' onclick="addText('user_sig', '[img]', '[/img]');" /> 252 <input type='button' value='center' class='button' style='width:45px;' onclick="addText('user_sig', '[center]', '[/center]');" /> 253 <input type='button' value='small' class='button' style='width:40px;' onclick="addText('user_sig', '[small]', '[/small]');" /> 254 </td> 255 </tr> 256 <tr> 257 <td align='center' colspan='2' class='tbl'> 258 <br /> 259 {if $this_userdata.user_avatar|default:"" != ""} 260 {$locale.u017} 261 261 <br /> 262 {if $this_userdata.user_avatar|default:"" != ""} 263 {$locale.u017} 264 <br /> 265 <img src='{$smarty.const.IMAGES_AV}{$this_userdata.user_avatar}' alt='{$locale.u017}' /> 266 <br /> 267 <input type='checkbox' name='del_avatar' value='y' /> {$locale.u019} 268 <input type='hidden' name='user_avatar' value='{$this_userdata.user_avatar}' /> 269 <br /><br /> 270 {/if} 271 <input type='hidden' name='user_hash' value='{$this_userdata.user_password}' /> 272 <input type='submit' name='update_profile' value='{$locale.460}' class='button' /> 273 </td> 274 </tr> 275 </table> 276 </form> 277 {/if} 262 <img src='{$smarty.const.IMAGES_AV}{$this_userdata.user_avatar}' alt='{$locale.u017}' /> 263 <br /> 264 <input type='checkbox' name='del_avatar' value='y' /> {$locale.u019} 265 <input type='hidden' name='user_avatar' value='{$this_userdata.user_avatar}' /> 266 <br /><br /> 267 {/if} 268 <input type='hidden' name='user_hash' value='{$this_userdata.user_password}' /> 269 <input type='submit' name='update_profile' value='{$locale.460}' class='button' /> 270 </td> 271 </tr> 272 </table> 273 </form> 278 274 {literal}<script type='text/javascript'> 279 275 // -
branches/PLi-Fusion/includes/templates/main.pm.post.tpl
r954 r1065 66 66 {if !$recipient_given} 67 67 <hr /> 68 <select id='user_ids' name='user_ids' class='textbox'>69 68 {section name=id loop=$user_list} 69 {if $smarty.section.id.first} 70 <select id='user_ids' name='user_ids' class='textbox'> 71 {/if} 70 72 <option value='{$user_list[id].user_id}'>{$user_list[id].user_name}</option> 73 {if $smarty.section.id.last} 74 </select> 75 <input type='submit' name='select_user' value='{$locale.468}' class='button' onclick="AddUser();return false;" /> 76 {if $allow_sendtoall} - {/if} 77 {/if} 71 78 {/section} 72 </select>73 <input type='submit' name='select_user' value='{$locale.468}' class='button' onclick="AddUser();return false;" />74 79 {if $allow_sendtoall} 75 - 76 <select id='group_ids' name='group_ids' class='textbox'>77 80 {section name=id loop=$user_groups} 81 {if $smarty.section.id.first} 82 <select id='group_ids' name='group_ids' class='textbox'> 83 {/if} 78 84 <option value='{$user_groups[id].0}'>{$user_groups[id].1}</option> 85 {if $smarty.section.id.last} 86 </select> 87 <input type='submit' name='select_group' value='{$locale.469}' class='button' onclick="AddGroup();return false;" /> 88 {/if} 79 89 {/section} 80 </select>81 <input type='submit' name='select_group' value='{$locale.469}' class='button' onclick="AddGroup();return false;" />82 90 {/if} 83 91 {/if} … … 190 198 <td class='tbl1'> 191 199 <input type='file' name='attach' class='textbox' style='width:200px;' /> 192 <input type='submit' name='upload' value='{$locale.473}' class='button' />193 200 <br /><br /> 194 201 <span class='small2'>{ssprintf format=$locale.472 var1=$attachmax var2=$attachtypes}</span> … … 197 204 <br /> 198 205 <textarea name='attach_comment' cols='50' rows='2' class='textbox'>{$comments}</textarea> 206 <br /> 207 <input type='submit' name='upload' value='{$locale.473}' class='button' /> 199 208 </td> 200 209 </tr> -
branches/PLi-Fusion/includes/templates/main.profile.members.tpl
r920 r1065 21 21 <table align='center' cellpadding='0' cellspacing='0' width='100%'> 22 22 <tr> 23 <td class='tbl2'><b>{$data.user_name}</b></td> 23 <td class='tbl2'> 24 <b>{$data.user_name}</b> 25 {if $data.user_status == 1} <span class='small'>({$locale.425})</span>{/if} 26 {if $data.user_status == 2} <span class='small'>({$locale.426})</span>{/if} 27 </td> 24 28 <td align='right' class='tbl2'>{$data.user_level}</td> 25 29 </tr> -
branches/PLi-Fusion/includes/templates/main.setuser.tpl
r954 r1065 21 21 <title>{$settings.sitename}</title> 22 22 <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' /> 23 <meta http-equiv='refresh' content='{$refresh}; url= index.php' />23 <meta http-equiv='refresh' content='{$refresh}; url={$url}' /> 24 24 {include file='_stylesheets.tpl'} 25 25 </head> … … 29 29 <div class='splashscreen-v'> 30 30 <center> 31 <br /> 32 {if $settings.sitebanner|default:"" != ""} 33 <img src='{$smarty.const.THEME}images/{$settings.sitebanner}' alt='{$settings.sitename}' width='400'/> 34 {else} 35 <br /><br /> 36 {/if} 31 37 <br /><br /> 32 { if $settings.sitebanner|default:"" != ""}33 <img src='{$smarty.const.THEME}images/{$settings.sitebanner}' alt='{$settings.sitename}' width='400'/><br /><br />34 { /if}35 {$message }36 {$error}38 {$message.line1|default:""}<br /> 39 {$message.line2|default:""}<br /> 40 {$message.line3|default:""}<br /> 41 {$message.line4|default:""}<br /> 42 <br /> 37 43 {$locale.183} 38 {if $error != ""}<br /><br />[ <a href='/index.php'>{$locale.184}</a> ]{/if} 44 <br /> 45 {if $error != 0}[ <a href='{$url}'>{$locale.184}</a> ]{/if} 39 46 <br /><br /> 40 47 </center> -
branches/PLi-Fusion/includes/theme_functions.php
r954 r1065 415 415 $result = dbquery("DELETE FROM ".$db_prefix."new_users WHERE user_datestamp < '".(time() - $day * 3)."'"); 416 416 // unread posts indicators: set to 30 days 417 $result = dbquery("DELETE FROM ".$db_prefix."posts_unread WHERE post_time < ".(time() - $day * 30), false); 417 $result = dbquery("DELETE FROM ".$db_prefix."posts_unread WHERE post_time < '".(time() - $day * 30)."'", false); 418 // deactivate accounts with a bad email address after 90 days 419 $result = dbquery("UPDATE ".$db_prefix."users SET user_status = 1, user_ban_reason = '', user_ban_expire = '".time()."' WHERE user_bad_email > 0 AND user_bad_email < '".(time() - $day * 90)."'"); 418 420 } 419 421 … … 428 430 429 431 echo "</body>\n</html>\n"; 432 433 // store the current URL in a cookie. We might need to redirect to it later 434 setcookie('last_url', FUSION_REQUEST, 0, '/'); 430 435 431 436 // and flush any output remaining -
branches/PLi-Fusion/includes/user_functions.php
r954 r1065 43 43 if (dbrows($result) != 0) { 44 44 $data = dbarray($result); 45 $cookie_value = $data['user_id'].".".$user_pass;46 45 // if the account is suspended, check for an expiry date 47 46 if ($data['user_status'] == 1 && $data['user_ban_expire'] > 0 && $data['user_ban_expire'] < time() ) { 47 // if this user's email address is marked as bad, reset the countdown counter 48 $data['user_bad_email'] = $data['user_bad_email'] == 0 ? 0 : time(); 48 49 // reset the user status and the expiry date 49 $result = dbquery("UPDATE ".$db_prefix."users SET user_status='0', user_ban_expire='0' WHERE user_id='".$data['user_id']."'");50 $result = dbquery("UPDATE ".$db_prefix."users SET user_status='0', user_ban_expire='0', user_bad_email = '".$data['user_bad_email']."' WHERE user_id='".$data['user_id']."'"); 50 51 $data['user_status'] = 0; 51 52 } … … 61 62 // HV - end of code change 62 63 header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'"); 64 $cookie_value = $data['user_id'].".".$user_pass; 63 65 setcookie("userinfo", $cookie_value, $cookie_exp, "/", "", "0"); 64 66 redirect(BASEDIR."setuser.php?user=".$data['user_name'], "script"); … … 136 138 137 139 if (isset($userdata) && is_array($userdata)) { 138 // get the users own group memberships into an array 139 $groups = explode(".", substr($userdata['user_groups'], 1)); 140 foreach ($groups as $group) { 141 // check if this groups has subgroups. If so, add them to the array 142 getsubgroups($group); 143 } 144 // create a new user_group field with all inherited groups, and 145 // get the inherited group rights and add them to the user own rights 146 $userdata['user_groups'] = ""; 147 foreach ($groups as $group) { 148 $userdata['user_groups'] .= ".".$group; 149 $result = dbarray(dbquery("SELECT group_rights FROM ".$db_prefix."user_groups WHERE group_id = '".$group."'")); 150 if (isset($result['group_rights']) && $result['group_rights'] != "") { 151 $userdata['user_rights'] .= ($userdata['user_rights']==""?"":".").$result['group_rights']; 140 // if group memberships are defined, get the users own group memberships into an array 141 if (!empty($userdata['user_groups'])) { 142 $groups = explode(".", substr($userdata['user_groups'], 1)); 143 foreach ($groups as $group) { 144 // check if this groups has subgroups. If so, add them to the array 145 getsubgroups($group); 146 } 147 // create a new user_group field with all inherited groups, and 148 // get the inherited group rights and add them to the user own rights 149 $userdata['user_groups'] = ""; 150 foreach ($groups as $group) { 151 $userdata['user_groups'] .= ".".$group; 152 $result = dbarray(dbquery("SELECT group_rights FROM ".$db_prefix."user_groups WHERE group_id = '".$group."'")); 153 if (isset($result['group_rights']) && $result['group_rights'] != "") { 154 $userdata['user_rights'] .= ($userdata['user_rights']==""?"":".").$result['group_rights']; 155 } 152 156 } 153 157 } -
branches/PLi-Fusion/locale/English/admin/members.php
r814 r1065 17 17 // Options 18 18 $locale['415'] = "Edit this user's profile"; 19 $locale['416'] = " UnBan this user";20 $locale['417'] = "Ban this user";19 $locale['416'] = "Activate this account"; 20 $locale['417'] = "Ban this member"; 21 21 $locale['418'] = "Delete this user"; 22 22 $locale['419'] = "Activate the account"; … … 27 27 // Ban/Unban/Delete Member 28 28 $locale['430'] = "Ban Imposed"; 29 $locale['431'] = " Ban Removed";29 $locale['431'] = "Account Reactivated"; 30 30 $locale['432'] = "Member Deleted"; 31 31 $locale['433'] = "Are you sure you wish to delete this member?"; -
branches/PLi-Fusion/locale/English/global.php
r847 r1065 152 152 // Login 153 153 $locale['180'] = "Reason"; 154 $locale['181'] = "This ban wil expire on";154 $locale['181'] = "This suspension wil expire on"; 155 155 $locale['182'] = "<h1><br /><br /><br /></h1><center><b>We have detected that you have disabled Javascript.</b><br /><br /> 156 156 This website uses javascript to create an enhanced experience.<br />Some features might not work (correctly) if you <a href='%s'>continue</a>...</center>"; 157 $locale['183'] = "Please wait while we transferyou...";157 $locale['183'] = "Please wait while we redirect you..."; 158 158 $locale['184'] = "Or click here if you do not wish to wait"; 159 159 // Maintenance -
branches/PLi-Fusion/locale/English/members-profile.php
r738 r1065 19 19 $locale['422'] = "Statistics"; 20 20 $locale['423'] = "User Groups"; 21 $locale['424'] = "Profile Error"; 22 $locale['425'] = "Account Deactivated"; 23 $locale['426'] = "Account Suspended"; 21 24 // Edit Profile 22 25 $locale['440'] = "Edit Profile"; … … 41 44 $locale['489'] = "Mailserver for domain %s doesn't accept email messages."; 42 45 $locale['490'] = "Email address %s does not exist<br>(according to the mailserver %s)."; 46 $locale['491'] = "We have detected that your email address is no longer valid.<br />Your accounts will be deactivated in %s days."; 47 $locale['499'] = "<br /><br />Please update your profile now."; 43 48 ?> -
branches/PLi-Fusion/members.php
r834 r1065 38 38 if (iMEMBER) { 39 39 // create the where clause 40 $filter = "user_status = 0"; // only show activated accounts 40 41 if ($sortby == "all") { 41 if ($country == "") { 42 $orderby = ""; 43 } else { 44 $orderby = " user_cc_code = '".$country."'"; 42 if ($country != "") { 43 $filter .= " AND user_cc_code = '".$country."'"; 45 44 } 46 45 } else { 47 46 if ($country == "") { 48 $ orderby = "user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%'";47 $filter .= " AND user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%'"; 49 48 } else { 50 $ orderby = "user_cc_code = '".$country."' AND (user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')";49 $filter .= " AND user_cc_code = '".$country."' AND (user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')"; 51 50 } 52 51 } … … 54 53 $variables['members'] = array(); 55 54 if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0; 56 $result = dbquery("SELECT * FROM ".$db_prefix."users ".($orderby==""?"":" WHERE").$orderby." ORDER BY user_level DESC, user_name LIMIT ".$rowstart.", ".ITEMS_PER_PAGE);55 $result = dbquery("SELECT * FROM ".$db_prefix."users ".($filter==""?"":("WHERE ".$filter))." ORDER BY user_level DESC, user_name LIMIT ".$rowstart.", ".ITEMS_PER_PAGE); 57 56 $rows = dbrows($result); 58 57 $variables['members'] = array(); … … 93 92 if (count($variables['search'])%2) $variables['search'][] = ""; 94 93 $variables['sortby'] = $sortby; 95 $variables['rows'] = dbcount("(*)", "users", $ orderby);94 $variables['rows'] = dbcount("(*)", "users", $filter); 96 95 $variables['rowstart'] = $rowstart; 97 96 $variables['items_per_page'] = ITEMS_PER_PAGE; -
branches/PLi-Fusion/modules/user_info_panel/templates/modules.user_info_panel.tpl
r978 r1065 39 39 <hr /> 40 40 <div style='text-align:center'> 41 <a href='{$smarty.const.MODULES}forum_threads_list_panel/new_posts.php' class='side'><b>{$new_post_msg|string_format:$locale.090}{if $new_post_msg == 1}{$locale.088}{else}{$locale.089}{/if}</b></a> 42 <hr /> 43 {buttonlink name=$locale.091 link=$smarty.const.MODULES|cat:"forum_threads_list_panel/new_posts.php?markasread="|cat:$user_id} 41 {if $new_posts_panel} 42 <a href='{$smarty.const.MODULES}forum_threads_list_panel/new_posts.php' class='side'><b>{$new_post_msg|string_format:$locale.090}{if $new_post_msg == 1}{$locale.088}{else}{$locale.089}{/if}</b></a> 43 <hr /> 44 {buttonlink name=$locale.091 link=$smarty.const.MODULES|cat:"forum_threads_list_panel/new_posts.php?markasread="|cat:$user_id} 45 {else} 46 <b>{$new_post_msg|string_format:$locale.090}{if $new_post_msg == 1}{$locale.088}{else}{$locale.089}{/if}</b> 47 {/if} 44 48 </div> 45 49 {/if} -
branches/PLi-Fusion/modules/user_info_panel/user_info_panel.php
r954 r1065 19 19 20 20 if (isset($userdata['user_id'])) { 21 $variables['new_pm_msg'] = dbcount("(pmindex_id)", "pm_index", "pmindex_user_id ='".$userdata['user_id']."' AND pmindex_to_id='".$userdata['user_id']."' AND pmindex_read_datestamp = '0'"); 22 $variables['new_post_msg'] = dbcount("(post_id)", "posts_unread", "user_id='".$userdata['user_id']."'"); 21 // store the user's ID and name 23 22 $variables['user_id'] = isset($userdata['user_id'])?$userdata['user_id']:0; 24 23 $variables['user_name'] = isset($userdata['user_name'])?$userdata['user_name']:""; 24 // if an administrator, check to which pages this admin has access to 25 25 if (iADMIN) { 26 26 $usr_rghts = " (admin_rights='".str_replace(".", "' OR admin_rights='", $userdata['user_rights'])."')"; … … 30 30 $variables['adminpage4'] = dbcount("(*)", "admin", $usr_rghts." AND admin_link!='reserved' AND admin_page='4'"); 31 31 } 32 $variables['new_pm_msg'] = dbcount("(pmindex_id)", "pm_index", "pmindex_user_id ='".$userdata['user_id']."' AND pmindex_to_id='".$userdata['user_id']."' AND pmindex_read_datestamp = '0'"); 33 $variables['new_post_msg'] = dbcount("(post_id)", "posts_unread", "user_id='".$userdata['user_id']."'"); 34 // check if the forum_threads_list_panel module is installed 35 $result = dbquery("SELECT * FROM ".$db_prefix."modules WHERE mod_folder = 'forum_threads_list_panel'"); 36 $variables['new_posts_panel'] = dbrows($result); 32 37 } 33 38 $variables['loginerror'] = isset($loginerror) ? $loginerror : ""; -
branches/PLi-Fusion/pm.php
r953 r1065 903 903 if ($action == "post" || $action == "forward") { 904 904 $variables['user_list'] = array(); 905 $result = dbquery("SELECT u.user_id, u.user_name FROM ".$db_prefix."users u ORDER BY user_level DESC, user_name ASC");905 $result = dbquery("SELECT u.user_id, u.user_name FROM ".$db_prefix."users u WHERE user_status = 0 ORDER BY user_level DESC, user_name ASC"); 906 906 while ($data = dbarray($result)) { 907 // only other users (can send a PM to yourself), skip the user_id passed to us (from a PM button p.e.)907 // only other users (can't send a PM to yourself), skip the user_id passed to us (from a PM button p.e.) 908 908 if ($data['user_id'] != $userdata['user_id'] && $data['user_id'] != $user_id) { 909 909 $variables['user_list'][] = $data; -
branches/PLi-Fusion/profile.php
r953 r1065 29 29 $variables = array(); 30 30 31 // list the profile of this member31 // name explicitly passed instead of an user_id 32 32 if (isset($name) && !empty($name)) { 33 // find a member by this name in the database 34 $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_name='$name' LIMIT 1"); 35 if (dbrows($result)) { 36 $data = dbarray($result); 37 } 38 $lookup = $data['user_id']; 33 $lookup = $name; 39 34 } 35 36 // lookup the user (by id or name) 40 37 if (isset($lookup)) { 41 38 // make sure we're only displaying one type of profile -
branches/PLi-Fusion/setuser.php
r954 r1065 19 19 $variables = array(); 20 20 21 // set the redirect url (set in theme_cleanup) 22 if (isset($_COOKIE['last_url'])) { 23 $variables['url'] = $_COOKIE['last_url']; 24 } elseif (empty($_SERVER['HTTP_REFERER'])) { 25 $variables['url'] = BASEDIR."index.php"; 26 } else { 27 $variables['url'] = substr(strstr($_SERVER['HTTP_REFERER'], ":"), strlen($_SERVER['HTTP_HOST'])+3); 28 } 29 30 // array to store the lines of the setuser message 31 $message = array(); 32 33 // make sure the error parameter has a value 34 if (!isset($error) || !isNum($error)) $error = 0; 35 21 36 if (isset($_REQUEST['logout']) && $_REQUEST['logout'] == "yes") { 22 37 header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'"); … … 25 40 setcookie("lastvisit", "", time() - 7200, "/", "", "0"); 26 41 $result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_ip='".USER_IP."'"); 27 if (isset($userdata['user_name'])) $message = "<b>".$locale['192'].$userdata['user_name']."</b><br /><br />\n"; 28 $error = ""; 42 if (isset($userdata['user_name'])) { 43 $message['line2'] = "<b>".$locale['192'].$userdata['user_name']."</b>"; 44 } 29 45 } else { 30 if (!isset($error)) $error = "";31 46 if ($error == 1) { 32 $ error = "<b>".$locale['194']."</b><br /><br />\n";47 $message['line1'] = "<b>".$locale['194']."</b>"; 33 48 $data = dbarray(dbquery("SELECT user_ban_reason, user_ban_expire FROM ".$db_prefix."users WHERE user_id='$user_id'")); 34 49 if (is_array($data)) { 35 if ($data['user_ban_reason'] != "") $error .= "<b>".$locale['180']." : ".$data['user_ban_reason']."</b><br />\n"; 36 if ($data['user_ban_expire'] > 0) $error .= "<b>".$locale['181']." ".showdate('forumdate', $data['user_ban_expire'])."</b><br />\n"; 37 $error .= "<br / >"; 50 if ($data['user_ban_reason'] != "") $message['line2'] = "<b>".$locale['180']." : ".$data['user_ban_reason']."</b>"; 51 if ($data['user_ban_expire'] > 0) $message['line4'] = "<b>".$locale['181']." ".showdate('forumdate', $data['user_ban_expire'])."</b>"; 38 52 } 39 53 } elseif ($error == 2) { 40 $ error = "<b>".$locale['195']."</b><br /><br />\n";54 $message['line2'] = "<b>".$locale['195']."</b>"; 41 55 } elseif ($error == 3) { 42 $ error = "<b>".$locale['196']."</b><br /><br />\n";56 $message['line2'] = "<b>".$locale['196']."</b>"; 43 57 } else { 44 58 if (isset($_COOKIE['userinfo'])) { … … 46 60 $user_pass = (preg_match("/^[0-9a-z]{32}$/", $cookie_vars['1']) ? $cookie_vars['1'] : ""); 47 61 $user_name = preg_replace(array("/\=/","/\#/","/\sOR\s/"), "", stripinput($user)); 48 if (!dbcount("(user_id)", "users", "user_name='$user_name' AND user_password='".$user_pass."'")) { 49 $message = "<b>".$locale['196']."</b><br /><br />\n"; 62 $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_name='".$user_name."' AND user_password='".$user_pass."'"); 63 if ($data = dbarray($result)) { 64 if ($data['user_bad_email'] != 0) { 65 $variables['url'] = BASEDIR."edit_profile.php?check=email&value=".(90 - intval((time() - $data['user_bad_email']) / 86400)); 66 } 67 $result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_user='0' AND online_ip='".USER_IP."'"); 68 $message['line2'] = "<b>".$locale['193'].$user."</b>"; 50 69 } else { 51 $result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_user='0' AND online_ip='".USER_IP."'"); 52 $message = "<b>".$locale['193'].$user."</b><br /><br />\n"; 70 $message['line2'] = "<b>".$locale['196']."</b>"; 53 71 } 54 72 } … … 56 74 } 57 75 58 $variables['message'] = isset($message)?$message:""; 76 // store the message for use in the template 77 $variables['message'] = $message; 78 79 // auto-redirect counter (in seconds) 59 80 $variables['error'] = $error; 60 $variables['refresh'] = $error== ""?1:10;81 $variables['refresh'] = $error==0 ? 1 : 10; 61 82 62 83 // define the first body panel variables
Note: See TracChangeset
for help on using the changeset viewer.
