예제 #1
0
파일: db.php 프로젝트: portege/Panada
 function print_error()
 {
     if ($caller = $this->get_caller()) {
         $error_str = sprintf('Database error %1$s for query %2$s made by %3$s', $this->last_error, $this->last_query, $caller);
     } else {
         $error_str = sprintf('Database error %1$s for query %2$s', $this->last_error, $this->last_query);
     }
     //write the error to log
     @error_log($error_str, 0);
     //Is error output turned on or not..
     if (error_reporting() == 0) {
         return false;
     }
     $str = htmlspecialchars($this->last_error, ENT_QUOTES);
     $query = htmlspecialchars($this->last_query, ENT_QUOTES);
     // If there is an error then take note of it
     library_error::database($str . '<br />' . $query);
 }
예제 #2
0
파일: system.php 프로젝트: portege/Panada
 /**
  * Load View
  *
  * EN: Load the "view" file.
  * ID: Berfungsi untuk me-load file "view".
  *
  * @access	public
  * @param	string
  * @param	array
  * @return	void
  */
 function view($view, $data = array())
 {
     if (!empty($data)) {
         $this->view = $data;
     }
     if (!file_exists($path = APPLICATION . 'view/' . $view . '.php')) {
         library_error::costume(500, '<h2>Error: No ' . $view . ' file in view folder.</h2>');
     }
     extract($this->view, EXTR_SKIP);
     include_once $path;
 }