-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathengineinfo.php
More file actions
127 lines (116 loc) · 4.02 KB
/
engineinfo.php
File metadata and controls
127 lines (116 loc) · 4.02 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<html>
<head>
<title>user login</title>
<link rel="stylesheet" type="text/css" href="userlogin.css">
<script type="text/javascript">
function validate()
{
var cnum=document.getElementById("cnumber").value;
var x=document.getElementById("cardnumber");
if(cnum.toString().length>4 )
{
if(!isNaN(cnum))
{
x.style.display="none";
return true;
}
else
{
x.style.display="contents";
return false;
}
}
else
{
x.style.display="contents";
return false;
}
return false;
}
</script>
</head>
<body>
<div>
<nav class="floating-head">
<img src="delhi-metro-logo-6351.png" align= "left" width=100px height=100px>
<img src="helpline.png" width=200px height=100px align="right">
<font style="font-size:250%; color:black;font-family: caviar;text-align: left;padding: 10px">DELHI BUS CORPORATION</font><br>
<font style="font-size:100%; color:black;font-family: caviar-light; text-align: left;padding: 10px">(An Joint Venture Of Govt. Of NCT DELHI and JIIT)</font>
</nav>
</div>
<div class="tab">
<nav>
<ul>
<li><a class="active" href="mainpage2.php">HOME</a></li>
<li><a href="about.php">ABOUT US</a></li>
<li><a href="adminlogin.php">Admin login</a></li>
<li><a href="contact.php">CONTACT</a></li>
<li><a href="login.php">User Login</a></li>
</ul>
</nav>
</div>
<div style="border-left: 2%;width:80%;background:#ffffff;margin-left: 10%;margin-right: 10%;border-radius: 5PX">
<div style="margin-left:0px;float:left;border:2%;border-radius:5px;z-index:2;overflow:hidden;background-color:#111; width: 18%; height:20px; padding:10px;" ><font color="white">     IMPORTANT NOTICE: </font></div>
<div class="marquee">
<marquee>this is notice board</marquee>
</div>
</div>
<br><br>
<div style="margin:30px;margin-right:30px;border:5px;border-radius:5px;z-index:2;overflow:hidden;background-color:#111; width: 95%; height:100%;margin-bottom: 30px; padding:10px;">
<!--<div style="margin: 30px;background-color:grey;">
<div style="background-color:#333;width:100%;height:30px;">
<font style="font-size:150%; color:white;font-family: caviar;text-align: left;">  BUS INFO</font>
</div>
<form oninput="validate()" onsubmit="return validate()" method="post" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>">
<div style="padding-left:15%;width:90%;align-content: center">
<font style="font-size:150%;color:white;font-family: caviar;text-align:left;">Enter BUS NUMBER:
<br><br>
<input type="number" id="cnumber" name="cnumber" style="width:75%;background-color:lightgrey;border-radius: 5px;height:30px; ">
</font>
<br><br>
<p id="cardnumber" style="display:contents;"><font style="color:red">Invalid BUS NUMBER: Should greater than 5 digit</font></p>
<br><br>
<div style="padding-left:55%;width:100%;">
<input type="submit" Value="GET DETAILS" style="width:20%;height:30px;border-radius: 3px; background-color:lightgrey">
<br><br>
</div>
</div>
</form>
</div>-->
<font style="font-size:150%; color:white;font-family: caviar;text-align: left;">
<div style="margin:5%">
INFORMATION:<br><br>
<?php
echo "<font style='font-size:100%;color:white'>";
$conn=mysqli_connect("localhost","root","");
if($conn->error==NULL)
{
$sql="use delhimetro;";
$conn->query($sql);
$sql="select * from engine";
$res=$conn->query($sql);
if($res->num_rows>0)
{
while($row=$res->fetch_assoc())
{
echo "ENGINE NUMBER -> ".$row["engine_no"]. "<br>" .
"QUANTITY -> ".$row["quantity"]. "<br>" .
"SHOP -> ".$row["shop"]. "<br>".
"PRICE -> ".$row["price"]. "<br>" .
"USED IN BUS -> ".$row["bus_no"]."<br><br><br><br>";
}
}
else
{
echo "ENGINE DOES NOT EXISTS";
}
}
else
echo "connection failed";
$sql="use delhimetro;";
$conn->query($sql);
echo "</font>";
?>
</font></div></div>
</body>
</html>