コード例 #1
0
        print '</div>';
        break;
    case 'addPrefer':
        xtec_favorites_add_preferred($_REQUEST['blogId']);
        header('location:' . $referer);
        break;
    case 'delPrefer':
        xtec_favorites_delete_preferred($_REQUEST['blogId']);
        header('location:' . $referer);
        break;
    case 'mostActive':
        include 'xtecfunc.php';
        $ipp = 20;
        print '<h2 style="color: #1C4387; font-size: 1.3em; background-image: none; border: none; margin-bottom: 1em; margin-top: 1em;">Llista dels blocs m&eacute;s actius els darrers 60 dies.</h2>';
        $init = isset($_REQUEST['init']) && $_REQUEST['init'] != '' ? $_REQUEST['init'] : 1;
        $mostActive = xtec_lastest_posts_most_active_blogs($ipp, $init - 1);
        $blogsNumber = xtec_lastest_posts_num_active_blogs();
        $pager = pager($init, $blogsNumber, 'index.php?a=mostActive&amp;init=%%', $ipp);
        $maxPosts = xtec_lastest_posts_num_posts_of_most_active_blog();
        print '<div style="text-align:right; padding-right:60px;">' . $pager . '</div><br/ >';
        print '<table>';
        print '<th align="left" valign="top">T&iacute;tol</th><th align="left" valign="top">Activitat (%)</th><th align="left" valign="top">Darrer article</th>';
        $bgcolor = "#e5f2fe";
        foreach ($mostActive as $active) {
            $bgcolor = $bgcolor == '#e5f2fe' ? '#ffffff' : '#e5f2fe';
            ?>
				<tr bgcolor="<?php 
            echo $bgcolor;
            ?>
"><td width="250"><a href='<?php 
            echo $active['blog_url'];
コード例 #2
0
</div>
</div>
<?php 
    }
}
?>

<!-- Els blocs més actius -->

<div class="sidebox"><span class="sideboxright">&nbsp;</span> <span
	class="sideboxleft">&nbsp;</span>
<h3 class="noticies">Els blocs més actius</h3>
<div class="sidecontent">
<ul>
<?php 
$mostActive = xtec_lastest_posts_most_active_blogs();
if (count($mostActive) > 0) {
    foreach ($mostActive as $active) {
        //XTEC ************ AFEGIT - if blog's title is empty, get url
        //2013.10.30 @jmeler
        $titolBlog = trim(stripslashes($active['blog_title']));
        $urlBlog = trim($active['blog_url'], "/");
        if (empty($titolBlog)) {
            $titolBlog = "Bloc " . substr($urlBlog, strrpos($urlBlog, '/') + 1);
        }
        //************ FI
        ?>
	
	<li><a href='<?php 
        echo $active['blog_url'];
        ?>