-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask_search.inc.php
executable file
·176 lines (164 loc) · 8.04 KB
/
task_search.inc.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
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
<?PHP
/*
*******************************************************************************
* Chronologist - web-based time tracking database
* Copyright (C) 2003 by Sylvain LAFRASSE.
*******************************************************************************
* LICENSE:
* This file is part of Chronologist.
*
* Chronologist is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Chronologist 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Chronologist; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*******************************************************************************
* FILE NAME : task_search.inc.php
* DESCRIPTION : Task searching functions.
* AUTHORS : Sylvain LAFRASSE.
*******************************************************************************
*/
// Displays the common task search form
function ShowTaskSearchFields()
{
$TaskProject = "";
$TaskActivity = 0;
$TaskLabel = "";
$TaskBeginning = getdate();
$TaskDurationHour = 0;
$TaskDurationMinute = 0;
$TaskBeginningYear = 0;
$TaskBeginningMonth = 0;
$TaskBeginningDay = 0;
$TaskBeginningHour = 0;
$TaskBeginningMinute = 0;
echo " <FORM ACTION='task_search.php?do=search' METHOD='POST' NAME='task'>
<TABLE BORDER='0'>
<TR>
<TD ALIGN='RIGHT'>
<B> Project :</B>
</TD>
<TD>
<SELECT NAME='pid'>
";
// Gets all the projects from the database
$Array = GetSubProjects();
foreach($Array as $PID => $ProjectLabel)
{
echo " <OPTION VALUE='".$PID."'";
if ($PID == $TaskProject)
{
echo " SELECTED";
}
echo "> ".htmlentities($ProjectLabel)." </OPTION>\n";
}
echo "
</SELECT>
</TD>
</TR>
<TR>
<TD ALIGN='RIGHT'>
<B> Activity :</B>
</TD>
<TD>
<SELECT NAME='aid'>
";
// Gets all the activities from the database
$Array = GetSubActivities();
foreach($Array as $AID => $ActivityLabel)
{
echo " <OPTION VALUE='".$AID."'";
if ($AID == $TaskActivity)
{
echo " SELECTED";
}
echo "> ".htmlentities($ActivityLabel)." </OPTION>\n";
}
echo "
</SELECT>
</TD>
</TR>
<TR>
<TD ALIGN='RIGHT' VALIGN='TOP'>
<I> Label :</I>
</TD>
<TD>
<TEXTAREA COLS='40' ROWS='5' NAME='label'>".htmlentities($TaskLabel)."</TEXTAREA>
</TD>
</TR>
<TR>
<TD ALIGN='RIGHT'>
<B> Duration :</B>
</TD>
<TD>
<TABLE>
<TR>
<TD>
<INPUT TYPE='TEXT' NAME='durationHour' SIZE='2' VALUE='".htmlentities(sprintf("%02d", $TaskDurationHour))."'>
</TD>
<TD>
:
</TD>
<TD>
<INPUT TYPE='TEXT' NAME='durationMinute' SIZE='2' MAXLENGTH ='2' VALUE='".htmlentities(sprintf("%02d", $TaskDurationMinute))."'>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD ALIGN='RIGHT'>
<B> Beginning Date :</B>
</TD>
<TD>
<TABLE>
<TR>
<TD>
<INPUT TYPE='TEXT' NAME='beginningYear' SIZE='4' MAXLENGTH ='4' VALUE='".htmlentities(sprintf("%02d", $TaskBeginningYear))."'>
</TD>
<TD>
/
</TD>
<TD>
<INPUT TYPE='TEXT' NAME='beginningMonth' SIZE='2' MAXLENGTH ='2' VALUE='".htmlentities(sprintf("%02d", $TaskBeginningMonth))."'>
</TD>
<TD>
/
</TD>
<TD>
<INPUT TYPE='TEXT' NAME='beginningDay' SIZE='2' MAXLENGTH ='2' VALUE='".htmlentities(sprintf("%02d", $TaskBeginningDay))."'>
</TD>
<TD>
-
</TD>
<TD>
<INPUT TYPE='TEXT' NAME='beginningHour' SIZE='2' MAXLENGTH ='2' VALUE='".htmlentities(sprintf("%02d", $TaskBeginningHour))."'>
</TD>
<TD>
:
</TD>
<TD>
<INPUT TYPE='TEXT' NAME='beginningMinute' SIZE='2' MAXLENGTH ='2' VALUE='".sprintf("%02d", $TaskBeginningMinute)."'>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD ALIGN='CENTER' COLSPAN='2'>
<BR> <INPUT TYPE='SUBMIT' NAME='search' VALUE='Search'>
</TD>
</TR>
</TABLE>
</FORM>
";
}
?>