* Arcos - MG - CEP 35588-000 * * */ include "../lib/config.inc.php"; include "../lib/func.inc.php"; include "../lib/classes.inc.php"; require_once '../lang/' . $idioma . '.php'; header("Content-type: text/html; charset=ISO-8859-1", true); if (!checklog()) { die($frase_log); } if ($_GET['codigo'] != '' && !verifica_nivel('laboratorios', 'E') || $_GET['codigo'] == '' && !verifica_nivel('laboratorios', 'I')) { $disable = 'disabled'; } $laboratorio = new TLaboratorio(); if (isset($_POST[Salvar])) { $obrigatorios[1] = 'nomefantasia'; $i = $j = 0; foreach ($_POST as $post => $valor) { $i++; if (array_search($post, $obrigatorios) && $valor == "") { $j++; $r[$j] = '<font color="#FF0000">'; } } if ($j == 0) { if ($_GET[acao] == "editar") { $laboratorio->LoadLaboratorio($_GET[codigo]); $strScrp = "Ajax('laboratorio/gerenciar', 'conteudo', '');"; }
if (!checklog()) { die($frase_log); } ?> <table width="750" border="0" align="center" cellpadding="0" cellspacing="0"> <?php $_GET['pesquisa'] = htmlspecialchars($_GET['pesquisa'], ENT_QUOTES); $where = "`" . $_GET['campo'] . "` LIKE '" . $_GET['pesquisa'] . "%'"; if ($_GET[pg] != '') { $limit = ($_GET[pg] - 1) * PG_MAX; } else { $limit = 0; $_GET[pg] = 1; } $sql = "SELECT * FROM `laboratorios` WHERE " . $where . " ORDER BY `nomefantasia` ASC"; $pacientes = new TLaboratorio(); $lista = $pacientes->ListLaboratorios($sql . ' LIMIT ' . $limit . ', ' . PG_MAX); $total_regs = $pacientes->ListLaboratorios($sql); $par = $odev = "F0F0F0"; $impar = "F8F8F8"; for ($i = 0; $i < count($lista); $i++) { if ($i % 2 == 0) { $odev = $par; } else { $odev = $impar; } ?> <tr bgcolor="#<?php echo $odev; ?> " onmouseout="style.background='#<?php