hello,
I've installed the phpfreechat script in my wordpress website www.manipurtv.com/chat but i try my best but cannot log in as an admin, can anyone please guide me how to get oper access
Moderators: OldWolf, re*s.t.a.r.s.*2
<?php
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Welcome To MANIPURTV CHAT ROOM";
$params["nick"] = "guest".rand(1,1000); // setup the intitial nickname
$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 );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>MANIPURTV NEWS - CHAT ROOM</title>
<link rel="stylesheet" title="classic" type="text/css" href="style/generic.css" />
<link rel="stylesheet" title="classic" type="text/css" href="style/header.css" />
<link rel="stylesheet" title="classic" type="text/css" href="style/footer.css" />
<link rel="stylesheet" title="classic" type="text/css" href="style/menu.css" />
<link rel="stylesheet" title="classic" type="text/css" href="style/content.css" />
</head>
<body>
<div class="header">
<img alt="phpFreeChat" src="http://manipurtv.com/wp-content/uploads/2010/12/mtvlogo3.png" class="logo2" />
</div>
<div class="menu">
<ul>
<li class="sub title">MANIPURTV</li>
<li>
<ul class="sub">
<li class="item">
<a href="http://www.manipurtv.com">HOME</a>
</li>
<?php if (file_exists(dirname(__FILE__)."/checkmd5.php")) { ?>
<li>
<a href="http://manipurtv.com/category/istv-news/">ISTV NEWS</a>
</li>
<?php } ?>
<!--
<li class="item">
<a href="admin/">Administration</a>
</li>
-->
</ul>
</li>
<li class="sub title">MENU</li>
<li>
<ul>
<li class="item">
<a href="http://manipurtv.com/category/celebrities/">CELEBRITIES</a>
</li>
<li class="item">
<a href="http://http://www.manipurtv.net/videos/all/latest">VIDEOS</a>
</li>
<li class="item">
<a href="http://http://www.manipurtv.net/audios/all/latest">SONGS</a>
</li>
<li class="item">
<a href="http://http://manipurtv.com/category/breaking-news/">BREAKING NEWS</a>
</li>
<li class="item">
<a href="http://www.http://manipurtv.com/games/">GAMES</a>
</li>
<li class="item">
<a href="http://http://www.manipurtv.net/photos/all/latest">PHOTOS</a>
</li>
</ul>
</li>
</ul>
<p class="partner">
<a href="http://www.manipurtv.net/static_page/12_Advertise"><img alt="http://www.manipurtv.net/static_page/12_Advertise" src="http://manipurtv.com/wp-content/uploads/2010/11/nongad.jpg" /></a><br/>
</p>
</div>
<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>
<div class="footer">
<span class=" 2010 MANIPUR NEWS TV – :. All Rights Reserved.">2010 MANIPUR NEWS TV – :. All Rights Reserved. :</span>
</div>
</body></html>
<?php
require_once('./wp-config.php');
$current_user = wp_get_current_user();
$user_name = addslashes($current_user->display_name);
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Welcome To MANIPURTV CHAT ROOM";
// this test if the user is registered and gives propper nick to the chat
if (!empty($user_name)){$params["nick"] = $user_name;
}
else
{
$ip = $_SERVER['REMOTE_ADDR'];
$desc = md5($ip);
$preview = substr($desc, 3, 6);
$preview = preg_replace("/[^0-9]/", '', $preview);
$params["nick"] = "guess".$preview;
}
if( current_user_can('delete_posts')){$params['isadmin'] = TRUE;}else{$params["isadmin"] = FALSE;}
$params["frozen_nick"] = TRUE;
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$chat = new phpFreeChat( $params );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>MANIPURTV NEWS - CHAT ROOM</title>
<link rel="stylesheet" title="classic" type="text/css" href="style/generic.css" />
<link rel="stylesheet" title="classic" type="text/css" href="style/header.css" />
<link rel="stylesheet" title="classic" type="text/css" href="style/footer.css" />
<link rel="stylesheet" title="classic" type="text/css" href="style/menu.css" />
<link rel="stylesheet" title="classic" type="text/css" href="style/content.css" />
</head>
<body>
<div class="header">
<img alt="phpFreeChat" src="http://manipurtv.com/wp-content/uploads/2010/12/mtvlogo3.png" class="logo2" />
</div>
<div class="menu">
<ul>
<li class="sub title">MANIPURTV</li>
<li>
<ul class="sub">
<li class="item">
<a href="http://www.manipurtv.com">HOME</a>
</li>
<?php if (file_exists(dirname(__FILE__)."/checkmd5.php")) { ?>
<li>
<a href="http://manipurtv.com/category/istv-news/">ISTV NEWS</a>
</li>
<?php } ?>
<!--
<li class="item">
<a href="admin/">Administration</a>
</li>
-->
</ul>
</li>
<li class="sub title">MENU</li>
<li>
<ul>
<li class="item">
<a href="http://manipurtv.com/category/celebrities/">CELEBRITIES</a>
</li>
<li class="item">
<a href="http://http://www.manipurtv.net/videos/all/latest">VIDEOS</a>
</li>
<li class="item">
<a href="http://http://www.manipurtv.net/audios/all/latest">SONGS</a>
</li>
<li class="item">
<a href="http://http://manipurtv.com/category/breaking-news/">BREAKING NEWS</a>
</li>
<li class="item">
<a href="http://www.http://manipurtv.com/games/">GAMES</a>
</li>
<li class="item">
<a href="http://http://www.manipurtv.net/photos/all/latest">PHOTOS</a>
</li>
</ul>
</li>
</ul>
<p class="partner">
<a href="http://www.manipurtv.net/static_page/12_Advertise"><img alt="http://www.manipurtv.net/static_page/12_Advertise" src="http://manipurtv.com/wp-content/uploads/2010/11/nongad.jpg" /></a><br/>
</p>
</div>
<div class="content">
<?php $chat->printChat(); ?>
</div>
<div class="footer">
<span class=" 2010 MANIPUR NEWS TV – :. All Rights Reserved.">2010 MANIPUR NEWS TV – :. All Rights Reserved. :</span>
</div>
</body></html>
Return to Joomla, Drupal, and Wordpress (v1.x)
Users browsing this forum: No registered users and 7 guests