98681548c9
Filter Option
109 lines
3.2 KiB
PHP
109 lines
3.2 KiB
PHP
<?php include 'include/header.php';?>
|
|
|
|
|
|
<!-- sidebar-menu end-->
|
|
<!--=============== wrapper ===============-->
|
|
<div id="wrapper">
|
|
<!-- content-holder -->
|
|
<div class="content-holder">
|
|
<!-- content -->
|
|
<div class="content full-height">
|
|
<div class="error-wrap">
|
|
<div class="container">
|
|
|
|
<br>
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<div class="content-wrap about-wrap">
|
|
<h5 id="semesterEvent" class="bold-title">Department</h5>
|
|
<span class="bold-separator"></span>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3 getDepartment">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="partcile-dec" data-parcount="200"></div>
|
|
</div>
|
|
<!--=============== content-footer ===============-->
|
|
|
|
<!-- content-footer end -->
|
|
</div>
|
|
<!-- content-holder end -->
|
|
</div>
|
|
<!-- wrapper end -->
|
|
<?php include 'include/footer.php';?>
|
|
<script>
|
|
var base_path=$('body').attr('data-path');
|
|
$(document).ready(function()
|
|
{
|
|
var sessionId=$('#hiddenSession').attr('data-hid');
|
|
//console.log("sId",sessionId);
|
|
if(sessionId==null || sessionId=="")
|
|
{
|
|
var defaultId=$('.setValue').attr('data-defaltid');
|
|
var defaultName=$('.setValue').attr('data-defaltname');
|
|
var defaultYear=$('.setValue').attr('data-defaltyear');
|
|
var defaultData=defaultName+' - '+defaultYear;
|
|
|
|
//get department using defaultId
|
|
var url=base_path+"Welcome/getDepartment";
|
|
$.post(url,{data:defaultData,defaultId:defaultId,csrf_test_name:$.cookie('csrf_cookie_name')},function(departmentResult)
|
|
{
|
|
var result=departmentResult;
|
|
$('.getDepartment').html(result);
|
|
});
|
|
}
|
|
else
|
|
{
|
|
var sessionId=$('#hiddenSession').attr('data-hid');
|
|
var sessionNameYear=$('#hiddenSession').attr('data-session');
|
|
var fields=sessionNameYear.split("-");
|
|
var sessionName = fields[0];var sessionYear = fields[1];
|
|
|
|
var url=base_path+"Welcome/sessionGetDepartment";
|
|
$.post(url,{sessionId:sessionId,sessionNameYear:sessionNameYear,defaultId:defaultId,csrf_test_name:$.cookie('csrf_cookie_name')},function(departmentResult)
|
|
{
|
|
var result=departmentResult;
|
|
$('.getDepartment').html(result);
|
|
$('.setValue').attr('data-defaltId' ,sessionId );
|
|
$('.setValue').attr('data-defaltName' ,sessionName );
|
|
$('.setValue').attr('data-defaltYear' ,sessionName );
|
|
$('.setValue').html(sessionNameYear);
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script>
|
|
var base_path=$('body').attr('data-path');
|
|
$(".semesterEvent").on('click', function() {
|
|
|
|
var clickId=$(this).attr('data-id');
|
|
var clickYear=$(this).attr('data-year');
|
|
var clickName=$(this).attr('data-name');
|
|
var nameYear=clickName+' - '+clickYear;
|
|
//Static Sem
|
|
$('.setValue').attr('data-defaltId' ,clickId );
|
|
$('.setValue').attr('data-defaltName' ,clickName );
|
|
$('.setValue').attr('data-defaltYear' ,clickYear );
|
|
$('.setValue').html(nameYear);
|
|
|
|
var sessionId=$('#hiddenSession').attr('data-hid');
|
|
//Get Department
|
|
var url=base_path+"Welcome/getDepartmentClick";
|
|
//alert(sessionId);
|
|
$.post(url,{sessionId:sessionId,nameYear:nameYear,clickId:clickId,csrf_test_name:$.cookie('csrf_cookie_name')},function(departmentResult)
|
|
{
|
|
var result=departmentResult;
|
|
$('.getDepartment').html(result);
|
|
window.location.href=base_path;
|
|
});
|
|
});
|
|
</script>
|