initial commit
This commit is contained in:
46
rels/index.php
Normal file
46
rels/index.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
if(session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include('../conexao.php');
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Relatórios</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='left'>
|
||||
</section>
|
||||
<section class='center'>
|
||||
<h1>Relatórios</h1>
|
||||
<p>Selecione um dos botões abaixo para ver um relatório.</p>
|
||||
<a class='button' href="rel_prestador.php">Relatório Prestadores</a>
|
||||
<a class='button' href="rel_cliente.php">Relatório Clientes</a>
|
||||
<a class='button' href="rel_prestador_servico.php">Relatório Serviços</a>
|
||||
<p>Selecione um dos botões abaixo para acessar uma pesquisa.</p>
|
||||
<a class='button' href="pes_cliente.php">Pesquisar Clientes</a>
|
||||
<a class='button' href="pes_servico.php">Pesquisar Serviço por Categoria</a>
|
||||
<a class='button' href="pes_orcamento_cliente.php">Pesquisar Orçamento por Cliente</a>
|
||||
<a class='button' href="pes_orcamento_data.php">Pesquisar Orçamento por Data</a>
|
||||
<a class='button' href="pes_prestadores_cli.php">Pesquisar Prestadores</a>
|
||||
<a class='button' href="pes_servicos_cli.php">Pesquisar Serviços</a>
|
||||
<?php if(isset($_SESSION['tipo'])){
|
||||
if(strcmp($_SESSION['tipo'],'adm')==0){?>
|
||||
<p>Para administradores:</p>
|
||||
<a class='button' href='rel_cliente_adm.php'>Relatório de Clientes e Usuários</a>
|
||||
<a class='button' href='pes_usuarios.php'>Pesquisa de Usuários</a>
|
||||
<?php } } ?>
|
||||
</section>
|
||||
<section class='right'>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
68
rels/pes_cliente.php
Normal file
68
rels/pes_cliente.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include("../conexao.php");
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Relatório prestador</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<h1>Clientes</h1>
|
||||
<h1>Pesquisar Clientes</h1>
|
||||
<form method="POST" action="">
|
||||
<label>Cliente: </label>
|
||||
<input type="text" name="nome" placeholder="Digite o nome do cliente:" size="30"><br><br>
|
||||
<input type="submit" class='buttons' name="SendPesqUser" value="Pesquisar">
|
||||
</form><br><br>
|
||||
|
||||
<?php
|
||||
$SendPesqUser = filter_input(INPUT_POST, 'SendPesqUser', FILTER_SANITIZE_STRING);
|
||||
if($SendPesqUser){
|
||||
$nome = filter_input(INPUT_POST, 'nome', FILTER_SANITIZE_STRING);
|
||||
$nome = '%'.$nome.'%';
|
||||
$query = "SELECT * FROM tbclientes WHERE nome LIKE ?";
|
||||
$stmt = $con->prepare($query);
|
||||
$stmt->bind_param('s',$nome);
|
||||
if($stmt->execute())
|
||||
{
|
||||
$row = $stmt->get_result();
|
||||
echo "<h2> Resultado(s) para ".trim($nome,"%").": </h2>";
|
||||
while($res = $row->fetch_assoc())
|
||||
{
|
||||
if(strcmp($res['nome'],'Administrador') != 0)
|
||||
{
|
||||
echo "<h2>N°: ".$res['id']."<br>Cliente: ".$res['nome']."<br></h2>";
|
||||
echo "<h3>Detalhes de Endereço</h3>";
|
||||
echo "Endereço: ".$res['endereco']."<br>";
|
||||
echo "Bairro: ".$res['bairro']."<br>";
|
||||
echo "Cidade: ".$res['cidade']."<br>";
|
||||
echo "Estado: ".$res['estado']."<br>";
|
||||
echo "CEP: ".$res['cep']."<br>";
|
||||
echo "<h3>Informações Pessoais</h3>";
|
||||
echo "Email: ".$res['email']."<br>";
|
||||
echo "CPF/CNPJ: ".$res['cpf_cnpj']."<br>";
|
||||
echo "RG: ".$res['rg']."<br>";
|
||||
echo "Telefone: ".$res['telefone']."<br>";
|
||||
echo "Celular: ".$res['celular']."<br>";
|
||||
echo "<hr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
49
rels/pes_orcamento_cliente.php
Normal file
49
rels/pes_orcamento_cliente.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include("../conexao.php");
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Pesquisar Orçamento por Cliente</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<h1>Pesquisar Orçamento por cliente</h1>
|
||||
<form method="POST" action="">
|
||||
<label>Cliente: </label>
|
||||
<input type="text" name="nome" placeholder="Digite o cliente do orçamento" size="30"><br><br>
|
||||
<input type="submit" class='buttons' name="SendPesqUser" value="Pesquisar">
|
||||
</form><br><br>
|
||||
|
||||
<?php
|
||||
$SendPesqUser = filter_input(INPUT_POST, 'SendPesqUser', FILTER_SANITIZE_STRING);
|
||||
if($SendPesqUser){
|
||||
$nome = filter_input(INPUT_POST, 'nome', FILTER_SANITIZE_STRING);
|
||||
$query = "SELECT * FROM consulta_orcamentos WHERE cliente like '%$nome%'";
|
||||
$resultado = mysqli_query($con, $query);
|
||||
while($row = mysqli_fetch_assoc($resultado)){
|
||||
echo "<h2>Orçamento N°: ".$row['orcamento']."<br>Cliente: ".$row['cliente']."<br></h2>";
|
||||
echo "Data Abertura: " . $row['data'] . "<br>";
|
||||
echo "Valor: " . $row['valor'] . "<br>";
|
||||
echo "Prestador: " . $row['prestador'] . "<br>";
|
||||
echo "Data de Expiração: " . $row['data_expiracao'] . "<br>";
|
||||
echo "Serviço: " . $row['servico'] . "<br>";
|
||||
echo "Observação: " . $row['observacao'] . "<br><hr>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
60
rels/pes_orcamento_data.php
Normal file
60
rels/pes_orcamento_data.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include("../conexao.php");
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Pesquisar Orçamento por Data</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<h1>Pesquisar Orçamento por Data</h1>
|
||||
<form method="POST" action="">
|
||||
<label>Pesquisar por data de expiração?</label>
|
||||
<input type="checkbox" name="dataEntrega"><br><br>
|
||||
<label>Data Inicio: </label>
|
||||
<input type="date" name="inicio"><br><br>
|
||||
<label>Data Final: </label>
|
||||
<input type="date" name="final"><br><br>
|
||||
<input type="submit" class='buttons' name="SendPesqUser" value="Pesquisar">
|
||||
</form><br><br>
|
||||
|
||||
<?php
|
||||
$SendPesqUser = filter_input(INPUT_POST, 'SendPesqUser', FILTER_SANITIZE_STRING);
|
||||
$PesquisaTipo = filter_input(INPUT_POST,'dataEntrega',FILTER_VALIDATE_BOOLEAN);
|
||||
if($SendPesqUser){
|
||||
$inicio = filter_input(INPUT_POST, 'inicio', FILTER_SANITIZE_STRING);
|
||||
$final = filter_input(INPUT_POST, 'final', FILTER_SANITIZE_STRING);
|
||||
$query = "SELECT * FROM consulta_orcamentos WHERE data BETWEEN '$inicio' AND '$final'";
|
||||
|
||||
if($PesquisaTipo === true)
|
||||
$query = "SELECT * FROM consulta_orcamentos WHERE data_expiracao BETWEEN '$inicio' AND '$final'";
|
||||
|
||||
$resultado = mysqli_query($con, $query);
|
||||
echo "<h2> Resultados: </h2>";
|
||||
while($row = mysqli_fetch_assoc($resultado)){
|
||||
echo "<h2>Orçamento N°: ".$row['orcamento']."<br>Data Início: ".$row['data']."<br></h2>";
|
||||
echo "Valor: " . $row['valor'] . "<br>";
|
||||
echo "Prestador: " . $row['prestador'] . "<br>";
|
||||
echo "Data de expiração: " . $row['data_expiracao'] . "<br>";
|
||||
echo "Cliente: " . $row['cliente'] . "<br>";
|
||||
echo "Serviço: " . $row['servico'] . "<br>";
|
||||
echo "Observação: " . $row['observacao'] . "<br><hr>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
50
rels/pes_orcamento_prestador.php
Normal file
50
rels/pes_orcamento_prestador.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include("../conexao.php");
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Pesquisar Orçamento por Prestador</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<h1>Pesquisar Orçamento por prestador</h1>
|
||||
<form method="POST" action="">
|
||||
<label>Prestador: </label>
|
||||
<input type="text" name="nome" placeholder="Digite o prestador do orçamento" size="30"><br><br>
|
||||
<input type="submit" class='buttons' name="SendPesqUser" value="Pesquisar">
|
||||
</form><br><br>
|
||||
|
||||
<?php
|
||||
$SendPesqUser = filter_input(INPUT_POST, 'SendPesqUser', FILTER_SANITIZE_STRING);
|
||||
if($SendPesqUser){
|
||||
$nome = filter_input(INPUT_POST, 'nome', FILTER_SANITIZE_STRING);
|
||||
$query = "SELECT * FROM consulta_orcamentos WHERE prestador like '%$nome%'";
|
||||
$resultado = mysqli_query($con, $query);
|
||||
while($row = mysqli_fetch_assoc($resultado)){
|
||||
echo "ID:" . $row['orcamento'] . "<br>";
|
||||
echo "Data inicio: " . $row['data'] . "<br>";
|
||||
echo "Valor: " . $row['valor'] . "<br>";
|
||||
echo "Prestador: " . $row['prestador'] . "<br>";
|
||||
echo "Data de expiração: " . $row['data_expiracao'] . "<br>";
|
||||
echo "Cliente: " . $row['cliente'] . "<br>";
|
||||
echo "Serviço: " . $row['servico'] . "<br>";
|
||||
echo "Observação: " . $row['observacao'] . "<br><hr>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
47
rels/pes_prestadores_cli.php
Normal file
47
rels/pes_prestadores_cli.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include("../conexao.php");
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Pesquisar Prestador</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<h1>Pesquisar Prestador</h1>
|
||||
<form method="POST" action="">
|
||||
<label>Prestador: </label>
|
||||
<input type="text" name="nome" placeholder="Digite um prestador" size="30"><br><br>
|
||||
<input type="submit" class='buttons' name="SendPesqUser" value="Pesquisar">
|
||||
</form><br><br>
|
||||
|
||||
<?php
|
||||
$SendPesqUser = filter_input(INPUT_POST, 'SendPesqUser', FILTER_SANITIZE_STRING);
|
||||
if($SendPesqUser){
|
||||
$nome = filter_input(INPUT_POST, 'nome', FILTER_SANITIZE_STRING);
|
||||
$query = "SELECT * FROM consulta_prestador_servico WHERE prestador like '%$nome%'";
|
||||
$resultado = mysqli_query($con, $query);
|
||||
while($row = mysqli_fetch_assoc($resultado)){
|
||||
echo "ID do prestador:" . $row['id_prestador'] . "<br>";
|
||||
echo "Prestador:" . $row['prestador'] . "<br>";
|
||||
echo "ID do serviço: " . $row['id_servico'] . "<br>";
|
||||
echo "Serviço:" . $row['servico'] . "<br>";
|
||||
echo "Categoria: " . $row['categoria'] . "<br><hr>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
45
rels/pes_servico.php
Normal file
45
rels/pes_servico.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include("../conexao.php");
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Pesquisar Serviço por Categoria</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<h1>Pesquisar Serviço por Categoria</h1>
|
||||
<form method="POST" action="">
|
||||
<label>Categoria: </label>
|
||||
<input type="text" name="nome" placeholder="Digite a categoria" size="30"><br><br>
|
||||
<input type="submit" class='buttons' name="SendPesqUser" value="Pesquisar">
|
||||
</form><br><br>
|
||||
|
||||
<?php
|
||||
$SendPesqUser = filter_input(INPUT_POST, 'SendPesqUser', FILTER_SANITIZE_STRING);
|
||||
if($SendPesqUser){
|
||||
$nome = filter_input(INPUT_POST, 'nome', FILTER_SANITIZE_STRING);
|
||||
$query = "SELECT * FROM consulta_servicos WHERE categoria like '%$nome%'";
|
||||
$resultado = mysqli_query($con, $query);
|
||||
while($row = mysqli_fetch_assoc($resultado)){
|
||||
echo "ID:" . $row['servico'] . "<br>";
|
||||
echo "Serviço: " . $row['descricao'] . "<br>";
|
||||
echo "Categoria: " . $row['categoria'] . "<br><hr>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
45
rels/pes_servicos_cli.php
Normal file
45
rels/pes_servicos_cli.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include("../conexao.php");
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Pesquisar Serviço</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<h1>Pesquisar Serviço</h1>
|
||||
<form method="POST" action="">
|
||||
<label>Serviço: </label>
|
||||
<input type="text" name="nome" placeholder="Digite um serviço" size="30"><br><br>
|
||||
<input type="submit" class='buttons' name="SendPesqUser" value="Pesquisar">
|
||||
</form><br><br>
|
||||
|
||||
<?php
|
||||
$SendPesqUser = filter_input(INPUT_POST, 'SendPesqUser', FILTER_SANITIZE_STRING);
|
||||
if($SendPesqUser){
|
||||
$nome = filter_input(INPUT_POST, 'nome', FILTER_SANITIZE_STRING);
|
||||
$query = "SELECT * FROM consulta_servicos WHERE descricao like '%$nome%'";
|
||||
$resultado = mysqli_query($con, $query);
|
||||
while($row = mysqli_fetch_assoc($resultado)){
|
||||
echo "ID:" . $row['servico'] . "<br>";
|
||||
echo "Serviço: " . $row['descricao'] . "<br>";
|
||||
echo "Categoria: " . $row['categoria'] . "<br><hr>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
63
rels/pes_usuarios.php
Normal file
63
rels/pes_usuarios.php
Normal file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include("../conexao.php");
|
||||
adm_auth();
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Pesquisar Usuários por Nome</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<h1>Pesquisar Usuários</h1>
|
||||
<form method="POST" action="">
|
||||
<label>Cliente: </label>
|
||||
<input type="text" name="nome" placeholder="Digite o nome do cliente:" size="30"><br><br>
|
||||
<input type="submit" class='buttons' name="SendPesqUser" value="Pesquisar">
|
||||
</form><br><br>
|
||||
|
||||
<?php
|
||||
$SendPesqUser = filter_input(INPUT_POST, 'SendPesqUser', FILTER_SANITIZE_STRING);
|
||||
if($SendPesqUser){
|
||||
$nome = filter_input(INPUT_POST, 'nome', FILTER_SANITIZE_STRING);
|
||||
$nome = '%'.$nome.'%';
|
||||
$query = "SELECT * FROM consulta_usuarios WHERE nome_usuario LIKE ?";
|
||||
$stmt = $con->prepare($query);
|
||||
$stmt->bind_param('s',$nome);
|
||||
if($stmt->execute())
|
||||
{
|
||||
$row = $stmt->get_result();
|
||||
echo "<h2>".$row->num_rows." Resultado(s) para ".trim($nome,"%").": </h2>";
|
||||
$tipo = 'Erro!';
|
||||
while($res = $row->fetch_assoc())
|
||||
{
|
||||
if(strcmp($res['tipo_usuario'],'adm') == 0)
|
||||
{
|
||||
$tipo = 'Administrador';
|
||||
}
|
||||
else if(strcmp($res['tipo_usuario'],'com') == 0)
|
||||
{
|
||||
$tipo = 'Comum';
|
||||
}
|
||||
echo "<h2>N°: ".$res['login_id']."<br>Cliente: ".$res['nome_usuario'].", ".$tipo."<br></h2>";
|
||||
echo "<h3>Usuário: ".$res['usuario']."<br></h3>";
|
||||
echo "<hr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
48
rels/rel_cliente.php
Normal file
48
rels/rel_cliente.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include("../conexao.php");
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Relatório prestador</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<h1>Clientes</h1>
|
||||
<?php
|
||||
$sql= "SELECT * FROM tbclientes";
|
||||
$resultado = mysqli_query($con,$sql) or die("Erro ao retornar dados");
|
||||
|
||||
while ($registro = mysqli_fetch_array($resultado)){
|
||||
echo "<h2>N°: ".$registro['id']."<br>Cliente: ".$registro['nome']."<br></h2>";
|
||||
echo "<h3>Detalhes de Endereço</h3>";
|
||||
echo "Endereço: ".$registro['endereco']."<br>";
|
||||
echo "Bairro: ".$registro['bairro']."<br>";
|
||||
echo "Cidade: ".$registro['cidade']."<br>";
|
||||
echo "Estado: ".$registro['estado']."<br>";
|
||||
echo "CEP: ".$registro['cep']."<br>";
|
||||
echo "<h3>Informações Pessoais</h3>";
|
||||
echo "Email: ".$registro['email']."<br>";
|
||||
echo "CPF/CNPJ: ".$registro['cpf_cnpj']."<br>";
|
||||
echo "RG: ".$registro['rg']."<br>";
|
||||
echo "Telefone: ".$registro['telefone']."<br>";
|
||||
echo "Celular: ".$registro['celular']."<br>";
|
||||
echo "<hr>";
|
||||
}
|
||||
mysqli_close($con);
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
47
rels/rel_cliente_adm.php
Normal file
47
rels/rel_cliente_adm.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include("../conexao.php");
|
||||
adm_auth();
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Relatório prestador</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<h1>Usuários</h1>
|
||||
<?php
|
||||
$sql= "SELECT * FROM consulta_usuarios";
|
||||
$resultado = mysqli_query($con,$sql) or die("Erro ao retornar dados");
|
||||
|
||||
while ($registro = mysqli_fetch_array($resultado)){
|
||||
$tipo = 'Erro!';
|
||||
if(strcmp($registro['tipo_usuario'],'adm') == 0)
|
||||
{
|
||||
$tipo = 'Administrador';
|
||||
}
|
||||
else if(strcmp($registro['tipo_usuario'],'com') == 0)
|
||||
{
|
||||
$tipo = 'Comum';
|
||||
}
|
||||
echo "<h2>N°: ".$registro['login_id']."<br>Cliente: ".$registro['nome_usuario'].", ".$tipo."<br></h2>";
|
||||
echo "<h3>Usuário: ".$registro['usuario']."<br></h3>";
|
||||
echo "<hr>";
|
||||
}
|
||||
mysqli_close($con);
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
36
rels/rel_prestador.php
Normal file
36
rels/rel_prestador.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include("../conexao.php");
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Relatório prestador</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<h1>Prestadores</h1>
|
||||
<?php
|
||||
$sql= "SELECT * FROM consulta_prestador_servico";
|
||||
$resultado = mysqli_query($con,$sql) or die("Erro ao retornar dados");
|
||||
|
||||
while ($registro = mysqli_fetch_array($resultado)){
|
||||
echo "<h2>Prestador: ".$registro['prestador']."<br></h2>";
|
||||
echo "ID do prestador: ".$registro['id_prestador']."<br><hr>";
|
||||
}
|
||||
mysqli_close($con);
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
38
rels/rel_prestador_servico.php
Normal file
38
rels/rel_prestador_servico.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
if (session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include("../conexao.php");
|
||||
include('../menu.php');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Relatório prestador</title>
|
||||
<link rel="stylesheet" href="../css/menu.css">
|
||||
<link rel="stylesheet" href="../css/article.css">
|
||||
<link rel="stylesheet" href="../css/input.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $nav; ?>
|
||||
<article>
|
||||
<section class='center'>
|
||||
<h1>Prestadores</h1>
|
||||
<?php
|
||||
$sql= "SELECT * FROM consulta_prestador_servico";
|
||||
$resultado = mysqli_query($con,$sql) or die("Erro ao retornar dados");
|
||||
|
||||
while ($registro = mysqli_fetch_array($resultado)){
|
||||
echo "<h2>Serviço: ".$registro['servico']."</h2>";
|
||||
echo "<h1>ID do serviço: ".$registro['id_servico']."</h1>";
|
||||
echo "Prestador: ".$registro['prestador']."<br>";
|
||||
echo "Categoria: ".$registro['categoria']."<br><hr>";
|
||||
}
|
||||
mysqli_close($con);
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
<?php echo $footer; ?>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user