<?php 
class Vid_mod  extends HC_Controller
{
	public function __construct()
	{
		parent::__construct();
		if(empty($this -> db)){
			$this -> load_db();
		}
	}
	
	public function get_sort( $limit = 2000 )
	{
		//var_dump( $this->db );
		$sql_query = "SELECT prs_id, prs_name,prs_parent_id  FROM  ".$this -> db -> prefix."vid_sort  WHERE 1 and prs_enabled = 1 GROUP BY prs_id ORDER BY `prs_list` limit $limit ";
		return $infosm = $this -> db -> select_info($sql_query);
	}
	
	function get_vid_list( $limitnum = 8)
	{

		$sql = "SELECT pic_id, pic_title, pic_url,pic_view FROM ".$this -> db -> prefix."picture WHERE pic_delete = 0 AND pic_enabled = 1 ORDER BY pic_up_time desc LIMIT $limitnum";  //, paddtime 
		
		return $info 	 = $this -> db -> select_info($sql);
		

	}
	

} 