-
Notifications
You must be signed in to change notification settings - Fork 3
/
uchat.php
101 lines (84 loc) · 3.11 KB
/
uchat.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
<?php
session_start();
include("header.php");
include("dbconnection.php");
$result1 = mysql_query("SELECT * FROM project where branchid='$_SESSION[brid]'");
if(isset($_POST[branchid]))
{
$resul = mysql_query("SELECT * FROM employees where branchid='$_POST[branchid]'");
}
?>
<div id="templatemo_content">
<div id="templatemo_content_left">
<div id="templatemo_content">
<div id="templatemo_content_left">
<input type="button" value="Click Here to Chat" onclick="window.open('chatsend.php','popUpWindow','height=550,width=425,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');">
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<p>
<label for="Branch">Select project : </label>
<select name="branchid" id="branchid">
<?php
while($arrows = mysql_fetch_array($result1))
{
echo "<option value='$arrows[branchid]'>$arrows[projectname]</option>";
}
?>
</select>
<input type="submit" name="submit" id="submit" value="Select" />
</p>
<table width="500" border="2">
<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">Chat</th>
</tr>
<?php
while($arrvar=mysql_fetch_array($resul))
{
$resul2 = mysql_query("SELECT * FROM branch where branchid='$arrvar[branchid]'");
$arrvar2=mysql_fetch_array($resul2);
echo " <tr>
<td> $arrvar[fname] $arrvar[lname]</td>
<td> $arrvar[loginid]</td>
<td> $arrvar2[branchname]</td>
<td> ";
?>
<input type="button" value="Click Here to Chat" onclick="window.open('chatsend.php','popUpWindow','height=550,width=425,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');">
<?php
echo " </td>
</tr>";
}
?>
</table>
<p><br />
</p>
</table>
</form>
<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="margin_bottom_20"></div>
<div class="margin_bottom_20"></div>
<div class="margin_bottom_20"></div>
</div>
</div> <!-- end of content right -->
<div class="cleaner"></div>
</div>
<?php
include("footer.php");
?>