-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathteam.php
115 lines (100 loc) · 3.88 KB
/
team.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
107
108
109
110
111
112
113
114
115
<?php
session_start();
include("header.php");
include("dbconnection.php");
$txtb = mysql_query("select * from project where projectid='$_POST [projid]'");
while($rowsrec = mysql_fetch_array($txtb))
{
$projectid = $rowsrec[projectid];
$projectname = $rowsrec[projectname];
}
if(isset($_POST["submit"]))
{
$insdb ="INSERT INTO team(empid,teaminfo,projectid,branchid,comment) VALUES('$_SESSION[emid]','$_POST[teaminfo]', '$_POST[proid]','$_SESSION[brid]','$_POST[comment]')";
mysql_query($insdb,$con);
}
$txtc = mysql_query("select * from team where empid='$_SESSION[emid]'");
?>
<div id="templatemo_content">
<div id="templatemo_content_left">
<?php
if(isset($_POST[projid]))
{
?>
<div class="header_02">Create Team</div>
<form id="form1" name="form1" method="post" action="">
<table width="713" height="212" border="0">
<tr>
<th width="143" height="33" scope="row">Project Name</th>
<td width="560">
<input type="hidden" name="proid" value="<?php echo $projectid; ?>" />
<input name="projectid" type="text" id="projectname" value="<?php echo $projectname; ?>" size="50" align="right" readonly="readonly"/></td>
</tr>
<tr>
<th height="59" scope="row" >Team Info</th>
<td><textarea name="teaminfo" cols="39" id="teaminfo" align="right"></textarea></td>
</tr>
<tr>
<th height="56" scope="row"><label for="comment2">Comment</label></th>
<td><textarea name="comment" cols="39" id="comment" align="right"></textarea></td>
</tr>
<tr>
<th colspan="2" scope="row"><input type="submit" name="submit" id="submit" value="Create Team for <?php echo $projectname; ?> project" /> <input type="reset" name="reset" id="reset" value="Reset" /></th>
</tr>
</table>
</form>
<?php
}
?>
<div class="header_02">Current Development Projects</div>
<table width="609" border="1">
<tr>
<th width="54" scope="col">Team ID</th>
<th width="143" scope="col">Project Name</th>
<th width="267" scope="col">Team Info</th>
<th width="117" scope="col">Task info</th>
</tr>
<?php
while($rowsreca = mysql_fetch_array($txtc))
{
?>
<tr>
<td height="42"> <?php echo $rowsreca[teamid]; ?></td>
<td> <?php
$txtd = mysql_query("select * from project where projectid='$rowsreca[projectid]'");
$rowsrecd = mysql_fetch_array($txtd);
echo $rowsrecd[projectname];
?></td>
<td><?php echo $rowsreca[teaminfo]; ?>No. of Employees working for this project</td>
<td align="center"> <a href="task.php?teamid=<?php echo $rowsreca[teamid]; ?>"><strong>View</strong></a><strong></strong></td>
</tr>
<?php
}
?>
</table>
<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(isset($_SESSION[emid]))
{
include("empsidebar.php");
}
else
{
include("adminsidebar.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");
?>