Esempio n. 1
0
function mx_xmlshow($msgid, $like = '0', $dislike = '0')
{
    global $mxdb, $mxuser;
    if ($like || $dislike) {
        if ($like && $dislike) {
            return;
        }
        $numlikes = $mxdb->setlikes($mxuser->id, $msgid, $like, $dislike);
        echo 'var totlikes=' . $numlikes->likes . '; var totdislikes=' . $numlikes->dislikes . '; //' . $like . ' / ' . $dislike;
        return;
    }
    $comments = $mxdb->getcomments($msgid);
    if (!$comments) {
        __('No comments.');
        return;
    }
    $str = '<table class="wcomment">';
    while ($comment = $mxdb->getcomments($msgid, $comments)) {
        $comment->mylikes = $mxuser->getlikes($comment->msgid);
        $str .= '<tr class="wcommentline">';
        $str .= '<td class="showspic"><img src="' . mx_fanpic($comment->authid) . '" /></td>';
        $str .= '<td>';
        $str .= $comment->body;
        $str .= '<div class="wclikes">';
        $str .= mx_likeicon($comment->msgid, MXLIKEIT, $comment->mylikes, $mxuser->id) . '<div name="ln_' . $comment->msgid . '">' . sprintf('%d', $comment->likes ? $comment->likes : 0) . '</div>' . mx_likeicon($comment->msgid, MXDISLIKEIT, $comment->mylikes, $mxuser->id) . '<div name="dn_' . $comment->msgid . '">' . sprintf('%d', $comment->dislikes ? $comment->dislikes : 0) . '</div>';
        $str .= '</div>';
        // wlikes
        $str .= '<div class="wcommentdate">' . mx_difftime($comment->date) . '</div>';
        $str .= '</td>';
        $str .= '</tr>';
    }
    $yrcomment = array(1, _('Your comment'), 'memo', 1, null, _('Speak your heart...'));
    $str .= '<tr class="wcommentline"><!-- <td class="showspic"><img src="' . mx_fanpic($mxuser->id) . '" /></td> -->' . '<td colspan="2">' . mx_formfield('mc_' . $msgid, '', $yrcomment) . '<br/>' . '<input class="sendcomment" type="button" onclick="sendcomment(' . $msgid . ');" value="' . _('Send') . '">' . '</td>' . '</tr>';
    $str .= '</table>';
    $str .= '<a class="close" href="javascript:switchcomments(\'' . $msgid . '\');">' . mx_icon('close', 'Close', '16px') . '</a>';
    echo $str;
}
Esempio n. 2
0
function mx_videoplayer($link, $id, $w, $h)
{
    return '<video id="track_' . $id . '" src="' . $link . '"' . ($w ? ' width="' . $w . '"' : '') . ($h ? ' height="' . $h . '"' : '') . '></video>' . '<div class="status">' . '<a class="playbutton" href="javascript:playPause(\'track_' . $id . '\');">' . mx_icon('playbutton', 'listen', 16, 'i_track_' . $id) . '</a>' . '<div id="a_track_' . $id . '" class="playstatus"></div>' . '<div class="playbar" id="b_track_' . $id . '">' . '<div class="played" id="p_track_' . $id . '"></div>' . '</div></div>';
}
Esempio n. 3
0
function mx_prices()
{
    global $windowedpages;
    $prices = mx_windowedpage('mxprices', _('MusXpand prices explained.'), true, $windowedpages);
    echo '<div class="dummies"><a href="javascript:showwindow(\'wp_mxprices\');">' . mx_icon('musxpand-prices-new') . '</a></div>';
    echo $prices['div'];
}
Esempio n. 4
0
 function picture($size = 'large')
 {
     $str = '<img title="' . $this->getname() . ' - ' . _('See Your Page') . '" tag="' . $this->id . '" class="profilepic pictooltip" style="cursor:pointer;" src="' . mx_fanpic($this->id, $size, $this->gender, is_artist()) . '"' . ($this->id ? 'onclick="window.location=\'' . mx_pageurl('account') . '\';"' : MXICONCLICK) . '>';
     if ($this->picture == 'fb') {
         return '<div class="userpic">' . '<div class="pending">' . mx_icon('working.gif', 'updating', '16px') . '</div>' . $str . '<script>$(window).load(function() {savefbpics();});</script>' . '</div>';
     }
     return '<div class="userpic"' . ($this->id && $this->status >= MXACCTSETUP ? ' onmouseover="showbutton(\'profilepic\');"' . ' onmouseout="hidebutton(\'profilepic\');"' : '') . '>' . '<div id="profilepic" class="picbutton" onclick="window.location=\'' . mx_actionurl('account', 'profile', 'edit', 'picinfo') . '\';">' . _('Update Pic') . '</div>' . $str . '</div>';
 }
Esempio n. 5
0
function mx_minimenu()
{
    global $mx_minimenu, $mxuser;
    $page = mx_secureword($_GET['p']);
    echo '<div class="minimenu"><ul>';
    foreach ($mx_minimenu as $action => $actiondetails) {
        if (!is_array($actiondetails)) {
            echo '<li>&nbsp;&nbsp;&nbsp;</li>';
        } else {
            if (!$actiondetails[0] && !is_logged() && $page != 'account' || $actiondetails[0] == 2 || $actiondetails[0] > 0 && $actiondetails[0] < 3 && is_logged() || $actiondetails[0] >= 3 && $mxuser->status >= MXACCTSETUP) {
                echo '<li>' . mx_icon($action, $actiondetails[1], 48, 'act_' . $action, $action . 'hover') . '</li>';
            }
        }
    }
    echo '</ul></div>';
}
Esempio n. 6
0
function mx_mnfblikeus($page, $option, $action)
{
    global $mxuser, $facebook;
    echo '<div class="fblikeus">';
    if (!is_pagelike() && !$mxuser->fbdata['user_id']) {
        echo mx_icon('click_like', _('Like us!'));
    } else {
        if (!is_pagelike()) {
            echo mx_icon('click_like_registered', _('Like us!'));
        } else {
            echo mx_icon('click_liked', _('Like us!')) . '<br/><a target=_blank href="' . mx_actionurl('account', 'register', '', '', '', '', '', true) . '">' . mx_icon('click_register', _('Register!')) . '</a>';
            ?>
		<!--
		<script>
		function checkappstatus() {
			FB.getLoginStatus(function(response) {
				if (response.status === 'connected') {
					window.location='<?php 
            echo mx_pageurl('main');
            ?>
';
				} else {
					setTimeout('checkappstatus();',2000);
				}
			},true);
		}
		setTimeout('checkappstatus();',2000);
		</script>
		-->
		<?php 
        }
    }
    echo '</div>';
    //echo print_r($mxuser,true);
}