/
protocol_submit.php
167 lines (141 loc) · 4.91 KB
/
protocol_submit.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?php
// This file is part of the ProEthos Software.
//
// Copyright 2013, PAHO. All rights reserved. You can redistribute it and/or modify
// ProEthos under the terms of the ProEthos License as published by PAHO, which
// restricts commercial use of the Software.
//
// ProEthos is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
// PARTICULAR PURPOSE. See the ProEthos License for more details.
//
// You should have received a copy of the ProEthos License along with the ProEthos
// Software. If not, see
// https://raw.githubusercontent.com/bireme/proethos/master/LICENSE.txt
/**
* Protocol
* @author Rene Faustino Gabriel Junior (Analista-Desenvolvedor)
* @copyright © Pan American Health Organization, 2013. All rights reserved.
* @access public
* @version v.0.13.46
* @package Proethos
* @subpackage Protocol
*/
/* Add Styles */
$style_add = array('proethos_form.css');
require("cab.php");
require($include.'sisdoc_data.php');
require('_class/_class_cep.php');
$cep=new cep;
require('_class/_class_cep_submit.php');
$submit=new submit;
require('_class/_class_cep_email.php');
$comm = new comunication;
/* recupara ID do projeto */
$ID = strzero($dd[0],7);
$submit->le($ID);
$doc_tipo = $submit->doc_tipo;
/* Action */
$acao = $dd[5];
if ($acao == 'TO_SUBMIT')
{
$submit->protocolo_to_submit();
redirecina('submit.php?dd0='.$dd[0].'&dd90='.checkpost($dd[0]));
}
if ($acao == 'TO_AMED')
{
$submit->protocolo_to_submit();
redirecina('submit_amendment.php?dd0='.$dd[0].'&dd90='.checkpost($dd[0]));
}
echo '<h1>Protocolo: '.$submit->status_show($submit->doc_status).'</h1>';
echo $submit->protocolo_mostrar();
$status = trim($submit->doc_status);
echo '<BR>';
require("_ged_config.php");
$ged->protocol = $ID;
echo $ged->filelist();
/*
* Hidden Other information
*/
if ($acao == 'TO_CANCEL_ASK') { $status = '@@'; }
if ($acao == 'TO_CANCEL') { $status = '@@@'; }
if (trim($status) == '$')
{
echo '<form method="post">';
echo '<input type="hidden" name="dd0" value="'.$dd[0].'">';
echo '<input type="hidden" name="dd1" value="'.$dd[1].'">';
echo '<input type="hidden" name="dd2" value="'.$dd[2].'">';
echo '<input type="hidden" name="dd5" value="TO_SUBMIT">';
echo '<input type="submit" value="'.msg('submit_send_to_edit',1).'" class="form_submit">';
echo '</form>';
}
if (trim($status) == 'Z')
{
echo '<form method="post">';
echo '<input type="hidden" name="dd0" value="'.$dd[0].'">';
echo '<input type="hidden" name="dd1" value="'.$dd[1].'">';
echo '<input type="hidden" name="dd2" value="'.$dd[2].'">';
echo '<input type="hidden" name="dd5" value="TO_SUBMIT">';
echo '<input type="submit" value="'.msg('submit_send_to_edit',1).'" class="form_submit">';
echo '</form>';
}
/* Submissao */
if (trim($status) == '@')
{
echo '<table width="100%">';
echo '<TR align="center">';
echo '<TD>';
echo '<form method="post">';
echo '<input type="hidden" name="dd0" value="'.$dd[0].'">';
echo '<input type="hidden" name="dd1" value="'.$dd[1].'">';
echo '<input type="hidden" name="dd2" value="'.$dd[2].'">';
echo '<input type="hidden" name="dd5" value="TO_SUBMIT">';
echo '<input type="submit" value="'.msg('submit_send_to_edit',1).'" class="form_submit">';
echo '</form>';
echo '<TD>';
echo '<form method="post">';
echo '<input type="hidden" name="dd0" value="'.$dd[0].'">';
echo '<input type="hidden" name="dd1" value="'.$dd[1].'">';
echo '<input type="hidden" name="dd2" value="'.$dd[2].'">';
echo '<input type="hidden" name="dd5" value="TO_CANCEL_ASK">';
echo '<input type="submit" value="'.msg('cancel_this_project',1).'" class="form_submit">';
echo '</form>';
}
if (trim($status) == '@@')
{
echo '<table width="100%">';
echo '<TR align="center">';
echo '<TD>';
echo '<form method="post">';
echo '<input type="hidden" name="dd0" value="'.$dd[0].'">';
echo '<input type="hidden" name="dd1" value="'.$dd[1].'">';
echo '<input type="hidden" name="dd2" value="'.$dd[2].'">';
echo '<input type="hidden" name="dd5" value="TO_CANCEL">';
echo '<input type="submit" value="'.msg('confirm_cancel',1).'" class="form_submit">';
echo '</form>';
echo '<TD>';
echo '<form method="post">';
echo '<input type="hidden" name="dd0" value="'.$dd[0].'">';
echo '<input type="hidden" name="dd1" value="'.$dd[1].'">';
echo '<input type="hidden" name="dd2" value="'.$dd[2].'">';
echo '<input type="hidden" name="dd5" value="">';
echo '<input type="submit" value="'.msg('botton_return',1).'" class="form_submit">';
echo '</form>';
}
if ($acao == 'TO_CANCEL')
{
if ($submit->protocolo_cancel())
{
echo '<font class="message_ok"><center>';
echo msg('successfully_operation');
echo '</center></font>';
echo ' <META HTTP-EQUIV=Refresh CONTENT="5; URL=main.php">';
}
}
$comm->protocolo = $submit->doc_protocolo;
echo $comm->display();
echo '</table></div>';
echo $hd->foot();
?>
<script>
</script>