You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
PHP
41 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Addons\UploadImages;
|
|
use Common\Controller\Addon;
|
|
|
|
/**
|
|
* 图片批量上传插件
|
|
* @author 原作者:tjr&jj
|
|
* @author 木梁大囧
|
|
*/
|
|
|
|
class UploadImagesAddon extends Addon{
|
|
public $info = array(
|
|
'name' => 'UploadImages',
|
|
'title' => '多图上传',
|
|
'description' => '多图上传',
|
|
'status' => 1,
|
|
'author' => '木梁大囧',
|
|
'version' => '1.2'
|
|
);
|
|
|
|
public function install(){
|
|
return true;
|
|
}
|
|
|
|
public function uninstall(){
|
|
return true;
|
|
}
|
|
|
|
//实现的UploadImages钩子方法
|
|
public function UploadImages($param){
|
|
$name = $param['name'] ?: 'pics';
|
|
$valArr = $param['value'] ? explode(',', $param['value']) : array();
|
|
$this->assign('name',$name);
|
|
$this->assign('flag',$param['flag']);
|
|
$this->assign('valStr',$param['value']);
|
|
$this->assign('valArr',$valArr);
|
|
$this->assign("class",$param['class']);
|
|
$this->display('upload');
|
|
}
|
|
} |