Guest User

Untitled

a guest
Jun 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. <?php
  2.  
  3. class Upload extends Private_Controller {
  4.    
  5.         public $book_file_number = mt_rand(1000000,9999999);
  6.        
  7.         public function constructor() {
  8.                 parent::__constructor();
  9.                
  10.                 $this->load->model('tags');
  11.         }
  12.        
  13.         public function index() {
  14.            
  15.                 if ($this->ion_auth->logged_in()) {
  16.            
  17.                 $this->load->helper(array('form', 'url'));
  18.                 $this->load->library('form_validation');
  19.                
  20.                 $this->form_validation->set_rules('title', 'Title', 'required');
  21.                 $this->form_validation->set_rules('tags', 'Tag', 'required');
  22.                 $this->form_validation->set_rules('summary', 'Summary', 'required');
  23.                 $this->form_validation->set_rules('price', 'Price', 'required');
  24.                
  25.                
  26.                 $this->load->view('topspace');
  27.                 if ($this->form_validation->run())
  28.                 {
Add Comment
Please, Sign In to add comment