<?php /* Smarty version Smarty-3.1.11, created on 2025-01-27 12:59:52
         compiled from "../views/default/usergroupviewadmin/pass.html" */ ?>
<?php /*%%SmartyHeaderCode:8432928967976728921752-41183872%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '6cb618f9f00d30fa8356a56be99104cf61073edf' => 
    array (
      0 => '../views/default/usergroupviewadmin/pass.html',
      1 => 1672089200,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '8432928967976728921752-41183872',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67976728a00bf3_71268658',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67976728a00bf3_71268658')) {function content_67976728a00bf3_71268658($_smarty_tpl) {?>
<div class="row">
    <div class="container" id="mainDiv_uga">

        <div class="row">


            <div class="col-lg-5 col-lg-offset-4">
                <div class="panel panel_login">
                    <div class="panel-heading loginpanel">
                        <h3 class="panel-title">تأكيد الصلاحية</h3>
                    </div>
                    <form class="form-horizontal" id="uga-login-form">
                        <div class="form-group">
                            <label for="password" class="col-lg-4 control-label">كلمة المرور</label>
                            <div class="col-lg-8">
                                <input type="password" class="form-control" id="password" name="password" placeholder="كلمة المرور">
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-lg-offset-2 col-lg-10">
                                <button type="submit" id="uga-go-btn" class="btn btn-default pull-left submit color-white">متابعة</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>




        </div>



    </div>
</div>


<script type="text/javascript">
    var attempts = 0;
    $('#uga-login-form').live('submit', function (e) {
        e.preventDefault();
        e.stopPropagation();
        var thisis = $(this);
        if (!thisis.hasClass('processing...')) {
            thisis.addClass('processing...');
            if ($('#password').val() == "") {
                $('#password').css('background-color', 'yellow');
                thisis.removeClass('processing...');
            } else {
                $('#password').css('background-color', 'white');
                $.ajax({
                    type: "POST",
                    url: 'usergroupControllerAdmin.php?do=en',
                    data: {password: $('#password').val()},
                    async: false,
                    success: function (data) {
                        thisis.removeClass('processing...');
                        if (data == -1) {
                            attempts = attempts + 1;
                            if (attempts < 3) {
                                $('#password').css('background-color', '#d43f3a');
                                setTimeout(function () {
                                    $('#password').css('background-color', 'white');
                                    $('#password').val("");
                                }, 2000)
                            } else {
                                window.location.href = 'logout.php';
                            }
                        } else {
                            $('#mainDiv_uga').html(data);
                        }

                    }

                });

            }
        }
    });
    $(function () {
        setTimeout(function () {
            $('#password').focus();
        }, 0);
    })
</script>
<?php }} ?>