Sindbad~EG File Manager

Current Path : /home/numerotech/hs.numerotech.com/scan_v1/core/templates/conferenceapp/
Upload File :
Current File : //home/numerotech/hs.numerotech.com/scan_v1/core/templates/conferenceapp/portal_access_report.html

{% extends "conferenceapp/layout.html" %} {% block style %} {% endblock %} {% block content %}

<div class="container">
    <div class="row">
        <div class="col-lg-12 col-md-12 col-sm-12 mt-2">
            <h2 class="text-center">Portal Access Report</h2>
        </div>
        <div class="col-lg-12 col-md-12 col-sm-12">
            <a class="btn btn-danger float-right mt-2" type="button" id="back" href="{{ url_for('confapp.BackToHome') }}">Back</a>
        </div>
    </div>
    <div class="row text-center">
        <div class="col-lg-4 col-md-12 col-sm-12">
            <label>Conference Name</label><br />
            <select name="Conference_name" id="Conference_name" class="form-control">
                <option value="" id="select">Select Conference Name </option>
                {% if conference_data %} {% for row in conference_data %}
                <option value="{{row.conf_id}}" id="conf_name">{{row.conf_name}}</option>
                {% endfor %} {% endif %}
            </select>
        </div>
        <div class="col-lg-4 col-md-12 col-sm-12">
            <label>Start Date</label><br />
            <input class="form-control" type="date" id="start_date" name="start_date" value="{{current_dt}}"/>
        </div>
        <div class="col-lg-4 col-md-12 col-sm-12">
            <label>End Date</label><br />
            <input class="form-control" type="date" id="end_date" name="end_date"  value="{{current_dt}}"/>
        </div>
        <div class="col-lg-12 col-md-12 col-sm-12 mt-3 text-center ">
        
            <button type="button" id="get_portal_detail" class="btn btn-primary">Get Details</button>
            <button type="button" class="btn btn-info ml-3" id="view_max_count" name="view_max_count" title="Click to verify google sheet"> Click to verify Google Sheet </button>
        </div>
    </div>
    <br />
    <div  id="portal_access_index"></div>
</div>
<br />

<div  id="view_max_count_div"></div>


{% endblock %} {% block bottomscript %}
<script type="text/javascript">
    var BaseUrl = document.location.origin;

    $(document).ready(function () {
        $("view_max_count_div").hide();
    });


    $(document).on("click", "#view_max_count", function (e) {
        e.preventDefault();
        ShowProgress();
        $.ajax({
            type: "GET", // <-- get method of form
            url: BaseUrl + "/get_all_conf_delegate_no", // <-- get action of form
            dataType: "html",
            success: function (data) {
                StopProgress();
                var data_1 = JSON.parse(data);
                var status = data_1.status;
                var msg = data_1.msg;
                var html_data = data_1.html_data;
                if (status == 1) {
                    $("#portal_access_index").hide();
                    $("#view_max_count_div").show();
                    $("#view_max_count_div").empty();
                    $("#view_max_count_div").html(html_data);
                } else {
                    return false;
                }
            },
        });
    });


    $(document).on("click", "#get_portal_detail", function (e) {
        e.preventDefault();
        var start_date = $("#start_date").val();
        var end_date = $("#end_date").val();
        var conf_id = $("#Conference_name").val();
        var url = BaseUrl + "/portal_access_report_index_page";


    if (start_date <= end_date){
        $.ajax({
            type: "GET", // <-- get method of form
            url: url, // <-- get action of form
            data: { "start_date": start_date, "end_date": end_date, "conf_id": conf_id },
            dataType: "html",
            success: function (data) {
                // alert(data.msg);
                // alert(data);
                var data_1 = JSON.parse(data);
                var status = data_1.status;
                var msg = data_1.msg;
                var html_data = data_1.html_data;
                if (status == 1) {
                    $("#portal_access_index").show();
                    $("#portal_access_index").html(html_data);
                } else {
                    return false;
                }
            },
        });

    } 
    else{
        alert("Please enter end date must be greater then start date")
            }

    });



    function ShowProgress()
{
    var text = 'loading data.. please wait..';

    if(jQuery('body').find('#resultLoading').attr('id') != 'resultLoading'){
     jQuery('body').append('<div id="resultLoading" style="display:none"><div><img src="'+document.location.origin+'/static/images/ajax-loader.gif"><div>'+text+'</div></div><div class="bg"></div></div>');
     // jQuery('body').append('<div id="resultLoading" style="display:none"><div><div>'+text+'</div></div><div class="bg"></div></div>');
     }

    jQuery('#resultLoading').css({
        'width':'100%',
        'height':'100%',
        'position':'fixed',
        'z-index':'10000000',
        'top':'0',
        'left':'0',
        'right':'0',
        'bottom':'0',
        'margin':'auto'
    });

    jQuery('#resultLoading .bg').css({
        'background':'#000000',
        'opacity':'0.7',
        'width':'100%',
        'height':'100%',
        'position':'absolute',
        'top':'0'
    });

    jQuery('#resultLoading>div:first').css({
        'width': '250px',
        'height':'75px',
        'text-align': 'center',
        'position': 'fixed',
        'top':'0',
        'left':'0',
        'right':'0',
        'bottom':'0',
        'margin':'auto',
        'font-size':'16px',
        'z-index':'10',
        'color':'#ffffff'

    });

    jQuery('#resultLoading .bg').height('100%');
       jQuery('#resultLoading').fadeIn(300);
    jQuery('body').css('cursor', 'wait');
}

function StopProgress()
{
    jQuery('#resultLoading .bg').height('100%');
       jQuery('#resultLoading').fadeOut(300);
    jQuery('body').css('cursor', 'default');
}
    
</script>
{% endblock %}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists