Changeset 2100 in ExiteCMS
- Timestamp:
- 12/07/08 22:05:58 (3 years ago)
- Location:
- modules/common/login_panel/php-files/modules/login_panel
- Files:
-
- 2 edited
-
login_panel.php (modified) (2 diffs)
-
templates/modules.login_panel.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
modules/common/login_panel/php-files/modules/login_panel/login_panel.php
r2096 r2100 26 26 $variables['login_expiry'] = (iADMIN && isset($_SESSION['login_expire'])) ? time_system2local($_SESSION['login_expire']) : ""; 27 27 28 // get which authentication to show 29 $variables['auth_methods'] = $GLOBALS['cms_authentication']->selected; 30 $variables['method_count'] = count($variables['auth_methods']); 31 $variables['auth_state'] = array(); 32 foreach($variables['auth_methods'] as $key => $method) { 33 if (isset($_SESSION['box_login2'.$key])) { 34 $variables['auth_state'][] = $_SESSION['box_login2'.$key] == 0 ? 1 : 0; 35 } else { 36 $variables['auth_state'][] = 1; 37 } 38 } 28 // get the login templates to allow authentication 29 $variables['auth_templates'] = $GLOBALS['cms_authentication']->get_templates("side"); 39 30 40 31 // check if we need to display a registration link … … 61 52 // can we show the login panel? 62 53 $variables['show_login'] = $settings['auth_ssl'] == 0 || ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ); 63 if ( !iMEMBER &&!$variables['show_login']) $no_panel_displayed = true;54 if (iMEMBER || !$variables['show_login']) $no_panel_displayed = true; 64 55 65 56 $template_variables['modules.login_panel'] = $variables; -
modules/common/login_panel/php-files/modules/login_panel/templates/modules.login_panel.tpl
r2080 r2100 23 23 {$loginerror|default:""} 24 24 <form name='loginform2' method='post' action='{$smarty.const.BASEDIR}setuser.php?login=yes'> 25 {foreach from=$auth_methods item=method key=i} 26 {if $method_count > 1} 27 {if $method == "ldap"} 28 <div class='side-label'> 29 <div style='display:inline; position:relative; float:right;margin-top:2px;'> 30 <img src='{$smarty.const.THEME}images/panel_{if $auth_state.$i}off{else}on{/if}.gif' alt='' name='b_login2{$i}' onclick="javascript:flipBox('login2{$i}')" /> 31 </div> 32 {$locale.069} {$method|upper} {$locale.061}: 33 </div> 34 <div id='box_login2{$i}' name='login2{$i}' style='display:{if $auth_state.$i}block{else}none{/if};'> 35 {elseif $method == "ad"} 36 <div class='side-label'> 37 <div style='display:inline; position:relative; float:right;margin-top:2px;'> 38 <img src='{$smarty.const.THEME}images/panel_{if $auth_state.$i}off{else}on{/if}.gif' alt='' name='b_login2{$i}' onclick="javascript:flipBox('login2{$i}')" /> 39 </div> 40 {$locale.069} {$method|upper} {$locale.061}: 41 </div> 42 <div id='box_login2{$i}' name='login2{$i}' style='display:{if $auth_state.$i}block{else}none{/if};'> 43 {elseif $method == "local"} 44 <div class='side-label'> 45 <div style='display:inline; position:relative; float:right;margin-top:2px;'> 46 <img src='{$smarty.const.THEME}images/panel_{if $auth_state.$i}off{else}on{/if}.gif' alt='' name='b_login2{$i}' onclick="javascript:flipBox('login2{$i}')" /> 47 </div> 48 {$locale.069} {$locale.061}: 49 </div> 50 <div id='box_login2{$i}' name='login2{$i}' style='display:{if $auth_state.$i}block{else}none{/if};'> 51 {elseif $method == "openid"} 52 <div class='side-label'> 53 <div style='display:inline; position:relative; float:right;margin-top:2px;'> 54 <img src='{$smarty.const.THEME}images/panel_{if $auth_state.$i}off{else}on{/if}.gif' alt='' name='b_login2{$i}' onclick="javascript:flipBox('login2{$i}')" /> 55 </div> 56 {$locale.069} {$locale.067}: 57 </div> 58 <div id='box_login2{$i}' name='login2{$i}' style='display:{if $auth_state.$i}block{else}none{/if};'> 59 {/if} 60 {/if} 61 <div style='padding-left:2px;'> 62 {if $method == "ldap"} 63 {$locale.061}:<br /><input type='text' name='ldap_name' class='textbox' style='width:145px' /><br /> 64 {$locale.062}:<br /><input type='password' name='ldap_pass' class='textbox' style='width:145px' /><br /> 65 {elseif $method == "ad"} 66 {$locale.061}:<br /><input type='text' name='ad_name' class='textbox' style='width:145px' /><br /> 67 {$locale.062}:<br /><input type='password' name='ad_pass' class='textbox' style='width:145px' /><br /> 68 {elseif $method == "local"} 69 {$locale.061}:<br /><input type='text' name='user_name' class='textbox' style='width:145px' /><br /> 70 {$locale.062}:<br /><input type='password' name='user_pass' class='textbox' style='width:145px' /><br /> 71 {elseif $method == "openid"} 72 <input type='text' name='user_openid_url' class='textbox' style='width:128px;background: url({$smarty.const.IMAGES}openid_small_logo.gif) no-repeat; padding-left: 18px;' /><br /> 73 <span class='small' style='font-size:90%;'> <a href="http://{$settings.locale_code}.wikipedia.org/wiki/OpenID" target="_blank">{$locale.068}</a></span><br /> 74 {/if} 75 </div> 76 {if $method_count > 1} 77 </div> 78 {/if} 25 {foreach from=$auth_templates item=method key=i} 26 {include file=$i} 79 27 {/foreach} 80 <hr />81 <div style='text-align:center'>82 <input type='checkbox' name='remember_me' value='yes' title='{$locale.063}' style='vertical-align:middle;'{if $remember_me|default:"no" == "yes"} checked="checked"{/if}/>83 <input type='submit' name='login' value='{$locale.064}' class='button' /><br />84 <input type='hidden' name='javascript_check' value='n' />85 </div>86 </form>28 <hr /> 29 <div style='text-align:center'> 30 <input type='checkbox' name='remember_me' value='yes' title='{$locale.063}' style='vertical-align:middle;'{if $remember_me|default:"no" == "yes"} checked="checked"{/if}/> 31 <input type='submit' name='login' value='{$locale.064}' class='button' /><br /> 32 <input type='hidden' name='javascript_check' value='n' /> 33 </div> 34 </form> 87 35 {if $show_reglink || $show_passlink} 88 36 <hr />
Note: See TracChangeset
for help on using the changeset viewer.
