<?php
/* 快捷商城系统
 * 版本号：2.0
 * 官网：http://www.kjcms.cn
 * 2015-02-16
 */
 class ctl_weixin_media extends mod_weixin_media {
	//默认浏览页
	function act_default() {
		$type = fun_get::get("type");
		$this->type = $type;
		$this->arr_list = $this->get_media_list($type);
		$arr_type = cls_config::get('mediatype' , 'weixin' , '' , '');
		$this->allowext = (isset($arr_type[$type])) ? implode("," , $arr_type[$type]) : '';
		$arr_size = cls_config::get('mediasize' , 'weixin' , '' , '');
		$this->allowsize = (isset($arr_size[$type])) ? $arr_size[$type] : 0;
		return $this->get_view();
	}

	function act_upload() {
		$file = fun_get::get("file");
		$type = fun_get::get("type");
		$arr_return = cls_weixin::on_media_upload($file , $type);
		return fun_format::json($arr_return);
	}
}