-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCrear.php
89 lines (72 loc) · 2.44 KB
/
Crear.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
<!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" />
<title>Crear Cuenta</title>
</head>
<body>
<?php
$Codigo=$_GET['id'];
include("Conexion.php");
$TipoD=$_POST['TipoD'];
$NumD=$_POST['T1'];
$Nombre=$_POST['T2'];
$Paterno=$_POST['T3'];
$Materno=$_POST['T4'];
$Genero=$_POST['Sexo'];
$EstadoCivil=$_POST['T5'];
$Telefono=$_POST['T6'];
$Celular=$_POST['T7'];
$Departamento=$_POST['T8'];
$Provincia=$_POST['T9'];
$Municipio=$_POST['T10'];
$Zona=$_POST['T11'];
$Calle=$_POST['T12'];
$Numero=$_POST['T13'];
$Nacionalidad=$_POST['T14'];
$Dia=$_POST['Dia'];
$Mes=$_POST['Mes'];
$Gestion=$_POST['Gestion'];
$MesOrigen="";
if($Mes == 'Enero')
{$MesOrigen='01';}
if($Mes == 'Febrero')
{$MesOrigen='02';}
if($Mes == 'Marzo')
{$MesOrigen='03';}
if($Mes == 'Abril')
{$MesOrigen='04';}
if($Mes == 'Mayo')
{$MesOrigen='05';}
if($Mes == 'Junio')
{$MesOrigen='06';}
if($Mes == 'Julio')
{$MesOrigen='07';}
if($Mes == 'Agosto')
{$MesOrigen='08';}
if($Mes == 'Septiembre')
{$MesOrigen='09';}
if($Mes == 'Octubre')
{$MesOrigen='10';}
if($Mes == 'Noviembre')
{$MesOrigen='11';}
if($Mes == 'Diciembre')
{$MesOrigen='12';}
$FechaNacimiento=$Gestion."-".$MesOrigen."-".$Dia;
$Estatura=$_POST['C1'];
$Peso=$_POST['C2'];
$ColorPiel=$_POST['C3'];
$ColorCabello=$_POST['C4'];
$Rasgos=$_POST['C5'];
$NombreFoto=$_FILES['C6']['name'];
$Ruta=$_FILES['C6']['tmp_name'];
$Destino="Fotos/".$NombreFoto;
copy($Ruta,$Destino);
$consulta="INSERT INTO persona(TipoDocumento,NumeroDocumento,Nombre,Paterno,Materno,Genero,EstadoCivil,Telefono,Celular,Departamento,Provincia,Municipio,Zona,Calle,Numero,FechaNacimiento,Nacionalidad)VALUE('$TipoD','$NumD','$Nombre','$Paterno','$Materno','$Genero','$EstadoCivil','$Telefono','$Celular','$Departamento','$Provincia','$Municipio','$Zona','$Calle','$Numero','$FechaNacimiento','$Nacionalidad')";
$sql=mysql_query($consulta,$cn);
$consulta1="INSERT INTO detenido(NumeroDocumento,Estatura,Peso,ColorPiel,ColorCabello,Rasgos,Foto)VALUE('$NumD','$Estatura','$Peso','$ColorPiel','$ColorCabello','$Rasgos','$Destino')";
$sql1=mysql_query($consulta1,$cn);
header("Location: Administrador.php?id=$Codigo");
?>
</body>
</html>