20
20
* 1 - Only show the list without any other html unnecessary elements
21
21
*
22
22
*****************************************************************************/
23
-
23
+
24
24
require_once ('../../system/common.php ' );
25
25
26
26
// Initialize and check the parameters
58
58
{
59
59
// set role default list configuration
60
60
$ getListId = $ role ->getDefaultList ();
61
-
61
+
62
62
if ($ getListId == 0 )
63
63
{
64
64
$ gMessage ->show ($ gL10n ->get ('LST_DEFAULT_LIST_NOT_SET_UP ' ));
167
167
{
168
168
$ datatable = false ;
169
169
$ hoverRows = false ;
170
-
170
+
171
171
if ($ getShowMembers == 0 )
172
172
{
173
173
$ memberStatus = $ gL10n ->get ('LST_ACTIVE_MEMBERS ' );
188
188
$ page ->hideThemeHtml ();
189
189
$ page ->hideMenu ();
190
190
$ page ->setPrintMode ();
191
-
191
+
192
192
$ page ->setTitle ($ title );
193
193
$ page ->setHeadline ($ headline );
194
-
194
+
195
195
$ table = new HtmlTable ('adm_lists_table ' , $ page , $ hoverRows , $ datatable , $ classTable );
196
196
}
197
197
elseif ($ getMode == 'pdf ' )
210
210
// set header and footer fonts
211
211
$ pdf ->setHeaderFont (array (PDF_FONT_NAME_MAIN , '' , PDF_FONT_SIZE_MAIN ));
212
212
$ pdf ->setFooterFont (array (PDF_FONT_NAME_DATA , '' , PDF_FONT_SIZE_DATA ));
213
-
213
+
214
214
// set auto page breaks
215
215
$ pdf ->SetAutoPageBreak (true , PDF_MARGIN_BOTTOM );
216
216
$ pdf ->SetMargins (10 , 20 , 10 );
219
219
220
220
//headline for PDF
221
221
$ pdf ->SetHeaderData ('' , '' , $ headline , '' );
222
-
222
+
223
223
// set font
224
224
$ pdf ->SetFont ('times ' , '' , 10 );
225
225
226
226
// add a page
227
227
$ pdf ->AddPage ();
228
-
228
+
229
229
// Create table object for display
230
230
$ table = new HtmlTable ('adm_lists_table ' , $ pdf , $ hoverRows , $ datatable , $ classTable );
231
231
$ table ->addAttribute ('border ' , '1 ' );
251
251
252
252
$ page ->setTitle ($ title );
253
253
$ page ->setHeadline ($ headline );
254
-
254
+
255
255
$ page ->addHtml ('<h5> ' .$ role ->getValue ('cat_name ' ).' - ' .$ memberStatus .'</h5> ' );
256
256
$ page ->addJavascript ('
257
257
$("#export_list_to").change(function () {
262
262
"lst_id= ' . $ getListId . '&rol_id= ' . $ getRoleId . '&mode=" + result + "&show_members= ' .$ getShowMembers .'";
263
263
}
264
264
});
265
-
265
+
266
266
$("#menu_item_print_view").click(function () {
267
267
window.open(" ' .$ g_root_path .'/adm_program/modules/lists/lists_show.php?lst_id= ' .$ getListId .'&mode=print&rol_id= ' .$ getRoleId .'&show_members= ' .$ getShowMembers .'", "_blank");
268
268
}); ' , true );
269
-
269
+
270
270
// get module menu
271
271
$ listsMenu = $ page ->getMenu ();
272
272
282
282
$ listsMenu ->addItem ('menu_item_full_screen ' , $ g_root_path .'/adm_program/modules/lists/lists_show.php?lst_id= ' .$ getListId .'&mode=html&rol_id= ' .$ getRoleId .'&show_members= ' .$ getShowMembers .'&full_screen=1 ' ,
283
283
$ gL10n ->get ('SYS_FULL_SCREEN ' ), 'arrow_out.png ' );
284
284
}
285
-
285
+
286
286
// link to assign or remove members if you are allowed to do it
287
287
if ($ role ->allowedToAssignMembers ($ gCurrentUser ))
288
288
{
289
289
$ listsMenu ->addItem ('menu_item_assign_members ' , $ g_root_path .'/adm_program/modules/lists/members_assignment.php?rol_id= ' . $ role ->getValue ('rol_id ' ),
290
290
$ gL10n ->get ('SYS_ASSIGN_MEMBERS ' ), 'add.png ' );
291
291
}
292
-
292
+
293
293
// link to print overlay and exports
294
294
$ listsMenu ->addItem ('menu_item_print_view ' , '# ' , $ gL10n ->get ('LST_PRINT_PREVIEW ' ), 'print.png ' );
295
-
295
+
296
296
$ form = new HtmlForm ('navbar_export_to_form ' , '' , $ page , array ('type ' => 'navbar ' , 'setFocus ' => false ));
297
297
$ selectBoxEntries = array ('' => $ gL10n ->get ('LST_EXPORT_TO ' ).' ... ' , 'csv-ms ' => $ gL10n ->get ('LST_MICROSOFT_EXCEL ' ).' ( ' .$ gL10n ->get ('SYS_ISO_8859_1 ' ).') ' , 'pdf ' => $ gL10n ->get ('SYS_PDF ' ).' ( ' .$ gL10n ->get ('SYS_PORTRAIT ' ).') ' ,
298
298
'pdfl ' => $ gL10n ->get ('SYS_PDF ' ).' ( ' .$ gL10n ->get ('SYS_LANDSCAPE ' ).') ' , 'csv-oo ' => $ gL10n ->get ('SYS_CSV ' ).' ( ' .$ gL10n ->get ('SYS_UTF8 ' ).') ' );
375
375
{
376
376
$ table ->addColumn ($ gL10n ->get ('SYS_ABR_NO ' ), array ('style ' => 'text-align: ' .$ columnAlign [$ columnNumber -1 ].';font-size:14;background-color:#C7C7C7; ' ), 'th ' );
377
377
}
378
-
378
+
379
379
$ table ->addColumn ($ columnHeader , array ('style ' => 'text-align: ' .$ columnAlign [$ columnNumber -1 ].';font-size:14;background-color:#C7C7C7; ' ), 'th ' );
380
380
}
381
381
elseif ($ getMode == 'html ' || $ getMode == 'print ' )
438
438
$ listRowNumber = 1 ;
439
439
$ title = $ gL10n ->get ('SYS_PARTICIPANTS ' );
440
440
}
441
-
441
+
442
442
$ table ->addRowByArray (array ($ title ), null , array ('class ' => 'admidio-group-heading ' ), 1 , ($ list ->countColumns () + 1 ));
443
443
$ lastGroupHead = $ row ['mem_leader ' ];
444
444
}
491
491
{
492
492
// die Laufende Nummer noch davorsetzen
493
493
$ columnValues [] = $ listRowNumber ;
494
-
494
+
495
495
// in html mode we add an additional column with leader/member information to
496
496
// enable the grouping function of jquery datatables
497
497
if ($ getMode == 'html ' )
582
582
}
583
583
// create output in html layout
584
584
else
585
- {
586
- $ columnValues [] = $ gProfileFields ->getHtmlValue ($ gProfileFields ->getPropertyById ($ usf_id , 'usf_name_intern ' ), $ content , $ row ['usr_id ' ]);
585
+ {
586
+ if ($ getMode == 'print '
587
+ && ( $ gProfileFields ->getPropertyById ($ usf_id , 'usf_type ' ) == 'EMAIL '
588
+ || $ gProfileFields ->getPropertyById ($ usf_id , 'usf_type ' ) == 'URL ' ))
589
+ {
590
+ $ columnValues [] = $ content ;
591
+ }
592
+ else
593
+ {
594
+ $ columnValues [] = $ gProfileFields ->getHtmlValue ($ gProfileFields ->getPropertyById ($ usf_id , 'usf_name_intern ' ), $ content , $ row ['usr_id ' ]);
595
+ }
587
596
}
588
597
}
589
598
}
617
626
{
618
627
$ filename = $ gCurrentOrganization ->getValue ('org_shortname ' ). '- ' . str_replace ('. ' , '' , $ role ->getValue ('rol_name ' )).'. ' .$ getMode ;
619
628
}
620
-
629
+
621
630
// for IE the filename must have special chars in hexadecimal
622
631
if (preg_match ('/MSIE/ ' , $ _SERVER ['HTTP_USER_AGENT ' ]))
623
632
{
624
633
$ filename = urlencode ($ filename );
625
634
}
626
635
627
636
header ('Content-Disposition: attachment; filename=" ' .$ filename .'" ' );
628
-
637
+
629
638
// neccessary for IE6 to 8, because without it the download with SSL has problems
630
639
header ('Cache-Control: private ' );
631
640
header ('Pragma: public ' );
632
-
641
+
633
642
}
634
643
635
644
if ($ getMode == 'csv ' )
651
660
{
652
661
// output the HTML content
653
662
$ pdf ->writeHTML ($ table ->getHtmlTable (), true , false , true , false , '' );
654
-
663
+
655
664
//Save PDF to file
656
665
$ pdf ->Output (SERVER_PATH . '/adm_my_files/ ' .$ filename , 'F ' );
657
-
666
+
658
667
//Redirect
659
668
header ('Content-Type: application/pdf ' );
660
669
667
676
// add table list to the page
668
677
$ page ->addHtml ($ table ->show (false ));
669
678
670
-
679
+
671
680
// create a infobox for the role
672
681
if ($ getMode == 'html ' )
673
682
{
674
683
$ htmlBox = '' ;
675
-
684
+
676
685
// only show infobox if additional role information fields are filled
677
686
if (strlen ($ role ->getValue ('rol_start_date ' )) > 0
678
687
|| $ role ->getValue ('rol_weekday ' ) > 0
687
696
<div class="panel-body"> ' ;
688
697
$ form = new HtmlForm ('list_infobox_items ' , null );
689
698
$ form ->addStaticControl ('infobox_category ' , $ gL10n ->get ('SYS_CATEGORY ' ), $ role ->getValue ('cat_name ' ));
690
-
699
+
691
700
//Beschreibung
692
701
if (strlen ($ role ->getValue ('rol_description ' )) > 0 )
693
702
{
694
703
$ form ->addStaticControl ('infobox_description ' , $ gL10n ->get ('SYS_DESCRIPTION ' ), $ role ->getValue ('rol_description ' ));
695
704
}
696
-
705
+
697
706
//Zeitraum
698
707
if (strlen ($ role ->getValue ('rol_start_date ' )) > 0 )
699
708
{
700
709
$ form ->addStaticControl ('infobox_period ' , $ gL10n ->get ('SYS_PERIOD ' ), $ gL10n ->get ('SYS_DATE_FROM_TO ' , $ role ->getValue ('rol_start_date ' , $ gPreferences ['system_date ' ]), $ role ->getValue ('rol_end_date ' , $ gPreferences ['system_date ' ])));
701
710
}
702
-
711
+
703
712
//Termin
704
713
if ($ role ->getValue ('rol_weekday ' ) > 0 || strlen ($ role ->getValue ('rol_start_time ' )) > 0 )
705
714
{
711
720
{
712
721
$ value = $ gL10n ->get ('LST_FROM_TO ' , $ role ->getValue ('rol_start_time ' , $ gPreferences ['system_time ' ]), $ role ->getValue ('rol_end_time ' , $ gPreferences ['system_time ' ]));
713
722
}
714
-
723
+
715
724
$ form ->addStaticControl ('infobox_date ' , $ gL10n ->get ('DAT_DATE ' ), $ value );
716
725
}
717
-
726
+
718
727
//Treffpunkt
719
728
if (strlen ($ role ->getValue ('rol_location ' )) > 0 )
720
729
{
721
730
$ form ->addStaticControl ('infobox_location ' , $ gL10n ->get ('SYS_LOCATION ' ), $ role ->getValue ('rol_location ' ));
722
731
}
723
-
732
+
724
733
//Beitrag
725
734
if (strlen ($ role ->getValue ('rol_cost ' )) > 0 )
726
735
{
727
736
$ form ->addStaticControl ('infobox_contribution ' , $ gL10n ->get ('SYS_CONTRIBUTION ' ), $ role ->getValue ('rol_cost ' ). ' ' .$ gPreferences ['system_currency ' ]);
728
737
}
729
-
738
+
730
739
//Beitragszeitraum
731
740
if (strlen ($ role ->getValue ('rol_cost_period ' )) > 0 && $ role ->getValue ('rol_cost_period ' ) != 0 )
732
741
{
733
742
$ form ->addStaticControl ('infobox_contribution_period ' , $ gL10n ->get ('SYS_CONTRIBUTION_PERIOD ' ), $ role ->getCostPeriods ($ role ->getValue ('rol_cost_period ' )));
734
743
}
735
-
744
+
736
745
//maximale Teilnehmerzahl
737
746
if (strlen ($ role ->getValue ('rol_max_members ' )) > 0 )
738
747
{
742
751
$ htmlBox .= '</div>
743
752
</div> ' ;
744
753
} // end of infobox
745
-
754
+
746
755
$ page ->addHtml ($ htmlBox );
747
756
}
748
-
757
+
749
758
// show complete html page
750
759
$ page ->show ();
751
760
}
752
761
753
- ?>
762
+ ?>
0 commit comments