예제 #1
0
 public function init()
 {
     if (function_exists('date_default_timezone_set')) {
         @date_default_timezone_set("Etc/GMT-8");
     }
     if (function_exists('ob_gzhandler') && \FeedBack\Conf\Config::$gzip && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false) {
         ob_start('ob_gzhandler');
     } else {
         ob_start();
     }
     ob_implicit_flush(0);
     \FeedBack\Inc\View::outHeader();
 }
예제 #2
0
 public function getFeedBack()
 {
     $where = array('type' => $this->param['type']);
     $table = 'feedback';
     $field = '*';
     $order = '`id` ASC';
     $page = max(intval($this->param['page']), 1);
     $prpage = intval($this->param['limit']);
     $limit = ($page - 1) * $prpage . ",{$prpage}";
     if (!($data = $this->db->find($table, $field, $where, $order, $limit))) {
         $data = '';
     }
     \FeedBack\Inc\View::output($data);
 }