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


PHP listar函数代码示例

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


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

示例1: Main

function Main()
{
    global $TPLV, $bottom, $urls, $db, $migalha;
    $TPLV = new TemplatePower(TEMPLATE_PATH . "modulos/produtos.tpl");
    $TPLV->assignGlobal("uploadPath", UPLOAD_PATH);
    $TPLV->assignGlobal("uploadPath", UPLOAD_PATH_SITE);
    $TPLV->assignGlobal("imagePath", IMAGE_PATH);
    $TPLV->assignGlobal("swfPath", SWF_PATH);
    $TPLV->assignGlobal("localPath", LOCAL_PATH);
    $TPLV->assignGlobal("localPath", LOCAL_PATH_SITE);
    $TPLV->assignGlobal('navBottom', $bottom);
    $TPLV->assignGlobal($urls->var);
    $TPLV->prepare();
    $in = $_GET['in'];
    switch ($in) {
        default:
            /**- LISTA DE CATEGORIAS -**/
        /**- LISTA DE CATEGORIAS -**/
        case 'lista':
            lista();
            break;
        case 'nova':
            nova();
            break;
        case 'edita':
            edita();
            break;
        case 'salva':
            salva();
            break;
        case 'apagaFoto':
            apagaFoto();
            break;
        case 'deleta':
            deleta();
            break;
            /**- LISTA DE PRODUTOS -**/
        /**- LISTA DE PRODUTOS -**/
        case 'listar':
            listar();
            break;
        case 'novo':
            novo();
            break;
        case 'editar':
            editar();
            break;
        case 'download':
            download();
            break;
        case 'download_salvar':
            download_salvar();
            break;
        case 'download_deletar':
            download_deletar();
            break;
        case 'salvar':
            salvar();
            break;
        case 'deletar':
            deletar();
            break;
        case 'deletarNutricional':
            deletarNutricional();
            break;
        case 'apagarFoto':
            apagarFoto();
            break;
    }
}
开发者ID:rodrigopluz,项目名称:mvc,代码行数:70,代码来源:produtos.php

示例2: listar

      <div class="row">
        <div class="col-xs-12">
          <table class="table table-bordered table-hover">
            <caption>Lista de membros</caption>
            <thead>
              <tr>
                <th class="identificador">#</th>
                <th>Nome</th>
                <th>Equipe</th>
                <th class="action">Editar</th>
                <th class="action">Excluir</th>
              </tr>
            </thead>
            <tbody>
            <?php 
