Ejemplo n.º 1
0
    $_SESSION['NAME'] = $user_profile->getProperty('name');
    $_SESSION['FIRSTNAME'] = $user_profile->getProperty('first_name');
    $_SESSION['EMAIL'] = $user_profile->getProperty('email');
} else {
    //display login url
    $login_url = $helper->getLoginUrl(array('scope' => $required_scope));
    //echo "<meta http-equiv='refresh' content=1;url='index.php'>";
    //echo '<a href="'.$login_url.'">Login with Facebook</a>';
}
if (trim($_SESSION['url']) == "") {
    $url = "index.php";
} else {
    $url = $_SESSION['url'];
}
if (isset($_SESSION['logado'])) {
    $class->inserirClientes($_SESSION['NAME'], $_SESSION['FIRSTNAME'], $_SESSION['EMAIL'], "");
    echo "<meta http-equiv='refresh' content=1;url='{$url}'>";
    //echo $_SESSION['url'];
}
?>
<!DOCTYPE html>
<html>

    <head><meta http-equiv="Content-Type" content="text/html;" charset=iso-8859-1">

        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="">
        <title>Akipom</title>
        <!-- Bootstrap Core CSS -->
Ejemplo n.º 2
0
session_start();
require_once 'conexao.php';
$class = new Funcoes();
if (isset($_GET['acao'])) {
    $id = $_GET['codigo'];
    echo $class->excluirClientes($id);
    echo "<meta http-equiv='refresh' content=3;url='login.php'>";
} else {
    $nome = $_POST['nome'];
    $sobrenome = $_POST['sobrenome'];
    $email = $_POST['email'];
    $senha = md5($_POST['senha']);
    $action = $_POST['action'];
    if ($action == "add") {
        $class->inserirClientes($nome, $sobrenome, $email, $senha);
        //echo"<meta http-equiv='refresh' content=3;url='../login.php'>";
    }
    if ($action == "edit") {
        $id = $_POST['id'];
        echo $class->alterarClientes($id, $nome, $sobrenome, $email, $senha);
        echo "<meta http-equiv='refresh' content=3;url='cidade.php'>";
    }
    if (isset($_GET['acao'])) {
        echo $class->excluirClientes($id);
        echo "<meta http-equiv='refresh' content=3;url='cidade.php'>";
    }
}
?>