GlisWeb framework
_autenticazione.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  // nascondo le password
22  array_walk_recursive( $cf['auth'], function( &$v, $k ) { if( $k === 'password' || $k === 'private' || $k === 'key' ) { $v = '***'; } } );
23 
24  // test
25  if( empty( $_SESSION['account']['user'] ) ) {
26  $tx = '<h1>login</h1>'
27  . '<form action="" method="post">'
28  . '<div><input type="text" name="__login__[user]" /></div>'
29  . '<div><input type="password" name="__login__[pasw]" /></div>'
30  . '<div><input type="submit" /></div>'
31  . '</form>';
32  } else {
33  $tx = '<h1>logout</h1>'
34  . '<form action="" method="post">'
35  . '<input type="hidden" name="__logout__" value="1" />'
36  . '<div><input type="submit" /></div>'
37  . '</form>';
38  }
39 
40  // array $_SESSION
41  $tx .= '<h2>array $ct[\'session\']</h2>';
42  $tx .= '<pre>' . print_r( $ct['session'], true ) . '</pre>';
43 
44  // array $cf
45  $tx .= '<h2>array $cf[\'auth\']</h2>';
46  $tx .= '<pre>' . print_r( $cf['auth'], true ) . '</pre>';
47 
48  // output
49  buildHTML( $tx );
50 
51 ?>
if(isset( $cx['contatti'])) if(isset( $cf['site']['contatti'])) $ct['contatti']
Definition: _035.common.php:24
rksort(&$array)
$cf['ricerca']['template']
Definition: _030.common.php:7
buildHTML( $content, $encoding=ENCODING_UTF8, $headers=array())
if(isset( $_REQUEST['amazonCheckoutSessionId'])) $_SESSION['carrello']