本文整理匯總了PHP中usuario::countFavoritos方法的典型用法代碼示例。如果您正苦於以下問題:PHP usuario::countFavoritos方法的具體用法?PHP usuario::countFavoritos怎麽用?PHP usuario::countFavoritos使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類usuario
的用法示例。
在下文中一共展示了usuario::countFavoritos方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: busca
function busca()
{
$bd = new bd();
$foto = new fotos();
$consulta = "select id,'P' as tipo from publicaciones where id in (select publicaciones_id from publicacionesxstatus where status_publicaciones_id=1 and fecha_fin is null)";
$soloPub = false;
if ($_POST["categoria"] != "") {
$criterio = "I{$_POST["categoria"]}F";
$consulta .= " and clasificados_id in (select id from clasificados where ruta like '%{$criterio}%')";
$soloPub = true;
}
if ($_POST["condicion"]) {
$consulta .= " and condiciones_publicaciones_id = {$_POST["condicion"]}";
$soloPub = true;
}
if ($_POST["estado"] != "") {
$consulta .= " and usuarios_id in (select id from usuarios where estados_id={$_POST["estado"]})";
}
switch ($_POST["orden"]) {
case "id_asc":
$orden = "order by id asc";
break;
case "id_desc":
$orden = "order by id desc";
break;
case "monto_asc":
$orden = "order by monto asc";
break;
case "monto_desc":
$orden = "order by monto desc";
break;
}
if ($_POST["palabra"] != "") {
$consulta .= " and titulo like '%{$_POST["palabra"]}%'";
if (!$soloPub) {
//Incluir usuarios
$criterioPal1 = explode(" ", $_POST["palabra"]);
$criterioPal2 = "(";
$criterioPal3 = "(";
foreach ($criterioPal1 as $c => $valor) {
$criterioPal2 .= "nombre like '%{$valor}%' or apellido like '%{$valor}%' or ";
$criterioPal3 .= "razon_social like '%{$valor}%' or ";
}
$criterioPal2 = substr($criterioPal2, 0, strlen($criterioPal2) - 4) . ")";
$criterioPal3 = substr($criterioPal3, 0, strlen($criterioPal3) - 4) . ")";
$consultaNat = "select usuarios_id as id,'U' as tipo from usuarios_naturales where {$criterioPal2}";
$consultaJur = "select usuarios_id as id,'U' as tipo from usuarios_juridicos where {$criterioPal3}";
$consulta = "({$consultaNat}) UNION ({$consultaJur}) UNION ({$consulta})";
}
}
$inicio = ($_POST["pagina"] - 1) * 25;
$consulta .= " {$orden} limit 25 OFFSET {$inicio}";
$result = $bd->query($consulta);
foreach ($result as $r => $valor) {
if ($valor["tipo"] == "U") {
$usua = new usuario($valor["id"]);
$miTitulo = $usua->getNombre();
if ($_POST["palabra"] != "") {
$criterioPal1 = explode(" ", $_POST["palabra"]);
foreach ($criterioPal1 as $c => $valor) {
$miTitulo = str_ireplace($valor, "<span style='background:#ccc'><b>" . strtoupper($valor) . "</b></span>", $miTitulo);
}
}
?>
<div class=' col-xs-12 col-sm-6 col-md-2 col-lg-2'>
<div class='marco-foto-conf point marL20 ' style='height:130px; width: 130px;' >
<img src='<?php
echo $foto->buscarFotoUsuario($usua->id);
?>
' class='img img-responsive center-block img-apdp imagen' style='width:100%;height:100%;' data-id='prueba'>
</div>
</div>
<div class=' col-xs-12 col-sm-6 col-md-7 col-lg-7'><p class='t16 marL10 marT5'>
<span class=' t15'><a class='negro' href='perfil.php?id=<?php
echo $usua->id;
?>
' class='grisO'><b><?php
echo $miTitulo;
?>
</b></a></span>
<br><span class=' vin-blue t14'><a href='perfil.php?id=<?php
echo $usua->id;
?>
' class=''><b> <?php
echo $usua->a_seudonimo;
?>
</b></a></span><span></span>
<br>
<span class='t12 grisO '><i class='glyphicon glyphicon-time t14 opacity'></i> <?php
echo $usua->getTiempo();
?>
</span><br>
<span class='t11 grisO'> <span> <i class='fa fa-eye negro opacity'></i></span><span class='marL5'>Falta</span><i class='fa fa-heart negro marL5 opacity'>
</i><span class=' point h-under marL5'><?php
echo $usua->countFavoritos();
?>
Me gusta</span><i class='fa fa-share-alt negro marL15 opacity hidden'></i> <span class=' point h-under marL5 hidden'> num_prueba Veces compartido</span> </span>
<br>
<br>
</p>
//.........這裏部分代碼省略.........
示例2: filtraVen
//.........這裏部分代碼省略.........
?>
<div class=' col-xs-12 col-sm-6 col-md-2 col-lg-2'>
<div class='marco-foto-conf point marL20 ' style='height:130px; width: 130px;' >
<!--<div style='position:absolute; left:40px; top:10px; ' class='f-condicion'> Vendedor </div>-->
<img src='<?php
echo $foto->buscarFotoUsuario($usua->id);
?>
' class='img img-responsive center-block img-apdp imagen' style='width:100%;height:100%;' data-id='<?php
echo $usua->id;
?>
' data-tipo='U'>
</div>
</div>
<div class=' col-xs-12 col-sm-6 col-md-7 col-lg-7'>
<p class='marL10 marT5'>
<br>
<span class=' vin-blue t14'><a href='perfil.php?id=<?php
echo $usua->id;
?>
' class=''><b> <?php
echo $usua->a_seudonimo;
?>
</b></a></span>
<br>
<span class='t14 grisO '><?php
echo $miTitulo;
?>
</span>
<br>
<span class=' grisO '>
<i class='fa fa-thumbs-o-up opacity '></i>
<span class='t11 point h-under marL5'><?php
echo $usua->countFavoritos();
?>
Seguidores</span>
</span>
<br>
<br>
<br>
</p>
</div>
<br>
<div class=' col-xs-12 col-sm-12 col-md-3 col-lg-3 text-right'><div class='marR20'>
<span class='vin-blue t16'><a href='perfil.php?id=<?php
echo $usua->id;
?>
' style='text-decoration:underline;'>Ver Mas</a></span >
</div></div><div class='col-xs-12 col-sm-12 col-md-12 col-lg-2'><br></div><div class='col-xs-12 col-sm-12 col-md-12 col-lg-10'><hr class='marR10'><br></div>
<?php
if ($i >= 25) {
break;
}
}
?>
</div>
<div id="paginacion" name="paginacion" class='col-xs-12 col-sm-12 col-md-12 col-lg-12 ' data-paginaactual='1' data-total="<?php
echo $total;
?>
"><center><nav><ul class='pagination'>
<li id="anterior2" name="anterior2" class="hidden"><a href='#' aria-label='Previous' class='navegador' data-funcion='anterior2'><i class='fa fa-angle-double-left'></i> </a>
<li id="anterior1" name="anterior1" class="hidden"><a href='#' aria-label='Previous' class='navegador' data-funcion='anterior1'><i class='fa fa-angle-left'></i> </a>
<?php
$activo = "active";
$oculto = "";
for ($i = 1; $i <= $totalPaginas; $i++) {
示例3:
</b></a></span>
<br><span class=' vin-blue t14'><a href='perfil.php?id=<?php
echo $usua->id;
?>
' class=''><b> <?php
echo $usua->a_seudonimo;
?>
</b></a></span><span></span>
<br>
<span class='t12 orange-apdp'><?php
echo $usua->getTiempo();
?>
Vendiendo en Apreciodepana</span><br>
<span class='t11 grisO'> <i class='fa fa-heart negro opacity'>
</i><span class=' point h-under marL5'><?php
echo $usua->countFavoritos();
?>
Me gusta</span><i class='fa fa-share-alt negro marL15 opacity hidden'></i> <span class=' point h-under marL5 hidden'> num_prueba Veces compartido</span> </span>
<br>
<br>
</p>
</div>
<br>
<div class=' col-xs-12 col-sm-12 col-md-3 col-lg-3 text-right'><div class='marR20'>
<span class=' t12'><?php
echo $usua->getEstado();
?>
</span><br><span class='vin-blue t16'><a href='perfil.php?id=<?php
echo $usua->id;
?>
' style='text-decoration:underline;'>Ver Mas</a></span >
示例4: ordena
function ordena()
{
$bd = new bd();
$foto = new fotos();
$consulta = "select id from usuarios";
$_POST["orden"] = str_replace("_", " ", $_POST["orden"]);
if ($_POST["estado"] != "") {
$consulta .= " where estados_id={$_POST["estado"]}";
}
$consulta .= " order by {$_POST["orden"]} limit 25 OFFSET 0";
$result = $bd->query($consulta);
foreach ($result as $r => $valor) {
$usua = new usuario($valor["id"]);
$miTitulo = $usua->getNombre();
?>
<div class=' col-xs-12 col-sm-6 col-md-2 col-lg-2'>
<div class='marco-foto-conf point marL20 ' style='height:130px; width: 130px;' >
<img src='<?php
echo $foto->buscarFotoUsuario($usua->id);
?>
' class='img img-responsive center-block img-apdp imagen' style='width:100%;height:100%;' data-id='<?php
echo $usua->id;
?>
'>
</div>
</div>
<div class=' col-xs-12 col-sm-6 col-md-7 col-lg-7'><p class='t16 marL10 marT5'>
<span class=' t15'><a class='negro' href='perfil.php?id=<?php
echo $usua->id;
?>
' class='grisO'><b><?php
echo $miTitulo;
?>
</b></a></span>
<br><span class=' vin-blue t14'><a href='perfil.php?id=<?php
echo $usua->id;
?>
' class=''><b> <?php
echo $usua->a_seudonimo;
?>
</b></a></span><span></span>
<br>
<span class='t12 orange-apdp'><?php
echo $usua->getTiempo();
?>
Vendiendo en Apreciodepana</span><br>
<span class='t11 grisO'> <i class='fa fa-heart negro marL5 opacity'>
</i><span class=' point h-under marL5'><?php
echo $usua->countFavoritos();
?>
Me gusta</span><i class='fa fa-share-alt negro marL15 opacity hidden'></i> <span class=' point h-under marL5 hidden'> num_prueba Veces compartido</span> </span>
<br>
<br>
</p>
</div>
<br>
<div class=' col-xs-12 col-sm-12 col-md-3 col-lg-3 text-right'><div class='marR20'>
<span class=' t12'><?php
echo $usua->getEstado();
?>
</span><br><span class='vin-blue t16'><a href='perfil.php?id=<?php
echo $usua->id;
?>
' style='text-decoration:underline;'>Ver Mas</a></span >
</div></div><div class='col-xs-12 col-sm-12 col-md-12 col-lg-2'><br></div><div class='col-xs-12 col-sm-12 col-md-12 col-lg-10'><hr class='marR10'><br></div>
<?php
}
}