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.147.51.72
<?php
include("sendsmsapi.php");
class applicationForm
{
function __construct($aobj_context)
{
session_start();
$this->aobj_context=$aobj_context;
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$this->aobj_context=$aobj_context;
$this->ip=$_SERVER["REMOTE_ADDR"];
$this->login_cnt=$_SESSION['login_cnt'];
}
function assignParams()
{
$this->edit_app_code=trim($this->aobj_context->mobj_data["edit_app_code"]);
$this->course=trim($this->aobj_context->mobj_data["course"]);
$this->college=trim($this->aobj_context->mobj_data["college"]);
$this->candidate_name=trim($this->aobj_context->mobj_data["candidate_name"]);
$this->dob=trim($this->aobj_context->mobj_data["dob"]);
$this->paddr1=trim($this->aobj_context->mobj_data["paddr1"]);
$this->paddr2=trim($this->aobj_context->mobj_data["paddr2"]);
$this->paddr3=trim($this->aobj_context->mobj_data["paddr3"]);
$this->paddr4=trim($this->aobj_context->mobj_data["paddr4"]);
$this->mobile_no=trim($this->aobj_context->mobj_data["mobile_no"]);
$this->email_id=trim($this->aobj_context->mobj_data["email_id"]);
$this->amount=trim($this->aobj_context->mobj_data["amount"]);
$this->paytype=trim($this->aobj_context->mobj_data["paytype"]);
$this->reg_no=strtoupper(trim($this->aobj_context->mobj_data["reg_no"]));
$this->catpath=trim($this->aobj_context->mobj_data["catpath"]);
}
function SaveDetails()
{
$check_dup="select count(*) as dup_cnt from dctran
where FREGNO='{$this->reg_no}'";
$obj_check_dup=$this->aobj_context->mobj_db->GetRow($check_dup);
if($obj_check_dup[dup_cnt]>0)
{
$data="You have already applied for Convocation Certificate. Call Help Desk in case of any clarifications.";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
return;
}
$insert_qry=" insert into dctran(FREGNO,FNAME,FDOB,FPOSTADDR1,FPOSTADDR2,FPOSTADDR3,FPOSTADDR4,FMOBILE,FEMAIL,FAMOUNT,FPAYTYPE,FREGDATE,FREGIP,FCATPATH)
values('{$this->reg_no}','{$this->candidate_name}',date_format(str_to_date('{$this->dob}','%Y-%m-%d'),'%Y-%m-%d'),'{$this->paddr1}','{$this->paddr2}',
'{$this->paddr3}','{$this->paddr4}','{$this->mobile_no}','{$this->email_id}',
'{$this->amount}','{$this->paytype}',now(),'{$this->ip}','{$this->catpath}') ";
$insert_obj=$this->aobj_context->mobj_db->Execute($insert_qry);
$error=mysql_error();
$this->last_inserted_id = $this->aobj_context->mobj_db->Insert_ID();
if($this->last_inserted_id)
{
$this->UpdateApplicationUniqueNo();
}
else
{
$data="Error While Inserting ".$error ;;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
return;
}
}
function UpdateApplicationUniqueNo()
{
$query="SELECT fdcappno+1 as FLASTNO,FCVPREFIX FROM control";
$objrst = $this->aobj_context->mobj_db->GetRow($query);
$this->prefix=$objrst[FCVPREFIX];
$this->app_no=$this->prefix.$objrst[FLASTNO];
$update_last_no="update control set fdcappno=fdcappno+1";
$this->aobj_context->mobj_db->Execute($update_last_no);
$update_app_no="update dctran set FAPPNO='{$this->app_no}'
where FAUTONO={$this->last_inserted_id}";
$this->aobj_context->mobj_db->Execute($update_app_no);
include_once($this->aobj_context->main_src."/JSON.php");
$json = new Services_JSON();
$college_path=$this->aobj_context->main_src."/student_photos/{$this->college}";
$folder_path=$this->aobj_context->main_src."/student_photos";
$file_name=basename($_FILES['student_entry_upload']['name']);
$path_arr=pathinfo($_FILES['student_entry_upload']['name']);
$file_ext=$path_arr['extension'];
$full_file_path= $folder_path.'/'.$this->reg_no.'.'.$file_ext;;
$image_path="student_photos/".$this->reg_no.'.'.$file_ext;;
/* if(isset($_FILES['student_entry_upload']['name']) && $_FILES['student_entry_upload']['name'] != '')
{
if(move_uploaded_file($_FILES['student_entry_upload']['tmp_name'],$full_file_path))
{
$update="update dctran set FPHOTOPATH='student_photos/BM114023.jpg'
where FAUTONO= {$this->last_inserted_id} ";
$up_obj=$this->aobj_context->mobj_db->Execute($update);
$arr['app_no']=$this->app_no;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
else
{
$data="Error While Moving the Image";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
return;
}
} */
$update="update dctran set FPHOTOPATH='student_photos/BM114023.jpg'
where FAUTONO= {$this->last_inserted_id} ";
$up_obj=$this->aobj_context->mobj_db->Execute($update);
$arr['app_no']=$this->app_no;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
function GetApplicationDetails()
{
$this->app_no=trim($this->aobj_context->mobj_data["app_no"]);
$get_data=" select internal_code, app_no, pget_val, subject, candidate_name,
mother_name, father_name, spouse_name,
date_format(dob,'%d/%m/%Y') as dob, sex,
s.pob, pob_others,
nationality,
s.college ,
college_others,
s.univ ,univ_others, cncl_reg_no,
cncl_reg_name, date_format(rotary,'%d/%m/%Y') as rotary, marks,
u_pg, phq, religion,
s.category, category_others,
caste, sub_caste, dd_amt, dd_no, date_format(dd_date,'%d/%m/%Y') as dd_date,
dd_bank, address, pin,IFNULL(debared,'No') as debared, email, phone,
mobile, in_service_status,
s.dept , '' as dept_others, plc_of_working,
date_format(date_of_entry,'%d/%m/%Y') as date_of_entry, prob_period, date_format(prob_date,'%d/%m/%Y') as prob_date,
doing_pg, pg_degree_course,
date_format(pg_degree_date,'%d/%m/%Y') as pg_degree_date,
pg_diploma_course, date_format(pg_diploma_date,'%d/%m/%Y') as pg_diploma_date,
speciality, enq_pending, suspension, absence, remarks, photo_path,
created_date, f_max_marksa, f_sec_marksa,
f_no_attaa, f_max_marksb, f_sec_marksb,
f_no_attbb, f_max_marksc, f_sec_marksc,
f_no_attcc, f_max_marksd, f_sec_marksd,
f_no_attdd, f_tot_max_marks, f_tot_sec_marks ,ip_address,created_date
from
dcstud s
where app_no={$this->app_no}";
//echo $get_data;die();
$lobj_get_data=$this->aobj_context->mobj_db->GetRow($get_data);
$data="Error While Moving the Image";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($lobj_get_data,0,"Success");
return;
}
function GetCMSDropDownMenuValues()
{
$query="SELECT fcnvno AS int_code,fcnvname AS val FROM mascnvfee
where ifnull(fdeleted,'') <> 'T' order by fcnvno asc ";
$rst=$this->aobj_context->mobj_db->GetAll($query);
$arr['convtype'] = $rst;
$query2="SELECT FCATEGORY AS int_code,FDESCPN AS val FROM category
where ifnull(fdeleted,'') <> 'T' order by FCATEGORY asc ";
$rst2=$this->aobj_context->mobj_db->GetAll($query2);
$arr['category'] = $rst2;
$get_data="SELECT payment_type AS int_code,bank_name AS val FROM acc_mas
where ifnull(fsuspend,'') <> 'T' and payment_type not in('SBM','CASH')";
$up_obj=$this->aobj_context->mobj_db->GetAll($get_data);
$arr['acctype'] = $up_obj;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
function GetCMSAmountValue()
{
$degree=trim($this->aobj_context->mobj_data["degree"]);
$nationality=trim($this->aobj_context->mobj_data["nationality"]);
$qry="SELECT FAMOUNT FROM masfee
WHERE FDEGREE='{$degree}' AND FNATIONAL='{$nationality}'";
$up_obj=$this->aobj_context->mobj_db->GetRow($qry);
$amt=$up_obj['FAMOUNT'];
$amt=empty($amt)?0:$amt;
$arr['amount']=$amt;
$sub_arr=$this->GetSubjectDetails($degree);
$doc_arr=$this->GetStudentDocumentsTable($degree,$nationality);
$arr['subjects'] = $sub_arr;
$arr['doc_arr'] = $doc_arr;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
function ValidatePaymentApplicationData()
{
$p_appno=trim($this->aobj_context->mobj_data["p_appno"]);
$p_dob=trim($this->aobj_context->mobj_data["p_dob"]);
$p_reg_no=trim($this->aobj_context->mobj_data["p_reg_no"]);
$qry="SELECT FAPPNO,ifnull(FPAYSTATUS,'') PAYSTATUS from dctran
WHERE FDOB='{$p_dob}' AND FAPPNO='{$p_appno}' AND FREGNO='{$p_reg_no}'
AND FPAYTYPE='DEBIT/CREDIT/NET BANKING'";
$up_obj=$this->aobj_context->mobj_db->GetRow($qry);
$FAPPNO = $up_obj['FAPPNO'];
if(empty($FAPPNO))
{
$error_msg = 'Invalid Inputs Entered';
echo $this->aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"failure");
return;
}
else if($up_obj['PAYSTATUS'] == 'success')
{
$error_msg = 'Payment already made for the given application no.';
echo $this->aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"failure");
return;
}
else
{
$arr['app_no'] = $FAPPNO;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
}
function ValidatePrintCertificateApplicationData()
{
$appno =trim($this->aobj_context->mobj_data["appno"]);
$dob=trim($this->aobj_context->mobj_data["dob"]);
$regno=trim($this->aobj_context->mobj_data["regno"]);
$qry="SELECT FAPPNO, FPAYTYPE, FPAYSTATUS from dctran
WHERE date_format(FDOB,'%d/%m/%Y')= date_format('{$dob}','%d/%m/%Y') AND FREGNO='{$regno}' and FAPPNO ='{$appno}'";
$up_obj=$this->aobj_context->mobj_db->GetRow($qry);
$FAPPNO=$up_obj['FAPPNO'];
$FPAYTYPE = $up_obj['FPAYTYPE'];
$FPAYSTATUS = $up_obj['FPAYSTATUS'];
if(empty($FAPPNO))
{
$error_msg = 'invalid credentials';
echo $this->aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"failure");
}
else
{
$arr['app_no']=$FAPPNO;
$arr['paytype']=$FPAYTYPE;
$arr['paystatus']=$FPAYSTATUS;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
}
function GetSubjectDetails($degree)
{
$get_sub="SELECT FQUALSUB FROM massub
WHERE FDEGREE='{$degree}'";
$up_get_sub=$this->aobj_context->mobj_db->GetAll($get_sub);
$i=0;
$sl=1;
$html="";
foreach($up_get_sub as $ak=>$av)
{
$FQUALSUB=$av['FQUALSUB'];
$html.="<tr>";
$html.="<td style='width:300px' id='sub_td_{$i}'>{$FQUALSUB}</td>";
$html.="<td><input style='width:200px' type='text' id='sub_max_{$i}' placeholder='{$FQUALSUB} Marks' maxlength=10 class='form-control'></td>";
$html.="<td><input style='width:200px' type='text' id='sub_sec_{$i}' placeholder='{$FQUALSUB} Secured' maxlength=10 class='form-control'></td>";
$html.="</tr>";
$i++;
$sl++;
}
return $html;
}
function GetpaymentLinkForAppNo()
{
$app_no=trim($this->aobj_context->mobj_data["app_no"]);
$get_details="SELECT dctran.FAPPNO as FAPPNO,dctran.FREGNO,college.FCOLLNAME,degree.FDESCPN,date_format(dctran.FDOB,'%d/%m/%Y') as FDOB,dctran.FAMOUNT,
dctran.FNAME,dctran.FMOBILE,dctran.FEMAIL,dctran.FREGDATE,dctran.FPAYTYPE
FROM dctran,dcstud,degree,college
WHERE dcstud.FREGNO = dctran.FREGNO and college.FCOLLCODE = dcstud.FCOLLCODE
and degree.FDEGREE = dcstud.FDEGREE and FAPPNO='{$app_no}' ";
$objget_details=$this->aobj_context->mobj_db->GetRow($get_details);
$FDATE=$objget_details['FREGDATE'];
$FREGNO=$objget_details['FREGNO'];
$FCOLLCODE=$objget_details['FCOLLNAME'];
$FDEGREE=$objget_details['FDESCPN'];
$FNAME=$objget_details['FNAME'];
$FDOB=$objget_details['FDOB'];
$FAMOUNT=$objget_details['FAMOUNT'];
$FMOBILENO=$objget_details['FMOBILE'];
$FEMAIL=$objget_details['FEMAIL'];
$FPAYTYPE=$objget_details['FPAYTYPE'];
$html=' <h3 class="col-md-offset-1" style="color:green;"> Successfully Applied!!. <br>Your Application No. is : '.$app_no.' <br> Keep this number for future correspondance with University.</h3> <div class="row">
<div class="col-md-6 col-sm-12">
<div class="portlet yellow box">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-cogs"></i>Application Details
</div>
</div>
<div class="portlet-body">
<div class="row static-info">
<div class="col-md-5 name">
Application no. :
</div>
<div class="col-md-7 value">
'. $app_no.'
</div>
</div>
<div class="row static-info">
<div class="col-md-5 name">
Application Date & Time:
</div>
<div class="col-md-7 value">
'.$FDATE.'
</div>
</div>
<div class="row static-info">
<div class="col-md-5 name">
Registration no. :
</div>
<div class="col-md-7 value">
'.$FREGNO.'
</div>
</div>
<div class="row static-info">
<div class="col-md-5 name">
College:
</div>
<div class="col-md-7 value">
'.$FCOLLCODE.'
</div>
</div>
<div class="row static-info">
<div class="col-md-5 name">
Degree:
</div>
<div class="col-md-7 value">
'.$FDEGREE.'
</div>
</div>
<div class="row static-info">
<div class="col-md-5 name">
Candidate Name:
</div>
<div class="col-md-7 value">
'.$FNAME.'
</div>
</div>
<div class="row static-info">
<div class="col-md-5 name">
Amount:
</div>
<div class="col-md-7 value">
<i style="color:red;" class="fa fa-rupee"></i> '.$FAMOUNT.'
</div>
</div>
<div class="row static-info">
<div class="col-md-5 name">
Mobile:
</div>
<div class="col-md-7 value">
'.$FMOBILENO.'
</div>
</div>
<div class="row static-info">
<div class="col-md-5 name">
Email id:
</div>
<div class="col-md-7 value">
'.$FEMAIL.'
</div>
</div>
</div>
</div>
</div></div>';
if($FPAYTYPE == 'DEBIT/CREDIT/NET BANKING')
{
$html.='<div class="form-actions fluid">
<div class="row">
<div class="col-md-12">
<div class="col-md-offset-3 col-md-4">
<button class="btn green" onclick=\'CMS.MakeOnlinePayment("'.$app_no.'");\' type="button"><i class="fa fa-rupee"></i> Make Online Payment</button>
<button class="btn red" onclick="home();" type="button" ><i class="fa fa-times"></i> Pay Later</button>
</div>
</div>
</div>
</div>';
}
else
{
$html.='<div class="form-actions fluid">
<div class="row">
<div class="col-md-12">
<div class="col-md-offset-3 col-md-4">
<button class="btn green" onclick=\'CMS.PrintPOSTCertifcate("'.$app_no.'");\' type="button"><i class="fa fa-rupee"></i> Print Postoffice Challen</button>
<button class="btn red" onclick="home();" type="button" ><i class="fa fa-times"></i>Back</button>
</div>
</div>
</div>
</div>';
}
echo $this->aobj_context->mobj_output->ToJSONEnvelope($html,0,"success");
return;
}
function recurseRmdir($dir) {
$files = array_diff(scandir($dir), array('.','..'));
foreach ($files as $file) {
(is_dir("$dir/$file")) ? recurseRmdir("$dir/$file") : unlink("$dir/$file");
}
return rmdir($dir);
}
function GetStudentDocumentsTable($degree,$nationality)
{
$delete="delete from studoc where
login_cnt='{$this->login_cnt}'
and app_no is null
";
$lobj_delete= $this->aobj_context->mobj_db->Execute($delete);
$dir_path=$this->aobj_context->main_src."/certificates/{$this->login_cnt}/";
if($this->login_cnt>0)
{
$this->recurseRmdir($dir_path);
rmdir($dir_path);
}
$get_document_data="select internal_code as int_code, FCERTDESC as doc_type ,
ifnull(FFILENAME,REPLACE(REPLACE(FCERTDESC,' ','_'),'+','_')) as FFILENAME from masdoc
WHERE FDEGREE='{$degree}' and FNATIONAL like '%{$nationality}%'";
$lobj_get_document_data= $this->aobj_context->mobj_db->GetAll($get_document_data);
$this->html="";
$this->html.=' <form id="form_module_image_upload" enctype="multipart/form-data" method="POST">
<!-- MY TASK BEGIN CONDENSED TABLE PORTLET-->
<div class="span11"><div class="portlet box blue">
<div class="portlet-title">
<i class="fa fa-cogs"></i> UPLOAD CERTIFICATES
</div>
<div class="portlet-body">
<div class="scroller" data-height="380px">
<table id="upload_table" class="table table-bordered table-hover" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>#</th>
<th><i class="icon-briefcase"></i> Document Type</th>
<th>File Type</th>
<th>Attachment</th> </tr>
</thead>
<tbody>';
$sl=1;
foreach($lobj_get_document_data as $mk=>$mv)
{
$int_code=$mv[int_code];
$doc_type=$mv[doc_type];
$attachment_path=$mv[attachment_path];
$FFILENAME=$mv[FFILENAME];
$file_name=$mv[file_name];
$file_type_id="ed_{$int_code}";
$doc_file_path=$attachment_path;
if(!empty($attachment_path))
$selected=" <span class='label label-success' id='uploded_{$int_code}'>Yes</span> ";
else
$selected=" <span class='label label-warning' id='uploded_{$int_code}'>No</span>";
$this->html.='<tr>
<td style="width:30px">'.$sl.'</td>
<td id="doc_upload_'.$int_code.'" style="width:300px">'.$doc_type.'</td>
<td style="width:300px"><div style="float:left;"><input type="file" name='.$file_type_id.' id='.$file_type_id.' /></div><div style="float:left;"><a class="btn btn-sm blue" href="#" onclick=CMS.UploadEmployeeDocuments("'.$int_code.'","'.$FFILENAME.'")><i class="fa fa-upload"></i> Upload</a></div></td>';
if(!empty($attachment_path))
{
$this->html.='<td style="width:100px"><a style="color:#AB45F9; padding-right:5px;" href="'.$doc_file_path.'" target="_blank">'.$file_name.'</a><span style="cursor:pointer;" class="label label-danger" onclick=CMS.DeleteEmployeeDocuments("'.$int_code.'")>Delete</span></td>';
}
else
{
$this->html.='<td style="width:100px" id="attach_td_'.$int_code.'"> </td>';
}
$this->html.='</tr>'; $sl++;
}
$this->html.='</tbody></table>
</div>
</div>
</div>
</div>
</form>
<!-- END CONDENSED TABLE PORTLET-->';
return $this->html;
}
function UploadEmployeeDocuments()
{
$temp_path = $this->aobj_context->main_src."/certificates/{$this->login_cnt}";
if(!file_exists($temp_path))
{
mkdir($temp_path);
}
$file_name = replaceChars(basename($_FILES['categoryatt']['name']));
$file_path = "/{$file_name}";
$temp_path.=$file_path;
if(isset($file_name) && $file_name != '')
{
$path_arr=pathinfo($_FILES['categoryatt']['name']);
$file_ext=$path_arr['extension'];
$root_file_name=$dir_path."/".$file_name;
$attachement_path="certificates/{$this->login_cnt}/{$file_name}";
if(move_uploaded_file($_FILES['categoryatt']['tmp_name'],$temp_path))
{
$arr['path']=$attachement_path;
$arr['file_name']=$file_name;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else
{
$data="Moving {$file_name} to emp_doc_attchments failed";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
return;
}
}
else
{
$data="File is empty, not moved";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
return;
}
}
function SendMailOtPToUser()
{
$mobile_no=trim($this->aobj_context->mobj_data["s_mobile_no"]);
$s_email_id=$this->aobj_context->mobj_data['s_email_id'];
require_once("cManualMailer.php");
$otp = generateRandomString();
$message="<html>";
$message.="<body>";
$message.="<style>";
$message.=".mail_tbl td{text-align:left; padding:2px; font-size:12px; font-family: Verdana, Arial, Helvetica, sans-serif;}";
$message.="</style>";
$message.="<p style='font-size:12px; font-family: Verdana, Arial, Helvetica, sans-serif'>Hey,</p></br>";
$message.="<p style='font-size:12px; font-family: Verdana, Arial, Helvetica, sans-serif'>You recently registered for Convocation Certificate. To complete your registration, please confirm your account.</p></br>";
$message.="<p style='font-size:12px; font-family: Verdana, Arial, Helvetica, sans-serif'>You may be asked to enter this confirmation code : {$otp}</p>";
$message.="</br>";
$message.="</body>";
$message.="</html>";
$subject="Action required: Confirm your Registration";
$data='true';
$data= send_manual_mail($s_email_id,$subject,$message,$replay_to=null,$cc=null,$bcc=null);
//SMS OTP
$username = 'log03';
$password = 'log03124';
$from = 'CUGUNI';
$to = $mobile_no;
$text ="Use ".$otp." to verify your Registration";
$category = '';
$smsresp = sendsmaapi($username,$password,$from,$to,$text,$category);
if($data=='true')
{
echo $this->aobj_context->mobj_output->ToJSONEnvelope($otp,0,"success");
}
else
{
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,-1,"success");
}
}
function Getapplicationstatusdetails()
{
$appno =trim($this->aobj_context->mobj_data["appno"]);
$regno =trim($this->aobj_context->mobj_data["regno"]);
$dob =trim($this->aobj_context->mobj_data["dob"]);
$get_qry="SELECT distinct s.*,DATE_FORMAT(s.FDOB,'%d/%m/%Y') as dob, if(ifnull(s.FPAYSTATUS,'')='','Pending',s.FPAYSTATUS) as FPAYSTATUS,c.FCOLLNAME,d.FDESCPN
FROM dctran s, dcstud st,college c, degree d
WHERE st.FREGNO = s.FREGNO and st.FCOLLCODE = c.FCOLLCODE and st.FDEGREE = d.FDEGREE
and IFNULL(s.FAPPNO,'')!='' and s.FAPPNO='{$appno}' and s.FREGNO='{$regno}'
and DATE_FORMAT(s.FDOB,'%d/%m/%Y') = '{$dob}'
GROUP BY s.FAPPNO ORDER BY s.FAPPNO";
$this->aobj_context->mobj_db->execute("SET @@session.group_concat_max_len=10000");
$up_obj=$this->aobj_context->mobj_db->GetRow($get_qry);
if($up_obj)
{
$html = "<div class='portlet-body form' style='margin-left:10px;'>
<div class='row'><div class='col-md-10'> <div class='portlet box green'>
<div class='portlet-title'>
<div class='caption'>
<i class='fa fa-picture'></i>Application Details
</div>
</div>
</div>
<!-- BEGIN FORM-->
<form class='form-horizontal' id='form_module_details_upload' enctype='multipart/form-data' method='POST'>
<div class='col-md-8'>
<input type='hidden' name= 'MAX_FILE_SIZE' value='10000000000' />
<div class='form-body' >
<h3 class='form-section'>Payment Information</h3>
<div class='form-group' >
<label class='col-md-3 control-label' style='text-align:left;font-size:18px;font-weight: bold;'>Application no.</label>
<label class='col-md-5 control-label' style='text-align:left;font-size:18px;'>
{$up_obj['FAPPNO']}
</label>
</div>
<div class='form-group'>
<label class='col-md-3 control-label' style='text-align:left;font-weight: bold;'>Register no.</label>
<label class='col-md-5 control-label' style='text-align:left;'>
{$up_obj['FREGNO']}
</label>
</div>
<div class='form-group'>
<label class='col-md-3 control-label' style='text-align:left; font-weight: bold;'>College</label>
<label class='col-md-5 control-label' style='text-align:left;'>
{$up_obj['FCOLLNAME']}
</label>
</div>
<div class='form-group'>
<label class='col-md-3 control-label' style='text-align:left; font-weight: bold;'>Degree</label>
<label class='col-md-5 control-label' style='text-align:left;'>
{$up_obj['FDESCPN']}
</label>
</div>
<div class='form-group'>
<label class='col-md-3 control-label' style='text-align:left; font-weight: bold;'>Candidate name</label>
<label class='col-md-5 control-label' style='text-align:left;'>
{$up_obj['FNAME']}
</label>
</div>
<div class='form-group'>
<label class='col-md-3 control-label' style='text-align:left; font-weight: bold;'>DOB</label>
<label class='col-md-5 control-label' style='text-align:left;'>
{$up_obj['dob']}
</label>
</div>
</div>
</div>
<div class='col-md-4'>
<div class='form-group'>
<img id='student_entry_photo' style='width:148px;z-index:1;height:187px; width:148px' src='{$up_obj[FPHOTOPATH]}' class='img-responsive' >
</div>
</div>
</form>
</div>
<div class='form-body' style='clear:both;margin-left:20px;'>
<h3 class='form-section'>Personnel Information</h3>
<!--/row-->
<div class='row'>
<div class='col-md-4 '>
<div class='form-group'>
<label class='control-label' style='font-weight: bold;'>Postal Address : </label><br>
{$up_obj['FPOSTADDR1']}<br>
{$up_obj['FPOSTADDR2']}<br>
{$up_obj['FPOSTADDR3']}<br>
{$up_obj['FPOSTADDR4']}<br>
</div>
</div>
<!--/span-->
</div>
<div class='row'>
<!--/span-->
<div class='col-md-3'>
<div class='form-group'>
<label style='font-weight: bold;'>Mobile No. : </label><br>
{$up_obj['FMOBILE']}
</div>
</div>
<div class='col-md-3'>
<div class='form-group'>
<label style='font-weight: bold;'>Email Id. : </label><br>
{$up_obj['FEMAIL']}
</div>
</div>
<!--/span-->
</div>
</div>
<div class='form-body' style='clear:both;margin-left:20px;'>
<h3 class='form-section'>Payment Information</h3>
<div class='row'>
<div class='col-md-3'>
<div class='form-group'>
<label style='font-weight: bold;'>Payment Type. : </label><br>
{$up_obj['FPAYTYPE']}
</div>
</div>
<div class='col-md-3'>
<div class='form-group'>
<label style='font-weight: bold;'>Payment Status. : </label><br>
{$up_obj['FPAYSTATUS']}
</div>
</div>
</div>
<div class='form-body' style='clear:both;'>
<h3 class='form-section'>Convocation certificate Information</h3>
<div class='row'>
<div class='col-md-3'>
<div class='form-group'>
<label style='font-weight: bold;'>Certificate no. : </label><br>
</div>
</div>
<div class='col-md-3'>
<div class='form-group'>
<label style='font-weight: bold;'>Certificate Print Date. : </label><br>
</div>
</div>
</div>
<div class='col-md-12'>
<div class='col-md-offset-3 col-md-4'>
<button class='btn red' onclick='home();' type='button' ><i class='fa fa-times'></i>Back</button>
</div>
</div>
</div></div>";
$arr['html']=$html;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"Success");
return;
}
else
{
$error_msg = 'invalid credentials';
echo $this->aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"failure");
return;
}
}
}
function GetpaymentLinkForAppNo($aobj_context)
{
$obj=new applicationForm($aobj_context);
$obj->GetpaymentLinkForAppNo();
}
function ValidatePaymentApplicationData($aobj_context)
{
$obj=new applicationForm($aobj_context);
$obj->ValidatePaymentApplicationData();
}
function ValidatePrintCertificateApplicationData($aobj_context)
{
$obj=new applicationForm($aobj_context);
$obj->ValidatePrintCertificateApplicationData();
}
function GetCMSDropDownMenuValues($aobj_context)
{
$obj=new applicationForm($aobj_context);
$obj->GetCMSDropDownMenuValues();
}
function UploadEmployeeDocuments($aobj_context)
{
$obj=new applicationForm($aobj_context);
$obj->UploadEmployeeDocuments();
}
function HandleUserInputFiles($aobj_context)
{
$obj=new applicationForm($aobj_context);
$obj->HandleUserInputFiles();
}
function GetCMSAmountValue($aobj_context)
{
$obj=new applicationForm($aobj_context);
$obj->GetCMSAmountValue();
}
function SendMailOtPToUser($aobj_context)
{
$obj=new applicationForm($aobj_context);
$obj->SendMailOtPToUser();
}
function SaveCertificateDetails($aobj_context)
{
$obj=new applicationForm($aobj_context);
$obj->assignParams();
if($obj->edit_app_code==0)
{
$obj->SaveDetails();
}
else
{
$obj->UpdateAuditTrial();
$obj->UpdateDetails();
}
}
function Getapplicationstatusdetails($aobj_context)
{
$obj=new applicationForm($aobj_context);
$obj->Getapplicationstatusdetails();
}
function DiaplayUserSelectedPhoto($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$folder_path = $aobj_context->main_src."/student_photos/";
$file_name = replaceChars(basename($_FILES['student_entry_upload']['name']));
$path_arr = pathinfo($_FILES['student_entry_upload']['name']);
$file_ext = $path_arr['extension'];
$temp_path = $aobj_context->main_src."/student_photos/temp";
if(!file_exists($temp_path))
{
mkdir($temp_path);
}
$file_path = "/{$collcode}_{$user_id}_{$file_name}";
$temp_path.=$file_path;
if(isset($_FILES['student_entry_upload']['name']) && $_FILES['student_entry_upload']['name'] != '')
{
$size = ($_FILES['student_entry_upload']['size']/1024);
if($size>1024)
{
$data = "Please Upload the Photo of size less than 1 MB";
echo $aobj_context->mobj_output->ToJSONEnvelope($data,-2,"success");
return;
}
if(move_uploaded_file($_FILES['student_entry_upload']['tmp_name'],$temp_path))
{
$data = "student_photos/temp/{$file_path}";
echo $aobj_context->mobj_output->ToJSONEnvelope($data,0,"success");
return;
}
}
echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
return;
}
function Getstudentdetails($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$regno = $aobj_context->mobj_data["regno"];
$check_dup="select count(*) as dup_cnt from dctran
where FREGNO='{$regno}'";
$obj_check_dup=$aobj_context->mobj_db->GetRow($check_dup);
if($obj_check_dup[dup_cnt]>0)
{
$data="You have already applied for Convocation Certificate. Call Help Desk in case of any clarifications.";
echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
return;
}
$query = "select distinct dcstud.FREGNO,ifnull(dcstud.FCERTNO,'') as FCERTNO, dcstud.FNAME, college.FCOLLNAME, degree.FDESCPN,ifnull(dcstud.FCASTE,'') as FCASTE,
mascnvfee.FCNVNAME,if(FCASTE ='SC' OR FCASTE ='ST',mascnvfee.FSCSTFEE,mascnvfee.FFEE) as Fee from dcstud, college, degree, mascnvfee
where dcstud.FCOLLCODE = college.FCOLLCODE and dcstud.FDEGREE = degree.FDEGREE
and mascnvfee.FCNVNO = dcstud.FCNVNO and dcstud.FREGNO='{$regno}'";
$rst = $aobj_context->mobj_db->GetRow($query);
if($rst)
{
if($rst[FCERTNO] !='')
{
$error_msg = "Convocation Certificate already printed";
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"failure");
return;
}
else
{
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
return;
}
}
else
{
$error_msg = 'Not a valid Register no.';
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"failure");
return;
}
}
function replaceChars($name)
{
$spl_char = array("*","/","~","!","@","#","$","%","^","&",":",";","?","/","\\","_","-","'"," ","");
$link_name = strtolower(str_replace($spl_char,"_",$name));
return str_ireplace("__","_",$link_name);
}
function generateRandomString($length = 8)
{
return substr(sha1(rand()), 0, $length);
}
function Getcnvcategoryfee($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$regno = $aobj_context->mobj_data["regno"];
$catcode = $aobj_context->mobj_data["catcode"];
$query = " select if('{$catcode}' = 'SCST',mascnvfee.FSCSTFEE,mascnvfee.FFEE) as Fee from mascnvfee,dcstud
where mascnvfee.FCNVNO = dcstud.FCNVNO";
$rst = $aobj_context->mobj_db->GetRow($query);
$arr['fee'] = $rst[Fee];
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
?>
|