Repository navigation
Expand file tree
/
Copy pathLicenseInfoListView2.php
More file actions
108 lines (101 loc) · 2.91 KB
/
Copy pathLicenseInfoListView2.php
File metadata and controls
108 lines (101 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
session_start();
require_once('config.php');
include_once('CheckSignin.php');
require_once('EnumFun.php');
$result2 = $mdb2->query(
'SELECT * FROM ProductInfo ');
if (PEAR::isError($result2)) {
die("{'Error':'".$result2->getMessage()."'}");
}
$query = "SELECT * FROM LicenceInfo WHERE 1=1 ";
if(!empty($_POST['Product']))
{
$query = $query." AND Product = ".$mdb2->quote($_POST['Product'],"text");
}
if(!empty($_POST['Status']))
{
$query = $query." AND Status = ".$mdb2->quote($_POST['Status'],"text");
}
if(!empty($_POST['User1']))
{
$query = $query." AND User1 = ".$mdb2->quote($_POST['User1'],"text");
}
if(!empty($_POST['User2']))
{
$query = $query." AND User2 = ".$mdb2->quote($_POST['User2'],"text");
}
$query = $query." ORDER BY ID DESC";
$result = $mdb2->query($query);
?><!DOCTYPE HTML><html>
<head>
<meta charset="UTF-8">
<title>授权信息列表</title>
</head>
<body>
<p>您有以下产品的审核权限:<?php echo implode(";",$_SESSION['Products'])?></p>
<form method="post">
<p>申请人员:<input type="text" name="User1" value="<?php if(empty($_POST))
{
}
else
{
echo $_POST['User1'];
}
?>"/>审核人员:<input type="text" name="User2" value=""/>
产品:<select name="Product">
<?php
echo "<option value=>--ALL--</option>";
while ($row2 = $result2->fetchRow())
{
$product = $row2[strtolower('Name')];
echo "<option value=\"$product\">$product</option>";
}?>
</select>
状态: <select name="Status">
<option value ="">--ALL--</option>
<option value ="1"><?php echo EnumStatusToString(1);?></option>
<option value ="2"><?php echo EnumStatusToString(2);?></option>
<option value ="3"><?php echo EnumStatusToString(3);?></option>
<option value ="4"><?php echo EnumStatusToString(4);?></option>
</select><input type="submit" value="查询" /></p>
</form>
<hr/>
<table border="1">
<tr>
<th>ID</th>
<th>申请人员</th>
<th>申请时间</th>
<th>审核人员</th>
<th>审核时间</th>
<th>产品</th>
<th>状态</th>
<th>备注</th>
<th>详情</th>
<th>审核</th>
</tr>
<?php
while ($row = $result->fetchRow())
{
if(in_array($product,$_SESSION['Products'],true))
{
$product = $row[strtolower('Product')];
$status = $row[strtolower('Status')];
echo "<tr>";
echo "<td>".$row[strtolower('ID')]."</td>";
echo "<td>".$row[strtolower('User1')]."</td>";
echo "<td>".$row[strtolower('Time1')]."</td>";
echo "<td>".$row[strtolower('User2')]."</td>";
echo "<td>".$row[strtolower('Time2')]."</td>";;
echo "<td>".$product."</td>";
echo "<td>".EnumStatusToString($status)."</td>";
echo "<td>".$row[strtolower('Remark')]."</td>";
echo "<td><a href='LicenseInfoView.php?ID=".$row[strtolower('ID')]."' target='_blank'>查看或下载</a></td>";
echo "<td><a href='LicenseInfoReview.php?ID=".$row[strtolower('ID')]."' target='_blank'>审核</a></td>";
echo "</tr>";
}
}
?>
</table>
</body>
</html>