<?php
namespace member\controller;
use source\Controller;
class Software extends Controller {
    public function index(){
    	$this->display();
    }
    
    public function lists(){
    	$where = array();
    	$where['buyer_id'] = session("user_auth.id");
    	$type = I('type',false);
    	$no = I('no',false);
    	if($type){
    		$where['status'] = $type;
    	}
    	if($no){
    		$where['order_no'] = array('like','%'.$no.'%');
    	}
    	$list = M("file_log")->where($where)->select();
    	$type = $this->get_status_all('status',36);
    	$this->list = $list;
    	$this->type = $type;
    	$this->display();
    }
    
    public function get_status_all($field,$model){
		$extra=M('attribute')->where(array('model_id'=>$model,'name'=>$field))->getField('extra');
		$extra=parse_config_attr($extra);
		return $extra;
	}
}