<th data-column-id="Dia" data-width="100px">Dia </th> <th data-column-id="Hora" data-width="100px">Hora </th> <th data-column-id="Minuto" data-width="20%">Minuto </th> <th data-column-id="Segundo" data-width="100px">Segundo </th> <th data-column-id="Ip" data-width="100px">Ip </th> <th data-column-id="Navegador" data-width="20%">Navegador </th> <th data-column-id="Usuario" data-width="100px">Usuario </th> <th data-column-id="Operacion" data-width="20%">Operacion </th> <th data-column-id="actions" align="center" data-formatter="actions" data-width="100px">Acciones</th> </tr> </thead> <tbody> <?php echo verlogs(); ?> </tbody> </table> </div> </div> </div> </div> <a type="button" href="addPost.php" class="btn btn-primary pull-right"><i class="fa fa-plus fa-fw"></i> Agregar</a> <!-- /.row --> </div>
<?php session_start(); require_once "install.php"; /* REQUEST = $_POST $_GET */ if (!empty($_REQUEST['action'])) { $accion = $_REQUEST['action']; if ($accion == 'crear') { crearlogs(); } else { if ($accion == 'ver') { verlogs(); } else { if ($accion == 'update') { updatelogs(); } else { if ($accion == 'delete') { deletelogs(); } } } } } function crearlogs() { /* Proteccion de Datos */ $params = array(':Utc ' => $_POST['Utc'], ':Anio ' => $_POST['Anio'], ':Mes ' => $_POST['Mes'], ':Dia ' => $_POST['Dia'], ':Hora ' => $_POST['Hora'], ':Minuto ' => $_POST['Minuto'], ':Segundo ' => $_POST['Segundo'], ':Ip ' => $_POST['Ip'], ':Navegador ' => $_POST['Navegador'], ':Usuario ' => $_POST['Usuario'], ':Operacion ' => $_POST['Operacion']); /* Preparamos el query apartir del array $params*/ $query = 'INSERT INTO logs (Utc,Anio,Mes,Dia,Hora,Minuto,Segundo,Ip,Navegador,Usuario,Operacion) VALUES