module/flk/source/model/flk_order_code.model.php
(完整代码) 695B<?php
class flk_order_codeModel extends model{
public $table="mod_flk_order_code";
public function __construct(){
parent::__construct();
}
public function get($orderid,$shopid){
$row=$this->selectRow("orderid=".$orderid);
if(empty($row)){
require "extends/hashids/Hashids.php";
$hashids = new Hashids\Hashids('flk_order_code',6,'abcdefghijklmnopqrstuvwxyz');
$icode=$hashids->encode($orderid);
$md5=$hashids->encode(rand(100000,999999));
$this->insert(array(
"orderid"=>$orderid,
"shopid"=>$shopid,
"ordercode"=>substr($icode.$md5,0,12)
));
$row=$this->selectRow("orderid=".$orderid);
}
return $row["ordercode"];
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。