-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_joined.php
More file actions
278 lines (254 loc) · 9.22 KB
/
Copy pathmain_joined.php
File metadata and controls
278 lines (254 loc) · 9.22 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<?php
if(!isset($_SESSION)){session_start();} //세션이 있으면 넘어가고 없으면 세션을 시작함
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" \>
<style>
@import url(http://fonts.googleapis.com/earlyaccess/jejugothic.css);
body {
margin: 0px;
}
#logo_center {
display: table-cell;
vertical-align: middle;
text-align: center;
}
pre {
margin: 0;
font-size: 50px;
text-align: center;
}
#board_area {margin:5px auto; background-color: white; border-radius: 50px;}
#invite_area {margin:50px auto; height: 50px;}
.list-table thead th{ height:40px; border-top:2px solid #09C; border-bottom:1px solid #CCC; font:bold 17px 'malgun gothic'; }
.list-table tbody td{ text-align:center; padding:10px 0; border-bottom:1px solid #CCC; height:20px; font: 14px 'malgun gothic';}
#main_head {
margin: 0px auto 0px auto;
text-align: center;
}
table {
margin: 0px auto;
}
a {
text-decoration: none;
color: black;
}
/*왼쪽 메뉴 스타일들*/
#left_menu {
width: 300px;
height: 790px;
float:left;
overflow: hidden;
}
#left_project_logo {
width: 200px;
height: 200px;
margin: 30px 50px 30px 50px;
background-color: red;
border-radius: 100px;
text-align: center;
}
#left_project_info {
border-radius: 50px;
width: 240px;
height: 540px;
margin: 30px;
padding-top: 30px;
}
#left-project-detail {
width: 200px;
height: 360px;
margin-top: 50px;
margin-left: 20px;
background-color: white;
text-align: center;
}
#left_project_manage {
width: 180px;
height: 50px;
border: 3px solid black;
margin-left: 30px;
background-size: cover;
background-image: url('left_project_manage.png')
}
#left_project_manage:hover {
background-image: url('left_project_manage_hover.png')
}
/*오른쪽 메뉴 스타일들*/
#right_menu {
height: 790px;
float:right;
}
#right_error_menu {
width: 1550px;
height: 300px;
}
#right_project_board {
float: right;
width: 700px;
height: 500px;
margin: 0 100px 25px 0;
padding: 10px 10px 10px 10px
}
#doneBtn {
float: right;
width: 120px;
height: 40px;
border: 0;
margin-right: 100px;
border-style: none;
background-image: url('manage_work.png');
background-size: cover;
}
#doneBtn:hover {
background-image: url('manage_work_hover.png');
cursor: pointer;
float: right;
}
</style>
</head>
<body>
<?php
include "db.php";
include "top_menu.php";
$index = $_REQUEST['index']; //REQUEST로 $index 받아서 넣어주고
$id = $_SESSION['id'];
$pname_path="/project/".$index."/pInfo/pname"; //path 설정할때 $index 사용함
$goal_path="/project/".$index."/pInfo/goal";
$nump_path="/project/".$index."/pInfo/numpeople";
$maxp_path="/project/".$index."/pInfo/maxpeople";
$leader_path="/project/".$index."/pInfo/leader";
$begin_path="/project/".$index."/pInfo/beginline";
$dead_path="/project/".$index."/pInfo/deadline";
$status_path="/project/".$index."/pInfo/status";
$info_path="/project/".$index."/pInfo/info";
$pname = $firebase->get($pname_path);
$goal = $firebase->get($goal_path);
$nump = $firebase->get($nump_path);
$maxp = $firebase->get($maxp_path);
$leader = $firebase->get($leader_path);
$begin = $firebase->get($begin_path);
$dead = $firebase->get($dead_path);
$status = $firebase->get($status_path);
$info = $firebase->get($info_path);
$pname = explode("\"", $pname)[1]; //"" 붙는거 없애는작업
$goal = explode("\"", $goal)[1];
$leader = explode("\"", $leader)[1];
$begin = explode("\"", $begin)[1];
$dead = explode("\"", $dead)[1];
$status = explode("\"", $status)[1];
$info = explode("\"", $info)[1];
?>
<div id=left_menu>
<div id=left_project_logo>
<!-- <img src=left_project_logo.png style="width: 200px; height:200px; border-radius: 100px;"> -->
<img src=bulb.png style="width: 200px; height:200px;">
<h1 style="margin-top: 20px"><?php echo $pname;?></h1>
</div>
<div id=left_project_info>
<div id=left-project-detail>
<table border=0 style="width: 200px; height: 340px; border-collapse: collapse;">
<tr style="height: 60px; border-bottom: 2px dotted #BDBDBD;">
<th><h2>팀장</h2></th><td><?php echo $leader?></td>
</tr>
<tr style="height: 60px; border-bottom: 2px dotted #BDBDBD;">
<th><h2>목표</h2></th><td><?php echo $goal?></td>
</tr>
<tr style="height: 80px; border-bottom: 2px dotted #BDBDBD;">
<th colspan=2><?php echo $begin?> ~<br> <?php echo $dead?></th>
</tr>
<tr style="height: 100px;">
<th colspan=2><?php echo $info?></td>
</tr>
</table>
</div>
<?php if($id == $leader){?>
<a href=project_manage.php?index=<?php echo $index?>> <div id=left_project_manage></div> </a>
<?php }?>
</div>
</div>
<div id=right_menu>
<a href=# onClick="window.open('message.php?index=<?php echo $index?>','window_name','width=550,height=600,location=no,status=no,scrollbars=no')" id="message_img"
style="float: right; margin-right: 100px; margin-top: 30px;"><img src=message.png style="width: 50px; height: 50px;"></a>
<?php
make_processbar($index);
make_error_card($index); //파라미터로 현재 프로젝트 번호 넘겨줘야함
?>
<div id=right_project_board>
<div style="height: 50px;">
<h1 id=main_head style="width: 300px; margin-left: 180px; float: left;">TO DO LIST</h1>
<?php if($id == $leader){?>
<input id=doneBtn type=button Onclick="window.open('work_manage.php?index=<?php echo $index;?>','window_name','width=700,height=800,location=no,status=no,scrollbars=no')" id="message_img"
style="" value="">
</div>
<?php }?>
<div id="board_area" style="margin-top: 10px;">
<table class="list-table">
<thead>
<tr>
<th width="60">번호</th>
<th width="200">제목</th>
<th width="200">기간</th>
<th width="80">상태</th>
</tr>
</thead>
<?php
$wincrease_path="/project/".$index."/things/increase";
$wincrease = $firebase->get($wincrease_path);
$i = 1;
while($wincrease >= $i){
$valid_path="/project/".$index."/things/".$i."/id";
$valid = $firebase->get($valid_path);
$valid = explode("\"", $valid)[1];
if($valid == null){
$i++;
}elseif($valid != $id){
$i++;
}else{
$wname_path="/project/".$index."/things/".$i."/wname";
$content_path="/project/".$index."/things/".$i."/content";
$wbegin_path="/project/".$index."/things/".$i."/beginline";
$wdead_path="/project/".$index."/things/".$i."/deadline";
$state_path="/project/".$index."/things/".$i."/state";
$wname = $firebase->get($wname_path);
$content = $firebase->get($content_path);
$wbegin = $firebase->get($wbegin_path);
$wdead = $firebase->get($wdead_path);
$state = $firebase->get($state_path);
$wname = explode("\"", $wname)[1];
$content = explode("\"", $content)[1];
$wbegin = explode("\"", $wbegin)[1];
$wdead = explode("\"", $wdead)[1];
?>
<tbody>
<tr>
<td width="60"><?php echo $i; ?></td>
<td width="200"><a href=# onclick="window.open('work_detail.php?pindex=<?php echo $index;?>&windex=<?php echo $i;?>','window_name','width=550,height=600,location=no,status=no,scrollbars=no')" id="message_img" style=""><?php echo $wname;?></a></td> <!--REQUEST 로 선택한 글 프로젝트 $index를 넘겨준다.-->
<td width="200"><?php echo $wbegin; ?> ~ <?php echo $wdead; ?></td>
<?php if($state == 3){?>
<td width="80"><img border="0" src="done2.png" alt="done" width="20" height="20"></td>
<?php }elseif($state == 2){?>
<td width="80"><img border="0" src="issue2.png" alt="done" width="20" height="20"></td>
<?php }elseif($state == 1){?>
<td width="80"><img border="0" src="working3.png" alt="done" width="20" height="20"></td>
<?php }else{?>
<td width="80"><img border="0" src="finding2.png" alt="done" width="20" height="20"></td>
<?php }?>
</tr>
</tbody>
<?php
$i++;
}
}
?>
</table>
</div>
</div>
</div>
<?php
include "footer.php";
?>
</body>
</html>