本文整理汇总了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;
}
}
示例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;
示例3: niveis
public function niveis()
{
$campo = "id";
$resultado = listar('nivel_acesso', $campo);
return $resultado;
}
示例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;
}
示例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);
示例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>
示例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;
示例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
}
示例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) {
?>
示例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) {
?>
示例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 {
?>
示例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;
示例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>
示例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'];
?>
>
示例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;