本文整理匯總了PHP中listAll函數的典型用法代碼示例。如果您正苦於以下問題:PHP listAll函數的具體用法?PHP listAll怎麽用?PHP listAll使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了listAll函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: validaSession
<?php
include "connect/database.php";
validaSession();
securityValidation($_COOKIE['id'], "10");
$pro = listAll("proyectos,pro_transactions,user", "WHERE t_id = '{$_GET['i']}' AND t_pro_id = pro_id AND t_status = 'P' AND user_id = id ORDER BY t_pdate DESC");
$rs_pro = mysql_fetch_object($pro);
$oferta = listAll("ofertas", "WHERE id='{$rs_pro->t_oferta_id}' AND awarded='S'");
$rs_oferta = mysql_fetch_object($oferta);
$oferta_user = listAll("user", "WHERE id='{$rs_oferta->user_id}'");
$rs_oferta_user = mysql_fetch_object($oferta_user);
$paypal_user = listAll("user_det", "WHERE id_user='{$rs_oferta->user_id}' AND id_data='17'");
$rs_paypal = mysql_fetch_object($paypal_user);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pagos realizados</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<!--[if IE 9]>
<link rel="stylesheet" media="screen" href="css/ie9.css"/>
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" media="screen" href="css/ie8.css"/>
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" media="screen" href="css/ie7.css"/>
示例2: listAll
<?php
use Fototea\Models\Referral;
use Fototea\Models\User;
use Fototea\Models\Credit;
use Fototea\Util\FAnalytics;
$user_code = $_REQUEST['c'];
$list = listAll("user", "WHERE act_code='{$user_code}'");
@($val = mysql_num_rows($list));
if ($val > 0) {
$user = mysql_fetch_object($list);
$user_update = updateTable("user", "act='S'", "act_code='{$user_code}'");
$mss = '¡Tu cuenta ha sido activada con éxito!<br><br><a href="login" class="txtAzul">Entrar a tu cuenta</a>.';
// Create user profile folder
$folder_id = sha1($user->id);
$dir = "../profiles/" . $folder_id;
$dir2 = $dir . "/";
@mkdir($dir2, 0777, true);
// Event = Confirmacion de registro
$events = FAnalytics::getInstance();
if ($user->user_type == User::USER_TYPE_PHOTOGRAPHER) {
$events->trackEvent('Usuario - Confirmaciones de registro', 'Confirmación de fotógrafo', $user->user_type);
} else {
$events->trackEvent('Usuario - Confirmaciones de registro', 'Confirmación de cliente', $user->user_type);
}
// Add referral to referring user if exists
if (isset($_GET['ru']) && isset($_GET['ru'])) {
$referringUserId = $_GET['ru'];
$media = $_GET['rm'];
if ($referringUserId != null) {
$referral = new Referral();
示例3: json_encode
if ($_COOKIE['id'] == $rs_user_pro->user_id) {
$completeName = $us_pro['full_name'];
$to = $us_of['email'];
$asunto = "Has recibido un comentario en una de tus ofertas";
$mailCont = '</strong> ha comentado en tu oferta, en el proyecto "<span style="color:#cc6600; font-weight:bold;">' . $rs_user_pro->pro_tit . '</span>". Para ver el comentario haz click <a href="' . FConfig::getUrl('proyecto') . '?id=' . $rs_user_pro->pro_id . '" target="_blank">aquí</a>.';
$not_user = Notification::create($us_of['id'], 'Has recibido un mensaje de ' . $completeName, Notification::TYPE_COMMENT, json_encode($notificationData));
}
}
//End notification
$sender_us = getUserInfo($_COOKIE['id']);
$params = array('site_url' => FConfig::getUrl('site_url'), 'logo_url' => FConfig::getUrl('images/logo_footer.png'), 'user_name' => $completeName, 'comment_name' => $sender_us['name'] . ' ' . $sender_us['lastname'], 'content' => $mailCont);
$body = FMailer::replaceParameters($params, file_get_contents('../views/emails/comentarioOfertaEmail.html'));
$mailer = new FMailer();
$receivers = array(array('email' => $to));
$mailer->setReceivers($receivers);
$mailer->sendEmail($asunto, $body);
$arreglo[] = array('resp' => "Se ha enviado la información");
echo json_encode($arreglo);
}
if ($act == "validarPago") {
$pro_id = $_REQUEST['pro_id'];
$oferta_id = $_REQUEST['oferta_id'];
$oferta = listAll("pro_transactions", "WHERE t_oferta_id = '{$oferta_id}' AND t_pro_id = '{$pro_id}' AND t_status = 'L'");
$row = mysql_num_rows($oferta);
if ($row > 0) {
$arreglo[] = array('resp' => "true");
} else {
$arreglo[] = array('resp' => "false");
}
echo json_encode($arreglo);
}
示例4: listAll
<col class="con0" />
<col class="con1" />
</colgroup>
<thead>
<tr>
<th width="10%" class="head1">ID</th>
<th width="30%" class="head0">Apellidos</th>
<th width="30%" class="head1">Nombre</th>
<th width="15%" class="head0">Usuario</th>
<th width="10%" class="head1"> </th>
</tr>
</tr>
</thead>
<tbody>
<?php
$banner = listAll("user", " ORDER BY lastname ASC");
while ($rs_banner = mysql_fetch_object($banner)) {
?>
<tr class="gradeX" id="reg<?php
echo $rs_banner->id;
?>
">
<td align="center"><?php
echo $rs_banner->id;
?>
</td>
<td align="center"><?php
echo $rs_banner->lastname;
?>
</td>
<td align="center"><?php
示例5: updateTable
updateTable("albumes_det", "ad_url = '" . $fileNameUnique . "'", "ad_id = " . $photo_id);
$pathFile = '../profiles/' . $perfilSha1 . '/' . $albumSha1 . '/' . $fileNameUnique;
move_uploaded_file($file['tmp_name'], $pathFile);
// Event: Fotos subidas álbumes
$events = FAnalytics::getInstance();
$events->trackEvent('Album - Fotos subidas', 'Foto subida al album ' . $albumId, $user->id);
return 'success';
} else {
return 'error';
}
}
if ($act == "principalFoto") {
$foto = $_REQUEST['ad_id'];
updateTable("albumes_det", "ad_is_principal = false", "ad_a_id = '{$_REQUEST['album']}'");
updateTable("albumes_det", "ad_is_principal = true", "ad_a_id = '{$_REQUEST['album']}' AND ad_id = '{$foto}'");
}
}
if ($act == "buscarFoto") {
$foto = $_REQUEST['foto'];
$limit = $foto - 1;
$foto = listAll("albumes_det", "WHERE ad_a_id = '{$_REQUEST['a_id']}' AND ad_status='S' LIMIT {$limit},{$foto}");
$rs_foto = mysql_fetch_object($foto);
$url_img = "profiles/" . sha1($rs_foto->ad_user_id) . "/" . sha1($rs_foto->ad_a_id) . "/" . $rs_foto->ad_url;
$fecha = explode(" ", dateField($rs_foto->ad_cdate));
$desc = $fecha[0];
$arreglo[] = array('img' => $url_img, 'desc' => $desc);
echo json_encode($arreglo);
}
} else {
$app->redirect($app->getConfig()->getUrl('perfil'));
}
示例6: listAll
<div class="left ctaFecha alignCenter">Fecha</div>
<div class="left ctaProyecto">Descripción</div>
<div class="left ctaUser alignCenter">Adjudicado a</div>
<div class="left ctaMonto alignCenter">Monto</div>
</div>
<div class="mensajesList">
<?php
$mov = listAll("proyectos,pro_transactions", "WHERE user_id = '{$_COOKIE['id']}' AND t_pro_id = pro_id AND t_status ='L' ORDER BY t_pdate DESC");
$rows = mysql_num_rows($mov);
if ($rows < 1) {
echo ' <div class="mensajeItem">No tiene proyectos finalizados</div>';
} else {
while ($rs_mov = mysql_fetch_object($mov)) {
$oferta = listAll("ofertas", "WHERE pro_id = '{$rs_mov->pro_id}' AND awarded='S'");
$rs_oferta = mysql_fetch_object($oferta);
$from = getUserInfo($rs_oferta->user_id);
$fechaMens = explode(" ", dateField($rs_mov->t_pdate));
if ($fechaMens[0] == date("d-m-Y")) {
$fm = $fechaMens[1];
} else {
$fm = $fechaMens[0];
}
$total = $total + $rs_oferta->bid;
?>
<div class="ctaItem " >
<div class="mensajeItemContainer">
<div class="left ctaFecha alignCenter"><?php
echo $rs_mov->t_trans_id;
?>
示例7: mysql_fetch_object
use Fototea\Config\FConfig;
use Fototea\Util\FMailer;
require '../vendor/autoload.php';
include_once '../scripts/libSM.php';
$user_email = $_REQUEST['user'];
$act_code = $_REQUEST['act-code'];
//action recover password
if ($_REQUEST['act'] == "recuperar") {
$rs_user = mysql_fetch_object(listAll("user", "WHERE user = '{$user_email}'"));
$to = $rs_user->user;
$toName = $rs_user->name . ' ' . $rs_user->lastname;
$asunto = "Recuperar contraseña";
$params = array('site_url' => FConfig::getUrl(), 'logo_url' => FConfig::getUrl('images/logo_footer.png'), 'nombre' => $toName, 'recuperar_url' => FConfig::getUrl('reinicia-contrasena') . '?c=' . $rs_user->act_code);
$body = FMailer::replaceParameters($params, file_get_contents('../views/emails/recuperarContrasenaEmail.html'));
$mailer = new FMailer();
$receivers = array(array('email' => $to, 'name' => $toName));
$mailer->setReceivers($receivers);
$mailer->sendEmail($asunto, $body);
$arreglo[] = array('resp' => "Se ha enviado la información");
echo json_encode($arreglo);
}
//action rest password
if ($_REQUEST['act'] == "reset") {
$pass = sha1($_REQUEST['pass']);
$rs_user2 = mysql_fetch_object(listAll("user", "WHERE act_code = '{$act_code}'"));
$salt = $rs_user2->salt;
$newPass = sha1($salt . $pass);
updateTable("user", "password = '{$newPass}'", "act_code = '{$act_code}'");
$arreglo[] = array('resp' => "Se ha enviado la información");
echo json_encode($arreglo);
}
示例8: listAll
?>
<div class="alignCenter">Tu ofertaste por<br><span class="font18 fontW400 txtNaranja">$ <?php
echo $oferta_user['monto'];
?>
</span></div><?php
}
?>
</div>
</div>
<?php
}
?>
<div class="headerProyectosList">Proyectos Nuevos</div>
<?php
$projectsN = listAll("proyectos", "WHERE pro_status = 'A' ORDER BY pro_date_end DESC");
while ($rs_proN = mysql_fetch_object($projectsN)) {
$diasRestN = diffDate(date("Y-m-d H:i:s"), $rs_proN->pro_date_end);
$dateCreate = explode(" ", $rs_proN->pro_cdate);
$oferta_userN = getOferta($rs_proN->pro_id, $_COOKIE['id']);
?>
<div class="proyectosListado">
<div class="left proyectosListadoTitulo"><a class="txtAzul" href="proyecto?id=<?php
echo $rs_proN->pro_id;
?>
"><?php
echo ucfirst($rs_proN->pro_tit);
?>
</a></div>
<div class="left proyectosListadoDesc"><?php
echo substr($rs_proN->pro_descripcion, "0", "90");
示例9: listAll
<div class="albumTit">Album: <?php
echo $rs_album->a_tit;
?>
<?php
if ($rs_album->a_user_id == $_COOKIE['id']) {
?>
- <a href="album?a=<?php
echo $_GET['a'];
?>
" class="txtNaranja font12">Editar</a><?php
}
?>
</div>
<div class="container_img">
<?php
$fotos = listAll("albumes_det", "WHERE ad_a_id = '{$_GET['a']}' AND ad_status= 'S'");
$rows_fotos = mysql_num_rows($fotos);
if ($rows_fotos > 0) {
$i = 1;
while ($rs_fotos = mysql_fetch_object($fotos)) {
?>
<div class="container_list_img left" id="img_<?php
echo $rs_fotos->ad_id;
?>
">
<div class="deleteImg" onclick="deleteImg(<?php
echo $rs_fotos->ad_id;
?>
,<?php
echo $_GET['a'];
?>
示例10: listAll
</div>
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<?php
$list_cat = listAll("categories", "ORDER BY categories.order ASC");
while ($rs_cat = mysql_fetch_object($list_cat)) {
?>
<p><?php
echo $rs_cat->description;
?>
</p>
<ul class="categories-list-form">
<?php
$list_subCat = listAll("categories_event", "WHERE id_cat = '{$rs_cat->id}' ORDER BY description ASC");
while ($rs_subCat = mysql_fetch_object($list_subCat)) {
$userCat = getUserInterest($userInfo['id'], $rs_subCat->id);
?>
<li class="txtGris"><input name="user_interes[]" id="user_interes" class="user_interes" type="checkbox" value="<?php
echo $rs_subCat->id;
?>
" <?php
if ($userCat == true) {
echo 'checked="checked"';
}
?>
><?php
echo $rs_subCat->description;
?>
</li>
示例11: utf8_decode
$gender = "M";
}
}
$user_name = utf8_decode($data['first_name']);
$user_lastname = utf8_decode($data['last_name']);
$user_gender = $gender;
$user_email = $data['email'];
$user_pass = sha1($data['password']);
$user_dob = $bday[2] . "-" . $bday[0] . "-" . $bday[1];
$user_type = $data['user_type'];
$user_salt = salt();
// TODO: ESTA FUNCION SE MIGRO AL MODELO DE USER
$user_act = "N";
$user_act_code = StringHelper::generateRandomString();
$passEnc = sha1($user_salt . $user_pass);
$reg = listAll("user", "WHERE user = '{$user_email}'");
$reg_num = mysql_num_rows($reg);
if ($reg_num < 1) {
$user_insert = insertTable("user", "'','{$user_name}','{$user_lastname}','{$user_dob}','{$user_gender}','{$user_email}','{$passEnc}','{$user_salt}','{$user_type}',NOW(),'0000-00-00 00:00:00','{$user_act}','{$user_act_code}', false, false");
if ($user_insert > 0) {
$to = $user_email;
$toName = $user_name . ' ' . $user_lastname;
$asunto = "Confirmación de registro";
$params = array('site_url' => FConfig::getUrl(), 'logo_url' => FConfig::getUrl('images/logo_footer.png'), 'nombre' => $toName, 'confirmacion_url' => FConfig::getUrl('confirmacion') . '?c=' . $user_act_code . '&e=' . $user_email);
$body = FMailer::replaceParameters($params, file_get_contents('../views/emails/registroEmail.html'));
$mailer = new FMailer();
$receivers = array(array('email' => $to, 'name' => $toName));
$mailer->setReceivers($receivers);
$mailer->sendEmail($asunto, $body);
header("location:../confirmacionRegistro");
}
示例12: array
//INFO TAB
//Intereses
$intereses = array();
if ($user_info['user_type'] == User::USER_TYPE_PHOTOGRAPHER) {
$list_cat = listAll("categories", "ORDER BY categories.order ASC");
while ($rs_cat = mysql_fetch_object($list_cat)) {
//Busco las subcategorias del usuario
$list_subCat_val = listAll("categories_event e, user_det u", "WHERE id_cat = '{$rs_cat->id}' AND e.id = u.description AND u.id_data = '15' AND u.id_user = '" . $user_info['id'] . "' ORDER BY e.description ASC", 'u.description');
$user_subcats_ids = array();
while ($rs_subCat = mysql_fetch_object($list_subCat_val)) {
$user_subcats_ids[] = $rs_subCat->description;
}
$user_subcats = array();
//Si hay las muestro
if (count($user_subcats_ids) > 0) {
$list_subCat = listAll("categories_event", "WHERE id_cat = '{$rs_cat->id}' and id IN (" . implode(',', $user_subcats_ids) . ") ORDER BY description ASC");
while ($rs_subCat = mysql_fetch_object($list_subCat)) {
$user_subcats[] = $rs_subCat;
}
}
$rs_cat->user_subcats = $user_subcats;
$intereses[] = $rs_cat;
}
//end while
}
?>
<h2 class="main-title">
Datos del Usuario
</h2>
示例13: listAll
<col class="con1" />
<col class="con0" />
<col class="con1" />
</colgroup>
<thead>
<tr>
<th width="10%" class="head1">Fecha</th>
<th width="30%" class="head0">Email</th>
<th width="30%" class="head1">Tipo usuario</th>
</tr>
</thead>
<tbody>
<?php
$banner = listAll("prelaunch_email", " ORDER BY cdate DESC");
while ($rs_banner = mysql_fetch_object($banner)) {
?>
<tr class="gradeX" id="reg<?php
echo $rs_banner->id;
?>
">
<td align="center"><?php
echo dateField($rs_banner->cdate);
?>
</td>
<td align="center"><?php
echo $rs_banner->email;
?>
</td>
<td align="center"><?php
示例14: elseif
$projects = $adjudicated_projects;
} elseif ($filter == "finalizados") {
$projects = $closed_projects;
} else {
//$projects = $my_projects; //TODO aclarar esta parte con paulo ofertas o proyectos??
$projects = $opened_projects;
$filter = "enviadas";
}
$project_list = array();
while ($rs_proj = mysql_fetch_object($projects)) {
$rs_proj->days_left = diffDate(date("Y-m-d H:i:s"), $rs_proj->pro_date_end);
//$diasRest
$rs_proj->pro_tit = ucfirst($rs_proj->pro_tit);
$rs_proj->mensaje = substr($rs_proj->mensaje, "0", "1000");
//Get proyect owner
$pro_user = listAll("proyectos", "WHERE pro_id = '{$rs_proj->pro_id}'");
$pro_user = mysql_fetch_object($pro_user);
//$rs_pro_user
$rs_proj->project_owner = getUserInfo($pro_user->user_id);
//$user_crea
$rs_proj->project_owner_ratings = ratings($pro_user->user_id);
//TODO mejorar esto, al ejecutar los queries de arriba sobre project view no hay necesidad de hacer esto
$proView = Project_View::loadProjectById($rs_proj->pro_id);
$rs_proj->total_ofertas = $proView->total_ofertas;
$project_list[] = $rs_proj;
}
}
?>
<?php
if ($current_user->user_type == User::USER_TYPE_PHOTOGRAPHER) {
示例15: listAll
" class="longinput"/></span>
</p>
<p>
<label>Codigo postal:</label>
<span class="field"><input type="text" name="zip" id="zip" value="<?php
echo $user['cp'];
?>
" class="longinput"/></span>
</p>
<p>
<label>País:</label>
<span class="field"><select name="user_pais" id="user_pais" class="cmBoxRegistro">
<option value="-1">País</option>
<?php
$pais_q = listAll("paises", " ORDER BY nombre ASC");
while ($pais = mysql_fetch_object($pais_q)) {
?>
<option value="<?php
echo $pais->iso;
?>
" <?php
if ($user['pais_ab'] == $pais->iso) {
echo 'selected="selected"';
}
?>
><?php
echo utf8_encode($pais->nombre);
?>
</option>
<?php