Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server
You last visited: Today at 14:04

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Question]PhP Page

Discussion on [Question]PhP Page within the Shaiya Private Server forum part of the Shaiya category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2012
Posts: 47
Received Thanks: 15
Exclamation [Question]PhP Page

Hello,

I am trying to make a php script to view staff members and if they are on- or offline. Now I've been starting a little and tried out a bit, but I'm getting stuck already. What I am trying to do is to let the php script select the Leave of a certain staff member and 'undertake' action when the Leave status is 1 ('cause this means that the staff member is online, right?)

Code:
<?

    $dbhost = $_ENV['LOCAL_DOMAIN'];
    $dbuser = 'dbuser';
    $dbpwd  = 'dbpassword';

    // connect to SQL server
    if (!$link = @mssql_connect("$dbhost","$dbuser","$dbpwd"))
        {
            print "Failed to connect to MSSQL server.";
        };

    // select database
    if (!@mssql_select_db("PS_UserData",$link))
        {
            print "Failed to select database.";
        };

    // check if staff member is online
    $result1  = @mssql_query("SELECT Leave FROM Users_Master WHERE UserID='STAFF-ACCOUNTNAME' IF Leave='1'",$link);
	$result2  = @mssql_query("SELECT Leave FROM Users_Master WHERE UserID='STAFF-ACCOUNTNAME' IF Leave='1'",$link);
	$result3  = @mssql_query("SELECT Leave FROM Users_Master WHERE UserID='STAFF-ACCOUNTNAME' IF Leave='1'",$link);
	$result4  = @mssql_query("SELECT Leave FROM Users_Master WHERE UserID='STAFF-ACCOUNTNAME' IF Leave='1'",$link);
	$result5  = @mssql_query("SELECT Leave FROM Users_Master WHERE UserID='STAFF-ACCOUNTNAME' IF Leave='1'",$link);
	$result6  = @mssql_query("SELECT Leave FROM Users_Master WHERE UserID='STAFF-ACCOUNTNAME' IF Leave='1'",$link);


?>
This is what I got until now, I don't know if I'm doing it right though ('cause I'm quite a big newbie to php scripting). Please correct me if I am wrong, I do not expect you to do it all('cause I want to learn it by myself too :P) but a hint would be appreciated. Could anyone help me a bit further (when I am right) or correct me when I'm wrong please?

Thanks in Advance
Prideness is offline  
Reply


Similar Threads Similar Threads
[Question]Updating and php page question
01/08/2013 - Shaiya Private Server - 7 Replies
Hello, I got 2 questions. First I'll do the update question: My host-pc I am currently hosting my test server on, drops his connection like twice a week(at least this week). That doesn't matter that much, but the problem is that the IP also changes. That's the problem, now my question is, can I change the IP that's set in the game.exe (and/or other files in my client) through an update? If yes, how would this work. Do I have to do the same thing as a regular update, in this case, make...
[question] How to change country at payment page( uridium page)
10/06/2012 - DarkOrbit - 7 Replies
Hi! epvp :) i want to buy premium, but i see the price 6 euro for one month. normally i buy premium for 1 month is 5 euro. 6 euro because the country, someone know how to change the country? :confused: thankyou before :) 'Laa
[Question] Reg Page
06/22/2011 - CO2 Private Server - 1 Replies
Hello, So my server today has a big problem. There are couple ppl comming on my server chatbox sayin that they will hack my website. They failed so far, but one came today and he ddos'ed the reg page. So my question is there a way to stop em from ddosing the site again. Thanks, AlienGod
Reg Page Question
01/20/2010 - Dekaron Private Server - 7 Replies
I'm running Windows Server 2003, Enterprise Edition with IIS version 6.0. My reg page is not writing new accounts to my account database. It says that is was successful (with no error messages) but it's not working. The reg page is reading the database. When I enter a username that is already in the database, I get the error stating that it exists and to choose another one. I have checked the permissions, odbc connection, the config files, and just about everything else that I can think to...
[Question]Reg Page
11/23/2009 - CO2 Private Server - 4 Replies
Yeah yeah some of you guys hate me now but i dont care im just here to learn Anyways for the 5165 source >.< It doesent use AppServ or navicat but how do i use the WebServer? With my ip im like so lost on how to use it lol



All times are GMT +1. The time now is 14:07.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.