Your IP : 216.73.216.79


Current Path : /var/www/html/ssr26/frontend/runtime/frontendpage/
Upload File :
Current File : /var/www/html/ssr26/frontend/runtime/frontendpage/36_1774949117040588600-content-96.php

<?php 
/*** CONTENT_ID-96***/
use yii\widgets\ActiveForm;
use common\models\FrontendLoginForm;

echo '<style>
    body{
        background-color:#f5f6f8;
        background:url('.$site_login_background.') no-repeat;
        background-size:cover;
    }
</style>';

$msg = '';
$form = ActiveForm::begin();
if(isset($_POST) && !empty($_POST)){
    $model = new FrontendLoginForm();
    $model->username = $_POST['username'];
    $model->password = $_POST['password'];
    if($model->login()){
        header('Location:'.$baseUrl.'/portal-main/mydonation');
        exit();
    } else
        $msg = '<div class="alert alert-danger" role="alert">ID Pengguna & Kata Laluan tidak padan</div>';
    
}else{
    Yii::$app->user->logout();
}

echo '<div class="text-center mt-2">
    <h5 class="text-title">Selamat Datang Ke Super Schools Rugby (SSR)</h5>
    <p class="text-muted">Untuk pengguna berdaftar sahaja</p>
</div>
<div class="p-2 mt-4">'.$msg.'
    <div class="row">
        <div class="col-sm-12">
            <div class="mb-3">
                <label class="form-label" for="username">ID Pengguna</label>
                <input type="text" class="form-control inputfield" id="username" name="username" placeholder="Masukkan ID Pengguna">
            </div>
            
        </div>
        <div class="col-sm-12">
            <div class="mb-3">
                
                <div id="show_hide_password" style="position:relative;">
                    <label class="form-label" for="userpassword">Kata Laluan</label>
                    <input type="password" class="form-control inputfield pma_password" id="userpassword" name="password" placeholder="Masukkan kata laluan" required>
                    <span id="toggle-password"><i class="fa fa-eye-slash" aria-hidden="true"></i></span>
               </div>
                
            </div>
            <div class="form-check">
                <input type="checkbox" class="form-check-input" id="auth-remember-check">
                <label class="form-check-label" for="auth-remember-check">Ingati Saya</label>
            </div>
            <div class="float-end"><a href="'.$baseUrl.'/portal-main/reset-password" class="text-muted">Terlupa Kata Laluan?</a></div>
        </div>
    </div>
    
                            
    
                            
    
                                                    
    <div class="mt-3 text-center">
        <button class="btn btn-primary w-sm waves-effect waves-light" type="submit">Log Masuk</button>
    </div>
                        
    <div class="mt-2 text-center">
        <p class="mb-0">Belum daftar lagi ? Klik <a href="'.$baseUrl.'/portal-main/registration" class="fw-medium text-title"> di sini </a> untuk mendaftar sekarang</p>
    </div>
</div>';
ActiveForm::end();


echo "
<style>
    #toggle-password{
        cursor : pointer;
        position : absolute;
        right : 1em;
        top : 55%;
    }
</style>
<script>
    $(document).ready(function() {
        $('#toggle-password').on('click', function(event) {
            event.preventDefault();
            if($('#show_hide_password input').attr('type') == 'text'){
                $('#show_hide_password input').attr('type', 'password');
                $('#show_hide_password i').addClass( 'fa-eye-slash' );
                $('#show_hide_password i').removeClass( 'fa-eye' );
            }else if($('#show_hide_password input').attr('type') == 'password'){
                $('#show_hide_password input').attr('type', 'text');
                $('#show_hide_password i').removeClass( 'fa-eye-slash' );
                $('#show_hide_password i').addClass( 'fa-eye' );
            }
        });
    });
</script>";

?>