-
Notifications
You must be signed in to change notification settings - Fork 6
/
Partidos.php
415 lines (336 loc) · 23.2 KB
/
Partidos.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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
<?php
include 'Auth.php';
include 'LQS_EUQ/PartidosPoliticos.php';
if (!empty($_POST['Registrar'])) {
sleep(2);
$FName = $_POST['form-nombre'];
$FDescripcion = $_POST['form-descripcion'];
$FReprecentante = $_POST['form-reprecentante'];
$FDPI = $_POST['form-DPI'];
//echo $FNameF."<br>".$FNameL."<br>".$FUserName."<br>".$FEmail."<br>".$FEmailR."<br>".$FPassword."<br>".$FPasswordR ;
if($FName == ""){
$error = '<div class="alert alert-danger" role="alert"><p><strong>Ingrese el nombre del partido </div>';
// echo 'Nombre Vacio' ;
}else if($FDescripcion == ""){
$error = '<div class="alert alert-danger" role="alert"><p><strong>Ingrese la descripcion del Partido </div>';
// echo 'Apellido Vacio' ;
}else if($FReprecentante == ""){
$error = '<div class="alert alert-danger" role="alert"><p><strong>Ingrese el nombre del reprecentante </div>';
// echo 'Usuario Vacio' ;
}else if($FDPI == ""){
$error = '<div class="alert alert-danger" role="alert"><p><strong>Ingrese el DPI del reprecentante </div>';
// echo 'Clave Vacio' ;
}else{
$conn = new mysqli($servername,$username,$password,$dbname);
if ($conn->connect_error){
die("Error en la conexion: ".$conn->connect_error);
}
$sql ="INSERT INTO `sistema1`.`inscri_partido` (`Nombre_Partido`, `DPI`, `Reprecentante`, `Descripcion`) VALUES ('".$FName."','".$FDPI."','".$FReprecentante."','".$FDescripcion."')";
if ($conn->query($sql) === TRUE) {
$mensajeExito = '<div class="alert alert-danger" role="alert">
<button type="button" class=close data-dismiss="myModal1">×</button>
<strong>Registrado Correctamente</strong>
</div>';
}
else{
echo "Error: " .$sql."<br>".$conn->error;
$error = '<div class="alert alert-danger" role="alert"><p><strong>No se guardaron los datos </div>';
}
}
}
?>
<!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>Admin SVG</title>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link href="css/font-awesome.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="css/animate.css" rel="stylesheet" type="text/css" />
<link href="css/admin.css" rel="stylesheet" type="text/css" />
<link href="css/jquerysctipttop.css" rel="stylesheet" type="text/css">
<link href="plugins/kalendar/kalendar.css" rel="stylesheet">
<link rel="stylesheet" href="plugins/scroll/nanoscroller.css">
<link href="plugins/morris/morris.css" rel="stylesheet" />
<link rel="stylesheet" href="css/custom2.css">
<link rel="stylesheet" href="css/EstiloTablas.css">
</head>
<body class="dark_theme fixed_header left_nav_fixed">
<div class="wrapper">
<!--\\\\\\\ wrapper Start \\\\\\-->
<div class="header_bar">
<!--\\\\\\\ header Start \\\\\\-->
<div class="brand">
<!--\\\\\\\ brand Start \\\\\\-->
<div class="logo" style="display:block"><span class="theme_color">TSE</span> Board</div>
</div>
<!--\\\\\\\ brand end \\\\\\-->
<div class="header_top_bar ">
<!--\\\\\\\ header top bar start \\\\\\-->
<a href="javascript:void(0);" class="menutoggle"> <i class="fa fa-bars"></i> </a>
<div class="top_left">
<div class="top_left_menu">
<ul>
<li> <a href="javascript:void(0);" onClick="location.reload()"><i class="fa fa-repeat"></i></a> </li>
<li class="dropdown">
<a data-toggle="dropdown" href="javascript:void(0);"> <i class="fa fa-th-large"></i> </a>
<ul class="drop_down_task dropdown-menu" style="margin-top:50px">
<div class="top_left_pointer"></div>
<li>
<div class="checkbox">
<label>
<input type="checkbox" name="remember">
Recordarme </label>
</div>
</li>
<li> <a href="help.html"><i class="fa fa-question-circle"></i> Ayuda</a> </li>
<li> <a href="settings.html"><i class="fa fa-cog"></i> Configuración </a></li>
<li> <a href="login.php"><i class="fa fa-power-off"></i> LogOut</a> </li>
</ul>
</li>
</ul>
</div>
</div>
<div class="top_right_bar">
<div class="top_right">
<div class="top_right_menu">
</div>
</div>
<div class="user_admin dropdown">
<ul class="dropdown-menu">
<div class="top_pointer"></div>
<li> <a href="profile.html"><i class="fa fa-user"></i> Perfil</a> </li>
<li> <a href="help.html"><i class="fa fa-question-circle"></i> Ayuda</a> </li>
<li> <a href="settings.html"><i class="fa fa-cog"></i> Configuracion </a></li>
<li> <a href="login.php"><i class="fa fa-power-off"></i> Logout</a> </li>
</ul>
</div>
</div>
</div>
<!--\\\\\\\ header top bar end \\\\\\-->
</div>
<!--\\\\\\\ header end \\\\\\-->
<div class="inner">
<!--\\\\\\\ inner start \\\\\\-->
<div class="left_nav">
<!--\\\\\\\left_nav start \\\\\\-->
<div class="search_bar"> <i class="fa fa-search"></i>
<input name="" type="text" class="search" placeholder="Buscar..." />
</div>
<div class="left_nav_slidebar">
<ul>
<li class="left_nav_active theme_border"><a href="javascript:void(0);"><i class="fa fa-home"></i> DASHBOARD <span class="left_nav_pointer"></span> <span class="plus"><i class="fa fa-plus"></i></span> </a>
<ul class="opened" style="display:block">
<li>
<a href="DashboardAdministrador.php"> <span> </span> <i class="fa fa-circle "></i> <b>Dashboard</b> </a>
</li>
<li>
<a href="Elecciones.php"> <span> </span> <i class="fa fa-circle"></i> <b>Elecciones</b> </a>
</li>
<li>
<a href="Partidos.php"> <span> </span> <i class="fa fa-circle theme_color"></i> <b class="theme_color">Partidos</b> </a>
</li>
<li>
<a href="Candidatos.php"> <span> </span> <i class="fa fa-circle"></i> <b>Candidatos</b> </a>
</li>
<li>
<a href="Resultados.php"> <span> </span> <i class="fa fa-circle"></i> <b>Resultados</b> </a>
</li>
<li>
<a href="Ciudadanos.php"> <span> </span> <i class="fa fa-circle"></i> <b>Ciudadanos</b> </a>
</li>
<li>
<a href="votacionesAdmin.php"> <span> </span> <i class="fa fa-circle"></i> <b>Emitir Votos</b> </a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!--\\\\\\\left_nav end \\\\\\-->
<div class="contentpanel">
<!--\\\\\\\ contentpanel start\\\\\\-->
<!-- Inicia la barra de Tutulo en right -->
<div class="pull-left breadcrumb_admin clear_both">
<div class="pull-left page_title theme_color">
<h1>Administracion de Partidos</h1>
<h2 class="">Registro de Partidos...</h2>
</div>
<div class="pull-right">
<ol class="breadcrumb">
<li><a href="http://www.google.com">TSE</a></li>
<li><a href="http://www.google.com">AplicacionesWeb</a></li>
<li class="active">Sistema de Votaciones</li>
</ol>
</div>
</div>
<!-- Finaliza Barra de Titulo en right -->
<div class="container clear_both padding_fix">
<!-- Parte del contenido -->
<!-- Inicia La seccion de usuarios -->
<div class="row">
<div id="listausuarios" class="col-md-6" >
<div class="myform-all Color_Claro" >
<!-- Inicia Tabla de Usuarios; -->
<br></br>
<h1 class="Titulos">Partidos Registrados</h1>
<table>
<tr>
<th>Numero</th>
<th>Partido</th>
<th>Descripción</th>
<th>Reprecentante</th>
<th>Modificar</th>
<th>Eliminar</th>
<?php
for($i=0; $i<$lista_usuario; $i++){
echo "<tr>";
echo "<td>";
echo $lista_usuario['id'];
echo "</td>";
echo "<td>";
echo $lista_usuario['Nombre_Partido'];
echo "</td>";
echo "<td>";
echo $lista_usuario['Descripcion'];
echo "</td>";
echo "<td>";
echo $lista_usuario['Reprecentante'];
echo "</td>";
//Prueba de Botones
echo "<td>";
echo '<a href="'.$lista_usuario['id'].'" class="fa fa-edit btn btn-success data-togle="modal" data-target="#myModal"></a>';
echo "</td>";
echo "<td>";
echo '<a href="'.$lista_usuario['id'].'" class="fa fa-trash-o btn btn-danger data-togle="modal" data-target="#myModal"></a>';
echo "</td>";
echo "</tr>";
$lista_usuario =$ejecutar_sentencia->fetch_array();
}
?>
</tr>
</table>
<!-- Finaliza Tabla de Usuarios; -->
</div>
</div>
<div class="coontainer">
<!--Inicia Formulario Login-->
<div> <?php echo $error.$mensajeExito; ?> </div>
<div class="col-md-6 my-content formulario formulario">
<div> <? echo $error . $mensajeExito; ?> </div>
<div class="container " >
<div class="row ">
</div>
<div class="row" >
<div class=" myform-cont" >
<div class="myform-top">
<div class="myform-top-left">
<h3 class="whitecolor">Registro de Partidos</h3>
<p class="whitecolor">Digite los datos del partido:</p>
</div>
<div class="myform-top-rigth">
<i class="fa fa-flag users whitecolor"> </i>
</div>
</div>
<div class="myform-botton">
<form role="form" action="" method="post" class="">
<div class="form-grup">
<input type="text" name="form-nombre" placeholder="Nombre..." class="form-control" id="form-nombre">
</div>
<div class="saltito"><h1></h1></div>
<div class="form-grup">
<input type="text" name="form-descripcion" placeholder="Descripcion..." class="form-control" id="form-descripcion">
</div>
<div class="saltito"><h1></h1></div>
<div class="form-grup">
<input type="text" name="form-reprecentante" placeholder="Reprecentante..." class="form-control" id="form-reprecentante">
</div>
<div class="saltito"><h1></h1></div>
<div class="form-grup">
<input type="text" name="form-DPI" placeholder="DPI..." class="form-control" id="form-DPI">
</div>
<div data-effect="flip" class="effect-button" id="btnActualizar"><input type="submit" name="Registrar" value="Registrar" class="effect-button" ></input></div>
<!-- <input type="submit" name="submit" class="mybtn" value="Registrar"></input> -->
</form>
</div>
</div>
</div>
</div>
</div>
<!--Finaliza Formulario LogIn-->
</div>
</div>
<!-- Finaliza la seccion de Usuarios -->
<!-- Fin del Contenido -->
<div class="demo"><span id="demo-setting"><i class="fa fa-cog txt-color-blueDark"></i></span>
<form>
<legend class="no-padding margin-bottom-10" style="color:#6e778c;">Layout Options</legend>
<section><label><input type="checkbox" class="checkbox style-0" id="smart-fixed-header" name="subscription"><span>Fixed Header</span></label><label><input type="checkbox" class="checkbox style-0" id="smart-fixed-navigation" name="terms"><span>Fixed Navigation</span></label><label><input type="checkbox" class="checkbox style-0" id="smart-rigth-navigation" name="terms"><span>Right Navigation</span></label><label><input type="checkbox" class="checkbox style-0" id="smart-boxed-layout" name="terms"><span>Boxed Layout</span></label>
<span id="smart-bgimages" style="display: none;"></span>
</section>
<section>
<h6 class="margin-top-10 semi-bold margin-bottom-5">Clear Localstorage</h6><a id="reset-smart-widget" class="btn btn-xs btn-block btn-primary" href="javascript:void(0);"><i class="fa fa-refresh"></i> Factory Reset</a></section>
<h6 class="margin-top-10 semi-bold margin-bottom-5">Ultimo Skins</h6>
<section id="smart-styles"><a style="background-color:#23262F;" class="btn btn-block btn-xs txt-color-white margin-right-5" id="dark_theme" href="javascript:void(0);"><i id="skin-checked" class="fa fa-check fa-fw"></i> Dark Theme</a><a style="background:#E35154;" class="btn btn-block btn-xs txt-color-white"
id="red_thm" href="javascript:void(0);">Red Theme</a><a style="background:#34B077;" class="btn btn-xs btn-block txt-color-darken margin-top-5" id="green_thm" href="javascript:void(0);">Green Theme</a><a style="background:#56A5DB" class="btn btn-xs btn-block txt-color-white margin-top-5"
data-skinlogo="img/logo-pale.png" id="blue_thm" href="javascript:void(0);">Blue Theme</a><a style="background:#9C6BAD" class="btn btn-xs btn-block txt-color-white margin-top-5" id="magento_thm" href="javascript:void(0);">Magento Theme</a>
<a style="background:#FFFFFF" class="btn btn-xs btn-block txt-color-black margin-top-5" id="light_theme" href="javascript:void(0);">Light Theme</a>
</section>
</form>
</div>
<script src="js/jquery-2.1.0.js"></script>
<script src="js/Usuarios.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/common-script.js"></script>
<script src="js/jquery.slimscroll.min.js"></script>
<script src="js/jquery.sparkline.js"></script>
<script src="js/sparkline-chart.js"></script>
<script src="js/graph.js"></script>
<script src="js/edit-graph.js"></script>
<script src="plugins/kalendar/kalendar.js" type="text/javascript"></script>
<script src="plugins/kalendar/edit-kalendar.js" type="text/javascript"></script>
<script src="plugins/sparkline/jquery.sparkline.js" type="text/javascript"></script>
<script src="plugins/sparkline/jquery.customSelect.min.js"></script>
<script src="plugins/sparkline/sparkline-chart.js"></script>
<script src="plugins/sparkline/easy-pie-chart.js"></script>
<script src="plugins/morris/morris.min.js" type="text/javascript"></script>
<script src="plugins/morris/raphael-min.js" type="text/javascript"></script>
<script src="plugins/morris/morris-script.js"></script>
<script src="plugins/demo-slider/demo-slider.js"></script>
<script src="plugins/knob/jquery.knob.min.js"></script>
<script src="js/jPushMenu.js"></script>
<script src="js/side-chats.js"></script>
<script src="js/jquery.slimscroll.min.js"></script>
<script src="plugins/scroll/jquery.nanoscroller.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonimus"></script>
<script src="https://cdnj.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUHKKDx6Qin1DkWx51bBrb" crossorigin="anonimus"></script>
<script src="js/bootstrap.min.js" ></script>
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonimus"></script>
<script src="https://cdnj.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUHKKDx6Qin1DkWx51bBrb" crossorigin="anonimus"></script>
<script src="js/bootstrap.min.js" ></script>
<script src="js/jquery-2.1.0.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/common-script.js"></script>
<script src="js/jquery.slimscroll.min.js"></script>
<script src="js/script.min.js"></script>
<script src="js/animated.js" type="text/javascript"></script>
<!-- <script>
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-48105801-1', 'creativico.com');
ga('send', 'pageview');
</script> -->
<script src="js/jPushMenu.js"></script>
<script src="js/side-chats.js"></script>
</body>
</html>