当前位置: 首页>>代码示例>>PHP>>正文


PHP listarAcesso函数代码示例

本文整理汇总了PHP中listarAcesso函数的典型用法代码示例。如果您正苦于以下问题:PHP listarAcesso函数的具体用法?PHP listarAcesso怎么用?PHP listarAcesso使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了listarAcesso函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Listar

 public function Listar($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             $stmt = $this->p->query("SELECT mai.*, ci.grupo, e.nome, mi.id_medicao, m.numero FROM " . MYSQL_BASE_MEDICAO_ANEXO_ITENS . " mai, " . MYSQL_BASE_MEDICAO_ITEM . " mi, " . MYSQL_BASE_CONTRATO_ITEM . " ci,\r\n\t\t\t\t\t\t\t\t\t\t" . MYSQL_BASE_EMPRESAS . " e," . MYSQL_BASE_MEDICAO . " m WHERE m.id = mi.id_medicao AND e.id = mai.id_empresa AND mai.id_medicao_item = mi.id AND \r\n\t\t\t\t\t\t\t\t\t\tci.id = mi.id_contrato_item AND mai.status = 'N' AND mai.tipo = 'B' AND m.finalizado = 'N' AND mai.id_superior IS NULL AND mai.dat_aprovado IS NULL AND mai.consideracao_supervisor IS NULl");
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['numero'] . '</td>';
                 echo '	<td>' . $item['grupo'] . '</td>';
                 echo '	<td>' . $item['empresa'] . '</td>';
                 echo '	<td>' . $item['nf_recibo'] . '</td>';
                 echo '	<td>' . number_format($item['valor'], 2, ',', '.') . '</td>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '		<td>';
                 if (in_array(176, $permissoes) || in_array(215, $permissoes)) {
                     echo '	<a class="btn btn-info" href="view.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-eye-open icon-white"></i> Visualizar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p->__destruct();
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
开发者ID:hexti,项目名称:troncal,代码行数:32,代码来源:BloqueadaDAO.php

示例2: Listar

 public function Listar($query = null)
 {
     $acesso = listarAcesso();
     try {
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_FASE_PROJETOS . " WHERE ativo = 'S'");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['codigo'] . '</td>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '		<td>';
                 if (in_array(125, $acesso)) {
                     echo ' <a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 if (in_array(126, $acesso)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p = null;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
开发者ID:hexti,项目名称:troncal,代码行数:34,代码来源:FasesProjetoDAO.php

示例3: Listar

 public function Listar($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_MEDICAO_NAOREEMBOLSAVEL . " WHERE excluido IS NULL ORDER BY id DESC");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td style="display:none;">' . $item['id'] . '</td>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '		<td>';
                 if (in_array(270, $permissoes)) {
                     echo '		<a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 if (in_array(271, $permissoes)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p = null;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
开发者ID:hexti,项目名称:troncal,代码行数:34,代码来源:NaoReembolsavelDAO.php

示例4: Listar

 public function Listar($query = null)
 {
     $permissoes = listarAcesso();
     try {
         if ($query == null) {
             $data = Date("Y-m-d");
             $stmt = $this->p->query("SELECT nome, id FROM " . MYSQL_BASE_EMPRESAS . " WHERE ativo='S' ORDER BY id DESC");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '		<td>';
                 if (in_array(224, $permissoes)) {
                     echo '<a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 if (in_array(225, $permissoes)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
         }
         $this->p = null;
         return $stmt;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
开发者ID:hexti,项目名称:troncal,代码行数:34,代码来源:EmpresaDAO.php

示例5: Listar

 public function Listar($query = null)
 {
     $acesso = listarAcesso();
     try {
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_FERIADOS . " WHERE excluido IS null ORDER BY dia DESC ");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . dataBrasil($item['dia']) . '</td>';
                 echo '		<td>';
                 if (in_array(248, $acesso)) {
                     echo ' 		<a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 if (in_array(249, $acesso)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p = null;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
开发者ID:hexti,项目名称:troncal,代码行数:33,代码来源:FeriadoDAO.php

示例6: Listar

 public function Listar($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             $stmt = $this->p->query("SELECT m.*, p.nome_completo, med.numero, med.id_contrato FROM " . MYSQL_BASE_MEDICAO . " med, " . MYSQL_BASE_MEDICAO_LIBERACAO . " m, " . MYSQL_BASE_PESSOAS . " p WHERE med.id = m.id_medicao AND p.id=m.id_pessoa AND m.status = 'S'");
             $confirm = "return confirm('Deseja remover o acesso?');";
             foreach ($stmt as $item) {
                 if ($item['id_contrato'] == 1) {
                     $contrato = "Contrato";
                 } else {
                     $contrato = "Aditivo";
                 }
                 echo '<tr>';
                 echo '	<td>' . $item['numero'] . ' - ' . $contrato . '</td>';
                 echo '	<td>' . $item['nome_completo'] . '</td>';
                 echo '  <td>';
                 //Verifica se pode editar
                 if (in_array(50, $permissoes)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Remover Acesso';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p->__destruct();
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
开发者ID:hexti,项目名称:troncal,代码行数:35,代码来源:MedicaoAcessoDAO.php

示例7: verificaAlertaMedicao

function verificaAlertaMedicao()
{
    connectSQL();
    $msg = "";
    $query = mysql_query("SELECT * FROM " . MYSQL_BASE_MEDICAO_APROVACAO . " WHERE dat_excluido = '0000-00-00 00:00:00'") or die(mysql_error());
    $acesso = listarAcesso();
    if (mysql_num_rows($query) > 0) {
        while ($row = mysql_fetch_array($query)) {
            $data = $row['data'];
            $caminho = $row['caminho'];
            $aprovado = $row['status'];
            switch ($caminho) {
                case 1:
                    $funcionalidade = 41;
                    break;
                case 2:
                    $funcionalidade = 42;
                    break;
                case 3:
                    $funcionalidade = 43;
                    break;
                case 4:
                    $funcionalidade = 46;
                    break;
                case 5:
                    $funcionalidade = 43;
                    break;
                case 6:
                    $funcionalidade = 40;
                    break;
            }
            if ($aprovado == 1) {
                $aprovacao = "";
            } else {
                $aprovacao = "n���������o";
            }
            if (in_array($funcionalidade, $acesso) && date('Y-m-d H:i:s', strtotime("-4 days")) > $data) {
                //&& date('Y-m-d H:i:s', strtotime("-4 days")) > $data
                $num = mysql_num_rows($query);
                if ($num > 1) {
                    if ($funcionalidade == 40) {
                        $msg .= utf8_encode("* A Medi������������������o " . $aprovacao . " foi aprovada.") . '\\n';
                    } else {
                        $msg .= utf8_encode("* Voc��������� possui Medi������������������es para aprovar.") . '\\n';
                    }
                } elseif ($num == 1) {
                    $msg .= utf8_encode("* Voc��������� possui Medi������������������o para aprovar.") . '\\n';
                }
            }
        }
        if (!empty($msg)) {
            echo '<script language= "JavaScript">alert("' . $msg . '");</script>';
        }
    }
}
开发者ID:hexti,项目名称:casamento,代码行数:55,代码来源:metodos.php

示例8: Listar

 public function Listar($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             return false;
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p->__destruct();
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
开发者ID:hexti,项目名称:troncal,代码行数:15,代码来源:ItemDAO.php

示例9: ListarContratos

 public function ListarContratos($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_CONTRATO . " WHERE ativo = 'S' ORDER BY id ASC");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['id'] . '</td>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '	<td>';
                 if (in_array(263, $permissoes)) {
                     echo '		<a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 if (in_array(265, $permissoes)) {
                     echo '		<a class="btn btn-info" href="contratoItem.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Adicionar Itens';
                     echo '		</a>';
                 }
                 if (in_array(264, $permissoes)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p = null;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
开发者ID:hexti,项目名称:troncal,代码行数:39,代码来源:ContratoMedicaoDAO.php

示例10: Listar

 public function Listar($query = null)
 {
     $acesso = listarAcesso();
     try {
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_MEDICAO_ACOMPANHAMENTO . " WHERE principal = 'S' and dat_excluido IS NULL");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['grupo'] . '</td>';
                 echo ' 	<td>' . $item['mes'] . '-' . $item['ano'] . '</td>';
                 echo '	<td>' . number_format($item['remuneracao'], 2, ',', '.') . '</td>';
                 echo '	<td>' . number_format($item['reembolso'], 2, ',', '.') . '</td>';
                 echo '		<td>';
                 if (in_array(139, $acesso)) {
                     echo '      <a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                     echo '			<i class="icon-edit icon-white"></i> Editar';
                     echo '		</a>';
                 }
                 if (in_array(140, $acesso)) {
                     echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                     echo '			<i class="icon-trash icon-white"></i> Deletar';
                     echo '		</a>';
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p = null;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
开发者ID:hexti,项目名称:troncal,代码行数:36,代码来源:AcompanhamentoDAO.php

示例11: checkUserAuth

<?php

include_once '../../includes.sys/ini.php';
include_once INTERNAL_ROOT_PORTAL . '/includes.sys/metodos.php';
include_once INTERNAL_ROOT_PORTAL . '/medicao/DAO/NaoReembolsavelDAO.php';
include_once INTERNAL_ROOT_PORTAL . '/medicao/NaoReembolsavel.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once INTERNAL_ROOT_PORTAL . '/head.php';
if (!in_array(269, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/modulos.php";</script>';
}
//Verifica se a opcao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'salvar') {
    $DAO = new NaoReembolsavelDAO();
    $naoreembolsavel = new NaoReembolsavel();
    $naoreembolsavel->setNome($_POST['nome']);
    $naoreembolsavel->setUsuario(userId());
    $resultado = $DAO->Gravar($naoreembolsavel);
    if ($resultado == 1) {
        echo '<script language= "JavaScript">alert("Registro cadastrado com sucesso");</script>';
        echo '<script language= "JavaScript">location.href="index.php";</script>';
    } else {
        echo '<script language= "JavaScript">alert("Erro ao gravar o registro, favor entrar em contato com a TI.");</script>';
    }
}
?>
<!-- topbar ends -->
<div class="container-fluid">
	<div class="row-fluid">

		<!-- left menu starts -->
开发者ID:hexti,项目名称:troncal,代码行数:31,代码来源:new.php

示例12: checkUserAuth

<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/ProjetoDAO.php';
include_once '../Projeto.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(281, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="../documentos/fase_projeto.php";</script>';
}
$projeto = new Projeto();
$DAO = new ProjetoDAO();
?>

<!-- topbar ends -->
<div class="container-fluid">
	<div class="row-fluid">

		<!-- left menu starts -->
		<div class="span2 main-menu-span">
				<?php 
include_once '../menu.php';
?>
			</div>
		<!--/span-->
		<!-- left menu ends -->

		<noscript>
			<div class="alert alert-block span10">
				<h4 class="alert-heading">Warning!</h4>
开发者ID:hexti,项目名称:troncal,代码行数:31,代码来源:lista_mestra.php

示例13: Listar

 public function Listar($query = null)
 {
     try {
         $permissoes = listarAcesso();
         if ($query == null) {
             $stmt = $this->p->query("SELECT * FROM " . MYSQL_BASE_WORK_FLOW_TIPO_DOCUMENTO . " WHERE status = 'S'");
             $confirm = "return confirm('Deseja remover esse registro?');";
             foreach ($stmt as $item) {
                 echo '<tr>';
                 echo '	<td>' . $item['nome'] . '</td>';
                 echo '		<td>';
                 if ($item['editavel'] == 'S') {
                     if (in_array(197, $permissoes)) {
                         echo '		<a class="btn btn-info" href="edit.php?id=' . $item['id'] . '">';
                         echo '			<i class="icon-edit icon-white"></i> Editar';
                         echo '		</a>';
                     }
                     if (in_array(198, $permissoes)) {
                         echo '		<a class="btn btn-danger" onclick="' . $confirm . '" href="index.php?cmd=del&id=' . $item['id'] . '">';
                         echo '			<i class="icon-trash icon-white"></i> Deletar';
                         echo '		</a>';
                     }
                 }
                 echo '	</td>';
                 echo '</tr>';
             }
         } else {
             $stmt = $this->p->query($query);
             return $stmt;
         }
         $this->p = null;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
开发者ID:hexti,项目名称:troncal,代码行数:35,代码来源:TipoDocumentoDAO.php

示例14: checkUserAuth

<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/DocumentoDAO.php';
include_once '../Documento.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(10, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$documento = new Documento();
$DAO = new DocumentoDAO();
$documento->setId(limpaTexto($_GET['id']));
$resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_DOCUMENTOS . " WHERE ativo='S' AND id=" . $documento->getId());
if ($resultado) {
    foreach ($resultado as $item) {
        $documento->setAssunto($item['assunto']);
        $documento->setCodDoc($item['cod_documento']);
        $documento->setDataProcessamento($item['data_processamento']);
        $documento->setIdCategoria($item['id_categoria']);
        $documento->setRemetente($item['remetente']);
        $documento->setDestinatario($item['destinatario']);
        $documento->setIdLocal($item['id_local']);
        $documento->setStatus($item['status']);
        $documento->setObservacao($item['obs']);
        $file = $DAO->Listar("SELECT file, versao, id_documento FROM " . MYSQL_BASE_ARQUIVOS . " WHERE principal='S' AND id_documento=" . $documento->getId());
        if ($file->rowCount() > 0) {
            foreach ($file as $row) {
                if (!empty($row['file'])) {
                    $onclick = "window.open('" . EXTERNAL_ROOT_PORTAL . "/download.php?documento=" . $row['id_documento'] . "', '_blank');";
开发者ID:hexti,项目名称:troncal,代码行数:31,代码来源:view.php

示例15:

    ?>
								<div class="control-group">
									<label class="control-label" for="textarea2"><b>T&eacute;cnico</b></label>
									<div class="controls">
										<p style="margin: 4px 0 0 0;"><?php 
    echo $chamadas->getTecnico();
    ?>
</p>
									</div>
								</div>
								<?php 
}
?>
								
								<?php 
if (in_array(216, listarAcesso())) {
    ?>
									<div class="form-actions">
										<input type="hidden" name="cmd" value="atender"> 
										<input type="hidden" name="id" value="<?php 
    echo $chamadas->getId();
    ?>
">
										<?php 
    $iniciaAtd = mysql_query("SELECT id_chamada FROM " . MYSQL_BASE_CHAMADAS_ATENDIMENTO . " WHERE id_chamada = " . $item['id'] . " AND dat_final IS NULL");
    $num = mysql_num_rows($iniciaAtd);
    ?>
										
										<button type="submit" class="btn btn-primary" <?php 
    if ($num > 0) {
        echo 'style="display:none"';
开发者ID:hexti,项目名称:troncal,代码行数:31,代码来源:view.php


注:本文中的listarAcesso函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。