-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsertmatter.php
More file actions
executable file
·477 lines (451 loc) · 13.4 KB
/
Copy pathinsertmatter.php
File metadata and controls
executable file
·477 lines (451 loc) · 13.4 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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
<?php
session_start();
if (!isset($_SESSION['user']))
{
header("Location: login.php");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<?php
require "config.php";
//User Permissions
$access=mysql_result($permission, 6);
if($access != "1")
{
echo "<p><a href='#' onclick='history.go(-1);' style='text-decoration:none'>Not permitted</a></p>";
exit;
}
?>
<head>
<title>
<?php
$title=mysql_query("SELECT programtitle,officetitle,officetime,officewhether,version FROM settings WHERE id=1");
$programtitle = mysql_fetch_array($title);
echo $programtitle['programtitle'];
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<link rel="shortcut icon" href="images/favicon.ico" >
<link rel="stylesheet" href= "css/jquery-ui.custom.css" >
<link href="css/jquery.zweatherfeed.css" rel="stylesheet" type="text/css" >
<link href="css/programstyle.css" rel="stylesheet" type="text/css" >
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.custom.min.js"></script>
<script type="text/javascript">
$(function(){
// Accordion
$('#accordion').accordion({ header: "h3" });
// Tabs
$('#tabs').tabs({
ajaxOptions: {
error: function( xhr, status, index, anchor ) {
$( anchor.hash ).html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo." );
}
}
});
$('#tabs').tabs('select','tabs-3');
// Dialog
$('#dialog').dialog({
autoOpen: false,
width: 600,
buttons: {
"Ok": function() {
$(this).dialog("close");
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
// Dialog Link
$('#dialog_link').click(function(){
$('#dialog').dialog('open');
return false;
});
// Datepicker
$('#datepicker').datepicker({
inline: true
});
// Slider
$('#slider').slider({
range: true,
values: [17, 67]
});
// Progressbar
$("#progressbar").progressbar({
value: 20
});
//hover states on the static widgets
$('#dialog_link, ul#icons li').hover(
function() { $(this).addClass('ui-state-hover'); },
function() { $(this).removeClass('ui-state-hover'); }
);
});
</script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<script type="text/javascript">
function show_alert()
{
alert("The form data will be added to your database.");
}
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#commentForm").validate();
});
</script>
<script type="text/javascript">
$(function(){
//logo
$("#logo").load('logo.php');
//header buttons
$("#button").button();
$("#button").css({ height: '25px', 'padding-top': '0px', 'padding-bottom': '2px' });
$("#button-2").button();
$("#button-2").css({ width: '120px', height: '25px', 'padding-top': '0px', 'padding-bottom': '2px' });
//section buttons
$("#button-3").button();
$("#button-4").button();
$("#button-5").button();
$("#button-6").button();
});
</script>
<script type="text/javascript">
function popup(url)
{
var width = 500;
var height = 200;
var left = (screen.width - width)/2;
var top = (screen.height - height)/2;
var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=no';
params += ', status=no';
params += ', toolbar=no';
newwin=window.open(url,'windowname5', params);
if (window.focus) {newwin.focus()}
return false;
}
</script>
<script type="text/javascript" src="js/jquery.MyDigitClock.js"></script>
<script src="js/jquery.zweatherfeed.min.js" type="text/javascript"></script>
</head>
<body>
<?php include "header.php"; ?>
<?php $module=mysql_query("SELECT descr FROM modules");?>
<div class="matters">
<div id="tabs">
<ul>
<li><a href="myaccount.php" onclick="window.location=('myaccount.php')"><span><?php echo mysql_result($module,7); ?></span></a></li>
<li><a href="person.php" onclick="window.location=('person.php')"><span><?php echo mysql_result($module,0); ?></span></a></li>
<li><a href="#tabs-3"><span><?php echo mysql_result($module,1); ?></span></a></li>
<li><a href="tasks.php" onclick="window.location=('tasks.php')"><span><?php echo mysql_result($module,2); ?></span></a></li>
<li><a href="billing.php" onclick="window.location=('billing.php')"><span><?php echo mysql_result($module,3); ?></span></a></li>
<li><a href="files.php" onclick="window.location=('files.php')"><span><?php echo mysql_result($module,4); ?></span></a></li>
<li><a href="protocol.php" onclick="window.location=('protocol.php')"><span><?php echo mysql_result($module,5); ?></span></a></li>
<li><a href="adminsettings.php" onclick="window.location=('adminsettings.php')"><span><?php echo mysql_result($module,6); ?></span></a></li>
</ul>
<div id="tabs-3">
<h3>New Matter Insert</h3>
<h4>CAUTION The persons associated with the case must be entered in the database first</h4>
<form action="matterindb.php" method="post" name="insertmatter_form" id="commentForm">
<table>
<tr>
<td><font size="2">Matter Description:</font></td>
<td><font size="2">Matter Type:</font></td>
</tr>
<tr>
<td><input type="text" name="descr" maxlength="250" size="60" /></td>
<?php
// Fetch groups for the casetype drop-down.
$sql1 = "SELECT id as ctid, descr as ctdescr FROM casetype ORDER BY descr";
$result1 = mysql_query ($sql1);
// Fetch groups for the thesaurus drop-down.
$sql2 = "SELECT id as theid, descr as thedescr FROM thesaurus ORDER BY descr";
$result2 = mysql_query ($sql2);
// Fetch groups for the person drop-down.
$sql3 = "SELECT id as pid, descr as pdescr FROM person WHERE isdeleted=0 ORDER BY descr";
$result3 = mysql_query ($sql3);
// Fetch groups for the attributes drop-down.
$sql4 = "SELECT id as attid, descr as attdescr FROM attributes ORDER BY descr";
$result4 = mysql_query ($sql4);
?>
<td><select name="SetType">
<option value ="">Select</option>
<?php
// printing the list box select command
while($nt1=mysql_fetch_array($result1)){//Array or records stored in $nt1
echo "<option value='".$nt1['ctid']."'>$nt1[ctdescr]</option>";
/* Option values are added by looping through the array */
}
?>
</select></td>
</tr>
<tr>
<td><font size="2">Default Matter Descriptions:</font></td>
</tr>
<tr>
<td><select name="thesaurus">
<option value ="">Select</option>
<?php
// printing the list box select command
while($nt2=mysql_fetch_array($result2)){//Array or records stored in $nt1
echo "<option value= '$nt2[thedescr]'>$nt2[thedescr]</option>";
/* Option values are added by looping through the array */
}
?>
</select></td>
</tr>
<tr>
<td><font size="2">Open Date:</font></td>
</tr>
<tr>
<td>
<?php
Function ShowFromDate($year_interval,$YearIntervalType) {
GLOBAL $day,$month,$year;
//DAY
echo "<select name='day'>\n";
$i=1;
$CurrDay=date("d");
If(!IsSet($day)) $day=$CurrDay;
while ($i <= 31)
{
If(IsSet($day)) {
If($day == $i || ($i == substr($day,1,1) && (substr($day,0,1) == 0))) {
echo"<option selected> $day\n";
$i++;
}Else{
If($i<10) {
echo "<option> 0$i\n";
}Else {
echo "<option> $i\n";
}
$i++;
}
}Else {
If($i == $CurrDay)
If($i<10) {
echo "<option selected> 0$i\n";
}Else {
echo"<option selected> $i\n";
}
Else {
If($i<10) {
echo "<option> 0$i\n";
}Else {
echo "<option> $i\n";
}
}
$i++;
}
}
echo "</select>\n";
//MONTH
echo " / <select name='month'>\n";
$i=1;
$CurrMonth=date("m");
while ($i <= 12)
{
If(IsSet($month)) {
If($month == $i || ($i == substr($month,1,1) && (substr($month,0,1) == 0))) {
echo"<option selected> $month\n";
$i++;
}Else{
If($i<10) {
echo "<option> 0$i\n";
}Else {
echo "<option> $i\n";
}
$i++;
}
}Else {
If($i == $CurrMonth) {
If($i<10) {
echo "<option selected> 0$i\n";
}Else {
echo "<option selected> $i\n";
}
}Else {
If($i<10){
echo "<option> 0$i\n";
}Else {
echo "<option> $i\n";
}
}
$i++;
}
}
echo "</select>\n";
//YEAR
echo " / <select name='year'>\n";
$CurrYear=date("Y");
If($YearIntervalType == "Past") {
$i=$CurrYear-$year_interval+1;
while ($i <= $CurrYear)
{
If($i == $year) {
echo "<option selected> $i\n";
}ElseIf ($i == $CurrYear && !IsSet($year)) {
echo "<option selected> $i\n";
}Else {
echo "<option> $i\n";
}
$i++;
}
echo "</select>\n";
}
If($YearIntervalType == "Future") {
$i=$CurrYear+$year_interval;
while ($CurrYear < $i)
{
if ($year == $CurrYear) echo "<option selected> $CurrYear\n";
else echo "<option> $CurrYear\n";
$CurrYear++;
}
echo "</select>\n";
}
If($YearIntervalType == "Both") {
$i=$CurrYear-$year_interval+1;
while ($i < $CurrYear+$year_interval)
{
if ($i == $CurrYear) echo "<option selected> $i\n";
else echo "<option> $i\n";
$i++;
}
echo "</select>\n";
}
}
//Ussage Example :
ShowFromDate(4,"Both");
?>
</td>
</tr>
<tr>
<td><font size="2">Close Date:</font></td>
</tr>
<tr>
<td><select name="cday">
<option value =""></option>
<option value='01'>01</option>
<option value='02'>02</option>
<option value='03'>03</option>
<option value='04'>04</option>
<option value='05'>05</option>
<option value='06'>06</option>
<option value='07'>07</option>
<option value='08'>08</option>
<option value='09'>09</option>
<option value='10'>10</option>
<option value='11'>11</option>
<option value='12'>12</option>
<option value='13'>13</option>
<option value='14'>14</option>
<option value='15'>15</option>
<option value='16'>16</option>
<option value='17'>17</option>
<option value='18'>18</option>
<option value='19'>19</option>
<option value='20'>20</option>
<option value='21'>21</option>
<option value='22'>22</option>
<option value='23'>23</option>
<option value='24'>24</option>
<option value='25'>25</option>
<option value='26'>26</option>
<option value='27'>27</option>
<option value='28'>28</option>
<option value='29'>29</option>
<option value='30'>30</option>
<option value='31'>31</option>
</select>
/
<select name="cmonth">
<option value=""></option>
<option value='01'>01</option>
<option value='02'>02</option>
<option value='03'>03</option>
<option value='04'>04</option>
<option value='05'>05</option>
<option value='06'>06</option>
<option value='07'>07</option>
<option value='08'>08</option>
<option value='09'>09</option>
<option value='10'>10</option>
<option value='11'>11</option>
<option value='12'>12</option>
</select>
/
<select name="cyear">
<option value=""></option>
<option value='2005'>2005</option>
<option value='2006'>2006</option>
<option value='2007'>2007</option>
<option value='2008'>2008</option>
<option value='2009'>2009</option>
<option value='2010'>2010</option>
<option value='2011'>2011</option>
<option value='2012'>2012</option>
<option value='2013'>2013</option>
<option value='2014'>2014</option>
</select>
</td>
</tr>
</table>
<br/>
<table>
<tr>
<td><font size="2">Associated Person:</font></td>
<td><font size="2">Matter Person attribute:</font></td>
</tr>
<tr>
<td><select name="personid" class="required">
<option value ="">Select</option>
<?PHP
// printing the list box select command
while($nt3=mysql_fetch_array($result3)){//Array or records stored in $nt3
echo "<option value='".$nt3['pid']."'>$nt3[pdescr]</option>";
/* Option values are added by looping through the array */
}
?>
</select></td>
<td><select name="SetAttribute">
<option value ="">Select</option>
<?PHP
// printing the list box select command
while($nt4=mysql_fetch_array($result4)){//Array or records stored in $nt4
echo "<option value='".$nt4['attid']."'>$nt4[attdescr]</option>";
/* Option values are added by looping through the array */
}
?>
</select></td>
</tr>
</table>
<br/>
<table>
<tr><td><h4>Notes</h4></td></tr>
<tr>
<td><textarea rows="4" cols="110" name="notes"></textarea></td>
</tr>
</table>
<br/>
<table>
<tr>
<th><input type="submit" value="Insert" name="Submit" id="button-3" onclick="show_alert()" /></th>
<th><input type="reset" value="Reset" name="Reset" id="button-4" /></th>
<th><input type="button" value="Back" onclick="document.location = 'matters.php';" id="button-5" /></th>
</tr>
</table>
</form>
</div>
</div>
</div>
<?php include "footer.php"; ?></body>
</html>