Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.00 KB | None | 0 0
  1. <?php
  2. $szablon = <<<HTML <form accept-charset='utf-8' method='post' action='{$login->url}' data-controller="core.global.core.login" class='ipsBox_alt'>
  3.     <input type="hidden" name="csrfKey" value="{expression="\IPS\Session::i()->csrfKey"}">
  4.     {{if $ref}}
  5.         <input type="hidden" name="ref" value="{$ref}">
  6.     {{endif}}
  7.     {{if !request.isAjax()}}
  8.         <div class="ipsSpacer_both">
  9.             <h1 class='ipsType_reset ipsType_veryLarge ipsType_center'>{lang='sign_in_short'}</h1>
  10.             {{if \IPS\Login::registrationType() != 'disabled'}}
  11.                 <p class='ipsType_reset ipsType_large ipsType_center ipsType_light'>
  12.                     {lang="dont_have_an_account"}
  13.                     {{if \IPS\Login::registrationType() == 'redirect'}}
  14.                         <a href='{expression="\IPS\Settings::i()->allow_reg_target"}' target="_blank">
  15.                     {{else}}
  16.                         <a href='{url="app=core&module=system&controller=register" seoTemplate="register"}' {{if \IPS\Login::registrationType() == 'normal'}}data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title='{lang="sign_up"}'{{endif}}>
  17.                     {{endif}}
  18.                     {lang="sign_up"}</a>
  19.                 </p>
  20.             {{endif}}
  21.         </div>
  22.     {{endif}}
  23.     {{$usernamePasswordMethods = $login->usernamePasswordMethods();}}
  24.     {{$buttonMethods = $login->buttonMethods();}}
  25.     {{if $usernamePasswordMethods and $buttonMethods}}
  26.         {{if $error}}
  27.             <div class="ipsMessage ipsMessage_error">{lang="$error"}</div>
  28.         {{endif}}
  29.         <div class='ipsColumns ipsColumns_collapsePhone'>
  30.             <div class='ipsColumn ipsColumn_fluid'>
  31.                 <div class='{{if !request.isAjax()}}ipsBox{{endif}} ipsPad'>
  32.                     {template="loginForm" app="core" group="system" params="$login"}
  33.                 </div>
  34.             </div>
  35.             <div class='ipsColumn ipsColumn_veryWide'>
  36.                 <div class='{{if !request.isAjax()}}ipsBox{{endif}} ipsPad'>
  37.                     <h2 class='ipsType_sectionHead'>{lang="sign_in_faster"}</h2>
  38.                     {{if count( $buttonMethods ) > 1}}
  39.                         <p class='ipsType_normal ipsType_reset ipsType_light'>{lang='sign_in_with_these'}</p>
  40.                     {{endif}}
  41.                     {{foreach $buttonMethods as $method}}
  42.                         <div class='cLogin_social ipsType_center'>
  43.                             {$method->button()|raw}
  44.                         </div>
  45.                     {{endforeach}}
  46.                 </div>
  47.             </div>
  48.         </div>
  49.     {{elseif $usernamePasswordMethods}}
  50.         <div class='cLogin_single ipsPos_center'>
  51.         {{if $error}}
  52.             <p class="ipsMessage ipsMessage_error">{lang="$error"}</p>
  53.         {{endif}}
  54.             <div class="{{if !request.isAjax()}}ipsBox{{endif}} ipsPad">
  55.                 {template="loginForm" app="core" group="system" params="$login"}
  56.             </div>
  57.         </div>
  58.     {{elseif $buttonMethods}}
  59.         <div class="cLogin_single ipsPos_center">
  60.             {{if $error}}
  61.                 <p class="ipsMessage ipsMessage_error">{lang="$error"}</p>
  62.             {{endif}}
  63.             {{foreach $buttonMethods as $method}}
  64.                 <div class='ipsPad_half ipsType_center'>
  65.                     {$method->button()|raw}
  66.                 </div>
  67.             {{endforeach}}
  68.         </div>
  69.     {{endif}}
  70. </form>
  71. HTML;
  72.  
  73. $szablon2 = <<<HTML <ul class='ipsForm'>
  74.     <li class="ipsFieldRow ipsFieldRow_fullWidth ipsClearfix">
  75.         {{$authType = $login->authType();}}
  76.         <label class="ipsFieldRow_label" for="auth">
  77.             {{if $authType === \IPS\Login::AUTH_TYPE_USERNAME}}
  78.                 {lang="username"}
  79.             {{elseif $authType === \IPS\Login::AUTH_TYPE_EMAIL}}
  80.                 {lang="email_address"}
  81.             {{else}}
  82.                 {lang="username_or_email"}
  83.             {{endif}}
  84.             <span class="ipsFieldRow_required">{lang="required"}</span>
  85.         </label>
  86.         <div class="ipsFieldRow_content">
  87.             {{if $authType === \IPS\Login::AUTH_TYPE_USERNAME}}
  88.                 <input type="text" placeholder="{lang="username"}" name="auth" id="auth" {{if isset( \IPS\Request::i()->auth )}}value="{request="auth"}"{{endif}}>
  89.             {{elseif $authType === \IPS\Login::AUTH_TYPE_EMAIL}}
  90.                 <input type="email" placeholder="{lang="email_address"}" name="auth" id="auth" {{if isset( \IPS\Request::i()->auth )}}value="{request="auth"}"{{endif}}>
  91.             {{else}}
  92.                 <input type="text" placeholder="{lang="username_or_email"}" name="auth" id="auth" {{if isset( \IPS\Request::i()->auth )}}value="{request="auth"}"{{endif}}>
  93.             {{endif}}
  94.         </div>
  95.     </li>
  96.     <li class="ipsFieldRow ipsFieldRow_fullWidth ipsClearfix">
  97.         <label class="ipsFieldRow_label" for="password">
  98.             {lang="password"}
  99.             <span class="ipsFieldRow_required">{lang="required"}</span>
  100.         </label>
  101.         <div class="ipsFieldRow_content">
  102.             <input type="password" placeholder="{lang="password"}" name="password" id="password" {{if isset( \IPS\Request::i()->password )}}value="{request="password"}"{{endif}}>
  103.         </div>
  104.     </li>
  105.     <li class="ipsFieldRow ipsFieldRow_checkbox ipsClearfix">
  106.         <span class="ipsCustomInput">
  107.             <input type="checkbox" name="remember_me" id="remember_me_checkbox" value="1" checked aria-checked="true">
  108.             <span></span>
  109.         </span>
  110.         <div class="ipsFieldRow_content">
  111.             <label class="ipsFieldRow_label" for="remember_me_checkbox">{lang="remember_me"}</label>
  112.             <span class="ipsFieldRow_desc">{lang="remember_me_desc"}</span>
  113.         </div>
  114.     </li>
  115.     {{if !\IPS\Settings::i()->disable_anonymous}}
  116.         <li class="ipsFieldRow ipsFieldRow_checkbox ipsClearfix">
  117.             <span class="ipsCustomInput">
  118.                 <input type="checkbox" name="anonymous" id="anonymous_checkbox" value="1" aria-checked="false">
  119.                 <span></span>
  120.             </span>
  121.             <div class="ipsFieldRow_content">
  122.                 <label class="ipsFieldRow_label" for="anonymous_checkbox">{lang="signin_anonymous"}</label>
  123.             </div>
  124.         </li>
  125.     {{endif}}
  126.     <li class="ipsFieldRow ipsFieldRow_fullWidth">
  127.         <br>
  128.         <button type="submit" name="_processLogin" value="usernamepassword" class="ipsButton ipsButton_primary ipsButton_small" id="elSignIn_submit">{lang="login"}</button>
  129.         {{if settings.allow_forgot_password != 'disabled'}}
  130.             <br>
  131.             <p class="ipsType_right ipsType_small">
  132.                 {{if settings.allow_forgot_password == 'redirect'}}
  133.                     <a href='{expression="\IPS\Settings::i()->allow_forgot_password_target"}' target="_blank">
  134.                 {{else}}
  135.                     <a href='{url="app=core&module=system&controller=lostpass" seoTemplate="lostpassword"}' data-ipsDialog data-ipsDialog-title='{lang="forgotten_password"}'>
  136.                 {{endif}}
  137.                 {lang="forgotten_password"}</a>
  138.             </p>
  139.         {{endif}}
  140.     </li>
  141. </ul>
  142. HTML;
  143.  
  144.  
  145. echo $szablon;
  146. echo $szablon2;
  147.  
  148.  
  149. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement