-
Notifications
You must be signed in to change notification settings - Fork 3
/
viewemployee.php
106 lines (88 loc) · 3.13 KB
/
viewemployee.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
session_start();
include("header.php");
include("dbconnection.php");
if(isset($_POST[submitsearch]))
{
$qresult=mysql_query("select * from employees where empid!= '100' AND branchid='$_POST[branchid]'");
}
else
{
$qresult=mysql_query("select * from employees where empid!= '100' ");
}
$qresultbranch=mysql_query("select * from branch");
?>
<div id="templatemo_content">
<div id="templatemo_content_left">
<div class="header_02"><strong><a href="addemployees.php">Add Employee</a></strong></div>
<div class="header_02">
<form id="form1" name="form1" method="post" action="">
<label for="branchid"><strong>Select Branch </strong></label>
<select name="branchid" id="branchid">
<?php
while($arrows = mysql_fetch_array($qresultbranch))
{
echo " <option value='$arrows[branchid]'> $arrows[branchname] </option>";
}
?>
</select>
<input name="submitsearch" id="submitsearch" type="submit" value="Search" />
</form>
</div>
<table width="500" border="1">
<tr>
<th width="111" scope="col">Employee Name</th>
<th width="75" scope="col">Login ID</th>
<th width="93" scope="col">Branch Name</th>
<th width="93" scope="col">Salary</th>
<th width="94" scope="col">Contact No</th>
</tr>
<?php
while($arrvar=mysql_fetch_array($qresult))
{
echo " <tr>
<td> $arrvar[fname] $arrvar[lname]</td>
<td> $arrvar[loginid]</td>";
$qresulta=mysql_query("select * from branch where branchid='$arrvar[branchid]'");
$arrowsbr = mysql_fetch_array($qresulta);
echo "<td> $arrowsbr[branchname]</td>
<td> $arrvar[basicsalary]</td>
<td> $arrvar[contactno]</td>
</tr>";
}
?>
</table>
<p> </p>
<div class="rc_btn_02"></div>
<div class="margin_bottom_40"></div>
<div class="cleaner"></div>
</div> <!-- end of content left -->
<div id="templatemo_content_right">
<div class="content_right_section">
<?php
if($_SESSION["logintype"] = "Admin")
{
include("adminsidebar.php");
}
else
{
include("empsidebar.php");
}
?>
<div class="news_section">
<div class="news_image"></div>
<div class="news_content">
<div class="news_title"></div>
</div>
</div>
<div class="news_section">
<div class="news_content"> </div>
</div>
<div class="margin_bottom_20"></div>
</div>
</div> <!-- end of content right -->
<div class="cleaner"></div>
</div>
<?php
include("footer.php");
?>