<?php  
if( isset( $_GET['status'] ) ){
$id = (int)getGet('id');
$tabela_final = getGet('tabela');
$controle_final = getGet('controle');

// Controlando acesso
if($tabela_final == "usuarios" && $id == 1 or $id == 2){$aut = "nao";}else{$aut = "sim";}

    $acesso_bd = "ok"; include('../../fncr-geral/coneccao-bd.php'); $bd = new Coneccao();

    $sql_atualizando = "UPDATE $tabela_final SET $controle_final = ".getGet('status')." WHERE id = ".$id;

    $sql_controle = $bd->getConexao()->prepare($sql_atualizando);
    if ($sql_controle->execute()) ;

    $bd = null; $bd_fn = null;

}
function getGet( $key ){return isset( $_GET[ $key ] ) ? filter( $_GET[ $key ] ) : null;}
function filter( $str ){return $str;} 
?>