Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-10-2005, 12:45 AM
hurrican hurrican is offline
 
Join Date: Feb 2004
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Passing Password to SigmaChat (Raidersoft)

I am using RaiderSoft's SigmaChat -- Remote Auth. System.. This works fine, except I want the users to be able to auto login.. How would I go about passing the 'password' field in this code? Anyone know the simplist way to pass this information?

This is currently in my "Chatbit" Template (Customized)
<applet
codebase="http://client0.sigmachat.com/current/"
code="Client.class" archive="scclient_en.zip"
width=600 height=400 MAYSCRIPT>
<param name="room" value="xxxxxx">
<param name="cabbase" value="scclient_en.cab">
<param name="username" value="$bbuserinfo[username]">
<param name="password" value="????????????????????">
<param name="autologin" value="yes">
</applet>
Reply With Quote
  #2  
Old 01-10-2005, 10:26 PM
hurrican hurrican is offline
 
Join Date: Feb 2004
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No one has any information on how to pass the users password?
Reply With Quote
  #3  
Old 01-11-2005, 06:26 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

checked that hack? https://vborg.vbsupport.ru/showthrea...light=sigma%2A

(edit: Sorry my bad, you're on vb2)
Reply With Quote
  #4  
Old 01-15-2005, 03:22 AM
hurrican hurrican is offline
 
Join Date: Feb 2004
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the script that I am currently using.. Anyone see why this code would not pass the password to the Raidersoft server?? Should I be using $md5password in the chatbit template??? I have tested that too, but it still will not auth.. any help is greatly appreciated!

PHP Code:
<?php

/*
   SigmaChat Authentication Script v1.0
   Tested with vBulletin 2.3.0, SigmaChat Platinum 7.1
   Copyright (C) 2003, RaiderSoft. All Rights Reserved.

   This script allows you to authenticate access to your SigmaChat
   Java Chat room via a vBulletin MySQL database.

   Place this file in the same directory as your vBulletin config.php
   file (usually /upload/admin/)

   This software is free for commercial, non-profit, and individual use.

   Please read included README.txt file for installation instructions.

   RaiderSoft Support Team
   support@raidersoft.com
*/

require_once('../admin/config.php');

$username = dbparam("username");
$password = dbparam("password");
$ip = param("ip");

$usergroupid = -1;
$retval = 0;

header('Content-type: text/plain');

db_connect();

$md5password = md5($password);

$query1 = "SELECT usergroupid FROM user WHERE username='$username' AND PASSWORD='$md5password'";
$result = mysql_query($query1, $dbcxn);
if($row = mysql_fetch_row($result))
{
   $usergroupid = $row[0];
   @mysql_free_result($result);

   $query2 = "SELECT canpostnew, cancontrolpanel FROM usergroup WHERE usergroupid=$usergroupid";
   $result = mysql_query($query2, $dbcxn);
   if($row = mysql_fetch_row($result))
   {
      $canpostnew = int($row[0]);
      $cancontrolpanel = int($row[1]);


      if($canpostnew > 0) { $retval = 1; }
      if($cancontrolpanel > 0) { $retval = 2; }
   }
}

echo "$retval\n";
db_disconnect();


/*
   Database Related Functions...
*/

function db_connect()
{
   global $dbcxn;
   global $servername, $dbusername, $dbpassword, $dbname;

   if(!($dbcxn = mysql_connect($servername, $dbusername, $dbpassword)))
      dferror("db_connect:mysql_connect");

   if(!(mysql_select_db("$dbname", $dbcxn)))
      auth_error("Error connecting to database.");
}

function db_disconnect()
{
   global $dbcxn;

   @mysql_close($dbcxn);
}

function db_executeQuery($query)
{
   global $dbcxn;

   $result = mysql_query($query, $dbcxn);
   @mysql_free_result($result);
}

function auth_error($errorstr)
{
   echo $errorstr;
}

/*
   CGI, Misc.. Related Functions...
*/

function param($cgiparam)
{
   $value = isset($_POST[$cgiparam])
            ? $_POST[$cgiparam]
            : $_GET[$cgiparam];

   return ini_get('magic_quotes_gpc')
          ? stripslashes($value)
          : $value;
}

function dbparam($cgiparam)
{
   $value = isset($_POST[$cgiparam])
            ? $_POST[$cgiparam]
            : $_GET[$cgiparam];

   return $value;
}

function int($strval)
{
   return intval($strval);
}

?>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:57 PM.


Powered by vBulletin® Version 3.9.0 Beta 2
Copyright ©2000 - 2017, vBulletin Solutions Inc.