GlisWeb framework
_default.finally.php
Vai alla documentazione di questo file.
1 <?php
2 
17  // log
18  logWrite( "controller default/finally per ${t}/${a}", 'controller', LOG_DEBUG );
19 
20  // elaborazioni di default dei dati
21  switch( strtoupper( $a ) ) {
22 
23  case METHOD_POST:
24  case METHOD_PUT:
25  case METHOD_REPLACE:
26  case METHOD_UPDATE:
27 
28  // applicazione delle regole di attribuzione automatica
29  if( isset( $_SESSION['account']['id_gruppi_attribuzione'][ $t ] ) ) {
30 
31  // debug
32  // print_r( $_SESSION['account']['id_gruppi_attribuzione'][ $t ] );
33  // print_r( $d );
34 
35  // attribuzione automatica
36  // TODO anziché FULL di ufficio consentire di specificare permessi diversi
37  foreach( $_SESSION['account']['id_gruppi_attribuzione'][ $t ] as $aGrId ) {
38  $q = "REPLACE INTO __acl_${t}__ ( id_entita, id_gruppo, permesso ) VALUES ( ?, ?, 'FULL' )";
39  mysqlQuery( $c, $q, array( array( 's' => $d['id'] ), array( 's' => $aGrId ) ) );
40  }
41 
42  }
43 
44  break;
45 
46  }
47 
48 ?>
const METHOD_UPDATE
Definition: _config.php:285
logWrite( $m, $f='site', $l=LOG_NOTICE, $d=DIRECTORY_LOG, $t=CURRENT_LOG_LEVEL, $s=SITE_STATUS)
scrive un messaggio nei log del sito
Definition: _log.utils.php:48
const METHOD_REPLACE
Definition: _config.php:284
mysqlQuery( $c, $q, $p=false, &$e=array())
if(!empty($_REQUEST['id'])) $d
$a
Definition: _slack.php:21
const METHOD_POST
Definition: _config.php:282
if(isset( $_REQUEST['amazonCheckoutSessionId'])) $_SESSION['carrello']
const METHOD_PUT
Definition: _config.php:283