-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathav_room_list.php
More file actions
61 lines (41 loc) · 1.65 KB
/
Copy pathav_room_list.php
File metadata and controls
61 lines (41 loc) · 1.65 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
<?php
echo "<html>";
echo "<head>";
echo "<title>AutoNet\\ AV Room List </title>";
echo "</head>";
echo "<body bgcolor=#009999 lang=EN-US style='tab-interval:.5in'>";
echo "<P fontsize=15 align=center> AutoNet\\ AV Room List </p>";
echo "<br>";
echo "<br>";
form2();
function form2(){
echo "<BR><BR><BR>";
echo "<table border=1 align = center>";
echo "<tr>";
echo "<td><font color=YELLOW>Building Series (Old Name)</td><td><font color=YELLOW>Old Room Name</td><td><font color=YELLOW> Level</td><td><font color=YELLOW>Room Type</td><td><font color=YELLOW> Name </td><td><font color=YELLOW>GetInfo</td>";
echo "</tr>";
$host="127.0.0.1";
$user="root";
$password="rezasql";
# Connect to MySQL server
$conn = mysql_connect($host,$user,$password)
or die(mysql_error());
# Select the database
mysql_select_db("", $conn)
or die(mysql_error());
# Send SQL query
$sql="select room_id,bld_oldname, level, description, old_name, av_room_types.name as name from av_rooms, av_room_types where av_rooms.type_id=av_room_types.type_id order by 2,3,5";
$result = mysql_query($sql)
or die(mysql_error());
while ($row=mysql_fetch_assoc($result)){
echo "<tr><td>".$row['bld_oldname']."</td><td>".$row['old_name']."</td><td>".$row['level']."</td>";
echo "<td>".$row['name']."</td><td>".$row['description']."</td>";
echo "<td><form name=form2 method=get action=av_room_info.php>";
echo "<input name=room_id type=hidden value=".$row['room_id'].">";
echo "<input type=submit value=GetInfo></td>";
echo "</tr></form>";
}
}
echo "</body>";
echo "</html>";
?>