防伪系统 防伪码不存在和超次数自定义跳转代码

陈晓
2025-03-13 / 0 评论 / 6 阅读 / 正在检测是否收录...
关键位置
防伪码不存在自定义代码关键位置

            ////如果查询的防伪码不存在
           if($fwm=="")
{
    header("Location: http://t12.6z.fit/themes/default/fwmbcz.html");
    exit(); // 确保在跳转后停止执行后续代码
}
超次数在自定义代码关键位置
<?php if($hits>=$cf['fwm_max_so']){ 
    header('Location: https://www.baidu.com');
    exit;
} elseif ($qiyong =="no"){ 
    $cf['notice_3'] = str_replace("{{bianhao}}",$bianhao,$cf['notice_3']);
    echo $cf['notice_3'];
    exit;
} ?>

<?php
error_reporting(0);
session_start();
header('Content-type: text/html; charset=utf-8');
require(dirname(__FILE__)."/../data/head.php");
?>

<!DOCTYPE html>
<html class="ui-height-gon" style="font-size: 22.08px;">
    <plasmo-csui id="codebox-csui"></plasmo-csui>
    <head lang="en">
        <meta charset="UTF-8">
        <title>验证结果</title>
        <meta content="descriptions" charset="">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-status-bar-style" content="black-translucent">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
        <meta name="format-detection" content="telephone=no">
        <meta http-equiv="Pragma" content="no-cache">
        <meta http-equiv="Cache-control" content="no-cache">
        <meta http-equiv="Cache" content="no-cache">
        <link href="/themes/default/static/css/style_b5e4ad7.css" rel="stylesheet">
        
    </head>
    <body inmaintabuse="1">    

 <!--
 ///////////////
 以下为核心代码部分,如无二次开发修改,可以不用修改 
 //////////
 -->      
<?php

    $bianhao = trim($_POST["bianhao"]);    
    $yzm = trim($_POST["yzm"]);
    if($bianhao == ""){            
    echo "<script language='javascript'>layer.msg('查询条件不能为空!',{icon:0,time: 3000,shift: -1}, function(){location.href='../index.php';});</script>";
    exit();
      }      
    if($cf['yzm_status'] == 1 && $yzm != $_SESSION['authnum_session'])
        {
    echo "<script language='javascript'>layer.msg('验证码错误!',{icon:0,time: 3000,shift: -1}, function(){location.href='../index.php';});</script>";    
    exit();
        }    
     $addtime = $GLOBALS['tgs']['cur_time'];
     $addip = $GLOBALS['tgs']['cur_ip'];

    $sql="select * from tgs_code where bianhao='$bianhao' limit 1";
    $res=mysql_query($sql);
       
           $arr = mysql_fetch_array($res);
           $fwm     =  $arr["bianhao"];
            $txm     =  $arr["txm"];
           $riqi        =  $arr["riqi"];
           $product     =  $arr["product"];
           $zd1         =  $arr["zd1"];
           $suyuan      =  $arr["suyuan"];
           $qiyong      =  $arr["qiyong"];
           $query_time  = $arr["query_time"];
           $hits        = $arr['hits'];    
           if($query_time==""){
             $query_time=date('Y-m-d H:i:s');
           }
       
 $cp = mysql_query("select * from tgs_pro where id='$product' limit 1");
 $arr = mysql_fetch_array($cp);
 $pro_name  = $arr['pro_name'];
 $cppic  = $arr['cppic'];
 $cppic2  = $arr['cppic2'];
 $cppic3  = $arr['cppic3'];
 $cppic4  = $arr['cppic4'];
 $cpms  = $arr['cpms'];
 
 $dls = mysql_query("select * from tgs_agent where id='$zd1' limit 1");
 $arr = mysql_fetch_array($dls);
 $agentid  = $arr['agentid'];
 $phone  = $arr['phone'];
 $weixin  = $arr['weixin'];
 $qq  = $arr['qq'];
 $dlname  = $arr['name'];
 $tel  = $arr['tel'];
 $dizhi  = $arr['dizhi'];
 $about  = $arr['about'];
          
           
           if ($hits == 0){
           
            $results     = "1";
           $msg1        = str_replace("{{product}}",$pro_name,unstrreplace($cf['notice_1']));///将product标签替换成$pro_name
           
           }

           if($hits>0){        
               $results = "2";
               $msg1        = str_replace("{{product}}",$pro_name,unstrreplace($cf['notice_2']));
            
           }
            
           $msg1        = str_replace("{{bianhao}}",$bianhao,$msg1);
           $msg1        = str_replace("{{riqi}}",$riqi,$msg1);
           $msg1        = str_replace("{{txm}}",$txm,$msg1);
           $msg1        = str_replace("{{zd1}}",$dlname,$msg1);
           $msg1        = str_replace("{{hits}}",$hits+1,$msg1);
           $msg1        = str_replace("{{addtime}}",$addtime,$msg1);
           $msg1        = str_replace("{{query_time}}",$query_time,$msg1);
           $msg1        = str_replace("{{addip}}",$addip,$msg1);           
          mysql_query("update tgs_code set hits=hits+1,query_time='".$query_time."' where bianhao='".$bianhao."' limit 1");          
          
          
            ////如果查询的防伪码不存在
           if($fwm=="")
{
    header("Location: http://t12.6z.fit/themes/default/fwmbcz.html");
    exit(); // 确保在跳转后停止执行后续代码
}
          
       ?>
      
 <!--
 ///////////////
 核心代码部分结束 
 //////////
 -->      
        
        


 <!--
 ///////////////////////////////////
 以下为展示页面代码,可根据需求修改 
 ///////////////////////////////////////////////
 --> 
 
 <?php if($hits>=$cf['fwm_max_so']){ 
    header('Location: https://www.baidu.com');
    exit;
} elseif ($qiyong =="no"){ 
    $cf['notice_3'] = str_replace("{{bianhao}}",$bianhao,$cf['notice_3']);
    echo $cf['notice_3'];
    exit;
} ?>

 
 <div id="vm" class="e8e9ee" style="height: 896px;">
    <header class="result-headTitle">
        <h1 class="reset logo">验证结果</h1>
    </header>
    <img src="/themes/default/static/picture/correct_17fb3b6.png" class="result-img">
    <!---->
    <div class="logo2xnew">
        <img src="/themes/default/static/picture/logo2xnew_aaba9ff.png">
    </div>
    <div class="result-correct">
        <p class="result-correct-1">您购买的产品 <span>验证成功!</span>
        </p>
        <p class="result-correct-2">您所查询的验证码是 <span>【<?php echo $bianhao; ?>】</span>
        </p>
        <p>该验证码是<span> 
        
           <?php 
        if ($hits + 1 == 1) {
            echo "首";
        } else {
            echo $hits + 1;
        } 
    ?>
        
        </span>次验证</p>
        <p>查询时间是 <span><?php echo $query_time; ?></span>
        </p>
    </div>
    <!---->
    <div class="button" style="margin-top: 2rem;">
        <button>产品溯源</button>
    </div>
    <div style="position: absolute; bottom: 10px; width: 100%; text-align: center; color: rgb(170, 170, 170);">
        <p style="font-size: 14px;"> 如有疑问, 请联系海德堡中国销售人员。</p>
        <p style="font-size: 12px;">© 2017 Heidelberger</p>
    </div>
</div>

</body>
</html>

 <?php 
          $sql = "insert into tgs_history  set  keyword='".$bianhao."' ,results='".$results."' ,addtime='".date('Y-m-d H:i:s')."' ,addip='".$GLOBALS['tgs']['cur_ip']."' ";
        mysql_query($sql);
        exit;
?>       
      

0

评论 (0)

取消
网站已运行 00000000

Powered by Typecho ※ Theme is RST网络


CDN Sponsor Server provider Google Analytics Google Analytics
桂ICP备18006850号-1