Jump to content

Kevo89

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Kevo89's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yes i have... like it said it puts everyone as admin and i dont want that.. MODS... sorry for posting in the wrong spot.
  2. I can load whole code if you want to so you will have better understanding... Ima do it any ways.. <?php require_once dirname(__FILE__)."/src/phpfreechat.class.php"; $params = array(); $params["title"] = "Web Chat"; $params["nick"] = "guest".rand(1,1000); // setup the intitial nickname $params['firstisadmin'] = false; //$params["isadmin"] = false; // makes everybody admin: do not use it on production servers $params['admins'] = array('Kevo' => 'Test', 'boby' => 'bobypw'); $params["theme"] = "zilveer"; $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat $params["debug"] = false; $params["channels"] = array("HTML"); $params["frozen_channels"] = array("HTML","room1","room2","HTML5", "PHP", "Java", "CSS", "Flash"); $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>phpFreeChat- Sources Index</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" /> <?php $chat->printJavascript(); ?> <?php $chat->printStyle(); ?> <style type="text/css"> body { background-color: #333; } </style> </head> <body> <div class="header"> Web Information Chat <br /><font color="#FFCC33" size="2">// Bare with me, I am still woking on the site, please enjoy and read rules //</font> </div> <div class="menu"> <ul> <li class="sub title">General</li> <li> <ul class="sub"> <li class="item"> <a href="#">Rules</a> <font color="#FFCC33" size="2">//Coming Soon//</font> </li> <!-- <li class="item"> <a href="admin/">Administration</a> </li> --> </ul> </li> <li class="sub title">Rooms</li> <li><a href="#" onclick="pfc.sendRequest('/join HTML');">HTML</a></li> <li><a href="#" onclick="pfc.sendRequest('/join HTML5');">HTML5</a></li> <li><a href="#" onclick="pfc.sendRequest('/join PHP');">PHP</a></li> <li><a href="#" onclick="pfc.sendRequest('/join Java');">Java</a></li> <li><a href="#" onclick="pfc.sendRequest('/join CSS');">CSS</a></li> <li><a href="#" onclick="pfc.sendRequest('/join Flash');">Flash</a></li> </ul> </li> </ul> <p class="partner"> </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 } ?> <?php if (isset($params['admins'])) { ?> <p style="color:red;font-weight:bold;">Testing</p> <?php } ?> </div> <div class="footer"> <span class="partners">Web Information Chat</span> </div> </body></html> Ok.. so what i have at the top are paramaters... $params['admins'] = array('Kevo' => 'Test', 'boby' => 'bobypw'); this is for when the admin comes into chat and he can change is status form guest/member to admin. Now down below i have <?php if (isset($params['admins'])) { ?> <p style="color:red;font-weight:bold;">Testing</p><?php } ?> , this for adding a list of commands for admins to see when they change their status to admins, the others cannot view the command list... this what i am trying to do. I hope this make sense and thanks for all the help. I have also tried using echo as well but was showing all the time... maybe i might have something wrong.
  3. humm... doesnt seem to work... :-\
  4. this is what i have a basic <?php if('admins') { echo "display admin options"; } ?> its showing the echo statement all the time... what am i missing?
  5. I set the users for admin like so... $params['admins'] = array('Kevo' => 'Yes', 'boby' => 'bobypw'); etc.. Everyone esle is a guest... And the admins has to put in their passwords to become admins.
  6. Im working on a code $params['admins'] = array('Kevo' => 'Password); and i want to show a list of admin commands in a echo in a table when the user logs in as a admin, and non admins (guest) do not see the list.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.