Sindbad~EG File Manager
{% extends "neuro_backoffice/bo_layout.html" %} {% block title %}video{% endblock %} {% block content %}
<Style>
/* Parent Wrapper Element */
figure {
position: relative;
width: 100%;
height: 480px;
/* For responsive video */
/* padding-bottom: 56.25%;*/
/* padding-top: 25px; */
/* height: 0; */
}
/* Sibling Overlay Element */
figcaption {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1;
}
object {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
label {
display: inline-block;
margin-bottom: 0rem !important;
}
h6 {
margin-bottom: 0.2rem;
font-weight: 500;
line-height: 1.2;
}
figure {
/* position: relative; */
/* width: 100%; */
/* height: 480px; */
padding-bottom: 56.25%;
/* padding-top: 25px; */
/* height: 0; */
}
/***
code start
**/
</Style>
<header>
<div class="container bg-white">
<div class="row" style="display: flex;align-items: center;">
<div class="col-md-8">
<img src="/static/images/tnoa_logo.jpg" alt="TNOA 2023" height="140" width="auto">
<img src="/static/images/tricon_logo.JPG" alt="TNOA 2023" height="140" width="auto">
</div>
<div class="col-md-4 d-flex align-items-center">
<!--<h5 class="text-right">Video recording of the live program</h5>-->
<h5 class="text-right">Scientific Session Video Recordings</h5>
</div>
</div>
</div>
</header>
<div class="container sub">
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-12 text-left">
<label class="h5">Welcome {{data.prefix or ''}} {{data.full_name or ''}}</label>
{% set session_end_at = data.session_end_time %}
<input type="hidden" value="{{session_end_at}}" id="session_end_at" />
</div>
<div class="col-lg-5 col-sm-12 col-md-5 text-md-right text-center">
<div class="counter">
<span class='e-m-days' style="display:none;">0</span> Session logs off in
0<span class='e-m-hours'>{{diff_hour}}</span>:
<span class='e-m-minutes'>{{diff_minutes}}</span>:
<span class='e-m-seconds'>{{diff_seconds}}</span>
<span class='e-m-txt'></span> hours
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-12 text-right">
<a href="{{url_for('user.Logout')}}" class="btn btn-danger">Logout</a>
</div>
</div>
</div>
<div class="container bg-white">
<div class="row">
<!-- <div class="col-lg-4 col-md-4 col-sm-12 text-center mt-3" > </div> -->
<div class="col-lg-12 col-md-12 col-sm-12 text-center mt-3" style="padding: 0px 40px !important;">
<!-- code start -->
<table class="table table-bordered mt-3" style="font-size: 13px;background-color: #faf6f62e;">
<!-- <thead class="thead-dark">
<tr>
<th scope="col">S.No</th>
<th scope="col">Date</th>
<th scope="col">Hours</th>
</tr>
</thead> -->
<tbody >
{% if day_index :%}
{% set total = 0 %}
{% for key, value in groupby(day_index,key = itemgetter('hall')): %}
<tr >
<td colspan="3"><span style="color:red;"><h3>Day {{program_day}} - Hall {{key}}</h3></span> </td>
</tr>
<tr class="thead-dark">
<th data-label="S.NO">S.NO</th>
<th data-label="Session Name">Session Name</th>
<th data-label="Date"></th>
</tr>
{% for k in value: %}
<tr>
<td>{{loop.index}}</td>
<td><a href="{{url_for('user.ViewVideo',video_id=k.video_id,program_day=program_day,user_id=enc_user_id)}}">{{k.video_name | safe}}<br/>
<span style="color:red;">{{k.session_date.strftime('%d-%b-%Y')}} ( {{k.session_date.strftime('%A')}} ) {{k.session_time or '' }}</span>
</a>
</td>
<td>
<a title="Play" href="{{url_for('user.ViewVideo',video_id=k.video_id,program_day=program_day,user_id=enc_user_id)}}">
<img src="/static/images/play_button.png" width="45" />
</a>
</td>
</tr>
{% endfor %}
{% endfor %}
{% else : %}
<tr>
<td colspan="5">No data available</td>
</tr>
{% endif %}
</tbody>
</table>
<a class="btn btn-danger" href="{{url_for('user.DayIndex',user_id =enc_user_id)}}"> <i class="fa fa-arrow-left "> </i>Back</a>
<!-- code end -->
<!-- {% if day_index : %}
{% for row in day_index : %}
{% if loop.index % 2 == 0: %}
<a class="btn btn-primary mt-3 mb-3" href="" style="border-radius: 5px;">
{% if row.program_day : %}
Day {{row.program_day | safe}} : {{row.session_date.strftime("%d-%m-%Y") or '' }} <i class="fa fa-arrow-right ml-5"> </i>
{% endif %}
</a>
<br/>
{% elif loop.index % 3 == 0: %}
<a class="btn btn-warning mt-3 mb-3" href="" style="border-radius: 5px;">
{% if row.program_day : %}
Day {{row.program_day | safe}} : {{row.session_date.strftime("%d-%m-%Y") or '' }} <i class="fa fa-arrow-right ml-5"> </i>
{% endif %}
</a>
<br/>
{% else :%}
<a class="btn btn-success mt-3 mb-3" href="" style="border-radius: 5px;">
{% if row.program_day : %}
Day {{row.program_day | safe}} : {{row.session_date.strftime("%d-%m-%Y") or '' }} <i class="fa fa-arrow-right ml-5"> </i>
{% endif %}
</a>
{% endif %}
{% endfor %}
{% else : %}
Records does not exist.
{% endif %} -->
<br/>
<!-- <a href="https://forms.gle/SEYyfAcXUAxsG5Y59" target="_blank"><h4><span style="color:#000000 !important;">Please take a moment to attempt this self-assessment quiz,</span><span style="color:#950d3c !important;"> by clicking here</span> </h4></a>
-->
</div>
<!-- <div class="col-lg-4 col-md-4 col-sm-12 text-center mt-3" > </div> -->
</div>
{% if day_index :%}
{% for row in day_index : %}
<div class="row mt-1 text-center">
{% for mesg in get_flashed_messages(category_filter=["successMsg"]) %}
<div class="alert alert-success text-align-center successMessage alert-dismissible" >
<p class="close" data-dismiss="alert" aria-label="close">×</p>
<h6>{{ mesg|safe }}</h6>
</div>
{% endfor %}
{% for mesg in get_flashed_messages(category_filter=["errorMsg"]) %}
<div class="alert alert-danger text-align-center successMessage" id="successMessage">
<p class="close" data-dismiss="alert" aria-label="close">×</p>
<h6>{{ mesg|safe }}</h6>
</div>
{% endfor %}
</div>
{% endfor %}
{% else %}
<div class="row mt-1">
No Videos
</div>
{% endif %}
<!-- <br />
<div class="row my-3 p-2">
<div class="col text-center">
<a href="{{url_for('user.Logout')}}" class="btn btn-danger">Logout</a>
</div>
</div> -->
</div>
{% endblock %}
{% block script %}
<script type="text/javascript" language="javascript">
var BaseUrl = document.location.origin;
$(document).ready(function()
{
$(function() {
function getCounterData(obj) {
var days = parseInt($('.e-m-days', obj).text());
var hours = parseInt($('.e-m-hours', obj).text());
var minutes = parseInt($('.e-m-minutes', obj).text());
var seconds = parseInt($('.e-m-seconds', obj).text());
return seconds + (minutes * 60) + (hours * 3600) + (days * 3600 * 24);
}
function setCounterData(s, obj) {
var days = Math.floor(s / (3600 * 24));
var hours = Math.floor((s % (60 * 60 * 24)) / (3600));
var minutes = Math.floor((s % (60 * 60)) / 60);
var seconds = Math.floor(s % 60);
// console.log(days, hours, minutes, seconds);
if(minutes < 10)
{
minutes = ('0' + minutes).slice(-2);
// alert(minutes);
// minutes = "0"+minutes;
}
if(seconds < 10)
{
// alert(seconds);
seconds = ('0' + seconds).slice(-2);
// seconds = "0"+seconds;
}
$('.e-m-hours', obj).html(hours);
$('.e-m-minutes', obj).html(minutes);
$('.e-m-seconds', obj).html(seconds);
}
var count = getCounterData($(".counter"));
var timer = setInterval(function() {
count--;
if (count == 0) {
url_1 = BaseUrl+"/logout";
window.location = url_1;
// clearInterval(timer);
return;
}
setCounterData(count, $(".counter"));
}, 1000);
});
});
</script>
{% endblock %}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists