function favorites(){
function deletefavorite(){global $domain, $db, $usrdata;$in1 = $db->query(sprintf('SELECT * FROM dd_games WHERE ID=\'%u\'', $_GET['deleteID']));$in = $db->fetch_row($in1);$gamename = ereg_replace('[^A-Za-z0-9]', '', $in['name']);echo '<div class=\'msg\'>Are you sure you want to remove the game '.$gamename.' from your favorites?<br> <a href=\''.$domain.'/index.php?action=myaccount&cmd=favorites&deletename='.$gamename.'&deleteID='.$_GET['deleteID'].'\'>Yes</a> <a href=\''.$domain.'/index.php?action=myaccount&cmd=favorites\'>No</a></div>';}
, $template
function favorites(){global $domain, $db, $usrdata, $thumbsfolder, $gamesfolder, $seo_on, $template;
if ( isset ( $_GET['deleteID'] ) && !empty ( $_GET['deleteID'] ) ) { mysql_query('DELETE FROM dd_user_favorites WHERE userid=\''.$usrdata['userid'].'\' AND gameid=\''.$_GET['deleteID'].'\''); echo '<div class=\'msg\'>Deleted '.$_GET['deletename'].' from your favorites.</div>';}
<a href=\''.$playlink.'\' class=\'playlink\'><b>Play</b></a></td>
'; mysql_query('DELETE FROM dd_user_favorites WHERE ID='.$in['ID'].''); echo'<div style="float: right; padding-right: 20px;"><a href=\''.$domain.'/index.php?action=myaccount&cmd=deletefavorite&deleteID='.$in['ID'].'\'><img src=\''.$domain.'/templates/'.$template.'/images/deletebtn.png\' border=\'0\' alt=\'\' /></a></div>
case 'favorites': favorites(); break;
case 'deletefavorite': deletefavorite(); break;