[web] Need psuedo-code for Game Server CP (php/mysql)

Started by
0 comments, last by Kylotan 16 years, 2 months ago
Okay so basically I am trying to write an extremely simple control panel for my clients to use to manage their game servers. I am doing this with php/mysql and have a pretty good idea of what I am doing, but need some feedback and help. Database Table Fields - user_id(int10), user_name(char20), user_password(char32), master_server(char15), game_server(char15), rcon_password(char32) Basically what I am doing is storing the master server IP address which is the address of the dedicated server that the game servers are run from. I mainly keep this stored because it has the shell scripts for each server on it to start, stop, restart, etc the game server. The game_server is the ip:port of the actual game server, like 213.45.234.198:27015 for example. Then the rcon password is just the password they use for their remote console. I have started writing the login and panel using sessions but I am getting a bit confused. When I make the actual control page, do I just create a template of it, then use the session to make the links relative to the user? This control panel will be showing them the status of their game servers (up/down), the option to start, restart, or stop the game servers, and a few other little things. Do I need to store all of this in a session, or do I just store their user_id in a session, then query the database when the Control Panel loads for all data related to that user_id?
Advertisement
The session identifies the user. The rest of the data you want should come from the database and written into the page. Storing data on the session is purely for what is literally session data - ie. stuff you expect to be valid for the duration of the user's session, no more, no less.

This topic is closed to new replies.

Advertisement