-
Notifications
You must be signed in to change notification settings - Fork 0
/
persona.php
162 lines (132 loc) · 6.87 KB
/
persona.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
<?php
// VARIABLES LISTAS PARA USAR ESTAN EN EL ARCHIVO structure/sesion.php
include 'structure/navbar.panel.php';
?>
<?php if ($tipo=='persona' || $tipo='empresa') {?>
<?php
include("include/ejecutar_en_db.php");
$Usuario = new OperacionesMYSQL();
$idUsuarioGet = $_GET['id'];
if ($idUsuarioGet==''){$idUsuarioGet=$id;} //RECUPERA USUARIO ACTUAL SI NO HAY VARIABLE GET
$var_usuario=$Usuario ->recuperarUsuario($idUsuarioGet);
while ($rows = $var_usuario->fetch_assoc()) {
$nombre = $rows["nombre"];
$apellido = $rows["apellido"];
$apellidoM = $rows["apellidoM"];
$imagen = $rows['rutaImagen'];
$fNacimiento = $rows['fechaNacimiento'];
$areasInteres = $rows['areasInteres'];
$comuna_ID = $rows['COMUNA_ID'];
$skype = $rows['skype'];
$locacion ="";
$email = $rows['email'];
$ingles = $rows['idIngles'];
$experiencia = $rows['experiencia'];
$tituloprof = $rows['tituloprof'];
$video1 = $rows['video'];
if ($ingles == 1) {
$valIngles = Básico;
} elseif ($ingles == 2) {
$valIngles = Intermedio;
} elseif ($ingles == 3) {
$valIngles = Avanzado;
} elseif ($ingles == 4) {
$valIngles = Nativo;
}
}
if (isset($COMUNA_ID)) {
include 'include/conexion.php';
$query = "SELECT a.COMUNA_NOMBRE, c.REGION_NOMBRE, d.PAIS_NOMBRE FROM comuna a, provincia b, region c, pais d where a.COMUNA_PROVINCIA_ID=b.PROVINCIA_ID and b.PROVINCIA_REGION_ID=c.REGION_ID and c.REGION_PAIS_ID=d.PAIS_ID and a.COMUNA_ID=$COMUNA_ID;";
$resultado = $mysqli->query($query);
while ($rows = $resultado->fetch_assoc()) {
$locacion = $rows['COMUNA_NOMBRE'] . ", " . $rows['REGION_NOMBRE'] . ", " . $rows['PAIS_NOMBRE'];
}
}
$interes = explode(' y ' , $areasInteres);
?>
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-4">
<div class="box box-info">
<div class="box-body box-profile">
<img class="profile-user-img img-responsive img-circle" src="<?php echo $imagen ?>">
<h3 class="profile-username text-center"><?php echo $nombre ." " . $apellido ." " . $apellidoM ?></h3>
<p class="text-muted text-center">
<?php echo $tituloprof ?>
</p>
<br/>
<ul class="list-group list-group-unbordered">
<li class="list-group-item">
<i class="fa fa-envelope"></i>
<a class="pull-right"><?php echo $email ?></a>
</li>
<li class="list-group-item">
<i class="fa fa-skype"></i>
<a class="pull-right"><?php echo $skype ?></a>
</li>
</ul>
<br/>
<?php // SI EL USUARIO ACTUAL ES EL MISMO QUE EL PERFIL MOSTRADO, OCULTA EL BOTON ENVIAR MENSAJE Y MUESTRA OPCIONES PARA EDITAR PERFIL, CAMBIAR CLAVE....
if($id==$idUsuarioGet) {echo "<a href='cambiar-clave.php' class='btn btn-info btn-xs pull-left'><i class='fa fa-key'></i> <b>Contraseña</b></a><a href='editar-perfil.php' class='btn btn-info btn-xs pull-right'><i class='fa fa-edit'></i><b> Editar Perfil</b></a>";} elseif($tipo=='persona' ) {echo "<a href='mensajes.php?usuario=$idUsuarioGet' class='btn btn-warning btn-block'><i class='fa fa-envelope'></i><b> Mensaje</b></a>";} ?>
</div>
<!-- /.box-body -->
</div>
</div>
<!-- About Me Box -->
<div class="col-md-4">
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">Sobre mi</h3>
</div>
<!-- /.box-header -->
<div class="box-body">
<strong><i class="fa fa-book margin-r-5"></i> Áreas de interés</strong>
<p>
<span class="label label-danger"><?php echo $interes[0] ?></span>
<span class="label label-success"> <?php echo $interes[1] ?></span>
<span class="label label-info"><?php echo $interes[2] ?></span>
</p>
<hr>
<strong><i class="fa fa-map-marker margin-r-5"></i> Ubicación</strong>
<p class="text-muted"><?php echo $locacion ?></p>
<hr>
<strong><i class="fa fa-file-text-o margin-r-5"></i> Nivel de inglés</strong>
<p class="text-muted"><?php echo $valIngles ?></p>
<hr>
<strong><i class="fa fa-file-text-o margin-r-5"></i> Experiencia laboral</strong>
<p class="text-muted"><?php echo $experiencia ?></p>
</div>
<!-- /.box-body -->
</div>
</div>
<!-- /.box -->
<!-- /.box -->
<!-- Widget: user widget style 1 -->
<!-- /.widget-user -->
<?php } ?>
</div>
<div class="row">
<div class="col-md-8">
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">Video presentación</h3>
</div>
<!-- /.box-header -->
<div class="box-body">
<?php
if ($video1 === NULL) {
echo '<iframe id="ifrmVideo" class="" src="" frameborder="0" ></iframe>';
} else {
echo "<iframe id='ifrmVideo' class='full-video' src='https://www.youtube.com/embed/$video1' frameborder='0' ></iframe>";
}
?>
</div>
<!-- /.box-body -->
</div>
</div>
</div>
</div>
</section>
</div>
<?php include 'structure/footer.panel.php'; ?>