Пример #1
0
    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = Schools::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere([
            'school_id' => $this->school_id,
            'school_contactNumber' => $this->school_contactNumber,
        ]);

        $query->andFilterWhere(['like', 'school_name', $this->school_name])
            ->andFilterWhere(['like', 'school_area', $this->school_area])
            ->andFilterWhere(['like', 'school_address', $this->school_address])
            ->andFilterWhere(['like', 'school_contactEmail', $this->school_contactEmail]);

        return $dataProvider;
    }
Пример #2
0
 /**
  * Lists all Grades models.
  * @return mixed
  */
 public function actionIndex()
 {
     $grades = Grades::find()->all();
     $schools = Schools::find()->all();
     $users = User::find()->all();
     $scholars = Scholars::find()->all();
     return $this->render('index', array('users' => $users, 'scholars' => $scholars, 'schools' => $schools, 'grades' => $grades));
 }
Пример #3
0
 /**
  * Lists all Allowance models.
  * @return mixed
  */
 public function actionIndex()
 {
     $schools = Schools::find()->all();
     $users = User::find()->all();
     $scholars = Scholars::find()->all();
     $allowances = Allowance::find()->all();
     $benefits = Benefit::find()->all();
     return $this->render('index', array('users' => $users, 'scholars' => $scholars, 'schools' => $schools, 'allowances' => $allowances, 'benefits' => $benefits));
 }
Пример #4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getScholarSchool()
 {
     return $this->hasOne(Schools::className(), ['school_id' => 'scholar_school_id']);
 }
Пример #5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getAllowanceSchool()
 {
     return $this->hasOne(Schools::className(), ['School_id' => 'allowance_school_id']);
 }
Пример #6
0
?>

    <?php 
echo $form->field($model, 'compile_scholar_firstName')->dropDownList(ArrayHelper::map(Scholars::find()->all(), 'scholar_firstName', 'scholar_firstName'), ['prompt' => 'Select Scholar First Name']);
?>
	
    <?php 
echo $form->field($model, 'compile_scholar_middleName')->dropDownList(ArrayHelper::map(Scholars::find()->all(), 'scholar_middleName', 'scholar_middleName'), ['prompt' => 'Select Scholar Middle Name']);
?>

    <?php 
echo $form->field($model, 'compile_school_name')->dropDownList(ArrayHelper::map(Schools::find()->all(), 'school_name', 'school_name'), ['prompt' => 'Select School Name']);
?>
	
	    <?php 
echo $form->field($model, 'compile_school_area')->dropDownList(ArrayHelper::map(Schools::find()->all(), 'school_area', 'school_area'), ['prompt' => 'Select School Area']);
?>

    <?php 
echo $form->field($model, 'compile_pendingPaymentToSchool')->dropDownList(['Yes' => 'Yes', 'No' => 'No'], ['prompt' => '']);
?>

    <?php 
