/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. */ public function actionCreate($id) { $course = StudentTransaction::model()->findByPk($id)->student_transaction_course_id; $cDetails = CourseMaster::model()->findByPk($course); $model = new StudentPaidFeesDetails(); // Uncomment the following line if AJAX validation is needed $this->performAjaxValidation($model); if (isset($_POST['StudentPaidFeesDetails'])) { $model->attributes = $_POST['StudentPaidFeesDetails']; $model->student_paid_student_id = $id; $model->student_paid_course_id = $course; $model->student_paid_date = new CDbExpression('NOW()'); $model->student_paid_to = Yii::app()->user->id; if ($model->save()) { $this->redirect(array('admin')); } } $this->render('create', array('model' => $model, 'cDetails' => $cDetails)); }
/** * 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) { if (Yii::app()->request->isPostRequest) { // we only allow deletion via POST request $this->loadModel($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')); } } else { if (!Yii::app()->request->isPostRequest) { $course = CourseMaster::model()->findAll(array('condition' => 'course_category_id=' . $id)); if (!empty($course)) { throw new CHttpException(400, 'You can not delete this record because it is used in another table.'); } else { $this->loadModel($id)->delete(); $this->redirect(array('admin')); } } else { throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.'); } } }
</div> <?php if (!empty($recStud)) { ?> <table class="course-details"> <tr> <th style="width:140px;">Student Name</th> <th style="width:140px;">Enroll in Course</th> <th style="width:140px;">Joining Date</th> </tr> <?php foreach ($recStud as $list) { $info = StudentInfo::model()->findByPk($list['student_transaction_student_id']); echo '<tr>'; echo '<td>' . $info->student_first_name . '</td>'; echo '<td>' . CourseMaster::model()->findByPk($list['student_transaction_course_id'])->course_name . '</td>'; echo '<td>' . $info->student_adm_date . '</td>'; echo '</tr>'; } ?> </table> <?php } else { echo '<span style="padding: 20px;">Student not Exist</span>'; } ?> </div> <?php $studCount = array(); $courses = Yii::app()->db->createCommand()->select('count(*) as studCount, student_transaction_course_id, course_name ')->from('student_transaction')->join('course_master ', 'course_master_id=student_transaction_course_id')->group('student_transaction_course_id')->queryAll();
if (isset($v['student_academic_term_name_id'])) { echo "Sem-" . AcademicTerm::model()->findByPk($v['student_academic_term_name_id'])->academic_term_name; } else { echo "N/A"; } ?> </td> <td> <?php echo StudentStatusMaster::model()->findByPk($v['student_transaction_detain_student_flag'])->status_name; ?> </td> <td> <?php echo CourseMaster::model()->findByPk($v['student_transaction_course_id'])->course_name; ?> </td> </tr> <?php } // end if } // end for loop ?> </table> <?php }
<h1>Reset Student Password</h1> <div class="portlet box blue"> <div class="portlet-title"> Student List </div> <?php //echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); $dataProvider = $model->resetloginstudentsearch(); if (Yii::app()->user->getState("pageSize", @$_GET["pageSize"])) { $pageSize = Yii::app()->user->getState("pageSize", @$_GET["pageSize"]); } else { $pageSize = Yii::app()->params['pageSize']; } $dataProvider->getPagination()->setPageSize($pageSize); ?> <div class="block-error"> <?php echo Yii::app()->user->getFlash('resetstudpassword'); ?> </div> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'student-transaction-grid', 'dataProvider' => $dataProvider, 'filter' => $model, 'columns' => array(array('header' => 'SI No', 'class' => 'IndexColumn'), array('name' => 'student_enroll_no', 'value' => '$data->Rel_Stud_Info->student_enroll_no'), array('name' => 'student_first_name', 'value' => '$data->Rel_Stud_Info->student_first_name'), array('name' => 'student_last_name', 'value' => '$data->Rel_Stud_Info->student_last_name'), array('name' => 'student_academic_term_period_tran_id', 'value' => 'AcademicTermPeriod::model()->findByPk($data->student_academic_term_period_tran_id)->academic_term_period', 'filter' => CHtml::listData(AcademicTermPeriod::model()->findAll(), 'academic_terms_period_id', 'academic_term_period')), array('name' => 'student_transaction_course_id', 'value' => 'CourseMaster::model()->findByPk($data->student_transaction_course_id)->course_name', 'filter' => CHtml::listData(CourseMaster::model()->findAll(), 'course_master_id', 'course_name')), array('name' => 'student_transaction_user_id', 'value' => 'User::model()->findByPk($data->student_transaction_user_id)->user_organization_email_id', 'filter' => CHtml::listData(User::model()->findAll(array('condition' => ' user_type="student"')), 'user_id', 'user_organization_email_id')), array('class' => 'CButtonColumn', 'template' => '{Reset Password}', 'buttons' => array('Reset Password' => array('label' => 'Reset Password', 'url' => 'Yii::app()->createUrl("user/update_stud_password", array("id"=>$data->student_transaction_user_id))', 'imageUrl' => Yii::app()->baseUrl . '/images/Reset Password.png', 'options' => array('id' => 'update-student-status'))))), 'pager' => array('class' => 'AjaxList', 'maxButtonCount' => $model->count(), 'header' => ''))); ?> </div>
?> </li> <li><label>Last Name:</label><?php echo $student->student_last_name; ?> </li> <li><label>Gender:</label> <?php echo $student->student_gender; ?> </li> <li><label>Birth Date:</label> <?php echo $student->student_dob; ?> </li> <li><label>Email:</label><?php echo $student->student_email_id_1; ?> </li> </ul> <div class="portlet box blue" style="width:92%; "> <i class="icon-reorder"></i> <div class="portlet-title">My Course Details </div> <?php $courseModel = CourseMaster::model()->findByPk($checkUser->student_transaction_course_id); $this->widget('application.extensions.DetailView4Col', array('data' => $courseModel, 'attributes' => array('course_name', 'course_level', 'course_completion_hours', 'course_code', array('name' => 'course_cost', 'type' => 'raw', 'value' => $courseModel->concated)), 'htmlOptions' => array('class' => 'custom-view'))); ?> </div>
?> <span class="status"> </span> <?php echo $form->error($model, 'student_transaction_detain_student_flag'); ?> </div> </div> <div class="row"> <div class="row-left"> <?php echo $form->labelEx($model, 'student_transaction_course_id'); ?> <?php echo $form->dropDownList($model, 'student_transaction_course_id', CHtml::listData(CourseMaster::model()->findAll(), 'course_master_id', 'course_name'), array('prompt' => 'Select Course')); ?> <span class="status"> </span> <?php echo $form->error($model, 'student_transaction_course_id'); ?> </div> </div> <div class="row buttons"> <?php echo CHtml::submitButton($model->isNewRecord ? 'Add' : 'Save', array('class' => 'submit')); ?> <?php echo CHtml::link('Cancel', array('admin'), array('class' => 'btnCan')); ?>
/** * Manages all models. */ public function actionAdmin($id) { $courseModel = CourseMaster::model()->findByPk($id); $model = new CourseUnitTable('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['CourseUnitTable'])) { $model->attributes = $_GET['CourseUnitTable']; } $this->render('admin', array('model' => $model, 'courseModel' => $courseModel)); }
</div> <div class="portlet box blue"> <div class="portlet-title"> Student List </div> <?php echo CHtml::link('Add New +', array('studentTransaction/create'), array('class' => 'btn green')); ?> <?php $dataProvider = $model->search(); if (Yii::app()->user->getState("pageSize", @$_GET["pageSize"])) { $pageSize = Yii::app()->user->getState("pageSize", @$_GET["pageSize"]); } else { $pageSize = Yii::app()->params['pageSize']; } $dataProvider->getPagination()->setPageSize($pageSize); ?> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'student-transaction-grid', 'dataProvider' => $dataProvider, 'filter' => $model, 'ajaxUpdate' => false, 'selectionChanged' => "function(id){\n\t\twindow.location='" . Yii::app()->urlManager->createUrl('student/studentTransaction/update', array('id' => '')) . "' + \$.fn.yiiGridView.getSelection(id);\n\t}", 'columns' => array(array('header' => 'SI No', 'class' => 'IndexColumn'), array('name' => 'student_enroll_no', 'value' => '$data->Rel_Stud_Info->student_enroll_no'), array('name' => 'student_first_name', 'value' => '$data->Rel_Stud_Info->student_first_name'), array('name' => 'student_last_name', 'value' => '$data->Rel_Stud_Info->student_last_name'), array('name' => 'student_academic_term_period_tran_id', 'value' => 'AcademicTermPeriod::model()->findByPk($data->student_academic_term_period_tran_id)->academic_term_period'), array('name' => 'status_name', 'value' => '$data->Rel_Status->status_name'), array('name' => 'student_transaction_course_id', 'value' => '!empty($data->student_transaction_course_id) ? $data->relCourse->course_name : "N/A"', 'filter' => CHtml::listData(CourseMaster::model()->findAll(), 'course_master_id', 'course_name')), array('type' => 'raw', 'value' => 'CHtml::image(Yii::app()->baseUrl."/college_data/stud_images/" . $data->Rel_Photos->student_photos_path, "No Image",array("width"=>"20px","height"=>"20px"))')), 'pager' => array('class' => 'AjaxList', 'maxButtonCount' => $model->count(), 'header' => ''))); ?> </div>
<?php $this->breadcrumbs = array('Paid Fees Student List' => array('takeFees'), 'Manage'); ?> <h1> Paid Fees Student List</h1> <div class="portlet box blue"> <div class="portlet-title">Student List </div> <?php echo CHtml::link('Take Fees', array('/student/studentPaidFeesDetails/takeFees'), array('class' => 'btn green')); $this->widget('zii.widgets.grid.CGridView', array('id' => 'student-paid-fees-details-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'selectionChanged' => "function(id){\n\t\twindow.location='" . Yii::app()->urlManager->createUrl('/student/studentPaidFeesDetails/view', array('id' => '')) . "' + \$.fn.yiiGridView.getSelection(id);\n\t}", 'columns' => array(array('header' => 'SI No', 'class' => 'IndexColumn'), array('header' => 'Student Name', 'name' => 'student_first_name', 'value' => '$data->relStudent->student_first_name'), array('header' => 'Course', 'name' => 'student_paid_course_id', 'value' => '$data->relCourse->course_name', 'filter' => CHtml::listData(CourseMaster::model()->findAll(), 'course_master_id', 'course_name')), array('name' => 'student_paid_amount', 'value' => '$data->concated'), 'student_paid_date'))); ?> </div>
?> </div> <div class="row"> <?php echo CHtml::label('Gender', ''); ?> <?php echo CHtml::dropDownList('gender', null, StudentInfo::getGenderOptions(), array('empty' => 'Select Gender', 'tabindex' => 8)); ?> <?php echo CHtml::label('Course', ''); ?> <?php echo CHtml::dropDownList('course', null, CHtml::listData(CourseMaster::model()->findAll(), 'course_master_id', 'course_name'), array('empty' => 'Select Course', 'tabindex' => 9)); ?> </div> </div> </div> <div class="dynamic-report-form"> <?php echo $this->renderPartial('criteria_selection_form', array('query' => $query)); ?> <div class="row buttons"> <?php echo CHtml::submitButton('Submit', array('class' => 'submit', 'tabindex' => 32, 'style' => 'margin-left: 0; margin-top: 18px;')); ?>
/** * 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 = CourseMaster::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
public function actionCourseDetails() { $courseData = StudentTransaction::model()->findByPk($_REQUEST['id'])->student_transaction_course_id; if ($courseData != 0) { $courseDetails = CourseMaster::model()->findByPk($courseData); $courseUnits = CourseUnitTable::model()->findAll('course_unit_master_id=' . $courseDetails->course_master_id); $this->render('courseDetails', array('courseDetails' => $courseDetails, 'courseUnits' => $courseUnits)); } else { $noCourse = "No course assign"; $this->render('courseDetails', array('noCourse' => $noCourse)); } }
echo "<td style='text-align:center;'>" . City::model()->findByPk($add->student_address_c_city)->city_name . "</td>"; } else { echo "<td style='text-align:center;'>-</td>"; } } else { echo "<td style='text-align:center;'>-</td>"; } } else { if ($s == 'student_email_id_1') { echo "<td style='text-align:center; width:250px;'>" . StudentInfo::model()->findByPk($sd['student_transaction_student_id'])->{$s} . "</td>"; } else { if ($s == 'student_adm_date') { echo "<td style='text-align:center; width:107px;'>" . StudentInfo::model()->findByPk($sd['student_transaction_student_id'])->{$s} . "</td>"; } else { if ($s == 'course_name') { echo "<td style='text-align:center;'>" . CourseMaster::model()->findByPk($sd['student_transaction_course_id'])->course_name . "</td>"; } else { $res = StudentInfo::model()->findByPk($sd['student_transaction_student_id'])->{$s}; if (!empty($res)) { echo "<td style='text-align:center;'>" . $res . "</td>"; } else { echo "<td style='text-align:center;'>-</td>"; } } } } } } } } $i++;