############################################################################################################## ## get user data ############################################################################################################## ########################################################################################################################################## ## start edit user data ########################################################################################################################################## if (isset($_POST['userInsert'])) { $enterID = $this->clearNumeric($_SESSION['vtxUser']); # import class to form validation $this->vLoadClass($this->vconf['path'], "/vActions.phar/class.forms.php"); # start new class $v = new forms(); $v->classeErro = 'formPointer'; $falha[] = $v->validatorField('passact', "Digite senha atual"); if (!empty($_POST['pass'])) { $msgErro = $v->validatorEqual($_POST['pass'], $_POST['passt'], "Senhas não conferem"); $falha[] = $v->validatorFieldSet('pass', $msgErro); } if (isset($_POST['pass']) && strlen($_POST['pass']) < 6) { $falha[] = $v->validatorFieldSet('pass', "+ Digite uma com 6 caracteres \n"); } if (!empty($_POST['passact'])) { $pass = sha1(trim($_POST['passact'])); $msgErro = $v->validatorTotalTable('vtx_system_access', "userkey='{$pass}' and id='{$enterID}' ", $this->adb) <= 0 ? "+ Senha atual invalida" : ''; $falha[] = $v->validatorFieldSet('passact', $msgErro); } ### proced to register $falhas = implode("", $falha); $logs = strlen($falhas); if (strlen($falhas) > 0) { exit($this->vForceStop("0|" . nl2br($v->errorForm) . "|{$falhas}"));
if (!empty($_POST['userMail'])) { $msgErro = $v->validatorMail('userMail', $this->strPut("Digite seu e-mail corretamente")); $falha[] = $v->validatorFieldSet('userMail', $msgErro); } # check pass valid if (!empty($_POST['userPass'])) { $msgErro = $v->validatorPassword($_POST['userPass'], 6, $this->strPut("Senha inválida. ")); $falha[] = $v->validatorFieldSet('userPass', $msgErro); } # check pass e passtrue is equal if (!empty($_POST['userCode']) && isset($_SESSION['authValor'])) { $src = array("l", "o", "1", "g", "j"); $dst = array("i", "0", "l", "6", "i"); $pUserKey = str_replace($src, $dst, strtolower($_POST['userCode'])); $pSessKey = str_replace($src, $dst, strtolower($_SESSION['authValor'])); $msgErro = $v->validatorEqual($pSessKey, $pUserKey, $this->strPut("Código de segurança não confere")); $falha[] = $v->validatorFieldSet('userCode', $msgErro); } # check a valid captcha if (!isset($_SESSION['authValor'])) { $falha[] = $v->validatorFieldSet('authValor', "Chave de seguranca invalida"); } # check if user mail exists if (!empty($_POST['userMail'])) { $msgErro = $v->validatorTotalTable('vtx_system_access', "mail1='{$_POST['userMail']}' ", $this->adb) <= 0 ? "+ E-mail não cadastrado " : ''; $falha[] = $v->validatorFieldSet('userMail', $msgErro); } # check all failures $falhas = implode("", $falha); if (strlen($falhas) > 0) { exit($this->vForceStop("0|" . nl2br($v->errorForm) . "|{$falhas}"));
$v = new forms(); $v->classeErro = 'requestError'; $falha[0] = $v->validatorField('userCode', " + Digite o codigo da imagem"); # check mail if (!empty($_POST['userMail'])) { $msgErro = $v->validatorMail($_POST['userMail'], $this->strPut("Digite seu e-mail corretamente")); $falha[1] = $v->validatorFieldSet('userMail', $msgErro); } # check pass valid if (!empty($_POST['userPass'])) { $msgErro = $v->validatorPassword($_POST['userPass'], 6, $this->strPut("Senha inválida. ")); $falha[2] = $v->validatorFieldSet('userPass', $msgErro); } # check pass e passtrue is equal if (!empty($_POST['userCode'])) { $msgErro = $v->validatorEqual(strtolower($_SESSION['authValor']), strtolower($_POST['userCode']), $this->strPut("Código de segurança não confere")); $falha[3] = $v->validatorFieldSet('userCode', $msgErro); } # check all failures $falhas = implode("", $falha); if (strlen($falhas) > 0) { exit($this->vForceStop("0|" . nl2br($v->errorForm) . "|{$falhas}")); } else { $userKeyLog = trim($_POST['userMail']); $userKeyPas = sha1(trim($_POST['userPass'])); # data base preparemente $dryquery = " SELECT id,nome FROM vtx_system_access "; $dryquery .= " WHERE mail1='{$userKeyLog}' "; $dryquery .= " and userkey='{$userKeyPas}' "; $dquery = $this->adb->query($dryquery); if ($this->adb->error) {