PATH:
home
/
letacommog
/
letaweb
/
admin
/
models
/
mainsite_models
<?php class TicketForm extends CFormModel { public $id; public $category_id; public $title; public $content; public $private; public $date_added; public $user_id; public $date_modified; public $last_modified_id; public function rules() { return array( array('title,content', 'required'), array('id,category_id, private,date_added,user_id,date_modified,last_modified_id', 'safe'), ); } public function save($item = null) { if ($this->validate()) { $now = date('Y-m-d H:i:s'); if ($this->scenario === 'create' || !isset($this->id)) { $lang = new Ticket(); $lang->date_added = $now; $lang->user_id = Yii::app()->user->id; } else { $lang = Ticket::model()->findByPk($this->id); } $lang->title = trim($this->title); $lang->content = $this->content; $lang->category_id = trim($this->category_id); $lang->last_modified_id = Yii::app()->user->id; $lang->date_modified = $now; $lang->save(); return true; } else { return false; } } }
[+]
..
[-] Ticket.php
[edit]
[-] Configuration.php
[edit]
[-] PlanCondition.php
[edit]
[-] ModuleCategory.php
[edit]
[-] SamplePageCategory.php
[edit]
[-] Page_Type.php
[edit]
[-] Zone_Templates.php
[edit]
[-] User_Data.php
[edit]
[-] PlanDescription.php
[edit]
[-] UserData.php
[edit]
[-] Purchase.php
[edit]
[-] WebUser.php
[edit]
[-] Term.php
[edit]
[-] Type.php
[edit]
[-] Template.php
[edit]
[-] Site.php
[edit]
[-] Payment.php
[edit]
[+]
forms
[-] Language.php
[edit]
[-] AuthItem.php
[edit]
[-] MailTemplate.php
[edit]
[-] TicketForm.php
[edit]
[-] ModuleData.php
[edit]
[-] UserIdentity.php
[edit]
[-] Popup_Script.php
[edit]
[-] UserRecoverPassword.php
[edit]
[-] HelpCategory.php
[edit]
[-] Color.php
[edit]
[-] PlanAddition.php
[edit]
[-] Plan.php
[edit]
[-] IPNLogMessage.php
[edit]
[-] Subscription.php
[edit]
[-] SamplePage.php
[edit]
[-] ModuleList.php
[edit]
[-] User.php
[edit]
[-] Page_Domain.php
[edit]
[-] Payment_Method.php
[edit]
[-] YiiLog.php
[edit]
[-] User_Session.php
[edit]
[-] SkinPreset.php
[edit]
[-] Page_Installation.php
[edit]
[-] SiteData.php
[edit]
[-] Content.php
[edit]
[-] Library_Script.php
[edit]
[-] WebsiteCategory.php
[edit]