<?php //header("Cache-Control: private, max-age=10800, pre-check=10800"); header("Pragma: private"); // Set to expire in 2 days header("Expires: " . date(DATE_RFC822, strtotime("1 week"))); // if the browser has a cached version of this image, send 304 if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { exit(header('Last-Modified: ' . $_SERVER['HTTP_IF_MODIFIED_SINCE'], true, 304)); } # "{$this->vconf['private']}/corefiles" $imagepath = isset($_SESSION['picturedst']) ? $_SESSION['picturedst'] : ""; $imagepics = isset($vlr[5]) ? $vlr[5] : ""; $currentPics = "{$imagepath}/{$imagepics}"; if (is_file($this->vconf['rootpath'] . $currentPics)) { $ftype = getimagesize($this->vconf['rootpath'] . $currentPics); !isset($_GET['vcache']) ? header("Content-type:{$ftype['mime']}") : ""; # import class to form validation $this->vLoadClass($this->vconf['path'], "/vActions.phar/class.images.php"); # start new class $v = new vtxImages(); $v->larguraFoto = $vlr[3]; $v->alturaFoto = $vlr[4]; $v->qualidadeFoto = 75; $v->caminhoFoto = ''; $pic = is_file($this->vconf['rootpath'] . $currentPics) ? $this->vconf['rootpath'] . $currentPics : ""; $v->fotoMiniaturas($pic, ""); } else { } exit($this->vForceStop(""));
# check is valid file if (!in_array($uptype, $this->vconf['upfile'])) { exit($this->vForceStop("0|2000 :: Formato de arquivo inválido :: {$uptype} para {$_POST['direct']} ")); } else { # check is valid destine dir if (!is_dir($destine)) { exit($this->vForceStop("0|2000 :: Diretorio alvo não definido para :: {$destine} ")); } else { if (isset($_POST['tpo']) && $_POST['tpo'] == 1) { $arquivo = $this->clearName($_FILES['userfile']['name']); move_uploaded_file($_FILES['userfile']['tmp_name'], "{$destine}{$arquivo}"); } else { # import class to form validation $this->vLoadClass($this->vconf['path'], "/vActions.phar/class.images.php"); # start new class $ap = new vtxImages(); $ap->larguraFoto = 655; $ap->alturaFoto = 655; $ap->qualidadeFoto = 100; # resize upp photo $ap->caminhoFoto = "{$destine}/"; $arquivo = $this->clearName($_FILES['userfile']['name']); $ap->fotoMiniaturas($_FILES['userfile']['tmp_name'], $arquivo); # apply wattermark $ap->marcaDagua = "{$this->vconf['rootpath']}/conteudo/materias/brand/logo.png"; $ap->posicaoMarcaDagua = 3; $ap->fotoMarcar("{$destine}/{$arquivo}", "{$destine}/{$arquivo}"); } # finish exit($this->vForceStop("1|0")); }
if (!in_array($uptype, $this->vconf['uppics'])) { exit($this->vForceStop("0|2001 :: Formato de arquivo inválido ")); } else { # check is valid destine dir if (!is_dir($destine)) { exit($this->vForceStop("0|2002 :: Diretorio alvo não definido {$_POST['userdir']} ")); } else { # check if user dir exists if (!is_dir($destine . $enterID)) { mkdir($destine . $enterID, 0777); chmod($destine . $enterID, 0777); } # import class to form validation $this->vLoadClass($this->vconf['path'], "/vActions.phar/class.images.php"); # start new class $ap = new vtxImages(); $ap->larguraFoto = 500; $ap->alturaFoto = 500; $ap->qualidadeFoto = 100; # resize upp photo $ap->caminhoFoto = "{$destine}{$enterID}/"; $arquivo = $this->clearName($_FILES['userfile']['name']); $ap->fotoMiniaturas($_FILES['userfile']['tmp_name'], $arquivo); # import class to form validation $this->vLoadClass($this->vconf['path'], "/vActions.phar/class.forms.php"); # start new class $v = new forms(); $v->classeErro = 'formPointer'; # update data with image info $tableFF[1] = 'foto'; $tablevv[1] = $arquivo;