File: /home/joderbya/www/foiroubado.com/111/form123.html
<!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=UTF-8">
<title>Moçambique Lista Negra</title>
<link rel="stylesheet" type="text/css" href="view.css" media="all">
<script type="text/javascript" src="view.js"></script>
<script type="text/javascript" src="calendar.js"></script>
<script>
function formCollect()
{
var XHR = new XMLHttpRequest();
var FD = new FormData();
var t_participacao = document.forms["submit"]["t_participacao"].value;
var nome = document.forms["submit"]["1_nome"].value;
var apelido = document.forms["submit"]["2_nome"].value;
var endereco_1 = document.forms["submit"]["1_endereco"].value;
var endereco_2 = document.forms["submit"]["2_endereco"].value;
var cidade = document.forms["submit"]["cidade"].value;
var provincia = document.forms["submit"]["provincia"].value;
var codigo_postal = document.forms["submit"]["codigo_postal"].value;
var pais = document.forms["submit"]["pais"].value;
var n_processo = document.forms["submit"]["n_processo"].value;
var telemovel = document.forms["submit"]["telemovel"].value;
var element_5_1 = document.forms["submit"]["element_5_1"].value; //mes
var element_5_2 = document.forms["submit"]["element_5_2"].value; //dia
var element_5_3 = document.forms["submit"]["element_5_3"].value; //ano
var posto_p = document.forms["submit"]["posto_p"].value;
var telefone_p = document.forms["submit"]["telefone_p"].value;
var t_objecto = document.forms["submit"]["t_objecto"].value;
var marca = document.forms["submit"]["marca"].value;
var modelo = document.forms["submit"]["modelo"].value;
var matricula = document.forms["submit"]["matricula"].value;
var n_serie = document.forms["submit"]["n_serie"].value;
var n_motor = document.forms["submit"]["n_motor"].value;
var n_quadro = document.forms["submit"]["n_quadro"].value;
var descricao = document.forms["submit"]["descricao"].value;
var image = document.forms["submit"]["image"].value;
var image = document.forms["submit"]["image"].value;
// We push our data into our FormData object
//for(name in cliente) {
FD.append('t_participacao', t_participacao);
FD.append('1_nome', nome);
FD.append('2_nome', apelido);
FD.append('1_endereco', endereco_1);
FD.append('2_endereco', endereco_2);
FD.append('cidade', cidade);
FD.append('provincia', provincia);
FD.append('codigo_postal', codigo_postal);
FD.append('pais', pais);
FD.append('telemovel', telemovel);
FD.append('element_5_1', element_5_1);
FD.append('element_5_3', element_5_3);
FD.append('element_5_2', element_5_2);
FD.append('posto_p', posto_p);
FD.append('telefone_p', telefone_p);
FD.append('t_objecto', t_objecto);
FD.append('marca', marca);
FD.append('modelo', modelo);
FD.append('matricula', matricula);
FD.append('n_serie', n_serie);
FD.append('n_motor', n_motor);
FD.append('n_quadro', n_quadro);
FD.append('n_processo', n_processo);
FD.append('descricao', descricao);
FD.append('image', 'image');
//FD.append('bdTable', bdTable);
// }
XHR.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
//alert("resposta: "+this.responseText);
//document.getElementById("gridview").innerHTML = this.responseText;
//document.getElementById("formulario").reset();
//gridview();
}
};
// We define what will happen if the data are successfully sent
XHR.addEventListener('load', function(event) {
alert('Registado com sucesso.');
});
// We define what will happen in case of error
XHR.addEventListener('error', function(event) {
alert('Oups! Erro ao gravar.');
});
// We setup our request
XHR.open('POST', 'http://localhost/Regform/regform.php');
// We just send our FormData object, HTTP headers are set automatically
XHR.send(FD);
}
</script>
</head>
<body id="main_body" >
<img id="top" src="top.png" alt="">
<div id="form_container">
<h1><a>Moçambique Lista Negra</a></h1>
<form id="form_47822" name='submit' class="appnitro" enctype="multipart/form-data" method="post" action="regform.php">
<div class="form_description">
<h2>Moçambique Lista Negra</h2>
<p>Formulário de Registo de Bens </p>
</div>
<ul >
<li id="li_19" >
<label class="description" for="element_19">Tipo de Participação : </label>
<span>
<input id="element_19_1" name="t_participacao" class="element radio" type="radio" value="1" checked="checked"/>
<label class="choice" for="element_19_1">Lista Negra</label>
<input id="element_19_2" name="t_participacao" class="element radio" type="radio" value="2" />
<label class="choice" for="element_19_2">Lista Branca</label>
</span>
</li> <li class="section_break">
<h3>Dados da Vítima/Proprietário</h3>
<p></p>
</li> <li id="li_1" >
<label class="description" for="element_1">Nome </label>
<span>
<input id="element_1_1" name= "1_nome" class="element text" maxlength="255" size="8" value=""/>
<label>Primeiro</label>
</span>
<span>
<input id="element_1_2" name= "2_nome" class="element text" maxlength="255" size="14" value=""/>
<label>Segundo</label>
</span>
</li> <li id="li_2" >
<label class="description" for="element_2">Endereço </label>
<div>
<input id="element_2_1" name="1_endereco" class="element text large" value="" type="text">
<label for="element_2_1">Av./Rua</label>
</div>
<div>
<input id="element_2_2" name="2_endereco" class="element text large" value="" type="text">
<label for="element_2_2">2º Endereço</label>
</div>
<div class="left">
<input id="element_2_3" name="cidade" class="element text medium" value="" type="text">
<label for="element_2_3">Cidade</label>
</div>
<div class="right">
<input id="element_2_4" name="provincia" class="element text medium" value="" type="text">
<label for="element_2_4">Provincia & Bairro</label>
</div>
<div class="left">
<input id="element_2_5" name="codigo_postal" class="element text medium" maxlength="15" value="" type="text">
<label for="element_2_5">Postal / Zip Code</label>
</div>
<div class="right">
<select class="element select medium" id="element_2_6" name="pais">
<option value="" selected="selected"></option>
<option value="Congo" >Congo</option>
<option value="Ghana" >Ghana</option>
<option value="Jordan" >Jordan</option>
<option value="Kenya" >Kenya</option>
<option value="Madagascar" >Madagascar</option>
<option value="Malawi" >Malawi</option>
<option value="Malaysia" >Malaysia</option>
<option value="Mozambique" >Moçambique</option>
<option value="Namibia" >Namibia</option>
<option value="Nigeria" >Nigeria</option>
<option value="Somalia" >Somalia</option>
<option value="South Africa" >South Africa</option>
<option value="Swaziland" >Swaziland</option>
<option value="Tajikistan" >Tajikistan</option>
<option value="Tanzania" >Tanzania</option>
<option value="Zambia" >Zambia</option>
<option value="Zimbabwe" >Zimbabwe</option>
</select>
<label for="element_2_6">País</label>
</div>
</li> <li id="li_3" >
<label class="description" for="element_3">Telemóvel </label>
<div>
<input id="element_3" name="telemovel" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3>Participação do Caso na Polícia</h3>
<p></p>
</li> <li id="li_4" >
<label class="description" for="element_4">Número do Processo </label>
<div>
<input id="element_4" name="n_processo" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li id="li_5" >
<label class="description" for="data_participacao">Data da Participação </label>
<span>
<input id="element_5_1" name="element_5_1" class="element text" size="2" maxlength="2" value="" type="text"> /
<label for="element_5_1">MM</label>
</span>
<span>
<input id="element_5_2" name="element_5_2" class="element text" size="2" maxlength="2" value="" type="text"> /
<label for="element_5_2">DD</label>
</span>
<span>
<input id="element_5_3" name="element_5_3" class="element text" size="4" maxlength="4" value="" type="text">
<label for="element_5_3">YYYY</label>
</span>
<span id="calendar_5">
<img id="cal_img_5" class="datepicker" src="calendar.gif" alt="Pick a date.">
</span>
<script type="text/javascript">
Calendar.setup({
inputField : "element_5_3",
baseField : "element_5",
displayArea : "calendar_5",
button : "cal_img_5",
ifFormat : "%B %e, %Y",
onSelect : selectDate
});
</script>
</li> <li id="li_6" >
<label class="description" for="element_6">Posto Policial </label>
<div>
<input id="element_6" name="posto_p" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li id="li_7" >
<label class="description" for="element_7">Telefone do Posto </label>
<div>
<input id="element_7" name="telefone_p" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li class="section_break">
<h3>Dados do Objecto</h3>
<p></p>
</li> <li id="li_20" >
<label class="description" for="element_20">Tipo de Objecto </label>
<div>
<script>
function resetForm()
{
document.getElementById("element_13").disabled = false;
document.getElementById("element_14").disabled = false;
document.getElementById("element_15").disabled = false;
document.getElementById("element_16").disabled = false;
//document.getElementById("element_2").style.color = "none";
document.getElementById("element_13").style.background = "white";
//document.getElementById("element_3").style.color = "none";
document.getElementById("element_14").style.background = "white";
//document.getElementById("element_4").style.color = "none";
document.getElementById("element_15").style.background = "white";
//document.getElementById("element_5").style.color = "none";
document.getElementById("element_16").style.background = "white";
document.getElementById("element_13").value = "";
document.getElementById("element_14").value = "";
document.getElementById("element_15").value = "";
document.getElementById("element_16").value = "";
}
function automovel()
{
resetForm();
document.getElementById("element_13").disabled = true;
document.getElementById("element_13").style.color = "#AAA";
document.getElementById("element_13").style.background = "#F5F5F5";
}
function telemovel()
{
resetForm();
document.getElementById("element_15").disabled = true;
document.getElementById("element_15").style.color = "#AAA";
document.getElementById("element_15").style.background = "#F5F5F5";
document.getElementById("element_16").disabled = true;
document.getElementById("element_16").style.color = "#AAA";
document.getElementById("element_16").style.background = "#F5F5F5";
document.getElementById("element_14").disabled = true;
document.getElementById("element_14").style.color = "#AAA";
document.getElementById("element_14").style.background = "#F5F5F5";
}
function bicicleta()
{
resetForm();
document.getElementById("element_14").disabled = true;
document.getElementById("element_14").style.color = "#AAA";
document.getElementById("element_14").style.background = "#F5F5F5";
document.getElementById("element_15").disabled = true;
document.getElementById("element_15").style.color = "#AAA";
document.getElementById("element_15").style.background = "#F5F5F5";
}
</script>
<select class="element select medium" id="element_20" name="t_objecto">
<option value="automovel" selected="selected" onclick="automovel()">Automóvel</option>
<option value="bicicleta" onclick="bicicleta()">Bicicleta</option>
<option value="motorizada" onclick="automovel()">Motorizada</option>
<option value="telemovel" onclick="telemovel()">Telemóvel</option>
<option value="barco" onclick="automovel()">Barco</option>
</select>
</div>
</li> <li id="li_11" >
<label class="description" for="element_11">Marca </label>
<div>
<input id="element_11" name="marca" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li id="li_12" >
<label class="description" for="element_12">Modelo </label>
<div>
<input id="element_12" name="modelo" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li id="li_13" >
<label class="description" for="element_13">Número de Série </label>
<div>
<input id="element_13" name="n_serie" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li id="li_14" >
<label class="description" for="element_14">Matrícula </label>
<div>
<input id="element_14" name="matricula" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li id="li_15" >
<label class="description" for="element_15">Número do Motor </label>
<div>
<input id="element_15" name="n_motor" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li id="li_16" >
<label class="description" for="element_16">Número do Quadro </label>
<div>
<input id="element_16" name="n_quadro" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li> <li id="li_17" >
<label class="description" for="element_17">Descrição (detalhes específicos) </label>
<div>
<textarea id="element_17" name="descricao" class="element textarea medium"></textarea>
</div>
</li> <li id="li_18" >
<label class="description" for="element_18">Imagem </label>
<div>
<input id="element_18" name="image" class="element file" type="file"/>
</div>
</li>
<li class="buttons">
<input type="hidden" name="form_id" value="47822" />
<!-- <input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" /> -->
<button id="saveForm" class="button_text" type="button" name="submit" onClick="formCollect()">Submeter</button>
</li>
</ul>
</form>
<div id="footer">
Powered by <a href="http://www.picaespia.co.mz">picaEspia</a>
</div>
</div>
<img id="bottom" src="bottom.png" alt="">
</body>
</html>