<?php
/*********************************************
  CPG Dragonfly - DF_Arcade Block
  ********************************************
  CPG Dragonfly is copyright © 2004 - 2005 by CPG Dev Team
  http://www.dragonflycms.com

  Dragonfly and DF_Arcade are released under the terms
  and conditions of the GNU GPL version 2 or any later version

  port of pnFlashGames - http://pnflashgames.com/
  Written by gerry@redgerry.com
  redgerry.com - Home of RG_Sports
  Revision Date: 16/10/2005 11:46
  Version Number 1.00

  UNDER NO CIRCUMSTANCES MAY THIS CODE BE USED FOR ANY COMMERCIAL
  PURPOSES UNDER THE GUISE OF V.I.P. OR ANY OTHER DESCRIPTION
********************************************************/
if (!defined('CPG_NUKE')) { exit; }
global $MAIN_CFG, $prefix, $db, $bgcolor1;
$language = $MAIN_CFG['global']['language'];
$module_name = "DF_Arcade";
require_once('language/'.$language.'/DF_Arcade.php');
$content = "";
$result = $db->sql_query("SELECT game_id, gname, gimage FROM ".$prefix."_rgarcade_games ORDER BY rand() LIMIT 0,1");
list($game_id, $gname, $gimage) = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$showpic = "<img src=\"modules/$module_name/screenshot/$gimage\" border=\"0\" alt=\""._RGAPLG."\" width=\"100\">";
$content .= "<div align=\"center\"><table width=\"100%\" border=\"1\" width=\"100%\" cellpadding=\"2\">";
$content .= "<tr><td align=\"center\" bgcolor=\"$bgcolor1\"><font class=\"small\">"._RGARNDG."</font></td></tr>";
$content .= "<tr><td align=\"center\"><a href=\"".getlink(''.$module_name.'&amp;func=play&amp;game_id='.$game_id.'')."\">$showpic<br/><font class=\"content\">$gname</font></a>";
$content .= "</td></tr></table></div>";
?>