application/controllers/basedata/import.php
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Import extends CI_Controller {
public function __construct(){
parent::__construct();
$this->common_model->checkpurview();
$this->load->helper('download');
}
//客户
public function downloadtemplate1() {
$info = read_file('./data/download/customer.xls');
$this->common_model->logs('下载文件名:customer.xls');
force_download('customer.xls', $info);
}
//供应商
public function downloadtemplate2() {
$info = read_file('./data/download/vendor.xls');
$this->common_model->logs('下载文件名:vendor.xls');
force_download('vendor.xls', $info);
}
//商品
public function downloadtemplate3() {
$info = read_file('./data/download/goods.xls');
$this->common_model->logs('下载文件名:goods.xls');
force_download('goods.xls', $info);
}
//客户导入
public function findDataImporter() {
die('{"status":200,"msg":"success"}');
}
//上传文件
public function upload() {
die('{"status":200,"msg":"success","data":{"items":[{"id":1294598139109696,"date":"2015-04-25 14:41:35","uploadPath"
:"customer_20150425024011.xls","uploadName":"customer_20150425024011.xls","resultPath":"uploadfiles/88887901
/customer_20150425024011.xls","resultName":"customer_20150425024011.xls","resultInfo":"商品导入完毕。<br/>商
品一共:0条数据,成功导入:0条数据,失败:0条数据。<br/>供应商导入完毕。<br/>供应商一共:0条数据,成功导入:0条数据,失败:0条数据。<br/>客户导入完毕。<br/>客户一共:10条数
据,成功导入:10条数据,失败:0条数据。<br/>","status":2,"spendTime":0},{"id":1294598139109659,"date":"2015-04-25 14:40
:49","uploadPath":"customer_20150425024011.xls","uploadName":"customer_20150425024011.xls","resultPath"
:"uploadfiles/88887901/customer_20150425024011.xls","resultName":"customer_20150425024011.xls","resultInfo"
:"商品导入完毕。<br/>商品一共:0条数据,成功导入:0条数据,失败:0条数据。<br/>供应商导入完毕。<br/>供应商一共:0条数据,成功导入:0条数据,失败:0条数据。<br/>客户导入完毕
。<br/>客户一共:10条数据,成功导入:10条数据,失败:0条数据。<br/>","status":2,"spendTime":0},{"id":1294597559113847,"date":"2015-04-17
16:54:39","uploadPath":"蓝港新系统xls.xls","uploadName":"蓝港新系统xls.xls","resultPath":"uploadfiles/88887901
/蓝港新系统xls.xls","resultName":"蓝港新系统xls.xls","resultInfo":"商品导入完毕。<br/>商品一共:557条数据,成功导入:0条数据,失败:557条数据
。<br/>(请检查模板是否匹配,建议重新下载模板导入)<br/>供应商导入完毕。<br/>供应商一共:0条数据,成功导入:0条数据,失败:0条数据。<br/>客户导入完毕。<br/>客户一共:0条数
据,成功导入:0条数据,失败:0条数据。<br/>","status":2,"spendTime":0}],"totalsize":3}}');
}
}
后面还有 3 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
