<?php
error_reporting(0);
session_start();
if(isset($_SESSION['officer'])){
    $username = $_SESSION['officer'];



?>


<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <meta charset="utf-8" />
    <?php include('../admin/includes/styles.php'); ?>
    <title>Quick Update | <?php echo $church_name; ?></title>
<?php
  $sql = "SELECT * FROM general_settings";
  $conn->query($sql);
  $result = $conn->fetchSingle();
  $curreg = ucwords($result->curreg);
  $curtype = $result->church_name;
  
  $profilepic = $conn->base_url()."images/profile.json";
?>
</head>
<style>
.text-uppercase {
        text-transform: uppercase !important;
        letter-spacing: 0 !important;
    }
    @media screen {
        #printSection {
            display: none;
        }

        .printspan, .bible{
            display: none !important;
        }

        .bibles{
            font-size: 72px;
        }

        .bank, .bankd, .copy {
            display: none;
        }
    }

    @media print {
        span {

        }

    @media print {

        body {
            color: black;
            font-style: normal;
            text-rendering: optimizeLegibility;
            height: auto;
            margin-left: 0;
        }
        .printspan{
            font-size: 14pt !important;
            margin-left: -60px !important;
            margin-right: 0 !important;
            padding-top: 10px;
        }
.col-lg-3{
    padding-right: 0 !important;
}
        .printscreen{
            display: none !important;
        }
        .biblescreen{
            display: none !important;
        }
    }
        .bible{
            font-size: 14pt !important;
            padding-top: 10px;
        }

        .bank{
            font-size: 12pt !important;
            padding-top: 20px;
        }

        .bankd{
            font-size: 12pt !important;
            padding-top: 5px;
        }

        .copy{
             font-size: 12pt !important;
            font-style: normal;
            font-style: italic;
             padding-top: 20px;
         }

        .bibles{
            font-size: xxx-large !important;
            padding-top: 10px;
            padding-bottom: 10px;
        }

        body, #main-container  *  {
            visibility:hidden;

        }
        #printSection, #printSection * {
            visibility:visible;
        }
        #printSection {
            position:absolute;
            left:0;
            top:0;
        }


    }

    #notify{
        animation:signup-response 0.5s 1;
        -webkit-animation:signup-response 0.5s 1;
        animation-fill-mode: forwards;

        animation-delay:2s;
        -webkit-animation-delay:2s; /* Safari and Chrome */
        -webkit-animation-fill-mode: forwards;

    }

    @keyframes signup-response{
        from {opacity :1;}
        to {opacity :0;}
    }

    @-webkit-keyframes signup-response{
        from {opacity :1;}
        to {opacity :0;}
    }

</style>
<style>
    @media only screen and (min-width: 768px) {
        .modal .modal-dialog {
            width: 400px !important;
        }
    }

    .demo-card-scrollable {
        height: 100px;
    }
        .scrollable.scroll-content {
        height: 56px !important;
    }

    .table tbody tr td {
        padding: .75rem;
    }
    .dataTables_wrapper .row > div {
        flex-direction: column;
    }

    .table > tfoot > tr > td,
    .table > tfoot > tr > th{
    text-transform: uppercase;
    font-weight: 500;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    font-size: 10.5px;
    letter-spacing: 0.06em;
    padding-top: 14px;
    padding-bottom: 14px;
    vertical-align: middle;
    color: #4b4b4b;
    border-top: none;}
</style>
<body class="fixed-header dashboard">
<?php include('includes/sidebar.php'); ?>
<!-- START PAGE-CONTAINER -->
<div class="page-container ">
    <?php include('includes/header.php'); ?>
    <!-- START PAGE CONTENT WRAPPER -->
    <div class="page-content-wrapper ">
        <!-- START PAGE CONTENT -->

        <div class="content sm-gutter">


            <!-- START CONTAINER FLUID -->
            <div class="container-fluid padding-25 sm-padding-10">
                 <?php
                                   $sql = "SELECT curreg FROM general_settings";
                                   $conn->query($sql);
                                   $constatus = $conn->fetchColumn(); 

                                   if($constatus == 'active'){
                                        ?>
                <!-- START ROW -->
               
                <div class="row m-t-20">
                    



<div class="m-0 row ">
    
    <div class=" container-fluid   container-fixed-lg">
            <div class="card card-transparent">
              
              </div>
              <div class="card-body">
                <div class="row">
                  <div class="col-lg-6">
                    <div id="card-linear" class="card card-default">
                     
                      <div class="card-body" style="text-align:center;">
                        <h3>
								<span class="semi-bold" >Conference Members</h3>
                         <a href="./member-update"><p><lottie-player src='<?php echo $members; ?>'  background='transparent' style='width: 300px; height: 300px;margin: 20px auto; margin-left: auto;margin-right: auto;'  speed='1'  loop  autoplay></lottie-player>
                        </p></a>
                        
                        <div class="col-sm-12" style="margin-bottom: 40px; margin-top: 40px; margin-left: auto;margin-right: auto;">
                                    <a href="./member-update"><input aria-label="" type="submit" value="Member Quick Update" name="promote" id="submit" class="btn btn-primary pull-right btn-lg btn-block btn-animated from-left"></a>
                                    </div>
                      </div>
                    </div>
                  </div>
                  
                  
                  <div class="col-lg-6">
                    <div id="card-linear" class="card card-default">
                     
                      <div class="card-body" style="text-align:center;">
                        <h3>
								<span class="semi-bold" >Conference ClergyMen</h3>
                        <a href="./clergy-update"><p><lottie-player src='<?php echo $church; ?>'  background='transparent' style='width: 300px; height: 300px;margin: 20px auto; margin-left: auto;margin-right: auto;'  speed='1'  loop  autoplay></lottie-player>
                        </p></a>
                        
                        <div class="col-sm-12" style="margin-bottom: 40px; margin-top: 40px; margin-left: auto;margin-right: auto;">
                                    <a href="./clergy-update"><input aria-label="" type="submit" value="ClergyMen Quick Update" name="promote" id="submit" class="btn btn-primary pull-right btn-lg btn-block btn-animated from-left"></a>
                                    </div>
                      </div>
                    </div>
                  </div>
                  
                </div>
              </div>
            </div>
          </div>
          
          
          
          
          
          
          
          
                
              </div>
              
             
              </div>

<div class="col-lg-12" id="phoneStatus"></div>



                  
                  



                        <!-- Display attendance details here -->

                        <div class="col-lg-12">
                        <div class="card card-info" id="display-details">

                        </div>
                    </div>
                
 <?php
                                    }else {
                                        ?> <div class="col-sm-12 ">
                                        <div class="col-sm-offset-1  text-center">
                                            <div class="four_zero_four_bg">
                                            </div>
                
                                            <div style="margin-top: 100px;" class="contant_box_404">
                                            <lottie-player src='<?php echo $regclose; ?>'  background='transparent'  speed='1'  style='width: 300px; height: 300px;margin: 20px auto;'  loop  autoplay></lottie-player>
                                                <h5>
                                                No Active Registration
                                                </h5>
                
                                                <p>Registration for <?php echo date('Y') ; ?> is now Closed!</p>
                
                
                
                
                                            </div>
                                        </div>
                                    </div>
                                    <?php
                                    }
                                    ?> 
                </div>
            </div>
            <!-- END CONTAINER FLUID -->
        </div>
        <!-- END PAGE CONTENT -->
        <?php include('../admin/includes/foot.php'); ?>
    </div>
    <!-- END PAGE CONTENT WRAPPER -->
</div>
<!-- END PAGE CONTAINER -->

<!-- END QUICKVIEW-->

<?php include('../admin/includes/footer.php'); ?>




<?php

?>


    

    <script>
    $('#member-update');
    $('#member-update').on('submit', function(event){
        event.preventDefault();
        if ($('#member-update').parsley().isValid()){
            $.ajax({
                url: "process-update-member.php",
                method: "POST",
                data: new FormData(this),
                contentType: false,
                processData: false,
                beforeSend: function () {
                    $('#submit').attr('disabled', 'disabled');
                    $('#submit').val('Updating Details, Please Wait...');

                },

                success:function (data) {
                    $('#member-update').parsley().reset();
                    $('#submit').attr('disabled', false);
                    $('#submit').val('Update Member');
                    $('#success-msg').html(data);
                }
            })
        }

    })
</script>
    <!--        Delete Teacher Modal End-->


    <?php



?>



<script>
        $('#mark-add');
        $('#mark-add').on('submit', function(event){
            event.preventDefault();
            if ($('#mark-add').parsley().isValid()){
                $.ajax({
                    url: "<?php echo $base_url; ?>fetch-broad-details.php",
                    method: "POST",
                    data: new FormData(this),
                    contentType: false,
                    processData: false,
                    beforeSend: function () {
                        $('#mark').attr('disabled', 'disabled');
                        $('#mark').val('Fetching Details, Please Wait...');

                    },

                    success:function (data) {
                        $('#mark-add').parsley().reset();
                        $('#mark').attr('disabled', false);
                        $('#mark').val('Filter');
                        $('#display-details').html(data);
                    }
                })
            }

        })
    </script>


<script>
 

function myAmount() 
{
var x = document.getElementById("postcontent").value;
document.getElementById("demo").innerHTML = x.replace(/[.,]+/g, '');
}
</script>

<script>
    $(function (){
        $("#member").DataTable({
            "responsive": true, "lengthChange": false, "autowidth": true, "pageLength": 100, "deferRender": true
        }).buttons().container().appendTo('#member_wrapper .col-md-6:eq(0)');
    });


</script>

<script>
  function phoneAvailability(phoneInput){
        $.ajax({
         method:"POST",
         url: "php-script.php",
         data:{phone:phoneInput},
         success: function(data){
           $('#phoneStatus').html(data);
         }
       });
 }
</script>

<script>
  $(document).on('input','#phone',function(e){
    let phoneInput = $('#phone').val();
    let msg;
    if(phoneInput.length==0){
      msg="<span class='alert alert-danger' style='width: 100%;display: flex;margin-left: 5px;margin-right: 5px;' role='alert'><strong><i class='pg-icon'>spam </i></strong>&nbsp;<strong>Enter Phone Number</strong></span>";
    }else if((/^$|\s+/).test(phoneInput))
    {
     msg="<span class='alert alert-danger' style='width: 100%;display: flex;margin-left: 5px;margin-right: 5px;' role='alert'><strong><i class='pg-icon'>spam </i></strong>&nbsp;<strong>Phone Number Cannot Contain Spaces</strong></span>";
    }
    else if(phoneInput.length!=0 && (phoneInput.length <11 || phoneInput.length >11)){
      msg="<span class='alert alert-danger' style='width: 100%;display: flex;margin-left: 5px;margin-right: 5px;' role='alert'><strong><i class='pg-icon'>spam </i></strong>&nbsp;<strong>Phone Number Must Be Between 11 Characters</strong></span>";
    }else{
      phoneAvailability(phoneInput);
    }
    $('#phoneStatus').html(msg);
});
</script>
<?php
}else{
    ?>
    
    <script>
    const e = document.getElementById("notify");
    e.addEventListener("animationend", (ev) => {
        if (ev.type === "animationend") {
            e.style.display = "none";
        }
    }, false);
</script>


    
  <?php include('session.php'); ?>

    <?php

}

?>