コード例 #1
0
ファイル: index.php プロジェクト: hexti/adv
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_CLIENTES, limpaTexto($_GET['id']));
} else {
    $tabela = MYSQL_BASE_CLIENTES;
    $campos = array('id' => 'id', 'nome_completo' => 'Nome', 'tel_1' => 'Telefone', 'endereco' => 'Endereço');
    $where = " excluido IS NULL ";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\r\n\t\t\t\t\tnome_completo REGEXP '" . $q . "' OR\r\n\t\t\t\t\trg REGEXP '" . $q . "' OR\r\n\t\t\t\t\ttel_1 REGEXP '" . $q . "' OR\r\n\t\t\t\t\ttel_2 REGEXP '" . $q . "' OR\r\n\t\t\t\t\ttel_3 REGEXP '" . $q . "' OR\r\n\t\t\t\t\tendereco REGEXP '" . $q . "' OR\r\n\t\t\t\t\tcpf REGEXP '" . $q . "')";
}
?>
コード例 #2
0
ファイル: view.php プロジェクト: hexti/monitoramento
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
!empty($_GET['id']) ? $id = $_GET['id'] : ($id = 0);
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_REL_FOTOGRAFICO, limpaTexto($_GET['id']));
} else {
    $tabela = MYSQL_BASE_REL_FOTOGRAFICO . " RF\n\t\t\t\tINNER JOIN " . MYSQL_BASE_CONTRATO . " C ON C.id = RF.id_contrato";
    $campos = array('RF.id' => 'id', 'C.cod_contrato' => 'Contrato', 'C.lote' => 'Lote', "DATE_FORMAT(RF.data, '%d/%m/%Y')" => 'Data da Imagem', 'C.supervisora' => 'Supervisora', 'C.construtora' => 'Construtora');
    $where = "RF.excluido IS NULL AND C.id = " . $id . "";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\n\t\t\t\t\tcod_contrato REGEXP '" . $q . "' OR\n\t\t\t\t\tdescricao REGEXP '" . $q . "' OR\n\t\t\t\t\ttrecho REGEXP '" . $q . "')";
}
$where .= " ORDER BY RF.data, RF.id_contrato DESC";
コード例 #3
0
ファイル: index.php プロジェクト: hexti/tocksys
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada->deletar(MYSQL_BASE_FORNECEDORES, limpaTexto($_GET['id']));
} else {
    $where = "excluido IS NULL";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND razao_social LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem categoria
        if (!empty($_GET['email'])) {
            $where .= " AND cnpj LIKE '%" . $_GET['email'] . "%'";
        }
    }
    $campos = array('id' => 'id', 'razao_social' => 'Razão Social', 'telefone' => 'Telefone', 'email' => 'Email', 'cnpj' => 'CNPJ');
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\r\n\t\t\t\t\trazao_social REGEXP '" . $q . "' OR\r\n\t\t\t\t\ttelefone REGEXP\t'" . $q . "' OR\r\n\t\t\t\t\temail REGEXP '" . $q . "' OR\r\n\t\t\t\t\tcnpj REGEXP '" . $q . "')";
}
?>

<div class="container">
コード例 #4
0
ファイル: index.php プロジェクト: hexti/monitoramento
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_DISCIPLINA_STATUS, limpaTexto($_GET['id']));
} else {
    $campos = array('id' => 'id', 'nome' => 'Disciplina');
    $where = "excluido IS NULL";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\n\t\t\t\t\tcod_contrato REGEXP '" . $q . "' OR\n\t\t\t\t\tdescricao REGEXP '" . $q . "' OR\n\t\t\t\t\ttrecho REGEXP '" . $q . "')";
}
?>

<div class="container">
コード例 #5
0
ファイル: index.php プロジェクト: hexti/tocksys
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_CATEGORIAS, limpaTexto($_GET['id']));
} else {
    $campos = array('id', 'nome');
}
?>

