{ $class = "even"; } $if_detain = LeftDetainedPassStudentTable::model()->findByAttributes(array('student_id'=>$stud_trans[0]['student_transaction_id'],'sem'=>$data['academic_term_id'])); if(!empty($if_detain)) {?> <tr class="<?php echo $class;?>"> <td><?php echo ++$i;?></td> <td><?php echo AcademicTermPeriod::model()->findByPk($if_detain['academic_term_period_id'])->academic_term_period; ?></td> <td><?php echo "Sem-".AcademicTerm::model()->findByPk($if_detain['sem'])->academic_term_name; ?></td> <td>Detain</td> </tr> <?php $m++; $st="Rejoin/Regular"; } $if_stud_arch = StudentArchiveTable::model()->findByAttributes(array('student_archive_stud_tran_id'=>$stud_trans[0]['student_transaction_id'],'student_archive_ac_t_n_id'=>$data['academic_term_id'])); if($if_stud_arch) {?> <tr class="<?php echo $class;?>"> <td><?php echo ++$i;?></td> <td><?php echo AcademicTermPeriod::model()->findByPk($if_stud_arch['student_archive_ac_t_p_id'])->academic_term_period; ?></td> <td><?php echo "Sem-".AcademicTerm::model()->findByPk($if_stud_arch['student_archive_ac_t_n_id'])->academic_term_name; ?></td> <td><?php echo $st;?></td> </tr> <?php $m++; } } ?>
$lin2 = "<b>".$address->student_address_c_line2."</b>"; $pc = "<b>".$address->student_address_c_pin."</b>"; if($address->student_address_c_city != 0) $ct = "<b>".City::model()->findByPk($address->student_address_c_city)->city_name."</b>"; if($address->student_address_c_state != 0) $stat = "<b>".State::model()->findByPk($address->student_address_c_state)->state_name."</b>"; $padd = "<b>".$address->student_address_p_line1.",".$address->student_address_p_line2."</b>"; if($address->student_address_p_city != 0) $pct = "<b>".City::model()->findByPk($address->student_address_p_city)->city_name."</b>"; if($address->student_address_p_state != 0) $pstat = "<b>".State::model()->findByPk($address->student_address_p_state)->state_name."</b>"; } $ac_pid = $trans->student_academic_term_period_tran_id; $arch = StudentArchiveTable::model()->find(array('condition'=>'student_archive_stud_tran_id='.$trans->student_transaction_id, 'order'=>'student_archive_ac_t_p_id desc')); if($arch) $ac_pid = $arch->student_archive_ac_t_p_id; $year = AcademicTermPeriod::model()->findByPk($ac_pid)->academic_term_period; $ref_no = ""; if(Yii::app()->controller->action->id=="certiview") { $certi= StudentCertificateDetailsTable::model()->find(array('condition'=>' student_certificate_details_table_student_id='.$trans->student_transaction_id.' and student_certificate_type_id='.$certificate_type,'order'=>'student_certificate_details_table_id desc')); $ref_no = $certi->certificate_reference_number; } else{ $certi = StudentCertificateDetailsTable::model()->find(array('order'=>'student_certificate_details_table_id desc')); $autonum = 0; if(!empty($certi) && $certi->certificate_reference_number!=""){ $arr = explode('/',$certi->certificate_reference_number); $autonum = $arr[3];
public function beforeDelete() { $id = $this->student_transaction_id; $fees_check = FeesPaymentTransaction::model()->findAll(array('condition' => 'fees_student_id=' . $id)); $att_check = Attendence::model()->findAll(array('condition' => 'st_id=' . $id)); $mis_fees = MiscellaneousFeesPaymentTransaction::model()->findAll(array('condition' => 'student_fees_id=' . $id)); $left_check = LeftDetainedPassStudentTable::model()->findAll(array('condition' => 'student_id=' . $id)); $st_archive = StudentArchiveTable::model()->findAll(array('condition' => 'student_archive_stud_tran_id=' . $id)); if (!empty($fees_check) || !empty($att_check) || !empty($mis_fees) || !empty($left_check) || !empty($st_archive)) { Yii::app()->user->setFlash('error', "You can not delete this record because it is used in another table."); return false; } else { Yii::app()->user->setFlash('success', "Deleted Sucessfully"); return true; } }
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer the ID of the model to be loaded */ public function loadModel($id) { $model = StudentArchiveTable::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
public function actionStudenthistory() { if (!empty($_POST['roll_no']) || !empty($_POST['en_no']) || !empty($_REQUEST['id'])) { if (!empty($_POST['en_no'])) { $str = 'stud_info.student_enroll_no=' . $_POST['en_no']; } if (!empty($_POST['roll_no'])) { $str = 'stud_info.student_roll_no=' . $_POST['roll_no']; } if (!empty($_REQUEST['id'])) { $str = 'stud_info.student_info_transaction_id =' . $_REQUEST['id']; } $stud_trans = Yii::app()->db->createCommand()->select('*')->from('student_transaction stud')->join('student_info stud_info', 'stud_info.student_id = stud.student_transaction_student_id')->where($str . ' and stud.student_transaction_organization_id=' . Yii::app()->user->getState('org_id'))->queryAll(); if (empty($stud_trans)) { Yii::app()->user->setFlash('no-student-found', "No Student Found."); $this->redirect(array('studenthistory')); } $transaction_id = $stud_trans[0]['student_transaction_id']; $stud_archive = StudentArchiveTable::model()->findAll(array('condition' => 'student_archive_stud_tran_id=' . $transaction_id)); $this->render('student_history_view', array('stud_archive' => $stud_archive, 'stud_trans' => $stud_trans)); } else { $this->render('student_history'); } }
public function actionStudenthistory() { if(!empty($_REQUEST['id'])) { $str = 'stud_info.student_info_transaction_id ='.$_REQUEST['id']; $stud_trans= Yii::app()->db->createCommand() ->select('*') ->from('student_transaction stud') ->join('student_info stud_info', 'stud_info.student_id = stud.student_transaction_student_id') ->where($str.' and stud.student_transaction_organization_id='.Yii::app()->user->getState('org_id')) ->queryAll(); $transaction_id= $stud_trans[0]['student_transaction_id']; $stud_archive = StudentArchiveTable::model()->findAll(array('condition'=>'student_archive_stud_tran_id='.$transaction_id)); $this->render('student_history_view', array( 'stud_archive'=>$stud_archive, 'stud_trans'=>$stud_trans, ) ); } else $this->render('student_history'); }
echo '<td>'; $stud_name=StudentInfo::model()->findByAttributes(array('student_info_transaction_id'=>$s['student_transaction_id'])); echo $stud_name->student_enroll_no; echo '</td>'; echo '<td colspan=2 align=left>'; echo $stud_name->student_first_name.' '.$stud_name->student_last_name.'<br> ( '.$stud_name->student_roll_no.' )'; echo '</td>'; echo '<td>'; echo date("d-m-Y",strtotime($stud_name->student_adm_date)); echo '</td>'; foreach($startYear as $y) { echo '<td style=width:150px; >'; $getSem = AcademicTerm::model()->findAll('academic_term_period_id ='.$y); foreach($getSem as $sem) { $status = StudentArchiveTable::model()->findAll(array('condition' => 'student_archive_stud_tran_id = '.$s['student_transaction_id'].' AND student_archive_ac_t_p_id ='.$y.' AND student_archive_ac_t_n_id ='.$sem['academic_term_id'])); if(!empty($status)) { foreach($status as $l) { $sName = AcademicTerm::model()->findByPk($l['student_archive_ac_t_n_id'])->academic_term_name; $sStatus = Studentstatusmaster::model()->findByPk($l['student_archive_status'])->status_name; echo 'SEM- '.$sName."-".$sStatus.'<br />'; } } else { $ldStatus = LeftDetainedPassStudentTable::model()->findAll('student_id ='. $s['student_transaction_id'].' AND academic_term_period_id ='.$y.' AND sem ='.$sem['academic_term_id']); if(!empty($ldStatus)) { foreach($ldStatus as $l)