FleaIM Ajax Based Asp & Php Chat Script Community
May 19, 2012, 03:34:40 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Fleaim v1.3 development is in progress.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Limit on number of users?  (Read 2790 times)
willem
Newbie
*
Posts: 2


View Profile Email
« on: June 13, 2009, 08:29:03 PM »

Hi,

Is the number of users limited to 50?

i also see the users left in the im system info.

and the sql shows:
INSERT INTO `usernum` VALUES (51,10049,1);

does this prevent anymore people from registering when it reaches 51?

thank you
« Last Edit: June 16, 2009, 05:55:40 AM by fleaim » Logged
kartol
Newbie
*
Posts: 1


View Profile Email
« Reply #1 on: July 13, 2009, 02:24:45 AM »

The solution is simple. Log in to database. following query in SQL then replicated by the Enter


Quote
INSERT INTO `usernum` VALUES (52,10050,1);
INSERT INTO `usernum` VALUES (53,10051,1);
INSERT INTO `usernum` VALUES (54,10052,1);
INSERT INTO `usernum` VALUES (55,10053,1);
INSERT INTO `usernum` VALUES (56,10054,1);
Logged
Coolchick
Newbie
*
Posts: 4


View Profile
« Reply #2 on: August 09, 2009, 08:06:22 PM »

What is code to change it to unlimited.
who wants to keep changing the database.

I rather correct this to unlimited "before" i upload it to database.

thanks for letting me know.
Logged
lernerda
Newbie
*
Posts: 1


View Profile
« Reply #3 on: August 13, 2009, 03:57:26 PM »

I am not sure about the PHP version, but in asp I was able to create an unlimited version of users.

In the ASP version, in the pages folder, the page regresult has the following code
Code:
Call DataBegin()
sql = "select top 1 * from usernum where isok = 1 order by id"
oRs.Open sql,oConn,1,3
If Not(oRs.Bof And oRs.Eof) Then
intNum = oRs("Num")
oRs("isok") = 2
oRs.Update
oConn.Execute("insert into [user] (username,userpass,userid,useremail,userface,usersign,usergender,lastonlinetime) values ('"&strNick&"','"&MD5(strPass)&"','"&intNum&"','"&strEmail&"','"&strFace&"','"&strSign&"','"&intGender&"','"&Now()&"')")
oConn.Execute("insert into userconfig (userid) values ('"&intNum&"')")
oConn.Execute("insert into usermsg (fromid,toid,msgcontent,typeid,msgaddtime) values ('10000','"&intNum&"','Welcome To FleaIM. :)','1','"&Now()&"')")
Call AddFriend(intNum,10000)
regResult = "Registration Success"
regInfo = "Note That Password Retrieving Not Supported By Far. Please Keep Your Password In Mind"
Else
regResult = "Sorry, Registration Failed"
regInfo = "Registration NOT Available For This Time"
End If
oRs.Close()
Set oRs = Nothing
Call DataEnd()

this code looks to see if 50 users have been registered, and if so,bypasses the insertion of a new registrant.


I changed it to

Code:
Call DataBegin()
sql = "select * from usernum"
oRs.Open sql,oConn,1,3

oRs.movelast
intNum = oRs("Num") +1
oConn.Execute("insert into [usernum] (Num, isok) values (" & intNum & ", 2)")
sql = "select top 1 * from usernum where isok = 1 order by id"
oConn.Execute("insert into [user] (username,userpass,userid,useremail,userface,usersign,usergender,lastonlinetime) values ('"&strNick&"','"&MD5(strPass)&"','"&intNum&"','"&strEmail&"','"&strFace&"','"&strSign&"','"&intGender&"','"&Now()&"')")
oConn.Execute("insert into userconfig (userid) values ('"&intNum&"')")
oConn.Execute("insert into usermsg (fromid,toid,msgcontent,typeid,msgaddtime) values ('10000','"&intNum&"','Welcome To FleaIM. :)','1','"&Now()&"')")
Call AddFriend(intNum,10000)
regResult = "Registration Success"
regInfo = "Note That Password Retrieving Not Supported By Far. Please Keep Your Password In Mind"

oRs.Close()
Set oRs = Nothing
Call DataEnd()

There is similar code in the php version, that could be also changed


Logged
Coolchick
Newbie
*
Posts: 4


View Profile
« Reply #4 on: October 13, 2009, 07:39:22 PM »

i would need the pHP version on what and how to change to unlimited
but can not keep going back to change or add on every time.

I am not sure i understand why this would even be coded that way when one could have coded it the other, which is what people would want and need.

I still would need to know what to change to correct this before it can be uploaded.

if anyone knows, please let me know!

thanks
 Grin
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!