Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

user/surveylist.php
Go to the documentation of this file.
1 <?php
4 // include_once( "classes/INIFile.php" );
5 // include_once( "classes/eztemplate.php" );
6 // include_once( "ezsurvey/classes/ezsurvey.php" );
7 // include_once( "ezsurvey/classes/ezquestion.php" );
8 // include_once( "ezsurvey/classes/ezresponse.php" );
9 // include_once( "ezsurvey/classes/ezresponsequestion.php" );
10
11 $ini = eZINI::instance( 'site.ini' );
12 $Language = $ini->variable( "eZSurveyMain", "Language" );
13
14 $SurveyID = $url_array[3];
15 $Page = $url_array[4];
16
17 if ( $Page == "" )
18 {
19 $Page = 1;
20 }
21
22 if( !isset( $ResponseID ) )
23 {
24 $ResponseID = false;
25 }
26
27 $t = new eZTemplate( "kernel/ezsurvey/user/" . $ini->variable( "eZSurveyMain", "AdminTemplateDir" ),
28 "kernel/ezsurvey/user/intl", $Language, "surveylist.php" );
29
30 $t->set_file( "surveylist_tpl", "surveylist.tpl" );
31 $t->setAllStrings();
32
33 $t->set_block( "surveylist_tpl", "step_tpl", "step" );
34 $t->set_block( "step_tpl", "step_on_tpl", "step_on" );
35 $t->set_block( "step_tpl", "step_off_tpl", "step_off" );
36
37 $t->set_block( "surveylist_tpl", "already_responded_tpl", "already_responded" );
38
39 $t->set_block( "surveylist_tpl", "subtitle_section_tpl", "subtitle_section" );
40
41 $t->set_block( "surveylist_tpl", "check_value_tpl", "check_value" );
42
43 $t->set_block( "surveylist_tpl", "error_list_tpl", "error_list" );
44 $t->set_block( "error_list_tpl", "error_item_tpl", "error_item" );
45
46 $t->set_block( "surveylist_tpl", "value_list_tpl", "value_list" );
47 $t->set_block( "value_list_tpl", "required_tpl", "required" );
48 $t->set_block( "value_list_tpl", "qnumber_tpl", "qnumber" );
49 $t->set_block( "value_list_tpl", "yesno_tpl", "yesno" );
50
51 $t->set_block( "value_list_tpl", "radio_tpl", "radio" );
52 $t->set_block( "radio_tpl", "radio_item_tpl", "radio_item" );
53 $t->set_block( "radio_tpl", "radio_other_tpl", "radio_other" );
54
55 $t->set_block( "value_list_tpl", "checkbox_tpl", "checkbox" );
56 $t->set_block( "checkbox_tpl", "checkbox_item_tpl", "checkbox_item" );
57 $t->set_block( "checkbox_tpl", "checkbox_other_tpl", "checkbox_other" );
58
59 $t->set_block( "value_list_tpl", "rate_tpl", "rate" );
60 $t->set_block( "rate_tpl", "rate_item_tpl", "rate_item" );
61
62 $t->set_block( "value_list_tpl", "text_tpl", "text" );
63 $t->set_block( "value_list_tpl", "essay_tpl", "essay" );
64 $t->set_block( "value_list_tpl", "date_tpl", "date" );
65 $t->set_block( "value_list_tpl", "numeric_tpl", "numeric" );
66
67 $t->set_block( "value_list_tpl", "dropdown_tpl", "dropdown" );
68 $t->set_block( "dropdown_tpl", "dropdown_item_tpl", "dropdown_item" );
69
70 $t->set_block( "surveylist_tpl", "next_page_button_tpl", "next_page_button" );
71 $t->set_block( "surveylist_tpl", "previous_page_button_tpl", "previous_page_button" );
72 $t->set_block( "surveylist_tpl", "finish_button_tpl", "finish_button" );
73
74 $t->set_var( "survey_id", $SurveyID );
75 $t->set_var( "step", "" );
76 $t->set_var( "subtitle_section", "" );
77 $t->set_var( "value_list", "" );
78
79 $t->set_var( "next_page_button", "" );
80 $t->set_var( "previous_page_button", "" );
81 $t->set_var( "finish_button", "" );
82
83 $t->set_var( "error_list", "" );
84
85 $currentUser = eZUser::currentUser();
86 $errorMessages = array();
87
88 if ( eZSurvey::existSurvey( $SurveyID ) )
89 {
90 if ( isset( $NextPage ) || isset( $PreviousPage ) || isset( $Finish ) )
91 {
92 // response
93 if ( $ResponseID == "" )
94 {
95 $response = new eZResponse();
96 $response->setSurveyID( $SurveyID );
97
98 if ( $currentUser != FALSE )
99 {
100 $response->setUserID( $currentUser->id() );
101 }
102 }
103 else
104 {
105 $response = new eZResponse( $ResponseID );
106 }
107
108 $response->store();
109 $ResponseID = $response->id();
110
111 $i = 0;
112 foreach( $QuestionID as $questionIDItem )
113 {
114 $question = new eZQuestion( $questionIDItem );
115
116 switch ( $question->questionTypeID() )
117 {
118 case $question->TYPE_YESNO:
119 case $question->TYPE_TEXTBOX:
120 case $question->TYPE_TEXTAREA:
121 case $question->TYPE_DROPDOWN:
122 {
123 if ( $question->isRequired() && $Value[$i] == "" )
124 {
125 $errorMessages[] = $question->content() . " " . $t->Ini->variable( "strings", "is_required" );
126 }
127 else
128 {
129 $responseQuestion = new eZResponseQuestion();
130 $responseQuestion->setResponseID( $ResponseID );
131 $responseQuestion->setQuestionID( $questionIDItem );
132 $responseQuestion->setChoiceID( $Value[$i] );
133 $responseQuestion->store();
134 }
135 }
136 break;
137
138 case $question->TYPE_NUMERIC:
139 {
140 if ( $question->isRequired() && $Value[$i] == "" )
141 {
142 $errorMessages[] = $question->content() . " " . $t->Ini->variable( "strings", "is_required" );
143 }
144 elseif ( !is_numeric( $Value[$i] ) )
145 {
146 $errorMessages[] = $question->content() . " " . $t->Ini->variable( "strings", "not_a_number" );
147 }
148 else
149 {
150 $responseQuestion = new eZResponseQuestion();
151 $responseQuestion->setResponseID( $ResponseID );
152 $responseQuestion->setQuestionID( $questionIDItem );
153 $responseQuestion->setChoiceID( $Value[$i] );
154 $responseQuestion->store();
155 }
156 }
157 break;
158
159 case $question->TYPE_DATE:
160 {
161 $data_array = explode( "-", $Value[$i] );
162
163 if ( $question->isRequired() && $Value[$i] == "" )
164 {
165 $errorMessages[] = $question->content() . " " . $t->Ini->variable( "strings", "is_required" );
166 }
167 elseif ( $Value[$i] != "" && ( count($data_array) != "3" || !checkdate( $data_array[1], $data_array[0], $data_array[2] ) ) )
168 {
169 $errorMessages[] = $question->content() . " " . $t->Ini->variable( "strings", "not_a_date" );
170 }
171 else
172 {
173 $responseQuestion = new eZResponseQuestion();
174 $responseQuestion->setResponseID( $ResponseID );
175 $responseQuestion->setQuestionID( $questionIDItem );
176 $responseQuestion->setChoiceID( $Value[$i] );
177 $responseQuestion->store();
178 }
179 }
180 break;
181
182 case $question->TYPE_RADIO:
183 {
184 if ( $question->isRequired() && count($Value[$i][0]) == 0 )
185 {
186 $errorMessages[] = $question->content() . " " . $t->Ini->variable( "strings", "is_required" );
187 }
188 else
189 {
190 $responseQuestion = new eZResponseQuestion();
191 $responseQuestion->setResponseID( $ResponseID );
192 $responseQuestion->setQuestionID( $questionIDItem );
193 $responseQuestion->setChoiceID( $Value[$i][0] );
194 $responseQuestion->setOther( $Value[$i][1] );
195 $responseQuestion->store();
196 }
197 }
198 break;
199
200 case $question->TYPE_CHECKBOX:
201 {
202 if ( $question->isRequired() && count($Value[$i][0]) == 0 )
203 {
204 $errorMessages[] = $question->content() . " " . $t->Ini->variable( "strings", "is_required" );
205 }
206 else
207 {
208 $responseQuestion = new eZResponseQuestion();
209 $responseQuestion->setResponseID( $ResponseID );
210 $responseQuestion->setQuestionID( $questionIDItem );
211
212 $k = 0;
213 for ( $j = 0; $j < count($Value[$i][0]); $j++ )
214 {
215 $questionChoice = new eZQuestionChoice( $Value[$i][0][$j] );
216
217 $choice_array[] = $Value[$i][0][$j];
218 $other_array[] = ( $questionChoice->isOther() ? $Value[$i][1][$k++] : "" );
219 }
220
221 $responseQuestion->setChoiceID( $choice_array );
222 $responseQuestion->setOther( $other_array );
223
224 $responseQuestion->store();
225 }
226 }
227 break;
228
229 case $question->TYPE_RATE:
230 {
231 if ( $question->isRequired() && count($Value[$i]) != count($Rank[$i]) )
232 {
233 $errorMessages[] = $question->content() . " " . $t->Ini->variable( "strings", "is_required" );
234 }
235 elseif ( count($Value[$i]) > 0 )
236 {
237 $responseQuestion = new eZResponseQuestion();
238 $responseQuestion->setResponseID( $ResponseID );
239 $responseQuestion->setQuestionID( $questionIDItem );
240 $responseQuestion->setChoiceID( $Rank[$i] );
241 $responseQuestion->setOther( $Value[$i] );
242 $responseQuestion->store();
243 }
244 }
245 break;
246 }
247 $i++;
248 }
249
250 if ( isset( $Finish ) && count($errorMessages) == 0 )
251 {
252 $response->setComplete( 'Y' );
253 $response->store();
254 $response->sendMail();
255 eZHTTPTool::header( "Location: /survey/thanks/show/$SurveyID" );
256 exit();
257 }
258 }
259
260 // page count
261 if ( count( $errorMessages ) == 0 )
262 {
263 if ( isset( $NextPage ) )
264 {
265 $Page++;
266 }
267 if ( isset( $PreviousPage ) )
268 {
269 $Page--;
270 }
271 }
272
273 // lista perguntas
274 $survey = new eZSurvey( $SurveyID );
275
276 if ( is_object( $currentUser ) && $survey->hasCompleted( $currentUser->id() ) )
277 {
278 $t->set_var( "title", "" );
279 $t->set_var( "info", "" );
280 $t->parse( "already_responded", "already_responded_tpl" );
281 }
282 else
283 {
284 $t->set_var( "already_responded", "" );
285 $t->set_var( "page_number", $Page );
286 $t->set_var( "check_value", "" );
287 // Title
288 $t->set_var( "title", $survey->title() );
289
290 // SubTitle
291 if ( $survey->subTitle() != "" )
292 {
293 $t->set_var( "subtitle", $survey->subTitle() );
294 $t->parse( "subtitle_section", "subtitle_section_tpl" );
295 }
296
297 // Informa��o adicional
298 $t->set_var( "info", $survey->info() );
299
300 // Pagina��o
301 $totalPages = $survey->numberOfPages();
302
303 for ( $i = 1; $i <= $totalPages; $i++ )
304 {
305 $t->set_var( "page", $i );
306 if ( $Page == $i )
307 {
308 $t->parse( "step_on", "step_on_tpl" );
309 $t->set_var( "step_off", "" );
310 }
311 else
312 {
313 $t->parse( "step_off", "step_off_tpl" );
314 $t->set_var( "step_on", "" );
315 }
316 $t->parse( "step", "step_tpl", true );
317 }
318
319 $question_array = $survey->surveyQuestions( "Position", $Page );
320
321 $position = 0;
322
323 foreach ( $question_array as $questionItem )
324 {
325 // limpar as vari�veis
326 $t->set_var( "qnumber", "" );
327 $t->set_var( "required", "" );
328 $t->set_var( "yesno", "" );
329 $t->set_var( "checkbox", "" );
330 $t->set_var( "radio", "" );
331 $t->set_var( "dropdown", "" );
332 $t->set_var( "rate", "" );
333 $t->set_var( "text", "" );
334 $t->set_var( "essay", "" );
335 $t->set_var( "date", "" );
336 $t->set_var( "numeric", "" );
337
338 // question id
339 $t->set_var( "question_id", $questionItem->id() );
340
341 $t->set_var( "id", $position );
342
343 $t->set_var( "question_name", $questionItem->content() );
344 $t->set_var( "question_num", $questionItem->questionNumber() );
345
346 // required
347 if ( $questionItem->isRequired() )
348 {
349 $t->parse( "required", "required_tpl" );
350 }
351
352 if ( $questionItem->hasChoices() )
353 {
354 $questionChoice_array = $questionItem->questionChoices();
355 }
356
357 $responseQuestion = new eZResponseQuestion( $ResponseID, $questionItem->id() );
358 $responded = $responseQuestion->choiceID();
359 $respondedOther = $responseQuestion->other();
360
361 // listar perguntas
362 switch ( $questionItem->questionTypeID() )
363 {
364 // Yes/No
365 case $questionItem->TYPE_YESNO:
366 {
367 $t->set_var( "selected_n", "" );
368 $t->set_var( "selected_y", "" );
369
370 if ( $questionItem->isRequired() )
371 {
372 $t->set_var( "element_item", "Value[$position]" );
373 $t->parse( "check_value", "check_value_tpl", true );
374 }
375
376 // valor anteriormente respondido
377 if ( $responded == "Y" )
378 {
379 $t->set_var( "selected_y", "checked" );
380 }
381 elseif ( $responded == "N" )
382 {
383 $t->set_var( "selected_n", "checked" );
384 }
385 // default
386 elseif ( $questionItem->initial() == "Y" )
387 {
388 $t->set_var( "selected_y", "checked" );
389 }
390 elseif ( $questionItem->initial() == "N" )
391 {
392 $t->set_var( "selected_n", "checked" );
393 }
394
395 $t->parse( "yesno", "yesno_tpl" );
396 }
397 break;
398
399 // Texto
400 case $questionItem->TYPE_TEXTBOX:
401 {
402 if ( $questionItem->isRequired() )
403 {
404 $t->set_var( "element_item", "Value[$position]" );
405 $t->parse( "check_value", "check_value_tpl", true );
406 }
407
408 $t->set_var( "size", $questionItem->length() );
409
410 if ( isset( $responded ) )
411 {
412 $t->set_var( "default", $responded );
413 }
414 else
415 {
416 $t->set_var( "default", $questionItem->initial() );
417 }
418
419 $t->parse( "text", "text_tpl" );
420 }
421 break;
422
423 // Essay
424 case $questionItem->TYPE_TEXTAREA:
425 {
426 $t->set_var( "size", $questionItem->length() );
427
428 if ( $questionItem->isRequired() )
429 {
430 $t->set_var( "element_item", "Value[$position]" );
431 $t->parse( "check_value", "check_value_tpl", true );
432 }
433
434 if ( isset( $responded ) )
435 {
436 $t->set_var( "default", $responded );
437 }
438 else
439 {
440 $t->set_var( "default", $questionItem->initial() );
441 }
442 $t->parse( "essay", "essay_tpl" );
443 }
444 break;
445
446 // radio
447 case $questionItem->TYPE_RADIO:
448 {
449 $i = 0;
450
451 $t->set_var( "size", $questionItem->length() );
452
453 if ( $questionItem->isRequired() )
454 {
455 $t->set_var( "element_item", "Value[$position][0]" );
456 $t->parse( "check_value", "check_value_tpl", true );
457 }
458
459 foreach( $questionChoice_array as $questionChoiceItem )
460 {
461 $t->set_var( "selected", "" );
462
463 // default
464 if ( $questionItem->initial() == $questionChoiceItem->id() && $responded == "" )
465 {
466 $t->set_var( "selected", "checked" );
467 $t->set_var( "radio_other", "" );
468 }
469 // valor anteriormente respondido
470 elseif ( $responded == $questionChoiceItem->id() )
471 {
472 $t->set_var( "selected", "checked" );
473 $t->set_var( "radio_other", $respondedOther );
474 }
475
476 $t->set_var( "value", $questionChoiceItem->id() );
477 $t->set_var( "value_name", $questionChoiceItem->content() );
478
479 // other
480 if ( $questionChoiceItem->isOther() )
481 {
482 $t->set_var( "radio_item", "" );
483 $t->parse( "radio_other", "radio_other_tpl" );
484 }
485 else
486 {
487 $t->set_var( "radio_other", "" );
488 $t->parse( "radio_item", "radio_item_tpl" );
489 }
490
491 $t->parse( "radio", "radio_tpl", true );
492 }
493 }
494 break;
495
496 // checkbox
497 case $questionItem->TYPE_CHECKBOX:
498 {
499 if ( $questionItem->isRequired() )
500 {
501 $t->set_var( "element_item", "Value[$position][0][]" );
502 $t->parse( "check_value", "check_value_tpl", true );
503 }
504
505 $i = 0;
506 $default = explode( ";", $questionItem->initial() );
507 foreach( $questionChoice_array as $questionChoiceItem )
508 {
509 $t->set_var( "selected", "" );
510
511 // valores anteriormente respondidos
512 if ( isset($responded) )
513 {
514 $j = array_search( $questionChoiceItem->id(), $responded );
515 if ( isset( $j ) )
516 {
517 $t->set_var( "selected", "checked" );
518 $t->set_var( "checkbox_other", $respondedOther[$j] );
519 }
520 }
521 // default
522 elseif ( in_array( $questionChoiceItem->id(), $default ) )
523 {
524 $t->set_var( "selected", "checked" );
525 }
526
527 $t->set_var( "value", $questionChoiceItem->id() );
528 $t->set_var( "value_name", $questionChoiceItem->content() );
529
530 // other
531 if ( $questionChoiceItem->isOther() )
532 {
533 $t->set_var( "checkbox_item", "" );
534 $t->parse( "checkbox_other", "checkbox_other_tpl" );
535 }
536 else
537 {
538 $t->set_var( "checkbox_other", "" );
539 $t->parse( "checkbox_item", "checkbox_item_tpl" );
540 }
541
542 $t->parse( "checkbox", "checkbox_tpl", true );
543 }
544 }
545 break;
546
547 // dropdown
548 case $questionItem->TYPE_DROPDOWN:
549 {
550 $i = 0;
551 // � opcional
552 if ( ! $questionItem->isRequired() )
553 {
554 $t->set_var( "value", "" );
555 $t->set_var( "value_name", "" );
556 $t->parse( "dropdown_item", "dropdown_item_tpl", true );
557 }
558
559 foreach( $questionChoice_array as $questionChoiceItem )
560 {
561 $t->set_var( "selected", "" );
562
563 // default
564 if ( $questionItem->initial() == $questionChoiceItem->id() && $responded == "" )
565 {
566 $t->set_var( "selected", "selected" );
567 }
568 // valor anteriormente respondido
569 elseif ( $responded == $questionChoiceItem->id() )
570 {
571 $t->set_var( "selected", "selected" );
572 }
573
574 $t->set_var( "value", $questionChoiceItem->id() );
575 $t->set_var( "value_name", $questionChoiceItem->content() );
576 $t->parse( "dropdown_item", "dropdown_item_tpl", true );
577 }
578 $t->parse( "dropdown", "dropdown_tpl" );
579 }
580 break;
581
582 // rate
583 case $questionItem->TYPE_RATE:
584 {
585 $i = 0;
586
587 foreach( $questionChoice_array as $questionChoiceItem )
588 {
589 $t->set_var( "value_name", $questionChoiceItem->content() );
590 $t->set_var( "choice_id", $questionChoiceItem->id() );
591 $t->set_var( "id2", $i++ );
592
593 $t->set_var( "selected_rank0", "" );
594 $t->set_var( "selected_rank1", "" );
595 $t->set_var( "selected_rank2", "" );
596 $t->set_var( "selected_rank3", "" );
597 $t->set_var( "selected_rank4", "" );
598
599 // valores anteriormente respondidos
600
601 if ( isset($responded) )
602 {
603 $j = array_search( $questionChoiceItem->id(), $responded );
604 if ( isset( $j ) )
605 {
606 //$t->set_var( "selected", "checked" );
607 $t->set_var( "selected_rank" . $respondedOther[$j], "checked" );
608 }
609 }
610
611 $t->parse( "rate_item", "rate_item_tpl", true );
612 }
613 $t->parse( "rate", "rate_tpl" );
614 }
615 break;
616
617 // Data
618 case $questionItem->TYPE_DATE:
619 {
620 $t->set_var( "size", $questionItem->length() );
621 $t->set_var( "default_date", $responded );
622 $t->parse( "date", "date_tpl" );
623 }
624 break;
625
626 // Num�rico
627 case $questionItem->TYPE_NUMERIC:
628 {
629 $t->set_var( "size", $questionItem->length() );
630 if ( isset( $responded ) )
631 {
632 $t->set_var( "default", $responded );
633 }
634 else
635 {
636 $t->set_var( "default", $questionItem->initial() );
637 }
638 $t->parse( "numeric", "numeric_tpl" );
639 }
640 break;
641 }
642
643 if ( $questionItem->isQuestion() )
644 {
645 $position++;
646 $t->parse( "qnumber", "qnumber_tpl" );
647 }
648
649 $t->parse( "value_list", "value_list_tpl", true );
650 }
651
652 // set the response id
653 $t->set_var( "response_id", $ResponseID );
654
655 // Next page button
656 if ( $Page < $totalPages )
657 {
658 $t->parse( "next_page_button", "next_page_button_tpl" );
659 }
660 else
661 {
662 $t->parse( "finish_button", "finish_button_tpl" );
663 }
664
665 // Previous page button
666 if ( $Page > 1 )
667 {
668 $t->parse( "previous_page_button", "previous_page_button_tpl" );
669 }
670
671 if ( count( $errorMessages ) > 0 )
672 {
673 foreach ( $errorMessages as $errorItem )
674 {
675 $t->set_var( "error_message", $errorItem );
676 $t->parse( "error_item", "error_item_tpl", true );
677 }
678 $t->parse( "error_list", "error_list_tpl" );
679 }
680 }
681 }
682 else
683 {
684 $t->set_var( "already_responded", "" );
685 $t->set_var( "title", "" );
686 $t->set_var( "info", "" );
687
688 $t->set_var( "error_message", $t->Ini->variable( "strings", "no_such_survey" ) );
689 $t->parse( "error_item", "error_item_tpl", true );
690 $t->parse( "error_list", "error_list_tpl" );
691 }
692
693 $t->pparse( "output", "surveylist_tpl" );
694
695 ?>
$i
$i
Definition: admin/adlist.php:91
eZHTTPTool\header
static header( $string)
Definition: ezhttptool.php:96
eZQuestion
Definition: ezquestion.php:11
eZResponseQuestion
Definition: ezresponsequestion.php:16
eZResponse
Definition: ezresponse.php:8
eZSurvey
Definition: ezsurvey.php:8
eZSurvey\existSurvey
static existSurvey( $id)
Definition: ezsurvey.php:348
eZTemplate
Definition: eztemplate.php:107
eZUser\currentUser
static & currentUser()
Definition: ezuser.php:896
$QuestionID
$QuestionID
Definition: default.php:30
$question
$question
Definition: default.php:43
$url_array
$url_array
Definition: ezaddress/admin/datasupplier.php:34
$j
$j
Definition: ezimagecatalogue/admin/imagelist.php:345
eZQuestionChoice
Class eZQuestionChoice
Definition: ezquestionchoice.php:5
$Value
$Value
Definition: ezquestionchoice.php:118
$ResponseID
$ResponseID
Definition: ezresponsebool.php:184
$Rank
$Rank
Definition: ezresponserank.php:193
exit
exit
Definition: folder.php:81
$response
while(!feof($socket)) $response
Definition: paypalnotify.php:196
$totalPages
$totalPages
Definition: preview.php:84
$question_array
$question_array
Definition: preview.php:88
$survey
if( $Page=="") if(isset( $OK)) if(isset( $NextPage)) if(isset( $PreviousPage)) $survey
Definition: preview.php:72
$position
$position
Definition: quizscores.php:85
$t
if( $Page=="") if(!isset( $ResponseID)) $t
Definition: user/surveylist.php:27
$currentUser
$currentUser
Definition: user/surveylist.php:85
$Language
$Language
Definition: user/surveylist.php:12
$ini
$ini
Definition: user/surveylist.php:11
$Page
$Page
Definition: user/surveylist.php:15
$errorMessages
$errorMessages
Definition: user/surveylist.php:86
$SurveyID
$SurveyID
Definition: user/surveylist.php:14
$questionChoice_array
$questionChoice_array
Definition: values.php:69
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.