コード例 #1
0
ファイル: usuario_old.php プロジェクト: C0l0ch0/BPV_WAU
    function refresh()
    {
        if (isset($_POST["User"]) and isset($_POST["pass"]) and isset($_POST["email"]) and isset($_POST["selector"]) and isset($_POST["nombre"]) and $_POST["User"] != '' and $_POST["pass"] != '' and $_POST["email"] != '' and $_POST["selector"] != '' and $_POST["nombre"] != '') {
            $conexion = new MySQL(0);
            $value = $conexion->consulta("select * from rol where usuario ='" . $_POST["selector"] . "';");
            $row = $conexion->fetch_array($value);
            $strIngreso = '	update usuario 
									set usuario = "' . $_POST["User"] . '", pass ="******"pass"] . '",
									estatus="' . $_POST["selector3"] . '", id_rol=' . $row['ID_Rol'] . ',
									nombre ="' . $_POST["nombre"] . '",email="' . $_POST["email"] . '"
									where Id_usuario = "' . $_POST["usuario"] . '";';
            $value1 = $conexion->consulta($strIngreso);
            $conexion->MySQLClose();
            $_SESSION['value'] = 'Usuario actualizado exitosamente.';
            session_write_close();
            exit(header('Location: http://' . URL . DS . 'dashboard' . DS . 'start'));
        } else {
            $_SESSION['value'] = "error";
            session_write_close();
            exit(header('Location: http://' . URL . DS . 'usuario' . DS . 'edit'));
        }
    }
コード例 #2
0
ファイル: guardiaD.php プロジェクト: C0l0ch0/BPV_WAU
	curl_setopt($curl,CURLOPT_SSL_VERIFYPEER, false);
	$resp = curl_exec($curl);
	$servers = json_decode($resp,true);
	echo $resp;
	curl_close($curl);
	if(count($servers['servers'])>0){
		$var=0;
		for($i=0;$i<count($servers['servers']);$i++){
			if ($servers['servers'][$i]['health_status'] != 'green'){
				$var++;
			}
		}
	}*/
$strConsulta = "select cantidad from monitor where id_servicio =4";
$consulta = $conexion->consulta($strConsulta);
$row = $conexion->fetch_array($consulta);
if ($row['cantidad'] > 0) {
    //if($var>0){
    ?>
	<span class="notification red">Alarmas: <?php 
    echo $row['cantidad'];
    ?>
</span>
<?php 
} else {
    ?>
	<span class="notification green">OK</span>
<?php 
}
?>
	<div class="box-inner">
コード例 #3
0
ファイル: menus.php プロジェクト: juliocastillo/ninfac
            return error
            }

</script>
<br></br>
        <div align="center">
          <form name="frmhos_menus" action="./menus_cnx.php?cid_p=<?php 
echo $_GET['idp'] . '&cid_s=' . $_GET['ids'] . '&acn=' . $_GET['acn'];
?>
" method="POST" onsubmit="return obliga(this)">
               <?php 
$cid_p = $_GET['idp'];
$cid_s = $_GET['ids'];
$acn = $_GET['acn'];
$result_p = $db->consulta("select * from menup where id_mp='{$cid_p}'");
$aregistros_p = $db->fetch_array($result_p);
$menup = $aregistros_p['menup'];
if ($acn == 2) {
    $result_consulta = $db->consulta("select * from menus where id_ms='{$cid_s}'");
    while ($aregistros = $db->fetch_array($result_consulta)) {
        $menus = $aregistros['menus'];
        $urls = $aregistros['urls'];
        $ordens = $aregistros['ordens'];
        $estado = $aregistros['estado'];
        $readonly = $aregistros['readonly'];
        $readwrite = $aregistros['readwrite'];
    }
}
?>

               <table border="1" width="570px"  cellspacing="0">
コード例 #4
0
ファイル: model.php プロジェクト: juliocastillo/ninfac
 function get_recibo_cobro_id($id_recibo)
 {
     $db = new MySQL();
     $sql = "\n            SELECT \n                r.id_documento,\n                r.id_vendedor,\n                r.n_recibo,\n                DATE_FORMAT(r.fecha_recibo,'%d/%m/%Y') fecha_recibo,\n                r.tipo_pago,\n                r.n_cheque,\n                r.banco,\n                r.monto\n            FROM\n                recibos_cxc r\n            WHERE id='{$id_recibo}'";
     return $db->fetch_array($db->consulta($sql));
 }
コード例 #5
0
ファイル: llenarlistas.php プロジェクト: juliocastillo/ninfac
 function llenarlista($sel)
 {
     $db = new MySQL();
     $sqlcommand = "SELECT id, grupo as nombre\n                        FROM grupo";
     $result = $db->consulta($sqlcommand);
     $html = "";
     while ($row = $db->fetch_array($result)) {
         /*
          * seleccionar el registro por default enviado
          */
         if ($row['id'] == $sel) {
             $html .= "<option value='" . $row['id'] . "' selected>" . htmlentities($row['nombre']) . "</option>";
         } else {
             $html .= "<option value='" . $row['id'] . "'>" . htmlentities($row['nombre']) . "</option>";
         }
     }
     return $html;
 }
コード例 #6
0
?>
">Pre:<input type="text" size="10" name="pre_fijo" value=""><br>
                    </td>
                <tr>
                    <td>
            <input type="submit" value="Buscar">
            </td>
            </table>
        </form>
        <?php 
