Skip to content

Instantly share code, notes, and snippets.

@iamlucianojr
Created October 30, 2014 22:42
Show Gist options
  • Save iamlucianojr/0f0800b1b95f47e9429b to your computer and use it in GitHub Desktop.
Save iamlucianojr/0f0800b1b95f47e9429b to your computer and use it in GitHub Desktop.
<?php
$sql = "SELECT * FROM bsw_usuario WHERE ds_login = '".$_SESSION['ses_login']."' AND ds_senha = '".$_SESSION['ses_senha']."'";
$db->query('Usuario', $sql);
$numRow = $db->num_rows('Usuario');
if($numRow == 0) echo "<script>top.location.replace('../_logoff/');</script>";
/** Qual exatamente o motivo dessa implementação? **/
if(!$_SESSION['ses_permissao'][$PASTALOCALBSW]) header('Location: ../' );
if($rsValidaINC[$PASTALOCALBSW] == 'N') header('Location: ../' );
/** _inc/inc.config.php **/
//*
// CONFIGURAÇÕES DE PERMISSÃO DO ADM
//*
//$PASTALOCALBSW = explode('\\',getcwd()); // LOCAL OU SERVER WINDOWS
$PASTALOCALBSW = explode('/',getcwd()); // SERVER LINUX
$PASTALOCALBSW = $PASTALOCALBSW[count($PASTALOCALBSW)-1];
//*
// FIM - CONFIGURAÇÕES DE PERMISSAO DO ADM
//*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment