<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<link rel = "stylesheet" href = "http://libs.useso.com/js/jquery-mobile/1.3.0/jquery.mobile.min.css" />
<script src = "http://libs.useso.com/js/jquery/1.9.1/jquery.min.js"></script>
<script src = "http://libs.useso.com/js/jquery-mobile/1.3.0/jquery.mobile.min.js"></script>
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0" />
<title> 大学英语四六级成绩查询 -- Design By 许杨淼淼</title>
</head>
<body>
<!-- Home -->
<div data-role="page">
<div data-role="content">
<div style="display: inline text-align:center">
<img style="width: 100%;" src="http://xuyang.qiniudn.com/cet-logo.jpg">
</div>
<?php
// 获取查询结果
$api = 'http://api.dulizhe.com/CET-Score/CET-Score.php?num=' . $_POST['num'] . '&name=' . $_POST['name'];
$content = json_decode(file_get_contents($api), 1);
if(isset($content['content']['11'])){
$name = $content['content']['1'];
$university = $content['content']['3'];
$category = $content['content']['5'];
$examnum = $content['content']['7'];
$examtime = $content['content']['9'];
$totalscore = $content['content']['11'];
$listening = $content['content']['13'];
$reading = $content['content']['15'];
$writing = $content['content']['17'];
$totalscore > 424 ? $rs = "恭喜过了" : $rs = "再接再励";
}else{
$name = '';
$university = '';
$category = '';
$examnum = '';
$examtime = '';
$totalscore = '';
$listening = '';
$reading = '';
$writing = '';
$rs = "准考证号或姓名错误";
}
?>
<button><?php echo $rs; ?></button>
<h4>姓名:<?php echo $name ?></h4>
<h4>学校:<?php echo $university ?></h4>
<h4>考试类别:<?php echo $category ?></h4>
<h4>准考证号:<?php echo $examnum ?></h4>
<h4>考试时间:<?php echo $examtime ?></h4>
<h4>总分:<?php echo $totalscore ?></h4>
<h4>听力:<?php echo $listening ?></h4>
<h4>阅读:<?php echo $reading ?></h4>
<h4>写作与翻译:<?php echo $writing ?></h4>
<a data-role="button" data-transition="fade" onclick="WeixinJSBridge.call('closeWindow');" data-theme="a">关闭本窗口</a>
<div style="a{text-decoration:none};font-size:16px;margin-top:10px;bottom:8%;text-align:center;width:100%;color:#C0C0C0">
Design By <a href="http://www.xuyangjie.cn/" style="text-decoration:none; color:#C0D9D9">许杨淼淼</a><br />
© 2014 我的大连工大 <a href="http://www.dulizhe.com/" style="text-decoration:none; color:#C0D9D9">DuLizhe.com</a>
</div>
</div>
</div>
</body>
</html>