if ($nombre) {
    $result = $model->busqueda_cliente($nombre);
    echo "<table border='1' class='resultTable'>";
    echo "<th>Corr</th><th>ID</th><th>Nombre</th>";
    $i = 1;
    while ($row = $db->fetch_array($result)) {
        ?>
                <tr>
                    <td>
                        <?php 
        echo $i++;
        ?>
                    </td>
                    <td>
                        <?php 
        echo $row['id'];
        ?>
                    </td>
                    <td>
                        <a href="javascript:capture_id('<?php 
        echo $row['id'];
コード例 #7
0
ファイル: arbol.php プロジェクト: juliocastillo/ninfac
<link href="../html/css/menuarbolaccesible.css" rel="stylesheet" type="text/css" />
<script src="../html/js/menuarbolaccesible.js" type="text/javascript"></script>

<?php 
?>

    <body>
    <?php 
require_once 'conexion.inc';
$db = new MySQL();
$csqlcmd = "SELECT * FROM  menup WHERE tbsistema_id=1 ORDER BY orden";
$result = $db->consulta($csqlcmd);
?>
<ul id="menu1">
    <?php 
while ($aregistros = $db->fetch_array($result)) {
    $menup = htmlentities($aregistros['menup']);
    $idp = $aregistros['id_mp'];
    ?>
    <li><?php 
    echo $menup;
    $csqlcmds = "SELECT * FROM  menus WHERE id_mp = {$idp}";
    $results = $db->consulta($csqlcmds);
    ?>
   <ul><a href="./menup.php?acn=2&idp=<?php 
    echo $idp;
    ?>
">modificar <?php 
    echo $menup;
    ?>
</a> --
コード例 #8
0
ファイル: modpersonal.php プロジェクト: zafirodev/geot
<?php 
include "header.php";
$db = new MySQL();
$query = "select * from personal where ID=" . $_GET['ID'];
$resulto = $db->consulta($query);
while ($result = $db->fetch_array($resulto)) {
    ?>
<div id="frmaltapersonal" class="formularios" >
		<form  id="altaot" class="altas" action="ajax/abmpersonalmod.php" method="post" style="height:180px;">
			<div id="ajax_loader" style=" position:fixed; margin-top: -32px;">
	<img id="loader_gif" src="img/239.gif" style="display:none; margin-bottom:-420px; "/></div>
            <h2 align="center">Editar Personal</h2>
			<label>Apellido y Nombre:</label> <input type="text" id="nombreapellido" name="nombreapellido" value="<?php 
    echo $result['NombreApellido'];
    ?>
"/><br>
            <label>Puesto:</label> <select name="puesto">
										<?php 
    $query = "select * from puesto";
    $resulti = $db->consulta($query);
    while ($result2 = $db->fetch_array($resulti)) {
        if ($result['PuestoID'] == $result2['ID']) {
            $selp = "selected";
        } else {
            $selp = "";
        }
        echo '<option value="' . $result2['ID'] . '" ' . $selp . '>' . utf8_encode($result2['Descripcion']) . '</option>';
    }
    ?>
									</select><br>
			<label>CUIT/CUIL:</label> <input type="text" id="cuilcuit" name="cuilcuit" value="<?php 
コード例 #9
0
ファイル: eliminar.php プロジェクト: poseidonihp/PracticaEvo
<?php

include "mysql.inc.php";
$files = $_REQUEST['delete'];
$dir = "../temporaty/";
$contador = 0;
//Verificamos si lo que hemos enviado es un array
if (is_array($files)) {
    for ($i = 0; $i < count($files); $i++) {
        //Creamos la estancia de conexion.
        $db = new MySQL();
        $mysqli = new mysqli("localhost", "root", "123", "practica");
        //Eliminamos el archivo antes de eliminar el registro
        $query = "SELECT nombre_image FROM tbl_temp_files WHERE id_files=" . $files[$i];
        $result = $mysqli->query($query);
        $numrows = mysqli_num_rows($result);
        //$row=$db ->consulta("SELECT nombre_image FROM tbl_temp_files WHERE id_files=".$files[$i]);
        $rows = $db->fetch_array($row);
        unlink($dir . $rows['nombre_image']);
        //Eliminamos el registro de la BD
        $query1 = "DELETE FROM tbl_temp_files WHERE id_files=" . $files[$i];
        $rows = $mysqli->query($query1);
        $contador++;
    }
    //echo "Se han eliminado los $contador registros de la BD";
    echo '<script>location.href="../";</script>';
} else {
    //echo "No se enviaron segistros para eliminar";
    echo '<script>window.alert("No se enviaron segistros para eliminar");location.href="../";</script>';
}
コード例 #10
0
<?php

require_once '../php/conexion.php';
$correo = "*****@*****.**";
// $cc = mysqli_escape_string($correo);
//armandobs94@gmail.com
//luiyii94coty@gmail.com
$query = "SELECT P.id_post,P.id_autor,P.titulo, P.resumen,P.fecha,U.correo,U.nombre_completo,A.foto FROM post as P, usuarios as U, autores as A WHERE P.id_autor=A.id_autor AND A.id_usuario = U.id_usuario \n    AND U.correo = '{$correo}'";
$data = new MySQL(SERVER, USER, PASSW, BD);
$post = $data->consulta($query);
$registros = $data->fetch_array($post);
$num = $data->num_rows($post);
?>
<div class="col-md-2 p-izquierda">
    <div id="pImage"> 
    <img class="img-responsive thumbnail" src="<?php 
echo "../" . $registros['foto'];
?>
" alt="myImage">
        <p class="text-center">
            <strong>¡Bienvenido!</strong><br>
            <span class="blogAutor"><?php 
echo $registros['nombre_completo'];
?>
</span>
        </p>
    </div>
</div><!-- Termina columna izquierda-->

<div class="col-md-7 p-centro">
    <div class="alert alert-success" role="alert"><p class="text-center"></p></div>
コード例 #11
0
ファイル: detalleot.php プロジェクト: zafirodev/geot
<?php

include "header.php";
$id = $_GET['nroot'];
$db = new MySQL();
$query = "SELECT ot.*,e.Descripcion AS empresa,p.NombreApellido AS empleado, est.Descripcion AS estado FROM ot inner join empresas as e ON ot.Servicio_EmpresaID = e.ID INNER JOIN personal AS p ON ot.personalID = p.ID INNER JOIN estados AS est ON ot.EstadoID = est.ID WHERE ot.ID = '{$id}'";
$result = $db->consulta($query);
$Cant = $db->num_rows($result);
// obtenemos la cantidad de registros encontrados.
$resultot = $db->fetch_array($result);
?>

<div style="border: solid 1px;width: 500px;" align="center" class="formularios">
<p align="left">Se encontraron <?php 
echo $Cant;
?>
 Registros</p>
<br>
		<label>ID Cliente:</label><input type="text" value="<?php 
echo $resultot['ClientesID'];
?>
" disabled="disabled" /><br>
		<label>ID Visita:</label><input type="text" value="<?php 
echo $resultot['NumeroVisita'];
?>
" disabled="disabled" /><br>
		<label>Empresa:</label><input type="text" value="<?php 
echo $resultot['empresa'];
?>
" disabled="disabled" /><br>
		<label>Fecha Emision:</label><input type="text" value="<?php 
コード例 #12
0
ファイル: clientes.php プロジェクト: juliocastillo/ninfac
 function make_table($consulta)
 {
     $db = new MySQL();
     while ($row = $db->fetch_array($consulta)) {
         $tblbody .= "<tr>" . "<td>" . $row['id'] . "</td>" . "<td>" . $row['codigo'] . "</td>" . "<td>" . $row['nombre'] . "</td>" . "<td>" . $row['dir'] . "</td>" . "<td>" . $row['zona'] . "</td>" . "<td>" . "<a href='clientes.php?req=5&id=" . $row['id'] . "'>" . $row['estado'] . "</a>" . "</td>" . "<td>" . "<a href='clientes.php?req=3&id=" . $row['id'] . "'>Modificar</a>" . "</td>" . "</tr>";
     }
     return $tblbody;
 }
コード例 #13
0
ファイル: Orders.php プロジェクト: atoledov/siglab
 public function generateHeader()
 {
     $_db = new MySQL();
     $_db->connect();
     $_html = "";
     $_sql = "SELECT PacIdentificacion, PacApellido, PacNombre, PacFechaNac, GeneroDescripcion,\r\n                        OrdId, OrdTurno, DATE_FORMAT(OrdFecha, '%d-%m-%Y') AS OrdFecha, MedApellido, \r\n                        MedNombre, SalaHospDescripcion, LabAreaDescripcion, CamaDescripcion,\r\n                        CASE WHEN OrdFechaIngreso!='' AND OrdFechaIngreso!='0000-00-00 00:00:00' THEN \r\n                        DATE_FORMAT(OrdFechaIngreso, '%d-%m-%Y') ELSE '' END AS OrdFechaIngreso\r\n                 FROM {$this->_table}";
     $_db->prepare($_sql);
     $_result = $_db->execute();
     if ($_db->num_rows($_result) > 0) {
         @($data = $_db->fetch_array($_result));
         $this->setOrderId($data["OrdId"]);
         $this->setTurn($data["OrdTurno"]);
         $_html .= "<table width='100%'>";
         $_html .= "<thead>";
         $_html .= "<tr>";
         $_html .= "<td width='15%'>Paciente:</td>";
         $_html .= "<td width='25%'>" . ucwords(strtolower(utf8_encode($data["PacApellido"] . " " . $data["PacNombre"]))) . "</td>";
         $_html .= "<td width='10%'>Sala:</td>";
         $_html .= "<td width='15%'>{$data["SalaHospDescripcion"]}</td>";
         $_html .= "<td width='15%'>An&aacute;isis:</td>";
         $_html .= "<td width='20%'>{$data["OrdTurno"]}</td>";
         $_html .= "</tr>";
         $_html .= "<tr>";
         $_html .= "<td>Fecha Orden:</td>";
         $_html .= "<td>{$data["OrdFecha"]}</td>";
         $_html .= "<td>Cama:</td>";
         $_html .= "<td>{$data["CamaDescripcion"]}</td>";
         $_html .= "<td>CI:</td>";
         $_html .= "<td>{$data["PacIdentificacion"]}</td>";
         $_html .= "</tr>";
         $_html .= "<tr>";
         $_html .= "<td>Fecha Ingreso:</td>";
         $_html .= "<td>{$data["OrdFechaIngreso"]}</td>";
         $_html .= "<td>Area:</td>";
         $_html .= "<td>{$data["LabAreaDescripcion"]}</td>";
         $_html .= "<td>Edad:</td>";
         $_html .= "<td>" . Util::getAge($data["PacFechaNac"]) . " a&ntilde;os</td>";
         $_html .= "</tr>";
         $_html .= "<tr>";
         $_html .= "<td>Medico:</td>";
         $_html .= "<td>" . ucwords(strtolower(utf8_encode($data["MedApellido"] . " " . $data["MedNombre"]))) . "</td>";
         $_html .= "<td></td>";
         $_html .= "<td></td>";
         $_html .= "<td>Sexo:</td>";
         $_html .= "<td>" . ucwords(strtolower($data["GeneroDescripcion"])) . "</td>";
         $_html .= "</tr>";
         $_html .= "</thead>";
         $_html .= "</table>";
     }
     return $_html;
 }
コード例 #14
0
 function make_table($consulta, $id_documento)
 {
     $db = new MySQL();
     $tblbody = "<table style='width: 900px; border-collapse:collapse' border='1'>";
     $tblbody .= "<thead>D e t a l l e</thead>";
     $tblbody .= "<tr>";
     $tblbody .= "<td style='background-color: #FFCC99'>Corr</td>";
     $tblbody .= "<td style='background-color: #FFCC99'>Tipo entrada</td>";
     $tblbody .= "<td style='background-color: #FFCC99'>Producto</td>";
     $tblbody .= "<td style='background-color: #FFCC99'>Lote</td>";
     $tblbody .= "<td style='background-color: #FFCC99'>Presentacion</td>";
     $tblbody .= "<td style='background-color: #FFCC99'>Cantidad</td>";
     $tblbody .= "<td style='background-color: #FFCC99'>Precio unitario</td>";
     $tblbody .= "</tr>";
     $i = 0;
     while ($row = $db->fetch_array($consulta)) {
         $i++;
         $tblbody .= "<tr>" . "<td>" . $i . "</td>" . "<td style='text-align: center'>" . $row['tipo_entrada'] . "</td>" . "<td>" . "<a href='entrada_producto_terminado.php?req=3&id=" . $row['id'] . "'>" . $row['nombre_producto'] . "</a></td>" . "<td style='text-align: right'>" . $row['lote'] . "</td>" . "<td style='text-align: right'>" . $row['presentacion'] . "</td>" . "<td style='text-align: right'>" . $row['cantidad'] . "</td>" . "<td style='text-align: right'>" . $row['precio_unit'] . "</td>" . "</tr>";
     }
     $tblbody .= "</table>";
     return $tblbody;
 }
コード例 #15
0
ファイル: productos.php プロジェクト: juliocastillo/ninfac
 function make_table($consulta)
 {
     $db = new MySQL();
     while ($row = $db->fetch_array($consulta)) {
         $tblbody .= "<tr>" . "<td>" . $row['codigo'] . "</td>" . "<td>" . $row['id_grupo'] . "</td>" . "<td><a href='productos.php?req=3&id=" . $row['id'] . "'>" . $row['nombre'] . "</td>" . "<td>" . $row['presentacion'] . "</td>" . "<td>" . $row['precio_cls_iva'] . "</td>" . "<td>" . $row['precio_clc_iva'] . "</td>" . "<td>" . $row['precio_pc_iva'] . "</td>" . "<td> <input style='text-align: right' name='precio_costo[]' id='precio_costo' value='" . $row['precio_costo'] . "' size='10px'" . "onblur='runajax(\"producto_ajax.php?id={$row['id']}&precio_costo=\"+this.value,\"div_mess\")'></td>" . "<td>" . $row['vineta'] . "</td>" . "</tr>";
     }
     return $tblbody;
 }
コード例 #16
0
ファイル: abmot.php プロジェクト: zafirodev/geot
}
$Comentarios = $_POST['comentarios'];
$EstadoID = $_POST['estadoot'];
$NumeroVisita = $_POST['visita'];
$db = new MySQL();
$mod = $_POST['mod'];
$OtID = $_POST['OtID'];
if ($mod == 1) {
    $query5 = "update ot set ClientesID='{$ClientesID}',Servicio_EmpresaID='{$Servicio_EmpresaID}',FechaEmision='{$FechaEmision}',FechaInstalacion='{$FechaInstalacion}',Comentarios='{$Comentarios}',PersonalID='{$PersonalID}',EstadoID='{$EstadoID}',NumeroVisita='{$NumeroVisita}' where ID='" . $OtID . "'";
    $result5 = $db->consulta($query5);
    if ($result5) {
        // materiales
        $query = "select stock.*,u.Descripcion tipounidad from stock inner join unidad as u on stock.UnidadID = u.ID left join stockempleado as o on stock.ID = o.ArticuloID where Activo=1 and o.EmpleadoID=" . $PersonalID;
        $result = $db->consulta($query);
        $ultimoID = mysql_insert_id();
        while ($result2 = $db->fetch_array($result)) {
            $Idart = $result2['ID'];
            $cantidadact = (int) $_POST[$result2['ID']];
            $query = "select Cantidad from stockempleado where ArticuloID='" . $result2['ID'] . "' and EmpleadoID='" . $PersonalID . "'";
            $result8 = $db->consulta($query);
            $cantemp = mysql_result($result8, 0);
            $query = "select Cantidad from gasto_ot where ArticuloID='" . $result2['ID'] . "' and OtID='" . $OtID . "'";
            $result7 = $db->consulta($query);
            if (mysql_num_rows($result7) > 0) {
                $cantant = mysql_result($result7, 0);
                if ($cantemp - ($cantidadact - $cantant) < 0) {
                    echo "{$query} d {$cantidadact} 3 {$cantant} sError en el ajuste de materiales. Reitere los ajustes desde el artículo " . $result2['Descripcion'];
                    die;
                }
                $query6 = "update gasto_ot set Cantidad='{$cantidadact}' where OtID=" . $OtID . " and ArticuloID=" . $result2['ID'];
                $result7 = $db->consulta($query6);
コード例 #17
0
ファイル: factura_ins.php プロジェクト: juliocastillo/ninfac
 function make_table($consulta, $id_documento)
 {
     $db = new MySQL();
     $tblbody = "<table style='width: 900px; border-collapse:collapse' border='1'>";
     $tblbody .= "<thead>D e t a l l e</thead>";
     $tblbody .= "<tr>";
     $tblbody .= "<td style='background-color: #FFCC99'>Corr</td>";
     $tblbody .= "<td style='background-color: #FFCC99'>Cantidad</td>";
     $tblbody .= "<td style='background-color: #FFCC99'>Producto</td>";
     $tblbody .= "<td style='background-color: #FFCC99'>Precio Unitario</td>";
     $tblbody .= "<td style='background-color: #FFCC99'>Ventas no sujetas</td>";
     $tblbody .= "<td style='background-color: #FFCC99'>Ventas exentas</td>";
     $tblbody .= "<td style='background-color: #FFCC99'>Ventas gravadas</td>";
     $tblbody .= "<td style='background-color: #FFCC99' class='auto-style2'>&nbsp;</td>";
     $tblbody .= "</tr>";
     $i = 0;
     while ($row = $db->fetch_array($consulta)) {
         $i++;
         $tblbody .= "<tr>" . "<td>" . $i . "</td>" . "<td style='text-align: center'>" . $row['cantidad'] . "</td>" . "<td>" . "<a href='factura_ins.php?req=5&id_detalle=" . $row['id'] . "&id_documento=" . $id_documento . "'>" . $row['id_producto'] . "</a></td>" . "<td style='text-align: right'>" . $row['precio_unit'] . "</td>" . "<td style='text-align: right'>" . $row['ventas_no_sujetas'] . "</td>" . "<td style='text-align: right'>" . $row['ventas_exentas'] . "</td>" . "<td style='text-align: right'>" . $row['ventas_gravadas'] . "</td>" . "<td>" . "<a href='factura_ins.php?req=7&id_detalle=" . $row['id'] . '&id_documento=' . $id_documento . "'>Eliminar</a>" . "</td>" . "</tr>";
     }
     $totales = $this->get_totales_documento($id_documento);
     $tblbody .= "<tr><td><td><td><td><td><td>Sumas<td style='text-align: right'>" . $totales['ventas_gravadas'] . "</td><td style='background-color: gray'></tr>";
     $tblbody .= "<tr><td><td><td><td><td><td>IVA<td style='text-align: right'>" . $totales['iva'] . "</td><td style='background-color: gray'></tr>";
     $tblbody .= "<tr><td><td><td><td><td><td>Sub-total<td style='text-align: right'>" . $totales['subtotal'] . "</td><td style='background-color: gray'></tr>";
     $tblbody .= "<tr><td><td><td><td><td><td>(-) IVA Retenido<td style='text-align: right'>" . $totales['iva_retenido'] . "</td><td style='background-color: gray'></tr>";
     $tblbody .= "<tr><td><td><td><td><td><td>Venta total<td style='text-align: right'>" . $totales['venta_total'] . "</td><td style='background-color: gray'></tr>";
     $tblbody .= "</table>";
     return $tblbody;
 }
コード例 #18
0
</header>
<!--////////////////////////////////////////////////////////////////////CONTENIDOS///////////////////////////////////////////////////////////////////////-->
	
<div class="container">
    <div class="row p-superior">
	<div class="col-md-12 p-titulo"><h1>BLOG DEL AUTOR</h1></div>
		<div class="col-md-12 p-menu">
			<?php 
require_once './estructura/menu-autor.php';
?>
		</div><!-- Termina menú -->
		<!--<div class="col-md-12 p-sesion"><b>Pedro Fernández Palominos</b> | <a href="#">SALIR</a></div>-->
	</div><!-- Termina Row p-superior -->
    <?php 
$cPost = $data->consulta($sql);
$post = $data->fetch_array($cPost);
$num = $data->num_rows($cPost);
if ($num != 0) {
    do {
        ?>
	<!-- <div class="row p-contenido"> -->
		<div class="col-md-2 p-izquierda">
			<div id="datosAutor">
				<!-- Imagen de perfil del Autor -->
                <div id="pImage" class="text-center"> 
                    <a href="#" class="thumbnail"><img src="<?php 
        echo $salidaImg . $post['foto'];
        ?>
" class="img-circle" alt="myImage" style="width:150px; height:170px;"></a><hr>
                    <p class="text-primary" id="nombreAutor"><a class="blogAutor" data-toggle="tooltip" title="Visita su perfil" href="blogAutor.php?id=<?php 
        echo $row['id_autor'];
コード例 #19
0
ファイル: profile.php プロジェクト: C0l0ch0/BPV_WAU
                <div class="box col-md-12">
        <div class="box-inner">

            <div class="box-content">
            
            <!--img class="media-object rounded-corner" alt="" src=<?php 
echo WEBROOT . DS . 'img/users/' . $_SESSION['login'] . '.jpg';
?>
 /-->
            <!-- begin col-6 -->
            <?php 
$conexion1 = new MySQL(0);
$u = $_SESSION['login'];
$strConsulta = "select usuario,nombre,email \r\n                                FROM usuario \r\n                                where usuario = '{$u}'";
$consulta1 = $conexion1->consulta($strConsulta);
$row = $conexion1->fetch_array($consulta1);
?>
                <div class="col-md-12">
                    <!-- begin panel -->
                    <div class="panel panel-inverse" data-sortable-id="form-stuff-1">
                        <div class="panel-heading">
                            <div class="panel-heading-btn">
                            </div>
                            <h4 class="panel-title">Datos de la cuenta</h4>
                        </div>
                        <div class="panel-body">
                            <form class="form-horizontal" method ='POST' autocomplete="off">
                                    <ul class="chats">
                                    <li class="left">
                                        <a href="javascript:;" class="image"><img alt="" src=<?php 
echo WEBROOT . DS . 'img/users/' . $_SESSION['login'] . '.jpg';
コード例 #20
0
						<label>Tipo
							<?php 
include TEMPLATEPATH . "/php/mysql.php";
?>
							<?php 
$db = new MySQL();
?>
							<?php 
$consulta = $db->consulta("SELECT * FROM tipo_pyme");
?>
							<?php 
if ($db->num_rows($consulta) > 0) {
    ?>
								<select name="tipo">
								<?php 
    while ($resultados = $db->fetch_array($consulta)) {
        ?>
									<option value="<?php 
        echo $resultados['id_tipo'];
        ?>
"><?php 
        echo $resultados['descripcion'];
        ?>
</option>
								<?php 
    }
    ?>
								</select>
							<?php 
}
?>
コード例 #21
0
ファイル: printer_pdf.php プロジェクト: atoledov/siglab
 function DetalleOrden($header, $TurnId, $OrdId, $tbl_name)
 {
     $_db = new MySQL();
     $_db->connect();
     /* Consulto los Examenes - Nuevo Esquema para generar el Menu */
     $ex = array();
     $_sql = "SELECT CASE\r\n\t\t\t\t\tWHEN TestPadrePadre!='' THEN TestPadrePadre\r\n\t\t\t\t\tWHEN TestPadreDescripcion!='' THEN TestPadreDescripcion\r\n\t\t\t\t\tEND AS test\r\n\t\t\t\t FROM {$tbl_name} WHERE EstadoProcesa='V' GROUP BY test ORDER BY test";
     $_db->prepare($_sql);
     //echo $_sql;
     $_result = $_db->execute();
     while (@($data = $_db->fetch_array($_result))) {
         $ex[] = $data["test"];
     }
     $_db->free($_result);
     //Verifico elementos repetidos en el array
     $exams = array_unique($ex);
     /* Barro Todos los Test Padres */
     $np = 0;
     foreach ($exams as $key => $value) {
         // Test Descripcion
         $this->Ln();
         $this->SetFont('Arial', 'B', 10);
         $this->Cell(10, 10, ucwords(strtolower(str_replace(":", " ", $value))), '', 0, 'L', false);
         $this->Ln();
         // Colores, ancho de linea y fuente en negrita
         $this->SetFillColor(101, 101, 101);
         $this->SetTextColor(255);
         $this->SetDrawColor(80, 80, 80);
         $this->SetLineWidth(0.3);
         $this->SetFont('Arial', '', 9);
         // Cabecera
         $w = array(60, 50, 25, 60);
         for ($i = 0; $i < count($header); $i++) {
             $this->Cell($w[$i], 6, $header[$i], 1, 0, 'C', true);
         }
         $this->Ln();
         // Consulto Resultados
         //$this->SetFont('Arial','',9);
         $fill = false;
         $test = trim(str_replace(":", " ", $value));
         $resultados = array();
         $_sql = "SELECT OrdId, OrdTurno, OrdFecha, CONCAT(PacNombre,' ',PacApellido) as Paciente, \r\n\t\t\t\t\t  CONCAT(MedNombre,' ',MedApellido)as Medico, TestDescripcion, Resultado, Unidad, \r\n\t\t\t\t\t  RanValInf, RanValSup, RanMultiple, TestPadre, TestPadreDescripcion, EmpId, EmpDescripcion,\r\n\t\t\t\t\t  TestNivel, TestPadrePadre, '' AS TestPadrePadrePadre, OrdDiagnostico\r\n\t\t\t\t\tFROM `{$tbl_name}` \r\n\t\t\t\t\tWHERE OrdTurno='{$TurnId}' AND OrdId='{$OrdId}' AND EstadoProcesa='V'  \r\n\t\t\t\t\t  AND (TestPadreDescripcion like '%{$test}%' Or TestPadrePadre like '%{$test}%') ";
         if ($test == 'BACTERIOLOGIA') {
             //$_sql .= " ORDER BY TestNivel, TestSubNivel, TestPadreDescripcion ";
             $_sql .= " ORDER BY TestPadre, TestNivel, TestSubNivel ";
         } else {
             if ($test == 'ORINA') {
                 $_sql .= " ORDER BY TestNivel ";
             } else {
                 $_sql .= " ORDER BY TestPadreDescripcion, TestNivel, TestSubNivel ";
             }
         }
         //echo $_sql;
         $_db->prepare($_sql);
         $_result = $_db->execute();
         while (@($data = $_db->fetch_array($_result))) {
             $resultados[] = $data;
         }
         $_db->free($_result);
         /* Muestra los Resultados */
         $i = 1;
         $j = 1;
         $limite = 26;
         foreach ($resultados as $k => $val) {
             $nivel = $val["TestNivel"];
             //Nivel del Examen
             if ($val["TestPadreDescripcion"] != $desc) {
                 $i = 1;
                 //Inicializo i
                 $j = 1;
                 //Inicializo j
             }
             /* Seteo el Formato drl Texto en las cabeceras de los Resultados */
             $this->SetFillColor(255, 255, 255);
             $this->SetTextColor(0);
             $this->SetFont('Arial', 'B', 9);
             if ($nivel > 1) {
                 switch ($nivel) {
                     case "2":
                         if ($i == 1) {
                             $this->Cell($w[0], 6, ucwords(strtolower(str_replace(":", " ", $val["TestPadreDescripcion"]))), '', 0, 'L', false);
                             $this->Ln();
                             //Salto de Linea
                         }
                         $i++;
                         break;
                     case "3":
                         if ($i == 1) {
                             if ($tpp != $val["TestPadrePadre"]) {
                                 $this->Cell($w[0], 6, ucwords(strtolower(str_replace(":", " ", $val["TestPadrePadre"]))), '', 0, 'L', false);
                                 $this->Ln();
                                 //Salto de Linea
                             }
                         }
                         if ($j == 1) {
                             $this->Cell($w[0], 6, ucwords(strtolower(str_replace(":", " ", $val["TestPadreDescripcion"]))), '', 0, 'L', false);
                             $this->Ln();
                             //Salto de Linea
                         }
                         $i++;
                         $j++;
                         break;
                 }
             }
             // Restauracion de colores y fuentes
             $this->SetFillColor(224, 235, 255);
             $this->SetTextColor(0);
             $this->SetFont('Arial', '', 9);
             /* Presenta los Resultados */
             $flag = false;
             $exa = "";
             $resul = "";
             $rango = "";
             # Verifica la Longitud del Examen
             if (strlen($val["TestDescripcion"]) >= $limite) {
                 if (strstr($val["TestDescripcion"], '<br>')) {
                     $exa = $val["TestDescripcion"];
                 } else {
                     $exa = FormatString($val["TestDescripcion"], $limite);
                     $flag = true;
                 }
             } else {
                 $exa = $val["TestDescripcion"];
             }
             # Verifica la Longitud del Resultado
             if (strlen($val["Resultado"]) >= $limite) {
                 if (strstr($val["Resultado"], '<br>')) {
                     $resul = $val["Resultado"];
                 } else {
                     $resul = FormatString($val["Resultado"], $limite);
                     $flag = true;
                 }
             } else {
                 $resul = $val["Resultado"];
             }
             # Verifica los rangos referenciales
             if (!empty($val["RanValInf"]) || !empty($val["RanValSup"])) {
                 $rango = $val["RanValInf"] . " - " . $val["RanValSup"];
             } else {
                 if (!empty($val["RanMultiple"])) {
                     $rango = str_replace("<br>", "\n", $val["RanMultiple"]);
                     $flag = true;
                 }
             }
             if (!$flag) {
                 $this->Cell($w[0], 6, $exa, 'LR', 0, 'L', $fill);
                 // Nombre del Examen
                 $this->Cell($w[1], 6, $resul, 'LR', 0, 'C', $fill);
                 // Resultado
                 $this->Cell($w[2], 6, $val["Unidad"], 'LR', 0, 'C', $fill);
                 // Unidad
                 $this->Cell($w[3], 6, $rango, 'LR', 0, 'C', $fill);
                 // Rango Minimo - Rango Maximo
             } else {
                 $this->SetFont('Arial', '', 9);
                 $this->SetWidths(array(60, 50, 25, 60));
                 if (strlen($rango) < $limite) {
                     $this->SetAligns(array('L', 'C', 'C', 'C'));
                 } else {
                     $this->SetAligns(array('L', 'C', 'C', 'L'));
                 }
                 $this->Row(array(utf8_decode(str_replace("<br/>", "\n", $exa)), utf8_decode(str_replace("<br/>", "\n", $resul)), utf8_decode($val["Unidad"]), $rango));
             }
             $this->Ln();
             $fill = !$fill;
             $desc = $val["TestPadreDescripcion"];
             // Guardo El Test Anterior - TestPadreDescripcion
             $tpp = $val["TestPadrePadre"];
             // TestPadrePadre
             $diagnostico = $val["OrdDiagnostico"];
             // Diagnostico
         }
         $this->Cell(array_sum($w), 0, '', 'T');
         $this->Ln();
         $this->Cell(200, 10, '* Sin valor legal, para ese efecto acerquese al Laboratorio Principal', 0, 0, 'C');
         $np++;
         if (count($exams) - $np != 0) {
             $this->AddPage();
         }
     }
     # Imprimo el Diagnostico
     if (!empty($diagnostico)) {
         $this->Ln(20);
         $this->SetFont('Arial', 'B', 10);
         $this->Cell(80, 6, "Observaciones y Comentarios a la Solicitud:", '', 'L', $fill);
         $this->SetFont('Arial', '', 10);
         $this->Cell(120, 6, $diagnostico, '', 'L', $fill);
     }
     $_db->close();
 }
コード例 #22
0
ファイル: informe_cxc.php プロジェクト: juliocastillo/ninfac
<div align="center">
    <table class="FormTABLE" style="border: 1px gainsboro solid; border-collapse: collapse;">
        <tr><td style="border: 1px black solid; padding: 0px 1px 0px 1px">Corr</td>
            <td style="border: 1px black solid; padding: 0px 1px 0px 1px">Fecha de<br>documento</td>
            <td style="border: 1px black solid; padding: 0px 1px 0px 1px">Numero de<br>documento</td>
            <td style="border: 1px black solid; padding: 0px 1px 0px 1px">Nombre del cliente</td>
            <td style="border: 1px black solid; padding: 0px 1px 0px 1px">Venta</td>
            <td style="border: 1px black solid; padding: 0px 1px 0px 1px">IVA</td>
            <td style="border: 1px black solid; padding: 0px 1px 0px 1px">1%</td>
            <td style="border: 1px black solid; padding: 0px 1px 0px 1px">Total</td>
            <td style="border: 1px black solid; padding: 0px 1px 0px 1px" width="75px">Fechas</td>
            <td style="border: 1px black solid; padding: 0px 1px 0px 1px" width="40px">#Rec</td>
            <td style="border: 1px black solid; padding: 0px 1px 0px 1px">Total</td>
                <?php 
    $i = 0;
    while ($row = $db->fetch_array($consulta)) {
        $i++;
        ?>
                    <tr>
                       <td align="right" style="background-color: white;border: 1px black solid; padding: 3px"><font class="ColumnFONT"><?php 
        echo $i;
        ?>
</td>
                       <td style="background-color: white; border: 1px black solid;"><?php 
        echo $row['fecha_documento'];
        ?>
</td>
                       <td align="right" style="background-color: white;border: 1px black solid;"><?php 
        echo $row['n_documento'];
        ?>
</td>
コード例 #23
0
ファイル: usuario.php プロジェクト: C0l0ch0/BPV_WAU
 function save1()
 {
     if (isset($_POST["pass"]) and isset($_POST["pass1"]) and isset($_POST["pass2"]) and $_POST["pass"] != '' and $_POST["pass1"] != '' and $_POST["pass2"] != '') {
         if ($_POST["pass"] === $_POST["pass1"]) {
             $conexion = new MySQL(0);
             $p = $_POST["pass"];
             $strIngreso = "select pass from usuario where usuario = '" . $_SESSION["login"] . "';";
             $value1 = $conexion->consulta($strIngreso);
             $cant = $conexion->fetch_array($value1);
             if ($_POST["pass"] != $cant[0] and $_POST["pass2"] === $cant[0]) {
                 $strIngreso = "update usuario set pass = '******' where usuario = '" . $_SESSION["login"] . "';";
                 $value1 = $conexion->consulta($strIngreso);
                 $_SESSION['value'] = 'Contraseña actualizada exitosamente.';
                 session_write_close();
                 exit(header('Location: http://' . URL . DS . 'dashboard' . DS . 'start'));
             } else {
                 $_SESSION['value'] = "error3";
                 session_write_close();
                 exit(header('Location: http://' . URL . DS . 'usuario' . DS . 'profile'));
             }
         } else {
             $_SESSION['value'] = "error2";
             session_write_close();
             exit(header('Location: http://' . URL . DS . 'usuario' . DS . 'profile'));
         }
     } else {
         $_SESSION['value'] = "error";
         session_write_close();
         exit(header('Location: http://' . URL . DS . 'usuario' . DS . 'profile'));
     }
 }
コード例 #24
0
ファイル: printer.php プロジェクト: atoledov/siglab
<link href="css/main.css" type="text/css" rel="stylesheet" media="screen" /> 
<?php 
require "../config/system.php";
require "../model/Util.php";
require "../model/MySql.php";
$Orden = explode("@", $_POST["Orden"]);
$TurnId = $Orden[0];
$OrdId = $Orden[1];
$tbl_name = $Orden[2];
$_db = new MySQL();
$_db->connect();
$ex = array();
$_sql = "SELECT CASE\r\n\t\t\t    WHEN TestPadrePadre!='' THEN TestPadrePadre\r\n\t\t\t    WHEN TestPadreDescripcion!='' THEN TestPadreDescripcion\r\n\t\t       END AS test\r\n\t\t FROM {$tbl_name} WHERE EstadoProcesa='V' GROUP BY test ORDER BY test ";
$_db->prepare($_sql);
$_result = $_db->execute();
while (@($data = $_db->fetch_array($_result))) {
    $ex[] = $data["test"];
}
$_db->free($_result);
$exams = array_unique($ex);
?>
<div style="margin: 20px">
    <div id="_image">
        <img src="../images/logo_msp.png?>" />&nbsp;<div style="float:right"><h3><?php 
echo CLIENT_NAME;
?>
</h3></div>		
    </div>
    	
    <div id="_header">
		<?php 
コード例 #25
0
ファイル: seguimiento.php プロジェクト: C0l0ch0/BPV_WAU
			<thead>
				<tr>
					<th>Titulo</th>
					<th>Fecha</th>
					<th>Status</th>
				</tr>
			</thead>
			<tbody>

<?php 
require_once $_SERVER['DOCUMENT_ROOT'] . '/core/import.php';
import::load('lib', 'MySQL');
$conexion = new MySQL();
$strConsulta = "select Titulo, fecha, estado\r\n                    from falla \r\n                    where estado <>'cerrada'\r\n                    order by fecha desc";
$consulta = $conexion->consulta($strConsulta);
while ($row2 = $conexion->fetch_array($consulta)) {
    echo "<tr><td>";
    echo $row2[0] . "</td><td>" . $row2[1] . "</td>";
    if ($row2[2] == 'Abierta') {
        echo '<td><span class="label label-success">' . $row2[2] . '<span>';
    } else {
        echo '<td><span class="label label-warning">' . $row2[2] . '<span>';
    }
    echo "</td></tr>";
}
?>

			</tbody>
		</table>
	</div>
	</div>