-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompanyManager.php
executable file
·90 lines (83 loc) · 2.04 KB
/
companyManager.php
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
<?php session_start(); ?>
<?php
include 'connect.php';
$username=$_SESSION['username'];
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Mange</title>
</head>
<body>
<?php
echo '<a onclick="out()" href="fengshaodi.php">登出</a> <br><br>';
?>
<a href = "companyManager.php">conpany</a>
<a href = "usermanage.php">user</a>
<a href = "usercollectionman.php">collention</a>
<a href = "userconfirmman.php">confirm</a>
<a href = "commentman.php">comment</a>
<form name="form1" method="post" action="">
<p> </p>
<p>companyID:
<label for="CID"></label>
<input type="text" name="CID" id="CID">
</p>
<p>companyname:
<input type="text" name="CNAME" id="CID2">
</p>
<p>city:
<input type="text" name="CITY" id="CID3">
</p>
<p>area:
<input type="text" name="AREA" id="CID4">
</p>
<p>type:
<label for="select"></label>
<select name="select" id="select">
</select>
</p>
<p>company data:</p>
<p> </p>
<p> </p>
<p> </p>
</form>
<script>
function out()
{
<?php $_SESSION['username']="";?>
}
</script>
<?php
if($_POST['CID']!='' or $_POST['CNAME']!=''or $_POST['CITY']!='' or $_POST['TYPE']!='')
{
$CID=$_POST['CID'];
$CNAME=$_POST['CNAME'];
$CITY=$_POST['CITY'];
$AREA=$_POST['AREA'];
$TYPE=$_POST['TYPE'];
if($_POST['CID']!='' )
{
$data=mysql_query("select * from `fcompany` where ID like '%$CID%' ");
}
if($_POST['CNAME']!='')
{
$data=mysql_query("select * from `fcompany` where NAME like '%$CNAME%' ");
}
if($_POST['CNAME']=='' and $_POST['CID']=='')
{
$data=mysql_query("select * from `fcompany` where type like '%$TYPE%' and CITY like '%$CITY%' ");
if($_POST['area']!='')
{
$data=mysql_query("select * from `fcompany` where type like '%$type%' and CITY like '%$city%' and AREA like '%$AREA%' ");
}
}
}
else
{
$data=mysql_query("select * from `fcompany` ");
}
?>
</body>
</html>