Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Event extends CActiveRecord
- {
- public static function model($className=__CLASS__)
- {
- return parent::model($className);
- }
- public function tableName()
- {
- return 'events';
- }
- public function rules(){
- return array(
- // Максимальный и минимальный размер указываем в байтах.
- array('src', 'file', 'types'=>'jpg, gif, png', 'maxSize' => 1048576),
- );
- }
- }
- --------------------------------------------------------------------------
- <?php
- class Video extends CActiveRecord
- {
- public static function model($className=__CLASS__)
- {
- return parent::model($className);
- }
- public function tableName()
- {
- return 'videos';
- }
- public function rules(){
- return array(
- // Максимальный и минимальный размер указываем в байтах.
- array('src', 'file', 'types'=>'jpg, gif, png', 'maxSize' => 1048576),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement