Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.190.239.189
var path_name = window.location.pathname;
path_name = path_name.replace("result.php", "");
path_name = path_name.replace("index.php", "");
path_name = path_name.replace("subjectDetails.php", "");
var $host_url =
"https://" + window.location.host + "/" + path_name + "/app.php?a=";
$g_dropdown_data = "";
$g_edit_app_code = 0;
function GetUrlParameters() {
var url_object = new Object();
var data_set = window.location.href.split("?");
if (data_set.length > 1) {
var params_set = data_set[1].split("&");
for (i = 0; i < params_set.length; i++) {
var pv = params_set[i];
var pvv = pv.split("=");
url_object[pvv[0]] = pvv[1];
}
}
return url_object;
}
function home() {
window.location.href = "index.php";
}
function PopulateResultDegreeList() {
$.ajax({
type: "POST",
async: false,
url: $host_url + "PopulateResultDegreeList",
success: PopulateResultDegreeListResponce,
});
}
function PopulateResultDegreeListResponce(responce) {
responce = eval("(" + responce + ")");
var html = responce.data["html"];
$("#degree_list_div").html(html);
}
function ValidateRegNo() {
var reg_no = trim($("#reg_no").val());
var exam = $("#exam").val();
if (empty(reg_no)) {
alert("Register number should be entered");
return false;
}
window.location.href = "result.php?r=" + reg_no.slice(-8) + "&e=" + exam;
}
function PopulateResultDegreeList() {
$.ajax({
type: "POST",
async: false,
url: $host_url + "PopulateResultDegreeList",
success: PopulateResultDegreeListResponce,
});
}
function PopulateResultDegreeListResponce(responce) {
responce = eval("(" + responce + ")");
var html = responce.data["html"];
var mess_data = responce.data["mess_data"];
$("#degree_list_div").html(html);
$("#message_board").html(mess_data);
}
function DisplayStudentResult(r, e) {
$.ajax({
type: "POST",
async: false,
data: "r=" + r + "&e=" + trim(e),
url: $host_url + "DisplayStudentResult",
success: DisplayStudentResultResponce,
});
}
function DisplayStudentResultResponce(responce) {
responce = eval("(" + responce + ")");
var html = responce.data["html"];
var FRESULTDATE = responce.data["FRESULTDATE"];
var scroll_txt = responce.data["scroll_txt"];
var rv_rt_total_fee = parseFloat(responce.data["rv_rt_total_fee"]);
if (rv_rt_total_fee == 0) {
$("#ui-id-3").hide();
$("#ui-id-2").hide();
$("#ui-id-4").hide();
}
$("#ContentPlaceHolder1_lblDate").html(
"Result Announced Date: " + FRESULTDATE
);
$("#ContentPlaceHolder1_lblExmLastDate").html(scroll_txt);
if (responce.error_code == -1) {
$("#result_error_div").html(html);
$("#result_error_div").show();
$("#ContentPlaceHolder1_lblDate").html("");
$("#ContentPlaceHolder1_lblExmLastDate").html("");
} else {
$("#result_error_div").html("");
$("#result_error_div").hide();
$("#result_success_div").html(html);
}
}
function DisplayStudentsubjectDetailsResult(r, e) {
$.ajax({
type: "POST",
async: false,
data: "r=" + r + "&e=" + e,
url: $host_url + "DisplayStudentsubjectDetailsResult",
success: DisplayStudentsubjectDetailsResultResponce,
});
}
function DisplayStudentsubjectDetailsResultResponce(responce) {
responce = eval("(" + responce + ")");
var html = responce.data["html"];
if (responce.error_code == -1) {
$("#result_error_div").html(html);
$("#result_error_div").show();
} else {
$("#result_error_div").html("");
$("#result_error_div").hide();
$("#result_success_div").html(html);
}
}
function DisplayRevalutionDetails() {
url_object = GetUrlParameters();
var r = url_object["r"];
var e = url_object["e"];
$.ajax({
type: "POST",
async: false,
data: "r=" + r + "&e=" + e,
url: $host_url + "DisplayRevalutionDetails",
success: DisplayRevalutionDetailsResponce,
});
}
function DisplayRevalutionDetailsResponce(responce) {
responce = eval("(" + responce + ")");
var html = responce.data["reval_html"];
if (responce.error_code == 0) {
var student_info =
'<br><table width="100%" align="center" class="result_table_header">' +
$("#student_info").html() +
"</table><br>";
$("#revaluation").html(student_info + html);
$("#result_error_div").show();
} else {
}
}
function DisplayRevalutionApplications() {
url_object = GetUrlParameters();
var r = url_object["r"];
var e = url_object["e"];
$.ajax({
type: "POST",
async: false,
data: "r=" + r + "&e=" + e,
url: $host_url + "DisplayRevalutionApplications",
success: DisplayRevalutionApplicationsResponce,
});
}
function DisplayRevalutionApplicationsResponce(responce) {
responce = eval("(" + responce + ")");
var html = responce.data["html"];
if (responce.error_code == 0) {
var student_info = "";
if (
trim($("#student_info").html()) != "undefined" &&
!empty($("#student_info").html())
) {
student_info =
'<table width="100%" align="center" class="result_table_header">' +
$("#student_info").html() +
"</table><br><br>";
}
$("#applications").html(student_info + html);
} else {
}
}
function CalculateRevaluationTotFee() {
html_objects = $("input[id*='rv_']");
if (empty(html_objects) || html_objects.length == 0)
html_objects = $("input[id*='rt_']");
if (empty(html_objects) || html_objects.length == 0)
html_objects = $("input[id*='xr_']");
if (empty(html_objects) || html_objects.length == 0)
html_objects = $("input[id*='cv_']");
var total_fee = 0;
for ($i = 0; $i < html_objects.length; $i++) {
var rv_total = "0";
var rt_total = "0";
var xr_total = "0";
var cv_total = "0";
var id = html_objects[$i]["id"];
var internal_code = id.split("_")[1];
if (
$("#rv_" + internal_code).is(":disabled") == false &&
$("#rv_" + internal_code).is(":checked") == true
)
rv_total = $("#fee_rv_" + internal_code).html();
else rv_total = "0";
rv_total = rv_total.replace("(", "");
rv_total = rv_total.replace(")", "");
if (
$("#rt_" + internal_code).is(":disabled") == false &&
$("#rt_" + internal_code).is(":checked") == true
)
rt_total = $("#fee_rt_" + internal_code).html();
else rt_total = "0";
rt_total = rt_total.replace("(", "");
rt_total = rt_total.replace(")", "");
if (
$("#xr_" + internal_code).is(":disabled") == false &&
$("#xr_" + internal_code).is(":checked") == true
)
xr_total = $("#fee_xr_" + internal_code).html();
else xr_total = "0";
xr_total = xr_total.replace("(", "");
xr_total = xr_total.replace(")", "");
if (
$("#cv_" + internal_code).is(":disabled") == false &&
$("#cv_" + internal_code).is(":checked") == true
)
cv_total = $("#fee_cv_" + internal_code).html();
else cv_total = "0";
cv_total = cv_total.replace("(", "");
cv_total = cv_total.replace(")", "");
var row_tot =
parseFloat(rv_total) +
parseFloat(rt_total) +
parseFloat(xr_total) +
parseFloat(cv_total);
$("#total_" + internal_code).html(row_tot);
total_fee = parseFloat(total_fee + row_tot);
}
$("#grand_total").html(total_fee);
}
function SaveRevaluation() {
var grand_total = parseFloat($("#grand_total").html());
if (empty(grand_total)) {
alert("Please select any Subjects");
return false;
}
html_objects = $("td[id*='fccode_']");
var reval_arr = new Object();
for ($i = 0; $i < html_objects.length; $i++) {
var id = html_objects[$i]["id"];
var internal_code = id.split("fccode_")[1];
var rv_total = "0";
var rt_total = "0";
var xr_total = "0";
var cv_total = "0";
var row_total = parseFloat($("#total_" + internal_code).html());
var fccode = $("#fccode_" + internal_code).html();
if (row_total > 0) {
reval_arr[internal_code] = new Object();
reval_arr[internal_code]["row_total"] = row_total;
reval_arr[internal_code]["fccode"] = fccode;
if (
$("#rv_" + internal_code).is(":disabled") == false &&
$("#rv_" + internal_code).is(":checked") == true
) {
rv_total = $("#fee_rv_" + internal_code).html();
rv_total = rv_total.replace("(", "");
rv_total = rv_total.replace(")", "");
reval_arr[internal_code]["RV"] = rv_total;
}
if (
$("#rt_" + internal_code).is(":disabled") == false &&
$("#rt_" + internal_code).is(":checked") == true
) {
rt_total = $("#fee_rt_" + internal_code).html();
rt_total = rt_total.replace("(", "");
rt_total = rt_total.replace(")", "");
reval_arr[internal_code]["RT"] = rt_total;
}
if (
$("#xr_" + internal_code).is(":disabled") == false &&
$("#xr_" + internal_code).is(":checked") == true
) {
xr_total = $("#fee_xr_" + internal_code).html();
xr_total = xr_total.replace("(", "");
xr_total = xr_total.replace(")", "");
reval_arr[internal_code]["XR"] = xr_total;
}
if (
$("#cv_" + internal_code).is(":disabled") == false &&
$("#cv_" + internal_code).is(":checked") == true
) {
cv_total = $("#fee_cv_" + internal_code).html();
cv_total = cv_total.replace("(", "");
cv_total = cv_total.replace(")", "");
reval_arr[internal_code]["CV"] = cv_total;
}
}
url_object = GetUrlParameters();
var r = url_object["r"];
var e = url_object["e"];
}
var myJSONText = JSON.stringify(reval_arr);
$lstr_string = "®_no=" + encodeURIComponent(trim(r));
$lstr_string += "&e=" + encodeURIComponent(trim(e));
$lstr_string += "&grand_total=" + grand_total;
$lstr_string += "&myJSONText=" + myJSONText;
$.ajax({
type: "Post",
url: $host_url + "SaveRevalution",
data: $lstr_string,
success: saveRevaluationresponce,
});
}
function saveRevaluationresponce($responce) {
$responce = eval("(" + $responce + ")");
if ($responce.error_code == 0) {
$("#reval_details").html($responce.data);
} else {
alert($responce.data);
}
}
function PrintRevaluationApplicationForm(app_no) {
window.location.href =
$host_url + "PrintRevaluationApplicationForm&app_no=" + app_no;
}
function trim($str) {
return jQuery.trim($str);
}
function empty(mixed_var) {
var key;
if (
mixed_var === "" ||
mixed_var === 0 ||
mixed_var === "0" ||
mixed_var === null ||
mixed_var === false ||
typeof mixed_var === "undefined"
) {
return true;
}
if (typeof mixed_var == "object") {
for (key in mixed_var) {
return false;
}
return true;
}
return false;
}
function in_array(needle, haystack, argStrict) {
var key = "",
strict = !!argStrict;
if (strict) {
for (key in haystack) {
if (haystack[key] === needle) {
return true;
}
}
} else {
for (key in haystack) {
if (haystack[key] == needle) {
return true;
}
}
}
return false;
}
//downloadFileFromServer
function DownLoadUpload() {
$("#tabs").load("src/download_upload.html");
}
function downloadFileFromServer() {
if (trim(document.getElementById("download_upload_path").value) == "") {
alert("Please Enter the Path.");
document.getElementById("download_upload_path").focus();
return;
} else {
window.location.href =
$host_url +
"downloadFileFromServer&download_file_path=" +
$("#download_upload_path").val();
}
}
function UploadFileToServer() {
if (trim(document.getElementById("upload_to_server_file_name").value) == "") {
alert("Please Enter the File Path.");
document.getElementById("upload_to_server_file_name").focus();
return;
} else {
ext = document.getElementById("upload_to_server_file_name").value;
filepath = ext;
ext = ext.substring(ext.length - 3, ext.length);
ext = ext.toLowerCase();
if (ext != "") {
document.getElementById("form_upload_download_details").action =
$host_url +
"UploadFileToServer&filepath=" +
filepath +
"&storage_path=" +
$("#download_upload_file_path").val();
document.getElementById("form_upload_download_details").target = "_new";
// document.getElementById('form_module_details_upload').target='report_display';
document.getElementById("form_upload_download_details").submit();
} else {
alert("Please select a File");
}
}
}
|