A Dúvida é o seguinte...
eu escolho o produto que quero pedir (ou produtos) nessa página
CODE
<?
session_start();
if(empty($_SESSION['nome.usuario'])){
require_once("../conexao.php"); //referencia estatica
$sql = "SELECT CODUSR,NOMUSR from USUARIO where LGNUSR='" . $PHP_AUTH_USER . "'";
//echo $sql;
$rs = mysql_fetch_array(mysql_query($sql));
$_SESSION['cod.usuario'] = $rs['CODUSR'];
$_SESSION['nome.usuario'] = $rs['NOMUSR'];
$_SESSION['admin.usuario'] = true;
}
require_once("includes/config.inc.php");
global $config;
require_once($config['path']['conexao']);
/* LIMPA A TABELA DE PEDIDOS */
$del = "DELETE from PEDIDO where STAPED='P' and DTAPED < NOW() - INTERVAL 1 DAY";
$query = mysql_query($del);
$sql = "SELECT CODPRO,NOMPRO from PRODUTO";
$query = mysql_query($sql);
while($rs = mysql_fetch_array($query)){
$out .= " <tr>
<td width=\"13\" height=\"25\"> </td>
<td height=\"25\"><table width=\"752\" height=\"25\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"25\"><input name=\"produto[]\" type=\"checkbox\" class=\"campotxt9\" value=\"" . $rs['CODPRO'] . "\">
</td>
<td class=\"txt1preto\">" . $rs['NOMPRO'] . "</td>
</tr>
</table></td>
<td width=\"13\" height=\"25\"> </td>
</tr>";
}
$sql = 'SELECT CODCLI,CGCCLI,NOMCLI from CLIENTE where CODUSU=' . $_SESSION["cod.usuario"].' order by NOMCLI';
$query = mysql_query($sql);
while($rs = mysql_fetch_array($query)){
$drop .= "<option value=\"" . $rs['CGCCLI'] . "\" " . ($_GET['cnpj'] == $rs['CGCCLI'] ? "SELECTED" : null) . ">" . $rs['NOMCLI'] . " [" . $rs['CGCCLI'] . "]</option>\n";
}
switch(date('w')){
case 0: $dia = "Domingo"; break;
case 1: $dia = "Segunda-feira"; break;
case 2: $dia = "Terça-feira"; break;
case 3: $dia = "Quarta-feira"; break;
case 4: $dia = "Quinta-feira"; break;
case 5: $dia = "Sexta-feita"; break;
case 6: $dia = "Sábado"; break;
}
switch(date('n')){
case 1: $mes = "Janeiro"; break;
case 2: $mes = "Fevereiro"; break;
case 3: $mes = "Março"; break;
case 4: $mes = "Abril"; break;
case 5: $mes = "Maio"; break;
case 6: $mes = "Junho"; break;
case 7: $mes = "Julho"; break;
case 8: $mes = "Agosto"; break;
case 9: $mes = "Setembro"; break;
case 10: $mes = "Outubro"; break;
case 11: $mes = "Novembro"; break;
case 12: $mes = "Dezembro"; break;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>FGA UTILIDADES</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="_elementos/fga_css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function valida(){
// alert(document.forml["produto[]"].length);
for(var i=0; i < document.forml["produto[]"].length; i++){
// alert(document.forml["produto[]"][i].checked);
if(document.forml["produto[]"][i].checked){
return true;
}
}
alert("Por favor selecione um produto");
return false;
}
</script>
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<table width="778" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" bgcolor="5D1101"><img src="_elementos/10x10.gif" width="10" height="10"></td>
</tr>
<tr>
<td><table width="778" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="120"><table width="120" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><img src="_elementos/logo_fga.gif" width="98" height="72"></td>
</tr>
</table></td>
<td><table width="658" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="22" align="right"><img src="_elementos/alfa_1_envio.gif" width="645" height="25"></td>
</tr>
<tr>
<td height="22" align="right" background="_elementos/alfa_2.jpg"><span class="tit1preto">
<strong><?=$dia. date(", d \de ") . $mes . date(" \de Y")?></strong> </span></td>
</tr>
<tr>
<td><table width="537" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="103" align="right"><img src="_elementos/icon_repr.gif" width="20" height="19"></td>
<td width="434" align="right"><span class="txt1preto"><font size="1">Olá,
</font></span><span class="txt1veemelhobold"><strong><?=$_SESSION['nome.usuario']?>.</strong>
</span><strong> <br>
</strong><span class="txt1preto"></span><font size="1"><span class="txt1preto">Bem-vindo
à área de representantes da FGA Utilidades.</span></font></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10" bgcolor="5D1101"><img src="_elementos/10x10.gif" width="10" height="10"></td>
</tr>
</table>
<table width="778" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20"><img src="_elementos/pedidos.gif" width="778" height="20"></td>
</tr>
<form name="forml" method="post" action="tabela.action.php" onsubmit="return valida()">
<tr>
<td background="_elementos/pedidos_2.jpg"><table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="15"><img src="_elementos/traco2.gif" width="1" height="15"></td>
</tr>
<tr>
<td><table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="389"> <table width="389" height="74" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="389" height="15" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13" height="15"><img src="_elementos/traco2.gif" width="1" height="15"></td>
<td height="15" class="txt1veemelhobold">1 - Clientes</td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="389" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13" height="20"> </td>
<td height="20"><select name="cnpj" class="campotxt8">
<?=$drop?>
</select></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="389" height="24" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13" height="15"><img src="_elementos/traco2.gif" width="1" height="15"></td>
<td width="181" height="15" valign="top" class="txt1preto"><a href="cadastrar_cliente.php">>
Adicionar cliente</a></td>
<td width="195" valign="top" class="txt1preto"><a href="relatorio_clientes.php">> Histórico dos seus Cliente </a></td>
</tr>
</table></td>
</tr>
</table></td>
<td valign="top" class="txt1preto"><span class="txt1vermelho"><strong>Como
enviar relatórios? </strong></span><br>
1 - Selecione o cliente para qual a venda foi efetuada. Caso
o <br> cliente não apareça
na lista, clicar em adicionar novo cliente.<br>
2 - Selecione os produtos que foram vendidos.<br>
3 - Clique em avançar.</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="778" border="0" cellpadding="0" cellspacing="0" bgcolor="FBEEBB">
<tr>
<td width="13" height="15"> </td>
<td height="15" class="txt1veemelhobold">2 - Produtos vendidos</td>
<td width="13" height="15"> </td>
</tr>
<input type="hidden" name="action" value="<?=_ADICIONAR_PEDIDO_?>"/>
<?=$out?>
</table>
<table width="778" border="0" cellpadding="0" cellspacing="0" bgcolor="FBEEBB">
<tr>
<td width="13" height="25"> </td>
<td height="25"> </td>
<td width="13" height="25"> </td>
</tr>
<tr>
<td width="13" height="25"> </td>
<td height="25"><input name="next" type="submit" class="botao3" value="Avançar >>"></td>
<td width="13" height="25"> </td>
</tr>
</form>
<tr>
<td width="13" height="70"> </td>
<td height="70" class="txt1preto"><a href="logout.php">Logout</a></td>
<td width="13" height="70"> </td>
</tr>
</table>
<p class="txt1preto"> </p>
</body>
</html>
session_start();
if(empty($_SESSION['nome.usuario'])){
require_once("../conexao.php"); //referencia estatica
$sql = "SELECT CODUSR,NOMUSR from USUARIO where LGNUSR='" . $PHP_AUTH_USER . "'";
//echo $sql;
$rs = mysql_fetch_array(mysql_query($sql));
$_SESSION['cod.usuario'] = $rs['CODUSR'];
$_SESSION['nome.usuario'] = $rs['NOMUSR'];
$_SESSION['admin.usuario'] = true;
}
require_once("includes/config.inc.php");
global $config;
require_once($config['path']['conexao']);
/* LIMPA A TABELA DE PEDIDOS */
$del = "DELETE from PEDIDO where STAPED='P' and DTAPED < NOW() - INTERVAL 1 DAY";
$query = mysql_query($del);
$sql = "SELECT CODPRO,NOMPRO from PRODUTO";
$query = mysql_query($sql);
while($rs = mysql_fetch_array($query)){
$out .= " <tr>
<td width=\"13\" height=\"25\"> </td>
<td height=\"25\"><table width=\"752\" height=\"25\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"25\"><input name=\"produto[]\" type=\"checkbox\" class=\"campotxt9\" value=\"" . $rs['CODPRO'] . "\">
</td>
<td class=\"txt1preto\">" . $rs['NOMPRO'] . "</td>
</tr>
</table></td>
<td width=\"13\" height=\"25\"> </td>
</tr>";
}
$sql = 'SELECT CODCLI,CGCCLI,NOMCLI from CLIENTE where CODUSU=' . $_SESSION["cod.usuario"].' order by NOMCLI';
$query = mysql_query($sql);
while($rs = mysql_fetch_array($query)){
$drop .= "<option value=\"" . $rs['CGCCLI'] . "\" " . ($_GET['cnpj'] == $rs['CGCCLI'] ? "SELECTED" : null) . ">" . $rs['NOMCLI'] . " [" . $rs['CGCCLI'] . "]</option>\n";
}
switch(date('w')){
case 0: $dia = "Domingo"; break;
case 1: $dia = "Segunda-feira"; break;
case 2: $dia = "Terça-feira"; break;
case 3: $dia = "Quarta-feira"; break;
case 4: $dia = "Quinta-feira"; break;
case 5: $dia = "Sexta-feita"; break;
case 6: $dia = "Sábado"; break;
}
switch(date('n')){
case 1: $mes = "Janeiro"; break;
case 2: $mes = "Fevereiro"; break;
case 3: $mes = "Março"; break;
case 4: $mes = "Abril"; break;
case 5: $mes = "Maio"; break;
case 6: $mes = "Junho"; break;
case 7: $mes = "Julho"; break;
case 8: $mes = "Agosto"; break;
case 9: $mes = "Setembro"; break;
case 10: $mes = "Outubro"; break;
case 11: $mes = "Novembro"; break;
case 12: $mes = "Dezembro"; break;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>FGA UTILIDADES</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="_elementos/fga_css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function valida(){
// alert(document.forml["produto[]"].length);
for(var i=0; i < document.forml["produto[]"].length; i++){
// alert(document.forml["produto[]"][i].checked);
if(document.forml["produto[]"][i].checked){
return true;
}
}
alert("Por favor selecione um produto");
return false;
}
</script>
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<table width="778" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" bgcolor="5D1101"><img src="_elementos/10x10.gif" width="10" height="10"></td>
</tr>
<tr>
<td><table width="778" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="120"><table width="120" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><img src="_elementos/logo_fga.gif" width="98" height="72"></td>
</tr>
</table></td>
<td><table width="658" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="22" align="right"><img src="_elementos/alfa_1_envio.gif" width="645" height="25"></td>
</tr>
<tr>
<td height="22" align="right" background="_elementos/alfa_2.jpg"><span class="tit1preto">
<strong><?=$dia. date(", d \de ") . $mes . date(" \de Y")?></strong> </span></td>
</tr>
<tr>
<td><table width="537" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="103" align="right"><img src="_elementos/icon_repr.gif" width="20" height="19"></td>
<td width="434" align="right"><span class="txt1preto"><font size="1">Olá,
</font></span><span class="txt1veemelhobold"><strong><?=$_SESSION['nome.usuario']?>.</strong>
</span><strong> <br>
</strong><span class="txt1preto"></span><font size="1"><span class="txt1preto">Bem-vindo
à área de representantes da FGA Utilidades.</span></font></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10" bgcolor="5D1101"><img src="_elementos/10x10.gif" width="10" height="10"></td>
</tr>
</table>
<table width="778" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20"><img src="_elementos/pedidos.gif" width="778" height="20"></td>
</tr>
<form name="forml" method="post" action="tabela.action.php" onsubmit="return valida()">
<tr>
<td background="_elementos/pedidos_2.jpg"><table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="15"><img src="_elementos/traco2.gif" width="1" height="15"></td>
</tr>
<tr>
<td><table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="389"> <table width="389" height="74" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="389" height="15" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13" height="15"><img src="_elementos/traco2.gif" width="1" height="15"></td>
<td height="15" class="txt1veemelhobold">1 - Clientes</td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="389" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13" height="20"> </td>
<td height="20"><select name="cnpj" class="campotxt8">
<?=$drop?>
</select></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="389" height="24" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13" height="15"><img src="_elementos/traco2.gif" width="1" height="15"></td>
<td width="181" height="15" valign="top" class="txt1preto"><a href="cadastrar_cliente.php">>
Adicionar cliente</a></td>
<td width="195" valign="top" class="txt1preto"><a href="relatorio_clientes.php">> Histórico dos seus Cliente </a></td>
</tr>
</table></td>
</tr>
</table></td>
<td valign="top" class="txt1preto"><span class="txt1vermelho"><strong>Como
enviar relatórios? </strong></span><br>
1 - Selecione o cliente para qual a venda foi efetuada. Caso
o <br> cliente não apareça
na lista, clicar em adicionar novo cliente.<br>
2 - Selecione os produtos que foram vendidos.<br>
3 - Clique em avançar.</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="778" border="0" cellpadding="0" cellspacing="0" bgcolor="FBEEBB">
<tr>
<td width="13" height="15"> </td>
<td height="15" class="txt1veemelhobold">2 - Produtos vendidos</td>
<td width="13" height="15"> </td>
</tr>
<input type="hidden" name="action" value="<?=_ADICIONAR_PEDIDO_?>"/>
<?=$out?>
</table>
<table width="778" border="0" cellpadding="0" cellspacing="0" bgcolor="FBEEBB">
<tr>
<td width="13" height="25"> </td>
<td height="25"> </td>
<td width="13" height="25"> </td>
</tr>
<tr>
<td width="13" height="25"> </td>
<td height="25"><input name="next" type="submit" class="botao3" value="Avançar >>"></td>
<td width="13" height="25"> </td>
</tr>
</form>
<tr>
<td width="13" height="70"> </td>
<td height="70" class="txt1preto"><a href="logout.php">Logout</a></td>
<td width="13" height="70"> </td>
</tr>
</table>
<p class="txt1preto"> </p>
</body>
</html>
Então sou redirecionado para a próxima página onde defino algumas caracteristicas do produto essa pagina chama -se MOSTRA TABELA
o código dela é o seguinte
CODE
<?
/*
* mostra_tabela.php
* Mostra a tabela de sub-produtos de acordo com o produto passado
* rafael@trestini.com.br
*
* Parametros
* codpro - codigo do produto
*/
require_once("includes/config.inc.php");
global $config;
require_once($config['path']['conexao']);
session_start();
//echo "codpro: " . $codpro . "<br/>";
$sql = "SELECT COR.* from COR
inner join PRODUTO_COR on COR.CODCOR=PRODUTO_COR.CODCOR
where CODPRO=" . $codpro;
$query = mysql_query($sql) or die ($sql . "<br/><br/>" . mysql_error());
$qtdcores = mysql_num_rows($query);
while($rs = mysql_fetch_array($query)){
$coresheader .= "<td width='50' valign='middle' align='center' class='tit1preto'>" . $rs['NOMCOR'] . "</td>\n";
$cores .= "<td width='50' align='center'><input type='text' name='cor_" . $rs['CODCOR'] . "[]' class='campotxt' style='width:70%'/></td>\n";
}
$sql = "SELECT SUBPRODUTO.*,PRODUTO.* from PRODUTO
inner join SUBPRODUTO on PRODUTO.CODPRO=SUBPRODUTO.CODPRO
where PRODUTO.CODPRO=" . $codpro;
$query = mysql_query($sql) or die ($sql . "<br/><br/>" . mysql_error());
while($rs = mysql_fetch_array($query)){
$nomeproduto = $rs['NOMPRO'];
$tabela .= "
<tr>
<td class='tit1preto'><input type='hidden' name='codsubpro[]' value='" . $rs['CODSBP'] . "'/>" . $rs['CODSUBPRO'] . "</td>
<td class='tit1preto'>" . $rs['NOMSBP'] . "</td>
" . $cores . "
<Td><input type='text' name='valor[]' onkeydown='return charValid(event.keyCode, this)' class='campotxt'/></td>
</tr>";
}
switch(date('w')){
case 0: $dia = "Domingo"; break;
case 1: $dia = "Segunda-feira"; break;
case 2: $dia = "Terça-feira"; break;
case 3: $dia = "Quarta-feira"; break;
case 4: $dia = "Quinta-feira"; break;
case 5: $dia = "Sexta-feita"; break;
case 6: $dia = "Sábado"; break;
}
switch(date('n')){
case 1: $mes = "Janeiro"; break;
case 2: $mes = "Fevereiro"; break;
case 3: $mes = "Março"; break;
case 4: $mes = "Abril"; break;
case 5: $mes = "Maio"; break;
case 6: $mes = "Junho"; break;
case 7: $mes = "Julho"; break;
case 8: $mes = "Agosto"; break;
case 9: $mes = "Setembro"; break;
case 10: $mes = "Outubro"; break;
case 11: $mes = "Novembro"; break;
case 12: $mes = "Dezembro"; break;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>FGA UTILIDADES</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="_elementos/fga_css.css" rel="stylesheet" type="text/css">
<script language="javascript">
function valida(){
var hasValor = false;
for(var i=0; i<document.forml.length; i++){
if(document.forml[i].name.substring(0,3) == "val"){
if(document.forml[i].value != ""){
hasValor = true;
break;
}
}
}
if(!hasValor){
alert("Pelo menos um produto (quantidade e valor) tem que ser preenchido");
return false;
}
for(var i=0; i<document.forml.length; i++){
if(document.forml[i].name.substring(0,3) == "cor" || document.forml[i].name.substring(0,3) == "val"){
if(document.forml[i].value != "" && !isNaN(document.forml[i].value)){
//alert(document.forml[i].name + " :: " + document.forml[i].value);
return validaCorValor();
}
}
}
alert("É necessário o preenchimento de ao menos um produto");
return false;
}
function validaCorValor(){
for(var i=0; i<document.forml.length; i++){
if(document.forml[i].name.substring(0,3) == "cor" || document.forml[i].name.substring(0,3) == "val"){
if(isNaN(document.forml[i].value)){
alert("Alguns dados foram preenchidos de maneira incorreta");
document.forml[i].focus();
return false;
}
}
}
return true;
}
function charValid(caracter, element){
// alert(caracter);
if((caracter >= 48 && caracter <= 57) || (caracter >= 96 && caracter <= 105) || caracter == 190 || caracter == 8 || caracter == 194){
return true
}else if(caracter == 188 || caracter == 110){
// alert("virgula!");
element.value += ".";
return false;
}else{
// alert("invalido " + caracter);
// alert(caracter);
return false;
}
}
</script>
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<form name="forml" method="post" action="tabela.action.php" onsubmit="return valida()">
<input type="hidden" name="action" value="<?=_ADICIONAR_PRODUTOS_?>"/>
<input type="hidden" name="codpro" value="<?=$codpro?>"/>
<table width="778" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" bgcolor="5D1101"><img src="_elementos/10x10.gif" width="10" height="10"></td>
</tr>
<tr>
<td><table width="778" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="120"><table width="120" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><img src="_elementos/logo_fga.gif" width="98" height="72"></td>
</tr>
</table></td>
<td><table width="658" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="22" align="right"><img src="_elementos/alfa_1_envio.gif" width="645" height="25"></td>
</tr>
<tr>
<td height="22" align="right" background="_elementos/alfa_2.jpg"><span class="tit1preto">
<strong><?=$dia. date(", d \de ") . $mes . date(" \de Y")?></strong>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></span><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
</font></td>
</tr>
<tr>
<td><table width="537" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="103" align="right"><img src="_elementos/icon_repr.gif" width="20" height="19"></td>
<td width="434" align="right"><span class="txt1preto"><font size="1">Olá,</font>
</span><span class="txt1veemelhobold"><strong><?=$_SESSION['nome.usuario']?>.</strong></span><font size="1"><strong></strong></font><font size="1"><strong>
</strong><span class="txt1preto">Bem-vindo à área
de representantes da FGA Utilidades.</span></font></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10" bgcolor="5D1101"><img src="_elementos/10x10.gif" width="10" height="10"></td>
</tr>
</table>
<table width="778" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20"><img src="_elementos/pedidos.gif" width="778" height="20"></td>
</tr>
<tr>
<td background="_elementos/pedidos_2.jpg"><table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="389">
<table width="389" height="74" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td><table width="389" height="24" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13"> </td>
<td class="txt2vermelho">PRODUTO <?=$_SESSION['prod.atual']?> de <?=$_SESSION['qtd.prods']?></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
<td><span class="txt1veemelhobold">DICAS DE PREENCHIMENTO</span><br>
<span class="txt1preto">1 - Preencha as quantidades de cada produto
e o valor em que <br>
foram vendidos.<br>
2 - Clique avançar para preencher o próximo produto.</span></td>
</tr>
</table></td>
</tr>
</table>
<table width="778" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1"> </td>
<td>
<table width="758" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" valign="middle" colspan="<?=($qtdcores + 3)?>" class="txt1veemelhobold"><?=$nomeproduto?></td>
</tr>
<tr>
<td height="25" valign="middle" class='tit1preto' width="30">Cod</td>
<td valign="middle" class='tit1preto' width="<?=(758 - ($qtdcores * 50) - 160)?>">Produto</td>
<?=$coresheader?>
<td valign="middle" width="130" class='tit1preto'>Valor Unit</td>
</tr>
<?=$tabela?>
</table>
</td>
<td width="1"> </td>
</tr>
</table>
<table width="778" height="40" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
<td><input name="previous" type="button" class="botao3" value="< < Voltar" onclick="java script:history.back()">
</td>
<td width="170" align="center">
<input name="next" type="submit" class="botao3" value="Avançar >>"> </td>
</tr>
</table>
</form>
</body>
</html>
/*
* mostra_tabela.php
* Mostra a tabela de sub-produtos de acordo com o produto passado
* rafael@trestini.com.br
*
* Parametros
* codpro - codigo do produto
*/
require_once("includes/config.inc.php");
global $config;
require_once($config['path']['conexao']);
session_start();
//echo "codpro: " . $codpro . "<br/>";
$sql = "SELECT COR.* from COR
inner join PRODUTO_COR on COR.CODCOR=PRODUTO_COR.CODCOR
where CODPRO=" . $codpro;
$query = mysql_query($sql) or die ($sql . "<br/><br/>" . mysql_error());
$qtdcores = mysql_num_rows($query);
while($rs = mysql_fetch_array($query)){
$coresheader .= "<td width='50' valign='middle' align='center' class='tit1preto'>" . $rs['NOMCOR'] . "</td>\n";
$cores .= "<td width='50' align='center'><input type='text' name='cor_" . $rs['CODCOR'] . "[]' class='campotxt' style='width:70%'/></td>\n";
}
$sql = "SELECT SUBPRODUTO.*,PRODUTO.* from PRODUTO
inner join SUBPRODUTO on PRODUTO.CODPRO=SUBPRODUTO.CODPRO
where PRODUTO.CODPRO=" . $codpro;
$query = mysql_query($sql) or die ($sql . "<br/><br/>" . mysql_error());
while($rs = mysql_fetch_array($query)){
$nomeproduto = $rs['NOMPRO'];
$tabela .= "
<tr>
<td class='tit1preto'><input type='hidden' name='codsubpro[]' value='" . $rs['CODSBP'] . "'/>" . $rs['CODSUBPRO'] . "</td>
<td class='tit1preto'>" . $rs['NOMSBP'] . "</td>
" . $cores . "
<Td><input type='text' name='valor[]' onkeydown='return charValid(event.keyCode, this)' class='campotxt'/></td>
</tr>";
}
switch(date('w')){
case 0: $dia = "Domingo"; break;
case 1: $dia = "Segunda-feira"; break;
case 2: $dia = "Terça-feira"; break;
case 3: $dia = "Quarta-feira"; break;
case 4: $dia = "Quinta-feira"; break;
case 5: $dia = "Sexta-feita"; break;
case 6: $dia = "Sábado"; break;
}
switch(date('n')){
case 1: $mes = "Janeiro"; break;
case 2: $mes = "Fevereiro"; break;
case 3: $mes = "Março"; break;
case 4: $mes = "Abril"; break;
case 5: $mes = "Maio"; break;
case 6: $mes = "Junho"; break;
case 7: $mes = "Julho"; break;
case 8: $mes = "Agosto"; break;
case 9: $mes = "Setembro"; break;
case 10: $mes = "Outubro"; break;
case 11: $mes = "Novembro"; break;
case 12: $mes = "Dezembro"; break;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>FGA UTILIDADES</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="_elementos/fga_css.css" rel="stylesheet" type="text/css">
<script language="javascript">
function valida(){
var hasValor = false;
for(var i=0; i<document.forml.length; i++){
if(document.forml[i].name.substring(0,3) == "val"){
if(document.forml[i].value != ""){
hasValor = true;
break;
}
}
}
if(!hasValor){
alert("Pelo menos um produto (quantidade e valor) tem que ser preenchido");
return false;
}
for(var i=0; i<document.forml.length; i++){
if(document.forml[i].name.substring(0,3) == "cor" || document.forml[i].name.substring(0,3) == "val"){
if(document.forml[i].value != "" && !isNaN(document.forml[i].value)){
//alert(document.forml[i].name + " :: " + document.forml[i].value);
return validaCorValor();
}
}
}
alert("É necessário o preenchimento de ao menos um produto");
return false;
}
function validaCorValor(){
for(var i=0; i<document.forml.length; i++){
if(document.forml[i].name.substring(0,3) == "cor" || document.forml[i].name.substring(0,3) == "val"){
if(isNaN(document.forml[i].value)){
alert("Alguns dados foram preenchidos de maneira incorreta");
document.forml[i].focus();
return false;
}
}
}
return true;
}
function charValid(caracter, element){
// alert(caracter);
if((caracter >= 48 && caracter <= 57) || (caracter >= 96 && caracter <= 105) || caracter == 190 || caracter == 8 || caracter == 194){
return true
}else if(caracter == 188 || caracter == 110){
// alert("virgula!");
element.value += ".";
return false;
}else{
// alert("invalido " + caracter);
// alert(caracter);
return false;
}
}
</script>
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<form name="forml" method="post" action="tabela.action.php" onsubmit="return valida()">
<input type="hidden" name="action" value="<?=_ADICIONAR_PRODUTOS_?>"/>
<input type="hidden" name="codpro" value="<?=$codpro?>"/>
<table width="778" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" bgcolor="5D1101"><img src="_elementos/10x10.gif" width="10" height="10"></td>
</tr>
<tr>
<td><table width="778" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="120"><table width="120" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><img src="_elementos/logo_fga.gif" width="98" height="72"></td>
</tr>
</table></td>
<td><table width="658" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="22" align="right"><img src="_elementos/alfa_1_envio.gif" width="645" height="25"></td>
</tr>
<tr>
<td height="22" align="right" background="_elementos/alfa_2.jpg"><span class="tit1preto">
<strong><?=$dia. date(", d \de ") . $mes . date(" \de Y")?></strong>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></span><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
</font></td>
</tr>
<tr>
<td><table width="537" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="103" align="right"><img src="_elementos/icon_repr.gif" width="20" height="19"></td>
<td width="434" align="right"><span class="txt1preto"><font size="1">Olá,</font>
</span><span class="txt1veemelhobold"><strong><?=$_SESSION['nome.usuario']?>.</strong></span><font size="1"><strong></strong></font><font size="1"><strong>
</strong><span class="txt1preto">Bem-vindo à área
de representantes da FGA Utilidades.</span></font></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10" bgcolor="5D1101"><img src="_elementos/10x10.gif" width="10" height="10"></td>
</tr>
</table>
<table width="778" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20"><img src="_elementos/pedidos.gif" width="778" height="20"></td>
</tr>
<tr>
<td background="_elementos/pedidos_2.jpg"><table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="389">
<table width="389" height="74" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td><table width="389" height="24" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13"> </td>
<td class="txt2vermelho">PRODUTO <?=$_SESSION['prod.atual']?> de <?=$_SESSION['qtd.prods']?></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
<td><span class="txt1veemelhobold">DICAS DE PREENCHIMENTO</span><br>
<span class="txt1preto">1 - Preencha as quantidades de cada produto
e o valor em que <br>
foram vendidos.<br>
2 - Clique avançar para preencher o próximo produto.</span></td>
</tr>
</table></td>
</tr>
</table>
<table width="778" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1"> </td>
<td>
<table width="758" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" valign="middle" colspan="<?=($qtdcores + 3)?>" class="txt1veemelhobold"><?=$nomeproduto?></td>
</tr>
<tr>
<td height="25" valign="middle" class='tit1preto' width="30">Cod</td>
<td valign="middle" class='tit1preto' width="<?=(758 - ($qtdcores * 50) - 160)?>">Produto</td>
<?=$coresheader?>
<td valign="middle" width="130" class='tit1preto'>Valor Unit</td>
</tr>
<?=$tabela?>
</table>
</td>
<td width="1"> </td>
</tr>
</table>
<table width="778" height="40" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
<td><input name="previous" type="button" class="botao3" value="< < Voltar" onclick="java script:history.back()">
</td>
<td width="170" align="center">
<input name="next" type="submit" class="botao3" value="Avançar >>"> </td>
</tr>
</table>
</form>
</body>
</html>
quado termin ode definir todas as caracteristicas ele me joga nessa página, que é a FINALIZAR PEDIDO
CODE
<?
session_start();
switch(date('w')){
case 0: $dia = "Domingo"; break;
case 1: $dia = "Segunda-feira"; break;
case 2: $dia = "Terça-feira"; break;
case 3: $dia = "Quarta-feira"; break;
case 4: $dia = "Quinta-feira"; break;
case 5: $dia = "Sexta-feita"; break;
case 6: $dia = "Sábado"; break;
}
switch(date('n')){
case 1: $mes = "Janeiro"; break;
case 2: $mes = "Fevereiro"; break;
case 3: $mes = "Março"; break;
case 4: $mes = "Abril"; break;
case 5: $mes = "Maio"; break;
case 6: $mes = "Junho"; break;
case 7: $mes = "Julho"; break;
case 8: $mes = "Agosto"; break;
case 9: $mes = "Setembro"; break;
case 10: $mes = "Outubro"; break;
case 11: $mes = "Novembro"; break;
case 12: $mes = "Dezembro"; break;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>FGA UTILIDADES</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="_elementos/fga_css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<table width="778" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" bgcolor="5D1101"><img src="_elementos/10x10.gif" width="10" height="10"></td>
</tr>
<tr>
<td><table width="778" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="120"><table width="120" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><img src="_elementos/logo_fga.gif" width="98" height="72"></td>
</tr>
</table></td>
<td><table width="658" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="22" align="right"><img src="_elementos/alfa_1_envio.gif" width="645" height="25"></td>
</tr>
<tr>
<td height="22" align="right" background="_elementos/alfa_2.jpg">
<span class="tit1preto">
<strong><?=$dia. date(", d \de ") . $mes . date(" \de Y")?></strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></span><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
</font></td>
</tr>
<tr>
<td><table width="537" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="103" align="right"><img src="_elementos/icon_repr.gif" width="20" height="19"></td>
<td width="434" align="right"><span class="txt1preto"><font size="1">Olá,
</font></span><span class="txt1veemelhobold">
<strong><?=$_SESSION['nome.usuario']?>.</strong>
</span><strong></strong><font size="1"><strong>
</strong><span class="txt1preto">Bem-vindo à área
de representantes da FGA Utilidades.</span></font></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10" bgcolor="5D1101"><img src="_elementos/10x10.gif" width="10" height="10"></td>
</tr>
</table>
<table width="778" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20"><img src="_elementos/pedidos.gif" width="778" height="20"></td>
</tr>
<tr>
<td background="_elementos/pedidos_2.jpg"><table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="389">
<form name="forml" method="post" action="tabela.action.php">
<input type="hidden" name="action" value="<?=_FINALIZAR_PEDIDO_?>"/>
<table width="389" height="74" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td><table width="389" height="24" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13"> </td>
<td class="txt2vermelho">Finalização do relatório.</td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
<td class="txt1preto"> </td>
</tr>
</table></td>
</tr>
</table>
<table width="778" height="182" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="5">
</td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="5"></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="5"></td>
</tr>
<tr>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"> </td>
<td height="15" bgcolor="FDF6DD" class="txt1preto">Nome do comprador</td>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"></td>
<td height="20" bgcolor="FDF6DD" class="campotxt">
<input name="comprador" type="text" class="campotxt2">
</td>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"></td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="15" bgcolor="FDF6DD" class="campotxt">Praça de pagamento</td>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="8" height="18"></td>
<td height="20" bgcolor="FDF6DD" class="campotxt">
<input name="praca" type="text" class="campotxt2">
</td>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"><img src="_elementos/traco2.gif" width="1" height="18"></td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="15" bgcolor="FDF6DD" class="campotxt">Frete</td>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"> </td>
<td height="20" bgcolor="FDF6DD" class="campotxt">
<input name="frete" type="radio" class="campobola" value="FOB">
FOB
<input name="frete" type="radio" class="campobola" value="CIF">
CIF</td>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"> </td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="15"></td>
<td height="15" bgcolor="FDF6DD" class="campotxt">Redespacho pela transportadora</td>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="15"></td>
</tr>
<tr>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"></td>
<td height="20" bgcolor="FDF6DD" class="campotxt"> <input name="transportadora" type="text" class="campotxt2"></td>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"></td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="15"></td>
<td height="15" bgcolor="FDF6DD" class="campotxt">Forma de Pagamento</td>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="15"></td>
</tr>
<tr>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"></td>
<td height="20" bgcolor="FDF6DD" class="campotxt"> <input name="formapagto" type="text" class="campotxt2"></td>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"></td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="8" height="10"></td>
<td height="15" bgcolor="FDF6DD" class="campotxt">Observações</td>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="8" height="10"></td>
</tr>
<tr>
<td width="13" height="80" bgcolor="FDF6DD" class="campotxt"> </td>
<td height="80" bgcolor="FDF6DD" class="campotxt">
<textarea name="obs" class="campotxt3" rows="6" cols="40"></textarea>
</td>
<td width="13" height="80" bgcolor="FDF6DD" class="campotxt"> </td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"> </td>
<td height="10" bgcolor="FDF6DD" class="campotxt"> </td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"> </td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"> </td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><table width="752" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"> </td>
<td width="251">
<input name="next" type="submit" class="botao" value="Visualizar relatório"></td>
<td class="botao"> </td>
</tr>
</table></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"> </td>
</tr>
</table>
</form>
<p class="campotxt2"> </p>
<p class="txt2vermelho"> </p>
<p class="txt1preto"> </p>
</body>
</html>
session_start();
switch(date('w')){
case 0: $dia = "Domingo"; break;
case 1: $dia = "Segunda-feira"; break;
case 2: $dia = "Terça-feira"; break;
case 3: $dia = "Quarta-feira"; break;
case 4: $dia = "Quinta-feira"; break;
case 5: $dia = "Sexta-feita"; break;
case 6: $dia = "Sábado"; break;
}
switch(date('n')){
case 1: $mes = "Janeiro"; break;
case 2: $mes = "Fevereiro"; break;
case 3: $mes = "Março"; break;
case 4: $mes = "Abril"; break;
case 5: $mes = "Maio"; break;
case 6: $mes = "Junho"; break;
case 7: $mes = "Julho"; break;
case 8: $mes = "Agosto"; break;
case 9: $mes = "Setembro"; break;
case 10: $mes = "Outubro"; break;
case 11: $mes = "Novembro"; break;
case 12: $mes = "Dezembro"; break;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>FGA UTILIDADES</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="_elementos/fga_css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<table width="778" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" bgcolor="5D1101"><img src="_elementos/10x10.gif" width="10" height="10"></td>
</tr>
<tr>
<td><table width="778" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="120"><table width="120" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><img src="_elementos/logo_fga.gif" width="98" height="72"></td>
</tr>
</table></td>
<td><table width="658" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="22" align="right"><img src="_elementos/alfa_1_envio.gif" width="645" height="25"></td>
</tr>
<tr>
<td height="22" align="right" background="_elementos/alfa_2.jpg">
<span class="tit1preto">
<strong><?=$dia. date(", d \de ") . $mes . date(" \de Y")?></strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></span><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
</font></td>
</tr>
<tr>
<td><table width="537" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="103" align="right"><img src="_elementos/icon_repr.gif" width="20" height="19"></td>
<td width="434" align="right"><span class="txt1preto"><font size="1">Olá,
</font></span><span class="txt1veemelhobold">
<strong><?=$_SESSION['nome.usuario']?>.</strong>
</span><strong></strong><font size="1"><strong>
</strong><span class="txt1preto">Bem-vindo à área
de representantes da FGA Utilidades.</span></font></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10" bgcolor="5D1101"><img src="_elementos/10x10.gif" width="10" height="10"></td>
</tr>
</table>
<table width="778" height="94" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20"><img src="_elementos/pedidos.gif" width="778" height="20"></td>
</tr>
<tr>
<td background="_elementos/pedidos_2.jpg"><table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="389">
<form name="forml" method="post" action="tabela.action.php">
<input type="hidden" name="action" value="<?=_FINALIZAR_PEDIDO_?>"/>
<table width="389" height="74" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td><table width="389" height="24" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13"> </td>
<td class="txt2vermelho">Finalização do relatório.</td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
<td class="txt1preto"> </td>
</tr>
</table></td>
</tr>
</table>
<table width="778" height="182" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="5">
</td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="5"></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="5"></td>
</tr>
<tr>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"> </td>
<td height="15" bgcolor="FDF6DD" class="txt1preto">Nome do comprador</td>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"></td>
<td height="20" bgcolor="FDF6DD" class="campotxt">
<input name="comprador" type="text" class="campotxt2">
</td>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"></td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="15" bgcolor="FDF6DD" class="campotxt">Praça de pagamento</td>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="8" height="18"></td>
<td height="20" bgcolor="FDF6DD" class="campotxt">
<input name="praca" type="text" class="campotxt2">
</td>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"><img src="_elementos/traco2.gif" width="1" height="18"></td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="15" bgcolor="FDF6DD" class="campotxt">Frete</td>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"> </td>
<td height="20" bgcolor="FDF6DD" class="campotxt">
<input name="frete" type="radio" class="campobola" value="FOB">
FOB
<input name="frete" type="radio" class="campobola" value="CIF">
CIF</td>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"> </td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="15"></td>
<td height="15" bgcolor="FDF6DD" class="campotxt">Redespacho pela transportadora</td>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="15"></td>
</tr>
<tr>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"></td>
<td height="20" bgcolor="FDF6DD" class="campotxt"> <input name="transportadora" type="text" class="campotxt2"></td>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"></td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="15"></td>
<td height="15" bgcolor="FDF6DD" class="campotxt">Forma de Pagamento</td>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="15"></td>
</tr>
<tr>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"></td>
<td height="20" bgcolor="FDF6DD" class="campotxt"> <input name="formapagto" type="text" class="campotxt2"></td>
<td width="13" height="20" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="18"></td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="8" height="10"></td>
<td height="15" bgcolor="FDF6DD" class="campotxt">Observações</td>
<td width="13" height="15" bgcolor="FDF6DD" class="campotxt"><img src="_elementos/traco2.gif" width="8" height="10"></td>
</tr>
<tr>
<td width="13" height="80" bgcolor="FDF6DD" class="campotxt"> </td>
<td height="80" bgcolor="FDF6DD" class="campotxt">
<textarea name="obs" class="campotxt3" rows="6" cols="40"></textarea>
</td>
<td width="13" height="80" bgcolor="FDF6DD" class="campotxt"> </td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"> </td>
<td height="10" bgcolor="FDF6DD" class="campotxt"> </td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"> </td>
</tr>
<tr>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"> </td>
<td height="10" bgcolor="FDF6DD" class="campotxt"><table width="752" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"> </td>
<td width="251">
<input name="next" type="submit" class="botao" value="Visualizar relatório"></td>
<td class="botao"> </td>
</tr>
</table></td>
<td width="13" height="10" bgcolor="FDF6DD" class="campotxt"> </td>
</tr>
</table>
</form>
<p class="campotxt2"> </p>
<p class="txt2vermelho"> </p>
<p class="txt1preto"> </p>
</body>
</html>
O QUE EU PRECISO É UM BOTÃO VOLTAR... que não seja só o JS com history -1
as caixa deve recuperar os valores...
e esse é o problema nem sei colo ele tá transmitindo os valores de uma página pra outra pra pdoe jogar elas nas caixas...
Se algu[em puder me dar um breve explicada no código e me dizer como ecuperar os valores na variaves ajudaria muito
porque além disso preciso de um botão
Fazer o mesmo pedido novamente
onde carregaria o pedido nas caixas pra pessoa só alterar algumas coisa... e já mandar o pedido denovo
também não sei como vou fazer isso
PRECISO DISSO MEIO RÁPIDO
Valeu Galera
Conto com vocês

Help














