function mx_showonemedia($user) { global $mxuser; $media = $mxuser->getonemedia($user->id); $media->hashdir = $user->hashdir; //error_log(print_r($media,true)); if ($media) { $fanship = $mxuser->getfanship($user->id, $media->id); mx_medialist($media, $fanship); $str = '<div class="mediaplayable">'; $str .= '<div class="mediabuttons">' . '<div id="player">' . $media->buttons . '</div>' . '</div>'; $str .= '<div class="featartname">' . strtoupper(mx_getartistname($user)) . '</div>'; $str .= '<div class="mediatitle">' . $media->title . '</div>'; $str .= '<div class="mediabundle">' . sprintf(_('<i>From</i> <b>%s</b>'), $media->bundletitle) . '</div>'; $str .= $media->content; $str .= '</div>'; // mediaplayable return $str; } }
function mx_onefav($fav) { global $mxuser; switch ($fav->favtype) { case MXFAVUSER: $user = $mxuser->getuserinfo($fav->favid); $link = mx_actionurl('artists', 'artprof', $fav->favid); $pic = mx_artpic($fav->favid, 'square', MXSEXMALE); $class = 'artistpic'; $alt = mx_getartistname($user); break; case MXFAVMEDIA: $media = $mxuser->getmediainfo($fav->favid); $fanship = $mxuser->getfanship($media->owner_id, $media->id); mx_medialist($media, $fanship); $link = mx_actionurl('media', 'medprof', $fav->favid); $pic = $media->pic; $alt = $media->title; $class = 'bundlepic'; break; default: $pic = 'xx'; $link = ''; $alt = ''; $class = ''; } return '<div class="favorite" tag="' . $fav->id . '"' . ' onmouseover="$(this).find(\'.favdel\').show();"' . ' onmouseout="$(this).find(\'.favdel\').hide();">' . '<a href="' . $link . '" title="' . $alt . ' - ' . _('See Page') . '" class="pictooltip">' . '<img tag="' . $fav->favid . '" class="' . $class . '" src="' . $pic . '" alt="' . $alt . '"/>' . '</a>' . '<div class="favdel"><div' . ' onclick="return delfav(' . $fav->id . ');"' . ' onmouseover="$(this).css(\'background\',\'black\');"' . ' onmouseout="$(this).css(\'background\',\'white\');"' . '>X</div></div>' . '</div>'; }
function mx_mnregister($page, $option, $action) { global $me, $facebook, $mxdb, $mxuser, $errors, $frmvalues, $referrer; if ($action == 'signin') { mx_mnsignin($page, 'signin', $action); return; } $invite = mx_secureword($_REQUEST['i']); //$redir=mx_secureredir($_GET['r']); $redir = ''; // redirection after registering need to go through setup first -> hard to handle... if ($action == "" && $mxuser->id) { echo sprintf(_('Welcome back, %s'), $mxuser->firstname); return; } //error_log('mnregister:p='.$page.' o='.$option.' a='.$action.' mx='.$mxuser->id); // if ($_GET['session']) $action='fblogin'; switch ($action) { /* case 'fblogin': // create account if not existing switch (mx_checkfbuser(true)) { case -1: echo _('Sign-in using Facebook worked,<br/>but your profile couldn\'t be created.'); break; case 0: echo _('Sign-in using Facebook failed.'); break; case 1: echo _('Welcome back, ').$me['name']; break; case 2: echo _('Welcome on board, ').$me['name']; break; } break;*/ case 'confirmation': if ($mxuser->id) { switch ($mxuser->status) { case MXACCTDISABLED: $errors['c'] = _('Account Unavailable.'); break; case MXACCTUNCONFIRMED: $errors['c'] = _('Code Incorrect'); break; default: $errors['c'] = _('Account Already Activated.'); break; } } else { $errors['c'] = _('Code Incorrect.'); } case 'register': case 'waitconfirm': case 'sendagain': //echo 'login:'******'login'].'<br/>'; //echo 'password:'******'password'].'<br/>'; //mx_warning('Please only use Facebook to register for now...'); if ($mxuser->id || $errors['c']) { $buttons = array('+register' => _('Submit'), 'sendagain' => 'Send Again', 'clear' => _('Clear')); $confirmform = array('activation', 0, _('Activate Your Account'), '', $buttons, array('confirmlabel' => array(-1, _('Confirmation Requested'), _('<b>Check your email for a message from MusXpand</b>, and enter below the confirmation code you will' . ' find in that email. We\'ll then help you complete your account setup.')), 'c' => array(1, _('Confirmation Code:'), 'text', 40), 'a' => array(1, 'confirmation', 'hidden'))); if (!(MXDEFFEATURES & MXFTNEWLOGIN)) { mx_showform($confirmform, $frmvalues, true, true, $errors); } else { $signerrormsg = ''; $loginclass = ''; if ($errors['c']) { $loginclass = 'class="signerror"'; $signerrormsg = $errors['c']; } $terms = mx_windowedpage('terms', _('Terms'), true); echo $terms['div']; $priv = mx_windowedpage('privacy', _('Privacy'), true); echo $priv['div']; ?> <div class="loginwrapper"><div> <div class="loginbutton confirmbutton"> <div class="loginbg"></div> <div class="loginform"> <img src="<?php echo mx_option('siteurl') . '/images/general/musxpand-logo-200x200.png'; ?> "/> <br/> <?php echo mx_fbloginbutton('Login with Facebook', 'account', 'register', 'fb'); ?> <form class="confirmform" method="POST" action="<?php echo mx_optionurl_secure('account', 'register'); ?> "> <ul> <li><input <?php echo $loginclass; ?> id="login" type="text" name="c" size="25" placeholder="<?php __('Confirmation Code'); ?> " value="<?php echo $frmvalues['c']; ?> "></li> <li><div class="signerror"><?php echo $signerrormsg; ?> </div></li> </ul> <input type="hidden" name="a" value="confirmation"> <input type="submit" name="confirmation" value="<?php __('Activate'); ?> " onclick="this.form['a'].value='confirmation';blackout('<?php __('Please wait...'); ?> ');submit();"> <input type="button" name="sendagain" value="<?php __('Send Again'); ?> " onclick="this.form['a'].value='sendagain';blackout('<?php __('Please wait...'); ?> ');submit();"> <br/> </form> <div class="logincopy"><?php echo '© 2010-2012, MusXpand.'; ?> </div> <div class="loginterms"><?php echo $terms['str'] . ' / ' . $priv['str']; ?> </div> </div> </div> </div></div> <?php } break; } // ... // ... default: if (MXINVITEONLY) { if (!$invite) { mx_showhtmlpage('inviteonly'); return; } if ($invite && $referrer == -1) { mx_showhtmlpage('nomoreinvites'); return; } } $buttons = array('+register' => _('Submit'), 'clear' => _('Clear')); $refinfo = ''; if ($invite) { //error_log(print_r($mxuser,true)); $refuser = $mxuser->getuserinfo($referrer); //error_log(print_r($mxuser,true)); $refinfo = '<div class="referrer"><div class="refdetails">' . _('Invited by') . '<br/><div class="friend">' . '<img class="dirpic" src="' . mx_fanpic($referrer, 'square', $refuser->gender, $refuser->acctype == MXACCOUNTARTIST) . '"/>' . '<br/>' . mx_getartistname($refuser) . '</div></div></div>'; } $registerform = array('register', 0, _('Register Your Account'), sprintf(_('To easily register using your facebook account, simply use the Facebook button here: %s.' . '<br/>If you have no Facebook account or don\'t want ' . 'to use it with MusXpand, please fill in your email below instead. ' . 'We\'ll send you a confirmation message, so that ' . 'you can complete your account registration with your information.<br/><br/>' . '<b>If you have already created an account on MusXpand, please %s instead</b>.'), mx_fbloginbutton(_('Register'), 'account', 'register', 'fb', $redir, $invite), mx_optionlink('account', 'signin')), $buttons, array('basic' => array(-1, _('Basic Information'), _('Please only fill in your email if you don\'t register' . ' using Facebook') . $refinfo), 'email' => array(1, _('Email:'), 'text', 40), 'a' => array(1, 'register', 'hidden'), 'i' => array(1, $invite, 'hidden'))); $location = mx_locate(); if (!$frmvalues) { $frmvalues = array(); } /*if ($location) { $values=array( 'city' => iconv('ISO-8859-1','utf-8',$location->city), 'state' => mx_region($location), 'country' => $location->countryCode ); }*/ //echo _('Welcome to the register page...').'<br/>'; if (!(MXDEFFEATURES & MXFTNEWLOGIN)) { mx_showform($registerform, $frmvalues, true, true, $errors); } else { $signerrormsg = ''; $passwdclass = ''; $loginclass = ''; if ($errors['email']) { $loginclass = 'class="signerror"'; if ($action == 'confirmation') { $signerrormsg = _('Invalid confirmation code'); } else { $signerrormsg = $errors['email']; } } if ($errors['password']) { $passwdclass = 'class="signerror"'; if ($action == 'signin') { $signerrormsg = _('Wrong email/password'); } } $terms = mx_windowedpage('terms', _('Terms'), true); echo $terms['div']; $priv = mx_windowedpage('privacy', _('Privacy'), true); echo $priv['div']; ?> <div class="loginwrapper"><div> <div class="loginbutton registerbutton"> <div class="loginbg"></div> <div class="loginform"> <img src="<?php echo mx_option('siteurl') . '/images/general/musxpand-logo-200x200.png'; ?> "/> <br/> <?php echo mx_fbloginbutton('Login with Facebook', 'account', 'register', 'fb'); ?> <form class="registerform" method="POST" action="<?php echo mx_optionurl_secure('account', 'register'); ?> "> <ul> <li><input <?php echo $loginclass; ?> id="email" type="text" name="email" size="25" placeholder="<?php __('Email Address'); ?> " value="<?php echo $frmvalues['email']; ?> "></li> <li><input <?php echo $passwdclass; ?> id="pass" type="password" name="password" size="25" placeholder="<?php __('Password'); ?> "></li> <li><div class="signerror"><?php echo $signerrormsg; ?> </div></li> </ul> <input type="hidden" name="a" value="signin"> <input type="submit" name="signin" value="<?php __('Sign in'); ?> " onclick="this.form['a'].value='signin';blackout('<?php __('Please wait...'); ?> ');submit();"> <input type="button" name="register" value="<?php __('Sign up'); ?> " onclick="this.form['a'].value='register';blackout('<?php __('Please wait...'); ?> ');submit();"> <br/> <input class="forgot" type="button" name="forgot" value="<?php __('I forgot my password'); ?> " onclick="this.form['a'].value='forgot';blackout('<?php __('Please wait...'); ?> ');submit();"> </form> <div class="logincopy"><?php echo '© 2010-2012, MusXpand.'; ?> </div> <div class="loginterms"><?php echo $terms['str'] . ' / ' . $priv['str']; ?> </div> </div> </div> </div></div> <?php } } //error_log('end mnregister'); }
function mx_sitetitle() { global $mxuser; $page = $_GET['p']; $option = $_GET['o']; $action = $_GET['a']; if (!$page) { echo 'MusXpand - ' . mx_option('title'); return; } if (!$option) { echo 'MusXpand - ' . mx_pagename($page); return; } if (($page == 'artists' && $option == 'artprof' || $page == 'fans' && $option == 'fanprof') && $action) { $user = $mxuser->getuserinfo($action); if ($option == 'fanprof') { echo sprintf(_('%s - MusXpand'), mx_getname($user)); } else { echo sprintf(_('%s - MusXpand'), mx_getartistname($user)); } return; } else { if ($page == 'media' && $option == 'medprof') { $media = $mxuser->getmediainfo($action); echo sprintf(_('%s by %s - MusXpand'), $media->title, $media->artistname); return; } } echo 'MusXpand - ' . mx_pagename($page) . ' - ' . mx_optionname($page, $option); }
function mx_randminipics() { global $mxdb; $artsqr = $mxdb->artslist('status>=' . MXACCTSETUP); // random for ($i = 0; $i < $artsqr['count']; $i++) { $arts = $mxdb->artslist(null, $artsqr['mxq']); if ($arts && $arts->picture == 'local') { echo '<a href="' . mx_actionurl('artists', 'artprof', $arts->id) . '">'; echo '<img tag="' . $arts->id . '" class="minipic pictooltip" src="' . mx_artpic($arts->id, 'square', $arts->gender) . '"' . ' title="' . htmlentities(mx_getartistname($arts)) . ' - ' . ($arts->shortbio ? htmlentities($arts->shortbio) : _('No Description')) . '">'; echo '</a>'; } } }
function mx_mncart($page, $option, $action) { global $mxuser, $prodtypes, $mxdb, $prodprice; $prodlist = array(); $progress = $mxuser->cart->progress; if ($mxuser->cart->lines) { foreach ($mxuser->cart->lines as $line) { //if ($mxuser->cart->orderinfo || $mxuser->cart->orderconfirm) if ($mxuser->cart->progress > 1) { $line->select = '<img height="12px" src="' . mx_iconurl('okmark') . '">'; } else { $line->select = '<input type="checkbox" name="cartline[]" value="' . $line->id . '">'; } $line->proddesc = mx_proddesc($line); /*if ($line->prodtype==MXARTSUB) { $user=$mxuser->getuserinfo($line->prodref); $line->prodref='<div class="cartline"><img class="cartpic" src="'.mx_fanpic($user->id).'" /> '.mx_getartistname($user).'</div>'; }*/ $line->prodvar = $prodtypes[$line->prodtype][1][$line->prodvar]; $line->prodtype = $prodtypes[$line->prodtype][0]; $prodlist['cart'][] = $line; } } if ($mxuser->cart->wishes) { foreach ($mxuser->cart->wishes as $line) { $line->select = '<input type="checkbox" name="wishline[]" value="' . $line->id . '">'; $line->proddesc = mx_proddesc($line); /*if ($line->prodtype==MXARTSUB) { $user=$mxuser->getuserinfo($line->prodref); $line->prodref=mx_getartistname($user); }*/ $line->prodvar = $prodtypes[$line->prodtype][1][$line->prodvar]; $line->prodtype = $prodtypes[$line->prodtype][0]; $prodlist['wishlist'][] = $line; } } if ($mxuser->cart->items > 0) { $contshoppinglabel = _('Continue Shopping'); } else { $contshoppinglabel = _('Go Shopping'); } $yourehere = _('** YOU\'RE HERE **'); $progresstable = '<table class="form progress"><tr class="top">' . '<td class="' . ($progress == 1 ? 'current' : 'done') . '">' . _('Shopping Cart') . '</td>' . '<td' . ($progress > 1 ? ' class="done"' : ' class="todo"') . '>→</td>' . '<td class="' . ($progress == 2 ? 'current' : ($progress < 2 ? 'next' : 'done')) . '">' . _('Shipping/Billing') . '</td>' . '<td' . ($progress > 2 ? ' class="done"' : ' class="todo"') . '>→</td>' . '<td class="' . ($progress == 3 ? 'current' : ($progress < 3 ? 'next' : 'done')) . '">' . _('Order Review') . '</td>' . '<td' . ($progress > 3 ? ' class="done"' : ' class="todo"') . '>→</td>' . '<td class="' . ($progress == 4 ? 'current' : 'next') . '">' . _('Order Confirmation') . '</td>' . '<td class="last"></td>' . '</tr><tr class="bottom">' . '<td>' . ($progress == 1 ? $yourehere : '') . '</td>' . '<td></td>' . '<td>' . ($progress == 2 ? $yourehere : '') . '</td>' . '<td></td>' . '<td>' . ($progress == 3 ? $yourehere : '') . '</td>' . '<td></td>' . '<td>' . ($progress == 4 ? $yourehere : '') . '</td>' . '<td class="last"></td>' . '</tr></table>'; if ($mxuser->cart->err) { $progresstable .= mx_warningstr(implode('<br/>', $mxuser->cart->err)); } if ($mxuser->cart->info) { $progresstable .= mx_infomsgstr($mxuser->cart->info); } //echo $progresstable; if ($mxuser->cart->orderinfo) { // checkcout confirmation $ckoutbuttons = array('canckout' => _('Cancel Checkout'), 'confckout' => _('Confirm PAYPAL Payment')); $cartlist = array('cart' => array('select' => array(0, '', 'text', 3), 'prodtype' => array(0, _('Item'), 'text', 20), 'proddesc' => array(0, _('Description'), 'html', 30), 'prodvar' => array(0, _('Type'), 'text', 20), 'price' => array(0, _('Price'), 'price', 10))); $salesterms = mx_windowedpage('salesterms', _('Terms & Conditions')); $ckoutlist = array('checkout', 0, _('Checkout Review Page'), $progresstable, $ckoutbuttons, array('cart' => array(-1, _('Checking out these products'), _('The following items are currently in your cart')), 'cartcontent' => array(-2, $cartlist, $prodlist, 'cart', array(), 'cart'), 'billing' => array(-1, _('Billing Information'), ''), 'FIRSTNAME' => array(0, _('Firstname'), 'text', 30), 'LASTNAME' => array(0, _('Lastname'), 'text', 30), 'COUNTRYCODE' => array(0, _('Country'), 'text', 3), 'EMAIL' => array(0, _('Billing E-Mail'), 'text', 40), 'shipping' => array(-1, _('Shipping Information'), _('Please check your shipping information')), 'SHIPTONAME' => array(0, _('Ship To'), 'text', 30), 'SHIPTOSTREET' => array(0, _('Address'), 'text', 30), 'SHIPTOCITY' => array(0, _('City'), 'text', 20), 'SHIPTOSTATE' => array(0, _('State/Province'), 'text', 20), 'SHIPTOZIP' => array(0, _('Zip Code'), 'text', 10), 'SHIPTOCOUNTRYNAME' => array(0, _('Country'), 'text', 20), 'salesterms' => array(-1, _('Sales Terms And Conditions'), sprintf(_('Please read and agree with our %s before' . ' confirming your payment'), $salesterm)), 'agreement' => array(1, _('Agreement'), 'checkbox', sprintf(_('I accept MusXpand\'s sales %s'), mx_windowedpage('salesterms', _('terms & conditions'))), _('You have to agree to continue...')), 'a' => array(1, 'none', 'hidden'), 'PAYERID' => array(1, 'none', 'hidden'), 'cartid' => array(1, $mxuser->cart->id, 'hidden'), 'paymentoption' => array(1, 'PayPal', 'hidden'))); mx_showform($ckoutlist, $mxuser->cart->orderinfo, true, true); //echo print_r($mxuser->cart->orderinfo); } else { if ($mxuser->cart->progress == 4) { // order confirmation if ($action != 'printorder') { $ckoutbuttons = array('printorder' => _('Print this Confirmation Page')); } else { $ckoutbuttons = array(); } $cartlist = array('cart' => array('select' => array(0, '', 'text', 3), 'prodtype' => array(0, _('Item'), 'text', 20), 'proddesc' => array(0, _('Description'), 'html', 30), 'prodvar' => array(0, _('Type'), 'text', 20), 'price' => array(0, _('Price'), 'price', 10))); $values = $mxuser->cart->orderconfirm; $values['invoicenum'] = $mxuser->cart->invoicenum; //sprintf(_('%06d'),$mxuser->cart->id); $billing = $mxuser->getaddress($mxuser->cart->billingid); $shipping = $mxuser->getaddress($mxuser->cart->shippingid); $values['FIRSTNAME'] = $billing['first']; $values['LASTNAME'] = $billing['last']; $values['EMAIL'] = $billing['email']; $values['SHIPTONAME'] = $shipping['shiptoname']; $values['SHIPTOSTREET'] = $shipping['street1']; $values['SHIPTOCITY'] = $shipping['city']; $values['SHIPTOSTATE'] = $shipping['state']; $values['SHIPTOZIP'] = $shipping['zip']; $values['SHIPTOCOUNTRYNAME'] = $shipping['countrycode']; $values['termscond'] = mx_showhtmlpagestr('salesterms'); $ckoutlist = array('checkout', 0, _('Order Confirmation'), $action != 'printorder' ? $progresstable : mx_infomsgstr($mxuser->cart->info), $ckoutbuttons, array('cart' => array(-1, sprintf(_('Invoice # %s'), $mxuser->cart->invoicenum), _('You purchased the following items.')), 'cartcontent' => array(-2, $cartlist, $prodlist, 'cart', array(), 'cart'), 'billing' => array(-1, _('Billing Information'), ''), 'FIRSTNAME' => array(0, _('Firstname'), 'text', 30), 'LASTNAME' => array(0, _('Lastname'), 'text', 30), 'EMAIL' => array(0, _('Billing E-Mail'), 'text', 40), 'shipping' => array(-1, _('Shipping Information'), ''), 'SHIPTONAME' => array(0, _('Ship To'), 'text', 30), 'SHIPTOSTREET' => array(0, _('Address'), 'text', 30), 'SHIPTOCITY' => array(0, _('City'), 'text', 20), 'SHIPTOSTATE' => array(0, _('State/Province'), 'text', 20), 'SHIPTOZIP' => array(0, _('Zip Code'), 'text', 10), 'SHIPTOCOUNTRYNAME' => array(0, _('Country'), 'text', 20), 'confirmation' => array(-1, _('Payment Confirmation'), _('Below are the details of the transaction')), 'invoicenum' => array(0, _('Invoice #'), 'text', 30), 'PAYMENTINFO_0_PAYMENTSTATUS' => array(0, _('Payment Status'), 'text', 20), 'PAYMENTINFO_0_TRANSACTIONID' => array(0, _('Transaction ID'), 'transactionid', 20), 'PAYMENTINFO_0_ORDERTIME' => array(0, _('Order Time'), 'text', 20), 'PAYMENTINFO_0_AMT' => array(0, _('Total Amount'), 'price', 20), 'PAYMENTINFO_0_TAXAMT' => array(0, _('Taxes included'), 'price', 20), 'PAYMENTINFO_0_CURRENCYCODE' => array(0, _('Currency'), 'text', 20), 'terms' => array(-1, _('Sales Terms'), _('Please keep the following sales conditions along with your purchase receipt.')), 'termscond' => array(0, _('Buyer Information'), 'html'), 'a' => array(1, 'none', 'hidden'), 'PAYERID' => array(1, 'none', 'hidden'), 'cartid' => array(1, $mxuser->cart->id, 'hidden'), 'paymentoption' => array(1, 'PayPal', 'hidden'))); //mx_showform($ckoutlist,$mxuser->cart->orderconfirm,true,true); mx_showform($ckoutlist, $values, true, true); // confirmation emails if ($action != 'printorder') { // email to buyer $ckoutemail = $ckoutlist; $ckoutemail[4] = array(); $ckoutemail[3] = mx_infomsgstr($mxuser->cart->info); $to = $mxuser->fullname . ' <' . $mxuser->email . '>'; $subj = sprintf(_('Order Confirmation - Invoice # %06d'), $mxuser->cart->id); $html = mx_showhtmlpagestr('orderconfirmation'); $confform = mx_showformstr($ckoutemail, $values, true, true); $html = str_replace('{ORDERFORM}', $confform, $html); $html = str_replace('{INVOICENUM}', $mxuser->cart->invoicenum, $html); // sprintf('%06d',$mxuser->cart->id) $txt = sprintf(_('To print your order confirmation, please go to %s'), mx_actionurl('cart', '', 'printorder', '', '', 'secure', 'cartid=' . $mxuser->cart->id)); mx_sendmail($to, $subj, $txt, $html); // email to artists foreach ($prodlist['cart'] as $line) { if ($prodtype == MXARTSUB) { $artistid = $line->prodref; } else { if ($prodtype == MXMEDSUB) { $media = $mxuser->getmediainfo($line->prodref); $artistid = $media->owner_id; } else { $artistid = 0; } } $prodtype = $line->prodtype; $prodvar = $line->prodvar; $prodprice = sprintf('US$ %.02f', $line->price); if ($artistid) { $artist = $mxdb->getuserinfo($mxuser->id, $artistid); } if ($artist && $artist->email) { $to = mx_getartistname($artist) . ' <' . $artist->email . '>'; if ($prodtype == MXARTSUB) { $subj = _('You just made a new fan'); // html version $html = mx_showhtmlpagestr('newfan'); // text version $txt = _("Hey {ARTISTNAME}!\n\n" . "We just wanted to give you the good news:\n\n" . "You just made a new fan in {FANNAME}:\n" . "{FANNAME} just purchased a {PRODVAR} {PRODTYPE} from you for {PRICE}\n\n" . "Sales Team,\nMusXpand.\n" . MXSALESEMAIL . "\n" . mx_option('basicsiteurl')); mx_fbaction('musxpand:subscribe_to?artist=' . urlencode(mx_actionurl('artists', 'artprof', $artistid))); } else { if ($prodtype == MXMEDSUB) { $subj = _('Someone bought media from you'); // html version $html = mx_showhtmlpagestr('newbuyer'); // text version $txt = _("Hey {ARTISTNAME}!\n\n" . "We just wanted to give you the good news:\n\n" . "{FANNAME} bought some media from you:\n" . "{FANNAME} just purchased \"{MEDIANAME}\" from you for {PRICE}\n\n" . "Sales Team,\nMusXpand.\n" . MXSALESEMAIL . "\n" . mx_option('basicsiteurl')); } } $fan = '<a href="' . mx_actionurl('fans', 'fanprof', $mxuser->id) . '">' . mx_getname($mxuser) . '</a>'; $html = str_replace('{ARTISTNAME}', mx_getartistname($artist), $html); $html = str_replace('{PRICE}', $prodprice, $html); $html = str_replace('{FANNAME}', $fan, $html); $html = str_replace('{MEDIANAME}', $media->title, $html); $html = str_replace('{PRODVAR}', $prodvar, $html); $html = str_replace('{PRODTYPE}', $prodtype, $html); $siteurl = '<a href="' . mx_option('basicsiteurl') . '">MusXpand</a>'; $html = str_replace('{SITEURL}', $siteurl, $html); $html = str_replace('{SALESEMAIL}', MXSALESEMAIL, $html); $txt = str_replace('{ARTISTNAME}', mx_getartistname($artist), $txt); $txt = str_replace('{PRICE}', $prodprice, $txt); $fan = mx_getname($mxuser); $txt = str_replace('{FANNAME}', $fan, $txt); $txt = str_replace('{MEDIANAME}', $media->title, $txt); $txt = str_replace('{PRODVAR}', $prodvar, $txt); $txt = str_replace('{PRODTYPE}', $prodtype, $txt); mx_sendmail($to, $subj, $txt, $html); } } } else { // purchase ?> <!-- Google Code for Bought Conversion Page --> <script type="text/javascript"> /* <![CDATA[ */ var google_conversion_id = 949396365; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "f7QfCNPfzwMQjcfaxAM"; var google_conversion_value = <?php echo $mxuser->cart->total; ?> ; /* ]]> */ </script> <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/949396365/?label=f7QfCNPfzwMQjcfaxAM&guid=ON&script=0"/> </div> </noscript> <?php } /*$ckoutlist[0]='printout'; echo '<div id="order"><div class="order">'; mx_showform($ckoutlist,$mxuser->cart->orderinfo,false,true); echo '</div></div>';*/ //echo print_r($mxuser->cart->orderconfirm); } else { // cart and wishlist display $cartbuttons = array('towish' => _('Move to Wishlist'), 'delcart' => _('Remove Checked Items'), 'sep' => null, 'shopmore' => $contshoppinglabel, 'checkout' => _('Proceed to Checkout')); $cartlist = array('cartlist', 0, _('Cart & Wishlist Content'), $progresstable, array('cart' => $cartbuttons, 'wishlist' => array('tocart' => _('Move to Cart'), 'delwish' => _('Remove Checked Items'), 'sep' => null, 'shopmore_w' => $contshoppinglabel)), array('cart' => array('cart' => array(-1, _('Your Cart'), _('The following items are currently in your cart')), 'select' => array(0, '<input id="checkallbox" type="checkbox" onclick="javascript:checkall(\'cart\');">', 'text', 3), 'prodtype' => array(0, _('Item'), 'text', 20), 'proddesc' => array(0, _('Description'), 'html', 30), 'prodvar' => array(0, _('Type'), 'text', 20), 'price' => array(0, _('Price'), 'price', 10), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'cart', 'hidden')), 'wishlist' => array('wishlist' => array(-1, _('Your Wish List'), _('The following items are currently in your wishlist')), 'select' => array(0, '<input id="checkallbox" type="checkbox" onclick="javascript:checkall(\'wishlist\');">', 'text', 3), 'prodtype' => array(0, _('Item'), 'text', 20), 'proddesc' => array(0, _('Description'), 'html', 30), 'prodvar' => array(0, _('Type'), 'text', 20), 'price' => array(0, _('Price'), 'price', 10), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'wishlist', 'hidden')))); mx_showlist($cartlist, $prodlist, 'cart', true, true); //if ($action=='addfoy' || $action=='adfofa' || $action=='upgfofa') { ?> <!-- Google Code for Added To Cart Conversion Page --> <script type="text/javascript"> /* <![CDATA[ */ var google_conversion_id = 949396365; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "ziXpCNvezwMQjcfaxAM"; var google_conversion_value = <?php echo $prodprice; ?> ; /* ]]> */ </script> <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/949396365/?label=ziXpCNvezwMQjcfaxAM&guid=ON&script=0"/> </div> </noscript> <?php //} } } //phpinfo(); }