echo $form->field($model, 'compile_pendingPaymentToStudent')->dropDownList(['Yes' => 'Yes', 'No' => 'No'], ['prompt' => '']);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
Пример #7
0
		ArrayHelper::map(Scholars::find()->all(),'scholar_firstName','scholar_firstName'),
		['prompt'=>'Select Scholar First Name']
	) ?>
	
    <?= $form->field($model, 'compile_scholar_middleName')->dropDownList(
		ArrayHelper::map(Scholars::find()->all(),'scholar_middleName','scholar_middleName'),
		['prompt'=>'Select Scholar Middle Name']
	) ?>

    <?= $form->field($model, 'compile_school_name')->dropDownList(
		ArrayHelper::map(Schools::find()->all(),'school_name','school_name'),
		['prompt'=>'Select School Name']
	) ?>
	
	    <?= $form->field($model, 'compile_school_area')->dropDownList(
		ArrayHelper::map(Schools::find()->all(),'school_area','school_area'),
		['prompt'=>'Select School Area']
	) ?>

    <?= $form->field($model, 'compile_pendingPaymentToSchool')->dropDownList([ 'Yes' => 'Yes', 'No' => 'No', ], ['prompt' => '']) ?>

    <?= $form->field($model, 'compile_pendingPaymentToStudent')->dropDownList([ 'Yes' => 'Yes', 'No' => 'No', ], ['prompt' => '']) ?>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
 /**
  * Finds the Schools model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Schools the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Schools::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Пример #9
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getBenefitSchool()
 {
     return $this->hasOne(Schools::className(), ['school_id' => 'benefit_school_id']);
 }
Пример #10
0
    <?php 
echo $form->field($model, 'organization')->textarea(['rows' => 6]);
?>

    <?php 
echo $form->field($model, 'position_held')->textarea(['rows' => 6]);
?>

	<?php 
echo $form->field($model, 'college_to_apply1')->dropDownList(ArrayHelper::map(Schools::find()->all(), 'school_id', 'schools'), ['prompt' => 'Select college']);
?>

    
	<?php 
echo $form->field($model, 'college_to_apply2')->dropDownList(ArrayHelper::map(Schools::find()->all(), 'school_id', 'schools'), ['prompt' => 'Select college']);
?>
	
    <?php 
echo $form->field($model, 'course_plan_to_take1')->dropDownList(['BS in Computer Science' => 'BS in Computer Science', 'BS in Information Technology' => 'BS in Information Technology', 'BS in Information Management' => 'BS in Information Management', 'BS in Electronics and Communications Engineering' => 'BS in Electronics and Communications Engineering', 'BS in Computer Engineering' => 'BS in Computer Engineering', 'BS in Civil Engineering' => 'BS in Civil Engineering', 'BS in Electrical Engineering' => 'BS in Electrical Engineering', 'BS in Mechanical Engineering' => 'BS in Mechanical Engineering', 'BS in Elementary Education' => 'BS in Elementary Education', 'BS in Secondary Education major in Biology' => 'BS in Secondary Education major in Biology', 'BS in Secondary Education major in Chemistry' => 'BS in Secondary Education major in Chemistry', 'BS in Secondary Education major in Physics' => 'BS in Secondary Education major in Physics', 'BS in Secondary Education major in Mathematics' => 'BS in Secondary Education major in Mathematics', 'BS in Secondary Education major in English' => 'BS in Secondary Education major in English', 'BS in Accountancy' => 'BS in Accountancy', 'BS in Pharmacy' => 'BS in Pharmacy'], ['prompt' => '']);
?>

    <?php 
echo $form->field($model, 'course_plan_to_take2')->dropDownList(['BS in Computer Science' => 'BS in Computer Science', 'BS in Information Technology' => 'BS in Information Technology', 'BS in Information Management' => 'BS in Information Management', 'BS in Electronics and Communications Engineering' => 'BS in Electronics and Communications Engineering', 'BS in Computer Engineering' => 'BS in Computer Engineering', 'BS in Civil Engineering' => 'BS in Civil Engineering', 'BS in Electrical Engineering' => 'BS in Electrical Engineering', 'BS in Mechanical Engineering' => 'BS in Mechanical Engineering', 'BS in Elementary Education' => 'BS in Elementary Education', 'BS in Secondary Education major in Biology' => 'BS in Secondary Education major in Biology', 'BS in Secondary Education major in Chemistry' => 'BS in Secondary Education major in Chemistry', 'BS in Secondary Education major in Physics' => 'BS in Secondary Education major in Physics', 'BS in Secondary Education major in Mathematics' => 'BS in Secondary Education major in Mathematics', 'BS in Secondary Education major in English' => 'BS in Secondary Education major in English', 'BS in Accountancy' => 'BS in Accountancy', 'BS in Pharmacy' => 'BS in Pharmacy'], ['prompt' => '']);
?>

    <?php 
echo $form->field($model, 'fathername')->textInput(['maxlength' => true]);
?>

    <?php 
Пример #11
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getFailSchool()
 {
     return $this->hasOne(Schools::className(), ['school_id' => 'fail_school_id']);
 }
Пример #12
0
    /**
     * Updates an existing Scholars model.
     * If update is successful, the browser will be redirected to the 'view' page.
     * @param integer $id
     * @return mixed
     */
    public function actionUpdate($id)
    {
        $model = $this->findModel($id);

        if ($model->load(Yii::$app->request->post())) {
			$test2 = ArrayHelper::map(Schools::find()->joinWith('scholars')->where(['School_id'=>$model->scholar_school_id])->all(),'School_id','school_area');
			$test = array_values($test2)[0];
			$model->scholar_school_area = $test;
			$model->save();
            return $this->redirect(['view', 'id' => $model->scholar_id]);
        } else {
            return $this->render('update', [
                'model' => $model,
            ]);
        }
    }
