-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmtr.php
More file actions
65 lines (53 loc) · 1.83 KB
/
Copy pathmtr.php
File metadata and controls
65 lines (53 loc) · 1.83 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
<?php
echo "<html>";
echo "<head>";
echo "<title>AutoNet\\ MTR Information</title>";
echo "</head>";
echo "<body bgcolor=#009999 lang=EN-US style='tab-interval:.5in'>";
echo "<P fontsize=15 align=center > AutoNet\\ MTR Information </p>";
echo "<br>";
echo "<br>";
/*$gotvar=$_GET['type'];
//echo $gotvar;
if ($gotvar=='sum') summary();
if ($gotvar=='full') full();
*/
//old_new();
form2();
//form();
function form2(){
echo "<BR><BR><BR>";
echo "<table border=1 align = center>";
echo "<tr>";
echo "<td>Building NEW Name</td><td>MTR</td><td> Get Info </td><td>Installed?</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 bld_newname, floor,old_name from ftr group by 1,2 order by 1,2,3";
$sql="select bld_oldname as bld_old, bld_newname as bld, new_name,installed from mtr order by 1,3";
// echo "<R> $sql<BR>";
$result = mysql_query($sql)
or die(mysql_error());
while ($row=mysql_fetch_assoc($result)){
echo "<tr><form name=form2 method=get action=mtrinf.php>";
echo "<input name=bld_old type=hidden value=".$row['bld_old'].">";
echo "<td><input name=bld type=text READONLY value=".$row['bld']."></td>";
echo "<td><input name=new_name type=text READONLY value=".$row['new_name']."></td>";
echo "<td><input type=submit value=GetInfo></td>";
if ($row['installed']=='NO') $installed="<FONT color=RED><B> NO";
if ($row['installed']=='YES') $installed="<FONT color=GREEN><B> YES";
echo "<td align=center>".$installed."</td>";
echo "</tr></form>";
}
}
echo "</body>";
echo "</html>";
?>