/
aprobar_derivacion_archivo.php
executable file
·135 lines (131 loc) · 5.1 KB
/
aprobar_derivacion_archivo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php
include_once("includes.php");
include_once("cls/class.accion.php");
include_once("cls/class.usuario.php");
include_once("cls/class.documentos.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php include_once("includes/inc.header.php"); ?>
<style>
input{
height:21px;
}
td{
vertical-align:middle;
}
fieldset{
margin:0px 4px 4px 4px;
width:95%;
}
</style>
<title>STD .:. Aprobar Derivacion</title>
</head>
<body>
<fieldset>
<legend>Aprobación</legend>
<?
if($_REQUEST["opcion"]=='addha'){
$documento = new Documento($_REQUEST['id']);
$atencion = $documento->AprobarDocumento($_REQUEST['comentario']);
if($atencion!=0){
//if($_REQUEST['accion']==35){ //Archivar Aprobado
//Documentos::GuardarArchivoRespuesta($atencion);
//Documentos::GuardarAdjuntosArchivo($atencion,$_REQUEST['categoria']);
//}
//else
Documentos::GuardarAprobacion($atencion);
echo "<p>Se propuso correctamente</p></div>";
}else{
echo "<div id='error'>Hubo un error al procesar su consulta</div>";
}
?>
<br/>
<br/>
<input name="cancelar" type="button" class="boton" id="cerrar_j" value="Cerrar" />
<?
}else{
if($_REQUEST["id"]){
$accion= new Accion($_REQUEST["acc"]);
$categoria=($_REQUEST["cat"]==1)?"Original":"Copia";
?>
<form id="form_justificacion" name="form_justificacion" method="post" action="javascript:validar_aprobacion(<?= $_REQUEST["id"]?>)" enctype="multipart/form-data">
<input type="hidden" id="area" name="area" value="<?php echo $_SESSION['session'][5] ?>" />
<input type="hidden" id="user" name="user" value="<?php echo $_SESSION['session'][0] ?>" />
<input type="hidden" id="categoria" name="categoria" size="30" value="<?=$_REQUEST["cat"]?>"/>
<input type="hidden" id="accion" name="accion" value="<?=$accion->getId()?>"/>
<table width="100%" height="301" border="0">
<tr>
<td width="18%" height="21" class="Estilo22">Acción</td>
<td width="1%" class="Estilo22"><div align="center">:</div></td>
<td ><?=$accion->getNombre()?></td>
<td colspan="3" class="Estilo22" width="7%">Categoria</td>
<td width="1%" class="Estilo22"><div align="center">:</div></td>
<td colspan="2" width="7%"><?=$categoria?></td>
</tr>
<tr>
<td height="24" colspan="3" class="Estilo21"><strong>(*) Tamaño Máximo 2Mb </strong></td>
<td colspan="4" style="vertical-align:top;"> </td>
<td colspan="2" class="Estilo21" style="vertical-align:top; padding-top:2px;"> </td>
</tr>
<!--
<? if($_REQUEST['acc']==35){ ?>
<tr>
<td height="24" class="Estilo22">Doc. Respuesta </td>
<td height="24" class="Estilo22"><div align="center">:</div></td>
<td height="24" class="Estilo21">
<input id="respuesta" type="file" name="respuesta" size="39" />
</td>
<td colspan="4" style="vertical-align:top;"> </td>
<td colspan="2" class="Estilo21" style="vertical-align:top; padding-top:2px;"> </td>
</tr>
<tr>
<? }?>-->
<td height="24" style="vertical-align:top;" class="Estilo22">Doc. Adjunto</td>
<td class="Estilo22" style="vertical-align:top; text-align:center;padding-top:4px;"><div align="center">:</div></td>
<td>
<div class="ileft_img">
<div id='cp_item_0' style="float:left">
<input id="doc[]" type="file" name="doc[]" size="39" />
</div>
<div class="iright_img" style="float:left; height:22px;"></div>
</div> </td>
<td width="3%" style="vertical-align:top;"><img src="public_root/imgs/edit_add.png" alt="" onclick="crearCarchivo(2)" style="margin-top:1px;"/></td>
<td width="3%" style="vertical-align:top;"><img src="public_root/imgs/edit_remove.png" alt="" onclick="quitarCarchivo(2)" style="margin-top:1px;"/></td>
<td style="vertical-align:top;" colspan="2"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td class="Estilo22" height="19"> Comentario </td>
<td height="19" class="Estilo22"><div align="center">:</div></td>
<td colspan="7"> </td>
</tr>
<tr>
<td height="137" colspan="9">
<div align="center"><textarea name="comentario" cols="80" rows="10" id="comentario" class="caja"></textarea>
</div> </td>
</tr>
<tr>
<td height="36" colspan="2" align="center" style="vertical-align:middle">
<td> </td>
<td colspan="5"> <div align="right">
<input name="aceptar" type="submit" class="boton" id="aceptar_b" value="Aceptar"/>
</div></td>
<td width="12%"><div align="right">
<input name="cancelar" type="button" class="boton" id="cancelar_b" value="Cancelar" />
</div></td>
</tr>
</table>
</form>
<?
}else{
?>
<script>javascript:cerrar_popups</script>
<? }
}
?>
</fieldset>
</body>
</html>