Page 1 of 1

PhpFreeChat 1.3

Posted: Tue Oct 12, 2010 5:17 am
by sandarminaye
hi,
now i use PhpFreeChat 1.3 for my site. i had download it in http://www.phpfreechat.net/download and then install and modify.
it is easily for customize but i don't know for Admin setup and which folder that i can delete?
If u know , pls help me and give suggestion.

here are some of my coding ...

Code: Select all

<?php
	include "../mysql.php";
	$mysqlcon = new db_sql();
	$mysqlcon->connect();
	
	require_once dirname(__FILE__)."/src/phpfreechat.class.php";
	$params = array();
	$params["title"] = "StampsMyanmar Live Chat";
	
	if ( (isset($_COOKIE['a'])) && (isset($_COOKIE['b'])) )
	{
		$a = $_COOKIE['a'];
		
		if($_COOKIE['b']=='member')
		{
			$sql = " SELECT * FROM tablename WHERE field='$a' ";
			$row = mysql_query($sql) or die('MySQL error!');
			$rows = mysql_fetch_assoc($row);
			$nickname 	= $rows["nickname"];
		}
		else if($_COOKIE['b']=='admin')
		{
			$sql = "SELECT * FROM tablename WHERE field='$a' ";
			$row = mysql_query($sql) or die('MySQL error!');
			$rows = mysql_fetch_assoc($row);
		
			$nickname 	= $rows["nickname"];
		}
		else{}
		
		$params["nick"] = $nickname;
	}
	else
	{
		$params["nick"] = "";
	}
	
	//$params["nick"] = "guest".rand(1,1000);  // setup the intitial nickname
	
	$params['admins'] = array('Admin'  => 'type password',
                              'Second Admin' => 'type password');// setup the chat admins
	
	//$params['firstisadmin'] = true;
	//$params["isadmin"] = true; // makes everybody admin: do not use it on production servers ;)
	
	$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
	$params["debug"] = false;
	$chat = new phpFreeChat( $params );
?>

<html>
<body>
<table cellpadding="0" cellspacing="0" border="0" width="928" align="center" height="100%">
<tr><td height="400" valign="top">
			<div class="content">
			  <?php $chat->printChat(); ?>
			  <?php if (isset($params["isadmin"]) && $params["isadmin"]) { ?>
				<p style="color:red;font-weight:bold;">Warning: because of "isadmin" parameter, everybody is admin. Please modify this script before using it on production servers !</p>
			  <?php } ?>
			</div>
</td></tr>
</table>
</body>
</html>

Re: PhpFreeChat 1.3

Posted: Tue Oct 12, 2010 11:23 am
by Jonah Bron
for Admin setup and which folder that i can delete?
Sounds like that's your question, but I don't understand what you're asking. :?

Re: PhpFreeChat 1.3

Posted: Tue Oct 12, 2010 9:50 pm
by sandarminaye
Jonah Bron wrote:
for Admin setup and which folder that i can delete?
Sounds like that's your question, but I don't understand what you're asking. :?
hi , Jonah Bron .

yes , it is my question. i don't know how to do Admin Setup in Php Free Chat 1.3 and then after modify this package, which folder that i can delete.

i saw this following code in phpfreechat 1.3 f&q and i put it in my page. but it can't do.

$params['admins'] = array('Admin' => 'type password',
'Second Admin' => 'type password');// setup the chat admins


so, if u know how to do , pls reply me.