This repository has been archived by the owner on Nov 19, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
ext_php_api.dat
1765 lines (1505 loc) · 145 KB
/
ext_php_api.dat
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
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
a:2:{s:4:"meta";a:3:{s:5:"title";s:12:"Questionaire";s:5:"descr";s:33:"Versatile Survey System for TYPO3";s:7:"options";a:2:{s:10:"usageCount";s:1:"1";s:19:"includeCodeAbstract";s:1:"1";}}s:5:"files";a:5:{s:14:"MD5_19aaeae789";a:5:{s:8:"filename";s:14:"mod1/index.php";s:8:"filesize";i:9359;s:6:"header";a:5:{s:4:"text";s:193:"
Backend Module 'pbsurvey' extension.
The idea of this module is to be a host module for backend applications that wish to present information / analysis of results of the pbsurvey extension.
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}s:5:"other";a:3:{i:0;s:49:"@author Patrick Broens <[email protected]>";i:1;s:14:"@package TYPO3";i:2;s:20:"@subpackage pbsurvey";}s:11:"other_index";a:3:{s:7:"@author";a:1:{i:0;s:41:"Patrick Broens <[email protected]>";}s:8:"@package";a:1:{i:0;s:6:"TYPO3 ";}s:11:"@subpackage";a:1:{i:0;s:9:"pbsurvey ";}}}s:3:"DAT";a:8:{i:1;a:8:{s:6:"header";s:48:"class tx_pbsurvey_module1 extends t3lib_SCbase {";s:5:"class";i:1;s:11:"parentClass";s:19:"tx_pbsurvey_module1";s:4:"cDat";a:5:{s:4:"text";s:193:"
Backend Module 'pbsurvey' extension.
The idea of this module is to be a host module for backend applications that wish to present information / analysis of results of the pbsurvey extension.
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}s:5:"other";a:3:{i:0;s:49:"@author Patrick Broens <[email protected]>";i:1;s:14:"@package TYPO3";i:2;s:20:"@subpackage pbsurvey";}s:11:"other_index";a:3:{s:7:"@author";a:1:{i:0;s:41:"Patrick Broens <[email protected]>";}s:8:"@package";a:1:{i:0;s:6:"TYPO3 ";}s:11:"@subpackage";a:1:{i:0;s:9:"pbsurvey ";}}}s:7:"content";a:2:{i:0;s:187:" var $strExtKey;
var $strItemsTable;
var $arrSurveyItems = array();
/**********************************
*
* Configuration functions
*
**********************************/
";i:1;i:-1;}s:12:"content_size";i:187;s:13:"content_lines";i:10;s:6:"atLine";i:40;}i:3;a:8:{s:6:"header";s:17:"function init() {";s:11:"parentClass";s:19:"tx_pbsurvey_module1";s:11:"sectionText";a:1:{i:0;s:23:"Configuration functions";}s:4:"cDat";a:3:{s:4:"text";s:30:"
Initialization of the class
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";a:2:{i:0;s:479:" global $BACK_PATH;
parent::init();
$this->strExtKey = 'tx_pbsurvey';
$this->arrModParameters = t3lib_div::_GP($this->strExtKey);
$this->strResultsTable = $this->strExtKey . '_results';
$this->strItemsTable = $this->strExtKey . '_item';
$this->strAnswersTable = $this->strExtKey . '_answers';
$this->strUserTable = 'fe_users';
$this->readSurvey();
}
/**********************************
*
* General functions
*
**********************************/
";i:1;i:0;}s:12:"content_size";i:479;s:13:"content_lines";i:17;s:6:"atLine";i:56;}i:5;a:8:{s:6:"header";s:17:"function main() {";s:11:"parentClass";s:19:"tx_pbsurvey_module1";s:11:"sectionText";a:1:{i:0;s:17:"General functions";}s:4:"cDat";a:3:{s:4:"text";s:67:"
Main function of the module. Write the content to $this->content
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";a:2:{i:0;s:507:" global $BE_USER,$LANG,$BACK_PATH;
$arrPageInfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
$intAccess = is_array($arrPageInfo) ? 1 : 0;
if (($this->id && $intAccess) || ($BE_USER->user["admin"] && !$this->id)) {
$this->objDoc = t3lib_div::makeInstance("mediumDoc");
$this->objDoc->backPath = $BACK_PATH;
$this->objDoc->form='<form action="
[...]
($LANG->getLL("title"));
$this->content.=$this->objDoc->spacer(5);
$this->content.=$this->objDoc->spacer(10);
}
}
";i:1;i:1;}s:12:"content_size";i:2085;s:13:"content_lines";i:42;s:6:"atLine";i:79;}i:7;a:7:{s:6:"header";s:25:"function printContent() {";s:11:"parentClass";s:19:"tx_pbsurvey_module1";s:4:"cDat";a:3:{s:4:"text";s:29:"
Prints out the module HTML
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";a:2:{i:0;s:72:" $this->content.=$this->objDoc->endPage();
echo $this->content;
}
";i:1;i:0;}s:12:"content_size";i:72;s:13:"content_lines";i:4;s:6:"atLine";i:127;}i:9;a:7:{s:6:"header";s:34:"function answersArray($strInput) {";s:11:"parentClass";s:19:"tx_pbsurvey_module1";s:4:"cDat";a:3:{s:4:"text";s:64:"
Create array out of possible answers in backend answers field
";s:5:"param";a:1:{i:0;a:2:{i:0;s:6:"string";i:1;s:32:"Content of backend answers field";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:38:"Converted answers information to array";}}s:7:"content";a:2:{i:0;s:446:" $arrKeys = array('answer','points');
$strLine=explode(chr(10),$strInput);
foreach($strLine as $intKey => $strLineValue) {
$strValue = explode('|',$strLineValue);
for ($intCounter=0;$intCounter<2;$intCounter++) {
$arrOutput[$intKey+1][$arrKeys[$intCounter]]=trim($strValue[$intCounter]);
}
}
return $arrOutput;
}
/**********************************
*
* Rendering functions
*
**********************************/
";i:1;i:0;}s:12:"content_size";i:446;s:13:"content_lines";i:17;s:6:"atLine";i:138;}i:11;a:8:{s:6:"header";s:25:"function sectionError() {";s:11:"parentClass";s:19:"tx_pbsurvey_module1";s:11:"sectionText";a:1:{i:0;s:19:"Rendering functions";}s:4:"cDat";a:3:{s:4:"text";s:73:"
Build section to show error text if no questions are available on page
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:27:"HTML containing the section";}}s:7:"content";a:2:{i:0;s:311:" global $LANG;
$strTemp = '<p><span class="typo3-red">'.$LANG->getLL('no_results').'</span></p>';
$strOutput = $this->objDoc->section($LANG->getLL('error'),$strTemp,0,1);
return $strOutput;
}
/**********************************
*
* Reading functions
*
**********************************/
";i:1;i:0;}s:12:"content_size";i:311;s:13:"content_lines";i:12;s:6:"atLine";i:161;}i:13;a:5:{s:6:"header";s:23:"function readSurvey() {";s:11:"parentClass";s:19:"tx_pbsurvey_module1";s:11:"sectionText";a:1:{i:0;s:17:"Reading functions";}s:4:"cDat";a:3:{s:4:"text";s:115:"
Read all questions in the selected page and filter unneccessary content
Write content to $this->arrSurveyItems[]
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:6:"atLine";i:180;}i:15;a:7:{s:6:"header";s:25:"function countResults() {";s:11:"parentClass";s:19:"tx_pbsurvey_module1";s:4:"cDat";a:3:{s:4:"text";s:33:"
Count the results on this page
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:42:"Numbers of finished and unfinished results";}}s:7:"content";a:2:{i:0;s:507:" $arrSelectConf['selectFields'] = '*';
$arrSelectConf['where'] = '1=1';
$arrSelectConf['where'] .= ' AND pid=' . intval($this->id);
$arrSelectConf['where'] .= t3lib_BEfunc::BEenableFields($this->strResultsTable);
$arrSelectConf['where'] .= t3lib_BEfunc::deleteClause($this->strResultsTable);
$dbRes=$GLOBALS['TYPO3_DB']->exec_SELECTquery($arrSelectConf['selectF
[...]
($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
$SOBE->checkSubExtObj();
$SOBE->main();
$SOBE->printContent();
?>";i:1;i:1;}s:12:"content_size";i:1328;s:13:"content_lines";i:27;s:6:"atLine";i:215;}}s:10:"usageCount";a:8:{s:12:"H_5a40ea16ec";a:4:{s:3:"ALL";a:2:{s:12:"makeinstance";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_19aaeae789";a:3:{s:8:"fileName";s:14:"mod1/index.php";s:12:"makeinstance";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:181;s:15:"_functionHeader";s:48:"class tx_pbsurvey_module1 extends t3lib_SCbase {";}s:12:"H_7c6ff40199";a:10:{s:3:"ALL";a:3:{s:11:"objectUsage";i:6;s:5:"TOTAL";i:8;s:14:"nonObjectUsage";i:2;}s:14:"MD5_19aaeae789";a:4:{s:8:"fileName";s:14:"mod1/index.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:2;s:14:"nonObjectUsage";i:1;}s:14:"MD5_86f0b1d572";a:3:{s:8:"fileName";s:39:"modfunc1/class.tx_pbsurvey_modfunc1.php";s:14:"nonObjectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_84e37bc76b";a:3:{s:8:"fileName";s:29:"pi1/class.tx_pbsurvey_pi1.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_451ba283ad";a:3:{s:8:"fileName";s:15:"wizard/init.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_784b5db297";a:3:{s:8:"fileName";s:25:"wizard/wizard_answers.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_0bf51677e8";a:3:{s:8:"fileName";s:16:"wizard2/init.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_5b04452750";a:3:{s:8:"fileName";s:29:"wizard2/wizard_conditions.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:20;s:15:"_functionHeader";s:17:"function init() {";}s:12:"H_9c2550bb82";a:6:{s:3:"ALL";a:2:{s:11:"objectUsage";i:3;s:5:"TOTAL";i:3;}s:14:"MD5_19aaeae789";a:3:{s:8:"fileName";s:14:"mod1/index.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_784b5db297";a:3:{s:8:"fileName";s:25:"wizard/wizard_answers.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_5b04452750";a:3:{s:8:"fileName";s:29:"wizard2/wizard_conditions.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:20;s:15:"_functionHeader";s:17:"function main() {";}s:12:"H_a337945941";a:6:{s:3:"ALL";a:2:{s:11:"objectUsage";i:3;s:5:"TOTAL";i:3;}s:14:"MD5_19aaeae789";a:3:{s:8:"fileName";s:14:"mod1/index.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_784b5db297";a:3:{s:8:"fileName";s:25:"wizard/wizard_answers.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_5b04452750";a:3:{s:8:"fileName";s:29:"wizard2/wizard_conditions.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:19;s:15:"_functionHeader";s:25:"function printContent() {";}s:12:"H_3b9ce59b89";a:7:{s:3:"ALL";a:2:{s:11:"objectUsage";i:9;s:5:"TOTAL";i:9;}s:14:"MD5_19aaeae789";a:3:{s:8:"fileName";s:14:"mod1/index.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_84e37bc76b";a:3:{s:8:"fileName";s:29:"pi1/class.tx_pbsurvey_pi1.php";s:11:"objectUsage";i:5;s:5:"TOTAL";i:5;}s:14:"MD5_784b5db297";a:3:{s:8:"fileName";s:25:"wizard/wizard_answers.php";s:11:"objectUsage";i:2;s:5:"TOTAL";i:2;}s:14:"MD5_5b04452750";a:3:{s:8:"fileName";s:29:"wizard2/wizard_conditions.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:25;s:15:"_functionHeader";s:34:"function answersArray($strInput) {";}s:12:"H_6a9644bf44";a:4:{s:3:"ALL";a:2:{s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_19aaeae789";a:3:{s:8:"fileName";s:14:"mod1/index.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:4;s:15:"_functionHeader";s:25:"function sectionError() {";}s:12:"H_3ff3fed0af";a:5:{s:3:"ALL";a:2:{s:11:"objectUsage";i:2;s:5:"TOTAL";i:2;}s:14:"MD5_19aaeae789";a:3:{s:8:"fileName";s:14:"mod1/index.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_84e37bc76b";a:3:{s:8:"fileName";s:29:"pi1/class.tx_pbsurvey_pi1.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:6;s:15:"_functionHeader";s:23:"function readSurvey() {";}s:12:"H_83b02605e1";a:4:{s:3:"ALL";a:2:{s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_86f0b1d572";a:3:{s:8:"fileName";s:39:"modfunc1/class.tx_pbsurvey_modfunc1.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:4;s:15:"_functionHeader";s:25:"function countResults() {";}}}s:14:"MD5_86f0b1d572";a:5:{s:8:"filename";s:39:"modfunc1/class.tx_pbsurvey_modfunc1.php";s:8:"filesize";i:4912;s:6:"header";a:5:{s:4:"text";s:67:"
Backend Module Function 'Overview' for the 'pbsurvey' extension.
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}s:5:"other";a:3:{i:0;s:49:"@author Patrick Broens <[email protected]>";i:1;s:14:"@package TYPO3";i:2;s:20:"@subpackage pbsurvey";}s:11:"other_index";a:3:{s:7:"@author";a:1:{i:0;s:41:"Patrick Broens <[email protected]>";}s:8:"@package";a:1:{i:0;s:6:"TYPO3 ";}s:11:"@subpackage";a:1:{i:0;s:9:"pbsurvey ";}}}s:3:"DAT";a:6:{i:1;a:8:{s:6:"header";s:53:"class tx_pbsurvey_modfunc1 extends t3lib_extobjbase {";s:5:"class";i:1;s:11:"parentClass";s:20:"tx_pbsurvey_modfunc1";s:4:"cDat";a:5:{s:4:"text";s:67:"
Backend Module Function 'Overview' for the 'pbsurvey' extension.
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}s:5:"other";a:3:{i:0;s:49:"@author Patrick Broens <[email protected]>";i:1;s:14:"@package TYPO3";i:2;s:20:"@subpackage pbsurvey";}s:11:"other_index";a:3:{s:7:"@author";a:1:{i:0;s:41:"Patrick Broens <[email protected]>";}s:8:"@package";a:1:{i:0;s:6:"TYPO3 ";}s:11:"@subpackage";a:1:{i:0;s:9:"pbsurvey ";}}}s:7:"content";a:2:{i:0;s:117:"
/**********************************
*
* Configuration functions
*
**********************************/
";i:1;i:-1;}s:12:"content_size";i:117;s:13:"content_lines";i:7;s:6:"atLine";i:36;}i:3;a:8:{s:6:"header";s:29:"function init(&$pObj,$conf) {";s:11:"parentClass";s:20:"tx_pbsurvey_modfunc1";s:11:"sectionText";a:1:{i:0;s:23:"Configuration functions";}s:4:"cDat";a:3:{s:4:"text";s:30:"
Initialization of the class
";s:5:"param";a:2:{i:0;a:2:{i:0;s:6:"object";i:1;s:13:"Parent Object";}i:1;a:2:{i:0;s:5:"array";i:1;s:37:"Configuration array for the extension";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";a:2:{i:0;s:370:" global $BACK_PATH;
parent::init($pObj,$conf);
$this->handleExternalFunctionValue();
$this->arrPageInfo = t3lib_BEfunc::readPageAccess($this->pObj->id,$this->perms_clause);
list($strRequestUri) = explode('#',t3lib_div::getIndpEnv('REQUEST_URI'));
}
/**********************************
*
* General functions
*
**********************************/
";i:1;i:0;}s:12:"content_size";i:370;s:13:"content_lines";i:13;s:6:"atLine";i:51;}i:5;a:8:{s:6:"header";s:17:"function main() {";s:11:"parentClass";s:20:"tx_pbsurvey_modfunc1";s:11:"sectionText";a:1:{i:0;s:17:"General functions";}s:4:"cDat";a:3:{s:4:"text";s:87:"
Main function of the module. Check access of user and call function to build content
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:21:"HTML of this function";}}s:7:"content";a:2:{i:0;s:198:" global $BE_USER;
if (($this->pObj->id && is_array($this->arrPageInfo)) || ($BE_USER->user['admin'] && !$this->pObj->id)) {
$strOutput .= $this->moduleContent();
}
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:198;s:13:"content_lines";i:7;s:6:"atLine";i:70;}i:7;a:7:{s:6:"header";s:26:"function moduleContent() {";s:11:"parentClass";s:20:"tx_pbsurvey_modfunc1";s:4:"cDat";a:3:{s:4:"text";s:31:"
Generates the module content
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:29:"HTML Content of this function";}}s:7:"content";a:2:{i:0;s:218:" $strOutput .= $this->sectionResults();
$strOutput .= $this->sectionQuestions();
return $strOutput;
}
/**********************************
*
* Rendering functions
*
**********************************/
";i:1;i:0;}s:12:"content_size";i:218;s:13:"content_lines";i:11;s:6:"atLine";i:83;}i:9;a:5:{s:6:"header";s:27:"function sectionResults() {";s:11:"parentClass";s:20:"tx_pbsurvey_modfunc1";s:11:"sectionText";a:1:{i:0;s:19:"Rendering functions";}s:4:"cDat";a:3:{s:4:"text";s:70:"
Build section to show some simple statistics like number of results
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:27:"HTML containing the section";}}s:6:"atLine";i:100;}i:11;a:7:{s:6:"header";s:29:"function sectionQuestions() {";s:11:"parentClass";s:20:"tx_pbsurvey_modfunc1";s:4:"cDat";a:3:{s:4:"text";s:50:"
Build section to show list of questions on page
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:27:"HTML containing the section";}}s:7:"content";a:2:{i:0;s:507:" global $LANG;
foreach ($this->pObj->arrSurveyItems as $arrItem) {
$arrTemp[] = '<li>'.$arrItem['question'].'</li>';
}
$strOutput .= $this->pObj->objDoc->section($LANG->getLL('list_questions'),'<ul>'.implode(chr(13),$arrTemp).'</ul>',0,0);
$strOutput .= '<p><strong>'.$LANG->getLL('number_questions').': '.count($this->pObj->arrSurveyItems).'</strong></p>';
ret
[...]
.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/pbsurvey/modfunc1/class.tx_pbsurvey_modfunc1.php']);
}
?>";i:1;i:1;}s:12:"content_size";i:639;s:13:"content_lines";i:13;s:6:"atLine";i:128;}}s:10:"usageCount";a:6:{s:12:"H_6cf69b12da";a:2:{s:24:"_searchtime_milliseconds";d:170;s:15:"_functionHeader";s:53:"class tx_pbsurvey_modfunc1 extends t3lib_extobjbase {";}s:12:"H_ed4be881b2";a:10:{s:3:"ALL";a:3:{s:11:"objectUsage";i:6;s:5:"TOTAL";i:8;s:14:"nonObjectUsage";i:2;}s:14:"MD5_19aaeae789";a:4:{s:8:"fileName";s:14:"mod1/index.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:2;s:14:"nonObjectUsage";i:1;}s:14:"MD5_86f0b1d572";a:3:{s:8:"fileName";s:39:"modfunc1/class.tx_pbsurvey_modfunc1.php";s:14:"nonObjectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_84e37bc76b";a:3:{s:8:"fileName";s:29:"pi1/class.tx_pbsurvey_pi1.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_451ba283ad";a:3:{s:8:"fileName";s:15:"wizard/init.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_784b5db297";a:3:{s:8:"fileName";s:25:"wizard/wizard_answers.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_0bf51677e8";a:3:{s:8:"fileName";s:16:"wizard2/init.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_5b04452750";a:3:{s:8:"fileName";s:29:"wizard2/wizard_conditions.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:20;s:15:"_functionHeader";s:29:"function init(&$pObj,$conf) {";}s:12:"H_9c2550bb82";a:6:{s:3:"ALL";a:2:{s:11:"objectUsage";i:3;s:5:"TOTAL";i:3;}s:14:"MD5_19aaeae789";a:3:{s:8:"fileName";s:14:"mod1/index.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_784b5db297";a:3:{s:8:"fileName";s:25:"wizard/wizard_answers.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_5b04452750";a:3:{s:8:"fileName";s:29:"wizard2/wizard_conditions.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:19;s:15:"_functionHeader";s:17:"function main() {";}s:12:"H_ba89952816";a:4:{s:3:"ALL";a:2:{s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_86f0b1d572";a:3:{s:8:"fileName";s:39:"modfunc1/class.tx_pbsurvey_modfunc1.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:4;s:15:"_functionHeader";s:26:"function moduleContent() {";}s:12:"H_47c8033a86";a:4:{s:3:"ALL";a:2:{s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_86f0b1d572";a:3:{s:8:"fileName";s:39:"modfunc1/class.tx_pbsurvey_modfunc1.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:4;s:15:"_functionHeader";s:27:"function sectionResults() {";}s:12:"H_28a20f9435";a:4:{s:3:"ALL";a:2:{s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:14:"MD5_86f0b1d572";a:3:{s:8:"fileName";s:39:"modfunc1/class.tx_pbsurvey_modfunc1.php";s:11:"objectUsage";i:1;s:5:"TOTAL";i:1;}s:24:"_searchtime_milliseconds";d:4;s:15:"_functionHeader";s:29:"function sectionQuestions() {";}}}s:14:"MD5_84e37bc76b";a:5:{s:8:"filename";s:29:"pi1/class.tx_pbsurvey_pi1.php";s:8:"filesize";i:94458;s:6:"header";a:5:{s:4:"text";s:48:"
Frontend Module for the 'pbsurvey' extension.
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}s:5:"other";a:3:{i:0;s:49:"@author Patrick Broens <[email protected]>";i:1;s:14:"@package TYPO3";i:2;s:20:"@subpackage pbsurvey";}s:11:"other_index";a:3:{s:7:"@author";a:1:{i:0;s:41:"Patrick Broens <[email protected]>";}s:8:"@package";a:1:{i:0;s:6:"TYPO3 ";}s:11:"@subpackage";a:1:{i:0;s:9:"pbsurvey ";}}}s:3:"DAT";a:60:{i:1;a:8:{s:6:"header";s:44:"class tx_pbsurvey_pi1 extends tslib_pibase {";s:5:"class";i:1;s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:5:{s:4:"text";s:48:"
Frontend Module for the 'pbsurvey' extension.
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"[type]";i:1;s:3:"...";}s:5:"other";a:3:{i:0;s:49:"@author Patrick Broens <[email protected]>";i:1;s:14:"@package TYPO3";i:2;s:20:"@subpackage pbsurvey";}s:11:"other_index";a:3:{s:7:"@author";a:1:{i:0;s:41:"Patrick Broens <[email protected]>";}s:8:"@package";a:1:{i:0;s:6:"TYPO3 ";}s:11:"@subpackage";a:1:{i:0;s:9:"pbsurvey ";}}}s:7:"content";a:2:{i:0;s:960:" var $prefixId = 'tx_pbsurvey_pi1';
var $scriptRelPath = 'pi1/class.tx_pbsurvey_pi1.php';
var $extKey = 'pbsurvey';
var $strResultsTable = 'tx_pbsurvey_results';
var $strItemsTable = 'tx_pbsurvey_item';
var $strAnswersTable = 'tx_pbsurvey_answers';
var $arrConfig=array(); // Configuration Array
var $arrUserData=array(); // Previous answers from user
var $arrSessionData=array(); // User data stored in session
var $arrSurveyItems=array(); // Survey Items
var $arrJsItems=array(); // Javascript Items
var $arrValidation=array(); // Validation values
var $arrValidationErrors=array(); // Errorlines during server side validation
var $intStage;
var $arrPage=array();
var $intPastItems;
var $intCurrentItem;
var $intPageItem;
var $intNextPages;
var $strOutItems;
var $strJsCalls;
/**********************************
*
* Configuration functions
*
**********************************/
";i:1;i:-1;}s:12:"content_size";i:960;s:13:"content_lines";i:28;s:6:"atLine";i:31;}i:3;a:8:{s:6:"header";s:22:"function init($conf) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:11:"sectionText";a:1:{i:0;s:23:"Configuration functions";}s:4:"cDat";a:3:{s:4:"text";s:150:"
All needed configuration values are stored in the member variable $this->arrConfig and the template code goes in $this->arrConfig['templateCode'] .
";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:27:"Configuration array from TS";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";a:2:{i:0;s:507:" $this->conf = $conf; // Storing configuration as a member var
$this->pi_loadLL();
$this->pi_USER_INT_obj=1; // Configuring so caching is not expected. This value means that no cHash params are ever set. We do this, because it's a USER_INT object!
$this->pi_setPiVarDefaults(); // Set default piVars from TS
$this->pi_initPIflexForm(); // Init FlexForm configuration
[...]
$this->setFFconfig();
$this->objFreeCap = $this->checkCaptcha(); // Check on sr_freecap and load object if available
}
";i:1;i:1;}s:12:"content_size";i:629;s:13:"content_lines";i:10;s:6:"atLine";i:66;}i:5;a:7:{s:6:"header";s:24:"function setFFconfig() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:59:"
Define all possible fields from TypoScript and FlexForm.
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:53:"Configuration array made from TypoScript and FlexForm";}}s:7:"content";a:2:{i:0;s:507:" $arrFFConfig = array(
'templateCode' => array('template_file', 'sDEF', 'templateFile',1),
'pid' => array('pages', 'sDEF', 'pid',2),
'captcha_page' => array('captcha', 'sACCESS', 'security.captcha', 2),
'access_level' => array('access_level', 'sACCESS', 'accessLevel', 2),
[...]
validation', 'sOTHER', 'validation', 2),
);
return $arrOutput = $this->getFFconfig($arrFFConfig);
}
";i:1;i:1;}s:12:"content_size";i:1953;s:13:"content_lines";i:24;s:6:"atLine";i:82;}i:7;a:7:{s:6:"header";s:36:"function getFFconfig($arrFFConfig) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:91:"
Check configuration in TypoScript and FlexForm.
FlexForm has precendence over TypoScript
";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:43:"Definition array for TypoScipt and FlexForm";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:53:"Configuration array made from TypoScript and FlexForm";}}s:7:"content";a:2:{i:0;s:507:" $strTemp = '';
foreach ($arrFFConfig as $strKey => $arrItem) {
$strFFValue = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], $arrItem[0], $arrItem[1]);
$arrItem[2] = "['" . str_replace('.',".']['",$arrItem[2]) . "']";
eval("\$strTemp = \$this->conf".$arrItem[2].";");
if ($arrItem[3]==1) {
[...]
Output;
}
/**********************************
*
* General functions
*
**********************************/
";i:1;i:1;}s:12:"content_size";i:767;s:13:"content_lines";i:20;s:6:"atLine";i:114;}i:9;a:8:{s:6:"header";s:37:"function main($strContent,$arrConf) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:11:"sectionText";a:1:{i:0;s:17:"General functions";}s:4:"cDat";a:3:{s:4:"text";s:100:"
Calls the init() function to setup the configuration,
checks access levels and outputs the survey
";s:5:"param";a:2:{i:0;a:2:{i:0;s:6:"string";i:1;s:32:"Function output is added to this";}i:1;a:2:{i:0;s:5:"array";i:1;s:19:"Configuration array";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:40:"Complete content generated by the plugin";}}s:7:"content";a:2:{i:0;s:305:" $this->init($arrConf);
$strOutput = $this->checkResponses();
$this->setUserName();
$strOutput = $strOutput?$strOutput:$this->checkAccessLevel();
$strOutput = $this->pi_wrapInBaseClass($strOutput?$this->surveyError($strOutput):$this->processSurvey());
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:305;s:13:"content_lines";i:8;s:6:"atLine";i:143;}i:11;a:7:{s:6:"header";s:24:"function setUserName() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:51:"
Declare username according to login or anonymous
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";a:2:{i:0;s:531:" $this->arrSessionData = $GLOBALS['TSFE']->fe_user->getKey('ses','surveyData');
$this->arrSessionData['uid'] = $GLOBALS['TSFE']->loginUser?$GLOBALS['TSFE']->fe_user->user['uid']:0;
$this->arrSessionData['uip'] = t3lib_div::getIndpEnv('REMOTE_ADDR');
if (isset($_COOKIE[$this->extKey])&& $this->arrConfig['anonymous_mode'] && !$GLOBALS['TSFE']->fe_user->user['uid']) {
foreach ($_COOKIE[$this->extKey] as $strName => $mixValue) {
$this->arrSessionData[$strName] = $mixValue;
}
}
}
";i:1;i:0;}s:12:"content_size";i:531;s:13:"content_lines";i:10;s:6:"atLine";i:157;}i:13;a:7:{s:6:"header";s:26:"function processSurvey() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:50:"
Builds the survey with all the parts necessary.
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:13:"Output string";}}s:7:"content";a:2:{i:0;s:507:" $this->readSurvey();
if (!$this->arrSurveyItems){
$strOutput = $this->surveyError('no_items');
} else {
if ($this->arrConfig['captcha_page'] && is_object($this->objFreeCap) && !$this->arrSessionData['captcha'] && !$this->objFreeCap->checkWord($this->piVars['captcha_response'])) {
$strOutput = $this->loadCaptcha();
} else {
$this->arrSe
[...]
$strOutput = $this->surveyCompletion();
}
}
}
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:2138;s:13:"content_lines";i:45;s:6:"atLine";i:173;}i:15;a:7:{s:6:"header";s:25:"function processItems() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:76:"
Find the current page by stage and condition and process all items on it.
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";a:2:{i:0;s:507:" $intCounter = 0;
$blnPageCondition = FALSE;
foreach ($this->arrSurveyItems as $arrItem){
if ($intCounter < $this->intStage){ // Read past items
if ($arrItem['question_type']==22){
$this->arrPage=$arrItem;
if ($arrItem['uid']<>$this->arrSurveyItems[0]['uid']) {
$intCounter++;
}
if ($intC
[...]
ss_level']!=2) {
unset($this->arrUserData[$item['uid']]);
}
}
}
}
";i:1;i:1;}s:12:"content_size";i:1899;s:13:"content_lines";i:54;s:6:"atLine";i:224;}i:17;a:7:{s:6:"header";s:36:"function previousStage($boolInput) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:60:"
Fills the question history and returns the previous stage
";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"boolean";i:1;s:41:"True when the submitted form is validated";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:38:"Converted answers information to array";}}s:7:"content";a:2:{i:0;s:283:" if (!isset($this->piVars['back'])) { // Forward
$intOutput = $this->piVars['stage'];
if ($boolInput) {
$this->arrSessionData['history'][] = $intOutput;
}
} else { // Backward
$intOutput = array_pop($this->arrSessionData['history']);
}
return $intOutput;
}
";i:1;i:0;}s:12:"content_size";i:283;s:13:"content_lines";i:11;s:6:"atLine";i:285;}i:19;a:7:{s:6:"header";s:34:"function answersArray($strInput) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:64:"
Create array out of possible answers in backend answers field
";s:5:"param";a:1:{i:0;a:2:{i:0;s:6:"string";i:1;s:32:"Content of backend answers field";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:38:"Converted answers information to array";}}s:7:"content";a:2:{i:0;s:289:" $arrLine=explode(chr(10),$strInput);
foreach($arrLine as $intKey => $strLineValue) {
$strValue = explode('|',$strLineValue);
for ($intCounter=0;$intCounter<3;$intCounter++) {
$arrOutput[$intKey+1][$intCounter]=trim($strValue[$intCounter]);
}
}
return $arrOutput;
}
";i:1;i:0;}s:12:"content_size";i:289;s:13:"content_lines";i:10;s:6:"atLine";i:303;}i:21;a:7:{s:6:"header";s:41:"function processCondition($arrQuestion) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:39:"
Process each conditiongroup and rule
";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:57:"Configuration array containing the type page & conditions";}}s:6:"return";a:2:{i:0;s:7:"boolean";i:1;s:37:"If this is true the page is displayed";}}s:7:"content";a:2:{i:0;s:507:" $intFound = 0;
$intGroup = 0;
$arrConditions = unserialize($arrQuestion['conditions']);
if ($arrConditions) {
foreach ($arrConditions['grps'] as $arrGrp ) { // Groups is OR
$intRule = 0;
foreach ($arrGrp['rule'] as $arrRule) { // Rule is AND
if ($this->arrUserData[$arrRule['field']]) { // Found a question that is in the condition
$arrRuleCond[
[...]
$blnOutput = ($intFound==0?true:in_array(true,$arrGrpCond));
} else {
$blnOutput = true;
}
return $blnOutput;
}
";i:1;i:1;}s:12:"content_size";i:1069;s:13:"content_lines";i:35;s:6:"atLine";i:320;}i:23;a:7:{s:6:"header";s:49:"function conditionAnswers($mixAnswers,$arrRule) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:88:"
Check if $answers is array or string and call function checkCondition for each answer
";s:5:"param";a:2:{i:0;a:2:{i:0;s:5:"mixed";i:1;s:20:"Given answer by user";}i:1;a:2:{i:0;s:5:"array";i:1;s:28:"Rule to check answer against";}}s:6:"return";a:2:{i:0;s:7:"boolean";i:1;s:23:"Condition true or false";}}s:7:"content";a:2:{i:0;s:507:" $intCount = 0;
if (is_array($mixAnswers)) {
$arrAnswers = $mixAnswers;
foreach ($this->arrSurveyItems as $arrItem){ // Check if type is constant_sum.
if ($arrItem['uid']==$arrRule['field'] && $arrItem['question_type']=='11') {
$arrConditions[$intCount] = $this->checkCondition(array_sum($arrAnswers),$arrRule);
$blnConstantSum = true;
}
[...]
,$arrRule);
}
if (in_array(true,$arrConditions)) {
$blnOutput = true;
}
return $blnOutput;
}
";i:1;i:1;}s:12:"content_size";i:1105;s:13:"content_lines";i:34;s:6:"atLine";i:363;}i:25;a:7:{s:6:"header";s:29:"function surveyCompletion() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:65:"
Give output according to configuration
when survey is finished
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:13:"Output string";}}s:7:"content";a:2:{i:0;s:507:" switch($this->arrConfig['completion_action']) {
case 0: // Close the browser
$strOutput = '<img src="clear.gif" alt="" onLoad="javascript:window.close();" />';
break;
case 1: // Display message
$completionArray['message_buttons'] = $this->setButton('close').$this->setButton('continue');
$completionArray['message_text'] = $this->pi_getLL('completion_m
[...]
case 2: // Redirect to another page
$this->callHeader('completion_url');
break;
}
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:675;s:13:"content_lines";i:16;s:6:"atLine";i:404;}i:27;a:7:{s:6:"header";s:32:"function callHeader($strInput) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:45:"
Set page header when jumping to other page
";s:5:"param";a:1:{i:0;a:2:{i:0;s:6:"string";i:1;s:50:"String according to configuration to set page link";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";a:2:{i:0;s:122:" header('Location: '.t3lib_div::locationHeaderUrl($this->pi_getPageLink($this->arrConfig[$strInput])));
}
";i:1;i:0;}s:12:"content_size";i:122;s:13:"content_lines";i:3;s:6:"atLine";i:427;}i:29;a:7:{s:6:"header";s:55:"function array_htmlspecialchars(&$mixInput, &$intKey) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:138:"
Do a trim and htmlspecialchars on input
This function is usefull when reading data from input fields from the database to display again
";s:5:"param";a:2:{i:0;a:2:{i:0;s:5:"mixed";i:1;s:57:"Input field or array to do a trim and htmlspecialchars on";}i:1;a:2:{i:0;s:7:"integer";i:1;s:27:"Key from the Input variable";}}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";a:2:{i:0;s:111:" if ($intKey!='conditions') {
$mixInput = trim(htmlspecialchars($mixInput, ENT_QUOTES));
}
}
";i:1;i:0;}s:12:"content_size";i:111;s:13:"content_lines";i:5;s:6:"atLine";i:439;}i:31;a:7:{s:6:"header";s:35:"function surveyError($strMessage) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:25:"
Displays error message
";s:5:"param";a:1:{i:0;a:2:{i:0;s:6:"string";i:1;s:32:"Message that has to be displayed";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:40:"Complete content generated by the plugin";}}s:7:"content";a:2:{i:0;s:357:" $arrError['message_text'] = $this->pi_getLL($strMessage);
$strOutput = $this->cObj->substituteMarkerArray($this->cObj->getSubpart($this->arrConfig['templateCode'],'ERROR'),$arrError,'###|###',1);
return $strOutput;
}
/**********************************
*
* Checking functions
*
**********************************/
";i:1;i:0;}s:12:"content_size";i:357;s:13:"content_lines";i:11;s:6:"atLine";i:451;}i:33;a:8:{s:6:"header";s:27:"function checkResponses() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:11:"sectionText";a:1:{i:0;s:18:"Checking functions";}s:4:"cDat";a:3:{s:4:"text";s:48:"
Do check if maximum responses is not exceeded
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:24:"Locallang label if error";}}s:7:"content";a:2:{i:0;s:539:" if ($this->arrConfig['maximum_responses']<>0) {
$dbRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*',$this->strResultsTable,'pid='. $this->arrConfig['pid'] . $this->cObj->enableFields($this->strResultsTable),'','','');
$intRow = $GLOBALS['TYPO3_DB']->sql_num_rows($dbRes);
// Survey reached maximum number of responses, only check at beginning of survey
if ($intRow >= $this->arrConfig['maximum_responses'] && !$this->piVars['stage']) {
$strOutput = 'access_survey_maximum';
}
}
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:539;s:13:"content_lines";i:11;s:6:"atLine";i:468;}i:35;a:7:{s:6:"header";s:29:"function checkAccessLevel() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:80:"
Check the Access Level of the user
If Anonymous user then check on IP-address
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:24:"Locallang label if error";}}s:7:"content";a:2:{i:0;s:507:" $this->arrSessionData['begintstamp'] = time();
$arrPrevious = $this->readPreviousUser();
$this->arrUserData=$arrPrevious[0]?$arrPrevious[0]:array();
$this->arrSessionData['rid']=$arrPrevious[2]['uid'];
if ((int)$this->arrConfig['access_level']) { // Single response
if (!$this->piVars['stage']) {
// Time is expired for updateable response
if
[...]
& $this->arrConfig['responses_per_user']!=0) {
$strOutput = 'access_user_maximum';
}
}
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:1108;s:13:"content_lines";i:23;s:6:"atLine";i:486;}i:37;a:7:{s:6:"header";s:25:"function checkCaptcha() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:72:"
Check if freeCap CAPTCHA (sr_freecap) is loaded and make object of it
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"object";i:1;s:20:"Object of sr_freecap";}}s:7:"content";a:2:{i:0;s:222:" if (t3lib_extMgm::isLoaded('sr_freecap') ) {
require_once(t3lib_extMgm::extPath('sr_freecap').'pi2/class.tx_srfreecap_pi2.php');
$objOut = t3lib_div::makeInstance('tx_srfreecap_pi2');
}
return $objOut;
}
";i:1;i:0;}s:12:"content_size";i:222;s:13:"content_lines";i:7;s:6:"atLine";i:515;}i:39;a:7:{s:6:"header";s:33:"function checkUpdate($intInput) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:44:"
Return true if question has to be updated
";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:19:"Uid of the question";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:23:"True if it is an update";}}s:7:"content";a:2:{i:0;s:121:" if ($this->arrUserData[$intInput]) {
$blnOutput = true;
}
return $blnOutput;
}
";i:1;i:0;}s:12:"content_size";i:121;s:13:"content_lines";i:6;s:6:"atLine";i:529;}i:41;a:7:{s:6:"header";s:45:"function checkCondition($strAnswer,$arrRule){";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:57:"
Check if a single answer corresponds to the rule given
";s:5:"param";a:2:{i:0;a:2:{i:0;s:6:"string";i:1;s:33:"Single answer given in the survey";}i:1;a:2:{i:0;s:5:"array";i:1;s:14:"Condition rule";}}s:6:"return";a:2:{i:0;s:7:"boolean";i:1;s:23:"Condition true or false";}}s:7:"content";a:2:{i:0;s:507:" switch($arrRule['operator']) {
case 'eq': // Equals to
if ($strAnswer==$arrRule['value'] || $strAnswer==$arrRule['value2']) {
$blnOutput=true;
}
break;
case 'ne': // Not Equal to
if ($arrRule['value']!='' && $arrRule['value2']=='' && $strAnswer!=$arrRule['value']) {
$blnOutput=true;
} else if (
[...]
nOutput;
}
/**********************************
*
* Rendering functions
*
**********************************/
";i:1;i:1;}s:12:"content_size";i:2329;s:13:"content_lines";i:64;s:6:"atLine";i:543;}i:43;a:8:{s:6:"header";s:32:"function pageNumber($intInput) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:11:"sectionText";a:1:{i:0;s:19:"Rendering functions";}s:4:"cDat";a:3:{s:4:"text";s:51:"
Show page numbers according to the configuration
";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:35:"Stored configuration for pagenumber";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:52:"String containing all contents for pagenumber marker";}}s:7:"content";a:2:{i:0;s:507:" switch($intInput) {
case 0: // Do not display page numbers
$strOutput = '';
break;
case 1: // Display progress as a progress bar
$arrBar['percent'] = intval(($this->intStage+1) * 100/ ($this->intStage+1+$this->intNextPages));
$arrBar['bartext'] = $this->cObj->substituteMarker($this->pi_getLL('page_xy'),'%x',($this->intStage+1));
$arrBar['bartext'
[...]
ach page
$strOutput = $this->pi_getLL('page') . ' ' . ($this->intStage+1);
break;
}
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:1064;s:13:"content_lines";i:21;s:6:"atLine";i:614;}i:45;a:7:{s:6:"header";s:31:"function setButton($strInput) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:40:"
Show button according to input string
";s:5:"param";a:1:{i:0;a:2:{i:0;s:6:"string";i:1;s:18:"Name of the button";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:48:"String containing all contents for button marker";}}s:7:"content";a:2:{i:0;s:507:" switch($strInput) {
case 'cancel':
if ($this->arrConfig['navigation_cancel']!=0) {
$arrCancel['cancel'] = $this->pi_getLL('cancel');
if ($this->arrConfig['navigation_cancel']==1) {
$arrCancel['canceltype'] = 'button';
$arrCancel['cancelscript'] = 'onclick="javasc
[...]
NUE_BUTTON'),$arrContinue,'###|###',1);
}
break;
}
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:2179;s:13:"content_lines";i:43;s:6:"atLine";i:642;}i:47;a:7:{s:6:"header";s:23:"function setMarkers() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:54:"
Define all possible markers in the survey template.
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:38:"String containing the filled template.";}}s:7:"content";a:2:{i:0;s:507:" $arrMarkers = array(
'url' => '$this->url',
'pagenumbering' => '$this->pageNumber($this->arrConfig["page_numbering"])',
'backbutton' => '$this->setButton("back")',
'cancelbutton' => '$this->setButton("cancel")',
'submit' => '$this->setButton("submit")',
'items'
[...]
idationError($this->arrValidationErrors)',
);
return $strOutput = $this->getMarkers($arrMarkers);
}
";i:1;i:1;}s:12:"content_size";i:933;s:13:"content_lines";i:18;s:6:"atLine";i:691;}i:49;a:7:{s:6:"header";s:34:"function getMarkers($arrMarkers) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:28:"
Process the marker array.
";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:43:"Definition array for TypoScipt and FlexForm";}}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:53:"Configuration array made from TypoScript and FlexForm";}}s:7:"content";a:2:{i:0;s:470:" $strEmpty = '';
$arrTemp = array();
foreach ($arrMarkers as $strKey => $strItem) {
if (!$strItem) {
$strItem = '$strEmpty';
}
eval("\$arrTemp['".$strKey."'] = ".$strItem.";");
}
$strTemplate = $this->cObj->getSubpart($this->arrConfig['templateCode'],'SURVEYFORM');
$strOutput = $this->cObj->substituteMarkerArray($strTemplate,$arrTemp,'###|###',1);
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:470;s:13:"content_lines";i:13;s:6:"atLine";i:716;}i:51;a:7:{s:6:"header";s:63:"function questionTemplate($intType,$intAlignment,$intDisplay) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:74:"
Select the question template according to alignment or type of display.
";s:5:"param";a:3:{i:0;a:2:{i:0;s:7:"integer";i:1;s:16:"Type of question";}i:1;a:2:{i:0;s:7:"integer";i:1;s:17:"Type of alignment";}i:2;a:2:{i:0;s:7:"integer";i:1;s:12:"Display type";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:15:"Template string";}}s:7:"content";a:2:{i:0;s:507:" switch($intType){
case 1:
case 3:
$arrAlign=array('VER','HOR');
$strOutput = $GLOBALS['TSFE']->cObj->getSubpart($this->arrConfig['templateCode'], '###'.$intType.'_'.$arrAlign[$intAlignment].'###');
break;
case 4:
case 5:
$arrAlign=array('DROP','HOR','VER');
$strOutput = $GLOBALS['TSFE']->cObj->getSubpart($this->arrConfig['templateCode'],
[...]
E']->cObj->getSubpart($this->arrConfig['templateCode'], '###'.$intType.'###');
break;
}
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:602;s:13:"content_lines";i:18;s:6:"atLine";i:738;}i:53;a:7:{s:6:"header";s:38:"function markerCurrentItem($intType) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:67:"
Generate question number by configuration.
in question type 1-16
";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:16:"Type of question";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:15:"Question number";}}s:7:"content";a:2:{i:0;s:310:" if ($intType>= 1 && $intType<=16) {
if ($this->arrConfig['question_numbering']==1) {
$strOutput = $this->intCurrentItem . '.';
} elseif ($this->arrConfig['question_numbering']<>0){
$strOutput = $this->intPageItem . '.';
}
}
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:310;s:13:"content_lines";i:10;s:6:"atLine";i:764;}i:55;a:7:{s:6:"header";s:48:"function markerQuestion($intType,$strQuestion) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:50:"
Fill marker with question
in question type 1-16
";s:5:"param";a:2:{i:0;a:2:{i:0;s:7:"integer";i:1;s:16:"Type of question";}i:1;a:2:{i:0;s:6:"string";i:1;s:19:"The question itself";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:14:"Question asked";}}s:7:"content";a:2:{i:0;s:131:" if ($intType>= 1 && $intType<=16) {
$strOutput = $strQuestion;
}
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:131;s:13:"content_lines";i:6;s:6:"atLine";i:783;}i:57;a:7:{s:6:"header";s:55:"function markerSub($intType,$arrSubText,$strTemplate) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:67:"
Generate subtext of question if available.
in question type 1-16
";s:5:"param";a:3:{i:0;a:2:{i:0;s:7:"integer";i:1;s:16:"Type of question";}i:1;a:2:{i:0;s:5:"array";i:1;s:11:"The subtext";}i:2;a:2:{i:0;s:6:"string";i:1;s:49:"Template string where marker has to be taken from";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:24:"Subtext placed in marker";}}s:7:"content";a:2:{i:0;s:292:" if ($intType>= 1 && $intType<=16) {
if ($arrSubText) {
$strOutput = $this->cObj->substituteMarkerArray($GLOBALS['TSFE']->cObj->getSubpart($strTemplate, '###SUB###'), $arrSubText, '###|###', 1);
}
}
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:292;s:13:"content_lines";i:8;s:6:"atLine";i:799;}i:59;a:7:{s:6:"header";s:61:"function markerRequired($intType,$intRequired,$strTemplate) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:80:"
Put a sign behind the question if question is required.
in question type 1-16
";s:5:"param";a:3:{i:0;a:2:{i:0;s:7:"integer";i:1;s:16:"Type of question";}i:1;a:2:{i:0;s:7:"integer";i:1;s:24:"Is the question required";}i:2;a:2:{i:0;s:6:"string";i:1;s:49:"Template string where marker has to be taken from";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:4:"Sign";}}s:7:"content";a:2:{i:0;s:294:" if ($intType>= 1 && $intType<=16) {
if ($intRequired) {
$strOutput = $this->cObj->substituteMarkerArray($GLOBALS['TSFE']->cObj->getSubpart($strTemplate, '###REQUIRED###'), array(), '###|###', 1);
}
}
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:294;s:13:"content_lines";i:8;s:6:"atLine";i:817;}i:61;a:7:{s:6:"header";s:51:"function markerComment($arrQuestion,$strTemplate) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:108:"
Add extra text below the question to explain minimum and maximum values
in question type 1,11,12,13,15,16
";s:5:"param";a:2:{i:0;a:2:{i:0;s:5:"array";i:1;s:37:"Question and all of its configuration";}i:1;a:2:{i:0;s:6:"string";i:1;s:49:"Template string where marker has to be taken from";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:16:"Explanation text";}}s:7:"content";a:2:{i:0;s:507:" $arrAllowed = array(1,11,12,13,15,16);
if (in_array($arrQuestion['question_type'],$arrAllowed)) {
switch($arrQuestion['question_type']) {
case 1:
if ($arrQuestion['options_minimum_responses']&&$arrQuestion['options_maximum_responses']) {
$strComment = $this->pi_getLL('comment_responses_both');
[...]
ubpart($strTemplate, '###COMMENT###'), '###QUESTION_COMMENT###',$strMarker);
}
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:3497;s:13:"content_lines";i:57;s:6:"atLine";i:834;}i:63;a:7:{s:6:"header";s:55:"function markerAdditionals($arrQuestion,$strTemplate) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:69:"
Add additional open type field to the answers
in question type 1,3
";s:5:"param";a:2:{i:0;a:2:{i:0;s:5:"array";i:1;s:37:"Question and all of its configuration";}i:1;a:2:{i:0;s:6:"string";i:1;s:49:"Template string where marker has to be taken from";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:25:"Additional field and text";}}s:7:"content";a:2:{i:0;s:507:" $arrAllowed = array(1,3);
if (in_array($arrQuestion['question_type'],$arrAllowed) && $arrQuestion['answers_allow_additional']) {
if ($arrQuestion['question_type']==1) {
if ($this->arrUserData[$arrQuestion['uid']]['-1']) {
$arrQuestion['checked'] = 'checked="checked"';
$arrQuestion['value'] = $thi
[...]
###'), $arrQuestion, '###|###', 1);
$this->arrJsItems[3] = true;
}
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:1927;s:13:"content_lines";i:21;s:6:"atLine";i:900;}i:65;a:7:{s:6:"header";s:38:"function markerColspan($arrQuestion) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:64:"
Calculate Colspan of matrix question
in question type 6,7,8,9
";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:37:"Question and all of its configuration";}}s:6:"return";a:2:{i:0;s:7:"integer";i:1;s:16:"Calculated value";}}s:7:"content";a:2:{i:0;s:373:" $arrAllowed = array(6,7,8);
if (in_array($arrQuestion['question_type'],$arrAllowed)) {
$intOutput = count($this->answersArray($arrQuestion['answers']));
} elseif ($arrQuestion['question_type']==9) {
$intOutput = $arrQuestion['ending_number'] - $arrQuestion['beginning_number']+1;
}
return $intOutput;
}
";i:1;i:0;}s:12:"content_size";i:373;s:13:"content_lines";i:9;s:6:"atLine";i:929;}i:67;a:7:{s:6:"header";s:39:"function markerColwidth($arrQuestion) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:86:"
Calculate width of column of matrix question in percentage
in question type 6,7,8,9
";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:37:"Question and all of its configuration";}}s:6:"return";a:2:{i:0;s:7:"integer";i:1;s:16:"Calculated value";}}s:7:"content";a:2:{i:0;s:413:" $arrAllowed = array(6,7,8);
if (in_array($arrQuestion['question_type'],$arrAllowed)) {
$intOutput = intval(100/(count($this->answersArray($arrQuestion['answers'])) + 1)) . '%';
} elseif ($arrQuestion['question_type']==9) {
$intOutput = intval(100/($arrQuestion['ending_number'] - $arrQuestion['beginning_number']+2)) . '%';
}
return $intOutput;
}
";i:1;i:0;}s:12:"content_size";i:413;s:13:"content_lines";i:9;s:6:"atLine";i:946;}i:69;a:7:{s:6:"header";s:48:"function markerList($arrQuestion,$strTemplate) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:62:"
Build a list of possible answers
in question type 1,2,3,4,5
";s:5:"param";a:2:{i:0;a:2:{i:0;s:5:"array";i:1;s:37:"Question and all of its configuration";}i:1;a:2:{i:0;s:6:"string";i:1;s:49:"Template string where marker has to be taken from";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:24:"List of possible answers";}}s:7:"content";a:2:{i:0;s:507:" $arrHtml = array();
if (in_array($arrQuestion['question_type'],array(1,2,3))) {
$arrVars = $this->answersArray($arrQuestion['answers']);
foreach($arrVars as $intKey => $arrItem){
unset($arrQuestion['checked']);
unset($arrQuestion['selected']);
if ($this->checkUpdate($arrQuestion['uid'])) {
if ((in_array($arrQue
[...]
utput = implode(chr(13),$arrHtml);
$arrOutput = array($strOutput,$blnChecked);
return $arrOutput;
}
";i:1;i:1;}s:12:"content_size";i:2306;s:13:"content_lines";i:45;s:6:"atLine";i:964;}i:71;a:7:{s:6:"header";s:50:"function markerHeader($arrQuestion,$strTemplate) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:73:"
Build the header row of matrix type questions
in question type 6,7,8,9
";s:5:"param";a:2:{i:0;a:2:{i:0;s:5:"array";i:1;s:37:"Question and all of its configuration";}i:1;a:2:{i:0;s:6:"string";i:1;s:49:"Template string where marker has to be taken from";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:10:"Header row";}}s:7:"content";a:2:{i:0;s:507:" $arrHtml = array();
$arrAllowed = array(6,7,8);
if (in_array($arrQuestion['question_type'],$arrAllowed)) {
$arrVars = $this->answersArray($arrQuestion['answers']);
foreach ($arrVars as $arrCol){
$arrQuestion['value'] = $arrCol[0];
$arrHtml[] = $this->cObj->substituteMarkerArray($GLOBALS['TSFE']->cObj->getSubpart($strTemp
[...]
tion, '###|###', 1);
}
}
$strOutput = implode(chr(13),$arrHtml);
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:902;s:13:"content_lines";i:18;s:6:"atLine";i:1018;}i:73;a:7:{s:6:"header";s:48:"function markerRows($arrQuestion,$strTemplate) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:127:"
Build the answer rows of matrix type questions and answers not configured by Answer Wizard
in question type 6,7,8,9,11,15,16
";s:5:"param";a:2:{i:0;a:2:{i:0;s:5:"array";i:1;s:37:"Question and all of its configuration";}i:1;a:2:{i:0;s:6:"string";i:1;s:49:"Template string where marker has to be taken from";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:11:"Answer rows";}}s:7:"content";a:2:{i:0;s:507:" $arrHtmlRows = array();
$strClass = "surveyrow_odd";
$arrCols = $this->answersArray($arrQuestion['answers']);
$arrRows = explode("\n",$arrQuestion['rows']);
$arrRows = array_map('trim', $arrRows);
$arrMarkerArray['###UID###'] = $arrQuestion['uid'];
$arrMarkerArray['###QUESTION###'] = $arrQuestion['question'];
foreach ($arrRows as $intRowKey =
[...]
rrMarkerArray, $arrSubpartArray, array());
}
$strOutput = implode(chr(13),$arrHtmlRows);
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:4207;s:13:"content_lines";i:75;s:6:"atLine";i:1045;}i:75;a:7:{s:6:"header";s:36:"function markerValue($arrQuestion) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:72:"
Return default value for marker
in question type 10,12,13,14,17,19,21
";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:37:"Question and all of its configuration";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:5:"Value";}}s:7:"content";a:2:{i:0;s:507:" if (in_array($arrQuestion['question_type'],array(10,12,13,14))) {
if ($this->checkUpdate($arrQuestion['uid'])) {
$strOutput = $this->arrUserData[$arrQuestion['uid']];
} else {
if (in_array($arrQuestion['question_type'],array(10,14))) {
$strOutput = $arrQuestion['default_value_txt'];
[...]
on['question_type']==21) {
$strOutput = $arrQuestion['message'];
}
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:1063;s:13:"content_lines";i:22;s:6:"atLine";i:1128;}i:77;a:7:{s:6:"header";s:36:"function markerValueNone($intType) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:67:"
Return locallang value for value --None--
in question type 2,4,5
";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:16:"Type of question";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:15:"Locallang Value";}}s:7:"content";a:2:{i:0;s:151:" if (in_array($intType,array(2,4,5))) {
$strOutput = $this->pi_getLL('value_none');
}
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:151;s:13:"content_lines";i:6;s:6:"atLine";i:1158;}i:79;a:7:{s:6:"header";s:49:"function markerTitle($arrQuestion,$strTemplate) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:23:"
Build the page title
";s:5:"param";a:2:{i:0;a:2:{i:0;s:5:"array";i:1;s:37:"Question and all of its configuration";}i:1;a:2:{i:0;s:6:"string";i:1;s:49:"Template string where marker has to be taken from";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:10:"Page title";}}s:7:"content";a:2:{i:0;s:229:" if ($arrQuestion['page_title']) {
$strOutput = $this->cObj->substituteMarkerArray($GLOBALS['TSFE']->cObj->getSubpart($strTemplate, '###TITLE###'), $arrQuestion, '###|###', 1);
}
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:229;s:13:"content_lines";i:6;s:6:"atLine";i:1172;}i:81;a:7:{s:6:"header";s:56:"function markerIntroduction($arrQuestion,$strTemplate) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:30:"
Build the page introduction
";s:5:"param";a:2:{i:0;a:2:{i:0;s:5:"array";i:1;s:37:"Question and all of its configuration";}i:1;a:2:{i:0;s:6:"string";i:1;s:49:"Template string where marker has to be taken from";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:17:"Page introduction";}}s:7:"content";a:2:{i:0;s:243:" if ($arrQuestion['page_introduction']) {
$strOutput = $this->cObj->substituteMarkerArray($GLOBALS['TSFE']->cObj->getSubpart($strTemplate, '###INTRODUCTION###'), $arrQuestion, '###|###', 1);
}
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:243;s:13:"content_lines";i:6;s:6:"atLine";i:1186;}i:83;a:7:{s:6:"header";s:36:"function markerImage($arrQuestion) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:49:"
Build the image according to the configuration
";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:37:"Question and all of its configuration";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:30:"<img> tag, if any image found.";}}s:7:"content";a:2:{i:0;s:381:" if ($arrQuestion['image']) {
$arrConf['image.']['file'] = 'uploads/tx_pbsurvey/' . $arrQuestion['image'];
$arrConf['image.']['file.']['maxH'] = $arrQuestion['image_height'];
$arrConf['image.']['file.']['maxW'] = $arrQuestion['image_width'];
$strOutput = $this->cObj->cIMAGE($arrConf['image.']['file'],$arrConf['image.']);
}
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:381;s:13:"content_lines";i:9;s:6:"atLine";i:1199;}i:85;a:7:{s:6:"header";s:33:"function markerAlign($intAlign) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:29:"
Return the image alignment
";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"integer";i:1;s:26:"Configuration of alignment";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:9:"Alignment";}}s:7:"content";a:2:{i:0;s:208:" if ($intAlign) {
if ($intAlign<=1) {
$strOutput = 'left';
} elseif ($intAlign==2) {
$strOutput = 'center';
} else {
$strOutput = 'right';
}
}
return $strOutput;
}
";i:1;i:0;}s:12:"content_size";i:208;s:13:"content_lines";i:12;s:6:"atLine";i:1215;}i:87;a:7:{s:6:"header";s:39:"function processQuestion($arrQuestion){";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:75:"
Process the question and substitute markers in template
for screenoutput
";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:34:"The question and its configuration";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:17:"Rendered question";}}s:7:"content";a:2:{i:0;s:507:" $strTemplate = $this->questionTemplate($arrQuestion['question_type'],$arrQuestion['options_alignment'],$arrQuestion['display_type']);
$markerArray['###CURRENTITEM###'] = $this->markerCurrentItem($arrQuestion['question_type']);
$markerArray['###UID###'] = $this->markerQuestion($arrQuestion['question_type'],$arrQuestion['uid']);
$markerArray['###QUESTION###']
[...]
subpartArray, array());
$strOutput = ereg_replace('###[A-Za-z_1234567890]+###', '', $strOutput);
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:2085;s:13:"content_lines";i:28;s:6:"atLine";i:1235;}i:89;a:7:{s:6:"header";s:24:"function loadCaptcha() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:38:"
Build the HTML for the captcha page
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:32:"HTML containing the captcha page";}}s:7:"content";a:2:{i:0;s:507:" $this->strOutItems = $this->cObj->substituteMarkerArray($this->cObj->getSubpart($this->arrConfig['templateCode'],'CAPTCHA'),$this->objFreeCap->makeCaptcha(),'',1);
$arrMarkers = array(
'url' => '$this->url',
'submit' => '$this->setButton("submit")',
'items' => '$this->strOutItems',
'stage'
[...]
strOutput;
}
/**********************************
*
* Reading functions
*
**********************************/
";i:1;i:1;}s:12:"content_size";i:798;s:13:"content_lines";i:23;s:6:"atLine";i:1269;}i:91;a:8:{s:6:"header";s:29:"function readPreviousUser() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:11:"sectionText";a:1:{i:0;s:17:"Reading functions";}s:4:"cDat";a:3:{s:4:"text";s:101:"
Read the previous response from user if there is any from database and add the latest piVars to it
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:5:"array";i:1;s:66:"Answers found, total number of rows found, row of the first result";}}s:7:"content";a:2:{i:0;s:507:" $arrSelectConf['selectFields'] = '*';
$arrSelectConf['where'] = '1=1';
$arrSelectConf['where'] .= ' AND pid=' . $this->arrConfig['pid'];
if ($this->arrSessionData['uid']) { // We have a frontend user
$arrSelectConf['where'] .= ' AND user=' . $this->arrSessionData['uid'];
} elseif ($this->arrConfig['anonymous_mode']==0) { // Anonymous, IP Chec
[...]
nswer;
}
}
}
}
}
$arrOutput = array($arrAnswers,$intRowCount,$arrRes);
return $arrOutput;
}
";i:1;i:1;}s:12:"content_size";i:2886;s:13:"content_lines";i:64;s:6:"atLine";i:1298;}i:93;a:7:{s:6:"header";s:23:"function readSurvey() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:243:"
Read all questions from database
Frontend user has to do all question no mather what language, so sys_language_mode != 'strict'
Thanks to Rupert Germann, who probably doesn't know it anymore we discussed this during TYCON3 2005 in Karlsruhe
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";a:2:{i:0;s:507:" $arrSelectConf['selectFields'] = '*';
$arrSelectConf['where'] = '1=1';
$arrSelectConf['where'] .= ' AND pid=' . $this->arrConfig['pid'];
$arrSelectConf['where'] .= ' AND ' . $this->strItemsTable . '.sys_language_uid IN (0,-1)';
$arrSelectConf['where'] .= $this->cObj->enableFields($this->strItemsTable);
$arrSelectConf['orderBy'] = 'sorting ASC';
$dbRe
[...]
ow;
}
}
/**********************************
*
* Storing functions
*
**********************************/
";i:1;i:1;}s:12:"content_size";i:1023;s:13:"content_lines";i:22;s:6:"atLine";i:1370;}i:95;a:8:{s:6:"header";s:23:"function userSetKey() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:11:"sectionText";a:1:{i:0;s:17:"Storing functions";}s:4:"cDat";a:3:{s:4:"text";s:27:"
Transfer data to FE_user
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:4:"void";i:1;s:0:"";}}s:7:"content";a:2:{i:0;s:97:" $GLOBALS['TSFE']->fe_user->setKey('ses','surveyData', $this->arrSessionData);
}
";i:1;i:0;}s:12:"content_size";i:97;s:13:"content_lines";i:3;s:6:"atLine";i:1398;}i:97;a:7:{s:6:"header";s:38:"function storeResults($boolFinished) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:162:"
Store new result in database or, if update, update the previous one, in the beginning of the survey.
Set finished and endtsstamp when survey has been finished.
";s:5:"param";a:1:{i:0;a:2:{i:0;s:7:"boolean";i:1;s:30:"True if the survey is finished";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:41:"Error message if query to database failed";}}s:7:"content";a:2:{i:0;s:507:" if ($boolFinished) {
$arrDb['finished'] = 1;
$arrDb['endtstamp'] = time();
if (!$this->arrSessionData['uid'] && $this->arrConfig['anonymous_mode']) {
setcookie($this->extKey."[responses]", $this->arrSessionData['responses']+1, (time()+60*60*24*$this->arrConfig['cookie_lifetime'])); // add 1 to the amount of responses
}
}
$arrDb['user'] = $this->
[...]
']->sql_error()) {
$strOutput = $this->surveyError('failed_saving_data');
}
return $strOutput;
}
";i:1;i:1;}s:12:"content_size";i:1471;s:13:"content_lines";i:28;s:6:"atLine";i:1409;}i:99;a:7:{s:6:"header";s:34:"function storeAnswers($arrInput) {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:130:"
Store the answers in the database
Updates old answers, inserts new ones or deletes previous answers not given again by the user
";s:5:"param";a:1:{i:0;a:2:{i:0;s:5:"array";i:1;s:20:"Answers to be stored";}}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:41:"Error message if query to database failed";}}s:7:"content";a:2:{i:0;s:507:" $intResult = $this->arrSessionData['rid'];
$intPage = $this->arrConfig['pid'];
$arrSelectConf['selectFields'] = '*';
$arrSelectConf['where'] = '1=1';
$arrSelectConf['where'] .= ' AND pid=' . $intPage;
$arrSelectConf['where'] .= ' AND result=' . $intResult;
foreach($arrInput as $mixQuestion => $mixQuestionValue) {
unset($this->arrUserData
[...]
Output;
}
/**********************************
*
* Validation functions
*
**********************************/
";i:1;i:1;}s:12:"content_size";i:2709;s:13:"content_lines";i:70;s:6:"atLine";i:1445;}i:101;a:8:{s:6:"header";s:29:"function validationString() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:11:"sectionText";a:1:{i:0;s:20:"Validation functions";}s:4:"cDat";a:3:{s:4:"text";s:76:"
Create the validation string for use in client or server side validation.
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:6:"string";i:1;s:37:"Contains complete JavaScript Function";}}s:7:"content";a:2:{i:0;s:595:" if (is_array($this->arrValidation)) {
if ($this->arrConfig['validation']==0) { // Client side
foreach($this->arrValidation as $intUid => $arrQuestion) {
$arrCsCalls[] = "'".$intUid."','".$arrQuestion['number']."','".$arrQuestion['type'].":".($arrQuestion['required']?'R':'').":".$arrQuestion['values'][1].":".$arrQuestion['values'][2]."'";
}
$this->strCsCalls = "pbsurveyValidate(".implode(",",$arrCsCalls).");return document.pbsurveyReturnValue";
} else {
$this->strSsCalls = base64_encode(serialize($this->arrValidation));
}
}
}
";i:1;i:0;}s:12:"content_size";i:595;s:13:"content_lines";i:12;s:6:"atLine";i:1521;}i:103;a:7:{s:6:"header";s:25:"function validateForm() {";s:11:"parentClass";s:15:"tx_pbsurvey_pi1";s:4:"cDat";a:3:{s:4:"text";s:90:"
Do a server side validation of the form according to the configuration of each question
";s:5:"param";a:0:{}s:6:"return";a:2:{i:0;s:7:"boolean";i:1;s:53:"True if validation is ok or no server side validation";}}s:7:"content";a:2:{i:0;s:507:" $boolOutput = TRUE;
if ($this->arrConfig['validation']==1 && $this->piVars['validation'] && !isset($this->piVars['back'])) { // Server side validation and something to validate and no Back button
$arrValidation = unserialize(base64_decode($this->piVars['validation']));
if (is_array($arrValidation)) {
foreach($arrValidation as $intKey => $arrQue
[...]