示例#1
0
文件: RSS.php 项目: rgantt/websheets
 public function __construct()
 {
     $this->config = ConfigFactory::getConfig();
     $this->db = DblFactory::getConn();
     $this->toShow = $this->config->get('xmlPostsToShow') - 1;
     $this->numPosts = $this->db->numRows($this->db->query('select * from ' . $this->config->get('prefix') . '_news'));
 }
示例#2
0
 function Comments($action)
 {
     global $prefix, $path;
     if (!is_null($prefix) && !is_null($path)) {
         $this->prefix = $prefix;
         $this->path = $path;
     }
     $this->init();
     $this->action = $action;
     $this->db = DblFactory::getConn();
     $this->config = ConfigFactory::getConfig();
     $this->siteUrl = '';
 }
示例#3
0
 public function __construct($n)
 {
     $this->config = ConfigFactory::getConfig();
     $this->db = DblFactory::getConn();
     $this->entryData = $this->db->fetchObject($this->db->query('select * from ' . $this->config->get('prefix') . '_news order by id desc limit ' . $n . ',1'));
 }