<div class="container">

	<!-- Main component for a primary marketing message or call to action -->
	<div class="table-responsive">
		<div class="panel panel-default">
			<div class="panel-heading">
				
				<div class="col-lg-11">
					<h4>Lista de Categorias</h4>
				</div>
				
				<a class="btn btn-primary" href="new.php"><span class="glyphicon glyphicon-plus text-bold" aria-hidden="true"></span> Novo</a>

			</div>
			<div class="panel-body">
				<table class="table table-striped table-condensed table-bordered">
					<thead>
コード例 #6
0
ファイル: index.php プロジェクト: hexti/tocksys
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada->deletar(MYSQL_BASE_UNIDADE, limpaTexto($_GET['id']));
} else {
    $where = "excluido IS NULL";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND razao_social LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem categoria
        if (!empty($_GET['email'])) {
            $where .= " AND cnpj LIKE '%" . $_GET['email'] . "%'";
        }
    }
    $campos = array('id' => 'id', 'nome' => 'Unidade');
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\r\n\t\t\t\t\tnome REGEXP '" . $q . "')";
}
?>

<div class="container">
コード例 #7
0
ファイル: view.php プロジェクト: hexti/monitoramento
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
!empty($_GET['id']) ? $id = $_GET['id'] : ($id = 0);
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_DOCUMENTO, limpaTexto($_GET['id']));
} else {
    $tabela = MYSQL_BASE_DOCUMENTO . " D\n\t\t\t\tINNER JOIN " . MYSQL_BASE_CONTRATO . " C ON C.id = D.id_contrato";
    $campos = array('D.id' => 'id', 'C.cod_contrato' => 'Contrato', 'D.titulo' => 'Titulo');
    $where = "D.excluido IS NULL AND C.id = " . $id;
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\n\t\t\t\t\tcod_contrato REGEXP '" . $q . "' OR\n\t\t\t\t\tdescricao REGEXP '" . $q . "' OR\n\t\t\t\t\ttrecho REGEXP '" . $q . "')";
}
?>
コード例 #8
0
ファイル: resulltado_calendario.php プロジェクト: hexti/adv
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_AUDIENCIA, limpaTexto($_GET['id']));
} else {
    $tabela = MYSQL_BASE_AUDIENCIA . " A \r\n\t\t\t\tINNER JOIN " . MYSQL_BASE_CLIENTES . " C ON C.id = A.id_cliente\r\n\t\t\t\tINNER JOIN " . MYSQL_BASE_CLIENTE_CONTRATOS . " CC ON CC.id = A.id_contrato";
    $campos = array('A.id' => 'id', 'C.nome_completo' => 'Cliente', 'CC.cod_contrato' => 'Contrato', 'CC.valor_causa' => 'Valor da Causa', "DATE_FORMAT(A.data, '%d/%m/%Y')" => 'Data da Audiência');
    $where = " A.excluido IS NULL AND data = '" . $_GET['data'] . "'";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    if (preg_match('/^\\d{1,2}\\/\\d{4}$/', $_GET['q']) || preg_match('/^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/', $_GET['q']) || preg_match('/^\\d{1,2}\\/\\d{1,2}$/', $_GET['q'])) {
        $explode = explode("/", $_GET['q']);
        krsort($explode);
        foreach ($explode as $item) {
            $nova_data .= $item . '-';
コード例 #9
0
ファイル: index.php プロジェクト: hexti/monitoramento
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_GRUPO, limpaTexto($_GET['id']));
} else {
    $campos = array('id' => 'id', 'nome' => 'Grupo');
    $where = "excluido IS NULL";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\n\t\t\t\t\tcod_contrato REGEXP '" . $q . "' OR\n\t\t\t\t\tdescricao REGEXP '" . $q . "' OR\n\t\t\t\t\ttrecho REGEXP '" . $q . "')";
}
?>

