-
Notifications
You must be signed in to change notification settings - Fork 0
/
cadprojeto.php
248 lines (184 loc) · 8.19 KB
/
cadprojeto.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<html lang="pt-BR">
<?php
require_once('classes/conexao.class.php');
require_once('classes/projeto.class.php');
require_once('classes/usuario.class.php');
$clConexao = new Conexao;
$conn = $clConexao->Conectar();
$Projeto = new Projeto();
$Projeto->conn = $conn;
$Usuario = new Usuario();
$Usuario->conn = $conn;
$op=$_REQUEST['op'];
$id=$_REQUEST['id'];
if ($op=='A')
{
$Projeto->getById($id);
$idpoject = $Projeto->idpoject ;//= $row['nomepropriedade'];
$project = $Projeto->project ;//= $row['inscricaoestadual'];
$idusuario = $Projeto->idusuario ;//= $row['inscricaoestadual'];
$description = $Projeto->description ;//= $row['inscricaoestadual'];
}
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Model-R </title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="fonts/css/font-awesome.min.css" rel="stylesheet">
<link href="css/animate.min.css" rel="stylesheet">
<!-- Custom styling plus plugins -->
<link href="css/custom.css" rel="stylesheet">
<link href="css/icheck/flat/green.css" rel="stylesheet">
<script src="js/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="../assets/js/ie8-responsive-file-warning.js"></script>
<![endif]-->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="nav-md">
<div class="container body">
<div class="main_container">
<div class="col-md-3 left_col">
<div class="left_col scroll-view">
<?php require "menu.php";?>
</div>
</div>
<!-- top navigation -->
<?php require "menutop.php";?>
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2><a href="consprojeto.php">Cad. Projeto<small>Cadastrar projeto</small></a></h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<form name='frm' id='frm' action='exec.projeto.php' method="post" class="form-horizontal form-label-left" novalidate>
<input id="op" value="<?php echo $op;?>" name="op" type="hidden">
<input id="id" value="<?php echo $id;?>" name="id" type="hidden">
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="email">Projeto <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input id="edtprojeto" value="<?php echo $project;?>" name="edtprojeto" class="form-control col-md-7 col-xs-12" required="required">
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="email">Usuário <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<?php echo $Usuario->listaCombo('cmboxusuario',$idusuario,'N','class="form-control"');?>
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-md-offset-3">
<button id="send" type="button" onclick="enviar()" class="btn btn-success">Enviar</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- footer content -->
<footer>
<div class="">
</div>
<div class="clearfix"></div>
</footer>
<!-- /footer content -->
</div>
<!-- /page content -->
</div>
</div>
<div id="custom_notifications" class="custom-notifications dsp_none">
<ul class="list-unstyled notifications clearfix" data-tabbed_notifications="notif-group">
</ul>
<div class="clearfix"></div>
<div id="notif-group" class="tabbed_notifications"></div>
</div>
<script src="js/bootstrap.min.js"></script>
<!-- chart js -->
<script src="js/chartjs/chart.min.js"></script>
<!-- bootstrap progress js -->
<script src="js/progressbar/bootstrap-progressbar.min.js"></script>
<script src="js/nicescroll/jquery.nicescroll.min.js"></script>
<!-- icheck -->
<script src="js/icheck/icheck.min.js"></script>
<script src="js/custom.js"></script>
<!-- form validation -->
<script src="js/validator/validator.js"></script>
<!-- PNotify -->
<script type="text/javascript" src="js/notify/pnotify.core.js"></script>
<script type="text/javascript" src="js/notify/pnotify.buttons.js"></script>
<script type="text/javascript" src="js/notify/pnotify.nonblock.js"></script>
<script>
<?php
require 'MSGCODIGO.php';
?>
<?php $MSGCODIGO = $_REQUEST['MSGCODIGO'];
?>
function enviar()
{
if (
(document.getElementById('edtprojeto').value=='')
)
{
criarNotificacao('Atenção','Verifique o preenchimento','warning');
}
else
{
document.getElementById('frm').submit();
}
}
// initialize the validator function
validator.message['date'] = 'not a real date';
// validate a field on "blur" event, a 'select' on 'change' event & a '.reuired' classed multifield on 'keyup':
$('form')
.on('blur', 'input[required], input.optional, select.required', validator.checkField)
.on('change', 'select.required', validator.checkField)
.on('keypress', 'input[required][pattern]', validator.keypress);
$('.multi.required')
.on('keyup blur', 'input', function () {
validator.checkField.apply($(this).siblings().last()[0]);
});
// bind the validation to the form submit event
//$('#send').click('submit');//.prop('disabled', true);
$('form').submit(function (e) {
e.preventDefault();
var submit = true;
// evaluate the form using generic validaing
if (!validator.checkAll($(this))) {
submit = false;
}
if (submit)
this.submit();
return false;
});
/* FOR DEMO ONLY */
$('#vfields').change(function () {
$('form').toggleClass('mode2');
}).prop('checked', false);
$('#alerts').change(function () {
validator.defaults.alerts = (this.checked) ? false : true;
if (this.checked)
$('form .alert').remove();
}).prop('checked', false);
</script>
</body>
</html>