PluginProbe
ANAC XML Bandi di Gara / 2.3
ANAC XML Bandi di Gara v2.3
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 / valid_check.php

valid_check.php in ANAC XML Bandi di Gara 2.3, at valid_check.php

21 lines 793 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 function avcp_valid_check() {
3 // Enable user error handling
4 libxml_use_internal_errors(true);
5
6 $terms = get_terms( 'annirif', array('hide_empty' => 0) );
7 foreach ( $terms as $term ) {
8 $xml = new DOMDocument();
9 $xml->load(get_site_url() . '/avcp/' . $term->name. '.xml');
10 if (!$xml->schemaValidate(get_site_url() . '/wp-content/plugins/avcp/includes/datasetAppaltiL190.xsd')) {
11 $errori .= $term->name . ' ';
12 }
13 }
14 if ($errori) {
15 update_option('avcp_invalid', '1');
16 echo '<div class="error"><p>AVCP | I seguenti file .xml presentano errori: ' . $errori . '</p><p><a href="' . admin_url() . 'edit.php?post_type=avcp&page=avcp_v_dataset">Clicca qui vedere i dettagli degli errori</a></div>';
17 } else {
18 update_option('avcp_invalid', '0');
19 }
20 }
21 ?>