PluginProbe
ANAC XML Bandi di Gara / 3
ANAC XML Bandi di Gara v3
7.8 trunk 0.1 1.0.0.1 1.0.1 1.0.2 1.0.3 1.0.4 1.1 1.1.1 1.1.2 2.0 2.0.1 2.0.2 2.0.3 2.1 2.2 2.3 2.3.1 3 3.0.1 3.1 3.1.1 3.1.2 3.1.3 All 57 releases
avcp / tablegen.php

tablegen.php in ANAC XML Bandi di Gara 3, at tablegen.php

112 lines 3.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
2 <script type="text/javascript" charset="utf-8" src="<?php echo plugin_dir_url(__FILE__).'includes/jquery.dataTables.min.js';?>"></script>
3
4 <?php
5 $get_avcp_tab_jqueryui = get_option('avcp_tab_jqueryui');
6 if ($get_avcp_tab_jqueryui == '1') {
7 $t_jqueryui = 'true';
8 } else {
9 $t_jqueryui = 'false';
10 }
11 ?>
12 <style type="text/css" title="currentStyle">
13 @import "<?php echo plugin_dir_url(__FILE__).'css/demo_page.css';?>";
14 @import "<?php echo plugin_dir_url(__FILE__).'css/demo_table_jui.css';?>";
15 <?php if ($t_jqueryui == 'true') {
16 echo '@import "' . plugin_dir_url(__FILE__). 'css/themeroller.css';
17 }?>
18 </style>
19 <script type="text/javascript" charset="utf-8">
20 $(document).ready( function () {
21 var oTable = $('#avcp_table').dataTable( {
22 "bScrollCollapse": true,
23 "bJQueryUI": <? echo $t_jqueryui ?>,
24 "bSort": true,
25 "sPaginationType": "full_numbers",
26 "oLanguage": {
27 "sProcessing": "Caricamento dati avcp...",
28 "sLengthMenu": "Visualizza _MENU_ voci",
29 "sZeroRecords": "Nessun risultato trovato.",
30 "sInfo": "Vista da _START_ a _END_ di _TOTAL_ voci",
31 "sInfoEmpty": "Vista da 0 a 0 di 0 voci",
32 "sInfoFiltered": "(filtrati da _MAX_ voci totali)",
33 "sInfoPostFix": "",
34 "sSearch": "Cerca:",
35 "sFirst": "Inizio",
36 "sPrevious": "Precedente",
37 "sNext": "Successivo",
38 "sLast": "Fine",
39 "oPaginate": {
40 "sFirst": "Inizio",
41 "sPrevious": "Precedente",
42 "sNext": "Successivo",
43 "sLast": "Fine",
44 "sDom": '<"H"Tfr>t<"F"ip>',
45 "sDom": 'T<"clear">lfrtip',
46 },
47 }
48 } );
49 } );
50
51 </script>
52
53 <!-- Qui inizia il codice per il rendering della tabella. Il parametro anno è passato dallo shortcode! -->
54
55 <table id="avcp_table" class="display">
56 <thead>
57 <tr>
58 <th>Oggetto</th>
59 <th>C.I.G.</th>
60 <th>Importo aggiudicazione</th>
61 <th>Partecipanti</th>
62 </tr>
63 </thead>
64 <tbody>
65
66 <!-- Avvio query -->
67 <?php if ($anno=="all") {
68 query_posts( array( 'post_type' => 'avcp', 'orderby' => date, 'order' => DESC, 'posts_per_page' => -1 ) );
69 echo '<h3>Elenco Bandi e appalti - Tutti gli Anni</h3>';
70 } else {
71 query_posts( array( 'post_type' => 'avcp', 'orderby' => date, 'order' => DESC, 'posts_per_page' => -1 , 'annirif' => $anno) );
72 echo '<h3>Elenco Bandi e appalti - Anno ' . $anno . '</h3>';
73 }
74 ?>
75 <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); global $post; ?>
76 <?php
77 $avcp_cig = get_post_meta($post->ID, 'avcp_cig', true);
78 $avcp_importo_aggiudicazione = get_post_meta($post->ID, 'avcp_aggiudicazione', true);
79 ?>
80 <tr>
81 <td><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></td>
82 <td><?php echo $avcp_cig; ?></td>
83 <td><?php echo '' . $avcp_importo_aggiudicazione; ?></td>
84 <td>
85 <?php
86 $get_avcp_dis_archivioditte = get_option('avcp_dis_archivioditte');
87 if ($get_avcp_dis_archivioditte == '1') {
88 echo strip_tags (
89 get_the_term_list( $post->ID, 'ditte', '', ' - ', '' )
90 );
91 } else {
92 echo get_the_term_list( $post->ID, 'ditte', '', ' - ', '' );
93 }
94 ?></td>
95 </tr>
96
97 <?php endwhile; else: ?>
98 <p>Errore query.</p>
99 <?php endif; ?>
100 <?php wp_reset_query(); ?>
101 </tbody>
102 </table>
103 <?php
104 $get_avcp_showxml = get_option('avcp_showxml');
105 if ($get_avcp_showxml == '1') {
106 echo '<div style="float:right;"><small><a href="' . get_site_url() . '/avcp" target="_blank" title="File .xml">Scarica i file annuali in formato .xml</a></small></div>';
107 }
108 $get_avcp_showlove = get_option('avcp_showlove');
109 if ($get_avcp_showlove == '1') {
110 echo '<small>Tabella generata con il plugin <a href="http://wordpress.org/plugins/avcp/" target="_blank" title="AVCP Wordpress Plugin">AVCP XML per Wordpress</a></small>';
111 }
112 ?>