网页版订单质保退款计算器源码


<?php 

$time1 =  isset($_GET['time1'])?$_GET['time1']:1;
$time2 =  isset($_GET['time2'])?$_GET['time2']:1;
$money =  isset($_GET['money'])?$_GET['money']:1;
$zhibao = isset($_GET['zhibao'])?$_GET['zhibao']:1;

  $kdrq = strtotime($time1);   //开单时间 时间戳
  $ddrq = strtotime($time2);   //掉单时间 时间戳

  
 if($ddrq>$kdrq){
 $syrq = ($ddrq-$kdrq)/86400;
 }else{
 $syrq = 0;
  }
 
  if($syrq>$zhibao){
  $syts =  "已过质保期";
  }else{
  $syts = ($zhibao-$syrq).'天';  //开单日期-掉单时间=剩余天数
  }

  $mtje = ($money/$zhibao);  //每天金额
  $mtje = round($mtje,2);

  if($syrq>$zhibao){
  $tkje =  "已过质保期";
  }else{
  $tkje = ($zhibao-$syrq)*$mtje.'元';   //(开单日期-掉单时间)* 每天金额
  $tkje = round($tkje,2);
  }
  ?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>质保退款计算器</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet">
  <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0-beta/css/bootstrap.min.css">
  <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
  <script src="https://cdn.bootcss.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>
  </head>
  <style>
  .container {
   max-width:233px;
   padding: 3px;
   margin: 0 auto;
  }
  </style>
  <body>
<div class="panel panel-primary" style="margin:3% 3% 3% 3%;background: rgba(255, 251, 251, 0.7);text-align:center;border-radius:66px">
<body style="background-image: url(http://wx1.sinaimg.cn/mw690/006cSxo6gy1fk8cc3p077j31hc0tywgl.jpg);background-attachment: fixed;background-repeat: no-repeat;background-size: cover;-moz-background-size: cover;">
  <br>
  <img src="http://q4.qlogo.cn/headimg_dl?dst_uin=1900432277&spec=100" class="rounded-circle img-thumbnail">
<br><br><center>
    <form action="" method="get">
			<div class="panel-body">
               <div class="input-group" style="width:55%;">
				<span class="input-group-addon">下单金额</span>
 				<input class="form-control input-lg" type="text" name="money"  class="form-control" placeholder="请输入您下单金额" required autofocus>
			</div>
              <br>
      <div class="panel-body">
               <div class="input-group" style="width:55%;">
        <span class="input-group-addon">质保天数</span>
        <input class="form-control input-lg" type="text" name="zhibao"  class="form-control" placeholder="请输入您的质保天数" required>
      </div>
              <br>              
		<div class="panel-body">
            <div class="input-group" style="width:55%;">
              <span class="input-group-addon">开单日期</span>
				 <input class="form-control input-lg" type="date" name="time1"  class="form-control" placeholder="请输入您的开单日期" required>
			</div>
          <br>
           <div class="input-group" style="width:55%;">
              <span class="input-group-addon">掉单日期</span>
				 <input class="form-control input-lg" type="date" name="time2"  class="form-control" placeholder="请输入您的掉单日期" required>
			</div>
          <br>
      		  <input type="submit" value="计 算" class="btn btn-success">
              <input  type="reset" value="清 空" class="btn btn-danger"/>
  <br><br><br>
      
<?php
$result = '<div class="alert alert-success container">'.'每日金额:'.$mtje.'元<br>'.'质保天数:'.$zhibao.'天<br>'.'剩余天数:'.$syts.'<br>'.'退款金额:'.$tkje.'</div>';

if(isset($_GET["money"])){
  echo $result;
}
?><br>


php萌新练手瞎写的 用(hao)处(wu)大(yong)概(chu)就是帮助代刷网站长退款钻类业务吧.........

测试页面:http://www.aizy.cc/ddjs.php

QQ截图20180630234514.png

相关推荐

发表评论

路人甲

网友评论(2)

有用,拿走了高兴
1年前 (2018-07-02) 回复
朕收下了
a南笙- 1年前 (2018-07-01) 回复