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 : 3.14.249.191
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("student.php","");
path_name=path_name.replace("payment_gate_way_responce.php","");
var $host_url="http://"+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 date_format($str)
{
if(trim($str)=="" || $str=="undefined")
$date="0000-00-00";
else
{
var indx=$str.indexOf("/");
if(indx==-1)
return $str;
else
{
$date=$str.split('/');
return($date[2] +'-'+$date[1]+'-'+$date[0]);
}
}
}
function home()
{
var Backlen=history.length;
history.go(-Backlen);
window.location.href="index.php";
}
function PopulateCategoryList()
{
$.ajax({
type: "POST",
async:false,
url: $host_url+"PopulateCategoryList",
success: PopulateCategoryListResponce
});
}
function PopulateCategoryListResponce(responce)
{
responce = eval('(' + responce + ')');
document.getElementById("category").options.length = 0;
document.getElementById("FCONSTYPE").options.length = 0;
var category=responce.data['category'];
var mess_data=responce.data['mess_data'];
var FCONSTYPE=responce.data['FCONSTYPE'];
for($i=0;$i < category.length;$i++)
{
$op = new Option(category[$i]['value'], category[$i]['internal_code']);
$op.id=category[$i]['internal_code'];//specifying the id for options
document.getElementById("category").options.add($op);
}
for($i=0;$i < FCONSTYPE.length;$i++)
{
$op = new Option(FCONSTYPE[$i]['value'], FCONSTYPE[$i]['internal_code']);
$op.id=FCONSTYPE[$i]['internal_code'];//specifying the id for options
document.getElementById("FCONSTYPE").options.add($op);
}
$("#main_message_board").html(mess_data);
}
function ValidateRegNo()
{
var reg_no=trim($("#reg_no").val());
var category=$("#category").val();
var FCONSTYPE=$("#FCONSTYPE").val();
if(empty(reg_no))
{
alert("Register number should be entered");
return false;
}
window.location.href="student.php?r="+reg_no+"&c="+category+"&li="+FCONSTYPE;
}
//########################################################
function DisplayApplications()
{
url_object=GetUrlParameters();
var r=url_object['r'];
$.ajax({
type: "POST",
async:false,
data:"r="+r,
url: $host_url+"DisplayApplications",
success: DisplayApplicationsResponce
});
}
function DisplayApplicationsResponce(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 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");
}
}
}
function MakeOnlinePayment(app_no)
{
window.location.href="payment_gateway.php?productinfo="+app_no;
}
|