Пример #13
0
?>

    <?php 
echo $form->field($model, 'scholar_middleName')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'scholar_gender')->dropDownList(['Male' => 'Male', 'Female' => 'Female'], ['prompt' => 'Select Gender']);
?>

    <?php 
echo $form->field($model, 'scholar_address')->textInput(['maxlength' => true]);
?>

	<?php 
echo $form->field($model, 'scholar_school_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Schools::find()->all(), 'school_id', 'school_name'), 'language' => 'en', 'options' => ['placeholder' => 'Select School Name'], 'pluginOptions' => ['allowClear' => true]]);
?>

    <?php 
echo $form->field($model, 'scholar_course')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'scholar_yearLevel')->textInput();
?>

    <?php 
echo $form->field($model, 'scholar_email')->textInput(['maxlength' => true]);
?>

    <?php 
Пример #14
0
/* @var $this yii\web\View */
/* @var $searchModel frontend\models\GradeSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->params['breadcrumbs'][] = $this->title;
?>


<div class="grades-index">

    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
	<?php 
$username=Yii::$app->user->identity->username;
$users = User::find()->all();
$scholars = Scholars::find()->all();
$schools = Schools::find()->all();
foreach($users as $ctr){
	if($ctr->username==$username){
		foreach($scholars as $scholarctr){
			foreach($schools as $school){
				if($scholarctr->scholar_user_id==$ctr->id && $scholarctr->scholar_school_id==$school->School_id){
					echo '<center><img src="img/school.png" height=100px width=100px></img><h2><font color=#005ab2><strong>'.$school->school_name.'</strong></font></h2><h4>'.$school->school_address.'</h4></center><table border=2 width=100%><tr><td></td></tr></table><br><table border=1 width=100%><tr><td> <b><font color=#005ab2>School Area:</font></b><center> '.$school->school_area.'</center></td><td><b><font color=#005ab2>School Email:</font></b><center> '.$school->school_contactEmail.'</center></td><td><b><font color=#005ab2>School Contact Number:</font></b><center> '.$school->school_contactNumber.'</center></td></tr></table>'; 
						
				}
			}
		}
	}
}
?>

</div>
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCollegeToApply2()
 {
     return $this->hasOne(Schools::className(), ['school_id' => 'college_to_apply2']);
 }
Пример #16
0
<div class="scholars-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'scholar_firstName')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'scholar_lastName')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'scholar_middleName')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'scholar_gender')->dropDownList([ 'Male' => 'Male', 'Female' => 'Female', ], ['prompt' => 'Select Gender']) ?>

    <?= $form->field($model, 'scholar_address')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'scholar_school_id')->dropDownList(
    		ArrayHelper::map(Schools::find()->all(),'school_id','school_name'),
    		['prompt'=>'Select School']
    		) ?>

    <?= $form->field($model, 'scholar_course')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'scholar_yearLevel')->textInput() ?>

    <?= $form->field($model, 'scholar_email')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'scholar_contactNum')->textInput() ?>

    <?= $form->field($model, 'scholar_cashCardNum')->textInput() ?>

    <?= $form->field($model, 'scholar_school_area')->dropDownList([ 'Provincial' => 'Provincial', 'NCR' => 'NCR', ], ['prompt' => 'Select School Area']) ?>
Пример #17
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCompileSchool()
 {
     return $this->hasOne(Schools::className(), ['school_id' => 'compile_school_id']);
 }
Пример #18
0
	public function getGradeSchool()
    {
        return $this->hasOne(Schools::className(), ['School_id' => 'School_id']);
    }