Advertisement
Guest User

Untitled

a guest
Aug 29th, 2011
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2. class Computation extends CI_Controller {
  3.  
  4.     public function _remap($action, $params)
  5.     {
  6.     if ( ! $this->input->is_cli_request())
  7.     {
  8.       show_error('Not for web access.', 403);
  9.     }
  10.    
  11.     $this->load->library('cli');
  12.    
  13.     chdir(realpath(dirname(__FILE__) . '/../..')); // pour être sûr que php est là où il faut
  14.    
  15.     $this->load->model('computation', '', true);
  16.    
  17.     if (method_exists($this, $action))
  18.     {
  19.       return call_user_func_array(array($this, $action), $params);
  20.     }
  21.   }
  22.  
  23.   public function forum($params)
  24.   {
  25.     $this->load->helper('array');
  26.     $forum_id = (int)element(0, $params, 7);
  27.    
  28.     $this->Computationmodel->forum($forum_id);
  29.   }
  30. }
  31. /* End of file welcome.php */
  32. /* Location: ./application/controllers/welcome.php */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement