Пример #1
0
<?php

if ($_SESSION['logado'] != 'sim') {
    header('Location:index.php');
}
include "cls/clientesClass.php";
$cliente = new clientesClass();
$cliente->mostrar();
$active = 'clientes';
?>
<!DOCTYPE html>
<html>
<head>
	<title>Novo Cliente</title>
</head>
<body>
<form class="form-horizontal" method = POST action = 'processarCadastro.php'>
<fieldset>

<!-- Form Name -->
<legend align = "center">Cadastrar Cliente</legend>

<!-- Text input-->
<div class="form-group">
  <label class="col-md-4 control-label" for="textinput">Nome</label>  
  <div class="col-md-2">
  <input id="nome" name="nome" type="text" placeholder="Digite o Nome do Cliente" class="form-control input-md" required="">
    
  </div>
</div>
<?php

if ($_SESSION['logado'] != 'sim') {
    header('Location:index.php');
}
include "cls/clientesClass.php";
$cliente = new clientesClass();
$cliente->cadastrar($_POST['nome'], $_POST['endereco'], $_POST['telefone'], $_POST['tipoCliente'], $_POST['email'], $_POST['cpf_cnpj']);
header('Location:principal.php?m=x');
Пример #3
0
<?php

require_once 'cls/clientesClass.php';
$cli = new clientesClass();
$cli->buscarUm($_GET['id']);
$cliente = mysql_fetch_array($cli->getconsulta());
?>

<form class="form-horizontal" method = POST action = 'processarAtualizarClientes.php'>
<fieldset>

<!-- Form Name -->
<legend align = "center">Atualizar Cliente</legend>
<input type = hidden name = id value = <?php 
echo $cliente['idCliente'];
?>
>
<!-- Text input-->
<div class="form-group">
  <label class="col-md-4 control-label" for="textinput">Nome</label>  
  <div class="col-md-2">
  <input id="nome" name="nome" type="text" value = "<?php 
echo $cliente['nome'];
?>
" class="form-control input-md" required="">
    
  </div>
</div>

<!-- Text input-->
<div class="form-group">
Пример #4
0
<?php

if ($_SESSION['logado'] != 'sim') {
    header('Location:index.php');
}
require_once "cls/clientesClass.php";
$cliente = new clientesClass();
$cliente->mostrar();
if (isset($_GET['id'])) {
    $cliente = new clientesClass();
    $cliente->deletar($_GET['id']);
}
header('Location:principal.php?m=x');
<?php

if ($_SESSION['logado'] != 'sim') {
    header('Location:index.php');
}
require_once 'cls/clientesClass.php';
$cliente = new clientesClass();
$cliente->editarCliente($_POST['nome'], $_POST['endereco'], $_POST['telefone'], $_POST['tipoCliente'], $_POST['email'], $_POST['cpf_cnpj'], $_POST['id']);
header('Location:principal.php?m=x');
Пример #6
0
<?php

if ($_SESSION['logado'] != 'sim') {
    header('Location:index.php');
}
include "cls/clientesClass.php";
$cliente = new clientesClass();
$cliente->mostrar();
$active = 'clientes';
?>
<div align ="center">
	<table border ="1">
		<tr>
		<td align="center" style = "background-color:yellow;">ID</td>
		<td align="center" style = "background-color:yellow;">Nome</td>
		<td align="center" style = "background-color:yellow;">Endereco</td>
		<td align="center" style = "background-color:yellow;">Email</td>
		<td style = "background-color:yellow;">   Editar   </td>
		<td style = "background-color:yellow;">   Deletar   </td>
		<td style = "background-color:yellow;">   Mostrar pagamentos   </td>
		</tr>
		<?php 
while ($linha = mysql_fetch_array($cliente->getconsulta())) {
    ?>
		<tr>
			<td align="center"><? echo $linha['idCliente'];?></td>
			<td align="center"><? echo $linha['nome'];?></td>
			<td align="center"> <?echo $linha['endereco']?></td>
			<td align="center"><? echo $linha['email'];?></td>
			<td align="center"><a href = 'principal.php?m=a&id=<?php 
    echo $linha['idCliente'];