.required{ display:none; } .row{ width:50%; } </style> <div class="portlet box blue"> <i class="icon-reorder"></i> <div class="portlet-title"><span class="box-title">Select Criterias</span> </div> <div class="wide form"> <?php $form=$this->beginWidget('CActiveForm', array( 'action'=>Yii::app()->createUrl($this->route), 'method'=>'get', )); ?> <div class="row"> <?php echo $form->labelEx($model,''); ?> <?php echo $form->dropDownList($model,'student_transaction_batch_id',CHtml::listData(Batch::model()->findAll(),'batch_id','batch_code'),array('empty' => 'Select Batch','tabindex'=>1));?> </div> <div class="row buttons"> <?php echo CHtml::submitButton('Search',array('class'=>'submit')); ?> </div> <?php $this->endWidget(); ?> </div><!-- search-form --> </div>
echo '<td>'; echo ++$m; echo '</td>'; $stud_tran=StudentTransaction::model()->findByPk($s); $stud_name=StudentInfo::model()->findByAttributes(array('student_info_transaction_id'=>$s)); echo '<td>'; if(!empty($stud_name->student_enroll_no)) echo $stud_name->student_enroll_no; else echo 'Not Set'; echo '</td>'; $batch=''; echo '<td colspan=5 align=left>'; if($stud_tran->student_transaction_batch_id!=0) $batch= Batch::model()->findByPk($stud_tran->student_transaction_batch_id)->batch_code; echo $stud_name->student_first_name.' '.$stud_name->student_last_name.' ( '.$stud_name->student_roll_no.' )'.'('.$batch.')'; echo '</td>'; $cs=0; for($l=0;$l<count($lectures);$l++) { if($lectures[$l]!=0) { if($cols[$l]>1) { $count=$comb_subject[$cs]; $cols_l=$cols[$l]; print "<td colspan=".$cols_b.">"; $t = $count - 1; for($j=0;$j<$count;$j++) {
'value' => '$data->Rel_Stud_Info->student_roll_no', ), array('name' => 'student_first_name', 'value' => '$data->Rel_Stud_Info->student_first_name', ), array('name' => 'student_middle_name', 'value' => '$data->Rel_Stud_Info->student_middle_name', ), array('name' => 'student_last_name', 'value' => '$data->Rel_Stud_Info->student_last_name', ), array('name'=>'student_transaction_batch_id', 'value'=>'($data->student_transaction_batch_id==0)?"":Batch::model()->findByPk($data->student_transaction_batch_id)->batch_code', 'filter' =>CHtml::listData(Batch::model()->findAll(),'batch_id','batch_code'), ), ), 'pager'=>array( 'class'=>'AjaxList', // 'maxButtonCount'=>25, 'maxButtonCount'=>$model->count(), 'header'=>'' ), )); ?></div>
?> <span class="status"> </span> <?php echo $form->error($model, 'student_transaction_division_id'); ?> </div> </div> <div class="row"> <div class="row-left"> <?php echo $form->labelEx($model, 'student_transaction_batch_id'); ?> <?php if (isset($model->student_transaction_batch_id)) { echo $form->dropDownList($model, 'student_transaction_batch_id', CHtml::listData(Batch::model()->findAll(array('condition' => 'branch_id=' . $model->student_transaction_branch_id . ' and batch_organization_id=' . $org_id . ' and div_id=' . $model->student_transaction_division_id)), 'batch_id', 'batch_code')); } else { echo $form->dropDownList($model, 'student_transaction_batch_id', array('empty' => '-----------Select---------'), array('tabindex' => 13)); } ?> <span class="status"> </span> <?php echo $form->error($model, 'student_transaction_batch_id'); ?> </div> <div class="row-right"> <?php echo $form->labelEx($model, 'student_transaction_shift_id'); ?> <?php
</div> </div> <?php $form=$this->beginWidget('CActiveForm', array( 'id'=>'attendence-form', 'htmlOptions'=>array('enctype'=>'multipart/form-data'), //'enableAjaxValidation'=>false, 'stateful'=>true, //'clientOptions'=>array('validateOnSubmit'=>true), )); ?> </style> <table class="report-table" width = 100%> <tr> <th><input type="checkbox" class="checkall"></th> <th colspan = 3>Batch : <?php if($_REQUEST['batch'] != 0) echo Batch::model()->findByPk($_REQUEST['batch'])->batch_code ;?> </br> Subject : <?php echo SubjectMaster::model()->findByPk($_REQUEST['subject_id'])->subject_master_name ;?> </th></tr> <tr class="table_header"> <th>P/A</th> <th> Roll No </th> <th> Name </th> </tr> <?php $count = 0; $count = count($row1); for($i=0;$i<count($row1);$i++) { $stud_id = $row1[$i]['student_transaction_id']; $name_lable = $row1[$i]['student_first_name'].' '.$row1[$i]['student_middle_name'].' '.$row1[$i]['student_last_name'];
<?php $i=1; $course_fees=$course->course_fees; $totalcollection=count($student_data)*$course_fees; $total_paid=0; $total_out=0; foreach($student_data as $stu_details) { echo '<tr align="center">'; echo '<td>'.$i.'</td>'; echo '<td>'.$stu_details['student_roll_no'].'</td>'; echo '<td>'.$stu_details['student_first_name']." ".$stu_details['student_middle_name']." ".$stu_details['student_last_name'].'</td>'; echo '<td>'.AcademicTermPeriod::model()->findByPk($stu_details['academic_term_period_id'])->academic_term_period.'</td>'; echo '<td>'.Course::model()->findByPk($stu_details['course_id'])->course_name.'</td>'; echo '<td>'.AcademicTerm::model()->findByPk($stu_details['academic_term_id'])->academic_term_name.'</td>'; echo '<td>'.Batch::model()->findByPk($stu_details['student_transaction_batch_id'])->batch_name.'</td>'; echo '<td>'.$course_fees.'</td>'; $paidfees_tmp = Yii::app()->db->createCommand() ->select('sum(fees_payment_amount) as paidfees') ->from('fees_payment_transaction') ->where('fees_payment_student_id = '.$stu_details['student_transaction_id']) ->queryRow(); $paidfees = array_filter($paidfees_tmp); if(!empty($paidfees)) $stu_paidfees = $paidfees['paidfees']; else $stu_paidfees = 0; echo '<td>'.$stu_paidfees.'</td>'; $out_fees=$course_fees-$stu_paidfees; echo '<td>'.$out_fees.'</td>';
/** * 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 = Batch::model()->findByPk((int) $id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
</div> <div class="row"> <?php echo $form->labelEx($model,'course_code'); ?> <?php echo $form->textField($model,'course_code',array('size'=>50,'maxlength'=>50)); ?><span class="status"> </span> <?php echo $form->error($model,'course_code'); ?> </div> <div class="row"> <?php echo $form->labelEx($model,'section_name'); ?> <?php echo $form->textField($model,'section_name',array('size'=>50,'maxlength'=>50)); ?><span class="status"> </span> <?php echo $form->error($model,'section_name'); ?> </div> <?php if(isset($_REQUEST['id'])) $batch=Batch::model()->findByPk($_REQUEST['id']); ?> <?php if(empty($batch->course_id)) { //echo $batch->course_id; ?> <h3 style="color: #000000;font-size: 15px;font-weight: bold;margin: 0 0 10px 5px;padding: 0 0 6px;width: 95%;">Initial Batch</h3> <div class="row"> <?php echo $form->labelEx($batch,'batch_name'); ?> <?php echo $form->textField($batch,'batch_name',array('size'=>50,'maxlength'=>50)); ?><span class="status"> </span> <?php echo $form->error($batch,'batch_name'); ?> </div> <div class="row"> <?php echo $form->labelEx($batch,'batch_fees'); ?> <?php echo $form->textField($batch,'batch_fees',array('size'=>50,'maxlength'=>50)); ?><span class="status"> </span> <?php echo $form->error($batch,'batch_fees'); ?> </div> <?php } /*
'type'=>'POST', 'url'=>CController::createUrl('dependent/getBatch'), 'update'=>'#StudentTransaction_student_transaction_batch_id', //selector to update ))); */ ?> <span class="status"> </span> <?php //echo $form->error($model,'academic_term_id'); ?> </div--> <div class="row-right"> <?php echo $form->labelEx($model,'student_transaction_batch_id'); ?> <?php //echo $model->academic_term_id." ".$model->course_id; if(!empty($model->student_transaction_batch_id)) echo $form->dropDownList($model,'student_transaction_batch_id',CHtml::listData(Batch::model()->findAll('academic_term_id ='. $model->academic_term_id.' OR course_id='.$model->course_id),'batch_id','batch_name'),array('prompt'=>"Select Batch")); else echo $form->dropDownList($model,'student_transaction_batch_id',array(), array('prompt' => 'Select Batch')); ?><span class="status"> </span> <?php echo $form->error($model,'student_transaction_batch_id'); ?> </div> </div> <div class="row buttons last"> <?php if(Yii::app()->user->checkAccess('StudentTransaction.UpdateStudentData') && (Yii::app()->user->getState('stud_id') == $_REQUEST['id']) || Yii::app()->user->checkAccess('StudentTransaction.UpdateAllStudentData')) echo CHtml::submitButton('Save', array('class'=>'submit')); ?> <?php echo CHtml::link('Cancel', array('update','id'=>$_REQUEST['id']), array('class'=>'btnCan')); ?> </div> <?php $this->endWidget(); ?> </div> </div>
{ if($list->batch_id != 0 && $f==1) { $f=0; continue; } else $rows=1; } $sub_array[] = $list->subject_id; print '<td rowspan='.$rows.'>'.$time[$list->lec].'</td>'; print '<td rowspan='.$rows.'>'.SubjectMaster::model()->findByPk($list->subject_id)->subject_master_name.'</td>'; print '<td rowspan='.$rows.'>'.EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id'=>$list->faculty_emp_id))->employee_first_name.'</td>'; if($list->batch_id != 0) print '<td rowspan='.$rows.'>'.Batch::model()->findByPk($list->batch_id)->batch_code.'</td>'; else print '<td rowspan='.$rows.'>-</td>'; print '<td rowspan='.$rows.'>'.RoomDetailsMaster::model()->findByPk($list->room_id)->room_name.'</td></tr>'; } print '</table>'; $sy_date = date('Y-m-d',strtotime($date)); $substr = implode(',',$sub_array); $syll = SubjectSyllabus::model()->findAll(array('condition'=>'sub_id in ('.$substr.') and start_date<="'.$sy_date.'" and end_date >="'.$sy_date.'"')); print '<div> </div>'; print '<table class="gradienttable" id="time-table-struc" style="font-size:15px;margin-top:50px;">'; print '<tr>'; print '<tr><td colspan=4 style="background:white"><b>Topics to be taught on '.$date.'</b></td></tr>';
<?php $form=$this->beginWidget('CActiveForm', array( 'id'=>'studentinfo-form', 'enableAjaxValidation'=>true, )); ?> <?php //echo $form->errorSummary($model); ?> <div class="block-error"> <?php echo Yii::app()->user->getFlash('no_student_found'); ?> </div> <div class="row"> <?php echo CHtml::label('Batch',''); ?> <?php echo CHtml::dropDownList('batch', null, CHtml::listData(Batch::model()->findAll(),'batch_id','batch_name'), array('empty' => 'Select Batch','tabindex'=>4));?> <?php echo CHtml::label('City',''); ?> <?php echo CHtml::dropDownList('city', null, City::items(), array('empty' => 'Select City','tabindex'=>5));?> <span class="status"> </span> </div> <div class="row"> <?php //echo CHtml::label('Blood Group',''); ?> <?php //echo CHtml::dropDownList('bg', null, StudentInfo::getBloodGroup(), array('empty' => 'Select Blood Group','tabindex'=>7));?> <?php echo CHtml::label('Gender',''); ?> <?php echo CHtml::dropDownList('gender', null, StudentInfo::getGenderOptions(), array('empty' => 'Select Gender','tabindex'=>8));?> </div> </div>
$syll = SubjectSyllabus::model()->findAll(array('condition'=>'sub_id='.$check->subject_id.' and start_date<="'.$sy_date.'" and end_date >="'.$sy_date.'"')); $top_str = ''; $top = $top_desc = ''; foreach($syll as $lst) { $top_str .= "<h3>".$lst['topic_name'].'</h3>'.$lst['topic_description']; $top = $lst['topic_name']; $top_desc = $lst['topic_description']; } if($check->batch_id != 0 && $check->batch_id !=$stud_model->student_transaction_batch_id) { continue; } if($check->batch_id != 0) $batch="(".Batch::model()->findByPk($check->batch_id)->batch_code.")"; $subname = SubjectMaster::model()->findByPk($check->subject_id)->subject_master_name; $room="(".RoomDetailsMaster::model()->findByPk($check->room_id)->room_name.")"; $emp_row = EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id'=>$check->faculty_emp_id)); $faculty="(".$emp_row->employee_name_alias.")"; if($batch) $str = $subname."</br>".$batch."</br>".$room."</br>".$faculty; else $str = $subname."</br>".$room."</br>".$faculty; if($syll) echo "<u>".$str."</u>"; else echo $str;
public function actiongetSmsEmailBatch() { $data=Batch::model()->findAll(array('condition'=>'course_id='.(int) $_REQUEST['StudentSmsEmailDetails']['student_sms_email_details_course_id'])); $data=CHtml::listData($data,'batch_id','batch_code'); echo "<option value=''>Select Batch</option>"; foreach($data as $value=>$name) { echo CHtml::tag('option', array('value'=>$value),CHtml::encode($name),true); } }
$this->breadcrumbs = array('Attendance'); ?> <table border="2px" id="twoColThinTable"> <tr class="row"> <td class="col1">Division </td> <td class="col2"><?php echo Division::model()->findByPk($_REQUEST['division_id'])->division_code; ?> </td> </tr> <tr class="row"> <td class="col1">Batch</td> <td class="col2"> <?php if ($_REQUEST['batch'] != 0) { echo Batch::model()->findByPk($_REQUEST['batch'])->batch_code; } ?> </td> </tr> <tr class="row"> <td class="col1">Subject </td> <td class="col2"> <?php echo SubjectMaster::model()->findByPk($_REQUEST['subject_id'])->subject_master_name; ?> </td> </tr> <tr class="row"> <td class="col1">Date </td> <td class="col2"> <?php echo $_REQUEST['date'];
<div class="block-error"> <?php echo Yii::app()->user->getFlash('not-select-attendece'); ?> </div> <div class="row"> <?php echo $form->labelEx($model,'sub_id'); ?> <?php echo $form->dropDownList($model,'sub_id', CHtml::listData(SubjectMaster::model()->findAll(), 'subject_master_id', 'subject_master_name'),array('prompt'=>'Select Subject')); ?><span class="status"> </span> <?php echo $form->error($model,'sub_id'); ?> </div> </div> <div class="first-row" > <div class="row"> <?php echo $form->labelEx($model,'batch_id'); ?> <?php echo $form->dropDownList($model,'batch_id', CHtml::listData(Batch::model()->findAll(), 'batch_id', 'batch_code'),array('prompt' => 'Select Batch')); ;?> <span class="status"> </span> <?php echo $form->error($model,'batch_id'); ?> </div> <div class="row"> <?php echo $form->labelEx($model,'employee_id'); ?> <?php //$faculty = array(); $facultytablelist = EmployeeTransaction::model()->findAll(); //$i=0; $facname=array(); foreach($facultytablelist as $f) {
</div> <?php $this->endWidget(); ?> </div> </div> <?php $year = date('Y'); if(isset($month)) { $m=0; $month_value = $month; $num = cal_days_in_month(CAL_GREGORIAN, $month_value, date('Y')); $org = Organization::model()->findAll(); $org_data=$org[0]; $batch_model=Batch::model()->findByPk($batch); ?> <div class="portlet box yellow" style="width:100%;margin-top:20px;"> <i class="icon-reorder"></i> <div class="portlet-title"><span class="box-title">Monthly All Subject Attendence Report</span> <div class="operation"> <?php echo CHtml::link('Back', array('Report/StudMonthlyAllsubjectAttendenceReport'), array('class'=>'btnback'));?> <?php echo CHtml::link('Excel', array('StudMonthlyAllsubjectAttendenceReport','excel'=>'excel','month'=>$month,'batch_id'=>$batch), array('class'=>'btnblue'));?> </div> </div> <div class="portlet-body" > <?php echo '<table class="report-table" border="2" > '; echo "<thead>"; echo "<tr align=center> <th colspan = 60 style=text-align:left;> ".CHtml::image(Yii::app()->controller->createUrl('/site/loadImage', array('id'=>$org_data->organization_id)),'No Image',array('width'=>80,'height'=>55,'style'=>'float:left;margin-left:200px;')) ." <big> <b>".$org_data->organization_name ."</big><br>". $org_data->address_line1." ".$org_data->address_line2."</br>" . City::model()->findBypk($org_data->city)->city_name.", ".State::model()->findBypk($org_data->state)->state_name.", ".Country::model()->findBypk($org_data->country)->name."." ." </th> <br> </tr>";
<div class="rowv"> <?php echo '<lable><b>Batch :</b></lable>'; ?> <div class="row_b"> <?php //if(isset($model->Rel_Batch->batch_name)) echo $model->Rel_Batch->batch_name .'<br>'; //else echo "N/A"; ?> <?php $batchid = StudentTransaction::model()->findByPk($model->student_archive_stud_tran_id)->student_transaction_batch_id; ?> <?php if (isset($batchid)) { echo Batch::model()->findByPk($batchid)->batch_name; } else { echo "N/A"; } ?> </div> </div> <div class="rowv"> <?php echo '<lable><b>Organization :</b></lable>'; ?>
public function actiongetStudBatch() { $org_id = Yii::app()->user->getState('org_id'); $data = Batch::model()->findAll(array('condition' => 'div_id=' . (int) $_REQUEST['StudentTransaction']['student_transaction_division_id'] . ' and batch_organization_id=' . $org_id)); $data = CHtml::listData($data, 'batch_id', 'batch_code'); echo "<option value=''>Select Batch</option>"; foreach ($data as $value => $name) { echo CHtml::tag('option', array('value' => $value), CHtml::encode($name), true); } }
echo $form->error($model, 'sub_id'); ?> </div> </div> <div class="first-row" > <div class="row"> <?php echo $form->labelEx($model, 'batch_id'); ?> <?php //echo $form->dropDownList($model,'batch_id',Batch::items(), array('empty' => '---------------Select-------------','tabindex'=>7)); ?> <?php if (isset($model->batch_id)) { echo $form->dropDownList($model, 'batch_id', CHtml::listData(Batch::model()->findAll(array('condition' => 'div_id=' . $model->div_id . ' and batch_organization_id=' . $org_id)), 'batch_id', 'batch_code'), array('prompt' => 'Select Batch')); } else { echo $form->dropDownList($model, 'batch_id', array('prompt' => 'Select Batch'), array('tabindex' => 7)); } ?> <span class="status"> </span> <?php echo $form->error($model, 'batch_id'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'employee_id'); ?> <?php
<tr> <td><?php echo $i; ?></td> <td><?php echo $stu_details['student_roll_no']; ?></td> <td style="word-wrap:break-word;"> <?php echo $stu_details['student_first_name']." ".$stu_details['student_middle_name']." ".$stu_details['student_last_name']; ?> </td> <!--td> <?php //echo AcademicTermPeriod::model()->findByPk($stu_details['academic_term_period_id'])->academic_term_period; ?> </td--> <td> <?php echo Course::model()->findByPk($stu_details['course_id'])->course_name; ?> </td> <?php //$academic_term = AcademicTerm::model()->findByPk($stu_details['academic_term_id']); //echo '<td>'.(!empty($academic_term) ? $academic_term->academic_term_name : 'Not Set'). '</td>'; $branch_name = Batch::model()->findByPk($stu_details['student_transaction_batch_id']); echo '<td>'.(!empty($branch_name) ? $branch_name->batch_name : 'Not Set').'</td>'; ?> <td> <?php echo $batch_fees; ?> </td> <?php $paidfees_tmp = Yii::app()->db->createCommand() ->select('sum(fees_payment_amount) as paidfees') ->from('fees_payment_transaction') ->where('fees_payment_student_id = '.$stu_details['student_transaction_id'].' AND fees_payment_batch_id='.$stu_details['student_transaction_batch_id'].' AND fees_student_course_id='.$stu_details['course_id']) ->queryRow(); $paidfees = array_filter($paidfees_tmp); if(!empty($paidfees)) $stu_paidfees = $paidfees['paidfees']; else $stu_paidfees = 0;
'prompt' => 'Select Course', 'ajax' => array( 'type'=>'POST', 'url'=>CController::createUrl('dependent/getCBatch'), 'update'=>'#StudentTransaction_student_transaction_batch_id', //selector to update ))); ?><span class="status"> </span> <?php echo $form->error($model,'course_id'); ?> </div> <div class="row-right"> <?php echo $form->labelEx($model,'student_transaction_batch_id'); ?> <?php if(!empty($model->student_transaction_batch_id)) echo $form->dropDownList($model,'student_transaction_batch_id',CHtml::listData(Batch::model()->findAll(),'batch_id','batch_name'),array('prompt'=>"Select Batch")); else echo $form->dropDownList($model,'student_transaction_batch_id', array('empty' => 'Select Batch')); ?><span class="status"> </span> <?php echo $form->error($model,'student_transaction_batch_id'); ?> </div> </div> <div class="row"> <div class="row-left"> <?php echo $form->labelEx($info,'student_mobile_no'); ?> <?php echo $form->textField($info,'student_mobile_no',array('size'=>13)); ?><span class="status"> </span><br><br> <?php echo $form->error($info,'student_mobile_no'); ?> </div> <div class="row-right"> <?php echo $form->labelEx($info,'passport_no'); ?> <?php echo $form->textField($info,'passport_no',array('size'=>13,'maxlength'=>20)); ?>
protected function renderContent() { $day = array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); if (Yii::app()->user->getState('stud_id')) { $date = date('Y-m-d'); $ts = strtotime($date); $week_number = date('W', $ts); $year = date('Y'); for ($day1 = 1; $day1 < 7; $day1++) { $alldate[] = date('d-m-Y', strtotime($year . "W" . $week_number . $day1)); } $criteria = new CDbCriteria(); //$criteria->select = 'academic_term_id'; // select fields which you want in output $criteria->condition = 'current_sem = 1 AND academic_term_organization_id = ' . Yii::app()->user->getState('org_id'); $semname = AcademicTerm::model()->findAll($criteria); $data = CHtml::listData($semname, 'academic_term_id', 'academic_term_id'); $stud_model = StudentTransaction::model()->findByPk(Yii::app()->user->getState('stud_id')); $check_sem = in_array($stud_model->student_academic_term_name_id, $data); //var_dump($check_sem); exit; $timetableid = 0; if (!$check_sem) { echo "<h3 align=center style=color:red>Sorry, No timetable available for this student.</h3>"; } else { $check_timetable = TimeTableDetail::model()->findByAttributes(array('acdm_name_id' => $stud_model->student_academic_term_name_id, 'division_id' => $stud_model->student_transaction_division_id)); if (empty($check_timetable)) { echo "<h3 align=center style=color:red>Sorry, No timetable available for this student.</h3>"; } else { $timetableid = $check_timetable->timetable_id; $model = TimeTable::model()->findByPk($timetableid); $nooflec = $model->No_of_Lec; $sum = $nooflec; $lec_duration = LecDuration::model()->findAllByAttributes(array(), $condition = 'timetable_id = :table_id ', $params = array(':table_id' => $timetableid)); $lec = array(); foreach ($lec_duration as $l) { $lec[] = $l['duration']; } $createdate = date_create($model->creation_date); $starti = 1; if ($model->zero_lec == 1) { $starti = 0; } $time = $model->clg_start_time; $time = date('H:i A', strtotime($time)); $timestamp = strtotime($time); $time = date('g:i A', $timestamp); ?> <table id="time-table-struc" bgcolor="#CBE7ED" border="2" style= width:auto;font-size:8px;border-collapse:collapse; height:auto;" align="center"> <th align=center> Day/Time </th> <?php $i = 0; while ($i < 6) { echo "<th>" . $day[$i] . "</br>(" . $alldate[$i] . ")</th>"; $i++; } $break = ""; $l = 0; $count = array(1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0); for ($i = $starti; $i <= $nooflec; $i++) { $days = count($day); echo "<tr>"; $duration = NoOfBreakTable::model()->findByAttributes(array('timetable_id' => $timetableid, 'after_lec_break' => $i)); $dur = $duration['duration']; if ($dur) { $dur1 = date('i', strtotime($dur)); } if ($break) { echo "<td style=width:100px;>" . $time . "-</br>" . date('g:i A', strtotime($time) + $dur1 * 60) . "</td><td colspan=7 align=center><font color='green'><b>Break</b></font></td></tr>"; $break = ""; $timestamp = strtotime($time) + $dur1 * 60; $time = date('g:i A', $timestamp); $i--; continue; } else { echo "<td style=width:100px;>" . $time . "-</br>" . date('g:i A', strtotime($time) + 60 * $lec[$l]) . "</td>"; $timestamp = strtotime($time) + 60 * $lec[$l]; $l++; $time = date('g:i A', $timestamp); } for ($j = 1; $j <= $days; ++$j) { $subname = ""; $room = ""; $faculty = ""; $batch = ""; if ($count[$j] > 0) { $count[$j]--; continue; } $result = TimeTableDetail::model()->findAllByAttributes(array(), $condition = 'timetable_id = :table_id AND day = :day AND lec = :lec AND division_id = :div_id AND lecture_date = :lecdate and proxy_status <> :proxy_status', $params = array(':table_id' => $timetableid, ':day' => $j, ':lec' => $i, ':div_id' => $stud_model->student_transaction_division_id, ':lecdate' => date('Y-m-d', strtotime($alldate[$j - 1])), ':proxy_status' => 2)); $break = NoOfBreakTable::model()->findAllByAttributes(array(), $condition = 'timetable_id = :table_id AND after_lec_break = :lec', $params = array(':table_id' => $timetableid, ':lec' => $i)); if ($result) { foreach ($result as $list) { if ($list['lect_hour'] > 1) { $count[$j] = $list['lect_hour'] - 1; } echo "<td rowspan=" . $list['lect_hour'] . " align=center style=background:#C0CCCC; width:100px;>"; break; } foreach ($result as $check) { if ($check->batch_id != 0) { $batch = "(" . Batch::model()->findByPk($check->batch_id)->batch_name . ")"; } $subname = SubjectMaster::model()->findByPk($check->subject_id)->subject_master_alias; $room = "(" . RoomDetailsMaster::model()->findByPk($check->room_id)->room_name . ")"; $faculty = "(" . EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id' => $check->faculty_emp_id))->employee_name_alias . ")"; if ($batch) { echo "</br>" . $subname . "</br>" . $batch . "</br>" . $room . "</br>" . $faculty; } else { echo "</br>" . $subname . "</br>" . $room . "</br>" . $faculty; } } echo "</td>"; } else { echo "<td style=width:100px;>" . $subname . "</br>" . $batch . "</br>" . $room . "</br>" . $faculty . "</td>"; } } echo "</tr>"; } echo "</table>"; ?> <h5>Proxy details</h5> <table id="time-table-struc" style="font-size:10px;"> <tr> <th>Sr. No.</th> <th>Employee Name</th> <th>Proxy Employee Name</th> <th>Subject</th> <th>Lecture No.</th> <th>Date</th> </tr> <?php $proxy_data = TimeTableDetail::model()->findAllByAttributes(array(), $condition = 'timetable_id = :timetable_id and division_id = :div_id and lecture_date >= :start and lecture_date< :end and proxy_status = :proxy order by lec', $params = array(':timetable_id' => $timetableid, ':div_id' => $stud_model->student_transaction_division_id, ':start' => date('Y-m-d', strtotime($alldate[0])), ':end' => date('Y-m-d', strtotime($alldate[5])), ':proxy' => 1)); $n = 0; foreach ($proxy_data as $list) { $result = TimeTableDetail::model()->findByPk($list->proxy_id); ?> <tr> <td><?php echo ++$n; ?> </td> <td><?php echo EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id' => $list->faculty_emp_id))->employee_first_name; ?> </td> <td><?php echo EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id' => $result->faculty_emp_id))->employee_first_name; ?> </td> <td><?php echo SubjectMaster::model()->findByPk($result->subject_id)->subject_master_alias; ?> </td> <td><?php echo $result->lec; ?> </td> <td><?php echo date('d-m-Y', strtotime($result->lecture_date)); ?> </td> </tr> <?php } ?> </table> <?php } //ELSE END } } else { if (Yii::app()->user->getState('emp_id')) { $timetableid = 0; $date = date('Y-m-d'); $ts = strtotime($date); $week_number = date('W', $ts); $alldate[0] = 'No'; $year = date('Y'); for ($day2 = 1; $day2 < 7; $day2++) { $alldate[$day2] = date('d-m-Y', strtotime($year . "W" . $week_number . $day2)); } $semname = AcademicTerm::model()->findAllByAttributes(array(), $condition = 'current_sem = :current_sem and academic_term_organization_id=:org_id', $params = array(':current_sem' => 1, ':org_id' => Yii::app()->user->getState('org_id'))); foreach ($semname as $s) { $semid = $s['academic_term_id']; $check = TimeTableDetail::model()->findByAttributes(array('acdm_name_id' => $semid, 'faculty_emp_id' => Yii::app()->user->getState('emp_id'))); if ($check) { $timetableid = $check['timetable_id']; break; } } if (!empty($timetableid)) { $day = array(" ", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); $model = TimeTable::model()->findByPk($timetableid); $nooflec = $model->No_of_Lec; $sum = $nooflec; $lec_duration = LecDuration::model()->findAllByAttributes(array(), $condition = 'timetable_id = :table_id ', $params = array(':table_id' => $timetableid)); $lec = array(); foreach ($lec_duration as $l) { $lec[] = $l['duration']; } $starti = 1; if ($model->zero_lec == 1) { $starti = 0; } $time = $model->clg_start_time; $time = date('H:i A', strtotime($time)); $createdate = date_create($model->creation_date); ?> <table id="time-table-struc" bgcolor="#CBE7ED" border="2" style="width:auto;font-size:9px;border-collapse:collapse; height:auto;" > <th> Day/Time </th> <?php $i = 0; while ($i < 7) { echo "<th style='font-size:8px'>" . $day[$i] . "</br>(" . $alldate[$i] . ")</th>"; $i++; } $l = 0; $break = ""; $dur1 = 0; $count = array(1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0); for ($i = $starti; $i <= $nooflec; $i++) { $days = count($day); echo "<tr>"; $duration = NoOfBreakTable::model()->findByAttributes(array('timetable_id' => $timetableid, 'after_lec_break' => $i)); if ($duration) { $dur = $duration['duration']; $dur1 = date('i', strtotime($dur)); } if ($break) { echo "<td style=width:100px;>" . $time . "-</br>" . date('g:i A', strtotime($time) + $dur1 * 60) . "</td><td colspan=7 align=center ><font color='green'><b>Break</b></font></td></tr>"; $break = ""; $timestamp = strtotime($time) + $dur1 * 60; $time = date('g:i A', $timestamp); $i--; continue; } else { echo "<td style=width:100px;>" . $time . "-</br>" . date('g:i A', strtotime($time) + 60 * $lec[$l]) . "</td><td style=width:25px;><b>" . $i . "</b></td>"; $timestamp = strtotime($time) + 60 * $lec[$l]; $l++; $time = date('g:i A', $timestamp); } for ($j = 1; $j <= $days - 1; ++$j) { $subname = ""; $room = ""; $faculty = ""; $batch = ""; if ($count[$j] > 0) { $count[$j]--; continue; } $result = TimeTableDetail::model()->findAllByAttributes(array(), $condition = 'day = :day AND lec = :lec AND faculty_emp_id = :emp_id AND timetable_id=:table_id AND lecture_date =:lecdate and proxy_status <> :status', $params = array(':table_id' => $timetableid, ':day' => $j, ':lec' => $i, ':emp_id' => Yii::app()->user->getState('emp_id'), ':lecdate' => date('Y-m-d', strtotime($alldate[$j])), ':status' => 2)); $break = NoOfBreakTable::model()->findAllByAttributes(array(), $condition = 'after_lec_break = :lec AND timetable_id=:table_id', $params = array(':table_id' => $timetableid, ':lec' => $i)); if ($result) { foreach ($result as $list) { if ($list['lect_hour'] > 1) { $count[$j] = $list['lect_hour'] - 1; } echo "<td rowspan=" . $list['lect_hour'] . " align=center style=background:#C0CCCC; border-color:black; width:150px;>"; break; } foreach ($result as $check) { if ($check->batch_id != 0) { $batch = "(" . Batch::model()->findByPk($check->batch_id)->batch_name . ")"; } $subname = SubjectMaster::model()->findByPk($check->subject_id)->subject_master_alias; $room = "(" . RoomDetailsMaster::model()->findByPk($check->room_id)->room_name . ")"; $div = Division::model()->findByPk($check->division_id)->division_code; //$faculty="(".EmployeeInfo::model()->findByPk($check->faculty_emp_id)->employee_name_alias.")"; if ($batch) { echo $subname . "</br>" . $batch . "</br>" . $room; } else { echo $subname . "</br>" . "(" . $div . ")" . "</br>" . $room; } } echo "</td>"; } else { echo "<td style=width:150px;>" . $subname . "</br>" . $batch . "</br>" . $room . "</td>"; } } //for j end echo "</tr>"; } //for i end echo "</table>"; ?> <h5>Proxy Lectures</h5> <table id="time-table-struc" border="1" style="font-size:10px;"> <tr> <th>Sr. No.</th> <th>Employee Name</th> <th>Division</th> <th>Subject</th> <th>Room</th> <th>Lecture No.</th> <th>Date</th> </tr> <?php $proxy_data = TimeTableDetail::model()->findAllByAttributes(array(), $condition = 'timetable_id = :timetable_id and proxy_employee_id = :emp_id and lecture_date >= :start and lecture_date< :end and proxy_status = :proxy order by lec', $params = array(':timetable_id' => $timetableid, ':emp_id' => Yii::app()->user->getState('emp_id'), ':start' => date('Y-m-d', strtotime($alldate[0])), ':end' => date('Y-m-d', strtotime($alldate[5])), ':proxy' => 1)); $n = 0; foreach ($proxy_data as $list) { $result = TimeTableDetail::model()->findByPk($list->proxy_id); ?> <tr> <td><?php echo ++$n; ?> </td> <td><?php echo EmployeeInfo::model()->findByAttributes(array('employee_info_transaction_id' => $list->faculty_emp_id))->employee_first_name; ?> </td> <td><?php echo Division::model()->findByPk($result->division_id)->division_code; ?> </td> <td><?php echo SubjectMaster::model()->findByPk($result->subject_id)->subject_master_alias; ?> </td> <td><?php echo RoomDetailsMaster::model()->findByPk($result->room_id)->room_name; ?> </td> <td><?php echo $result->lec; ?> </td> <td><?php echo date('d-m-Y', strtotime($result->lecture_date)); ?> </td> </tr> <?php } ?> </table> <?php } else { echo "<h3 align=center style=color:red>Sorry, No timetable available.</h3>"; } } } }
<?php $this->endWidget(); ?> </div><!-- form --> </div> <?php if(!empty($info_model)) { if(empty($model)) { echo "<div class='block-error'>"; echo "No fees record available for this student."; echo "</div>"; } else { $batch=Batch::model()->findByPk($info_model[0]['student_transaction_batch_id']); $student_name=StudentInfo::model()->findByPk($info_model[0]['student_transaction_student_id']); $course=Course::model()->findByPk($batch->course_id); $full_name = $student_name->student_first_name." ".$student_name->student_middle_name." ".$student_name->student_last_name; ?> <?php //echo "<div style='float:right;' class='total-amount'><h4>Total Paid Fees : <b>".$model::paidAmount() .'</b></h4></div>'; ?> <div class="portlet box gray" style="margin-top:20px;width:50%"> <i class="icon-reorder"></i> <div class="portlet-title"><span class="box-title">Student Details</span> </div> <table border="2px" class="report-table" width="100%"> <tr class="row"> <td class="col1">Name </td> <td class="col2"><?php echo $full_name;?></td> </tr>
public function actiongetAttendenceBatch() { $org_id = Yii::app()->user->getState('org_id'); $data = Batch::model()->findAll(array('condition' => 'div_id=' . (int) $_REQUEST['Attendence']['div_id'] . ' and batch_organization_id=' . $org_id)); $data = CHtml::listData($data, 'batch_id', 'batch_code'); foreach ($data as $value => $name) { echo CHtml::tag('option', array('value' => $value), CHtml::encode($name), true); } }
//echo "<table border=\"1\" >"; echo "<table>"; $i = 1; foreach($selected_list as $s) { if($s=='batch_name') { echo "<tr><td class=\"label\">Batch Name</td>"; if($sd['student_transaction_batch_id']==0) echo "<td style='text-align:center;'><i>Not Set</i></td></tr>"; else echo "<td style='text-align:center;'>".Batch::model()->findByPk($sd['student_transaction_batch_id'])->$s."</td></tr>"; } /*else if($s=='sem') { echo "<tr><td class=\"label\">Semester</td>"; echo "<td>".AcademicTerm::model()->findByPk($sd['student_academic_term_name_id'])->academic_term_name."</td></tr>"; } */ else if($s=='student_address_c_line1') { echo "<tr><td class=\"label\">Local Address </td>"; if($sd['student_transaction_student_address_id']!=0) { if(!empty(StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_c_city)) { $add_c = "<br/>".City::model()->findByPk(StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_c_city)->city_name.", "; }
.title{color:seagreen;} td{border:0.4px solid #74b9f0;height:24px;} .label{text-align:left;font-weight:normal;color:#990a10;width:110px;height:24px;} </style> <?php $StudentInfo = StudentInfo::model()->findByPk($student_transaction[0]->student_transaction_student_id); $AcademicTermPeriod = AcademicTermPeriod::model()->findByPk($student_transaction[0]->academic_term_period_id); $AcademicTerm = AcademicTerm::model()->findByPk($student_transaction[0]->academic_term_id); if($student_transaction[0]->student_transaction_nationality_id != null) $Nationality = Nationality::model()->findByPk($student_transaction[0]->student_transaction_nationality_id); else $Nationality = new Nationality; $Batch = Batch::model()->findByPk($student_transaction[0]->student_transaction_batch_id); $Course = Course::model()->findByPk($student_transaction[0]->course_id); if($student_transaction[0]->student_transaction_languages_known_id != null) $LanguagesKnown = LanguagesKnown::model()->findByPk($student_transaction[0]->student_transaction_languages_known_id); if($student_transaction[0]->student_transaction_student_address_id != null) $StudentAddress = StudentAddress::model()->findByPk($student_transaction[0]->student_transaction_student_address_id); else $StudentAddress = new StudentAddress; if($student_transaction[0]->student_transaction_parent_id != null || $student_transaction[0]->student_transaction_parent_id != 0) $parent = ParentLogin::model()->findByPk($student_transaction[0]->student_transaction_parent_id); else $parent = new ParentLogin; ?> <h3 class="title">Student Detail</h3> <table class="no_border">
/** * Deletes a particular model. * If deletion is successful, the browser will be redirected to the 'admin' page. * @param integer $id the ID of the model to be deleted */ public function actionDelete($id) { $st_tran = StudentTransaction::model()->findAll(array('condition' => 'course_id=' . $id)); $batch_d = Batch::model()->findAll(array('condition' => 'course_id=' . $id)); if (!empty($st_tran)) { throw new CHttpException(400, 'You can not delete this record because it is used in another table.'); } else { $this->loadModel($id)->delete(); foreach ($batch_d as $b) { Batch::model()->findByPk($b->batch_id)->delete(); } } // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser if (!isset($_GET['ajax'])) { $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin')); } }