2 Star 2 Fork 4

Tody_Guo/php_issue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
getpart.php 2.25 KB
一键复制 编辑 原始数据 按行查看 历史
<!DOCTYPE html>
<html>
<head>
<title>Get Work Order Web</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">-->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</head>
<body>
<?
extract($_POST);
extract($_GET);
unset($_POST,$_GET);
$part=strtoupper(trim($part));
include "top.php";
echo "<div class='container-fluid'>";
echo "<div style='float:left'>";
echo " <form action='getpart.php' method='POST' role='form' class='form-inline'>";
echo " <div class='form-group'>";
echo " <label for='inputSN' class='col-sm-4 form-control'>料号查询</label>";
if(strlen($part)<=0){
echo " <input type='text' class='form-control' name='part' id='inputSN' placeholder='请输入料号'>";
}else{
echo " <input type='text' class='form-control' name='part' id='inputSN' value='${part}'>";
}
echo " <button type='submit' class='btn btn-info form-control'>查询</button>";
echo " </div>";
echo " </form>";
echo "</div>";
echo "<br><br>";
if(strlen($part)<=0)
echo "<div><font color='blue'>You need to input part number</font></div>";
else{
$soapcli = new SoapClient("http://10.100.160.47:6000/Service.asmx?wsdl");
$result = $soapcli->GET_PART_SPEC(array('part'=>$part, 'Tres'=>''));
//print_r($result); //Debug
$arrRes = json_decode(json_encode($result),TRUE);
if(!strstr($arrRes['GET_PART_SPECResult'],"")){
$i=1;
echo "<table border=0 width=100% cellpadding=0 cellspacing=1><tr bgcolor='#2894FF'><th width=15%><font color='#ffffff'>料号</font></th><th width=85%><font color='#ffffff'>描述</font></th><tr>";
$arr = explode("|",$arrRes['GET_PART_SPECResult']);
foreach($arr as $u){
$strarr = explode("$",$u);
if($i>0)
echo "<tr><td>$strarr[0]</td><td>$strarr[1]</td><tr>\n";
else
echo "<tr bgcolor='#d0d0d0'><td>$strarr[0]</td><td>$strarr[1]</td><tr>\n";
$i=-$i;
}
echo "</table>";
}else{
echo "<div><font color='red'>part number is error</font></div>";
}
}
echo "</div>";
include 'bottom.php';
?>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/tody_guo/php_issue.git
git@gitee.com:tody_guo/php_issue.git
tody_guo
php_issue
php_issue
master

搜索帮助