|
@@ -1,5 +1,5 @@
|
|
|
<?php
|
|
|
-
|
|
|
+ini_set('display_errors',on);
|
|
|
Doo::loadCore('auth/DooAuth');
|
|
|
Doo::loadClass('PasswordHash');
|
|
|
Doo::loadClass('client');
|
|
@@ -120,9 +120,21 @@ class ClientController extends DooController
|
|
|
{
|
|
|
// TODO:上报数据
|
|
|
// TODO:每期更新数据时候和上传时候要查询当前进行期数的第几次一并写入数据库
|
|
|
- if (isset($this->params['userid']) && isset($this->params['tenderid']) && isset($this->params['phaseno']) && isset($_POST['MD5_JL'])) {
|
|
|
+ if (isset($this->params['userid']) && isset($this->params['tenderid']) && isset($this->params['phaseno']) && isset($_POST['MD5_JL']) && isset($_POST['MD5_Zip'])) {
|
|
|
$fp = $this->upfile('upfile');
|
|
|
if (isset($fp[0]['filepath'])) {
|
|
|
+ /**
|
|
|
+ * 增加上传压缩包md5检测机制
|
|
|
+ */
|
|
|
+ $localmd5HashString = hash_file("md5",Doo::conf()->SITE_PATH . $fp[0]['filepath']);
|
|
|
+ if($localmd5HashString!=$_POST['MD5_Zip']){
|
|
|
+ error_log(var_export(Doo::conf()->SITE_PATH . $fp[0]['filepath'],true),3,'/opt/html/jiliang_customedProduct/'.microtime());
|
|
|
+ error_log(var_export($_POST,true),3,'/opt/html/jiliang_customedProduct/'.microtime());
|
|
|
+ error_log(var_export($localmd5HashString,true),3,'/opt/html/jiliang_customedProduct/'.microtime());
|
|
|
+ $status = array('status' => 'FALSE', 'msg' => '期数数据上传失败,请重新上传');
|
|
|
+ echo json_encode($status, JSON_UNESCAPED_UNICODE);
|
|
|
+ die();
|
|
|
+ }
|
|
|
$res = $this->zip->open(Doo::conf()->SITE_PATH . $fp[0]['filepath']);
|
|
|
$extPath = pathinfo($fp[0]['filepath']);
|
|
|
$extPathdir = Doo::conf()->SITE_PATH . $extPath['dirname'] . '/' . $extPath['filename'];
|