function mx_form2list($form, $values, $cansubmit = true, $secure = false, $errors = null, $subsubmit = false, $nofieldset = false) { // not working !! $list = array(); $list[0] = $form[0]; $list[1] = 0; $list[2] = $form[2]; $list[3] = $form[3]; $list[4] = array(); $list[5] = array(); $listvalues = array(); $grpcnt = 0; foreach ($form[5] as $fld => $det) { if ($det[0] == -1) { $grpcnt++; $grp = 'group_' . $grpcnt; $list[4][$grp] = $form[4]; $list[5][$grp] = array(); $list[5][$grp][$grp] = $det; continue; } $list[5][$grp][$fld] = $det; $listvalues[$grp][$fld] = $values[$fld]; } //die(print_r($list,true)); mx_showlist($list, $listvalues, $listtype = '', $submit = $cansubmit, $counts = false); }
function mx_showshows($action) { global $mxuser; if (is_artist()) { $myshowarr = array('myshows' => array('select' => array(1, '<input name="checkshowsbox" type="checkbox" onclick="javascript:checkshows(\'updates\',\'selshows[]\');">', 'text', 3), 'show' => array(0, _('Show'), 'show'))); $myshowsb = array('myshows' => array()); $myshowsptr = null; //$mxuser->listmyshows(); $myshows = array(); $myshows['myshows'] = array(); if ($myshowsptr) { while ($show = $mxuser->listmyshows($myshowsptr)) { $ashow = new StdClass(); $ashow->select = '<input type="checkbox" name="selshows[]" value="' . $show->msgid . '">'; $show->type = 'me'; $show->mylikes = $mxuser->getlikes($show->msgid); $ashow->show = $show; $ashow->flags = $show->flags; $myshows['myshows'][] = $ashow; } } $updatebtns = array('post' => _('Post'), 'clear' => _('Clear')); } // filling msgs $allmsgs = array(); /*$frshows=array( 'frshows' => array( 'select' => array(1,'<input name="checkshowsbox" type="checkbox" onclick="javascript:checkshows(\'updates\',\'selshows[]\');">','text',3), 'shows' => array(1,_('Wall'),'shows'), ) ); $frshowsb=array( 'frshows' => array( 'delete_updates' => _('Delete'), //'archive_inbox' => _('Archive'), ) );*/ /* -- friends shows... $frshowsptr=$mxuser->listfrshows(); if ($frshowsptr) { while ($show=$mxuser->listfrshows($frshowsptr)) { $ashow=new StdClass(); $ashow->select='<input type="checkbox" name="selshows[]" value="'.$show->msgid.'">'; $show->type='friend'; $show->mylikes=$mxuser->getlikes($show->msgid); $ashow->show=$show; $ashow->flags=$show->flags; //$frshows['frshows'][]=$ashow; $allmsgs['frshows'][]=$ashow; } } */ /* -- artists shows $artshowsptr=$mxuser->listartshows(); if ($artshowsptr) { while ($show=$mxuser->listartshows($artshowsptr)) { $ashow=new StdClass(); $ashow->select='<input type="checkbox" name="selshows[]" value="'.$show->msgid.'">'; $show->type='artist'; $show->mylikes=$mxuser->getlikes($show->msgid); $ashow->show=$show; $ashow->flags=$show->flags; //$frshows['frshows'][]=$ashow; $allmsgs['artshows'][]=$ashow; } } */ /* -- fans shows $fanshowsptr=$mxuser->listfanshows(); if ($fanshowsptr) { while ($show=$mxuser->listfanshows($fanshowsptr)) { $ashow=new StdClass(); $ashow->select='<input type="checkbox" name="selshows[]" value="'.$show->msgid.'">'; $show->type='fans'; $show->mylikes=$mxuser->getlikes($show->msgid); $ashow->show=$show; $ashow->flags=$show->flags; //$frshows['frshows'][]=$ashow; $allmsgs['fanshows'][]=$ashow; } } */ $msglist = array('showsmsgs', 1, _('The Shows'), sprintf(_('To post a new update to your shows, click %s.'), '<a href="javascript:tabswitch(\'frshows\',\'updates\');">' . _('here') . '</a>'), array('frshows' => array(), 'artshows' => array(), 'fanshows' => array(), 'updates' => array('newshow' => _('Add a Show'))), array('updates' => array(1, 'updates' => array(-1, _('Add a Show'), _('Please fill the form below...')), 'venue' => array(1, _('Venue'), 'text'), 'date' => array(1, _('Date'), 'date'), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'fanshows', 'hidden'), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'updates', 'hidden'), 'myshows' => array(-2, $myshows, $myshows, 'shows', $myshowsb, 'myshows')), 'frshows' => array(0, 'frshows' => array(-1, _('Friends\' Shows'), _('What\'s up friends?')), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'frshows', 'hidden'), 'shows' => array(0, _('Wall'), 'shows')), 'artshows' => array(0, 'artshows' => array(-1, _('Artists\' Shows'), _('Whazzup fav\' bands?')), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'artshows', 'hidden'), 'shows' => array(0, _('Wall'), 'shows')), 'fanshows' => array(0, 'fanshows' => array(-1, _('Fans\' Shows'), _('What are my fans talking about?')), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'fanshows', 'hidden'), 'shows' => array(0, _('Wall'), 'shows')))); mx_showlist($msglist, $allmsgs, 'shows', true); if (preg_match('%(rp:([0-9]+))%', $action, $actionarg) > 0) { ?> <script language="javascript">buttonclick('reply:<?php echo $actionarg[2]; ?> ');</script> <?php } }
function mx_mnsearch($page, $option, $action) { global $query, $mxdb, $mxuser; //echo 'Soon, you\'ll be able to find the results of your search for ['.$action.'] here...'; error_log('search for:[' . $action . ']'); $search = $mxdb->search($action); if (!$search) { __('No result found.'); return; } //die(print_r($search)); /*foreach ($search as $type => $results) { echo '<h3>'.$type.'</h3>'; echo '<ul>'; foreach ($results as $id => $result) { echo '<li>' . '<div class="searchpic">'.($type=='persons'?('<img src="'.mx_fanpic($id).'">'):'') .'</div><div class="searchname">'.$result.'</div>' .'<div class="searchaction">action</div>' .'</li>'; } echo '</ul>'; }*/ $reslist = array('reslist', 0, _('Search Results'), _('Is this what you were looking for...?'), array(), array('persons' => array('persons' => array(-1, _('Individuals'), _('Matching accounts')), 'picture' => array(0, _('Picture'), 'picture', 10), 'name' => array(0, _('Name'), 'text', 40), 'actions' => array(0, _('Actions'), 'actions', 40)), 'artists' => array('artists' => array(-1, _('Artists'), _('Matching artists')), 'picture' => array(0, _('Picture'), 'picture', 10), 'name' => array(0, _('Name'), 'text', 40), 'actions' => array(0, _('Actions'), 'actions', 40)), 'medias' => array('medias' => array(-1, _('Medias'), _('Matching medias')), 'picture' => array(0, _('Picture'), 'picture', 10), 'name' => array(0, _('Name'), 'text', 40), 'actions' => array(0, _('Actions'), 'actions', 40)))); //while ($msgs && $msg=$mxuser->listmessages($msgs)) { //print_r($msg); foreach ($search as $type => $results) { $resarray[$type] = array(); foreach ($results as $id => $result) { $res = new stdClass(); switch ($type) { case 'persons': $res->picture = new StdClass(); $res->picture->pic = mx_fanpic($id, 'square', $result->gender, false); $res->picture->id = $id; $res->picture->type = 'person'; $res->name = '<a href="' . mx_actionurl('fans', 'fanprof', $id) . '" alt="' . $result->fullname . '">' . $result->fullname . '</a>'; $res->actions = array('fanprof' => array(_('See Page'), mx_actionurl('fans', 'fanprof', $id)), 'addfriend' => array(_('Add as a Friend'), mx_actionurl('account', 'messages', 'af:' . $id, 'writemsg')), 'sendmsg' => array(_('Send a Message'), mx_actionurl('account', 'messages', 'sm:' . $id, 'writemsg'))); break; case 'artists': $res->picture = new StdClass(); $res->picture->pic = mx_fanpic($id, 'square', $result->gender, true); $res->picture->id = $id; $res->picture->type = 'person'; $res->name = '<a href="' . mx_actionurl('artists', 'artprof', $id) . '" alt="' . $result->artistname . '">' . $result->artistname . '</a>' . '<div class="artisttype">' . ($result->acctype == MXACCOUNTBAND ? _('Band') : _('Artist')) . '</div>'; $res->actions = array('artprof' => array(_('See Profile'), mx_actionurl('artists', 'artprof', $id))); break; case 'archipelagoes': case 'islands': $res->name = '<a href="' . mx_actionurl('musxpace', 'viewprof', $id) . '" alt="' . $result->name . '">' . $result->name . '</a>'; $res->description = $result->description; $res->actions = array(); break; case 'medias': $media = null; $media = $mxuser->getmediainfo($id); $fanship = $mxuser->getfanship($media->owner_id, $media->id); mx_medialist($media, $fanship); $res->picture = new StdClass(); $res->picture->pic = $media->pic; $res->picture->id = $id; $res->picture->type = 'media'; $res->name = '<a href="' . mx_actionurl('media', 'medprof', $id) . '" alt="' . $media->title . '">' . sprintf('%s <br/>by %s', $media->title, $media->artistname) . '</a>'; $res->actions = array('medprof' => array(_('Media Info'), mx_actionurl('media', 'medprof', $id))); break; } $resarray[$type][] = $res; } } mx_showlist($reslist, $resarray, 'search', false, true); }
function mx_mnplaystats($page, $option, $action) { global $mxuser; $playtable = array('playstats', 0, _('Media stats'), '', array(), array('plays' => array('plays' => array(-1, _('Media I played...'), _('These are the medias you played, watched or viewed (except yours).')), 'owner_id' => array(0, _('Artist'), 'artist', 20), 'mediaid' => array(0, _('Title'), 'mediaplay', '40'), 'type' => array(0, _('Type'), 'playtype'), 'start' => array(0, _('When'), 'date'), 'playtime' => array(0, _('Playtime'), 'playtime'), 'played' => array(0, _('% played'), 'percent')), 'medias' => array('medias' => array(-1, _('My medias people played...'), _('These are your medias\' stats.' . ' This does NOT include your own actions.' . ' If a media has never been played or viewed, it won\'t appear here.')), 'mediaid' => array(0, _('Title'), 'mediaplay', '40'), 'type' => array(0, _('Type'), 'playtype'), 'playcnt' => array(0, _('Count'), 'text'), 'avgplaytime' => array(0, _('Avg.Playtime'), 'playtime'), 'avgplayed' => array(0, _('Avg. % played'), 'percent')), 'topfans' => array('topfans' => array(-1, _('My best fans'), _('Here you know who\'s playing your medias.' . ' It does NOT include your own actions.')), 'mediaid' => array(0, _('Title'), 'mediaplay', '40'), 'type' => array(0, _('Type'), 'playtype'), 'userid' => array(0, _('User'), 'fan', 20), 'playcnt' => array(0, _('Count'), 'text'), 'avgplaytime' => array(0, _('Playtime'), 'playtime'), 'avgplayed' => array(0, _('% played'), 'percent')), 'topvisitors' => array('topvisitors' => array(-1, _('Vistors\' most played'), _('Here are the medias that were most played by' . ' non-members.')), 'mediaid' => array(0, _('Title'), 'mediaplay', '40'), 'type' => array(0, _('Type'), 'playtype'), 'playcnt' => array(0, _('Count'), 'text'), 'avgplaytime' => array(0, _('Playtime'), 'playtime'), 'avgplayed' => array(0, _('% played'), 'percent')))); $playvalues = $mxuser->getplaystats(); mx_showlist($playtable, $playvalues, 'stats', false, false); //echo '<xmp>'.print_r($playvalues,true).'</xmp>'; }
function mx_showwalls($action) { global $mxuser; $mywall = array('mywall' => array('wall' => array(0, _('Wall'), 'wall'))); $mywallb = array('mywall' => array()); $mywallptr = $mxuser->listmywalls(); $mywalls = array(); if ($mywallptr) { while ($wall = $mxuser->listmywalls($mywallptr)) { $awall = new StdClass(); $awall->select = '<input type="checkbox" name="selwall[]" value="' . $wall->msgid . '">'; $wall->type = 'me'; $wall->mylikes = $mxuser->getlikes($wall->msgid); $awall->wall = $wall; $awall->flags = $wall->flags; $mywalls['mywall'][] = $awall; } } $updatebtns = array('post' => _('Post'), 'clear' => _('Clear')); // filling msgs $allmsgs = array(); /*$frwall=array( 'frwall' => array( 'select' => array(1,'<input name="checkwallsbox" type="checkbox" onclick="javascript:checkwalls(\'updates\',\'selwall[]\');">','text',3), 'wall' => array(1,_('Wall'),'wall'), ) ); $frwallb=array( 'frwall' => array( 'delete_updates' => _('Delete'), //'archive_inbox' => _('Archive'), ) );*/ $frwallptr = $mxuser->listfrwalls(); if ($frwallptr) { while ($wall = $mxuser->listfrwalls($frwallptr)) { $awall = new StdClass(); $awall->select = '<input type="checkbox" name="selwall[]" value="' . $wall->msgid . '">'; $wall->type = 'friend'; $wall->mylikes = $mxuser->getlikes($wall->msgid); $awall->wall = $wall; $awall->flags = $wall->flags; //$frwalls['frwall'][]=$awall; $allmsgs['frwalls'][] = $awall; } } $artwallptr = $mxuser->listartwalls(); if ($artwallptr) { while ($wall = $mxuser->listartwalls($artwallptr)) { $awall = new StdClass(); $awall->select = '<input type="checkbox" name="selwall[]" value="' . $wall->msgid . '">'; $wall->type = 'artist'; $wall->mylikes = $mxuser->getlikes($wall->msgid); $awall->wall = $wall; $awall->flags = $wall->flags; //$frwalls['frwall'][]=$awall; $allmsgs['artwalls'][] = $awall; } } $fanwallptr = $mxuser->listfanwalls(); if ($fanwallptr) { while ($wall = $mxuser->listfanwalls($fanwallptr)) { $awall = new StdClass(); $awall->select = '<input type="checkbox" name="selwall[]" value="' . $wall->msgid . '">'; $wall->type = 'fans'; $wall->mylikes = $mxuser->getlikes($wall->msgid); $awall->wall = $wall; $awall->flags = $wall->flags; //$frwalls['frwall'][]=$awall; $allmsgs['fanwalls'][] = $awall; } } $msglist = array('wallmsgs', 1, _('The Walls'), sprintf(_('To post a new update to your wall, click %s.'), '<a href="javascript:tabswitch(\'frwalls\',\'updates\');">' . _('here') . '</a>'), array('frwalls' => array(), 'artwalls' => array(), 'fanwalls' => array(), 'mentions' => array(), 'updates' => array()), array('updates' => array(2, 'updates' => array(-1, _('My Updates'), _('What\'s up...?')), 'body' => array(1, _('Status'), 'memo', 1, null, _('Open your heart...')), 'filter' => array(1, _('Shared with'), 'sharefilter'), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'updates', 'hidden'), 'btns' => array(-3, $updatebtns), 'previous' => array(-1, _('Previous Updates'), _('What did I say again...?')), 'mywall' => array(-2, $mywall, $mywalls, 'wall', $mywallb, 'mywall')), 'frwalls' => array(0, 'frwalls' => array(-1, _('Friends\' Walls'), _('What\'s up friends?')), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'frwalls', 'hidden'), 'wall' => array(0, _('Wall'), 'wall')), 'artwalls' => array(0, 'artwalls' => array(-1, _('Artists\' Walls'), _('Whazzup fav\' bands?')), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'artwalls', 'hidden'), 'wall' => array(0, _('Wall'), 'wall')), 'fanwalls' => array(0, 'fanwalls' => array(-1, _('Fans\' Walls'), _('What are my fans talking about?')), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'fanwalls', 'hidden'), 'wall' => array(0, _('Wall'), 'wall')), 'mentions' => array(0, 'mentions' => array(-1, _('Mentions'), _('Talking about me...?')), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'fanwalls', 'hidden'), 'wall' => array(0, _('Wall'), 'wall')))); mx_showlist($msglist, $allmsgs, 'wall', true); if (preg_match('%(rp:([0-9]+))%', $action, $actionarg) > 0) { ?> <script language="javascript">buttonclick('reply:<?php echo $actionarg[2]; ?> ');</script> <?php } }
function mx_showmessages($action) { global $mxuser; $listorder = mx_secureword($_GET['s']); if ($listorder != '') { $listorder .= ' asc'; } $msgs = $mxuser->listmessages(null, $listorder); if (!$msgs) { __('Your message box is empty.'); return; } $allmsgs = array(); $msglist = array('msglist', 0, _('Message List'), sprintf(_('If you want to compose a new message, click %s.'), '<a href="javascript:tabswitch(\'inbox\',\'writemsg\');">' . _('here') . '</a>'), array('inbox' => array('delete_inbox' => _('Delete'), 'archive_inbox' => _('Archive')), 'outbox' => array('delete_outbox' => _('Delete'), 'archive_outbox' => _('Archive')), 'requests' => array('accept_requests' => _('Accept'), 'recuse_requests' => _('Recuse'), 'ignore_requests' => _('Ignore')), 'reqsent' => array('cancel_reqsent' => _('Cancel'), 'archive_reqsent' => _('Archive')), 'archives' => array('delete_archives' => _('Delete')), 'drafts' => array('delete_drafts' => _('Delete'), 'archive_drafts' => _('Archive')), 'writemsg' => array('send' => _('Send'), 'save' => _('Save'), 'clear' => _('Clear'))), array('inbox' => array(0, 'inbox' => array(-1, _('Inbox'), _('The messages you received')), 'select' => array(0, '<input name="checkallbox" type="checkbox" onclick="javascript:checkall(\'inbox\');">', 'text', 3), 'contact' => array(0, _('From'), 'text', 40), 'topic' => array(0, _('Topic'), 'text', 40), 'flags' => array(0, 0, 'hidden'), 'date' => array(0, _('Date'), 'timestamp', 12), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'inbox', 'hidden')), 'outbox' => array(0, 'outbox' => array(-1, _('Outbox'), _('The messages you sent')), 'select' => array(0, '<input name="checkallbox" type="checkbox" onclick="javascript:checkall(\'outbox\');">', 'text', 3), 'contact' => array(0, _('To'), 'text', 40), 'topic' => array(0, _('Topic'), 'text', 40), 'flags' => array(0, 0, 'hidden'), 'date' => array(0, _('Date'), 'timestamp', 12), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'outbox', 'hidden')), 'requests' => array(0, 'requests' => array(-1, _('Requests'), _('Checking your pending requests?')), 'select' => array(0, '<input name="checkallbox" type="checkbox" onclick="javascript:checkall(\'requests\');">', 'text', 3), 'contact' => array(0, _('From'), 'text', 60), 'flags' => array(0, _('Type'), 'msgflags', 20), 'date' => array(0, _('Date'), 'timestamp', 12), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'requests', 'hidden')), 'reqsent' => array(0, 'reqsent' => array(-1, _('Sent Req.'), _('Do you want to cancel any requests you sent?')), 'select' => array(0, '<input name="checkallbox" type="checkbox" onclick="javascript:checkall(\'reqsent\');">', 'text', 3), 'contact' => array(0, _('From'), 'text', 60), 'flags' => array(0, _('Type'), 'msgflags', 20), 'date' => array(0, _('Date'), 'timestamp', 12), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'reqsent', 'hidden')), 'archives' => array(0, 'archives' => array(-1, _('Archives'), _('Your arquived messages')), 'select' => array(0, '<input name="checkallbox" type="checkbox" onclick="javascript:checkall(\'archives\');">', 'text', 3), 'contact' => array(0, _('From | To'), 'text', 40), 'topic' => array(0, _('Topic'), 'text', 40), 'a' => array(1, 'none', 'hidden'), 'date' => array(0, _('Date'), 'timestamp', 12), 'flags' => array(0, 0, 'hidden'), 'k' => array(1, 'archives', 'hidden')), 'drafts' => array(0, 'drafts' => array(-1, _('Drafts'), _('Messages previously saved')), 'select' => array(0, '<input name="checkallbox" type="checkbox" onclick="javascript:checkall(\'drafts\');">', 'text', 3), 'contact' => array(0, _('To'), 'text', 40), 'topic' => array(0, _('Topic'), 'text', 40), 'date' => array(0, _('Date'), 'timestamp', 12), 'flags' => array(0, 0, 'hidden'), 'a' => array(1, 'none', 'hidden'), 'k' => array(1, 'drafts', 'hidden')), 'writemsg' => array(1, 'writemsg' => array(-1, _('Write Box'), _('Hey! Writing to friends?')), 'to' => array(1, _('To'), 'user', 40), 'subject' => array(1, _('Subject'), 'subject', 40), 'body' => array(1, _('Body'), 'memo', 10, null, _('Verba volant, scripta manent...'), 54), 'history' => array(0, _('Message History'), 'hiddenmemo', 5), 'flags' => array(1, 0, 'hidden'), 'a' => array(1, 'none', 'hidden'), 'priority' => array(1, 0, 'hidden'), 'refid' => array(1, 0, 'hidden'), 'k' => array(1, 'writemsg', 'hidden')))); /* new sorting method: buttons next/previous should work per msg category... while ($msg=$mxuser->listmessages($msgs)) { $buttons=null; if ($msg->flags & MXREQUEST) { if ($msg->sender==$mxuser->id) { $buttons['cancel:'.$msg->msgid]=_('Cancel'); $buttons['archive:'.$msg->msgid]=_('Archive'); } else { $buttons['accept:'.$msg->msgid]=_('Accept'); $buttons['recuse:'.$msg->msgid]=_('Recuse'); $buttons['ignore:'.$msg->msgid]=_('Ignore'); $buttons['sep4']=null; $buttons['reply:'.$msg->msgid]=_('Reply'); $buttons['forward:'.$msg->msgid]=_('Forward'); } $buttons['sep3']=null; } else { if ($msg->sender==$mxuser->id) { $buttons['resend:'.$msg->msgid]=_('Resend'); $buttons['sep2']=null; } $buttons['delete:'.$msg->msgid]=_('Delete'); $buttons['archive:'.$msg->msgid]=_('Archive'); $buttons['sep1']=null; } if ($msg->prev) $buttons['previous:'.$msg->prev]=_('Previous'); else $buttons['-previous']=_('Previous'); if ($msg->next) $buttons['next:'.$msg->next]=_('Next'); else $buttons['-next']=_('Next'); $msg->select='<input type="checkbox" name="selmsg[]" value="'.$msg->msgid.'">'; $msg->select.='<div class="contentframe"><div id="'.$msg->msgid.'" class="msgcontent" style="display:none;">'; $msgform=array( 'msgform',0,_('Message read'),_('Details...'), $buttons, array( 'from' => array(1,_('From:'),'text',40), 'h_from' => array(1,0,'hidden',40), 'to' => array(1,_('To:'),'text',40), 'h_to' => array(1,0,'hidden',40), 'date' => array(1,_('Date:'),'text',40), 'flags' => array(1,_('Flags:'),'msgflags',40), 'subject' => array(0,_('Subject:'),'text',40), 'body' => array(0,_('Body:'),'text',60) ) ); $msg->select.=mx_letterstr($msgform,array( 'from' => ($mxuser->id==$msg->sender)?_('Me'):($msg->fullname?$msg->fullname:$msg->artistname), 'to' => ($mxuser->id==$msg->receiver)?_('Me'):($msg->fullname?$msg->fullname:$msg->artistname), 'h_to' => ($mxuser->id==$msg->receiver)?$mxuser->id:$msg->receiver, 'h_from' => ($mxuser->id==$msg->sender)?$mxuser->id:$msg->sender, 'date' => $msg->date, 'subject' => $msg->subject, 'flags' => $msg->flags, 'body' => mx_msgformat($msg->body), 'msgid' => $msg->msgid ),false); $msg->select.='<div class="msgclose"><a href="javascript:hidecontent('.$msg->msgid.')">'._('X').'</a>' . '</div></div></div>'; $msg->contact='<div class="msgline"><img class="msgpic" src="'.mx_fanpic($msg->id,'square').'" />'; $msg->contact.=' '.(($mxuser->id==$msg->sender)?(_('Me').' →'):''); $msg->contact.=' '.($msg->fullname?$msg->fullname:$msg->artistname); $msg->contact.=' '.(($mxuser->id==$msg->sender)?'':('→ '._('Me'))); $msg->contact.='</div>'; $msg->topic=$msg->subject.'<div class="bodyextract">“'.(strlen($msg->body)>40?(substr($msg->body,0,40).'[…]'):$msg->body).'”</div>'; $msg->read = ($msg->status & MXMSGREAD)?true:false; //$msg->flags = ($msg->flags | MXMSGREQUEST)?'true':'false'; if (!$msg->level) $msg->level=''; $allmsgs['messages'][]=$msg; if ($mxuser->id==$msg->receiver) { // receiver if (!($msg->status & MXMSGDELETED)) { if ($msg->status & MXMSGARCHIVED) $allmsgs['archives'][]=$msg; else $allmsgs['inbox'][]=$msg; } } if ($mxuser->id==$msg->sender) { if (!($msg->sstatus & MXMSGDELETED)) { if ($msg->sstatus & MXMSGARCHIVED) $allmsgs['archives'][]=$msg; else $allmsgs['outbox'][]=$msg; if ($msg->sstatus & MXMSGDRAFT) $allmsgs['drafts'][]=$msg; } } if ($msg->flags & MXREQUEST) $allmsgs['requests'][]=$msg; $msg=$nmsg; } */ /* old sorting method buttons next/previous are global :-( */ $msg = null; while ($msgs && ($nmsg = $mxuser->listmessages($msgs)) || $msg) { //print_r($msg); if (!$msg) { $msg = $nmsg; $msg->prev = null; continue; } else { if ($nmsg) { $nmsg->prev = $msg->msgid; } } if (!$nmsg) { $msg->next = null; $msgs = null; } else { $msg->next = $nmsg->msgid; } $buttons = null; if ($msg->flags & MXREQUEST) { if ($msg->sender == $mxuser->id) { $buttons['cancel:' . $msg->msgid] = _('Cancel'); $buttons['archive:' . $msg->msgid] = _('Archive'); } else { $buttons['accept:' . $msg->msgid] = _('Accept'); $buttons['recuse:' . $msg->msgid] = _('Recuse'); $buttons['ignore:' . $msg->msgid] = _('Ignore'); $buttons['sep4'] = null; $buttons['reply:' . $msg->msgid] = _('Reply'); $buttons['forward:' . $msg->msgid] = _('Forward'); } $buttons['sep3'] = null; } else { if ($msg->sender == $mxuser->id) { $buttons['resend:' . $msg->msgid] = _('Resend'); $buttons['sep2'] = null; } else { $buttons['reply:' . $msg->msgid] = _('Reply'); $buttons['forward:' . $msg->msgid] = _('Forward'); $buttons['sep2'] = null; } $buttons['delete:' . $msg->msgid] = _('Delete'); $buttons['archive:' . $msg->msgid] = _('Archive'); $buttons['sep1'] = null; } if ($msg->prev) { $buttons['previous:' . $msg->prev] = _('Previous'); } else { $buttons['-previous'] = _('Previous'); } if ($msg->next) { $buttons['next:' . $msg->next] = _('Next'); } else { $buttons['-next'] = _('Next'); } $msg->select = '<input type="checkbox" name="selmsg[]" value="' . $msg->msgid . '">'; $msg->select .= '<div class="contentframe"><div id="' . $msg->msgid . '" class="msgcontent" style="display:none;">'; $msgform = array('msgform', 0, _('Message read'), _('Details...'), $buttons, array('from' => array(1, _('From:'), 'text', 40), 'h_from' => array(1, 0, 'hidden', 40), 'to' => array(1, _('To:'), 'text', 40), 'h_to' => array(1, 0, 'hidden', 40), 'date' => array(1, _('Date:'), 'date', 40), 'flags' => array(1, _('Flags:'), 'msgflags', 40), 'subject' => array(0, _('Subject:'), 'text', 40), 'body' => array(0, _('Body:'), 'text', 60))); $msg->select .= mx_letterstr($msgform, array('from' => $mxuser->id == $msg->sender ? _('Me') : ($msg->fullname ? $msg->fullname : $msg->artistname), 'to' => $mxuser->id == $msg->receiver ? _('Me') : ($msg->fullname ? $msg->fullname : $msg->artistname), 'h_to' => $mxuser->id == $msg->receiver ? $mxuser->id : $msg->receiver, 'h_from' => $mxuser->id == $msg->sender ? $mxuser->id : $msg->sender, 'date' => $msg->date, 'subject' => $msg->subject, 'flags' => $msg->flags, 'body' => mx_msgformat($msg->body), 'msgid' => $msg->msgid), false); $msg->select .= '<div class="msgclose"><a href="javascript:hidecontent(' . $msg->msgid . ')">' . _('X') . '</a>' . '</div></div></div>'; $msg->contact = '<div class="msgline"><img class="msgpic" src="' . mx_fanpic($msg->id, 'square', $msg->gender, $msg->acctype == MXACCOUNTARTIST) . '" />'; $msg->contact .= ' ' . ($mxuser->id == $msg->sender ? _('Me') . ' →' : ''); $msg->contact .= ' ' . ($msg->fullname ? $msg->fullname : $msg->artistname); $msg->contact .= ' ' . ($mxuser->id == $msg->sender ? '' : '→ ' . _('Me')); $msg->contact .= '</div>'; $msg->topic = $msg->subject . '<div class="bodyextract">“' . (strlen($msg->body) > 40 ? substr($msg->body, 0, 40) . '[…]' : $msg->body) . '”</div>'; $msg->read = $msg->status & MXMSGREAD ? true : false; $msg->ignored = $msg->status & MXREQIGNORED ? true : false; $msg->cancelled = $msg->status & MXREQCANCELLED ? true : false; //$msg->flags = ($msg->flags | MXMSGREQUEST)?'true':'false'; if (!$msg->level) { $msg->level = ''; } $allmsgs['messages'][] = $msg; if ($mxuser->id == $msg->receiver) { // receiver if (!($msg->status & (MXMSGDELETED | MXREQCANCELLED | MXREQIGNORED))) { if ($msg->status & MXMSGARCHIVED) { $allmsgs['archives'][] = $msg; } else { if ($msg->flags & MXREQUEST) { $allmsgs['requests'][] = $msg; } else { $allmsgs['inbox'][] = $msg; } } } } if ($mxuser->id == $msg->sender) { if (!($msg->sstatus & (MXMSGDELETED | MXREQCANCELLED))) { if ($msg->sstatus & MXMSGARCHIVED) { $allmsgs['archives'][] = $msg; } else { if ($msg->flags & MXREQUEST) { $allmsgs['reqsent'][] = $msg; } else { if ($msg->sstatus & MXMSGDRAFT) { $allmsgs['drafts'][] = $msg; } else { $allmsgs['outbox'][] = $msg; } } } } } $msg = $nmsg; } /* end old sorting method */ if (preg_match('%^(af:(.+))$%', $action, $actionarg) > 0) { $user = $mxuser->getuserinfo($actionarg[2]); $allmsgs['writemsg'] = array('to' => $user->id, 'subject' => _('Friendship Request'), 'flags' => MXFRIENDREQUEST, 'body' => _('Hi there. Could you please accept this request for friendship...?')); //error_log(print_r($allmsgs['writemsg'],true)); } //error_log($action); if (preg_match('%^(sm:(.+))$%', $action, $actionarg) > 0) { $user = $mxuser->getuserinfo($actionarg[2]); $allmsgs['writemsg'] = array('to' => $user->id, 'subject' => '', 'body' => ''); } mx_showlist($msglist, $allmsgs, 'messages', true, true); if (preg_match('%(rp:([0-9]+))%', $action, $actionarg) > 0) { ?> <script language="javascript">buttonclick('reply:<?php echo $actionarg[2]; ?> ');</script> <?php } }
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(); }