PATH:
home
/
letacommog
/
letaweb
/
protected
/
modules
/
admin
/
models
<?php class ModuleForm extends CFormModel { public $id; public $name; public $display_name; public $category; public $priority; public $display; public $editable; public $blog; public $ecommerce; // public $file; public function rules() { return array( array('id', 'numerical'), array('name, display_name', 'required'), array('name', 'length', 'max' => 255), //array('file', 'file', 'types'=>'zip', 'safe' => false), array('id, name, display_name, blog,ecommerce,category, display, editable', 'safe'), ); } public function save($item = null) { if ($this->validate()) { if ($this->scenario === 'create' || !isset($this->id)) { $module = new ModuleList(); $module->name = $this->name; } else { $module = ModuleList::model()->findByPk($this->id); } $targetDir = sys_get_temp_dir().DIRECTORY_SEPARATOR.'templates'; if (!file_exists($targetDir)) { @mkdir($targetDir); } $now = date('Y-m-d H:i:s'); //$filename = $this->file->name; //$this->file->saveAs($targetDir.DIRECTORY_SEPARATOR.$filename); //$filename = $this->file->name; $module->display_name = $this->display_name; $module->category = $this->category; $module->blog = $this->blog; $module->ecommerce = $this->ecommerce; $module->display = $this->display; $module->editable = $this->editable; if ($module->validate() && $module->save()) { return true; } else { $this->addErrors($module->getErrors()); } } else { return false; } } }
[+]
..
[-] DBPageForm.php
[edit]
[-] PlanDescriptionForm.php
[edit]
[-] HostingConfigurationForm.php
[edit]
[-] MailConfigurationForm.php
[edit]
[-] TemplateForm.php
[edit]
[-] ModuleForm.php
[edit]
[-] PageForm.php
[edit]
[-] PaymentConfigurationForm.php
[edit]
[-] CategoryForm.php
[edit]
[-] TermForm.php
[edit]
[-] DbListForm.php
[edit]
[-] ModuleDataForm.php
[edit]
[-] UploadTemplateForm.php
[edit]
[-] PlanConditionForm.php
[edit]
[-] ChangeDomainForm.php
[edit]
[-] LanguageForm.php
[edit]
[-] SkinPresetForm.php
[edit]
[-] PlanForm.php
[edit]
[-] UpgradePageForm.php
[edit]
[-] MailTemplateForm.php
[edit]
[-] ColorForm.php
[edit]
[-] MakeTempleteFromSiteForm.php
[edit]
[-] ResetPassForm.php
[edit]
[-] InterfaceForm.php
[edit]
[-] ContentForm.php
[edit]
[-] UserForm.php
[edit]
[-] ExtendPageForm.php
[edit]
[-] ConfigurationForm.php
[edit]
[-] ModuleCategoryForm.php
[edit]
[-] SocialShareButtonForm.php
[edit]