<div class="container">
コード例 #10
0
ファイル: index.php プロジェクト: hexti/monitoramento
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_FUNCIONALIDADE, limpaTexto($_GET['id']));
} else {
    $campos = array('id' => 'id', 'nome' => 'Funcionalidade');
    $where = "excluido IS NULL";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\n\t\t\t\t\tcod_contrato REGEXP '" . $q . "' OR\n\t\t\t\t\tdescricao REGEXP '" . $q . "' OR\n\t\t\t\t\ttrecho REGEXP '" . $q . "')";
}
?>

<div class="container">
コード例 #11
0
ファイル: index.php プロジェクト: hexti/tocksys
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada->deletar(MYSQL_BASE_NOTA_FISCAL, limpaTexto($_GET['id']));
} else {
    $where = "NF.excluido IS NULL";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND razao_social LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem categoria
        if (!empty($_GET['email'])) {
            $where .= " AND cnpj LIKE '%" . $_GET['email'] . "%'";
        }
    }
    $tabela = MYSQL_BASE_NOTA_FISCAL . " NF\r\n\t\t\t  INNER JOIN " . MYSQL_BASE_FORNECEDORES . " F ON F.id = NF.id_fornecedor";
    $campos = array('F.razao_social' => 'Razão Social', 'NF.id' => 'id', 'NF.num_nota' => 'Nº', 'NF.valor_nota' => 'Valor', 'NF.arquivo' => 'Arquivo');
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\r\n\t\t\t\t\tF.razao_social REGEXP '" . $q . "')";
}
?>

<div class="container">
コード例 #12
0
ファイル: index.php プロジェクト: hexti/monitoramento
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_MEDICAO, limpaTexto($_GET['id']));
} else {
    $tabela = MYSQL_BASE_CONTRATO;
    $campos = array('id' => 'id', 'cod_contrato' => 'Contrato', 'extensao' => 'Extensão', 'trecho' => 'Trecho', 'acao' => array('link' => EXTERNAL_ROOT_PORTAL . '/medicao/view.php?id=', 'cor' => 'warning', 'icone' => 'glyphicon-road', 'target' => NULL, 'texto' => 'Medição'));
    $where = "excluido IS NULL";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\n\t\t\t\t\tcod_contrato REGEXP '" . $q . "' OR\n\t\t\t\t\tdescricao REGEXP '" . $q . "' OR\n\t\t\t\t\ttrecho REGEXP '" . $q . "')";
}
?>
コード例 #13
0
ファイル: index.php プロジェクト: hexti/monitoramento
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_PLANTA_ILUMINADA, limpaTexto($_GET['id']));
} else {
    $tabela = MYSQL_BASE_PLANTA_ILUMINADA . " PI\n\t\t\t\tINNER JOIN " . MYSQL_BASE_CONTRATO . " C ON C.id = PI.id_contrato";
    $campos = array('C.id' => 'id', 'C.cod_contrato' => 'Contrato', 'C.extensao' => 'Extensão', 'C.trecho' => 'Trecho');
    $where = "C.excluido IS NULL\n\t\t\t\tGROUP BY C.id";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\n\t\t\t\t\tcod_contrato REGEXP '" . $q . "' OR\n\t\t\t\t\tdescricao REGEXP '" . $q . "' OR\n\t\t\t\t\ttrecho REGEXP '" . $q . "')";
}
?>
コード例 #14
0
ファイル: index.php プロジェクト: hexti/tocksys
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_ENTREGA_PRODUTOS, limpaTexto($_GET['id']));
} else {
    $campos = array('id' => 'id', 'nome_completo' => 'Nome', 'matricula' => 'Matrícula');
    $acao = array('liberacao.php?id=' => 'Entregar Material');
    $where = "excluido IS NULL";
    if (!empty($_GET['q'])) {
        $q = str_replace(" ", "|", $_GET['q']);
        $where .= " AND (\r\n\t\t\t\t\tnome_completo REGEXP '" . $q . "' OR\r\n\t\t\t\t\tmatricula REGEXP\t'" . $q . "')";
    }
}
?>

