/
question.php
601 lines (555 loc) · 18.5 KB
/
question.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
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
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
<?php
/*
#############################################################
# >>> PHP Surveyor #
#############################################################
# > Author: Jason Cleeland #
# > E-mail: jason@cleeland.org #
# > Mail: Box 99, Trades Hall, 54 Victoria St, #
# > CARLTON SOUTH 3053, AUSTRALIA #
# > Date: 20 February 2003 #
# #
# This set of scripts allows you to develop, publish and #
# perform data-entry on surveys. #
#############################################################
# #
# Copyright (C) 2003 Jason Cleeland #
# #
# This program 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. #
# #
# 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 General Public License #
# for more details. #
# #
# You should have received a copy of the GNU General #
# Public License along with this program; if not, write to #
# the Free Software Foundation, Inc., 59 Temple Place - #
# Suite 330, Boston, MA 02111-1307, USA. #
#############################################################
*/
//Move current step
if (!isset($_SESSION['step'])) {$_SESSION['step']=0;}
if (!isset($_POST['thisstep'])) {$_POST['thisstep'] = "";}
if (!isset($_POST['newgroupondisplay'])) {$_POST['newgroupondisplay'] = "";}
if (isset($_POST['move']) && $_POST['move'] == " << "._PREV." " && !$_POST['newgroupondisplay']) {$_SESSION['step'] = $_POST['thisstep']-1;}
elseif (isset($_POST['move']) && $_POST['move'] == " << "._PREV." " && $_POST['newgroupondisplay'] == "Y") {$_SESSION['step'] = $_POST['thisstep'];}
if (isset($_POST['move']) && $_POST['move'] == " "._NEXT." >> ") {$_SESSION['step'] = $_POST['thisstep']+1;}
if (isset($_POST['move']) && $_POST['move'] == " "._LAST." ") {$_SESSION['step'] = $_POST['thisstep']+1;}
//CONVERT POSTED ANSWERS TO SESSION VARIABLES
if (isset($_POST['fieldnames']) && $_POST['fieldnames'])
{
$postedfieldnames=explode("|", $_POST['fieldnames']);
foreach ($postedfieldnames as $pf)
{
if (isset($_POST[$pf])) {$_SESSION[$pf] = $_POST[$pf];}
if (!isset($_POST[$pf])) {$_SESSION[$pf] = "";}
}
}
//CHECK IF ALL MANDATORY QUESTIONS HAVE BEEN ANSWERED
if (isset($_POST['move']) && $allowmandatorybackwards==1 && $_POST['move'] == " << "._PREV." ") {$backok="Y";} else {$backok="N";}
$notanswered=addtoarray_single(checkmandatorys($backok),checkconditionalmandatorys($backok));
//SUBMIT
if (isset($_POST['move']) && $_POST['move'] == " "._SUBMIT." " && isset($_SESSION['insertarray']))
{
//If survey has datestamp turned on, add $localtimedate to sessions
if ($thissurvey['datestamp'] == "Y")
{
$_SESSION['insertarray'][] = "datestamp";
$_SESSION['datestamp'] = $localtimedate;
}
//DEVELOP SQL TO INSERT RESPONSES
$subquery = createinsertquery();
//COMMIT CHANGES TO DATABASE
if ($thissurvey['active'] != "Y")
{
sendcacheheaders();
echo "<html>\n";
foreach(file("$thistpl/startpage.pstpl") as $op)
{
echo templatereplace($op);
}
$completed = "<br /><b><font size='2' color='red'>"._DIDNOTSAVE."</b></font><br /><br />\n\n";
$completed .= _NOTACTIVE1."<br /><br />\n";
$completed .= "<a href='".$_SERVER['PHP_SELF']."?sid=$sid&move=clearall'>"._CLEARRESP."</a><br /><br />\n";
$completed .= "<font size='1'>$subquery</font>\n";
}
else //submit the responses
{
if (mysql_query($subquery)) //submit was successful
{
//UPDATE COOKIE IF REQUIRED
$savedid=mysql_insert_id();
if ($thissurvey['usecookie'] == "Y" && $tokensexist != 1) //don't use cookies if tokens are being used
{
$cookiename="PHPSID".returnglobal('sid')."STATUS";
setcookie("$cookiename", "COMPLETE", time() + 31536000);
}
sendcacheheaders();
echo "<html>\n";
foreach(file("$thistpl/startpage.pstpl") as $op)
{
echo templatereplace($op);
}
$completed = "<br /><b><font size='2'><font color='green'>"
._THANKS."</b></font><br /><br />\n\n"
._SURVEYREC."<br />\n"
."<a href='javascript:window.close()'>"
._CLOSEWIN_PS."</a></font><br /><br />\n";
//Update the token if needed and send a confirmation email
if (isset($_POST['token']) && $_POST['token'])
{
submittokens();
}
//Send notification to survey administrator //Thanks to Jeff Clement http://jclement.ca
if ($thissurvey['sendnotification'] > 0 && $thissurvey['adminemail'])
{
sendsubmitnotification($thissurvey['sendnotification']);
}
session_unset();
session_destroy();
}
else
{
//Submit of Responses Failed
$completed=submitfailed();
}
}
foreach(file("$thistpl/completed.pstpl") as $op)
{
echo templatereplace($op);
}
echo "\n<br />\n";
foreach(file("$thistpl/endpage.pstpl") as $op)
{
echo templatereplace($op);
}
exit;
}
//LAST PHASE
if (isset($_POST['move']) && $_POST['move'] == " "._LAST." " && (!isset($notanswered) || !$notanswered))
{
last();
exit;
}
//SEE IF $sid EXISTS
if ($surveyexists <1)
{
sendcacheheaders();
echo "<html>\n";
//SURVEY DOES NOT EXIST. POLITELY EXIT.
foreach(file("$thistpl/startpage.pstpl") as $op)
{
echo templatereplace($op);
}
echo "\t<center><br />\n";
echo "\t"._SURVEYNOEXIST."<br /> \n";
foreach(file("$thistpl/endpage.pstpl") as $op)
{
echo templatereplace($op);
}
exit;
}
//RUN THIS IF THIS IS THE FIRST TIME
if (!isset($_SESSION['step']) || !$_SESSION['step'])
{
$totalquestions = buildsurveysession();
sendcacheheaders();
echo "<html>\n";
foreach(file("$thistpl/startpage.pstpl") as $op)
{
echo templatereplace($op);
}
echo "\n<form method='post' action='{$_SERVER['PHP_SELF']}' id='phpsurveyor' name='phpsurveyor'>\n";
echo "\n\n<!-- START THE SURVEY -->\n";
foreach(file("$thistpl/welcome.pstpl") as $op)
{
echo "\t\t\t".templatereplace($op);
}
echo "\n";
$navigator = surveymover();
foreach(file("$thistpl/navigator.pstpl") as $op)
{
echo templatereplace($op);
}
if ($thissurvey['active'] != "Y") {echo "\t\t<center><font color='red' size='2'>"._NOTACTIVE."</font></center>\n";}
foreach(file("$thistpl/endpage.pstpl") as $op)
{
echo templatereplace($op);
}
echo "\n<input type='hidden' name='sid' value='$sid'>\n";
echo "\n<input type='hidden' name='token' value='$token'>\n";
echo "\n<input type='hidden' name='lastgroupname' value='_WELCOME_SCREEN_'>\n"; //This is to ensure consistency with mandatory checks, and new group test
echo "\n</form>\n</html>";
exit;
}
//******************************************************************************************************
//PRESENT SURVEY
//******************************************************************************************************
//GET GROUP DETAILS
if ($_SESSION['step'] == "0") {$currentquestion=$_SESSION['step'];}
else {$currentquestion=$_SESSION['step']-1;}
$ia=$_SESSION['fieldarray'][$currentquestion];
list($newgroup, $gid, $groupname, $groupdescription, $gl)=checkIfNewGroup($ia);
// MANAGE CONDITIONAL QUESTIONS
$conditionforthisquestion=$ia[7];
$questionsSkipped=0;
while ($conditionforthisquestion == "Y") //IF CONDITIONAL, CHECK IF CONDITIONS ARE MET
{
$cquery="SELECT distinct cqid FROM {$dbprefix}conditions WHERE qid={$ia[0]}";
$cresult=mysql_query($cquery) or die("Couldn't count cqids<br />$cquery<br />".mysql_error());
$cqidcount=mysql_num_rows($cresult);
$cqidmatches=0;
while ($crows=mysql_fetch_array($cresult))//Go through each condition for this current question
{
//Check if the condition is multiple type
$ccquery="SELECT type FROM {$dbprefix}questions WHERE qid={$crows['cqid']}";
$ccresult=mysql_query($ccquery) or die ("Coudn't get type from questions<br />$ccquery<br />".mysql_error());
while($ccrows=mysql_fetch_array($ccresult))
{
$thistype=$ccrows['type'];
}
$cqquery = "SELECT cfieldname, value, cqid FROM {$dbprefix}conditions WHERE qid={$ia[0]} AND cqid={$crows['cqid']}";
$cqresult = mysql_query($cqquery) or die("Couldn't get conditions for this question/cqid<br />$cquery<br />".mysql_error());
$amatchhasbeenfound="N";
while ($cqrows=mysql_fetch_array($cqresult)) //Check each condition
{
$currentcqid=$cqrows['cqid'];
$conditionfieldname=$cqrows['cfieldname'];
if (!$cqrows['value']) {$conditionvalue="NULL";} else {$conditionvalue=$cqrows['value'];}
if ($thistype == "M" || $thistype == "P") //Adjust conditionfieldname for multiple option type questions
{
$conditionfieldname .= $conditionvalue;
$conditionvalue = "Y";
}
if (!isset($_SESSION[$conditionfieldname]) || !$_SESSION[$conditionfieldname]) {$currentvalue="NULL";} else {$currentvalue=$_SESSION[$conditionfieldname];}
if ($currentvalue == $conditionvalue) {$amatchhasbeenfound="Y";}
}
if ($amatchhasbeenfound == "Y") {$cqidmatches++;}
}
if ($cqidmatches == $cqidcount)
{
//a match has been found in ALL distinct cqids. The question WILL be displayed
$conditionforthisquestion="N";
}
else
{
//matches have not been found in ALL distinct cqids. The question WILL NOT be displayed
$questionsSkipped++;
if (returnglobal('move') == " "._NEXT." >> ")
{
$currentquestion++;
if(isset($_SESSION['fieldarray'][$currentquestion]))
{
$ia=$_SESSION['fieldarray'][$currentquestion];
}
$_SESSION['step']++;
foreach ($_SESSION['grouplist'] as $gl)
{
if ($gl[0] == $ia[5])
{
$gid=$gl[0];
$groupname=$gl[1];
$groupdescription=$gl[2];
if ($_POST['lastgroupname'] != $groupname && $groupdescription) {$newgroup = "Y";} else {$newgroup == "N";}
}
}
if ($_SESSION['step'] > $_SESSION['totalsteps'])
{
//The last question was conditional and has been skipped. Move into panic mode.
$conditionforthisquestion="N";
last();
exit;
}
}
elseif (returnglobal('move') == " << "._PREV." ")
{
$currentquestion--;
$ia=$_SESSION['fieldarray'][$currentquestion];
$_SESSION['step']--;
}
$conditionforthisquestion=$ia[7];
}
}
if ($questionsSkipped == 0 && $newgroup == "Y" && $_POST['move'] == " << "._PREV." " && (isset($_POST['grpdesc']) && $_POST['grpdesc']=="Y")) //a small trick to manage moving backwards from a group description
{
//This does not work properly in all instances.
$currentquestion++;
$ia=$_SESSION['fieldarray'][$currentquestion];
$_SESSION['step']++;
}
list($newgroup, $gid, $groupname, $groupdescription, $gl)=checkIfNewGroup($ia);
require_once("qanda.php");
$mandatorys=array();
$mandatoryfns=array();
$conmandatorys=array();
$conmandatoryfns=array();
$conditions=array();
$inputnames=array();
list($plus_qanda, $plus_inputnames)=retrieveAnswers($ia);
if ($plus_qanda)
{
$qanda[]=$plus_qanda;
}
if ($plus_inputnames)
{
$inputnames = addtoarray_single($inputnames, $plus_inputnames);
}
//Display the "mandatory" popup if necessary
if (isset($notanswered))
{
list($mandatorypopup, $popup)=mandatory_popup($ia, $notanswered);
}
//Get list of mandatory questions
list($plusman, $pluscon)=create_mandatorylist($ia);
if ($plusman !== null)
{
list($plus_man, $plus_manfns)=$plusman;
$mandatorys=addtoarray_single($mandatorys, $plus_man);
$mandatoryfns=addtoarray_single($mandatoryfns, $plus_manfns);
}
if ($pluscon !== null)
{
list($plus_conman, $plus_conmanfns)=$pluscon;
$conmandatorys=addtoarray_single($conmandatorys, $plus_conman);
$conmandatoryfns=addtoarray_single($conmandatoryfns, $plus_conmanfns);
}
//Build an array containing the conditions that apply for this page
$plus_conditions=retrieveConditionInfo($ia); //Returns false if no conditions
if ($plus_conditions)
{
$conditions = addtoarray_single($conditions, $plus_conditions);
}
//------------------------END DEVELOPMENT OF QUESTION
$percentcomplete = makegraph($_SESSION['step'], $_SESSION['totalsteps']);
//READ TEMPLATES, INSERT DATA AND PRESENT PAGE
sendcacheheaders();
echo "<html>\n";
if (isset($popup)) {echo $popup;}
foreach(file("$thistpl/startpage.pstpl") as $op)
{
echo templatereplace($op);
}
echo "\n<form method='post' action='{$_SERVER['PHP_SELF']}' id='phpsurveyor' name='phpsurveyor'>\n";
echo "\n\n<!-- START THE SURVEY -->\n";
foreach(file("$thistpl/survey.pstpl") as $op)
{
echo "\t".templatereplace($op);
}
if ($newgroup == "Y" && $groupdescription && $_POST['move'] != " << "._PREV." ")
{
$presentinggroupdescription = "yes";
echo "\n\n<!-- START THE GROUP DESCRIPTION -->\n";
echo "\t\t\t<input type='hidden' name='grpdesc' value='Y'>\n";
foreach(file("$thistpl/startgroup.pstpl") as $op)
{
echo "\t".templatereplace($op);
}
echo "\n<br />\n";
if ($groupdescription)
{
foreach(file("$thistpl/groupdescription.pstpl") as $op)
{
echo "\t\t".templatereplace($op);
}
}
echo "\n";
echo "\n\n<!-- JAVASCRIPT FOR CONDITIONAL QUESTIONS -->\n";
echo "\t<script type='text/javascript'>\n";
echo "\t<!--\n";
echo "\t\tfunction checkconditions(value, name, type)\n";
echo "\t\t\t{\n";
echo "\t\t\t}\n";
echo "\t//-->\n";
echo "\t</script>\n\n";
echo "\n\n<!-- END THE GROUP -->\n";
foreach(file("$thistpl/endgroup.pstpl") as $op)
{
echo "\t\t\t\t".templatereplace($op);
}
echo "\n";
$_SESSION['step']--;
echo "\t\t\t<input type='hidden' name='newgroupondisplay' value='Y'>\n";
}
else
{
echo "\n\n<!-- START THE GROUP -->\n";
foreach(file("$thistpl/startgroup.pstpl") as $op)
{
echo "\t".templatereplace($op);
}
echo "\n";
echo "\n\n<!-- JAVASCRIPT FOR CONDITIONAL QUESTIONS -->\n";
echo "\t<script type='text/javascript'>\n";
echo "\t<!--\n";
echo "\t\tfunction checkconditions(value, name, type)\n";
echo "\t\t\t{\n";
echo "\t\t\t}\n";
echo "\t//-->\n";
echo "\t</script>\n\n";
echo "\n\n<!-- PRESENT THE QUESTIONS -->\n";
if (is_array($qanda))
{
foreach ($qanda as $qa)
{
echo "\n\t<!-- NEW QUESTION -->\n";
echo "\t\t\t\t<div name='$qa[4]' id='$qa[4]'>";
$question=$qa[0];
$answer=$qa[1];
$help=$qa[2];
$questioncode=$qa[5];
foreach(file("$thistpl/question.pstpl") as $op)
{
echo "\t\t\t\t\t".templatereplace($op)."\n";
}
echo "\t\t\t\t</div>\n";
}
}
echo "\n\n<!-- END THE GROUP -->\n";
foreach(file("$thistpl/endgroup.pstpl") as $op)
{
echo "\t\t\t\t".templatereplace($op);
}
echo "\n";
}
$navigator = surveymover();
echo "\n\n<!-- PRESENT THE NAVIGATOR -->\n";
foreach(file("$thistpl/navigator.pstpl") as $op)
{
echo "\t\t".templatereplace($op);
}
echo "\n";
if ($thissurvey['active'] != "Y") {echo "\t\t<center><font color='red' size='2'>"._NOTACTIVE."</font></center>\n";}
foreach(file("$thistpl/endpage.pstpl") as $op)
{
echo templatereplace($op);
}
echo "\n";
if (isset($conditions) && is_array($conditions)) //if conditions exist, create hidden inputs for previously answered questions
{
foreach (array_keys($_SESSION) as $SESak)
{
if (in_array($SESak, $_SESSION['insertarray']))
{
echo "<input type='hidden' name='java$SESak' id='java$SESak' value='" . $_SESSION[$SESak] . "'>\n";
}
}
}
//PUT LIST OF FIELDS INTO HIDDEN FORM ELEMENT (But only when a question is showing)
if ($newgroup == "Y" && $groupdescription && $_POST['move'] != " << "._PREV." ")
{}
else
{echo "<input type='hidden' name='fieldnames' value='";
echo implode("|", $inputnames);
echo "'>\n";
}
//SOME STUFF FOR MANDATORY QUESTIONS
if (remove_nulls_from_array($mandatorys) && $newgroup != "Y")
{
$mandatory=implode("|", remove_nulls_from_array($mandatorys));
echo "<input type='hidden' name='mandatory' value='$mandatory'>\n";
}
if (remove_nulls_from_array($conmandatorys))
{
$conmandatory=implode("|", remove_nulls_from_array($conmandatorys));
echo "<input type='hidden' name='conmandatory' value='$conmandatory'>\n";
}
if (remove_nulls_from_array($mandatoryfns))
{
$mandatoryfn=implode("|", remove_nulls_from_array($mandatoryfns));
echo "<input type='hidden' name='mandatoryfn' value='$mandatoryfn'>\n";
}
if (remove_nulls_from_array($conmandatoryfns))
{
$conmandatoryfn=implode("|", remove_nulls_from_array($conmandatoryfns));
echo "<input type='hidden' name='conmandatoryfn' value='$conmandatoryfn'>\n";
}
echo "<input type='hidden' name='thisstep' value='{$_SESSION['step']}'>\n";
echo "<input type='hidden' name='sid' value='$sid'>\n";
echo "<input type='hidden' name='token' value='$token'>\n";
echo "<input type='hidden' name='lastgroupname' value='".htmlspecialchars($groupname)."'>\n";
echo "</form>\n</html>";
function last()
{
global $thissurvey;
global $thistpl, $sid, $token;
if (!isset($privacy)) {$privacy="";}
if ($thissurvey['private'] != "N")
{
foreach (file("$thistpl/privacy.pstpl") as $op)
{
$privacy .= templatereplace($op);
}
}
//READ TEMPLATES, INSERT DATA AND PRESENT PAGE
sendcacheheaders();
echo "<html>\n";
foreach(file("$thistpl/startpage.pstpl") as $op)
{
echo templatereplace($op);
}
echo "\n\n<!-- JAVASCRIPT FOR CONDITIONAL QUESTIONS -->\n";
echo "\t<script type='text/javascript'>\n";
echo "\t<!--\n";
echo "\t\tfunction checkconditions(value, name, type)\n";
echo "\t\t\t{\n";
echo "\t\t\t}\n";
echo "\t//-->\n";
echo "\t</script>\n\n";
echo "\n<form method='post' action='{$_SERVER['PHP_SELF']}' id='phpsurveyor' name='phpsurveyor'>\n";
$GLOBALS["privacy"]=$privacy;
echo "\n\n<!-- START THE SURVEY -->\n";
foreach(file("$thistpl/survey.pstpl") as $op)
{
echo "\t\t".templatereplace($op);
}
//READ SUBMIT TEMPLATE
foreach(file("$thistpl/submit.pstpl") as $op)
{
echo "\t\t\t".templatereplace($op);
}
$GLOBALS["navigator"]=surveymover();
echo "\n\n<!-- PRESENT THE NAVIGATOR -->\n";
foreach(file("$thistpl/navigator.pstpl") as $op)
{
echo "\t\t".templatereplace($op);
}
echo "\n";
foreach(file("$thistpl/endpage.pstpl") as $op)
{
echo templatereplace($op);
}
echo "\n";
echo "\n<input type='hidden' name='thisstep' value='{$_SESSION['step']}'>\n";
echo "\n<input type='hidden' name='sid' value='$sid'>\n";
echo "\n<input type='hidden' name='token' value='$token'>\n";
echo "\n</form>\n</html>";
}
function checkIfNewGroup($ia)
{
foreach ($_SESSION['grouplist'] as $gl)
{
if ($gl[0] == $ia[5])
{
$gid=$gl[0];
$groupname=$gl[1];
$groupdescription=$gl[2];
if (isset($_POST['lastgroupname']) && $_POST['lastgroupname'] != $groupname && $groupdescription)
{
$newgroup = "Y";
}
else
{
$newgroup = "N";
}
if (!isset($_POST['lastgroupname'])) {$newgroup="Y";}
}
}
return array($newgroup, $gid, $groupname, $groupdescription, $gl);
}
?>