Location: PHPKode > scripts > IPB Chat Module > 123flashchat.php
<?php
/***************************************************************************
 *                            123flashchat.php
 *                            -------------------
 *   begin                : Friday, Apr 30, 2004
 *   copyright            : (C) 2003 TopCMM Software
 *   email                : hide@address.com
 *   version		  : 4.5.0
 *   
 *   123 Flash Chat Server - IPB integrated mod
 *
 ***************************************************************************/
 
/********* please modify your parameters ---- begin  ****************/

$chat_client_root_path = "";
$swf_file_name = "123flashchat.swf";


/********* please modify your parameters ---- end  ****************/

define( 'ROOT_PATH', "./" );

// Enable module usage?
// (Vital for some mods and IPB enhancements)

define ( 'USE_MODULES', 1 );

//-----------------------------------------------
// NO USER EDITABLE SECTIONS BELOW
//-----------------------------------------------

define ( 'IN_IPB', 1 );
 
error_reporting  (E_ERROR | E_WARNING | E_PARSE);
set_magic_quotes_runtime(0);


class info {

	var $member     = array();
	var $input      = array();
	var $session_id = "";
	var $base_url   = "";
	var $vars       = "";
	var $skin_id    = "0";     // Skin Dir name
	var $skin_rid   = "";      // Real skin id (numerical only)
	var $lang_id    = "en";
	var $skin       = "";
	var $lang       = "";
	var $server_load = 0;
	var $version    = "v1.3.1 Final";
	var $lastclick  = "";
	var $location   = "";
	var $debug_html = "";
	var $perm_id    = "";
	var $forum_read = array();
	var $topic_cache = "";
	var $session_type = "";

	function info() {
		global $sess, $std, $DB, $INFO;
		
		$this->vars = &$INFO;
		
		$this->vars['TEAM_ICON_URL']   = $INFO['html_url'] . '/team_icons';
		$this->vars['AVATARS_URL']     = $INFO['html_url'] . '/avatars';
		$this->vars['EMOTICONS_URL']   = $INFO['html_url'] . '/emoticons';
		$this->vars['mime_img']        = $INFO['html_url'] . '/mime_types';

	}
}

//--------------------------------
// Import $INFO, now!
//--------------------------------

$INFO = array();

require ROOT_PATH."conf_global.php";



//--------------------------------
// Require our global functions
//--------------------------------

require ROOT_PATH."sources/functions.php";

$std   = new FUNC;
$sess  = new session();

//--------------------------------
// Load the DB driver and such
//--------------------------------

$INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver'];

$to_require = ROOT_PATH."sources/Drivers/".$INFO['sql_driver'].".php";
require ($to_require);

$DB = new db_driver;

$DB->obj['sql_database']     = $INFO['sql_database'];
$DB->obj['sql_user']         = $INFO['sql_user'];
$DB->obj['sql_pass']         = $INFO['sql_pass'];
$DB->obj['sql_host']         = $INFO['sql_host'];
$DB->obj['sql_tbl_prefix']   = $INFO['sql_tbl_prefix'];

$DB->obj['debug']            = ($INFO['sql_debug'] == 1) ? $_GET['debug'] : 0;

// Get a DB connection

$DB->connect();


$ibforums->member     = $sess->authorise();


//echo $ibforums->member['name'] . " -- " . $ibforums->member['password']; exit;

if (($ibforums->member['name'] == "Guest") && ($ibforums->member['password'] == ""))
{
	
	$swf_url = ($chat_client_root_path == "") ? $swf_file_name : $chat_client_root_path.$swf_file_name."?init_root=".$chat_client_root_path;
}
else
{
	$swf_url = $swf_file_name."?md5=true&init_user=".$ibforums->member['name']."&init_password=".$ibforums->member['password'];
	
	$swf_url = ($chat_client_root_path == "") ? $swf_url : $swf_url."&init_root=".$chat_client_root_path;
}

?>
<html>
<head>
<title>Chat</title>
</head>
<style type="text/css">
<!--
BODY {	margin:0; }
-->
</style>
<body bgcolor="#FFFFFF">
<script language="javascript" src="123flashchat.js"></script>
<script language="javascript">  
	openSWF('<? echo $swf_url; ?>','100%','100%');
</script>
<div id="flashchat">
	<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="634" height="476">
  <param name=movie value="<? echo $swf_url; ?>">
  <param name=quality value=high>
  <param name=menu value=false>
  <param name=scale value=noscale>
  <embed src="<? echo $swf_url; ?>" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="634" height="476" menu="false" scale="noscale">
  </embed> 
</object>
</noscript>
</div>
</body>
</html>
Return current item: IPB Chat Module