Changeset 1559 in ExiteCMS
- Timestamp:
- 07/30/08 18:35:15 (4 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
administration/settings_security.php (modified) (3 diffs)
-
administration/tools/language_pack_English.php (modified) (1 diff)
-
administration/tools/language_pack_Nederlands.php (modified) (1 diff)
-
files/locales/en.main.global.php (modified) (2 diffs)
-
modules/user_info_panel/templates/modules.user_info_panel.tpl (modified) (1 diff)
-
modules/user_info_panel/user_info_panel.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/settings_security.php
r1558 r1559 44 44 $auth_local = $_POST['auth_method']{1} == "+" ? "1" : "0"; 45 45 switch ($auth_method) { 46 case "0": // Local only 47 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = 'local' WHERE cfg_name = 'auth_type'"); 48 break; 46 49 case "1": // LDAP 47 50 if ($auth_local) { … … 60 63 case "3": // OpenID 61 64 if ($auth_local) { 62 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = ' openid,local' WHERE cfg_name = 'auth_type'");65 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = 'local,openid' WHERE cfg_name = 'auth_type'"); 63 66 } else { 64 67 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = 'openid' WHERE cfg_name = 'auth_type'"); … … 106 109 107 110 // determine the auth_method defined 108 $auth_methods = explode(",",$settings2['auth_type'].","); 109 switch($auth_methods[0]) { 110 case "ldap": 111 $auth_method = 1; 112 break; 113 case "ad": 114 $auth_method = 2; 115 break; 116 case "openid": 117 $auth_method = 3; 118 case "local": 119 break; 120 default: 121 $auth_method = 0; 111 $auth_methods = explode(",",$settings2['auth_type']); 112 $auth_method = 0; 113 $auth_local = false; 114 foreach($auth_methods as $auth_method) { 115 switch($auth_method) { 116 case "ldap": 117 $auth_method = 1; 118 break; 119 case "ad": 120 $auth_method = 2; 121 break; 122 case "openid": 123 $auth_method = 3; 124 case "local": 125 $auth_local = true; 126 break; 127 default: 128 $auth_method = 0; 129 } 122 130 } 123 $variables['auth_method'] = $auth_method;124 131 125 132 // check if a local fallback is defined 126 if ($auth_method && $auth_methods[1] == "local") { 127 $variables['auth_method'] .= "+"; 128 } 133 $variables['auth_method'] .= $auth_method . ($auth_local ? "+" : " "); 129 134 130 135 // define the admin body panel -
trunk/administration/tools/language_pack_English.php
r1558 r1559 2665 2665 $localestrings['066'] = "Forgotten your password?<br />Request a new one <a href='%slostpassword.php' class='side'>here</a>."; 2666 2666 $localestrings['067'] = "OpenID URL"; 2667 $localestrings['068'] = " Get an OpenID";2668 $localestrings['069'] = " Info";2667 $localestrings['068'] = "What is an OpenID?"; 2668 $localestrings['069'] = "with"; 2669 2669 $localestrings['070'] = "Online"; 2670 2670 $localestrings['071'] = "< 5 mins"; -
trunk/administration/tools/language_pack_Nederlands.php
r1558 r1559 2651 2651 $localestrings['066'] = "Wachtwoord vergeten?<br />Vraag <a href='%slostpassword.php' class='side'>hier</a> een nieuwe aan."; 2652 2652 $localestrings['067'] = "OpenID URL"; 2653 $localestrings['068'] = " OpenID aanmaken";2654 $localestrings['069'] = " Info";2653 $localestrings['068'] = "Wat is een OpenID?"; 2654 $localestrings['069'] = "via"; 2655 2655 $localestrings['070'] = "Online"; 2656 2656 $localestrings['071'] = "< 5 mins"; -
trunk/files/locales/en.main.global.php
r1558 r1559 3 3 // locale : English 4 4 // locale name : main.global 5 // generated on : Wed Jul 30 2008, 0:23:10CEST5 // generated on : Wed Jul 30 2008, 17:51:24 CEST 6 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- … … 67 67 $locale['066'] = "Forgotten your password?<br />Request a new one <a href='%slostpassword.php' class='side'>here</a>."; 68 68 $locale['067'] = "OpenID URL"; 69 $locale['068'] = " Get an OpenID";70 $locale['069'] = " Info";69 $locale['068'] = "What is an OpenID?"; 70 $locale['069'] = "with"; 71 71 $locale['070'] = "Online"; 72 72 $locale['071'] = "< 5 mins"; -
trunk/modules/user_info_panel/templates/modules.user_info_panel.tpl
r1558 r1559 59 59 <div style='text-align:center'> 60 60 {$loginerror|default:""} 61 <form name='loginform' method='post' action='{$smarty.const.FUSION_SELF}'> 62 {if $auth_userpass} 63 {$locale.061}<br /><input type='text' name='user_name' class='textbox' style='width:125px' /><br /> 64 {$locale.062}<br /><input type='password' name='user_pass' class='textbox' style='width:125px' /><br /> 61 </div> 62 <form name='loginform' method='post' action='{$smarty.const.FUSION_SELF}'> 63 {foreach from=$auth_methods item=method key=i} 64 {if $method_count > 1} 65 {if $method == "ldap"} 66 <div class='side-label'> 67 <div style='display:inline; position:relative; float:right;margin-top:2px;'> 68 <img src='{$smarty.const.THEME}images/panel_{if $auth_state.$i}off{else}on{/if}.gif' alt='' name='b_login{$i}' onclick="javascript:flipBox('login{$i}')" /> 69 </div> 70 {$locale.069} {$method|upper} {$locale.061}: 71 </div> 72 <div id='box_login{$i}' name='login{$i}' style='display:{if $auth_state.$i}block{else}none{/if};'> 73 {elseif $method == "ad"} 74 <div class='side-label'> 75 <div style='display:inline; position:relative; float:right;margin-top:2px;'> 76 <img src='{$smarty.const.THEME}images/panel_{if $auth_state.$i}off{else}on{/if}.gif' alt='' name='b_login{$i}' onclick="javascript:flipBox('login{$i}')" /> 77 </div> 78 {$locale.069} {$method|upper} {$locale.061}: 79 </div> 80 <div id='box_login{$i}' name='login{$i}' style='display:{if $auth_state.$i}block{else}none{/if};'> 81 {elseif $method == "local"} 82 <div class='side-label'> 83 <div style='display:inline; position:relative; float:right;margin-top:2px;'> 84 <img src='{$smarty.const.THEME}images/panel_{if $auth_state.$i}off{else}on{/if}.gif' alt='' name='b_login{$i}' onclick="javascript:flipBox('login{$i}')" /> 85 </div> 86 {$locale.069} {$locale.061}: 87 </div> 88 <div id='box_login{$i}' name='login{$i}' style='display:{if $auth_state.$i}block{else}none{/if};'> 89 {elseif $method == "openid"} 90 <div class='side-label'> 91 <div style='display:inline; position:relative; float:right;margin-top:2px;'> 92 <img src='{$smarty.const.THEME}images/panel_{if $auth_state.$i}off{else}on{/if}.gif' alt='' name='b_login{$i}' onclick="javascript:flipBox('login{$i}')" /> 93 </div> 94 {$locale.069} {$locale.067}: 95 </div> 96 <div id='box_login{$i}' name='login{$i}' style='display:{if $auth_state.$i}block{else}none{/if};'> 97 {/if} 65 98 {/if} 66 {if $auth_openid} 67 {$locale.067}<br /><input type='text' name='user_openid_url' class='textbox' style='width:108px;background: url({$smarty.const.IMAGES}openid_small_logo.png) no-repeat; padding-left: 18px;' /><br /> 68 <span class='small' style='font-size:90%;'> <a href="http://openid.net/get/" target="_blank">{$locale.068}</a> · <a href="http://openid.net/what" target="_blank">{$locale.069}</a></span><br /> 99 <div style='padding-left:2px;'> 100 {if $method == "ldap"} 101 {$locale.061}:<br /><input type='text' name='ldap_name' class='textbox' style='width:145px' /><br /> 102 {$locale.062}:<br /><input type='password' name='ldap_pass' class='textbox' style='width:145px' /><br /> 103 {elseif $method == "ad"} 104 {$locale.061}:<br /><input type='text' name='ad_name' class='textbox' style='width:145px' /><br /> 105 {$locale.062}:<br /><input type='password' name='ad_pass' class='textbox' style='width:145px' /><br /> 106 {elseif $method == "local"} 107 {$locale.061}:<br /><input type='text' name='user_name' class='textbox' style='width:145px' /><br /> 108 {$locale.062}:<br /><input type='password' name='user_pass' class='textbox' style='width:145px' /><br /> 109 {elseif $method == "openid"} 110 <input type='text' name='user_openid_url' class='textbox' style='width:128px;background: url({$smarty.const.IMAGES}openid_small_logo.png) no-repeat; padding-left: 18px;' /><br /> 111 <span class='small' style='font-size:90%;'> <a href="http://en.wikipedia.org/wiki/OpenID" target="_blank">{$locale.068}</a></span><br /> 69 112 {/if} 70 <br /> 71 <input type='submit' name='login' value='{$locale.064}' class='button' /> 72 <input type='checkbox' name='remember_me' value='yes' title='{$locale.063}' style='vertical-align:middle;'{if $remember_me|default:"no" == "yes"} checked="checked"{/if}/><br /> 73 <input type='hidden' name='javascript_check' value='n' /> 113 </div> 114 {if $method_count > 1} 115 </div> 116 {/if} 117 {/foreach} 118 <hr /> 119 <div style='text-align:center'> 120 <input type='submit' name='login' value='{$locale.064}' class='button' /> 121 <input type='checkbox' name='remember_me' value='yes' title='{$locale.063}' style='vertical-align:middle;'{if $remember_me|default:"no" == "yes"} checked="checked"{/if}/><br /> 122 <input type='hidden' name='javascript_check' value='n' /> 123 </div> 74 124 </form> 75 </div>76 {literal}77 <script type='text/javascript'>78 /* <![CDATA[ */79 if (document.loginform.javascript_check.value == 'n')80 {81 document.loginform.javascript_check.value = 'y';82 }83 /* ]]> */84 </script>85 {/literal}86 125 {if $show_reglink || $show_passlink} 87 126 <hr /> -
trunk/modules/user_info_panel/user_info_panel.php
r1558 r1559 69 69 $variables['login_expiry'] = (iADMIN && isset($_SESSION['login_expire'])) ? time_system2local($_SESSION['login_expire']) : ""; 70 70 71 // check which authentication to show 72 $auth_methods = explode(",",$settings['auth_type'].","); 73 switch($auth_methods[0]) { 74 case "local": 75 case "ldap": 76 case "ad": 77 $variables['auth_userpass'] = 1; 78 break; 79 default: 80 $variables['auth_userpass'] = 0; 81 } 82 switch($auth_methods[0]) { 83 case "openid": 84 $variables['auth_openid'] = 1; 85 break; 86 default: 87 $variables['auth_openid'] = 0; 88 } 89 switch($auth_methods[1]) { 90 case "local": 91 $variables['auth_userpass'] = 1; 92 break; 93 default: 94 break; 71 // get which authentication to show 72 $variables['auth_methods'] = explode(",",$settings['auth_type']); 73 $variables['method_count'] = count($variables['auth_methods']); 74 $variables['auth_state'] = array(); 75 foreach($variables['auth_methods'] as $key => $method) { 76 $variables['auth_state'][] = isset($_SESSION['box_login'.$key]) && $_SESSION['box_login'.$key] == 0; 95 77 } 96 78
Note: See TracChangeset
for help on using the changeset viewer.
