瀏覽代碼

添加正鑫dpd的72小时验证

lvhao 1 天之前
父節點
當前提交
4d83a2a38a
共有 2 個文件被更改,包括 32 次插入0 次删除
  1. 1 0
      core/CoreApp/controllers/Systemfout.php
  2. 31 0
      core/CoreApp/models/Model_check.php

+ 1 - 0
core/CoreApp/controllers/Systemfout.php

@@ -45,6 +45,7 @@ class Systemfout extends Start_Controller {
 		$this->load->_model("Model_fedexv1",'fedexv1');
 		$this->load->_model("Model_zzquque_u9","zzquque_u9");
 		$this->load->_model("Model_customsdeclaration","customsdeclaration");
+		$this->load->_model("Model_check","check");
 	}
 	//定义方法的调用规则 获取URI第二段值
     public function _remap($arg,$arg_array)

+ 31 - 0
core/CoreApp/models/Model_check.php

@@ -0,0 +1,31 @@
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
+class Model_check extends Lin_Model 
+{
+	function __construct(){
+		parent::__construct();
+		$this->load->database();
+		$this->table = 'check';
+		$this->load_table('check');
+	}
+	
+	public function checkOverdue($check_name,$number){
+		$check_name = trim($check_name);
+		$info =  $this->find("check_name = '$check_name'");	
+		if(empty($info)){
+
+		}else{
+			if(($info['addtime'] - time()) < $info['zx_hours']*60*60 ){
+				return false;
+			}
+		}
+		
+		$this->insert([
+			'check_name' => $check_name,
+			'number' => $number,
+			'addtime' => time(),
+			'zx_hours'=> 72
+		]);
+		return true;
+	}
+	
+}  //end class