-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview_subproject.php
68 lines (66 loc) · 2.45 KB
/
view_subproject.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
<?php
// ReqHeap - a simple requirement management program.
//
// Copyright (C) 2007 Slav Peev , Matthias Gunter
// Programmed by i-nature.com
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// -----------------------------------------------------------------
//
// Page: "View subproject" - showing subproject info
//check
if ($s_id=="") header("Location:index.php");
$query="select * from subprojects where s_id=".$s_id;
$rs = mysql_query($query) or die(mysql_error());
if($row=mysql_fetch_array($rs))
{
$s_name=htmlspecialchars($row['s_name']);
$s_desc=$row['s_desc'];
$s_p_id=htmlspecialchars($row['s_p_id']);
}
?>
<table border="0" width="50%">
<tr valign="top">
<td>
<table border="0" cellpadding="2" cellspacing="2" class="content" width="100%">
<tr class="gray">
<td colspan="2" align="center"><b><?=$lng[28][8]?></b></td>
</tr>
<tr class="blue" title="<?=$lng[28][1]?>">
<td align="right" width="50%"> <?=$lng[28][1]?> : </td>
<td><?=$s_name?></td>
</tr>
<tr class="light_blue" title="<?=$lng[28][2]?>">
<td align="right"> <?=$lng[28][2]?> : </td>
<td><?=$s_desc?></td>
</tr>
<tr class="blue" valign="top" title="<?=$lng[28][3]?>">
<td align="right"> <?=$lng[28][3]?> : </td>
<td>
<?
$query2="select p.* from projects p where p.p_id='".$s_p_id."' order by p.p_name asc";
$rs2 = mysql_query($query2) or die(mysql_error());
while($row2=mysql_fetch_array($rs2))
{
echo "<a href='index.php?inc=view_project&p_switch=yes&project_id=".$row2['p_id']."&p_id=".$row2['p_id']."'>".htmlspecialchars($row2['p_name'])."</a>";
echo "<br>";
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>