1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<?php
/**
* This is the model class for table "berita_acara_kuliah".
*
* The followings are the available columns in table 'berita_acara_kuliah':
* @property integer $ID
* @property integer $WEEK
* @property integer $SESSION
* @property integer $TA
* @property integer $ID_KUR
* @property string $KODE_MK
* @property string $KELAS
* @property string $TANGGAL
* @property string $START_TIME
* @property string $END_TIME
* @property string $TOPIK
* @property string $RUANGAN
* @property string $AKTIFITAS
* @property string $PIC
* @property string $TIPE_KULIAH
* @property string $METODE
* @property string $ALAT_BANTU
* @property string $CATATAN
* @property string $LAST_UPDATE
* @property string $USER_ID
* @property string $WS
*
* The followings are the available model relations:
* @property Kurikulum $kODEMK
* @property Ruangan $rUANGAN
*/
class BeritaAcaraKuliah extends CActiveRecord
{
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return BeritaAcaraKuliah the static model class
*/
public static function model($className=__CLASS__)
{
return parent::model($className);
}
/**
* @return string the associated database table name
*/
public function tableName()
{
return 'berita_acara_kuliah';
}
/**
* @return array validation rules for model attributes.
*/
public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('WEEK, SESSION, TA, ID_KUR', 'numerical', 'integerOnly'=>true),
array('KODE_MK', 'length', 'max'=>10),
array('KELAS, RUANGAN', 'length', 'max'=>100),
array('AKTIFITAS, USER_ID, WS', 'length', 'max'=>15),
array('PIC, LAST_UPDATE', 'length', 'max'=>20),
array('TIPE_KULIAH', 'length', 'max'=>9),
array('TANGGAL, START_TIME, END_TIME, TOPIK, METODE, ALAT_BANTU, CATATAN', 'safe'),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('ID, WEEK, SESSION, TA, ID_KUR, KODE_MK, KELAS, TANGGAL, START_TIME, END_TIME, TOPIK, RUANGAN, AKTIFITAS, PIC, TIPE_KULIAH, METODE, ALAT_BANTU, CATATAN, LAST_UPDATE, USER_ID, WS', 'safe', 'on'=>'search'),
);
}
/**
* @return array relational rules.
*/
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'kODEMK' => array(self::BELONGS_TO, 'Kurikulum', 'KODE_MK'),
'rUANGAN' => array(self::BELONGS_TO, 'Ruangan', 'RUANGAN'),
);
}
/**
* @return array customized attribute labels (name=>label)
*/
public function attributeLabels()
{
return array(
'ID' => 'ID',
'WEEK' => 'Week',
'SESSION' => 'Session',
'TA' => 'Ta',
'ID_KUR' => 'Id Kur',
'KODE_MK' => 'Kode Mk',
'KELAS' => 'Kelas',
'TANGGAL' => 'Tanggal',
'START_TIME' => 'Start Time',
'END_TIME' => 'End Time',
'TOPIK' => 'Topik',
'RUANGAN' => 'Ruangan',
'AKTIFITAS' => 'Aktifitas',
'PIC' => 'Pic',
'TIPE_KULIAH' => 'Tipe Kuliah',
'METODE' => 'Metode',
'ALAT_BANTU' => 'Alat Bantu',
'CATATAN' => 'Catatan',
'LAST_UPDATE' => 'Last Update',
'USER_ID' => 'User',
'WS' => 'Ws',
);
}
/**
* Retrieves a list of models based on the current search/filter conditions.
* @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
*/
public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('ID',$this->ID);
$criteria->compare('WEEK',$this->WEEK);
$criteria->compare('SESSION',$this->SESSION);
$criteria->compare('TA',$this->TA);
$criteria->compare('ID_KUR',$this->ID_KUR);
$criteria->compare('KODE_MK',$this->KODE_MK,true);
$criteria->compare('KELAS',$this->KELAS,true);
$criteria->compare('TANGGAL',$this->TANGGAL,true);
$criteria->compare('START_TIME',$this->START_TIME,true);
$criteria->compare('END_TIME',$this->END_TIME,true);
$criteria->compare('TOPIK',$this->TOPIK,true);
$criteria->compare('RUANGAN',$this->RUANGAN,true);
$criteria->compare('AKTIFITAS',$this->AKTIFITAS,true);
$criteria->compare('PIC',$this->PIC,true);
$criteria->compare('TIPE_KULIAH',$this->TIPE_KULIAH,true);
$criteria->compare('METODE',$this->METODE,true);
$criteria->compare('ALAT_BANTU',$this->ALAT_BANTU,true);
$criteria->compare('CATATAN',$this->CATATAN,true);
$criteria->compare('LAST_UPDATE',$this->LAST_UPDATE,true);
$criteria->compare('USER_ID',$this->USER_ID,true);
$criteria->compare('WS',$this->WS,true);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
}
public function searchEdit()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('ID',$this->ID);
$criteria->compare('WEEK',$this->WEEK);
$criteria->compare('SESSION',$this->SESSION);
$criteria->compare('TA',$this->TA);
$criteria->compare('ID_KUR',$this->ID_KUR);
$criteria->compare('KODE_MK',$this->KODE_MK,true);
$criteria->compare('KELAS',$this->KELAS,true);
$criteria->compare('TANGGAL',date('Y-m-d'));
$criteria->compare('START_TIME',$this->START_TIME,true);
$criteria->compare('END_TIME',$this->END_TIME,true);
$criteria->compare('TOPIK',$this->TOPIK,true);
$criteria->compare('RUANGAN',$this->RUANGAN,true);
$criteria->compare('AKTIFITAS',$this->AKTIFITAS,true);
$criteria->compare('PIC',$this->PIC,true);
$criteria->compare('TIPE_KULIAH',$this->TIPE_KULIAH,true);
$criteria->compare('METODE',$this->METODE,true);
$criteria->compare('ALAT_BANTU',$this->ALAT_BANTU,true);
$criteria->compare('CATATAN',$this->CATATAN,true);
$criteria->compare('LAST_UPDATE',$this->LAST_UPDATE,true);
$criteria->compare('USER_ID',$this->USER_ID,true);
$criteria->compare('WS',$this->WS,true);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
}
public function searchTanggal($id)
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('ID',$this->ID);
$criteria->compare('WEEK',$this->WEEK);
$criteria->compare('SESSION',$this->SESSION);
$criteria->compare('TA',$this->TA);
$criteria->compare('ID_KUR',$this->ID_KUR);
$criteria->compare('KODE_MK',$this->KODE_MK,true);
$criteria->compare('KELAS',$this->KELAS,true);
$criteria->compare('TANGGAL',$id,true);
$criteria->compare('START_TIME',$this->START_TIME,true);
$criteria->compare('END_TIME',$this->END_TIME,true);
$criteria->compare('TOPIK',$this->TOPIK,true);
$criteria->compare('RUANGAN',$this->RUANGAN,true);
$criteria->compare('AKTIFITAS',$this->AKTIFITAS,true);
$criteria->compare('PIC',$this->PIC,true);
$criteria->compare('TIPE_KULIAH',$this->TIPE_KULIAH,true);
$criteria->compare('METODE',$this->METODE,true);
$criteria->compare('ALAT_BANTU',$this->ALAT_BANTU,true);
$criteria->compare('CATATAN',$this->CATATAN,true);
$criteria->compare('LAST_UPDATE',$this->LAST_UPDATE,true);
$criteria->compare('USER_ID',$this->USER_ID,true);
$criteria->compare('WS',$this->WS,true);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
}
}