Пример #1
0
session_start("guardar_os");
if (isset($_GET["id"])) {
    $idteste = $_GET["id"];
} else {
    $idteste = "";
}
require_once '../banco_de_dados/bancoos.php';
require_once '../banco_de_dados/bancocliente.php';
require_once '../banco_de_dados/bancofuncionario.php';
require_once '../banco_de_dados/bancoitens.php';
require_once '../classes/cliente.php';
require_once '../classes/funcionario.php';
require_once '../classes/itens.php';
require_once '../classes/os.php';
$bo = new BancoOs();
$bc = new BancoCliente();
$bf = new BancoFuncionario();
$bi = new BancoItens();
$cl = new Cliente();
$fn = new Funcionario();
$it = new Itens();
$o = new Os();
if (isset($_SESSION["valorcarrinho"]) == null) {
    $valortotal = 0;
} else {
    $valortotal = $_SESSION["valorcarrinho"];
}
if (isset($_SESSION['conta']) == null) {
    $itens = 0;
} else {
    $itens = $_SESSION["conta"];
Пример #2
0
<?php

if (isset($_GET["id"])) {
    $id = $_GET["id"];
}
require_once '../banco_de_dados/bancocliente.php';
require_once '../classes/cliente.php';
$bc = new BancoCliente();
$cl = new Cliente();
$linha = $bc->buscarcliente($id);
$id = $linha["id"];
$nome = $linha["nome"];
$telefone = $linha["telefone"];
$cpf = $linha["cpf"];
$email = $linha["email"];
$endereco = $linha["endereco"];
if (isset($_POST['salvar'])) {
    $id = $_POST['id'];
    $nome = $_POST['nome'];
    $telefone = $_POST['telefone'];
    $cpf = $_POST['cpf'];
    $email = $_POST['email'];
    $endereco = $_POST['endereco'];
    $cl->setIdCliente($id);
    $cl->setNomeCliente($nome);
    $cl->setTelefoneCliente($telefone);
    $cl->setCpfCliente($cpf);
    $cl->setEmailCliente($email);
    $cl->setEnderecoCliente($endereco);
    $bc->editarcliente($cl);
    echo "<script type='text/javascript' language='javascript'> \n                 alert ('Cliente editado com sucesso!!');\n                 window.location.href='../telas/telacliente.php';\n                 </script>";
Пример #3
0
<?php

require_once '../banco_de_dados/bancocliente.php';
$bc = new BancoCliente();
$id = $_GET["id"];
$bc->apagarcliente($id);
echo "<script type='text/javascript' language='javascript'> \n                 alert ('Cliente apagado com sucesso!!');\n                 window.location.href='../telas/telacliente.php';\n                 </script>";
Пример #4
0
session_start();
if (!isset($_SESSION["usuarioatual"])) {
    header("Location: login.html");
    die;
}
require_once '../banco_de_dados/bancocliente.php';
require_once '../classes/cliente.php';
?>
<html>
 <head>
 <meta charset='UTF-8'>
 <title>Nome da empresa</title>
 <link rel='stylesheet' href='../css/os.css' />
 </head>
 <body>
  <a class='sair' href=login.html>Sair</a><br><br> 
<?php 
$bc = new BancoCliente();
$id = $_GET["id"];
$linha = $bc->buscarcliente($id);
$id = $linha["id"];
$nome = $linha["nome"];
$telefone = $linha["telefone"];
$cpf = $linha["cpf"];
$email = $linha["email"];
$endereco = $linha["endereco"];
echo " \n     <p class='versoli'>Nome: {$nome}<br><br>\n     Telefone: {$telefone}<br><br>\n     Cpf: {$cpf}<br><br>\n     Email: {$email}<br><br>\n     Endereço: {$endereco}</p>\n\n     <div id='btn'>\n      <a href='editarcliente.php?id={$id}'>Editar Cliente</a>\n     </div>";
?>
 </body>
</html>
Пример #5
0
<?php

require_once '../banco_de_dados/bancosolicitacao.php';
require_once '../banco_de_dados/bancocliente.php';
require_once '../classes/cliente.php';
$bd = new Bancosoli();
$bc = new BancoCliente();
$cl = new Cliente();
if (isset($_POST['salvar'])) {
    $nome = $_POST['nome'];
    $telefone = $_POST['telefone'];
    $cpf = $_POST['cpf'];
    $email = $_POST['email'];
    $endereco = $_POST['endereco'];
    $cl->setNomeCliente($nome);
    $cl->setTelefoneCliente($telefone);
    $cl->setCpfCliente($cpf);
    $cl->setEmailCliente($email);
    $cl->setEnderecoCliente($endereco);
    $bc->inserircliente($cl);
    echo "<script type='text/javascript' language='javascript'> \n                 alert ('Cliente cadastrado com sucesso!!');\n                 window.location.href='../telas/telacliente.php';\n                 </script>";
}
if (isset($_GET["id"])) {
    $id = $_GET["id"];
    $linha = $bd->buscar1($id);
    $id = $linha["id"];
    $nome = $linha["nome"];
    $telefone = $linha["telefone"];
    $endereco = $linha["endereco"];
    $email = $linha["email"];
    $descri = $linha["descri"];