Example #1
0
function mx_sendnotice($level, $msg, $page = '', $option = '', $action = '', $section = '')
{
    global $notices;
    $notices[$level][] = array('text' => $msg, 'link' => mx_actionlink($page, $option, $action, $section));
}
Example #2
0
function mx_showmediapage($id)
{
    global $mxuser;
    $id = preg_replace('%[^0-9]%', '', $id);
    // filter fake media ids
    $media = $mxuser->getmediainfo($id);
    if (!$media) {
        __('Sorry, this media could not be found.');
        return;
    }
    $fanship = $mxuser->getfanship($media->owner_id, $id);
    if ($media->status == MXMEDIAREADY || $media->type == MXMEDIABASEBUNDLE && $fanship != null) {
        __('This media has not been released yet');
        return;
    }
    mx_medialist($media, $fanship, true);
    foreach ($media->bundles as $bundle) {
        $bfanship = $mxuser->getfanship($bundle->owner_id, $bundle->id);
        mx_medialist($bundle, $bfanship, true);
    }
    $dbuser = $mxuser->getuserinfo($media->owner_id);
    if ($dbuser->status == MXACCTDISABLED) {
        __('Media is unavailable.');
        return;
    }
    if ($dbuser->acctype == MXACCOUNTFAN) {
        echo sprintf(_('This media is private' . 'and belongs to this %s.'), mx_actionlink('fans', 'fanprof', $id));
        return;
    }
    if (!$dbuser || $dbuser->status == MXACCTDISABLED) {
        mx_optiontitle('error', _('Media unavailable.'));
        return;
    }
    mx_optionsubtitle('→ ' . $media->title);
    $authflds = $mxuser->getauthorizedfields($dbuser->id);
    $authgrps = $mxuser->getauthorizedgroups($authflds);
    $media->artist = $dbuser;
    //echo mx_mediadata($media,$fanship);
    $section = '';
    if (!$authgrps || !$authflds) {
        __('No information available.');
        return;
    }
    $custpage = 'basicmediatemplate';
    mx_showcustompage($custpage, $dbuser, $media);
    if ($media->type == MXMEDIAREGULARBUNDLE) {
        mx_fbaction('musxpand:examine?bundle=' . urlencode(mx_actionurl('media', 'medprof', $id)));
    }
    if ($_GET['z']) {
        ?>
		<script type='text/javascript'>
		$(window).ready(function() {
			play(0);
		});
		</script>
		<?php 
    }
}
Example #3
0
function mx_optionlink($page, $option, $section = '')
{
    global $mx_ctxmenu;
    return mx_actionlink($page, $option, '', $section = '');
}