Example #1
0
<?php

##########################################################################################################################################
## start insert new user
##########################################################################################################################################
if (isset($_POST['userInsert'])) {
    # 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[1] = $v->validatorField('userPath', "Diretorio não definido");
    ### proced to register
    $falhas = implode("", $falha);
    if (strlen($falhas) > 0) {
        exit($this->vForceStop("0|" . nl2br($v->errorForm) . "|{$falhas}"));
    } else {
        $enterID1 = $this->clearNumeric($_SESSION['vtxUser']);
        $enterID2 = $this->clearNumeric($_SESSION['vtxGrupo']);
        $file = md5("/vortex-menu,100,1,{$_POST['userPath']},request.htm");
        $path = "{$this->vconf['private']}/corecache/{$_POST['userPath']}/usrgroup/{$enterID2}/{$file}.htm";
        $uppd = is_file($path) ? unlink($path) : "";
        exit($this->vForceStop("1|Atualizado com sucesso"));
    }
}
##############################################################################################################
## get user data
##############################################################################################################
$enterID = $this->clearNumeric($_SESSION['vtxUser']);
$inQuery = "SELECT t1.nome,t1.grupo AS grp, t2.grupo ";
$inQuery .= "FROM vtx_system_access AS t1 ";
Example #2
0
<?php

# get user connections
$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']));
Example #3
0
<?php

if (isset($_POST['userInsert'])) {
    # import class to form validation
    $this->vLoadClass($this->vconf['path'], "/vActions.phar/class.forms.php");
    # start new class
    $v = new forms();
    $v->classeErro = 'vtxFormReqs';
    $falha[4] = $v->validatorField('tagular', "Digite o nome da pasta");
    ### proced to register
    $falhas = implode("", $falha);
    if (strlen($falhas) > 0) {
        exit($this->vForceStop("0|" . nl2br($v->errorForm)));
    } else {
        $v = new vortex();
        $__vtxPackModule__ = $v->vtxGetLicence($this->vconf);
        # check current month dir exists
        $month = date("Y-m");
        $pathNew = $this->clearName($_POST['tagular']);
        $pathFolder = isset($_SESSION['userDIR']) ? $_SESSION['userDIR'] : "/conteudo/{$__vtxPackModule__}/publico/upps/{$month}";
        $pathFolder = isset($_POST['dir']) && strlen($_POST['dir']) > 0 ? "{$this->vconf['rootpath']}{$_POST['dir']}/{$pathNew}" : "{$this->vconf['rootpath']}/{$pathFolder}/{$pathNew}";
        umask(0);
        # make new dir
        !is_dir($pathFolder) ? mkdir($pathFolder, 0777) : "";
        chmod($pathFolder, 0777);
        # make folder to invisible
        is_dir($pathFolder) && !is_dir("{$pathFolder}/vthumb") ? mkdir("{$pathFolder}/vthumb", 0777) : "";
        is_dir("{$pathFolder}/vthumb") && is_writable("{$pathFolder}/vthumb") ? chmod("{$pathFolder}/vthumb", 0777) : "";
        $this->vForceStop("1|{$pathFolder}");
    }
}
Example #4
0
# echo $this->vxDencoder($ar);
# echo $this->vxUserHash($_SESSION['vtxUser'],2);
##############################################################################################################
## 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);
Example #5
0
<?php

# get user connections
$currentconnection = $this->getUserConnection();
# check if user are logged
if (isset($_SESSION['vtxUser']) || isset($_SESSION['vtxEnter']) || isset($_SESSION['vtxGrupo'])) {
    # exit($this->vForceStop("<div class=''>Você já está logado</div>") );
    # 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('userMail', " + Digite o seu email <br />");
    $falha[] = $v->validatorField('userPass', " + Digite sua senha <br />");
    # check mail
    if (!empty($_POST['userMail'])) {
        $msgErro = $v->validatorMail('userMail', $this->strPut("Digite seu e-mail corretamente <br />"));
        $falha[] = $v->validatorFieldSet('userMail', $msgErro);
    }
    # check pass valid
    if (!empty($_POST['userPass'])) {
        $msgErro = $v->validatorPassword($_POST['userPass'], 6, $this->strPut("Senha inválida. <br />"));
        $falha[] = $v->validatorFieldSet('userPass', $msgErro);
    }
    # 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 <br />" : '';
        $falha[] = $v->validatorFieldSet('userMail', $msgErro);
Example #6
0
            $dsql = $this->vquery($inQuery);
            exit($this->vForceStop("1|{$arquivo}|{$_POST['userdir']}|{$target}{$enterID}/{$arquivo}"));
        }
    }
}
##########################################################################################################################################
## 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);
    }