示例#1
0
    <section id="content">

        <div class="g12">







            <h3 class="tema"><span class="tema">TEMA: <?php 
echo $temas[0]['tema'];
?>
</span><span class="fecha-inicio"> Proximo N.I: <?php 
echo tiempo_transcurrido($temas[0]['fecha_inicio']);
?>
</span> <?php 
echo $_SESSION['username'];
?>
<h3>
                    <h1 class="titulo_categoria" id="<?php 
echo $categorias[0]['titulo'];
?>
" style="font-size: 60px;"><?php 
echo $categorias[0]['titulo'];
?>
 </h1>


                    <button id="boxSet"  class="i_speech_bubble icon green" style="float:right; margin-bottom: 20px; margin-top:-30px;">Crear Nuevo Topico</button>
示例#2
0
            ?>
                <?php 
            if ($r['id_topico'] == $t['id_topico']) {
                ?>
                    <?php 
                $nombre_topico = $r['id_topico'];
                ?>

                    <div class="<?php 
                echo $r['style'];
                ?>
" style="<?php 
                echo $r['tipo'] == 0 ? 'clear:both' : 'float: right;';
                ?>
"><span class="fecha"><?php 
                echo tiempo_transcurrido($r['fecha']);
                ?>
</span><br/>
                        <?php 
                $r['tipo'];
                ?>
                        <p><?php 
                echo $r['texto'];
                ?>
</p>
                        <span class="firma" style=<?php 
                echo $r['tipo'] == 0 ? 'left:-10px;' : 'left:-10px;';
                ?>
>
                            <?php 
                echo $r['tipo'] == 0 ? 'Comentario' : 'Respuesta';
示例#3
0
									}
									if ($notificaciones[8]!="") {
										
										?>
										<div style='text-align:justify;padding-left:10px;display:inline-block;'><?php echo tiempo_transcurrido($notificaciones[6]) ?> <br>
											<?php
										echo "<strong> ".$notificaciones[0]." </strong>".utf8_decode($notificaciones[5])." <strong>".$grupos[$notificaciones[8]]."</strong></div>";
									}elseif ($notificaciones[9]!="") {
																				
										?>
										<div style='text-align:justify;padding-left:10px;display:inline-block;'><?php echo tiempo_transcurrido($notificaciones[6]) ?> <br>
											<?php
										echo "<strong> ".$notificaciones[0]." </strong>".utf8_decode($notificaciones[5])." <strong>".$partidos[$notificaciones[9]]."</strong></div>";
									}else{
										?>
										<div style='text-align:justify;padding-left:10px;display:inline-block;'><?php echo tiempo_transcurrido($notificaciones[6]) ?> <br>
											<?php
										echo "<strong> ".$notificaciones[0]." </strong>".utf8_decode($notificaciones[5])." <strong>".$campeonato[$notificaciones[12]]."</strong></div>";
									

									}
										echo "</div>";

									}
									echo "</div>";
									}
									}
									?>
					</div>
					
				</div>
