本文整理汇总了PHP中usuario::getTiempo方法的典型用法代码示例。如果您正苦于以下问题:PHP usuario::getTiempo方法的具体用法?PHP usuario::getTiempo怎么用?PHP usuario::getTiempo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类usuario
的用法示例。
在下文中一共展示了usuario::getTiempo方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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:
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 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();
示例3: busca2
function busca2()
{
$bd = new bd();
$foto = new fotos();
$consulta = "select id from 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 from usuarios_naturales where {$criterioPal2}";
$consultaJur = "select usuarios_id as id from usuarios_juridicos where {$criterioPal3}";
$consulta .= " where id in ({$consultaNat} UNION {$consultaJur})";
$inicio = ($_POST["pagina"] - 1) * 25;
if ($_POST["estado"] != "") {
$consulta .= " and estados_id={$_POST["estado"]}";
}
$consulta .= " limit 25 OFFSET {$inicio}";
$result = $bd->query($consulta);
foreach ($result as $r => $valor) {
$usua = new usuario($valor["id"]);
$miTitulo = $usua->getNombre();
$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='<?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='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
}
}
示例4: filtraVen
//.........这里部分代码省略.........
foreach ($criterioPal1 as $c => $valor) {
$miTitulo = str_ireplace($valor, "<span style='background:#ccc'><b>" . strtoupper($valor) . "</b></span>", $miTitulo);
}
// $miTitulo=str_ireplace($_POST["palabra"], "<span style='background:#ccc'><b>" . strtoupper($_POST["palabra"]) . "</b></span>", $miTitulo);
}
$i++;
?>
<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='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 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
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'>
示例5: 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
}
}
示例6:
role="progressbar" aria-valuenow="50" aria-valuemin="0"
aria-valuemax="100" style="width: 50%"></div>
</div>
<p class="t14 text-left marL5 marR5 marT5 mar0 ">
<span class="green t16 marR10"><i class="fa fa-plus-square "></i>
<span class="grisO">0</span></span> <span class="red2 t16 marR10"><i
class="fa fa-minus-square "></i> <span class="grisO">0</span></span>
<span class="blueO-apdp t16 "><i class="fa fa-circle "></i> <span
class="grisO">0</span></span>
</p>
</div>
<div class="contenedor sombra-div mar10 mar-perfil-informacion "
style="padding: 10px;">
<b class="marR5">Experiencia: </b>
<?php
echo $usuario->getTiempo();
?>
vendiendo en <span class="orange-apdp">A Precio De Pana</span>
</div>
</section>
<div class="text-right marR20 hidden">
<a href="resumen.php">Ver todas las calificaciones</a>
</div>
</div>
</div>
<br> <br class="hidden-xs"> <br class="hidden-xs">
</div>