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
← All changes | settings.php +61 -38 2.13 View file →
@@ -23,9 +23,9 @@
23 23 // non-admin enqueues, actions, and filters
24 24 }
25 25
26 26 function avcp_reg_settings() {
27 - register_setting( 'avcp_options', 'avcp_version_number'); update_option( 'avcp_version_number', '2.1' );
27 + register_setting( 'avcp_options', 'avcp_version_number'); update_option( 'avcp_version_number', '3.0' );
28 28 register_setting( 'avcp_options', 'avcp_denominazione_ente');
29 29 register_setting( 'avcp_options', 'avcp_codicefiscale_ente');
30 30 register_setting( 'avcp_options', 'avcp_autopublish');
31 31 register_setting( 'avcp_options', 'avcp_dis_archivioditte');
@@ -32,8 +32,10 @@
32 32 register_setting( 'avcp_options', 'avcp_dis_archivioanni');
33 33 register_setting( 'avcp_options', 'avcp_tab_jqueryui');
34 34 register_setting( 'avcp_options', 'avcp_showxml');
35 35 register_setting( 'avcp_options', 'avcp_showlove');
36 + register_setting( 'avcp_options', 'avcp_invalid');
37 + register_setting( 'avcp_options', 'avcp_abilita_ruoli');
36 38 }
37 39
38 40 function avcp_setting_menu()
39 41 {
@@ -103,8 +105,13 @@
103 105 update_option('avcp_showlove', '1');
104 106 } else {
105 107 update_option('avcp_showlove', '0');
106 108 }
109 + if (isset($_POST['avcp_abilita_ruoli_n'])){
110 + update_option('avcp_abilita_ruoli', '1');
111 + } else {
112 + update_option('avcp_abilita_ruoli', '0');
113 + }
107 114 }
108 115
109 116 echo '<div class="wrap">';
110 117 screen_icon();
@@ -165,45 +172,51 @@
165 172
166 173 $urlcheck = get_site_url() . '/avcp/index.php';
167 174
168 175 $agent = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; pt-pt) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27";
169 -
170 - // initializes curl session
171 - $ch=curl_init();
172 -
173 - // sets the URL to fetch
174 - curl_setopt ($ch, CURLOPT_URL,$urlcheck );
175 -
176 - // sets the content of the User-Agent header
177 - curl_setopt($ch, CURLOPT_USERAGENT, $agent);
178 -
179 - // return the transfer as a string
180 - curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
181 -
182 - // disable output verbose information
183 - curl_setopt ($ch,CURLOPT_VERBOSE,false);
184 -
185 - // max number of seconds to allow cURL function to execute
186 - curl_setopt($ch, CURLOPT_TIMEOUT, 5);
187 -
188 - curl_exec($ch);
189 -
190 - // get HTTP response code
191 - $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
192 -
193 - curl_close($ch);
194 -
195 - if($httpcode==200) {
196 - echo 'Test Accesso pubblico /avcp<font style="color:green;font-weight:bold;"> ==> OK [200]</font>';
197 - } else if($httpcode==500) {
198 - echo 'Test Accesso pubblico /avcp<font style="color:red;font-weight:bold;"> ==> ERRORE 500 ISE</font>';
199 - $headers = get_headers($urlcheck);
200 - echo ' - ' . $headers[0];
201 - $system_ok = false;
176 +
177 + if(is_callable('curl_init')){
178 +
179 + // initializes curl session
180 + $ch=curl_init();
181 +
182 + // sets the URL to fetch
183 + curl_setopt ($ch, CURLOPT_URL,$urlcheck );
184 +
185 + // sets the content of the User-Agent header
186 + curl_setopt($ch, CURLOPT_USERAGENT, $agent);
187 +
188 + // return the transfer as a string
189 + curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
190 +
191 + // disable output verbose information
192 + curl_setopt ($ch,CURLOPT_VERBOSE,false);
193 +
194 + // max number of seconds to allow cURL function to execute
195 + curl_setopt($ch, CURLOPT_TIMEOUT, 5);
196 +
197 + curl_exec($ch);
198 +
199 + // get HTTP response code
200 + $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
201 +
202 + curl_close($ch);
203 +
204 + if($httpcode==200) {
205 + echo 'Test Accesso pubblico /avcp<font style="color:green;font-weight:bold;"> ==> OK [200]</font>';
206 + } else if($httpcode==500) {
207 + echo 'Test Accesso pubblico /avcp<font style="color:red;font-weight:bold;"> ==> ERRORE 500 ISE</font>';
208 + $headers = get_headers($urlcheck);
209 + echo ' - ' . $headers[0];
210 + $system_ok = false;
211 + } else {
212 + echo 'Test Accesso pubblico /avcp<font style="color:red;font-weight:bold;"> ==> ERRORE ' . $httpcode . '</font>';
213 + $headers = get_headers($urlcheck);
214 + echo ' - ' . $headers[0];
215 + $system_ok = false;
216 + }
202 217 } else {
203 - echo 'Test Accesso pubblico /avcp<font style="color:red;font-weight:bold;"> ==> ERRORE ' . $httpcode . '</font>';
204 - $headers = get_headers($urlcheck);
205 - echo ' - ' . $headers[0];
218 + echo 'Test Accesso pubblico /avcp<font style="color:red;font-weight:bold;"> ==> CURL_INIT MANCANTE</font>';
206 219 $system_ok = false;
207 220 }
208 221
209 222
@@ -260,9 +273,9 @@
260 273 </div></div>';
261 274
262 275 echo '
263 276 <div class="postbox" id="second">
264 - <h3 class="hndle"><span>Impostazioni Tabella</span></h3>
277 + <h3 class="hndle"><span>Impostazioni Varie</span></h3>
265 278 <div class="inside">
266 279
267 280 <table class="form-table"><tbody>';
268 281
@@ -273,8 +286,18 @@
273 286 if ($get_avcp_tab_jqueryui == '1') {
274 287 echo 'checked="checked" ';
275 288 }
276 289 echo '><span class="description">Spunta questa casella se vuoi abilitare il tema jQueryUI Themeroller per la tabella</span></td>';
290 + echo '</tr>';
291 +
292 + echo '<tr>';
293 + echo '<th><label>Ruoli & Permessi</label></th>';
294 + echo '<td><input type="checkbox" name="avcp_abilita_ruoli_n" ';
295 + $get_avcp_abilita_ruoli = get_option('avcp_abilita_ruoli');
296 + if ($get_avcp_abilita_ruoli == '1') {
297 + echo 'checked="checked" ';
298 + }
299 + echo '><span class="description">Le voci di AVCP ereditano i permessi di pubblicazione/modifica/eliminazione degli articoli. Se vuoi avere un maggior controllo abilita questa opzione e segui <a href="http://supporto.marcomilesi.ml/?p=571" target="_blank" title="Istruzioni per la configurazione di Ruoli & Permessi">questo tutorial</span></td>';
277 300 echo '</tr>';
278 301
279 302 echo '<tr>';
280 303 echo '<th><label>Mostra Link XML</label></th>';