Arreglo de error de descargas de documentos
git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk@141 e2b1556b-49f8-d141-9351-52d6861a72d9
This commit is contained in:
parent
6ae727365a
commit
c21d06176c
@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getRutaCV($id){
|
public function getRutaCV($id){
|
||||||
if($this->tieneRol(4) || $this->tieneRol(3)) { // || $this->tieneRol(7)){
|
if($this->tieneRol(4) || $this->tieneRol(3)) || $this->tieneRol(7)){
|
||||||
$consulta = "SELECT curriculum FROM curriculum_usuario WHERE cod = '".$id."'";
|
$consulta = "SELECT curriculum FROM curriculum_usuario WHERE cod = '".$id."'";
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
$ruta = $bd->getCampo($consulta);
|
$ruta = $bd->getCampo($consulta);
|
||||||
@ -41,7 +41,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getNombreCV($id){
|
public function getNombreCV($id){
|
||||||
if($this->tieneRol(4) || $this->tieneRol(3)) { // || $this->tieneRol(7)){
|
if($this->tieneRol(4) || $this->tieneRol(3)) || $this->tieneRol(7)){
|
||||||
$ruta = $this->getRutaCV($id);
|
$ruta = $this->getRutaCV($id);
|
||||||
$consulta="SELECT CONCAT(nombre,\" \",apellidos,\" (\",fecha,\")\") FROM usuarios, curriculum_usuario WHERE curriculum_usuario.cod=\"".$id."\" AND curriculum_usuario.oid = usuarios.oid";
|
$consulta="SELECT CONCAT(nombre,\" \",apellidos,\" (\",fecha,\")\") FROM usuarios, curriculum_usuario WHERE curriculum_usuario.cod=\"".$id."\" AND curriculum_usuario.oid = usuarios.oid";
|
||||||
$bd = new BD();
|
$bd = new BD();
|
||||||
|
|||||||
@ -28,10 +28,9 @@ $url = $constantes['srcDocs'];
|
|||||||
$nombreFichero="";
|
$nombreFichero="";
|
||||||
$nombreMostrar="";
|
$nombreMostrar="";
|
||||||
$estado=false;
|
$estado=false;
|
||||||
echo $_GET['tipo'];
|
|
||||||
switch ($_GET['tipo']) {
|
switch ($_GET['tipo']) {
|
||||||
case "cv":
|
case "cv": if(!$usuario->tieneRol("4") && !$usuario->tieneRol("3")) && !$usuario->tieneRol("7")){
|
||||||
if(!$usuario->tieneRol("4") && !$usuario->tieneRol("3")){ // && !$usuario->tieneRol("7")){
|
|
||||||
$msg=$locale['1491'];
|
$msg=$locale['1491'];
|
||||||
} else {
|
} else {
|
||||||
$estado=true;
|
$estado=true;
|
||||||
@ -84,7 +83,6 @@ if($estado){
|
|||||||
header( "Pragma: public");
|
header( "Pragma: public");
|
||||||
header( "Content-Length: ".filesize($ruta));
|
header( "Content-Length: ".filesize($ruta));
|
||||||
@readfile( $ruta );
|
@readfile( $ruta );
|
||||||
//echo $ruta;
|
|
||||||
} else {
|
} else {
|
||||||
if($msg=="")
|
if($msg=="")
|
||||||
$msg=$locale['1490'];
|
$msg=$locale['1490'];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user