function __construct() { $variables = new Variables(); $connect = new Connect($variables->dbHost, $variables->dbUser, $variables->dbPassword, $variables->dbName); $result; //receinving and striping the variables $this->userMatricula = $connect->antiInjection(isset($_POST["tfMatricula"]) ? $_POST["tfMatricula"] : NULL); $this->password = $connect->antiInjection(isset($_POST["tfPassword"]) ? $_POST["tfPassword"] : NULL); $this->select = $connect->antiInjection(isset($_POST["slSelect"]) ? $_POST["slSelect"] : NULL); if (!$connect->start()) { echo "Impossible to start connection in Sigin."; } //encoding to md5 hash $this->password = base64_encode($this->password); if (!($result = $connect->execute("SELECT * FROM Cadastros c INNER JOIN Folhas f ON c.codigo_fol = f.codigo_fol WHERE c.matricula = '{$this->userMatricula}' AND c.senha = '{$this->password}' AND f.codigo_fol = '{$this->select}'"))) { echo "Impossible to execute MySQL query."; } if ($connect->counterResult($result) > 0) { $result = $connect->execute("SELECT * FROM Pessoal WHERE matricula = '{$this->userMatricula}'"); $row = mysql_fetch_assoc($result); $_SESSION["user"] = $this->userMatricula; $_SESSION["userPass"] = $this->password; $_SESSION["nome"] = $row["nome"]; $connect->close(); header("Location: ../index.php?ok=true"); die; } $connect->close(); header("Location: ../index.php?ok=false"); die; }
function __construct() { $variables = new Variables(); $connect = new Connect($variables->dbHost, $variables->dbUser, $variables->dbPassword, $variables->dbName); //receinving and striping the variables $this->name = $connect->antiInjection(isset($_POST["tfNome"]) ? $_POST["tfNome"] : NULL); $this->description = $connect->antiInjection(isset($_POST["tdDescricao"]) ? $_POST["tdDescricao"] : NULL); if (strlen($this->name) == 0) { header("Location: ../importDocuments.php?upl=false&tab=folha"); die; } if (!$connect->start()) { echo "Impossible to star connection in Sigin."; } if (!$connect->execute("INSERT INTO Folhas (nome, descricao) VALUES ('{$this->name}', '{$this->description}')")) { echo "Impossible to execute MySQL query."; } if ($connect->counterAffected() > 0) { header("Location: ../importDocuments.php?upl=true&tab=folha"); } else { header("Location: ../importDocuments.php?upl=false&tab=folha"); } $connect->close(); die; }
function __construct() { $variables = new Variables(); $connect = new Connect($variables->dbHost, $variables->dbUser, $variables->dbPassword, $variables->dbName); //receinving and striping the variables $this->nivel = $connect->antiInjection(isset($_POST["slNivel"]) ? $_POST["slNivel"] : NULL); $this->userName = $connect->antiInjection(isset($_POST["tfUserName"]) ? $_POST["tfUserName"] : NULL); $this->password = $connect->antiInjection(isset($_POST["tfPassword"]) ? $_POST["tfPassword"] : NULL); $this->password2 = $connect->antiInjection(isset($_POST["tfPassword2"]) ? $_POST["tfPassword2"] : NULL); if ($this->password != $this->password2) { header("Location: ../importDocuments.php?sigin=false"); die; } if (!$connect->start()) { echo "Impossible to star connection in Sigin."; } //encoding to md5 hash $this->password = md5($this->password); if (!$connect->execute("INSERT INTO Administradores (id_nivel, usuario, senha) VALUES ({$this->nivel}, '{$this->userName}', '{$this->password}')")) { echo "Impossible to execute MySQL query."; } if ($connect->counterAffected() > 0) { header("Location: ../importDocuments.php?sigin=true"); } else { header("Location: ../importDocuments.php?sigin=false"); } $connect->close(); die; }
function __construct() { foreach ($_POST as $fieldName => $value) { $comand = "\$" . $fieldName . "='" . $value . "';"; eval($comand); } $DB; //seting up the matrix of datas for ($x = 0; $x < $numRows; $x++) { for ($y = 0; $y < $numFields; $y++) { $str = "tf{$x}{$y}"; eval("\$aux = \"\${$str}\";"); $DB[$x][$y] = $aux; } } //by security, it conts the amount of rows to update $loopForUpdate = 0; for ($x = 0; $x < $numRows; $x++) { if ($DB[$x][0] == NULL) { continue; } $loopForUpdate++; } //starting the data base $variables = new Variables(); $MySQLconnect = new Connect($variables->dbHost, $variables->dbUser, $variables->dbPassword, $variables->dbName); //it conts the amount of rows it was updated $uptCont = 0; if (!$MySQLconnect->start()) { echo "Impossible to star connection in Handler."; } for ($x = 0; $x < $numRows; $x++) { if ($DB[$x][0] == NULL) { continue; } switch ($tableId) { case "dcr": $aux = "UPDATE Cargos SET descricao_cargo = '" . $DB[$x][1] . "', tipo='" . $DB[$x][2] . "', vencimento=" . $DB[$x][3] . " WHERE cargo='" . $DB[$x][0] . "'"; break; case "dlt": $aux = "UPDATE Lotacoes SET descricao_lotacao = '" . $this->DB[$x][1] . "', secretaria = '" . $this->DB[$x][2] . "' WHERE lotacao='" . $this->DB[$x][0] . "'"; break; case "especial": $aux = "UPDATE Especialidades SET descricao_especialidade = '" . $this->DB[$x][1] . "', cargo = '" . $this->DB[$x][2] . "' WHERE codigo_esp='" . $this->DB[$x][0] . "'"; break; case "eventos": $aux = "UPDATE Eventos SET descricao_evento='" . $this->DB[$x][1] . "', IRRF='" . $this->DB[$x][2] . "', IPMT='" . $this->DB[$x][3] . "', FAL='" . $this->DB[$x][4] . "', FIXO='" . $this->DB[$x][5] . "', TEMP='" . $this->DB[$x][6] . "', valor_eve=" . $this->DB[$x][7] . ", GRAT='" . $this->DB[$x][8] . "', FGTS='" . $this->DB[$x][9] . "', desconto=" . $this->DB[$x][10] . ", nivel_eve='" . $this->DB[$x][11] . "', INSS='" . $this->DB[$x][12] . "' WHERE codigo_eve='" . $this->DB[$x][0] . "'"; break; } if ($MySQLconnect->execute($aux)) { $uptCont++; } } $MySQLconnect->close(); if ($uptCont == $loopForUpdate) { header("Location: ../importDocuments.php?upl=true&tab={$tableId}"); } else { header("Location: ../importDocuments.php?upl=false&tab={$tableId}"); } }
function __construct() { $variables = new Variables(); $connect = new Connect($variables->dbHost, $variables->dbUser, $variables->dbPassword, $variables->dbName); $result; $xkey = "fmsfmsfms"; if (!$connect->start()) { echo "Impossible to star connection in Sigin."; } if (!($result = $connect->execute("SELECT matricula, senha, codigo_fol FROM Cadastros ORDER BY matricula"))) { echo "Impossible to execute MySQL query."; } while ($row = mysql_fetch_array($result)) { echo "Matricula: " . zkl($xkey, $row["matricula"]) . ", senha: " . base64_decode($row["senha"]) . ", folha: " . $row["codigo_fol"] . "<br/>"; } //$connect->close(); }
function __construct() { $variables = new Variables(); $connect = new Connect($variables->dbHost, $variables->dbUser, $variables->dbPassword, $variables->dbName); $result; //receinving and striping the variables $this->userName = $connect->antiInjection(isset($_POST["tfUserName"]) ? $_POST["tfUserName"] : NULL); $this->password = $connect->antiInjection(isset($_POST["tfPassword"]) ? $_POST["tfPassword"] : NULL); if (!$connect->start()) { echo "Impossible to star connection in Sigin."; } //encoding to md5 hash $this->password = md5($this->password); if (!($result = $connect->execute("SELECT * FROM Administradores WHERE usuario = '{$this->userName}' and senha = '{$this->password}'"))) { echo "Impossible to execute MySQL query."; } if ($connect->counterResult($result) > 0) { $_SESSION["usuario"] = $this->userName; $_SESSION["senha"] = $this->password; $row = mysql_fetch_assoc($result); $_SESSION["nivel"] = $row["id_nivel"]; //$connect->close(); switch ($_SESSION["nivel"]) { case 1: header("Location: ../importDocuments.php"); break; case 2: header("Location: ../makeRegister.php"); break; } die; } //$connect->close(); header("Location: ../admin.php?login=false"); die; }
<div align="center" class="wordsLabel2">FMS Contracheque On-line </div> <br /> <table width="100%" border="0"> <tr> <td width="44%" class="words2"><div align="right">A qual folha você pertence:</div></td> <td width="56%"><select name="slSelect"> <option value="0">Escolha</option> <?php /* FDSC - Funcionários disposição comissionado serviço prestado FMSA - PACS - FPUM - */ $result = $connect->execute("SELECT codigo_fol, descricao FROM Folhas ORDER BY codigo_fol"); while ($row = mysql_fetch_assoc($result)) { echo "<option value='" . $row["codigo_fol"] . "'>" . $row["descricao"] . "</option>"; } //$connect->close(); ?> </select></td> </tr> <tr> <td class="words2"><div align="right">Informe a sua matrícula:</div></td> <td><input name="tfMatricula" autocomplete="off" type="text" id="tfMatricula" size="20" maxlength="50" /></td> </tr> <tr> <td class="words2"><div align="right">Informe a sua senha:</div></td> <td><input name="tfPassword" type="password" id="tfPassword" size="20" maxlength="25" /></td> </tr>
<?php $uf = isset($_GET["uf"]) ? $_GET["uf"] : "%"; $cidade = urldecode(isset($_GET["cidade"]) ? $_GET["cidade"] : "%"); $bairro = urldecode(isset($_GET["bairro"]) ? $_GET["bairro"] : "%"); $cep = isset($_GET["cep"]) ? $_GET["cep"] : "%"; $text = urldecode(isset($_GET["text"]) ? $_GET["text"] : "%"); if ($text != NULL && strlen($uf) > 1 && strlen($cidade) > 1 && strlen($bairro) > 1) { require_once "Connect.class.php"; include_once "../beans/Variables.class.php"; $variables = new Variables(); $connect = new Connect($variables->dbHost, $variables->dbUser, $variables->dbPassword, $variables->dbName); $connect->start(); $db = "br_estado_" . strtolower($uf); $text .= ".{0,}"; $sql = "SELECT distinct tp_logradouro FROM {$db} WHERE tp_logradouro REGEXP '{$text}' AND cidade = '{$cidade}' AND bairro = '{$bairro}'"; $result = $connect->execute($sql); echo "<div id='---'>Selecione um logradouro!</div>"; while ($row = mysql_fetch_assoc($result)) { echo "<div id='" . $row["tp_logradouro"] . "' onclick='javascript: setLogradouto(\"" . urlencode($row["tp_logradouro"]) . "\", \"tfTipoLog\");' style='cursor:pointer'>" . utf8_encode($row["tp_logradouro"]) . "</div>"; } } else { echo "Digite seu logradouro"; }
<?php $uf = isset($_GET["uf"]) ? $_GET["uf"] : "%"; $cep = isset($_GET["cep"]) ? $_GET["cep"] : "%"; $text = isset($_GET["text"]) ? $_GET["text"] : "%"; if ($text != NULL && $uf != NULL) { require_once "Connect.class.php"; include_once "../beans/Variables.class.php"; $variables = new Variables(); $connect = new Connect($variables->dbHost, $variables->dbUser, $variables->dbPassword, $variables->dbName); $connect->start(); $text .= ".{0,}"; $result = $connect->execute("SELECT * FROM bairros WHERE bai_nome REGEXP '{$text}'"); echo "<div id='---'>Selecione um bairro!</div>"; while ($row = mysql_fetch_assoc($result)) { echo "<div id='" . $row["bai_codigo"] . "' onclick='javascript: setLogradouto(\"" . $row["bai_codigo"] . "\", \"tfBairro\");' style='cursor:pointer'>" . utf8_encode($row["bai_nome"]) . "</div>"; } } else { echo "Digite seu bairro"; }
<?php $uf = isset($_GET["uf"]) ? $_GET["uf"] : NULL; if ($uf != NULL) { require_once "Connect.class.php"; include_once "../beans/Variables.class.php"; $variables = new Variables(); $connect = new Connect($variables->dbHost, $variables->dbUser, $variables->dbPassword, $variables->dbName); $connect->start(); $result = $connect->execute("SELECT * FROM cidades WHERE est_codigo=" . $uf . " ORDER BY cid_nome"); echo "<option value='---' selected='selected'>Selecione uma cidade</option>"; while ($row = mysql_fetch_assoc($result)) { echo "<option value=" . $row["cid_codigo"] . ">" . utf8_encode($row["cid_nome"]) . "</option>"; } } else { echo "ERRO!"; }
function fixProblems($numFields, $numRows) { $variables = new Variables(); $nR = 0; $MySQLconnect = new Connect($variables->dbHost, $variables->dbUser, $variables->dbPassword, $variables->dbName); /*if($this->tableId == "cadstro"){ for($x=0; $x<$numRows; $x++){ $aux = array("UPDATE Cadastros SET cargo='".$this->DB[$x][8]."', lotacao='".$this->DB[$x][1]."', data_admissao='".$this->dateFormater($this->DB[$x][4])."', vinculo='".$this->DB[$x][5]."', previdencia'".$this->DB[$x][7]."', nivel='".$this->DB[$x][9]."', dep_imp_re='".$this->DB[$x][11]."', hora_sem='".$this->DB[$x][13]."', instrucao='".$this->DB[$x][14]."', data_afastamento='".$this->dateFormater($this->DB[$x][18])."', sindical='".$this->DB[$x][19]."', dp_sal_fam='".$this->DB[$x][20]."', hora_ponto='".$this->DB[$x][21]."', vale_transporte='".$this->DB[$x][22]."', data_promocao='".$this->dateFormater($this->DB[$x][24])."', tipo='".$this->DB[$x][27]."', situacao='".$this->DB[$x][28]."', descontar='".$this->DB[$x][29]."', receber='".$this->DB[$x][30]."', funcao='".$this->DB[$x][31]."', maior_360='".$this->DB[$x][33]."', prof_40h='".$this->DB[$x][34]."', vlt_ver='".$this->DB[$x][35]."', val_niv=".$this->valueFormater($this->DB[$x][36]).", data_FGTS='".$this->dateFormater($this->DB[$x][37])."', permanente='".$this->DB[$x][38]."', remuneracao_bruto=".$this->valueFormater($this->DB[$x][39]).", vencimento=".$this->valueFormater($this->DB[$x][40]).", flag='".$this->DB[$x][41]."', entrada='".$this->DB[$x][42]."', liquido=".$this->valueFormater($this->DB[$x][45]).", sobregrat='".$this->DB[$x][46]."', assistencia='".$this->DB[$x][47]."', medico='".$this->DB[$x][48]."', codigo_fol=".$code." WHERE matricula='".addslashes(zkl($this->xkey, $this->DB[$x][0])."'", "UPDATE Pessoal SET nome='".addslashes(zkl($this->xkey, $this->DB[$x][3])."', sexo='".$this->DB[$x][12]."', CPF='".addslashes(zkl($this->xkey, $this->DB[$x][15])."', PIS_PASEP='".addslashes(zkl($this->xkey, $this->DB[$x][16])."', data_nascimento='".$this->dateFormater($this->DB[$x][17])."', ultimo_nome='".addslashes(zkl($this->xkey, $this->DB[$x][32])."', codigo_fol=".$code." WHERE matricula='".addslashes(zkl($this->xkey, $this->DB[$x][0])."'", "UPDATE RG SET identidade='".addslashes(zkl($this->xkey, $this->DB[$x][25])."', orgao_expedidor='".addslashes(zkl($this->xkey, $this->DB[$x][26])."', codigo_fol=".$code." WHERE matricula='".addslashes(zkl($this->xkey, $this->DB[$x][0])."'", "UPDATE Inf_Bancaria SET conta='".addslashes(zkl($this->xkey, $this->DB[$x][6])."', banco='".$this->DB[$x][43]."', numero='".addslashes(zkl($this->xkey, $this->DB[$x][44])."', codigo_fol=".$code." WHERE matricula='".addslashes(zkl($this->xkey, $this->DB[$x][0])."'"); foreach($aux as $temp){ $MySQLconnect->execute($temp); } } }*/ if (!$MySQLconnect->start()) { echo "Impossible to star connection in Handler."; } echo '<script language="javascript" type="text/javascript"> function setField(param, cont){ for(x=0; x<cont; x++){ eval("if(document.form."+param+x+".disabled == true){document.form."+param+x+".disabled = false;}else{ document.form."+param+x+".disabled = true;}"); } return true; } </script> <form id="form" name="form" method="post" action="Updater.class.php">'; for ($x = 0; $x < $numRows; $x++) { if ($this->DB[$x][$numFields] == "true") { echo '<table width="100%" border="1"><tr><td width="62">Modificar:</td><td width="586"><table width="100%" border="1"><tr><td width="43">Antigo:</td>'; switch ($this->tableId) { case "dcr": $aux = "SELECT * FROM Cargos WHERE cargo='" . $this->DB[$x][0] . "'"; $columnNames = array("Cargo", "Descicao", "Tipo", "Vencimento"); break; case "dlt": $aux = "SELECT * FROM Lotacoes WHERE lotacao='" . $this->DB[$x][0] . "'"; $columnNames = array("Lotação", "Descicao", "Secretaria"); break; case "especial": $aux = "SELECT * FROM Especialidades WHERE codigo_esp ='" . $this->DB[$x][0] . "'"; $columnNames = array("Código", "Descicao", "Cargo"); break; case "eventos": $aux = "SELECT * FROM Eventos WHERE codigo_eve ='" . $this->DB[$x][0] . "'"; $columnNames = array("Código", "Descrição", "IRRF", "IPMT", "FAL", "FIXO", "TEMP", "Valor", "Gratifição", "FGTS", "Desconto", "Nível", "INSS"); break; /*case "cadastro" : $aux = "SELECT * FROM Pessoal p INNER JOIN Cadastros c ON p.matricula = c.matricula INNER JOIN inf_bancaria ib ON c.matricula = ib.matricula INNER JOIN rg ON c.matricula = rg.matricula WHERE c.matricula='".addslashes(zkl($this->xkey, $this->DB[$x][0])."'"; $columnNames = array("matricula", "nome", "sexo", "CPF", "PIS_PASEP", "data_nascimento","ultimo_nome","Codigo", "Matricula", "Cargo", "Lotacao", "Data admissão", "Vínculo", "Previdência", "Nível", "dep_imp_re", "hora_sem", "instrução", "data_afastamento", "sindical", "dp_sal_fam", "hora_ponto", "vale_transporte", "data_promocao", "tipo", "situação", "descontar", "receber", "funcao", "maior_360", "prof_40h", "vlt_ver", "val_niv", "data_FGTS", "permanente", "remuneracao_bruto", "vencimento", "flag", "entrada", "liquido", "sobregrat", "assistencia","medico", "senha", "Código", "Matricula", "conta", "banco", "numero", "código", "matricula", "identidade", "orgão_expedidor", "código");*/ /*matricula, cargo, lotacao, data_admissao, vinculo, previdencia, nivel, dep_imp_re, hora_sem, instrucao, data_afastamento, sindical, dp_sal_fam, hora_ponto, vale_transporte, data_promocao, tipo, situacao, descontar, receber, funcao, maior_360, prof_40h, vlt_ver, val_niv, data_FGTS, permanente, remuneracao_bruto, vencimento, flag, entrada, liquido, sobregrat, assistencia, medico, senha, codigo, matricula, nome, sexo, CPF, PIS_PASEP, data_nascimento, ultimo_nome, codigo, matricula, identidade, orgao_expedidor, codigo, matricula, conta, banco, numero, codigo*/ /*$ar = array(0, 3, 12, 15, 16, 17, 32, "x", 0, 8, 1, 4, 5, 7, 9, 11, 13, 14, 18, 19, 20, 21, 22, 24, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 47, 48, "x", "x", 0, 6, 43, 44, "x", 0, 25, 26, "x"); break;*/ /*case "cadastro" : $aux = "SELECT * FROM Pessoal p INNER JOIN Cadastros c ON p.matricula = c.matricula INNER JOIN inf_bancaria ib ON c.matricula = ib.matricula INNER JOIN rg ON c.matricula = rg.matricula WHERE c.matricula='".addslashes(zkl($this->xkey, $this->DB[$x][0])."'"; $columnNames = array("matricula", "nome", "sexo", "CPF", "PIS_PASEP", "data_nascimento","ultimo_nome","Codigo", "Matricula", "Cargo", "Lotacao", "Data admissão", "Vínculo", "Previdência", "Nível", "dep_imp_re", "hora_sem", "instrução", "data_afastamento", "sindical", "dp_sal_fam", "hora_ponto", "vale_transporte", "data_promocao", "tipo", "situação", "descontar", "receber", "funcao", "maior_360", "prof_40h", "vlt_ver", "val_niv", "data_FGTS", "permanente", "remuneracao_bruto", "vencimento", "flag", "entrada", "liquido", "sobregrat", "assistencia","medico", "senha", "Código", "Matricula", "conta", "banco", "numero", "código", "matricula", "identidade", "orgão_expedidor", "código");*/ /*matricula, cargo, lotacao, data_admissao, vinculo, previdencia, nivel, dep_imp_re, hora_sem, instrucao, data_afastamento, sindical, dp_sal_fam, hora_ponto, vale_transporte, data_promocao, tipo, situacao, descontar, receber, funcao, maior_360, prof_40h, vlt_ver, val_niv, data_FGTS, permanente, remuneracao_bruto, vencimento, flag, entrada, liquido, sobregrat, assistencia, medico, senha, codigo, matricula, nome, sexo, CPF, PIS_PASEP, data_nascimento, ultimo_nome, codigo, matricula, identidade, orgao_expedidor, codigo, matricula, conta, banco, numero, codigo*/ /*$ar = array(0, 3, 12, 15, 16, 17, 32, "x", 0, 8, 1, 4, 5, 7, 9, 11, 13, 14, 18, 19, 20, 21, 22, 24, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 47, 48, "x", "x", 0, 6, 43, 44, "x", 0, 25, 26, "x"); break;*/ default: $aux = "autoUp"; } $row = mysql_fetch_array($MySQLconnect->execute($aux)); for ($y = 0; $y < $numFields; $y++) { echo '<td>' . $columnNames[$y] . ': ' . $row[$y] . '</td>'; } echo '</tr><tr><td>Novo:</td>'; for ($y = 0; $y < $numFields; $y++) { echo '<td>' . $columnNames[$y] . ': <input name="tf' . $x . $y . '" disabled="disabled" type="text" id="tf' . $x . $y . '" value="' . $this->DB[$x][$y] . '"/></td>'; } echo '</tr></table></td><td width="96">Marcar: <input type="checkbox" name="checkbox' . $x . '" value="checkbox' . $x . '" onchange="javascript: return setField(' . "'" . 'tf' . $x . "'" . ', ' . $numFields . ');"/></td></tr></table>'; } } echo '<input name="tableId" type="text" id="tableId" style="visibility:hidden" value="' . $this->tableId . '"/><input name="numFields" type="text" id="numFields" style="visibility:hidden" value="' . $numFields . '"/><input name="numRows" type="text" id="numRows" style="visibility:hidden" value="' . $nR . '"/><input name="update" type="submit" id="update" value="Atualizar" /></form>'; //$MySQLconnect->close(); }
include_once "../beans/Variables.class.php"; require_once "../utils/Connect.class.php"; $variables = new Variables(); $connect = new Connect($variables->dbHost, $variables->dbUser, $variables->dbPassword, $variables->dbName); $oldPass = $connect->antiInjection(isset($_POST["tfOldPass"]) ? $_POST["tfOldPass"] : NULL); $newPass1 = $connect->antiInjection(isset($_POST["tfNewPass1"]) ? $_POST["tfNewPass1"] : NULL); $newPass2 = $connect->antiInjection(isset($_POST["tfNewPass2"]) ? $_POST["tfNewPass2"] : NULL); if (strcmp($newPass1, $newPass2) == 0) { $newPass1 = base64_encode($newPass1); $oldPass = base64_encode($oldPass); } else { $connect->close(); header("Location: ../index.php?pass=false"); die; } if (!$connect->start()) { echo "Impossible to star connection in Sigin."; } if (!($result = $connect->execute("SELECT * FROM Cadastros WHERE matricula = '" . $_SESSION["user"] . "' AND senha = '" . $oldPass . "'"))) { echo "Impossible to execute MySQL query."; } if ($connect->counterResult($result) > 0) { $connect->execute("UPDATE Cadastros SET senha='" . $newPass1 . "' WHERE matricula = '" . $_SESSION["user"] . "'"); $_SESSION["userPass"] = $newPass1; $connect->close(); header("Location: ../index.php?pass=true"); die; } $connect->close(); header("Location: ../index.php?pass=false"); die;
</tr> </table> </div> <div id="divBoxCadCalc"> <table width="863" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="74"><img src="images/box_l.png" /></td> <td width="596" align="center" valign="middle" background="images/box_c.png"><table width="100%"> <tr> <td><form id="cadcalc" name="cadcalc" enctype="multipart/form-data" method="post" action="utils/Uploader.class.php"> <label> <span class="words1"><span class="wordsLabel2">Arquivo</span> <select name="select"> <option>Escolha</option> <?php $result = $connect->execute("SELECT nome FROM Folhas"); while ($row = mysql_fetch_assoc($result)) { echo "<option>" . $row["nome"] . "</option>"; } ?> </select> <span class="wordsLabel2">_CAD.DBF</span><br /> Enviar tabela Cadastro:</span> <input name="archive" type="file" id="archive" size="50" /> <input name="table" type="text" id="table" style="visibility:hidden" value="cadastro" size="5" maxlength="3"/> </label> <label> <input name="submitCadastro" type="submit" id="submitCadastro" value="Enviar Cadastro" /> </label> </form></td> </tr>