<?php 
class Pro_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."pro_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_pic_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);
		
		/*
		$pic_info = array();	
		foreach ((array)$info as $pkey => $row)
		{
				$pic_info[$pkey]["pic_url"]  = $this -> helper -> build_img( $row["pic_url"] ) ;
				$pic_info[$pkey]["pic_sell_price"]  =  $row["pic_sell_price"] ; 
				$pic_info[$pkey]["pic_name"] = $row["pic_name"];
				$pic_info[$pkey]["pic_id"] 	 = $row["pic_id"];
				$pic_info[$pkey]["get_url"]	 = $this -> helper  -> build_url( $valid = $row["pic_id"],'pro');
		}
		return $pic_info;
		*/
	}
	

} 