GlisWeb framework
_variabili.php
Vai alla documentazione di questo file.
1 <?php
2 
14  // inclusione del framework
15  require '../../../_src/_config.php';
16 
17  // ordinamento degli array per la scrittura
18  rksort( $cf );
19  rksort( $ct );
20 
21  // output
22  $tx = NULL;
23  $tx .= '<html>';
24  $tx .= '<head></head>';
25  $tx .= '<body>';
26 
27  // nascondo le password
28  array_walk_recursive( $cf, function( &$v, $k ) { if( $k === 'password' || $k === 'private' || $k === 'key' || $k === 'secret' ) { $v = '***'; } } );
29 
30 /*
31  // array $cf
32  $tx .= '=== ARRAY CF ===' . PHP_EOL;
33  $tx .= print_r( $cf, true ) . PHP_EOL;
34 
35  // esito
36  $tx .= '=== ARRAY CT ===' . PHP_EOL;
37  $tx .= print_r( $ct, true ) . PHP_EOL;
38 */
39 
40  // array da stampare
42 
43  // scendo nell'array
44  if( isset( $_REQUEST['lvl'] ) && is_array( $_REQUEST['lvl'] ) ) {
45  foreach( $_REQUEST['lvl'] as $lvl ) {
46  if( isset( $print[ $lvl ] ) ) {
47  $print = $print[ $lvl ];
48  }
49  }
50  } else {
51  $_REQUEST['lvl'] = array();
52  }
53 
54  // stampa
55  if( empty( $print ) ) {
56  echo '(vuoto)';
57  } else {
58  foreach( array_keys( $print ) as $key ) {
59  $qs['lvl'] = array_merge( $_REQUEST['lvl'], array( $key ) );
60  if( is_array( $print[ $key ] ) ) {
61  $tx .= '<a href="?' . urlencode( http_build_query( $qs ) ) . '">' . $key . '</a><br/>';
62  } else {
63  $tx .= $key . ' → ' . ( ( empty( $print[ $key ] ) ) ? '(vuoto)' : $print[ $key ] ) . '<br/>';
64  }
65  }
66  }
67 
68  // output
69  $tx .= '</body>';
70  $tx .= '</html>';
71 
72  // output
73  buildHtml( $tx );
74 
75 ?>
if(isset( $cx['contatti'])) if(isset( $cf['site']['contatti'])) $ct['contatti']
Definition: _035.common.php:24
$tx
Definition: _variabili.php:22
$print
Definition: _variabili.php:41
rksort(&$array)
$cf['ricerca']['template']
Definition: _030.common.php:7
$_REQUEST['__view__'][ $ct['view']['id']]['__restrict__']['id_progetto']['EQ']