<?php if (!isset($_SESSION)) {
  session_start();

}

$MM_authorizedUsers = "";
$MM_donotCheckaccess = "false";

function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  $isValid = False; 

  

  
  if (!empty($UserName)) { 
  
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && false) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}

$MM_restrictGoTo = "index2.php";

if (((!isset($_SESSION['MM_Username'])))) {  
  

?>
<script>window.location='index2.php'</script>

<?php 
} elseif(isset($_SESSION['fsenha']) && !strpos($_SERVER['PHP_SELF'], 'alterar_clientes') > 0){

  if($_SESSION['fsenha'] == 0){

    // print_r( $_SERVER); die();
    

    ?>
    <script>window.location='alterar_clientes.php?idcliente='+ <?php echo $_SESSION['id_usuario']; ?> ;</script>
    <?php

  }

};?>