Exemplo n.º 1
0
                    <div class="contact-counter-metric">
                        <span class="contact-counter-big"><?php 
_e('Total contact ');
?>
</span>
                        <?php 
if (Params::getParam('id') != '') {
    ?>
                        <span class="contact-counter-value"><?php 
    echo cc_contacts_by_listing(Params::getParam('id'));
    ?>
</span>
                        <?php 
} else {
    ?>
                        <span class="contact-counter-value"><?php 
    echo ModelContactCounter::newInstance()->getTotalContacts();
    ?>
</span>
                        <?php 
}
?>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
Exemplo n.º 2
0
function cc_contacts_by_user($userId)
{
    if ($userId != '' && is_numeric($userId)) {
        return ModelContactCounter::newInstance()->getTotalContactsByUser($userId);
    }
    return 0;
}