$currentconnection = $this->getUserConnection(); # check if user are logged if (isset($_SESSION['vtxUser']) && isset($_SESSION['vtxEnter']) && isset($_SESSION['vtxEnter']) && $_SESSION['vtxEnter'] > time()) { exit(header("location:/#")); # display user data } if (isset($_POST['activeform'])) { # verificar campos $this->vLoadClass($this->vconf['path'], "/vActions.phar/class.forms.php"); # start new class $v = new forms(); $v->classeErro = 'requestError'; $falha[] = $v->validatorField('userCode', " + Digite o codigo da imagem"); # check mail 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);
} ########################################################################################################################################## ## start insert new user ########################################################################################################################################## if (isset($_POST['userInsert'])) { # import class to form validation $this->vLoadClass($this->vconf['path'], "/vActions.phar/class.forms.php"); //$this->vLoadClass($this->vconf['path'],"/vActions.phar/class.images.php"); # start new class $v = new forms(); $v->classeErro = 'formPointer'; $falha[1] = $v->validatorField('nome', "Digite o nome do técnico"); $falha[2] = $v->validatorField('email', "Digite o e-mail"); # check mail if (!empty($_POST['email'])) { $msgErro = $v->validatorMail('email', $this->strPut("Digite o e-mail administrativo corretamento")); $falha[4] = $v->validatorFieldSet('email', $msgErro); } if (!empty($_POST['email'])) { $msgErro = $v->validatorTotalTable('vtx_system_access', "mail1='{$_POST['email']}' and id!='{$enterID}' ", $this->adb) > 0 ? "+ E-mail já cadastrado <br />" : ''; $falha[6] = $v->validatorFieldSet('email', $msgErro); } if (!empty($_POST['cpf'])) { $doc = $this->clearNumeric($_POST['cpf']); $msgErro = $v->validatorCPF($doc, "+ CPF Invalido"); $falha[7] = $v->validatorFieldSet('cpf', $msgErro); } if (!empty($_POST['cpf'])) { $doc = $this->clearNumeric($_POST['cpf']); $msgErro = $v->validatorTotalTable('vtx_system_access', "cpf='{$doc}' and id!='{$enterID}' ", $this->adb) > 0 ? "+ CPF já cadastrado <br />" : ''; $falha[8] = $v->validatorFieldSet('cpf', $msgErro);