$membros = listar("membros");
foreach ($membros as $membro) {
    ?>
              <tr>
                <th class="identificador" scope="row">
                  <?php 
    echo $membro->id;
    ?>
                  <input type="hidden" class="id" value="<?php 
    echo $membro->id;
    ?>
">
                </th>
                <td>
                  <?php 
    echo $membro->nome;
开发者ID:Diegoimperatriz,项目名称:maratona,代码行数:31,代码来源:membros.php

示例3: niveis

 public function niveis()
 {
     $campo = "id";
     $resultado = listar('nivel_acesso', $campo);
     return $resultado;
 }
开发者ID:jschneiders,项目名称:quantum-ff-club-site,代码行数:6,代码来源:usuario.class.php

示例4: modificar

/**
 * Modifica una tarea
 * 
 * @param int    $identificador Identificador de la tarea
 * @param string $texto         Nuevo texto de la tarea
 * @param int    $estado        estado de la tarea
 * 
 * @return json
 */
function modificar($identificador, $texto, $estado)
{
    $salida = 0;
    try {
        $task = ORM::for_table(TABLA)->where('id', $identificador)->find_one();
        $task->texto = $texto;
        $task->estado = $estado;
        $task->save();
        $salida = listar();
    } catch (Exception $e) {
    }
    return $salida;
}
开发者ID:salvacam,项目名称:todo_list,代码行数:22,代码来源:functions.php

示例5: session_start

<?php

require "../../include/banco.php";
session_start();
$id = $_POST['id'];
$lista = listar('clientes', '00198500', 'clientes.dia_semana', array('id' => $id, 'id_empresa' => $_SESSION['usuario_logado']['id']), array('id'), null, 'true');
foreach ($lista as $chave => $valor) {
    $dados[$chave] = $valor;
}
echo json_encode($dados);
开发者ID:aquinovale,项目名称:clube_gol,代码行数:10,代码来源:alterarDiaDaSemana.php

示例6: listar

    </div>
<div class="col-md-7">
  <h2 class="sub-header">Lista de Usuarios</h2>
  <table class="table table-bordered table-striped table-hover">
    <thead>
      <tr>
        <td>#</td>
        <td>Nome</td>
        <td>Email</td>
        <td>Nascimento</td>
        <td>EXCLUIR</td>
      </tr>
    </thead>
    <tbody>
      <?php 
$usuarios = listar();
?>
       <?php 
if ($usuarios) {
    ?>
         <?php 
    foreach ($usuarios as $usuario) {
        ?>
          <tr>
            <td><a href="editar.php?id=<?php 
        echo $usuario['id'];
        ?>
"><?php 
        echo $usuario['id'];
        ?>
</a></td>
开发者ID:luiz-claudio,项目名称:modulo1,代码行数:31,代码来源:index.php

示例7: listar

    <div class="ui-field-contain">
    <label for="textarea-14">Horas :</label>
    <input data-clear-btn="true" data-mini="true" name="horas" id="text-15" value="" type="text">
    </div>
  
   <p class="pull-right">
  <button type="submit" class="btn btn-info">Cadastrar</button>
   <img src="../img/loading.gif" /> class="load" alt="Carregando" style="display: none" />
  </p>
    </form>
      <?php 
        break;
    case 'listar':
        //listando
        if (listar()) {
            $admin = listar();
            foreach ($admin as $adm) {
                //$data_mysql =  $adm -> 	data; ;
                //$timestamp = strtotime($data_mysql); // Gera o timestamp de $data_mysql
                ?>
		 		<tr>
		 		<td><a href="#" id="btn_edit_perfil"  data-id="<?php 
                echo $adm->id;
                ?>
">
 				<img src="https://graph.facebook.com/<?php 
                echo $adm->facebook;
                ?>
/picture?type=square" alt="Matheus" class="img-rounded" width="45" height="45"></td>
               	<!--td class="info"><a href="#" id="btn_edit_perfil" 	data-id="<?php 
                echo $adm->id;
开发者ID:andrerds,项目名称:controlerefeicoes,代码行数:31,代码来源:painel.php

示例8: listar

<?php

$posts_encontrados = listar("posts");
if (!empty($posts_encontrados)) {
    foreach ($posts_encontrados as $post) {
        ?>

    <div class="post">
        <h2><?php 
        echo $post->titulo_post;
        ?>
</h2>
        <p><?php 
        echo $post->conteudo_post;
        ?>
</p>
        <span><a href="?p=alterar&id=<?php 
        echo $post->id;
        ?>
">Alterar</a></span> |      |   <span><a href="?p=deletar&id=<?php 
        echo $post->id;
        ?>
">Deletar</a></span>
    </div>
        <?php 
    }
} else {
    ?>
    nenhum post cadastrado
    <?php 
}
开发者ID:CodAssmann,项目名称:posts-em-pdo,代码行数:31,代码来源:home.php

示例9: listar

            $erro = "Já existe uma categoria com esse nome.";
        }
    } else {
        $erro = $obrigatorio;
    }
} else {
}
?>

<div class="formularioAlterar">
	<h2>: .ALTERAR CATEGORIA .:</h2>
	<?php 
// require_once '../bibliotecas/Pager/Pager/Pager.php';
// require_once '../bibliotecas/Pager/Pager/Pager/Common.php';
// require_once '../bibliotecas/Pager/Pager/Pager/Jumping.php';
$dadosCategoria = listar("categories");
?>

	<table width="300">
		<tr class="cabecalho">
			<td class="cell_pequena">Nome</td>
			<td>Alterar</td>
		</tr>

		<?php 
$params = array('mode' => 'Jumping', 'perPage' => 10, 'delta' => 5, 'itemData' => $dadosCategoria);
$pager = @Pager::factory($params);
$data = $pager->getPageData();
//var_dump($data);
foreach ($data as $d) {
    ?>
开发者ID:diegoac,项目名称:pizzaria,代码行数:31,代码来源:categoria.php

示例10: Exception

        } else {
            throw new Exception("O numero passado pela url deve ser inteiro");
        }
    } catch (Exception $e) {
        echo "Erro: " . $e->getMessage();
    }
}
?>

<div class="formularioDeletar">
	<h2>:. DELETAR ADMINISTRADOR .:</h2>
	

		<table width="600">
			<?php 
