Sindbad~EG File Manager
{% extends 'conference/conf_layout.html' %}
{% block head %}
{% endblock %}
{% block main %}
{% for mesg in get_flashed_messages(category_filter=["successMsg"]) %}
<div class="alert alert-success text-center alert-dismissible" id="successMessage">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<h4><img src="/static/images/right.png" alt="right" height="21" width="21">{{ mesg }}</h4>
</div>
{% endfor %}
{% for mesg in get_flashed_messages(category_filter=["errorMsg"]) %}
<div class="alert alert-danger text-center alert-dismissible" id="errorMessage">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<h4><img src="/static/images/wrong_img.png" alt="wrong" height="21" width="21">{{ mesg }}</h4>
</div>
{% endfor %}
<div class="container border border-secondary rounded mt-4 p-1">
<div class="btn-group btn-block gap-1">
<button class="col bg-success text-white text-center border border-sucess rounded p-2 status_button btn-active" data-status="all_conference" id="active_btn">
<h5 class="font-weight-bold">All</h5>
<b>{{count.total_conf}}</b>
</button>
<button class="col bg-info text-white text-center border border-info rounded p-2 status_button" data-status="upcoming" id="all_btn">
<h5 class="font-weight-bold">Upcoming</h5>
<b>{{count.upcoming_conf}}</b>
</button>
<button class="col bg-secondary text-white text-center border border-secondary rounded status_button" data-status="past" id="inactive_btn">
<h5 class="font-weight-bold">Past</h5>
<b>{{count.past_conf}}</b>
</button>
<button class="col bg-warning text-white text-center border border-warning rounded p-2 status_button" data-status="inactive" id="inactive_btn">
<h5 class="font-weight-bold">Inactive</h5>
<b>{{count.inactive_conf}}</b>
</button>
<button class="col bg-info text-white text-center border border-info rounded p-2 status_button" data-status="incompleted" id="inactive_btn">
<h5 class="font-weight-bold">Incompleted</h5>
<b>{{count.incompleted_conf}}</b>
</button>
</div>
</div><br>
<div class="container">
<input type="hidden" id="upcoming_conf_count" value="{{count.upcoming_conf}}">
<input type="hidden" id="past_conf_count" value="{{count.past_conf}}">
<input type="hidden" id="inactive_conf_count" value="{{count.inactive_conf}}">
<input type="hidden" id="incompleted_conf_count" value="{{count.incompleted_conf}}">
<input type="hidden" id="all_conf_count" value="{{count.total_conf}}">
<div class="row">
<div class="col-md-6 header_status">
<h5 class="font-weight-bold"></h5>
</div>
<div class="col-md-6">
<div class="input-group float-right">
<input type="text" class="form-control search_text_1" name="search_text_1" id="search_text_1" placeholder="Search Delegate conf.here.." required>
</div>
</div>
</div>
<hr>
</div>
<div class="container">
<div class="row mt-4" id="search_contains_1">
{% for conf in conf_data %}
<div class="col-lg-4 col-md-4 col-sm-12 form-group all_conference
{% if conf.conf_status == 'upcoming_conf'%} upcoming
{% elif conf.conf_status == 'past_conf'%} past
{% elif conf.conf_status == 'inactive_conf'%} inactive
{% elif conf.conf_status == 'incompleted_conf'%} incompleted
{% endif %}
">
<div class="card h-90" style="max-width: 30rem;">
<div class="card-body" style="background-image: linear-gradient(to right, #c3dedf,#f4c1c1 , #e1beee);">
<div class="text-center mb-3">
{% if conf.mail_header_logo %}
<img class="card-img-top img-fluid" src="{{ conf.mail_header_logo }}" style="width: auto; max-width: 100%; height: 70px;">
{% else %}
<img src="/static/images/no_image.jpg" class="card-img-top img-fluid" width="auto" style="width: auto; height: 70px;" alt="image">
{% endif %}
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<p class="card-text"><span class="text-secondary font-weight-bold"></span><span class="font-weight-bold">{{ conf.conf_name }}</span></p>
</div>
</div>
<div class="row">
<div class="col-md-6 col-md-6 col-sm-12" >
{% if conf.u_user_uuid: %}
<a target="_blank"
class="btn btn-link"
style="text-decoration: none;"
id="conf_auto_login"
data-confid_{{conf.conf_id}}="{{conf.conf_id}}"
data-confkey_{{conf.conf_id}}="{{conf.conf_key}}"
data-uuid_{{conf.conf_id}}="{{conf.u_user_uuid}}"
data-linkurl_{{conf.conf_id}}="https://conf.numerotech.com"
title="Autologin" onclick="conf_auto_login('{{conf.conf_id}}','{{conf.u_user_uuid}}')" >
<span style="font-size:12px !important;">User link</span>
</a>
<i class="fa-solid fa-copy copy_conf_login text-primary" onclick="copy_conf_login('{{conf.conf_id}}')" style="font-size:12px !important;"></i>
{% else :%}
<a target="_blank"
class="btn btn-link"
style="text-decoration: none;"
id="conf_auto_login"
data-confid_{{conf.conf_id}}="{{conf.conf_id}}"
data-confkey_{{conf.conf_id}}="{{conf.conf_key}}"
data-society_{{conf.conf_id}}="{{conf.society_id}}"
data-linkurl_{{conf.conf_id}}="https://conf.numerotech.com"
title="Autologin" onclick="conf_auto_login_insert_user('{{conf.conf_id}}')" >
<span style="font-size:12px !important;">User link</span>
</a>
<i class="fa-solid fa-copy copy_conf_login text-primary" onclick="copy_conf_login('{{conf.conf_id}}')" style="font-size:12px !important;"></i>
{% endif %}
</div>
<div class="col-lg-6 col-md-6 col-sm-12 mt-3">
{% set remining_days = Helper.get_days(conf.conf_start_time) %}
{% if remining_days|int > 0 %}
<p id="remining_days_{{conf.conf_id}}" style="font-size:13px;font-weight: bold;">
<span style="font-size:13px;color: red;">{{remining_days}} </span><span style="font-size:10px;">Days to go </span></p>
{% else %}
{% if conf.conf_status == 'inactive_conf'%}
<p style="color:red;font-size:10px;font-weight: bold;">
Inactive Conference</p>
{% elif conf.conf_status == 'incompleted_conf'%}
<p style="color:red;font-size:10px;font-weight: bold;">
Incompleted Conference</p>
{% else %}
<p style="color:red;font-size:10px;font-weight: bold;">
Conference closed</p>
{% endif %}
{% endif %}
</div>
</div>
<div class="border p-1 mt-2">
<div class="row text-center">
<div class="col-lg-6 col-md-12 col-sm-12">
<h6 class="text-secondary" style="font-size: xx-small;">Conf Start On:<br><span style="color:black;font-size: x-small;">
{% if conf.conf_start_time %}<b>{{ conf.conf_start_time.strftime("%d %b, %Y") or '' }} </b> {% endif %}
</span></h6>
</div>
<div class="col-lg-6 col-md-12 col-sm-12">
<h6 class="text-secondary" style="font-size: xx-small;">Conf End On:<br> <span style="color:black;font-size: x-small;">
{% if conf.conf_end_time %}<b>{{ conf.conf_end_time.strftime("%d %b, %Y") or '' }} </b> {% endif %}
</span></h6>
</div>
</div>
</div>
<div class="border mt-2 ">
<div class="row justify-content-center d-flex align-items-center mb-2" >
{% if conf.app_name_list and conf.app_icon_list and conf.main_domain_list %}
{% set app_names = conf.app_name_list.split(',') %}
{% set app_icons = conf.app_icon_list.split(',') %}
{% set main_domains = conf.main_domain_list.split(',') %}
{% set app_color = conf.app_color_list.split(',') %}
{% for i in range(0, [app_names | length, app_icons | length, main_domains | length, app_color | length] | min) %}
{% set conf_parmeters = conf.conf_id ~ '/' ~ conf.conf_key %}
<div class="col-lg-4 col-md-4 col-sm-12 mt-2 pr-2">
<a href="{{ main_domains[i].strip() }}{{conf_parmeters}}" target="_blank" class="btn">
<i class="{{ app_icons[i].strip() }}"></i><span style="font-size:10px;">{{ app_names[i].strip() }}</span>
</a>
</div>
{% endfor %}
{% else %}
<p class="text-center mt-4">No items available</p>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}
{% block script %}
<script>
var BaseUrl = document.location.origin;
$(document).ready(function() {
var all_conf_count = $("#all_conf_count").val();
$(".header_status h5").html("All Coference App - COUNT("+ all_conf_count +")");
});
$(document).ready(function(){
$("#search_text_1").on("keyup", function() {
var value = $(this).val().toLowerCase();
$("#search_contains_1").children().each(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);
})
});
});
function conf_auto_login(conf_id,uuid){
var conf_key = $('[data-confkey_' + conf_id + ']').attr("data-confkey_" + conf_id);
var link_url = $('[data-linkurl_' + conf_id + ']').attr("data-linkurl_" + conf_id);
// var uuid = $('[data-uuid_' + conf_id + ']').attr("data-uuid_" + conf_id);
var link_url = link_url+"/"+conf_id+"/"+conf_key;
var link_open = link_url+"/at/"+uuid+"/"+($.now()+60000*1);
window.open(link_open,'_blank');
return false;
};
function copy_conf_login(conf_id){
var conf_key = $('[data-confkey_' + conf_id + ']').attr("data-confkey_" + conf_id);
var link_url = $('[data-linkurl_' + conf_id + ']').attr("data-linkurl_" + conf_id);
var link_url = link_url+"/"+conf_id+"/"+conf_key;
var copyText = link_url
var copyText_1 = 'Conference app link';
document.addEventListener('copy', function(e) {
e.clipboardData.setData('text/plain', copyText);
e.preventDefault();
}, true);
document.execCommand('copy');
console.log('copied text : ', copyText);
alert(copyText_1+' copied');
};
$(".status_button").click(function(){
var upcoming_count = $("#upcoming_conf_count").val();
var past_count = $("#past_conf_count").val();
var inactive_count = $("#inactive_conf_count").val();
var incompleted_count = $("#incompleted_conf_count").val();
var all_conf_count = $("#all_conf_count").val();
if( $(this).attr('data-status') == 'upcoming'){
$(".all_conference").hide();
$(".upcoming").show();
$(".header_status h5").html("Upcoming Coference App - COUNT("+ upcoming_count +")");
}
if( $(this).attr('data-status') == 'past'){
$(".all_conference").hide();
$(".past").show();
$(".header_status h5").html("Past Coference App - COUNT("+ past_count +")");
}
if( $(this).attr('data-status') == 'inactive'){
$(".all_conference").hide();
$(".inactive").show();
$(".header_status h5").html("Inactive Coference App - COUNT("+ inactive_count +")");
}
if( $(this).attr('data-status') == 'incompleted'){
$(".all_conference").hide();
$(".incompleted").show();
$(".header_status h5").html("Incompleted Coference App - COUNT("+ incompleted_count +")");
}
if( $(this).attr('data-status') == 'all_conference'){
$(".all_conference").show();
$(".header_status h5").html("All Coference App - COUNT("+ all_conf_count +")");
}
});
function conf_auto_login_insert_user(conf_id){
var society_id = $('[data-society_' + conf_id + ']').attr("data-society_" + conf_id);
$.ajax({
type:'POST',
url:BaseUrl+"/insert_user_data_by_society_id",
data:{'conf_id':conf_id,'society_id':society_id},
success:function(reposnse){
var data_1 = JSON.parse(reposnse);
var msg = data_1.msg;
var status = data_1.status;
var uesr_uuid = data_1.uesr_uuid;
if(status == 1){
conf_auto_login(conf_id,uesr_uuid);
return true;
}
else
{
alert(msg);
return false;
}
}
});
};
</script>
{% endblock %}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists