Exemplo n.º 1
0
    ?>
        </div>
    </div>
<?php 
}
?>

<?php 
if (AmpConfig::get('ratings')) {
    ?>
<div id="rating_<?php 
    echo intval($artist->id);
    ?>
_artist" style="display:inline;">
    <?php 
    show_rating($artist->id, 'artist');
    ?>
</div>
<?php 
}
if (AmpConfig::get('userflags')) {
    ?>
<div style="display:table-cell;" id="userflag_<?php 
    echo $artist->id;
    ?>
_artist">
        <?php 
    Userflag::show($artist->id, 'artist');
    ?>
</div>
<?php 
Exemplo n.º 2
0
    <?php 
Art::display('tvshow_season', $season->id, $season->f_name, 6);
?>
</div>
<?php 
if (User::is_registered()) {
    ?>
    <?php 
    if (AmpConfig::get('ratings')) {
        ?>
    <div id="rating_<?php 
        echo intval($season->id);
        ?>
_tvshow_season" style="display:inline;">
        <?php 
        show_rating($season->id, 'tvshow_season');
        ?>
    </div>
    <?php 
    }
    ?>
    <?php 
    if (AmpConfig::get('userflags')) {
        ?>
    <div style="display:table-cell;" id="userflag_<?php 
        echo $season->id;
        ?>
_tvshow_season">
            <?php 
        Userflag::show($season->id, 'tvshow_season');
        ?>
    function content_55e4460f9ceb48_97879801($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_truncate')) {
            include '/var/www/includes/smartyv3/plugins/modifier.truncate.php';
        }
        if ($_smarty_tpl->tpl_vars['display_type']->value == '') {
            ?>
    <div class="col-lg-3 col-md-3 col-sm-3 col-xs-6 mbm ft-hover">
        <!--<span class="photoname" id="avatar1_file" style="height: 45px; overflow: hidden;" ><?php 
            echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['photo']->value['photo_title'], 30);
            ?>
</span>-->
        
        <a class="searchresult-photo" href="<?php 
            echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['photo']->value, 'view_item');
            ?>
" title="Tolpis barbata (mariluzpicado)">
            <?php 
            echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['photo']->value, 'size' => 'l', 'class' => 'photo-land', 'output' => 'html'), $_smarty_tpl);
            ?>


           <!-- <img alt="<?php 
            echo $_smarty_tpl->tpl_vars['photo']->value['photo_title'];
            ?>
" title="<?php 
            echo $_smarty_tpl->tpl_vars['photo']->value['photo_title'];
            ?>
" class="photo-land" id="photo_<?php 
            echo $_smarty_tpl->tpl_vars['photo']->value['photo_id'];
            ?>
" src="<?php 
            echo $_smarty_tpl->tpl_vars['baseurl']->value;
            ?>
/styles/cbv2.7/timthumb.php?src=<?php 
            echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['photo']->value, 'size' => 'o'), $_smarty_tpl);
            ?>
&h=150&w=150&zc=1"> -->
        <!-- <span class="photoname">
        <?php 
            if ($_smarty_tpl->tpl_vars['photo']->value['photo_title'] == 'no-tag') {
                ?>
no-title
        <?php 
            } else {
                ?>
        <?php 
                echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['photo']->value['photo_title'], 25);
                ?>

        <?php 
            }
            ?>
        </span> -->
        </a>
        <div class="hover">
			<a href="<?php 
            echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['photo']->value, 'view_item');
            ?>
" title="Tolpis barbata (mariluzpicado)">
				<span class="photo-title">
				<?php 
            if ($_smarty_tpl->tpl_vars['photo']->value['photo_title'] == 'no-tag') {
                ?>
no-title
		        <?php 
            } else {
                ?>
		        <?php 
                echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['photo']->value['photo_title'], 25);
                ?>

		        <?php 
            }
            ?>
        		</span>
				<span class="plus">plus</span>
			</a>
		</div>
    </div>

<?php 
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['display_type']->value == 'related_photos') {
            ?>
	<div class="relatedPhotos clearfix">
    	<a href="<?php 
            echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['photo']->value, 'view_item');
            ?>
"><?php 
            echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['photo']->value, 'output' => 'html', 'width' => '120', 'class' => 'photoThumbBox moveL', 'style' => 'margin-right:5px;'), $_smarty_tpl);
            ?>
</a>
        <div class="photoTitle" style="margin-bottom:5px;"><a href="<?php 
            echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['photo']->value, 'view_item');
            ?>
" title="<?php 
            echo $_smarty_tpl->tpl_vars['photo']->value['photo_title'];
            ?>
"><?php 
            echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['photo']->value['photo_title'], 15);
            ?>
</a></div>
        <span class="photoInfo"><?php 
            echo number_format($_smarty_tpl->tpl_vars['photo']->value['views']);
            ?>
 <?php 
            echo smarty_lang(array('code' => "views"), $_smarty_tpl);
            ?>
 <br/> <?php 
            echo $_smarty_tpl->tpl_vars['photo']->value['total_comments'];
            ?>
 <?php 
            echo smarty_lang(array('code' => "comments"), $_smarty_tpl);
            ?>
</span>
        <?php 
            echo show_rating(array('rating' => $_smarty_tpl->tpl_vars['photo']->value['rating'], 'total' => '10', 'class' => 'rating moveL'), $_smarty_tpl);
            ?>

    </div>
<?php 
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['display_type']->value == 'subscription') {
            ?>
	<div class="grid_view clearfix" style="width:auto; margin-right:4px;">
    	<a href="<?php 
            echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['photo']->value, 'view_item');
            ?>
"><?php 
            echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['photo']->value, 'output' => 'html', 'class' => 'photoThumbBox', 'width' => '110'), $_smarty_tpl);
            ?>
</a>
        <div class="photoTitle" style="margin:5px 0px; font:bold 11px Arial;">
        <a href="<?php 
            echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['photo']->value, 'view_item');
            ?>
" title="<?php 
            echo $_smarty_tpl->tpl_vars['photo']->value['photo_title'];
            ?>
"><?php 
            echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['photo']->value['photo_title'], 15);
            ?>
</a></div> 
        <?php 
            echo show_rating(array('rating' => $_smarty_tpl->tpl_vars['photo']->value['rating'], 'total' => '10', 'class' => 'rating'), $_smarty_tpl);
            ?>

        <div style="font-size:10px; margin:2px;"><?php 
            echo number_format($_smarty_tpl->tpl_vars['photo']->value['views']);
            ?>
 <?php 
            echo smarty_lang(array('code' => "views"), $_smarty_tpl);
            ?>
</div>
        <a href="<?php 
            echo $_smarty_tpl->tpl_vars['userquery']->value->profile_link($_smarty_tpl->tpl_vars['photo']->value);
            ?>
" style="font:bold 10px Arial; text-decoration:none;"><?php 
            echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['photo']->value['username'], 20);
            ?>
</a>
    </div>
<?php 
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['display_type']->value == "side_photos") {
            ?>
	<div style="display:inline-block; *display:inline; vertical-align:middle; padding:0 8px 5px 0px;">
    	<a href="<?php 
            echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['photo']->value, 'view_item');
            ?>
"><?php 
            echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['photo']->value, 'output' => 'html', 'width' => '82', 'class' => 'photoThumbBox'), $_smarty_tpl);
            ?>
</a>
        <div class="photoTitle" style="font:bold 10px Arial; margin:1px 0px">
        <a href="<?php 
            echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['photo']->value, 'view_item');
            ?>
" title="<?php 
            echo $_smarty_tpl->tpl_vars['photo']->value['photo_title'];
            ?>
"><?php 
            echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['photo']->value['photo_title'], 15);
            ?>
</a>
        </div>
   	<div class="watch_video_box_details">
        <span style="color:#666; font:normal 10px Arial;"><?php 
            echo smarty_lang(array('code' => 'views'), $_smarty_tpl);
            ?>
: <?php 
            echo number_format($_smarty_tpl->tpl_vars['photo']->value['views']);
            ?>
</span><br>
        <a style="font:bold 10px Arial; text-decoration:none;" href="<?php 
            echo $_smarty_tpl->tpl_vars['userquery']->value->profile_link($_smarty_tpl->tpl_vars['photo']->value);
            ?>
" title="<?php 
            echo $_smarty_tpl->tpl_vars['photo']->value['username'];
            ?>
" alt="<?php 
            echo $_smarty_tpl->tpl_vars['photo']->value['username'];
            ?>
"><?php 
            echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['photo']->value['username'], 12);
            ?>
</a>
	</div>        
    </div>
<?php 
        }
        if ($_smarty_tpl->tpl_vars['display_type']->value == "side_photos_viewed") {
            ?>
    <div style="display:inline-block; *display:inline; vertical-align:middle; padding:0 8px 5px 0px;">
        <a href="<?php 
            echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['photo']->value, 'view_item');
            ?>
"><?php 
            echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['photo']->value, 'output' => 'html', 'width' => "255", 'height' => "100", 'class' => 'cb_img_thum'), $_smarty_tpl);
            ?>
</a>
        <div class="photoTitle pull-left" style="font:bold 10px Arial; margin:1px 0px">
        <a href="<?php 
            echo $_smarty_tpl->tpl_vars['cbphoto']->value->photo_links($_smarty_tpl->tpl_vars['photo']->value, 'view_item');
            ?>
" title="<?php 
            echo $_smarty_tpl->tpl_vars['photo']->value['photo_title'];
            ?>
"><?php 
            echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['photo']->value['photo_title'], 15);
            ?>
</a>
        </div>
    <div class="watch_video_box_details pull-right">
        <span style="color:#666; font:normal 10px Arial;"><?php 
            echo smarty_lang(array('code' => 'views'), $_smarty_tpl);
            ?>
: <?php 
            echo number_format($_smarty_tpl->tpl_vars['photo']->value['views']);
            ?>
</span>
    </div>        
    </div>
<?php 
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['display_type']->value == "channel_page") {
            ?>
	<li class="itemBox" onclick="loadObject(this,'photos','<?php 
            echo $_smarty_tpl->tpl_vars['photo']->value['photo_id'];
            ?>
','viewingArea')">
    	<?php 
            echo get_image_file(array('details' => $_smarty_tpl->tpl_vars['photo']->value, 'output' => 'html', 'width' => '110', 'height' => '64', 'size' => 'm', 'style' => 'display:block;margin:0px auto;'), $_smarty_tpl);
            ?>

    </li> <!-- itemBox <?php 
            echo $_smarty_tpl->tpl_vars['photo']->value['photo_key'];
            ?>
 end -->
<?php 
        }
        ?>





<?php 
    }
Exemplo n.º 4
0
/**
 * Function used to show rating
 * @inputs
 * class : class used to show rating usually rating_stars
 * rating : rating of video or something
 * ratings : number of rating
 * total : total rating or out of
 */
function show_rating($params)
{
    $class = $params['class'] ? $params['class'] : 'rating_stars';
    $rating = $params['rating'];
    $ratings = $params['ratings'];
    $total = $params['total'];
    $style = $params['style'];
    if (empty($style)) {
        $style = config('rating_style');
    }
    //Checking Percent {
    if ($total <= 10) {
        $total = 10;
    }
    $perc = $rating * 100 / $total;
    $disperc = 100 - $perc;
    if ($ratings <= 0 && $disperc == 100) {
        $disperc = 0;
    }
    $perc = $perc . '%';
    $disperc = $disperc . "%";
    switch ($style) {
        case "percentage":
        case "percent":
        case "perc":
        default:
            $likeClass = "UserLiked";
            if (str_replace('%', '', $perc) < '50') {
                $likeClass = 'UserDisliked';
            }
            $ratingTemplate = '<div class="' . $class . '">
                                                                <div class="ratingContainer">
                                                                        <span class="ratingText">' . $perc . '</span>';
            if ($ratings > 0) {
                $ratingTemplate .= ' <span class="' . $likeClass . '">&nbsp;</span>';
            }
            $ratingTemplate .= '</div>
                                                        </div>';
            break;
        case "bars":
        case "Bars":
        case "bar":
            $ratingTemplate = '<div class="' . $class . '">
                                <div class="ratingContainer">
                                        <div class="LikeBar" style="width:' . $perc . '"></div>
                                        <div class="DislikeBar" style="width:' . $disperc . '"></div>
                                </div>
                        </div>';
            break;
        case "numerical":
        case "numbers":
        case "number":
        case "num":
            $likes = round($ratings * $perc / 100);
            $dislikes = $ratings - $likes;
            $ratingTemplate = '<div class="' . $class . '">
                                <div class="ratingContainer">
                                        <div class="ratingText">
                                                <span class="LikeText">' . $likes . ' Likes</span>
                                                <span class="DislikeText">' . $dislikes . ' Dislikes</span>
                                        </div>
                                </div>
                        </div>';
            break;
        case "custom":
        case "own_style":
            $file = LAYOUT . "/" . $params['file'];
            if (!empty($params['file']) && file_exists($file)) {
                // File exists, lets start assign things
                assign("perc", $perc);
                assign("disperc", $disperc);
                // Likes and Dislikes
                $likes = floor($ratings * $perc / 100);
                $dislikes = $ratings - $likes;
                assign("likes", $likes);
                assign("dislikes", $dislikes);
                Template($file, FALSE);
            } else {
                $params['style'] = "percent";
                return show_rating($params);
            }
            break;
    }
    /* $rating = '<div class="'.$class.'">
       <div class="stars_blank">
       <div class="stars_filled" style="width:'.$perc.'">&nbsp;</div>
       <div class="clear"></div>
       </div>
       </div>'; */
    return $ratingTemplate;
}
Exemplo n.º 5
0
    <?php 
}
?>
</div>
<?php 
if (User::is_registered()) {
    ?>
    <?php 
    if (AmpConfig::get('ratings')) {
        ?>
    <div id="rating_<?php 
        echo intval($tvshow->id);
        ?>
_tvshow" style="display:inline;">
        <?php 
        show_rating($tvshow->id, 'tvshow');
        ?>
    </div>
    <?php 
    }
    ?>
    <?php 
    if (AmpConfig::get('userflags')) {
        ?>
    <div style="display:table-cell;" id="userflag_<?php 
        echo $tvshow->id;
        ?>
_tvshow">
            <?php 
        Userflag::show($tvshow->id, 'tvshow');
        ?>
Exemplo n.º 6
0
            <?php 
            if (Stream_Playlist::check_autoplay_append()) {
                ?>
                <?php 
                echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $album->get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $album->id);
                ?>
            <?php 
            }
            ?>
        <?php 
        }
        ?>
        <?php 
        echo Ajax::button('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'play_full_' . $album->id);
        ?>
        </div>
        <?php 
        if (AmpConfig::get('ratings') && Access::check('interface', '25')) {
            echo "<div id=\"rating_" . $album->id . "_album\">";
            show_rating($album->id, 'album');
            echo "</div>";
        }
        ?>
    </div>
    <?php 
    }
}
?>

<?php 
UI::show_box_bottom();
Exemplo n.º 7
0
        ?>
 rw-valign-middle rw-size-small"><?php 
        if ($type == 'star') {
            echo '<div class="rw-action-area rw-clearfix"><ul class="rw-ui-stars">';
            $tmp_num = $votes > 0 ? round($rate / $votes * 2) : 0;
            $len = ($tmp_num - $tmp_num % 2) / 2;
            for ($i = 0; $i < $len; $i++) {
                echo '<li class="rw-ui-star-selected"></li>';
            }
            if ($tmp_num % 2 == 1) {
                echo '<li class="rw-ui-star-half-selected"></li>';
                $len++;
            }
            for ($i = $len; $i < $stars_num; $i++) {
                echo '<li></li>';
            }
            echo '</ul></div>';
        } else {
            if ($rate >= 0) {
                echo '<span class="rw-ui-like"><i class="rw-ui-like-icon"></i></span>';
            } else {
                echo '<span class="rw-ui-dislike"><i class="rw-ui-dislike-icon"></i></span>';
            }
        }
        ?>
</div>
<?php 
    }
}
show_rating($VARS);
Exemplo n.º 8
0
<?php

include dirname(__FILE__) . '/../modeles/evenement/rating.php';
include dirname(__FILE__) . '/../modeles/evenement/evenement.php';
$mon_event = show_event();
//var_dump($mon_event);
/*déclaration variables !!!*/
$rating = show_rating($_GET['id']);
$sum = $rating['0']['SUM(valeur)'];
$count = $rating['0']['COUNT(valeur)'];
function show_adr($adr, $dep, $ville)
{
    $mon_adresse = $adr . ", " . $dep . ", " . $ville;
    return $mon_adresse;
}
$resultat_adr = recuperer_adr();
foreach ($resultat_adr as $n) {
    $tab_adr[] = show_adr($n[12], $n[11], $n[10]);
}
print_r($tab_adr);
//show_adr($mon_event[12], $mon_event[11], $mon_event[10]);
$verif_user_vote = verif_user($_SESSION['prenom'], $_GET['id']);
//print_r($verif_user_vote[0]);
/* calcul de la moyenne du rating*/
if ($count == 0) {
    $rating_star = 0;
} else {
    $arrondi = round($sum / $count);
    $rating_star = intval($arrondi);
}
/*verification + ajout d'un vote */
Exemplo n.º 9
0
            <?php 
            echo Ajax::button('?page=stream&action=directplay&object_type=video&object_id=' . $video->id, 'play', T_('Play'), 'play_album_' . $video->id);
            ?>
            <?php 
            if (Stream_Playlist::check_autoplay_append()) {
                ?>
                <?php 
                echo Ajax::button('?page=stream&action=directplay&object_type=video&object_id=' . $video->id . '&append=true', 'play_add', T_('Play last'), 'addplay_video_' . $video->id);
                ?>
            <?php 
            }
            ?>
        <?php 
        }
        ?>
        </div>
        <?php 
        if (AmpConfig::get('ratings') && Access::check('interface', '25')) {
            echo "<div id=\"rating_" . $video->id . "_video\">";
            show_rating($video->id, 'video');
            echo "</div>";
        }
        ?>
    </div>
    <?php 
    }
}
?>

<?php 
UI::show_box_bottom();
Exemplo n.º 10
0
        ?>
 rw-valign-middle rw-size-small"><?php 
        if ($type == "star") {
            echo '<div class="rw-action-area rw-clearfix"><ul class="rw-ui-stars">';
            $tmp_num = $votes > 0 ? round($rate / $votes * 2) : 0;
            $len = ($tmp_num - $tmp_num % 2) / 2;
            for ($i = 0; $i < $len; $i++) {
                echo '<li class="rw-ui-star-selected"></li>';
            }
            if ($tmp_num % 2 == 1) {
                echo '<li class="rw-ui-star-half-selected"></li>';
                $len++;
            }
            for ($i = $len; $i < $stars_num; $i++) {
                echo '<li></li>';
            }
            echo '</ul></div>';
        } else {
            if ($rate >= 0) {
                echo '<span class="rw-ui-like"><i class="rw-ui-like-icon"></i></span>';
            } else {
                echo '<span class="rw-ui-dislike"><i class="rw-ui-dislike-icon"></i></span>';
            }
        }
        ?>
</div>
<?php 
    }
}
show_rating($vars);
Exemplo n.º 11
0
            $status = skype_status($vol->skypeid);
            if ($status != $vol->status) {
                $vol->status = $status;
                $vol->last_check = time();
                if (online($vol->status)) {
                    $vol->last_online = time();
                }
                vol_update_status($vol);
            }
            $image = button_image($status);
            echo "\n        <script type=\"text/javascript\" src=\"http://download.skype.com/share/skypebuttons/js/skypeCheck.js\"></script>\n        <img src=images/help/{$image}><p>\n    ";
            echo "<table class=box cellpadding=8 width=100%><tr><td width=40%>";
            if (online($status)) {
                live_contact($vol);
            }
        }
        skype_call_button($vol);
        email_contact($vol);
        echo "</td></tr></table><p>\n";
        echo "<table class=box cellpadding=8 width=100%><tr><td>";
        $rating = rating_vol_auth($vol->id, $uid);
        if (!$rating) {
            $rating = new StdClass();
            $rating->rating = -1;
            $rating->comment = "";
        }
        show_rating($vol, $rating);
        echo "</td></tr></table>\n";
        page_tail();
    }
}
Exemplo n.º 12
0
    <?php 
}
?>
</div>
<?php 
if (User::is_registered()) {
    ?>
    <?php 
    if (AmpConfig::get('ratings')) {
        ?>
    <div id="rating_<?php 
        echo intval($podcast->id);
        ?>
_podcast" style="display:inline;">
        <?php 
        show_rating($podcast->id, 'podcast');
        ?>
    </div>
    <?php 
    }
    ?>
    <?php 
    if (AmpConfig::get('userflags')) {
        ?>
    <div style="display:table-cell;" id="userflag_<?php 
        echo $podcast->id;
        ?>
_podcast">
            <?php 
        Userflag::show($podcast->id, 'podcast');
        ?>