示例#4
0
function presentacion_noticias($consulta)
{
    ?>
<div class="grid_8" id="Principal">
<?php 
    define("PERPAGE", 10);
    define("OFFSET", "offset");
    //get query string
    $offset = @$_GET[OFFSET];
    //check variable
    if (!isset($offset)) {
        $recordoffset = 0;
    } else {
        //calc record offset
        $recordoffset = $offset * PERPAGE;
    }
    $q = $consulta . " LiMIT {$recordoffset}, " . PERPAGE;
    $c = "SELECT * FROM Noticias";
    $r = mysql_query($q);
    if (mysql_num_rows($r) > 0) {
        //table is non-empty
        while ($row = mysql_fetch_assoc($r)) {
            $net_vote = $row['votos'];
            //this is the net result of voting up and voting down
            ?>




<div id="noticia_individual">

<!--
<a href="index.php"><img src="grayarrow.gif" alt="" ></a>

Asi funciona
-->
<?php 
            if (substr($row['link_noticia'], -3) == "jpg" || substr($row['link_noticia'], -3) == "gif") {
                ?>
<div id="imagen">
<img id="imagen_noticia" src="<?php 
                echo $row['link_noticia'];
                ?>
" alt="" >
</div>		

<div id="div_titulo_imagen">
<a id="titulo" href="<?php 
                echo $row['link_noticia'];
                ?>
"> <?php 
                echo $row['titulo'];
                ?>
 </a><br>
</div>
<div id="div_link_imagen">
<a id="url" href="<?php 
                echo $row['link_noticia'];
                ?>
" >(<?php 
                echo $row['link_noticia'];
                ?>
)</a>
</div>


<?php 
            } else {
                ?>
<div id="div_titulo">
<a id="titulo" href="<?php 
                echo $row['link_noticia'];
                ?>
"> <?php 
                echo $row['titulo'];
                ?>
 </a><br>
</div>
<div id="div_link">
<a id="url" href="<?php 
                echo $row['link_noticia'];
                ?>
" >(<?php 
                echo $row['link_noticia'];
                ?>
)</a>
</div>
<?php 
            }
            ?>

<div id="resto_noticia">		
		<p id="fecha">Enviado hace
		<?php 
            $fecha = strtotime($row['Fecha']);
            echo tiempo_transcurrido($fecha) . " por ";
            ?>
		<a href="" ><?php 
            echo $row['id_usuario'];
            ?>
</a>
		</p>
<!--
<div id="imagen_categoria"><img src="<?php 
            echo 'imagenesCategorias/' . $row['imagen_categoria'];
            ?>
" id="imagen_noticia" alt="" ></div>				
						
		<p id="descripcion"> <?php 
            echo $row['descripcion'];
            ?>
		</p>
		
-->	
<br>		
      	
	
	
	
	</div>


<div id="footer_noticia">	
<!--	<p class="votos"> <?php 
            echo $row['votos'];
            ?>
 Puntos |</p> -->
 
<p class="votos">Categoria: <?php 
            echo $row['categoria'];
            ?>
 |</p>	
	
	
	
<p class="votos"><a id="comentario" href="Comentarios_noticia.php?id_not=<?php 
            echo $row['id_noticia'];
            ?>
" >Comentarios | </a></p>
 
 
<p class='votes_count' id='votes_count<?php 
            echo $row['id_noticia'];
            ?>
'><?php 
            echo $row['votos'] . " votos | ";
            ?>
 </p>	
	

<?php 
            if (isset($_SESSION['valid_user'])) {
                $consulta_votos = "Select 1 from voto where id_noticia =" . $row['id_noticia'] . " and usuario ='" . $_SESSION['valid_user'] . "'";
                $f = mysql_query($consulta_votos);
                if (mysql_num_rows($f) == 0) {
                    ?>
<div>
<span class='vote_buttons' id='vote_buttons<?php 
                    echo $row['id_noticia'];
                    ?>
'>  
 <a href='javascript:;' class='vote_up' id='<?php 
                    echo $row['id_noticia'];
                    ?>
'>me gusta</a> 
  </span>  
<span class='vote_buttons' id='vote_buttons<?php 
                    echo $row['id_noticia'];
                    ?>
'>  
 <a href='javascript:;' class='vote_down' id='<?php 
                    echo $row['id_noticia'];
                    ?>
'>no me gusta</a> 
  </span>    
</div>
<?php 
                }
            }
            ?>

</div>

	
<div class="clear"></div>
	
</div>
<br>
<hr />
<?php 
        }
    }
    $pagename = basename($_SERVER['PHP_SELF']);
    //find total number of records
    $prueba = mysql_query($c);
    $totalrecords = mysql_num_rows($prueba);
    $numpages = ceil($totalrecords / PERPAGE);
    //create category parameter
    //create if needed
    if ($numpages > 1) {
        //create navigator
        $nav = new PageNavigator($pagename, $totalrecords, PERPAGE, $recordoffset);
        echo $nav->getNavigator();
    }
    ?>
</div>
</div>
<?php 
}