/
home
/
cicjhs
/
public_html
/
cicjhs_master
/
Upload File
HOME
<?php session_start(); require("lib/configure.php"); $obj->dbLogin(); if(isset($_REQUEST['act']) && !empty($_REQUEST['act'])){ $task = $_REQUEST['act']; } switch($task){ case 'formDetail': $form_type= $_REQUEST['form_type']; if($form_type == 'Online Form'){ $sql="SELECT * FROM course"; $res= mysqli_query($obj->mysqli,$sql); $option=""; while($row= mysqli_fetch_assoc($res)){ $option .= "<option value='$row[course_id]'>$row[c_short_f]</option>"; } echo $option; } else{ $sql="SELECT * FROM program_cource"; $res= mysqli_query($obj->mysqli,$sql); $option=""; while($row= mysqli_fetch_assoc($res)){ $option .= "<option value='$row[course_id]'>$row[program_course]</option>"; } echo $option; } break; case 'stu_report': $form_type= $_REQUEST['form_type']; $course_id= $_REQUEST['course_id']; if($form_type== 'Online Form' && !empty($course_id)){ $sql="select onf.*,c.c_short_f,c.C_long_f from online_f as onf join course as c on (c.course_id= onf.course_id)where onf.course_id='$course_id'"; $res= mysqli_query($obj->mysqli,$sql); $num= mysqli_num_rows($res); if($num>0){ $i=1; $row= ""; while($fet=mysqli_fetch_assoc($res)){ $made=''.($fet['status']==1)? '0' : '1' .''; $css=''.($fet['status']== 1)? '#009933' : '#FF0000' .''; $acts=''. ($fet['status']== 1)? 'Active' : 'Inactive' .''; $row .="<tr> <td>".$i++."</td> <td><a href='stu_resu.php?stuid=".$fet['online_f_id']."' title='ON click Enrollment NO. Make Result'>".$fet['reg_id']."</a></td> <td>".$fet['c_short_f']."</td> <td>".$fet['name']."</td> <td>".$fet['con_email']."</td> <td>".date('D-M-Y',strtotime($fet['date_stu']))."</td> <th><a href='student_view.php?view=".$fet['online_f_id']."' class='btn btn-xs btn-primary'>View</a> <a class='btn btn-xs' href='online_f.php?online_status=".$fet['online_f_id']."&status=$made' style='background:$css;color:white;'> $acts </a> </th> </tr>"; } echo $row; } else { echo "Record not found..."; } } elseif($form_type =='Program Form' && !empty($course_id)){ $sql="select pro.*,pc.program_course from pro_form as pro join program_cource as pc on (pc.course_id= pro.course_id) where pro.course_id='$course_id'"; $res= mysqli_query($obj->mysqli,$sql); $num= mysqli_num_rows($res); if($num>0){ $i=1; $row= ""; while($fet=mysqli_fetch_assoc($res)){ $mades=''.($fet['status']==1)? '0' : '1' .''; $csss=''.($fet['status']== 1)? '#009933' : '#FF0000' .''; $actss=''. ($fet['status']== 1)? 'Active' : 'Inactive' .''; $row .="<tr> <td>".$i++."</td> <td><a href='program_result.php?stuid=".$fet['pro_f_id']."' title='ON click Enrollment NO. Make Result'>".$fet['reg_id']."</a></td> <td>".$fet['program_course']."</td> <td>".$fet['name']."</td> <td>".$fet['con_email']."</td> <td>".date('D-M-Y',strtotime($fet['date_stu']))."</td> <th><a href='view_pro_mem.php?view=".$fet['pro_f_id']."' class='btn btn-xs btn-primary'>View</a> <a class='btn btn-xs' href='online_f.php?prog_status=".$fet['pro_f_id']."&statuss=$mades' style='background:$csss;color:white;'> $actss </a> </th> </tr>"; } echo $row; } else { echo "Record not found..."; } } break; case 'formpro': $form_type1= $_REQUEST['form_type1']; if($form_type1 == 'Online Form'){ $sql="SELECT * FROM course"; $res= mysqli_query($obj->mysqli,$sql); $option=""; while($row= mysqli_fetch_assoc($res)){ $option .= "<option value='$row[course_id]'>$row[c_short_f]</option>"; } echo $option; } else{ $sql="SELECT * FROM program_cource"; $res= mysqli_query($obj->mysqli,$sql); $option=""; while($row= mysqli_fetch_assoc($res)){ $option .= "<option value='$row[course_id]'>$row[program_course]</option>"; } echo $option; } break; case 'certificate': $form_type1= $_REQUEST['form_type1']; if($form_type1 == 'Online Form'){ $sql="SELECT * FROM course"; $res= mysqli_query($obj->mysqli,$sql); $option=""; while($row= mysqli_fetch_assoc($res)){ $option .= "<option value='$row[course_id]'>$row[c_short_f]</option>"; } echo $option; } else{ $sql="SELECT * FROM program_cource"; $res= mysqli_query($obj->mysqli,$sql); $option=""; while($row= mysqli_fetch_assoc($res)){ $option .= "<option value='$row[course_id]'>$row[program_course]</option>"; } echo $option; } break; case 'courDetail': $srchtext = $_REQUEST['srchtext']; $form_type1 = $_REQUEST['form_type1']; if($form_type1== 'Online Form'){ $srchtext = $_REQUEST['srchtext']; $sql= "SELECT * FROM online_f WHERE `course_id`='$srchtext'"; $rs= mysqli_query($obj->mysqli,$sql); if(!empty($rs)){ $i=1; $row= ""; while($srch_row= mysqli_fetch_assoc($rs)){ $reg_id= $srch_row['reg_id']; $status= $obj->getRecord('online_f','reg_id',"'$reg_id'"); $status1= $obj->getRecord('course','course_id',"'$status[course_id]'"); $sql2="SELECT * FROM admit_card WHERE reg_id='$reg_id'"; $res= mysqli_query($obj->mysqli,$sql2); $num= mysqli_num_rows($res); if($num>0) { $row .="<tr> <th><input type='checkbox' class='checkbox' onChange='select_check()' name='mul_select[]' value='".$status['reg_id']."' /></th> <th>".$i++."</th> <th><input type='text' name='reg_id[]' disabled value='".$status['reg_id']."' class='form-control'/></th> <th>".$status['name']."</th> <th>".$status1['c_short_f']."</th> <th><input type='text' name='exam_date[]' disabled id='single' class='form-control'/></th> <th> <input type='text' name='exam_time[]' disabled class='form-control'/> </th> <th> <input type='text' name='exam_center[]' disabled class='form-control'/> </th> </tr>"; } else{ $row .="<tr> <th><input type='checkbox' class='checkbox' onChange='select_check()' name='mul_select[]' value='".$status['reg_id']."' /></th> <th>".$i++."</th> <th><input type='text' name='reg_id[]' readonly value='".$status['reg_id']."' class='form-control'/></th> <th>".$status['name']."</th> <th>".$status1['c_short_f']."</th> <th><input type='date' name='exam_date[]' class='form-control' required/></th> <th> <input type='text' name='exam_time[]' placeholder='HH:MM(AM/P/M)' class='form-control' required/> </th> <th> <input type='text' name='exam_center[]' placeholder='Name and Address of the Examination Center' class='form-control' required/> </th> </tr>"; } } $row .= '<input type="hidden" value="Online Form" name="admitcard_formtype"/>'; echo $row; } else{ echo $error= "Error record found..."; } } elseif($form_type1== 'Program Form'){ $sql= "SELECT * FROM pro_form WHERE `course_id`='$srchtext'"; $rs= mysqli_query($obj->mysqli,$sql); if(!empty($rs)){ $i=1; $row= ""; while($srch_row= mysqli_fetch_assoc($rs)){ $reg_id= $srch_row['reg_id']; $status= $obj->getRecord('pro_form','reg_id',"'$reg_id'"); $status1= $obj->getRecord('program_cource','course_id',"'$status[course_id]'"); $sql2="SELECT * FROM pro_admit_card WHERE reg_id='$reg_id'"; $res= mysqli_query($obj->mysqli,$sql2); $num= mysqli_num_rows($res); if($num>0) { $row .="<tr> <th><input type='checkbox' class='checkbox' onChange='select_check()' name='mul_select[]' value='".$status['reg_id']."' /></th> <th>".$i++."</th> <th><input type='text' name='reg_id[]' disabled value='".$status['reg_id']."' class='form-control'/></th> <th>".$status['name']."</th> <th>".$status1['program_course']."</th> <th><input type='text' name='exam_date[]' disabled id='single' class='form-control'/></th> <th> <input type='text' name='exam_time[]' disabled class='form-control'/> </th> <th> <input type='text' name='exam_center[]' disabled class='form-control'/> </th> </tr>"; } else{ $row .="<tr> <th><input type='checkbox' class='checkbox' onChange='select_check()' name='mul_select[]' value='".$status['reg_id']."' /></th> <th>".$i++."</th> <th><input type='text' name='reg_id[]' readonly value='".$status['reg_id']."' class='form-control' /></th> <th>".$status['name']."</th> <th>".$status1['program_course']."</th> <th><input type='date' name='exam_date[]' class='form-control' required/></th> <th> <input type='text' name='exam_time[]' placeholder='HH:MM(AM/P/M)' class='form-control' required/> </th> <th> <input type='text' name='exam_center[]' placeholder='Name and Address of the Examination Center' class='form-control' required/> </th> </tr>"; } } $row .= '<input type="hidden" value="program Form" name="admitcard_formtype"/>'; echo $row; } else{ echo $error= "Error record found..."; } } break; case 'certificateDetail': $srchtext = $_REQUEST['srchtext']; $form_type1 = $_REQUEST['form_type1']; if($form_type1== 'Online Form'){ $srchtext = $_REQUEST['srchtext']; $sql= "SELECT * FROM online_f WHERE `course_id`='$srchtext'"; $rs= mysqli_query($obj->mysqli,$sql); if(!empty($rs)){ $i=1; $row= ""; while($srch_row= mysqli_fetch_assoc($rs)){ $reg_id= $srch_row['reg_id']; $status= $obj->getRecord('online_f','reg_id',"'$reg_id'"); $status1= $obj->getRecord('course','course_id',"'$status[course_id]'"); $sql2="SELECT * FROM certificate WHERE reg_id='$reg_id'"; $res= mysqli_query($obj->mysqli,$sql2); $num= mysqli_num_rows($res); if($num>0) { $row .="<tr> <th><input type='checkbox' class='checkbox' onChange='select_check()' name='mul_select[]' value='".$status['reg_id']."' /></th> <th>".$i++."</th> <th><input type='text' name='reg_id[]' disabled value='".$status['reg_id']."' class='form-control'/></th> <th>".$status['name']."</th> <th>".$status1['c_short_f']."</th> <th> <input type='text' name='certificate_no[]' disabled class='form-control' autocomplete='off'/> </th> <th> <input type='text' name='grade[]' disabled class='form-control' style='width:100%' autocomplete='off'/> </th> <th><input type='date' name='trainingfrom[]' disabled class='form-control' autocomplete='off'/></th> <th><input type='date' name='trainingto[]' disabled class='form-control' autocomplete='off'/></th> <th><input type='date' name='issue_date[]' disabled class='form-control' autocomplete='off'/></th> </tr>"; } else{ $row .="<tr> <th><input type='checkbox' class='checkbox' onChange='select_check()' name='mul_select[]' value='".$status['reg_id']."' /></th> <th>".$i++."</th> <th><input type='text' name='reg_id[]' readonly value='".$status['reg_id']."' class='form-control'/></th> <th>".$status['name']."</th> <th>".$status1['c_short_f']."</th> <th> <input type='text' name='certificate_no[]' placeholder='certificate No.' class='form-control' required autocomplete='off'/> </th> <th> <input type='text' name='grade[]' class='form-control' style='width:100%' required autocomplete='off'/> </th> <th><input type='date' name='trainingfrom[]' class='form-control' required autocomplete='off'/></th> <th><input type='date' name='trainingto[]' class='form-control' required autocomplete='off'/></th> <th><input type='date' name='issue_date[]' class='form-control' required autocomplete='off'/></th> </tr>"; } } $row .= '<input type="hidden" value="Online Form" name="certificate_formtype"/>'; echo $row; } else{ echo $error= "Error record found..."; } } elseif($form_type1== 'Program Form'){ $sql= "SELECT * FROM pro_form WHERE `course_id`='$srchtext'"; $rs= mysqli_query($obj->mysqli,$sql); if(!empty($rs)){ $i=1; $row= ""; while($srch_row= mysqli_fetch_assoc($rs)){ $reg_id= $srch_row['reg_id']; $status= $obj->getRecord('pro_form','reg_id',"'$reg_id'"); $status1= $obj->getRecord('program_cource','course_id',"'$status[course_id]'"); $sql2="SELECT * FROM pro_certificate WHERE reg_id='$reg_id'"; $res= mysqli_query($obj->mysqli,$sql2); $num= mysqli_num_rows($res); if($num>0) { $row .="<tr> <th><input type='checkbox' class='checkbox' onChange='select_check()' name='mul_select[]' value='".$status['reg_id']."' /></th> <th>".$i++."</th> <th><input type='text' name='reg_id[]' disabled value='".$status['reg_id']."' class='form-control'/></th> <th>".$status['name']."</th> <th>".$status1['program_course']."</th> <th> <input type='text' name='certificate_no[]' disabled class='form-control' autocomplete='off'/> </th> <th> <input type='text' name='grade[]' class='form-control' disabled style='width:100%' autocomplete='off'/> </th> <th><input type='date' name='trainingfrom[]' class='form-control' disabled autocomplete='off'/></th> <th><input type='date' name='trainingto[]' class='form-control' disabled autocomplete='off'/></th> <th><input type='date' name='issue_date[]' disabled class='form-control' autocomplete='off'/></th> </tr>"; } else{ $row .="<tr> <th><input type='checkbox' class='checkbox' onChange='select_check()' name='mul_select[]' value='".$status['reg_id']."' /></th> <th>".$i++."</th> <th><input type='text' name='reg_id[]' readonly value='".$status['reg_id']."' class='form-control' /></th> <th>".$status['name']."</th> <th>".$status1['program_course']."</th> <th> <input type='text' name='certificate_no[]' placeholder='certificate No.' class='form-control' required autocomplete='off'/> </th> <th> <input type='text' name='grade[]' class='form-control' required style='width:100%' autocomplete='off'/> </th> <th><input type='date' name='trainingfrom[]' class='form-control' required autocomplete='off'/></th> <th><input type='date' name='trainingto[]' class='form-control' required autocomplete='off' /></th> <th><input type='date' name='issue_date[]' class='form-control' required autocomplete='off'/></th> </th> </tr>"; } } $row .= '<input type="hidden" value="program Form" name="certificate_formtype"/>'; echo $row; } else{ echo $error= "Error record found..."; } } break; case 'formDetail1': $form_type2= $_REQUEST['form_type2']; if($form_type2 == 'Online Form'){ $sql="SELECT * FROM course"; $res= mysqli_query($obj->mysqli,$sql); $option=""; while($row= mysqli_fetch_assoc($res)){ $option .= "<option value='$row[course_id]'>$row[c_short_f]</option>"; } echo $option; } else{ $sql="SELECT * FROM program_cource"; $res= mysqli_query($obj->mysqli,$sql); $option=""; while($row= mysqli_fetch_assoc($res)){ $option .= "<option value='$row[course_id]'>$row[program_course]</option>"; } echo $option; } break; case 'stu_sms': echo $form_type2= $_REQUEST['form_type2']; echo $course_id= $_REQUEST['course_id']; if($form_type2== 'Online Form' && !empty($course_id)){ $sql="select onf.*,c.c_short_f from online_f as onf join course as c on (c.course_id= onf.course_id)where onf.course_id='$course_id'"; $res= mysqli_query($obj->mysqli,$sql); $num= mysqli_num_rows($res); if($num>0){ $i=1; $row= ""; while($fet=mysqli_fetch_assoc($res)){ $row.= "<tr> <th><input type='checkbox' class='checkbox' name='mul_select[]' value='".$fet['online_f_id']."'/></th> <td>".$i++."</td> <td>".$fet['name']."</td> <td>".$fet['mo']."</td> <td>".$fet['c_short_f']."</td> </tr>"; } $row.='<input type="hidden" name="form_type" value="Online Form" >'; echo $row; } } elseif($form_type2 == 'Program Form' && !empty($course_id)){ $sql="select pro.*,pc.program_course from pro_form as pro join program_cource as pc on (pc.course_id= pro.course_id) where pro.course_id='$course_id'"; $res= mysqli_query($obj->mysqli,$sql); $num= mysqli_num_rows($res); if($num>0){ $i=1; $row= ""; while($fet=mysqli_fetch_assoc($res)){ $row.= "<tr> <th><input type='checkbox' class='checkbox' name='mul_select[]' value='".$fet['pro_f_id']."'/></th> <td>".$i++."</td> <td>".$fet['name']."</td> <td>".$fet['mo']."</td> <td>".$fet['program_course']."</td> </tr>"; } $row.='<input type="hidden" name="form_type" value="Program Form" >'; echo $row; } } break; case 'getCity': $state_id=$_REQUEST['state_id']; $sql="SELECT * FROM cities WHERE state_id= '".$state_id."'"; $res= mysqli_query($obj->mysqli,$sql); $option="<option value=''>-city-</option>"; while($row= mysqli_fetch_assoc($res)){ $option .= "<option value='".$row['city_id']."'>".$row['city_name']."</option>"; } echo $option; break; } ?>