MN La importancia de estar por la Región de Murcia
Guía Sorteos Buscar
Publicidad
ESTADÍSTICAS DE MURCIANOTICIAS"; echo "Semana | Mes | Año | Siempre"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; if($o == "mes") { echo "

{$numero} noticias más leídas este mes

"; $tiempo = time() - (30 * 24 * 3600); $fecha = date("Y/m/d H:i", $tiempo); $q = mysqli_query($link, "select * from tbl_news where news_date > '$fecha' and status = 'Published' order by total_view desc limit 0, {$numero}"); $i = 1; while($r = mysqli_fetch_array($q)) { $categoria = mysqli_fetch_assoc(mysqli_query($link, "select * from tbl_category where category_id = {$r["id_main_category"]}")); $total = $r["total_view"] + 1854; echo ""; echo ""; echo ""; $i++; } } elseif($o == "anio") { echo "

{$numero} noticias más leídas este año

"; $tiempo = time() - (365 * 24 * 3600); $fecha = date("Y/m/d H:i", $tiempo); $q = mysqli_query($link, "select * from tbl_news where news_date > '$fecha' and status = 'Published' order by total_view desc limit 0, {$numero}"); $i = 1; while($r = mysqli_fetch_array($q)) { $categoria = mysqli_fetch_assoc(mysqli_query($link, "select * from tbl_category where category_id = {$r["id_main_category"]}")); $total = $r["total_view"] + 1854; echo ""; echo ""; echo ""; $i++; } } elseif($o == "semana") { echo "

{$numero} noticias más leídas esta semana

"; $tiempo = time() - (7 * 24 * 3600); $fecha = date("Y/m/d H:i", $tiempo); $q = mysqli_query($link, "select * from tbl_news where news_date > '$fecha' and status = 'Published' order by total_view desc limit 0, {$numero}"); $i = 1; while($r = mysqli_fetch_array($q)) { $categoria = mysqli_fetch_assoc(mysqli_query($link, "select * from tbl_category where category_id = {$r["id_main_category"]}")); $total = $r["total_view"] + 1854; echo ""; echo ""; echo ""; $i++; } } else { echo "

{$numero} noticias más leídas desde siempre

"; $q = mysqli_query($link, "select * from tbl_news where status = 'Published' order by total_view desc limit 0, {$numero}"); $i = 1; while($r = mysqli_fetch_array($q)) { $categoria = mysqli_fetch_assoc(mysqli_query($link, "select * from tbl_category where category_id = {$r["id_main_category"]}")); $total = $r["total_view"] + 1854; echo ""; echo ""; echo ""; $i++; } } echo ""; echo "
UrlLecturas
" . $i . "" . $r["news_title"] . "
" . getFecha($r["news_date"]) . "
{$total}
" . $i . "" . $r["news_title"] . "
" . getFecha($r["news_date"]) . "
{$total}
" . $i . "" . $r["news_title"] . "
" . getFecha($r["news_date"]) . "
{$total}
" . $i . "" . $r["news_title"] . "
" . getFecha($r["news_date"]) . "
{$total}
"; ?>