Ejemplo n.º 1
0
if (!checklog()) {
    die($frase_log);
}
?>
  <table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<?php 
$_GET['pesquisa'] = utf8_decode(htmlspecialchars(utf8_encode($_GET['pesquisa']), ENT_QUOTES | ENT_COMPAT, 'utf-8'));
$where = "`" . $_GET['campo'] . "` LIKE '" . $_GET['pesquisa'] . "%'";
if ($_GET[pg] != '') {
    $limit = ($_GET[pg] - 1) * PG_MAX;
} else {
    $limit = 0;
    $_GET[pg] = 1;
}
$sql = "SELECT * FROM `convenios` ORDER BY codigo";
$convenio = new TConvenio();
$lista = $convenio->ListConvenios($sql . ' LIMIT ' . $limit . ', ' . PG_MAX);
$total_regs = $convenio->ListConvenios($sql);
$par = "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 
Ejemplo n.º 2
0
 * 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('convenio', 'E') || $_GET['codigo'] == '' && !verifica_nivel('convenio', 'I')) {
    $disable = 'disabled';
}
$convenio = new TConvenio();
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") {
            $convenio->LoadConvenio($_GET[codigo]);
            $strScrp = "Ajax('convenios/gerenciar', 'conteudo', '');";
        }