コード例 #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Expired::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(['STATUS_ID' => $this->STATUS_ID]);
     $query->andFilterWhere(['like', 'STATUS', $this->STATUS])->andFilterWhere(['like', 'DURASI_WAKTU', $this->DURASI_WAKTU])->andFilterWhere(['like', 'CANCEL_TIME', $this->CANCEL_TIME]);
     return $dataProvider;
 }
コード例 #2
0
 /**
  * Finds the Expired model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Expired the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Expired::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
コード例 #3
0
ファイル: index.php プロジェクト: C12D/GSN
?>

    <?php 
echo $form->field($model, 'USER_NAME')->textInput(['value' => Yii::$app->user->identity->username]);
?>

    <?php 
echo $form->field($model, 'TGL')->textInput(['maxlength' => true, 'value' => date('Y-d-m')]);
?>

    <?php 
echo $form->field($model, 'JAM')->textInput(['maxlength' => true, 'value' => date('H:i:s')]);
?>

    <?php 
$Expired = Expired::find()->all();
$listData = ArrayHelper::map($Expired, 'status_id', 'status');
echo $form->field($model, 'STATUS')->dropDownList($listData, ['prompt' => 'Select...']);
?>

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

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

</div>
コード例 #4
0
ファイル: checkout.php プロジェクト: adem-team/advancedgsn
?>

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

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

    <input type="hidden" name="total" value="<?php 
echo $total[0]['total'];
?>
">
     <?php 
echo $form->field($model, 'STATUS')->dropDownList(ArrayHelper::map(Expired::find()->all(), 'STATUS_ID', 'STATUS'), ['prompt' => 'Select Status']);
?>
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success btn-md' : 'btn btn-primary']);
?>

    </div>

    <?php 
ActiveForm::end();
?>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>