コード例 #1
0
 /**
  * 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 = PenggajianT::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
コード例 #2
0
<?php 
if ($caraPrint == 'EXCEL') {
    header('Content-Type: application/vnd.ms-excel');
    header('Content-Disposition: attachment;filename="' . $judulLaporan . '-' . date("Y/m/d") . '.xls"');
    header('Cache-Control: max-age=0');
}
echo $this->renderPartial('application.views.headerReport.headerDefault', array('judulLaporan' => $judulLaporan));
?>
    <div class="mws-panel-body" align="center">
        <div class="mws-form">
                <?php 
$id = $_GET['id'];
$model = PenggajianT::model()->findByPK($id);
?>
     
                <div class="mws-form-inline">   
                    <table align="center" width="100%">
                        <tr>
                            <td width="50%">
                                    
                            <div class="mws-form-row">
                                    <?php 
echo CHtml::label('Nama karyawan', '', array('style' => 'text-align:left;'));
?>
                                     <span>
                                     <?php 
echo CHtml::label($model->karyawan->nama_karyawan, '', array('style' => 'text-align:left;'));
?>
                                      </span>
                            </div>
コード例 #3
0
 public static function model($className = __CLASS__)
 {
     parent::model($className);
 }