📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
tarimscripti.demodesign.com.tr
/
admin
/
controllers
📝
SpotAdminController.php
← Geri Dön
<?php use Sirius\Admin\Manager; class SpotAdminController extends Manager { public $moduleTitle = 'Spotlar'; public $module = 'spot'; public $table = 'spots'; public $model = 'spot'; // Arama yapılacak kolonlar. public $search = array('title'); // Filtreleme yapılacak querystring/kolonlar. // public $filter = array('type'); public $actions = array( 'records' => 'list', 'order' => 'list', 'insert' => 'insert', 'update' => 'update', 'delete' => 'delete', ); protected function insertValidateRules() { $this->form_validation->set_rules('title', 'Lütfen Başlık yazınız.', 'required'); $this->form_validation->set_rules('link', 'Lütfen Bağlantı yazınız.', 'required'); $this->form_validation->set_rules('summary', 'Lütfen Özet yazınız.', 'required'); } protected function insertAfterValidate() { $this->utils ->uploadInput('imageFile') ->minSizes(151, 121) ->addProcessSize('normal', 151, 121, 'spot', 'thumbnail'); if ($this->input->post('imageUrl')) { $this->modelData['image'] = $this->utils->imageDownload(true, $this->input->post('imageUrl')); } else { $this->modelData['image'] = $this->utils->imageUpload(true); } } protected function updateValidateRules() { $this->form_validation->set_rules('title', 'Lütfen Başlık yazınız.', 'required'); $this->form_validation->set_rules('link', 'Lütfen Bağlantı yazınız.', 'required'); $this->form_validation->set_rules('summary', 'Lütfen Özet yazınız.', 'required'); } protected function updateAfterValidate($record) { $this->utils ->uploadInput('imageFile') ->minSizes(151, 121) ->addProcessSize('normal', 151, 121, 'spot', 'thumbnail'); if ($this->input->post('imageUrl')) { $this->modelData['image'] = $this->utils->imageDownload(false, $this->input->post('imageUrl'), $record->image); } else { $this->modelData['image'] = $this->utils->imageUpload(false, $record->image); } } }
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula