Changeset 1858 in ExiteCMS for trunk/includes/templates/main.login.tpl


Ignore:
Timestamp:
10/17/08 16:40:38 (4 years ago)
Author:
hverton
Message:

rewritten the login/logout code, all code is now located in setuser.php
added a security setting "require SSL for logins"
added a security setting "require login before site access"
fixed small date display issue in several rev. upgrade files
added alternative login methods to the full-screen login

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/templates/main.login.tpl

    r929 r1858  
    99{* Revision History:                                                        *} 
    1010{* 2007-07-09 - WW - Initial version                                        *} 
     11{* 2008-10-17 - WW - Rewritten to support OpenId etc.                       *} 
    1112{*                                                                          *} 
    1213{****************************************************************************} 
     
    1516{*                                                                          *} 
    1617{****************************************************************************} 
    17 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'> 
    18 <html> 
    19 <head> 
    20 <title>{$settings.sitename}</title> 
    21 <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'> 
    22 {include file='_stylesheets.tpl'} 
    23 </head> 
    24 <body class='tbl2'> 
    25  
    26 <table width='100%' height='100%'> 
    27 <tr> 
    28 <td> 
    29  
    30 <table align='center' cellpadding='0' cellspacing='1' width='500' class='tbl-border'> 
    31 <tr> 
    32 <td class='tbl1' style='font-size:11px'> 
    33 <center> 
    34 <br /> 
    35 <img src='{$smarty.const.THEME}images/{$settings.sitebanner}' alt='{$settings.sitename}'><br /><br /> 
    36 <form name='loginform' method='post' action='{$smarty.const.FUSION_SELF}'> 
    37     {$locale.061}<br /><input type='text' name='user_name' class='textbox' style='width:100px' /><br /> 
    38     {$locale.062}<br /><input type='password' name='user_pass' class='textbox' style='width:100px' /><br /> 
    39     <br /> 
    40     <input type='checkbox' name='remember_me' value='y' title='{$locale.063}' style='vertical-align:middle;'{if $remember_me|default:"no" == "yes"} checked{/if}/> 
    41     <input type='submit' name='login' value='{$locale.064}' class='button' /> 
    42     <input type='hidden' name='javascript_check' value='n' /> 
    43     <br /><br /> 
    44 </form> 
    45 </center> 
    46 </td> 
    47 </tr> 
    48 </table> 
    49  
    50 </td> 
    51 </tr> 
    52 </table> 
    53  
    54 </body> 
     18<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     19<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$settings.locale_code|truncate:2:""}" lang="{$settings.locale_code|truncate:2:""}" dir="{$smarty.const.LOCALEDIR}"> 
     20    <head> 
     21        <title>{$settings.sitename}{if defined('PAGETITLE')} - {$smarty.const.PAGETITLE}{/if}</title> 
     22        <meta http-equiv='Content-Type' content='text/html; charset={$settings.charset}' /> 
     23        <meta http-equiv='Content-Language' content='{$settings.locale_code|truncate:2:""}' /> 
     24        <meta http-equiv='refresh' content='{$refresh}; url={$url}'> 
     25        <link href="{$smarty.const.THEME}exitecms__0001.css" rel="stylesheet" type="text/css" /> 
     26    </head> 
     27    <body class='body'> 
     28        <div class='splashscreen-h'> 
     29            <div class='splashscreen-v' style='height:350px;vertical-align:center;'> 
     30                <table align='center' cellpadding='0' cellspacing='1' width='500'> 
     31                    <tr> 
     32                        <td class='tbl1' align='center'> 
     33                            <form name='loginform1' method='post' action='{$smarty.const.BASEDIR}setuser.php?login=yes'> 
     34                                <img src='{$smarty.const.THEME}images/{$settings.sitebanner}' alt='{$settings.sitename}' style='width:480px;margin:5px;'/> 
     35                                {foreach from=$auth_methods item=method key=i} 
     36                                    {if $method_count > 1} 
     37                                        {if $method == "ldap"} 
     38                                            <div class='side-label'> 
     39                                                {$locale.069} {$method|upper} {$locale.061}: 
     40                                            </div> 
     41                                            <div id='box_login{$i}' name='login{$i}' style='display:{if $auth_state.$i}block{else}none{/if};'> 
     42                                        {elseif $method == "ad"} 
     43                                            <div class='side-label'> 
     44                                                {$locale.069} {$method|upper} {$locale.061}: 
     45                                            </div> 
     46                                            <div id='box_login{$i}' name='login{$i}' style='display:{if $auth_state.$i}block{else}none{/if};'> 
     47                                        {elseif $method == "local"} 
     48                                            <div class='side-label'> 
     49                                                {$locale.069} {$locale.061}: 
     50                                            </div> 
     51                                            <div id='box_login{$i}' name='login{$i}' style='display:{if $auth_state.$i}block{else}none{/if};'> 
     52                                        {elseif $method == "openid"} 
     53                                            <div class='side-label'> 
     54                                                {$locale.069} {$locale.067}: 
     55                                            </div> 
     56                                            <div id='box_login{$i}' name='login{$i}' style='display:{if $auth_state.$i}block{else}none{/if};'> 
     57                                        {/if} 
     58                                    {/if} 
     59                                    <div style='padding:5px;'> 
     60                                    {if $method == "ldap"} 
     61                                        {$locale.061}: <input type='text' name='ldap_name' class='textbox' style='width:145px' /> 
     62                                        &nbsp;&nbsp;&nbsp; 
     63                                        {$locale.062}: <input type='password' name='ldap_pass' class='textbox' style='width:145px' /><br /> 
     64                                    {elseif $method == "ad"} 
     65                                        {$locale.061}: <input type='text' name='ad_name' class='textbox' style='width:145px' /> 
     66                                        &nbsp;&nbsp;&nbsp; 
     67                                        {$locale.062}: <input type='password' name='ad_pass' class='textbox' style='width:145px' /><br /> 
     68                                    {elseif $method == "local"} 
     69                                        {$locale.061}: <input type='text' name='user_name' class='textbox' style='width:145px' /> 
     70                                        &nbsp;&nbsp;&nbsp; 
     71                                        {$locale.062}: <input type='password' name='user_pass' class='textbox' style='width:145px' /><br /> 
     72                                    {elseif $method == "openid"} 
     73                                        <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;' /> 
     74                                        &nbsp;&nbsp;&nbsp; 
     75                                        <span class='small' style='font-size:90%;'>  <a href="http://{$settings.locale_code}.wikipedia.org/wiki/OpenID"  target="_blank">{$locale.068}</a></span><br /> 
     76                                    {/if} 
     77                                    </div> 
     78                                    {if $method_count > 1} 
     79                                        </div> 
     80                                    {/if}            
     81                                {/foreach} 
     82                                    <hr /> 
     83                                    <div style='text-align:center'> 
     84                                        <input type='checkbox' name='remember_me' value='yes' title='{$locale.063}' style='vertical-align:middle;'{if $remember_me|default:"no" == "yes"} checked="checked"{/if}/> 
     85                                        <input type='submit' name='login' value='{$locale.064}' class='button' /><br /> 
     86                                        <input type='hidden' name='javascript_check' value='n' /> 
     87                                    </div> 
     88                                </form> 
     89                            {literal} 
     90                            <script type='text/javascript'> 
     91                            /* <![CDATA[ */ 
     92                                if (document.loginform1.javascript_check.value == 'n') 
     93                                { 
     94                                    document.loginform1.javascript_check.value = 'y'; 
     95                                } 
     96                                /* ]]> */ 
     97                            </script> 
     98                                {/literal} 
     99                            {if $show_reglink || $show_passlink} 
     100                                <hr /> 
     101                            {/if} 
     102                            {if $show_reglink}{$settings.siteurl|string_format:$locale.065}<br /><br />{/if} 
     103                            {if $show_passlink}{$settings.siteurl|string_format:$locale.066}{/if} 
     104                        </td> 
     105                    </tr> 
     106                </table> 
     107            </div> 
     108        </div> 
     109    </body> 
    55110</html> 
    56111{***************************************************************************} 
Note: See TracChangeset for help on using the changeset viewer.