Ir para conteúdo
Fórum Script Brasil

flaviobji

Membros
  • Total de itens

    6
  • Registro em

  • Última visita

Sobre flaviobji

flaviobji's Achievements

0

Reputação

  1. flaviobji

    Contas A Pagar/receber

    <script type='text/javascript'>window.mod_pagespeed_start = Number(new Date());</script> amigo você poderia me ajudar aqui com este meu aqui? Boa tarde amigos, sou novo no mundo php, tenho um sistema aqui financeiro que um ex-funcionario reescreveu, e que adiciono varias contas a pagar mas como não consegui fazer de uma vez so eu tenho que adicionar varias cobranças ao mesmo tempo, vou colocar um ex: http://www.4shared.c.../contas_02.html http://www.4shared.c...mba/contas.html http://www.4shared.c...2.jpg?lgfp=3000 http://www.4shared.c...s.jpg?lgfp=3000 segue abaixo o codigo... <style> body { cursor: default; text-align: left; font-family: calibri, arial, sans-serif; font-size: 13px; margin: 0; padding: 5px; } table th { vertical-align: top; } input { text-align: center; font-family: calibri, arial, sans-serif; font-size: 13px; background-color: white; border-color: #abadb3 #dbdfe6 #e3e9ef #e2e3ea; padding: 2px; } input:focus, input:hover { border-color: #5794bf #b7d5ea #c7e2f1 #c5daed; } .infoBox { background-color: #fefdec; border: 1px solid #edebcd; padding: 6px; margin-bottom: 20px; } </style> <script src="js/SpryValidationTextField.js" type="text/javascript"></script><head> <link href="css/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <? $localp = "Adicionar Contas"; $add = $_GET['add']; $pegarid = $_GET['id']; $database_config2 = "nome_do_meu_BD"; include "config/config.php"; setlocale (LC_ALL, 'pt_BR'); if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } $data_pg = $_GET['data_pg']; $string = $data_pg; $exploded = explode("/", $string); $dataexploded = "".$exploded[2]."-".$exploded[1]."-".$exploded[0].""; $data_pg2 = $_GET['data_pg2']; $string2 = $data_pg2; $exploded2 = explode("/", $string2); $dataexploded2 = "".$exploded2[2]."-".$exploded2[1]."-".$exploded2[0].""; $data_pg3 = $_GET['data_pg3']; $string3 = $data_pg3; $exploded3 = explode("/", $string3); $dataexploded3 = "".$exploded3[2]."-".$exploded3[1]."-".$exploded3[0].""; $data_pg4 = $_GET['data_pg4']; $string4 = $data_pg4; $exploded4 = explode("/", $string4); $dataexploded4 = "".$exploded4[2]."-".$exploded4[1]."-".$exploded4[0].""; $data_pg5 = $_GET['data_pg5']; $string5 = $data_pg5; $exploded5 = explode("/", $string5); $dataexploded5 = "".$exploded5[2]."-".$exploded5[1]."-".$exploded5[0].""; $data_pg6 = $_GET['data_pg6']; $string6 = $data_pg6; $exploded6 = explode("/", $string6); $dataexploded6 = "".$exploded6[2]."-".$exploded6[1]."-".$exploded6[0].""; $data_pg7 = $_GET['data_pg7']; $string7 = $data_pg7; $exploded7 = explode("/", $string7); $dataexploded7 = "".$exploded7[2]."-".$exploded7[1]."-".$exploded7[0].""; $data_pg8 = $_GET['data_pg8']; $string8 = $data_pg8; $exploded8 = explode("/", $string8); $dataexploded8 = "".$exploded8[2]."-".$exploded8[1]."-".$exploded8[0].""; $data_pg9 = $_GET['data_pg9']; $string9 = $data_pg9; $exploded9 = explode("/", $string9); $dataexploded9 = "".$exploded9[2]."-".$exploded9[1]."-".$exploded9[0].""; $data_pg10 = $_GET['data_pg10']; $string10 = $data_pg10; $exploded10 = explode("/", $string10); $dataexploded10 = "".$exploded10[2]."-".$exploded10[1]."-".$exploded10[0].""; $data_pg11 = $_GET['data_pg11']; $string11 = $data_pg11; $exploded11 = explode("/", $string11); $dataexploded11 = "".$exploded11[2]."-".$exploded11[1]."-".$exploded11[0].""; $data_pg12 = $_GET['data_pg12']; $string12 = $data_pg12; $exploded12 = explode("/", $string12); $dataexploded12 = "".$exploded12[2]."-".$exploded12[1]."-".$exploded12[0].""; if ((isset($_GET["MM_insert"])) && ($_GET["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao'], "text"), GetSQLValueString($_GET['valor'], "double"), GetSQLValueString("$dataexploded", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); } if ((isset($_GET["form2"])) && ($_GET["form2"] == "form2")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao2'], "text"), GetSQLValueString($_GET['valor2'], "double"), GetSQLValueString("$dataexploded2", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form3"])) && ($_GET["form3"] == "form3")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao3'], "text"), GetSQLValueString($_GET['valor3'], "double"), GetSQLValueString("$dataexploded3", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form4"])) && ($_GET["form4"] == "form4")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao4'], "text"), GetSQLValueString($_GET['valor4'], "double"), GetSQLValueString("$dataexploded4", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form5"])) && ($_GET["form5"] == "form5")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao5'], "text"), GetSQLValueString($_GET['valor5'], "double"), GetSQLValueString("$dataexploded5", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form6"])) && ($_GET["form6"] == "form6")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao6'], "text"), GetSQLValueString($_GET['valor6'], "double"), GetSQLValueString("$dataexploded6", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form7"])) && ($_GET["form7"] == "form7")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao7'], "text"), GetSQLValueString($_GET['valor7'], "double"), GetSQLValueString("$dataexploded7", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form8"])) && ($_GET["form8"] == "form8")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao8'], "text"), GetSQLValueString($_GET['valor8'], "double"), GetSQLValueString("$dataexploded8", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form9"])) && ($_GET["form9"] == "form9")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao9'], "text"), GetSQLValueString($_GET['valor9'], "double"), GetSQLValueString("$dataexploded9", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form10"])) && ($_GET["form10"] == "form10")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao10'], "text"), GetSQLValueString($_GET['valor10'], "double"), GetSQLValueString("$dataexploded10", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form11"])) && ($_GET["form11"] == "form11")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao11'], "text"), GetSQLValueString($_GET['valor11'], "double"), GetSQLValueString("$dataexploded11", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form12"])) && ($_GET["form12"] == "form12")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao12'], "text"), GetSQLValueString($_GET['valor12'], "double"), GetSQLValueString("$dataexploded12", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); $insertGoTo = "add_conta_pg.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } } } } } } } } } } } $currentPage = $_SERVER["PHP_SELF"]; $maxRows_clientes = 10; $pageNum_clientes = 0; if (isset($_GET['pageNum_clientes'])) { $pageNum_clientes = $_GET['pageNum_clientes']; } $startRow_clientes = $pageNum_clientes * $maxRows_clientes; $queryString_clientes = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_clientes") == false && stristr($param, "totalRows_clientes") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_clientes = "&" . htmlentities(implode("&", $newParams)); } } $queryString_clientes = sprintf("&totalRows_clientes=%d%s", $totalRows_clientes, $queryString_clientes); ?> <style type="text/css"> <!-- .style2 { font-weight: bold; color: #000066; font-family: "Comic Sans MS"; } --> </style> <SCRIPT language=JavaScript1.1> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> </head> <div align="center"> <h1>Cadastro de Contas a Pagar<br> </h1> </div> <form method="GET" name="form1" action="?"> <input type="hidden" name="id" value="a_pagar"> <input type="hidden" name="add" value="<? if ($add == '0'){ echo '1'; } else { echo $add; } ?>" size="16"> <table width="815" height="62" align="left"> <!--DWLayoutTable--> <tr> <td width="379" rowspan="2" align="right" valign="top" nowrap><div align="left"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Descricão:</font></strong></div></td> <td width="86" rowspan="2" align="right" valign="top" nowrap><div align="left"><strong><font size="2" face="Verdana, Arial, He †††?e??????lvetica, sans-serif">Valor:</font></strong></div></td> <td width="3"></td> <td width="92" rowspan="2" align="right" valign="top" nowrap><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Vencimento:</strong></font></div></td> <td width="0"></td> <td width="86"><strong><font size="2" face="Verdana, Arial, He &dagger;&dagger;&dagger;?e??????lvetica, sans-serif">Parcelas:</font></strong></td> <td width="137" height="18"></td> </tr> <tr> <td></td> <td></td> <td height="6"></td> <td rowspan="2" valign="middle"> <input type="image" src="imagens/add.gif" align="right" width="30" height="30"></td> </tr> <tr> <td valign="top"><input type="text" name="descricao" size="63"></td> <td colspan="2" valign="top"><input type="text" name="valor" size="15"></td> <td colspan="2" valign="top"> <span id="sprytextfield1"> <input type="text" name="data_pg" size="16"> <span class="textfieldRequiredMsg"></span></span></td> <td height="26"><div align="center"> <select onchange="MM_jumpMenu('parent',this,0)" name="tipo"> <option value="N">N</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=1">1</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=2">2</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=3">3</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=4">4</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=5">5</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=6">6</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=7">7</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=8">8</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=9">9</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=10">10</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=11">11</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=12">12</option> </select> </div></td> </tr> <?php if ($add >= '2'){ echo ' <tr> <td valign="top"><input type="text" name="descricao2" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor2" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield2"><input type="text" name="data_pg2" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->2&nbsp;</td> </tr> <input type="hidden" name="form2" value="form2">'; } if ($add >= '3'){ echo ' <tr> <td valign="top"><input type="text" name="descricao3" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor3" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield3"><input type="text" name="data_pg3" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->3&nbsp;</td> </tr> <input type="hidden" name="form3" value="form3">'; } if ($add >= '4'){ echo ' <tr> <td valign="top"><input type="text" name="descricao4" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor4" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield4"><input type="text" name="data_pg4" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;4</td> </tr> <input type="hidden" name="form4" value="form4">'; } if ($add >= '5'){ echo ' <tr> <td valign="top"><input type="text" name="descricao5" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor5" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield5"><input type="text" name="data_pg5" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;5</td> </tr> <input type="hidden" name="form5" value="form5">'; } if ($add >= '6'){ echo ' <tr> <td valign="top"><input type="text" name="descricao6" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor6" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield6"><input type="text" name="data_pg6" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;6</td> </tr> <input type="hidden" name="form6" value="form6"> '; } if ($add >= '7'){ echo ' <tr> <td valign="top"><input type="text" name="descricao7" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor7" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield7"><input type="text" name="data_pg7" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;7</td> </tr> <input type="hidden" name="form7" value="form7"> '; } if ($add >= '8'){ echo ' <tr> <td valign="top"><input type="text" name="descricao8" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor8" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield8"><input type="text" name="data_pg8" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;8</td> </tr> <input type="hidden" name="form8" value="form8">'; } if ($add >= '9'){ echo ' <tr> <td valign="top"><input type="text" name="descricao9" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor9" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield9"><input type="text" name="data_pg9" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;9</td> </tr> <input type="hidden" name="form9" value="form9">'; } if ($add >= '10'){ echo ' <tr> <td valign="top"><input type="text" name="descricao10" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor10" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield10"><input type="text" name="data_pg10" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;10</td> </tr> <input type="hidden" name="form10" value="form10"> '; } if ($add >= '11'){ echo ' <tr> <td valign="top"><input type="text" name="descricao11" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor11" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield11"><input type="text" name="data_pg11" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;11</td> </tr> <input type="hidden" name="form11" value="form11"> '; } if ($add >= '12'){ echo '<tr> <td valign="top"><input type="text" name="descricao12" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor12" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield12"><input type="text" name="data_pg12" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;12</td> </tr> <input type="hidden" name="form12" value="form12"> '; } ob_end_flush() ?> </table> <input type="hidden" name="MM_insert" value="form1"> <input type="hidden" name="concluido" value="Informações incluidas com sucesso!<br>"> </form> <? $concluido = $_GET['concluido']; echo $concluido; ?> <script type="text/javascript"> <!-- var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield10 = new Spry.Widget.ValidationTextField("sprytextfield10", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield11 = new Spry.Widget.ValidationTextField("sprytextfield11", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield12 = new Spry.Widget.ValidationTextField("sprytextfield12", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); //--> </script>
  2. Boa tarde amigos, sou novo no mundo php, tenho um sistema aqui financeiro que um ex-funcionario reescreveu, e que adiciono varias contas a pagar mas como não consegui fazer de uma vez so eu tenho que adicionar varias cobranças ao mesmo tempo, vou colocar um ex: http://www.4shared.com/photo/KDEmqrycce/contas_02.html http://www.4shared.com/photo/wiXI659mba/contas.html http://www.4shared.com/download/KDEmqrycce/contas_02.jpg?lgfp=3000 http://www.4shared.com/download/wiXI659mba/contas.jpg?lgfp=3000 segue abaixo o codigo... <style> body { cursor: default; text-align: left; font-family: calibri, arial, sans-serif; font-size: 13px; margin: 0; padding: 5px; } table th { vertical-align: top; } input { text-align: center; font-family: calibri, arial, sans-serif; font-size: 13px; background-color: white; border-color: #abadb3 #dbdfe6 #e3e9ef #e2e3ea; padding: 2px; } input:focus, input:hover { border-color: #5794bf #b7d5ea #c7e2f1 #c5daed; } .infoBox { background-color: #fefdec; border: 1px solid #edebcd; padding: 6px; margin-bottom: 20px; } </style> <script src="js/SpryValidationTextField.js" type="text/javascript"></script><head> <link href="css/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <? $localp = "Adicionar Contas"; $add = $_GET['add']; $pegarid = $_GET['id']; $database_config2 = "nome_do_meu_BD"; include "config/config.php"; setlocale (LC_ALL, 'pt_BR'); if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } $data_pg = $_GET['data_pg']; $string = $data_pg; $exploded = explode("/", $string); $dataexploded = "".$exploded[2]."-".$exploded[1]."-".$exploded[0].""; $data_pg2 = $_GET['data_pg2']; $string2 = $data_pg2; $exploded2 = explode("/", $string2); $dataexploded2 = "".$exploded2[2]."-".$exploded2[1]."-".$exploded2[0].""; $data_pg3 = $_GET['data_pg3']; $string3 = $data_pg3; $exploded3 = explode("/", $string3); $dataexploded3 = "".$exploded3[2]."-".$exploded3[1]."-".$exploded3[0].""; $data_pg4 = $_GET['data_pg4']; $string4 = $data_pg4; $exploded4 = explode("/", $string4); $dataexploded4 = "".$exploded4[2]."-".$exploded4[1]."-".$exploded4[0].""; $data_pg5 = $_GET['data_pg5']; $string5 = $data_pg5; $exploded5 = explode("/", $string5); $dataexploded5 = "".$exploded5[2]."-".$exploded5[1]."-".$exploded5[0].""; $data_pg6 = $_GET['data_pg6']; $string6 = $data_pg6; $exploded6 = explode("/", $string6); $dataexploded6 = "".$exploded6[2]."-".$exploded6[1]."-".$exploded6[0].""; $data_pg7 = $_GET['data_pg7']; $string7 = $data_pg7; $exploded7 = explode("/", $string7); $dataexploded7 = "".$exploded7[2]."-".$exploded7[1]."-".$exploded7[0].""; $data_pg8 = $_GET['data_pg8']; $string8 = $data_pg8; $exploded8 = explode("/", $string8); $dataexploded8 = "".$exploded8[2]."-".$exploded8[1]."-".$exploded8[0].""; $data_pg9 = $_GET['data_pg9']; $string9 = $data_pg9; $exploded9 = explode("/", $string9); $dataexploded9 = "".$exploded9[2]."-".$exploded9[1]."-".$exploded9[0].""; $data_pg10 = $_GET['data_pg10']; $string10 = $data_pg10; $exploded10 = explode("/", $string10); $dataexploded10 = "".$exploded10[2]."-".$exploded10[1]."-".$exploded10[0].""; $data_pg11 = $_GET['data_pg11']; $string11 = $data_pg11; $exploded11 = explode("/", $string11); $dataexploded11 = "".$exploded11[2]."-".$exploded11[1]."-".$exploded11[0].""; $data_pg12 = $_GET['data_pg12']; $string12 = $data_pg12; $exploded12 = explode("/", $string12); $dataexploded12 = "".$exploded12[2]."-".$exploded12[1]."-".$exploded12[0].""; if ((isset($_GET["MM_insert"])) && ($_GET["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao'], "text"), GetSQLValueString($_GET['valor'], "double"), GetSQLValueString("$dataexploded", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); } if ((isset($_GET["form2"])) && ($_GET["form2"] == "form2")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao2'], "text"), GetSQLValueString($_GET['valor2'], "double"), GetSQLValueString("$dataexploded2", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form3"])) && ($_GET["form3"] == "form3")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao3'], "text"), GetSQLValueString($_GET['valor3'], "double"), GetSQLValueString("$dataexploded3", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form4"])) && ($_GET["form4"] == "form4")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao4'], "text"), GetSQLValueString($_GET['valor4'], "double"), GetSQLValueString("$dataexploded4", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form5"])) && ($_GET["form5"] == "form5")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao5'], "text"), GetSQLValueString($_GET['valor5'], "double"), GetSQLValueString("$dataexploded5", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form6"])) && ($_GET["form6"] == "form6")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao6'], "text"), GetSQLValueString($_GET['valor6'], "double"), GetSQLValueString("$dataexploded6", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form7"])) && ($_GET["form7"] == "form7")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao7'], "text"), GetSQLValueString($_GET['valor7'], "double"), GetSQLValueString("$dataexploded7", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form8"])) && ($_GET["form8"] == "form8")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao8'], "text"), GetSQLValueString($_GET['valor8'], "double"), GetSQLValueString("$dataexploded8", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form9"])) && ($_GET["form9"] == "form9")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao9'], "text"), GetSQLValueString($_GET['valor9'], "double"), GetSQLValueString("$dataexploded9", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form10"])) && ($_GET["form10"] == "form10")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao10'], "text"), GetSQLValueString($_GET['valor10'], "double"), GetSQLValueString("$dataexploded10", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form11"])) && ($_GET["form11"] == "form11")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao11'], "text"), GetSQLValueString($_GET['valor11'], "double"), GetSQLValueString("$dataexploded11", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); if ((isset($_GET["form12"])) && ($_GET["form12"] == "form12")) { $insertSQL = sprintf("INSERT INTO planejamento (descricao, valor, data_pg) VALUES (%s, %s, %s)", GetSQLValueString($_GET['descricao12'], "text"), GetSQLValueString($_GET['valor12'], "double"), GetSQLValueString("$dataexploded12", "text")); mysql_select_db($database_config2, $config); $Result1 = mysql_query($insertSQL, $config) or die(mysql_error()); $insertGoTo = "add_conta_pg.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } } } } } } } } } } } $currentPage = $_SERVER["PHP_SELF"]; $maxRows_clientes = 10; $pageNum_clientes = 0; if (isset($_GET['pageNum_clientes'])) { $pageNum_clientes = $_GET['pageNum_clientes']; } $startRow_clientes = $pageNum_clientes * $maxRows_clientes; $queryString_clientes = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_clientes") == false && stristr($param, "totalRows_clientes") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_clientes = "&" . htmlentities(implode("&", $newParams)); } } $queryString_clientes = sprintf("&totalRows_clientes=%d%s", $totalRows_clientes, $queryString_clientes); ?> <style type="text/css"> <!-- .style2 { font-weight: bold; color: #000066; font-family: "Comic Sans MS"; } --> </style> <SCRIPT language=JavaScript1.1> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> </head> <div align="center"> <h1>Cadastro de Contas a Pagar<br> </h1> </div> <form method="GET" name="form1" action="?"> <input type="hidden" name="id" value="a_pagar"> <input type="hidden" name="add" value="<? if ($add == '0'){ echo '1'; } else { echo $add; } ?>" size="16"> <table width="815" height="62" align="left"> <!--DWLayoutTable--> <tr> <td width="379" rowspan="2" align="right" valign="top" nowrap><div align="left"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Descricão:</font></strong></div></td> <td width="86" rowspan="2" align="right" valign="top" nowrap><div align="left"><strong><font size="2" face="Verdana, Arial, He †††?e??????lvetica, sans-serif">Valor:</font></strong></div></td> <td width="3"></td> <td width="92" rowspan="2" align="right" valign="top" nowrap><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Vencimento:</strong></font></div></td> <td width="0"></td> <td width="86"><strong><font size="2" face="Verdana, Arial, He &dagger;&dagger;&dagger;?e??????lvetica, sans-serif">Parcelas:</font></strong></td> <td width="137" height="18"></td> </tr> <tr> <td></td> <td></td> <td height="6"></td> <td rowspan="2" valign="middle"> <input type="image" src="imagens/add.gif" align="right" width="30" height="30"></td> </tr> <tr> <td valign="top"><input type="text" name="descricao" size="63"></td> <td colspan="2" valign="top"><input type="text" name="valor" size="15"></td> <td colspan="2" valign="top"> <span id="sprytextfield1"> <input type="text" name="data_pg" size="16"> <span class="textfieldRequiredMsg"></span></span></td> <td height="26"><div align="center"> <select onchange="MM_jumpMenu('parent',this,0)" name="tipo"> <option value="N">N</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=1">1</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=2">2</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=3">3</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=4">4</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=5">5</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=6">6</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=7">7</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=8">8</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=9">9</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=10">10</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=11">11</option> <option value="<? echo '?id='.$pegarid.''; ?>&add=12">12</option> </select> </div></td> </tr> <?php if ($add >= '2'){ echo ' <tr> <td valign="top"><input type="text" name="descricao2" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor2" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield2"><input type="text" name="data_pg2" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->2&nbsp;</td> </tr> <input type="hidden" name="form2" value="form2">'; } if ($add >= '3'){ echo ' <tr> <td valign="top"><input type="text" name="descricao3" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor3" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield3"><input type="text" name="data_pg3" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->3&nbsp;</td> </tr> <input type="hidden" name="form3" value="form3">'; } if ($add >= '4'){ echo ' <tr> <td valign="top"><input type="text" name="descricao4" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor4" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield4"><input type="text" name="data_pg4" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;4</td> </tr> <input type="hidden" name="form4" value="form4">'; } if ($add >= '5'){ echo ' <tr> <td valign="top"><input type="text" name="descricao5" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor5" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield5"><input type="text" name="data_pg5" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;5</td> </tr> <input type="hidden" name="form5" value="form5">'; } if ($add >= '6'){ echo ' <tr> <td valign="top"><input type="text" name="descricao6" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor6" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield6"><input type="text" name="data_pg6" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;6</td> </tr> <input type="hidden" name="form6" value="form6"> '; } if ($add >= '7'){ echo ' <tr> <td valign="top"><input type="text" name="descricao7" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor7" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield7"><input type="text" name="data_pg7" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;7</td> </tr> <input type="hidden" name="form7" value="form7"> '; } if ($add >= '8'){ echo ' <tr> <td valign="top"><input type="text" name="descricao8" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor8" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield8"><input type="text" name="data_pg8" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;8</td> </tr> <input type="hidden" name="form8" value="form8">'; } if ($add >= '9'){ echo ' <tr> <td valign="top"><input type="text" name="descricao9" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor9" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield9"><input type="text" name="data_pg9" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;9</td> </tr> <input type="hidden" name="form9" value="form9">'; } if ($add >= '10'){ echo ' <tr> <td valign="top"><input type="text" name="descricao10" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor10" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield10"><input type="text" name="data_pg10" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;10</td> </tr> <input type="hidden" name="form10" value="form10"> '; } if ($add >= '11'){ echo ' <tr> <td valign="top"><input type="text" name="descricao11" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor11" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield11"><input type="text" name="data_pg11" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;11</td> </tr> <input type="hidden" name="form11" value="form11"> '; } if ($add >= '12'){ echo '<tr> <td valign="top"><input type="text" name="descricao12" value="" size="63" /></td> <td colspan="2" valign="top"><input type="text" name="valor12" value="" size="15" /></td> <td colspan="2" valign="top"><span id="sprytextfield12"><input type="text" name="data_pg12" value="" size="16" /><span class="textfieldRequiredMsg"></span></span></td> <td height="21"><!--DWLayoutEmptyCell-->&nbsp;</td> <td valign="middle"><!--DWLayoutEmptyCell-->&nbsp;12</td> </tr> <input type="hidden" name="form12" value="form12"> '; } ob_end_flush() ?> </table> <input type="hidden" name="MM_insert" value="form1"> <input type="hidden" name="concluido" value="Informações incluidas com sucesso!<br>"> </form> <? $concluido = $_GET['concluido']; echo $concluido; ?> <script type="text/javascript"> <!-- var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield10 = new Spry.Widget.ValidationTextField("sprytextfield10", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield11 = new Spry.Widget.ValidationTextField("sprytextfield11", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); var sprytextfield12 = new Spry.Widget.ValidationTextField("sprytextfield12", "custom", {validateOn:["blur"], useCharacterMasking:true, pattern:"00/00/0000"}); //--> </script>
  3. flaviobji

    Erro na index

    já tentei e achei estas linhas: <form name="form1" method="post" action="index.php"> <div align="center"> <fieldset id="field"> <? $erro = $_GET['erro']; ?> <legend><? echo "<font face=\"Verdana\" size=\"2\"><b>" . $erro . "</b></font>"; ?></legend> <table width="245" border="0" align="center" cellpadding="0" cellspacing="0" class="table"> <tr> <td width="100" scope="col"><span class="text_form">Login:</span></td> <td width="145" scope="col"><input name="usuario" type="text" id="usuario"></td> </tr> <tr> quando eu retiro esta linha : <legend><? echo "<font face=\"Verdana\" size=\"2\"><b>" . $erro . "</b></font>"; ?></legend> não da mais o erro, mas tb não consegui antenticar na tela de login. se puder me add no MSN atendimento@i9link.com.br
  4. ola amigo será que alguém poderia me passar este sistema de os aki esta dando link invalido: sistemaos.rar
  5. amigo e seu sistema de ordem de serviço, terminou? teria como me passar meu MSN atendimento@i9link.com.br
  6. flaviobji

    Erro na index

    ola amigos tenho 1 sistema financeiro, no linux slackware, estava funcionando mt bem mas a makina queimou e como não foi eu quem havia instalado e não manjo quase nada de php, eu tenho todos os backups, e o sistema consiste na seguinte descrição: são 2 bancos de dados: 1°: admin 2°: financeiro coloquei em 1 makina windows com wampp para testes porque no linux tb estava dando erros: /var/www/htdocs/financeiro arquivos dentro da pasta principal /financeiro index.php e restrito.php com 1 senha para quando abrir a index cair na pagina para digitar usuario e a senha para entrar no sistema: restrito.php >>> <? $usuario="joao"; $senha="abc123"; // DAQUI PRA BAIXO não MEXA function msg_erro(){ header('WWW-Authenticate: Basic realm="Acesso Restrito"'); header('HTTP/1.0 401 Unauthorized'); echo '<h3>Acesso Restrito - Digite os dados na Autenticação</h3>'; exit; } if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) { msg_erro(); }else{ if ($_SERVER['PHP_AUTH_USER']!=$usuario || $_SERVER['PHP_AUTH_PW']!=$senha) { msg_erro(); } } ?> arquivos dentro da pasta config/config config.php, connect.php, connectv.php e session.php, todos com usuarios e senha do banco de dados quando digito o endereço no firefox ou crhome aparece o seguinte erro: " . $erro . ""; ?> alguém tem alguma ideia de como solucionar este problema?
×
×
  • Criar Novo...