<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['S_Alias']) || empty($_POST['S_name'])) { echo "You must complete requiered data"; exit; } /*modificar el registro*/ $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } $sql = sprintf("UPDATE Strain SET Alias='%s', Nombre='%s', Tipo_Bacteria='%s',Medio_Almacenamiento='%s',storage='%s',contenedor='%s',Comment='%s',lab='%s' where Strain_ID=%d;", fn_filtro(substr($_POST['S_Alias'], 0, 60)), fn_filtro(substr($_POST['S_name'], 0, 60)), fn_filtro(substr($_POST['S_type'], 0, 60)), fn_filtro(substr($_POST['S_storageM'], 0, 60)), fn_filtro(substr($_POST['storage'], 0, 60)), fn_filtro(substr($_POST['S_container'], 0, 60)), fn_filtro(substr($_POST['S_comment'], 0, 60)), $consulLab, fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['usu_per'])) { echo "You must complete requiered data"; exit; } /*obtenemos el ide mayor*/ $sql = "select id_position from position order by id_position desc limit 1"; $per = mysql_query($sql); $rs_per = mysql_fetch_assoc($per); /*insertamos el nuevo registro*/ $ide_per = $rs_per['id_position'] + 1; $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } $sql = sprintf("INSERT INTO `position` VALUES (%d, '%s', '%s');", fn_filtro((int) $ide_per), fn_filtro(substr($_POST['usu_per'], 0, 16)), fn_filtro(substr($consulLab, 0, 70))); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } /*modificar el registro*/ $sql = sprintf("UPDATE organism_information SET Alias='%s', Isolated_by='%s', Date_of_Isolation='%s',id_storage=%d,Origin='%s', item='%s', level='%s', Additional_Comments='%s',lab='%s' where Org_ID=%d;", fn_filtro(substr($_POST['usu_per'], 0, 60)), fn_filtro(substr($_POST['nom_per'], 0, 60)), fn_filtro(substr($_POST['comp'], 0, 60)), fn_filtro((int) $_POST['storage']), fn_filtro(substr($_POST['ape_per'], 0, 70)), fn_filtro(substr($_POST['proveedor'], 0, 60)), fn_filtro(substr($_POST['producto'], 0, 70)), fn_filtro(substr($_POST['ster'], 0, 70)), fn_filtro(substr($consulLab, 0, 70)), fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per'])) { echo "You must complete requiered data"; exit; } /*modificar el registro*/ $sql = sprintf("UPDATE role SET Type='%s' where Role_ID=%d;", fn_filtro(substr($_POST['usu_per'], 0, 60)), fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['usu_per']) || empty($_POST['nom_per'])) { echo "You must complete requiered data"; exit; } $numero = $_POST['usu_per']; if ($numero < 1 || $numero >= 15) { echo "The range of ph is 1-14"; exit; } /*obtenemos el ide mayor*/ $sql = "select Soil_type_ID from soil_type order by Soil_type_ID desc limit 1"; $per = mysql_query($sql); $rs_per = mysql_fetch_assoc($per); /*insertamos el nuevo registro*/ $ide_per = $rs_per['Soil_type_ID'] + 1; $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } $sql = sprintf("INSERT INTO `soil_type` VALUES (%d, '%s', '%s', '%s', '%s');", fn_filtro((int) $ide_per), fn_filtro(substr($_POST['nom_per'], 0, 60)), fn_filtro(substr($_POST['usu_per'], 0, 16)), fn_filtro(substr($_POST['ape_per'], 0, 60)), fn_filtro(substr($consulLab, 0, 60))); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
$paging = new PHPPaging(); $sql = "select * from assay_type where lab='{$consul2}'"; } if (isset($_GET['criterio_usu_per'])) { $sql .= " where Name like '%" . fn_filtro(substr($_GET['criterio_usu_per'], 0, 16)) . "%'"; } if (isset($_GET['criterio_ordenar_por'])) { $sql .= sprintf(" order by %s %s", fn_filtro($_GET['criterio_ordenar_por']), fn_filtro($_GET['criterio_orden'])); } else { $sql .= " order by Assay_Type_ID desc"; } $paging->agregarConsulta($sql); $paging->div('div_listar'); $paging->modo('desarrollo'); if (isset($_GET['criterio_mostrar'])) { $paging->porPagina(fn_filtro((int) $_GET['criterio_mostrar'])); } $paging->verPost(true); $paging->mantenerVar("criterio_usu_per", "criterio_ordenar_por", "criterio_orden", "criterio_mostrar"); $paging->ejecutar(); ?> <table id="grilla" class="lista" width="690px"> <thead> <tr> <th>Name</th> <th>Alias</th> <th>Description</th> <?php if ($consul1 == "Supermanager") { ?>
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['usu_per'])) { echo "You must complete requiered data"; exit; } /*obtenemos el ide mayor*/ $sql = "select Role_ID from role order by Role_ID desc limit 1"; $per = mysql_query($sql); $rs_per = mysql_fetch_assoc($per); /*insertamos el nuevo registro*/ $ide_per = $rs_per['Role_ID'] + 1; $sql = sprintf("INSERT INTO `role` VALUES (%d, '%s','%s');", fn_filtro((int) $ide_per), fn_filtro(substr($_POST['usu_per'], 0, 16)), fn_filtro(substr($_POST['email_per'], 0, 70))); if (!mysql_query($sql)) { echo "Error to insert:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['usu_per']) || empty($_POST['nom_per'])) { echo "You must complete requiered data"; exit; } /*obtenemos el ide mayor*/ $sql = "select Extraction_Method_ID from extraction_method order by Extraction_Method_ID desc limit 1"; $per = mysql_query($sql); $rs_per = mysql_fetch_assoc($per); $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } /*insertamos el nuevo registro*/ $ide_per = $rs_per['Extraction_Method_ID'] + 1; $sql = sprintf("INSERT INTO `extraction_method` VALUES (%d, '%s', '%s', '%s', '%s');", fn_filtro((int) $ide_per), fn_filtro(substr($_POST['usu_per'], 0, 16)), fn_filtro(substr($_POST['nom_per'], 0, 60)), fn_filtro(substr($_POST['ape_per'], 0, 60)), fn_filtro(substr($consulLab, 0, 70))); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['nom_per'])) { echo "You must complete requiered data"; exit; } $numero = $_POST['usu_per']; if ($numero < 1 || $numero >= 15) { echo "The range of ph is 1-14"; exit; } $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } /*modificar el registro*/ $sql = sprintf("UPDATE soil_type SET Alias='%s', PH='%s', Organic_matter='%s',lab='%s' where Soil_type_ID=%d;", fn_filtro(substr($_POST['nom_per'], 0, 60)), fn_filtro(substr($_POST['usu_per'], 0, 60)), fn_filtro(substr($_POST['ape_per'], 0, 70)), fn_filtro(substr($consulLab, 0, 60)), fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error to insert:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['usu_per'])) { echo "You must complete requiered data"; exit; } /*obtenemos el ide mayor*/ $sql = "select Physiological_state_ID from physiological_state order by Physiological_state_ID desc limit 1"; $per = mysql_query($sql); $rs_per = mysql_fetch_assoc($per); /*insertamos el nuevo registro*/ $ide_per = $rs_per['Physiological_state_ID'] + 1; $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } $sql = sprintf("INSERT INTO `physiological_state` VALUES (%d, '%s', '%s', '%s');", fn_filtro((int) $ide_per), fn_filtro(substr($_POST['usu_per'], 0, 16)), fn_filtro(substr($_POST['ape_per'], 0, 60)), fn_filtro(substr($consulLab, 0, 70))); if (!mysql_query($sql)) { echo "Error to insert:\n{$sql}"; } exit;
include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['usu_per']) || empty($_POST['nom_per'])) { echo "You must complete requiered data"; exit; } /*obtenemos el ide mayor*/ $sql = "select Surface_Morphology_ID from surface_morphology order by Surface_Morphology_ID desc limit 1"; $per = mysql_query($sql); $rs_per = mysql_fetch_assoc($per); /*insertamos el nuevo registro*/ $ide_per = $rs_per['Surface_Morphology_ID'] + 1; $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } if ($_POST['comp'] != 'Smooth') { $le = $_POST['ster']; } else { $le = ""; } $col = $_POST['colo']; $sql = sprintf("INSERT INTO `surface_morphology` VALUES (%d, '%s','%s', '%s', '%s', '%s', '%s', '%s','%s','%s');", fn_filtro((int) $ide_per), fn_filtro(substr($_POST['name'], 0, 16)), fn_filtro(substr($_POST['usu_per'], 0, 16)), fn_filtro(substr($_POST['nom_per'], 0, 60)), fn_filtro(substr($_POST['ape_per'], 0, 60)), fn_filtro(substr($_POST['comp'], 0, 60)), $le, fn_filtro(substr($_POST['ph'], 0, 60)), $col, fn_filtro(substr($consulLab, 0, 70))); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['nom_per'])) { echo "You must complete requiered data"; exit; } $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } /*modificar el registro*/ if ($_POST['comp'] != 'Smooth') { $le = $_POST['ster']; } else { $le = ""; } $sql = sprintf("UPDATE surface_morphology SET Name='%s' ,Form='%s', Elevation='%s',Margin='%s', Appereance='%s', Level='%s', Pigmentation='%s', Color='%s',lab='%s' where Surface_Morphology_ID=%d;", fn_filtro(substr($_POST['name'], 0, 60)), fn_filtro(substr($_POST['usu_per'], 0, 60)), fn_filtro(substr($_POST['nom_per'], 0, 60)), fn_filtro(substr($_POST['ape_per'], 0, 70)), fn_filtro(substr($_POST['comp'], 0, 60)), $le, fn_filtro(substr($_POST['ph'], 0, 70)), fn_filtro(substr($_POST['colo'], 0, 70)), fn_filtro(substr($consulLab, 0, 70)), fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['usu_per']) || empty($_POST['nom_per'])) { echo "You must complete requiered data"; exit; } /*obtenemos el ide mayor*/ $sql = "select Medium_ID from medium order by Medium_ID desc limit 1"; $per = mysql_query($sql); $rs_per = mysql_fetch_assoc($per); /*insertamos el nuevo registro*/ $ide_per = $rs_per['Medium_ID'] + 1; $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } $sql = sprintf("INSERT INTO `medium` VALUES (%d, '%s', '%s', '%s', '%s', '%s','%s','%s');", fn_filtro((int) $ide_per), fn_filtro(substr($_POST['usu_per'], 0, 16)), fn_filtro(substr($_POST['nom_per'], 0, 60)), fn_filtro(substr($_POST['ape_per'], 0, 60)), fn_filtro(substr($_POST['comp'], 0, 60)), fn_filtro(substr($_POST['ster'], 0, 60)), fn_filtro(substr($_POST['ph'], 0, 60)), fn_filtro(substr($consulLab, 0, 70))); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per'])) { echo "You must complete requiered data"; exit; } $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } /*modificar el registro*/ $sql = sprintf("UPDATE physiological_state SET Status='%s', Level='%s',lab='%s' where Physiological_state_ID=%d;", fn_filtro(substr($_POST['usu_per'], 0, 60)), fn_filtro(substr($_POST['ape_per'], 0, 70)), fn_filtro(substr($consulLab, 0, 70)), fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['nom_per'])) { echo "You must complete requiered data"; exit; } $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } /*modificar el registro*/ $sql = sprintf("UPDATE medium SET Name='%s', Alias='%s', Type='%s',Components='%s', Sterilization='%s', PH='%s',lab='%s' where Medium_ID=%d;", fn_filtro(substr($_POST['usu_per'], 0, 60)), fn_filtro(substr($_POST['nom_per'], 0, 60)), fn_filtro(substr($_POST['ape_per'], 0, 70)), fn_filtro(substr($_POST['comp'], 0, 60)), fn_filtro(substr($_POST['ster'], 0, 60)), fn_filtro(substr($_POST['ph'], 0, 70)), fn_filtro(substr($consulLab, 0, 70)), fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['nom_per'])) { echo "You must complete requiered data"; exit; } /*modificar el registro*/ if (empty($_POST['ape_per'])) { $level = ""; } else { $level = $_POST['ape_per']; } $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } $sql = sprintf("UPDATE community_type SET Name='%s', Type='%s', Level='%s',lab='%s' where Community_type_ID=%d;", fn_filtro(substr($_POST['usu_per'], 0, 60)), fn_filtro(substr($_POST['nom_per'], 0, 60)), $level, $consulLab, fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per'])) { echo "You must complete requiered data"; exit; } /*modificar el registro*/ $sql = sprintf("UPDATE lab SET Name='%s' where id_lab=%d;", fn_filtro(substr($_POST['usu_per'], 0, 60)), fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['S_Alias']) || empty($_POST['S_name'])) { echo "You must complete requiered data"; exit; } /*modificar el registro*/ $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } $sql = sprintf("UPDATE plasmid SET Alias='%s', Nombre='%s', Vector='%s',Fecha_Extraccion='%s',Storage='%s',Contenedor='%s',Comment='%s',lab='%s' where Plasmid_ID=%d;", fn_filtro(substr($_POST['S_Alias'], 0, 60)), fn_filtro(substr($_POST['S_name'], 0, 60)), fn_filtro(substr($_POST['S_type'], 0, 60)), fn_filtro(substr($_POST['R_fecha'], 0, 60)), fn_filtro(substr($_POST['storage'], 0, 60)), fn_filtro(substr($_POST['S_container'], 0, 60)), fn_filtro(substr($_POST['S_comment'], 0, 60)), $consulLab, fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per'])) { echo "You must complete requiered data"; exit; } $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } /*modificar el registro*/ $sql = sprintf("UPDATE position SET position='%s',lab='%s' where id_position=%d;", fn_filtro(substr($_POST['usu_per'], 0, 60)), fn_filtro(substr($consulLab, 0, 70)), fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['nom_per'])) { echo "You must complete requiered data"; exit; } $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } /*modificar el registro*/ $sql = sprintf("UPDATE storage SET Name='%s', Alias='%s', Description='%s',lab='%s' where Storage_ID=%d;", fn_filtro(substr($_POST['usu_per'], 0, 60)), fn_filtro(substr($_POST['nom_per'], 0, 60)), fn_filtro(substr($_POST['ape_per'], 0, 70)), fn_filtro(substr($consulLab, 0, 70)), fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['S_Alias']) || empty($_POST['S_name'])) { echo "You must complete requiered data"; exit; } /*modificar el registro*/ $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } $sql = sprintf("UPDATE reagent SET Alias='%s', Nombre='%s', Marca='%s',Presentacion='%s',Temperature='%s',Contenedor='%s',Comment='%s',lab='%s' where Reagent_ID=%d;", fn_filtro(substr($_POST['S_Alias'], 0, 60)), fn_filtro(substr($_POST['S_name'], 0, 60)), fn_filtro(substr($_POST['S_type'], 0, 60)), fn_filtro(substr($_POST['S_storageM'], 0, 60)), fn_filtro(substr($_POST['R_Temperature'], 0, 60)), fn_filtro(substr($_POST['S_container'], 0, 60)), fn_filtro(substr($_POST['S_comment'], 0, 60)), $consulLab, fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['usu_per'])) { echo "You must complete requiered data"; exit; } /*obtenemos el ide mayor*/ $sql = "select id_lab from lab order by id_lab desc limit 1"; $per = mysql_query($sql); $rs_per = mysql_fetch_assoc($per); /*insertamos el nuevo registro*/ $ide_per = $rs_per['id_lab'] + 1; $sql = sprintf("INSERT INTO `lab` VALUES (%d, '%s');", fn_filtro((int) $ide_per), fn_filtro(substr($_POST['usu_per'], 0, 16))); if (!mysql_query($sql)) { echo "Error to insert:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per'])) { echo "You must complete requiered data"; exit; } $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } /*modificar el registro*/ $sql = sprintf("UPDATE sequencing_method SET Name='%s', Description='%s',lab='%s' where Sequencing_Method_ID=%d;", fn_filtro(substr($_POST['usu_per'], 0, 60)), fn_filtro(substr($_POST['ape_per'], 0, 70)), fn_filtro(substr($consulLab, 0, 70)), fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<?php include "../../../../bdConnection.php"; include "../extras/php/basico.php"; /*verificamos si las variables se envian*/ if (empty($_POST['usu_per']) || empty($_POST['nom_per'])) { echo "You must complete requiered data"; exit; } /*modificar el registro*/ $laboratory = $_POST['email_per']; $sqlk = "SELECT id_lab FROM lab WHERE Name like '%{$laboratory}%'"; $lab = mysql_query($sqlk); while ($campo = mysql_fetch_array($lab)) { $consulLab = $campo[0]; } $sql = sprintf("UPDATE extraction_method SET Name='%s', Alias='%s', Description='%s',lab='%s' where Extraction_Method_ID=%d;", fn_filtro(substr($_POST['usu_per'], 0, 60)), fn_filtro(substr($_POST['nom_per'], 0, 60)), fn_filtro(substr($_POST['ape_per'], 0, 70)), fn_filtro(substr($consulLab, 0, 70)), fn_filtro((int) $_POST['ide_per'])); if (!mysql_query($sql)) { echo "Error al insertar a la nueva persona:\n{$sql}"; } exit;
<td colspan="13"> <?php echo $paging->fetchNavegacion() . "<br/>"; ?> </td> </tr> </tfoot> </table> <?php //Aqui mostramos el total de cantidad $conexion = new ConsultaBD(); $conexion->Conectar(); $sql = "SELECT SUM(factura_detalles.cantidad) AS totalcantidad from factura_maestros\n\nINNER JOIN factura_detalles ON factura_maestros.`id`=factura_detalles.`factura_maestro_id`\nLEFT JOIN empleados ON factura_maestros.`empleado_id`=empleados.`id`\nLEFT JOIN tipo_recetas ON tipo_recetas.`id`=factura_detalles.`id_tipo_plato` "; if (isset($_GET['criterio_buscar'])) { $sql .= " WHERE factura_detalles.descripcion like '%" . fn_filtro(substr(utf8_decode($_GET['criterio_buscar']), 0, 16)) . "%'"; } if (isset($_GET['intervalo']) && $_GET['intervalo'] == 0) { if (isset($_GET['fechaDesde']) && $_GET['fechaDesde'] != '') { $dia = substr($_GET['fechaDesde'], 0, 2); $mes = substr($_GET['fechaDesde'], 3, 2); $anio = substr($_GET['fechaDesde'], 6, 4); if (isset($_GET['horaDesde']) && $_GET['horaDesde'] != '') { $hora = substr($_GET['horaDesde'], 0, 2); $min = substr($_GET['horaDesde'], 3, 2); } else { $hora = '00'; $min = '00'; } $seg = '00'; $sql .= " AND IF(factura_detalles.`fecha_alta` IS NULL, DATE_FORMAT(factura_maestros.`fecha_y_hora`,'%Y-%m-%d %H:%i:%s'), DATE_FORMAT(factura_detalles.`fecha_alta`,'%Y-%m-%d %H:%i:%s')) >= DATE_FORMAT('" . $anio . "-" . $mes . "-" . $dia . " " . $hora . ":" . $min . ":" . $seg . "', '%Y-%m-%d %H:%i:%s')";