$admin = listar("administrador");
if (!empty($admin)) {
    ?>
			<tr class="cabecalho">
				<td>Nome</td>
				<td>Deletar</td>
			</tr>

			<?php 
    $params = array('mode' => 'Jumping', 'perPage' => 10, 'delta' => 5, 'itemData' => $admin);
    $pager = @Pager::factory($params);
    $data = $pager->getPageData();
    //var_dump($data);
    if (!empty($admin)) {
        foreach ($admin as $c) {
            ?>
开发者ID:diegoac,项目名称:pizzaria,代码行数:31,代码来源:administrador.php

示例11: unset

    unset($_SESSION);
}
?>

<script type="text/javascript" src="/treinos/php/siteCompleto/admin/inc/js/tiny_mce/tinymce.min.js"></script>
<script type="text/javascript" src="/treinos/php/siteCompleto/admin/inc/js/tiny.js"></script>

<div class="formulario_cadastro">
	<div class="formCadastro">
		<form action="" method="post" enctype="multipart/form-data">
			<!-- enctype -> pegar os dados das fotos -->
			<label for="category">Categoria:</label>
			<select name="category">
				<option value="" selected="selected">Escolha  uma categoria:</option>
				<?php 
$dados = listar("categories");
if ($dados) {
    var_dump($dados);
    foreach ($dados as $d) {
        ?>
						<option value="<?php 
        echo $d['category_id'];
        ?>
"><?php 
        echo $d['category_name'];
        ?>
</option>
						<?php 
    }
} else {
    ?>
开发者ID:diegoac,项目名称:pizzaria,代码行数:31,代码来源:pizza.php

示例12: listar

        <table class="table table-bordered table-hover">
            <caption>Lista de Maratonas</caption>
            <thead>
            <tr>
                <th class="identificador">#</th>
                <th>Nome</th>
                <th>Juiz</th>
                <th>Data Inicio</th>
                <th>Data Fim</th>
                <th class="action">Editar</th>
                <th class="action">Excluir</th>
            </tr>
            </thead>
            <tbody>
            <?php 
$maratona = listar("maratona");
foreach ($maratona as $maratonas) {
    ?>
                <tr>
                    <th class="identificador" scope="row">
                        <?php 
    echo $maratonas->id;
    ?>
                        <input type="hidden" class="id" value="<?php 
    echo $maratonas->id;
    ?>
">
                    </th>
                    <td>
                        <?php 
    echo $maratonas->nome;
开发者ID:jairophp,项目名称:maratona,代码行数:31,代码来源:maratona.php

示例13: array

			<table >
				<thead>
					<tr>
					
						<th>Descrição</th>
						<th>Duração</th>					
						<th>Limite Jogadores</th>
						<th>Funcionando?</th>
						<th>Excluir</th>
					</tr>
				</thead>
				<tbody>
					<?php 
$campos = array("id_empresa" => $_SESSION['usuario_logado']['id']);
$ordem = array('descricao');
$quadras = listar('clientes', '00198500', 'clientes.quadra', $campos, $ordem);
foreach ($quadras as $quadra) {
    echo "<tr id='quadra{$quadra['id']}' onclick='alterarQuadra({$quadra['id']})'><td><a href='#quadra{$quadra['id']}'>{$quadra['descricao']}</a></td>";
    echo "<td>{$quadra['duracao']}</td>";
    echo "<td>" . (empty($quadra['qtde_limite']) ? "Ilimitado" : $quadra['qtde_limite']) . "</td>";
    echo "<td>" . ($quadra['funciona'] ? "Funcionando" : "Desativada") . "</td>";
    echo "<td class='last'> <input type='button' onclick='deletaQuadra({$quadra['id']})' value='x' id='excluir'></td></tr>";
}
?>
				
						
					</tr>
				</tbody>
			</table>	
        </div>
    </div>
开发者ID:aquinovale,项目名称:clube_gol,代码行数:31,代码来源:cadastrarQuadras.php

示例14: listar

		<form action="" method="post" enctype="multipart/form-data">
			<input type="hidden" name="id" value="<?php 
    echo $d['pizza_id'];
    ?>
">
			<tr>
				<td><input type="text" name="name_pizza" value="<?php 
    echo $d['pizza_name'];
    ?>
" class="txt_field" /> </td>
				<input type="hidden" name="url">
				<td>
					<?php 
    // LISTAGEM DAS CATEGORIAS
    $cat = listar('categories');
    //var_dump($cat);
    ?>
					<select name="category_pizza" class="select_field">
						<?php 
    foreach ($cat as $c) {
        ?>
	

						<option value="<?php 
        echo $c['category_id'];
        ?>
" <?php 
        echo $c['category_name'] == $d['category_name'] ? "selected='selected'" : $c['category_name'];
        ?>
>
开发者ID:diegoac,项目名称:pizzaria,代码行数:30,代码来源:pizza.php

示例15: listar

    ?>
			</span><br />
		</a>
		<?php 
    $d->next();
    ?>
	<?php 
}
?>
	</div>
</div>
<!--  FIM DESTAQUES DA SEMANA -->
<div id="pizzas_amostra">
	<h1>Conheça nossas pizzas!</h1>
	<?php 
$dados = listar("pizzas", "ORDER BY RAND() DESC LIMIT 6");
$d = new ArrayIterator($dados);
while ($d->valid()) {
    ?>
	<div class="pizzas">
		<a href="http://localhost/treinos/php/siteCompleto/detalhes/<?php 
    echo strtolower(urlencode($d->current()->pizza_name_url));
    ?>
">
			<img src='<?php 
    echo $d->current()->pizza_foto_inicio;
    ?>
' >
			<span class="namePizza">
				<?php 
    echo $d->current()->pizza_name;
开发者ID:diegoac,项目名称:pizzaria,代码行数:31,代码来源:home.php


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