<div class="container">

	<!-- Main component for a primary marketing message or call to action -->
	<div class="table-responsive">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h4>Entra de Materia</h4>
			</div>
			<div class="panel-body">
				<?php 
コード例 #15
0
ファイル: index.php プロジェクト: hexti/monitoramento
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada->deletar(MYSQL_BASE_USUARIOS, limpaTexto($_GET['id']));
} else {
    $where = "excluido IS NULL AND id != 1";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_guerra LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem categoria
        if (!empty($_GET['email'])) {
            $where .= " AND email LIKE '%" . $_GET['email'] . "%'";
        }
    }
    $campos = array('id' => 'id', 'nome_guerra' => 'Nome', 'email' => 'Email');
}
?>

<div class="container">

	<!-- Main component for a primary marketing message or call to action -->
	<div class="table-responsive">
		<div class="panel panel-default">
			<div class="panel-heading">
コード例 #16
0
ファイル: index.php プロジェクト: hexti/adv
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_AREAS, limpaTexto($_GET['id']));
} else {
    $tabela = MYSQL_BASE_AREAS;
    $campos = array('id' => 'id', 'nome' => 'Nome');
    $where = " excluido IS NULL ";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (nome REGEXP '" . $q . "')";
}
?>
コード例 #17
0
ファイル: index.php プロジェクト: hexti/monitoramento
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_CONTRATO, limpaTexto($_GET['id']));
} else {
    $campos = array('id' => 'id', 'cod_contrato' => 'Contrato', 'lote' => 'Lote', 'supervisora' => 'Supervisora', 'construtora' => 'Construtora');
    $where = "excluido IS NULL";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome_completo LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem matricula
        if (!empty($_GET['matricula'])) {
            $where .= " AND matricula LIKE '%" . $_GET['matricula'] . "%'";
        }
    }
}
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\n\t\t\t\t\tcod_contrato REGEXP '" . $q . "' OR\n\t\t\t\t\tdescricao REGEXP '" . $q . "' OR\n\t\t\t\t\ttrecho REGEXP '" . $q . "')";
}
?>

<div class="container">
コード例 #18
0
ファイル: index.php プロジェクト: hexti/tocksys
<?php

include_once '../head.php';
include_once '../DAO/GenericoDAO.php';
include_once '../includes.sys/faxada.class.php';
$DAO = new GenericoDAO();
$faxada = new Faxada();
if (!empty($_GET) && $_GET['cmd'] == 'del') {
    $faxada = new Faxada();
    $faxada->deletar(MYSQL_BASE_ESTOQUE, limpaTexto($_GET['id']));
} else {
    $campos = array('id' => 'id', 'imagem' => 'Imagem', 'nome' => 'Nome', 'valor_venda' => 'Valor de Venda', 'SUM(quantidade - quantidade_baixa)' => 'Quantidade');
    $where = "excluido IS NULL";
    if (!empty($_GET['cmd']) && $_GET['cmd'] == 'pesquisa') {
        //Verifica se tem nome
        if (!empty($_GET['nome'])) {
            $where .= " AND nome LIKE '%" . $_GET['nome'] . "%'";
        }
        //Verifica se tem categoria
        if (!empty($_GET['categoria']) && $_GET['categoria'] > 0) {
            $where .= " AND id_categoria = '" . $_GET['categoria'] . "'";
        }
    }
    !empty($_GET['q']) ? $where .= " AND nome REGEXP '" . str_replace(' ', "|", $_GET['q']) . "'" : ($where .= "");
    $where .= " GROUP BY id";
}
$where = "";
if (!empty($_GET['q'])) {
    $q = str_replace(" ", "|", $_GET['q']);
    $where .= " AND (\r\n\t\t\t\t\tE.nome REGEXP '" . $q . "' OR\r\n\t\t\t\t\tC.nome REGEXP '" . $q . "' OR\r\n\t\t\t\t\tSC.nome REGEXP '" . $q . "')";
}