Seeing i am on such a great role and my ideas are going over sooooo well *laughs*, here is another one that i think would be VERY useful.
An overview priv. This priv would allow leaders and asst leaders (and anyone the leader want to allow) to see other members overviews by clicking a tab. This would help leaders or trainers of a nation keep track and help new members get started. A new member could say ok what do i do now? and the leader could simply click on that members overview tab and see his status and then advise him what to do from there.
Members Overview
-
FireFrenzy
- Advanced Member
- Posts: 92
- Joined: Tue Jul 17, 2007 8:30 pm
yeah, I've got this working on my game, but I'm not sure of the security aspect, as I've learned programming autodidactically.
So I'm up to doing this myself, but before I make any changes, a quick question to Beatles and whomever else has more comprehensive and formal knowledge of the language:
My thought was to make the country name link to the status page, sending the variable 'user':
And switch the variable 'users' on the status page if the 'user' variable is sent:
Would this suffice, or is it insecure? I'm wondering how to go about this in a simple but sensible manner, and I have no knowledge of how other games have gone about this.
So I'm up to doing this myself, but before I make any changes, a quick question to Beatles and whomever else has more comprehensive and formal knowledge of the language:
My thought was to make the country name link to the status page, sending the variable 'user':
code: Select all
<?
$user = '&user='.$listclan[num]; //to display individual country Status pages
?>
<a href="?status<?=$user?><?=$authstr?>"><?=$listclan[empire]?></a></th>code: Select all
if (isset($_GET['user'])) {
$user = loadUser($_GET['user']);
if ($users[clan] == $user[clan])
$users = $user;
}- The Beatles
- Fear me for I am root
- Posts: 6285
- Joined: Tue May 24, 2005 8:12 pm
I believe loadUser already does database validation. But just to avoid null pointers I would stick in an "if($user)" check in case there isn't such a user.
Also, that is fine, but make sure you restore the $users variable by the time your page ends, or you will print the other user's closing status bar instead of your own. So e.g.
$backupUsers = $users;
...
$users = $backupUsers;
Also, you definitely need to check if $users[clan] is zero! Otherwise any unclanned empire gets free espionages on other unclanned empires.
Finally, it would be nice if the other person had a say in this. Set some sort of flag that is reset every time they join a new clan (say, $user['sharestatus'] if they want to allow the clan leader to be able to view their status). The button for toggling it could be on the status page "Allow clan officers to view" / "Disallow clan officers from viewing" "my status page".
Also, that is fine, but make sure you restore the $users variable by the time your page ends, or you will print the other user's closing status bar instead of your own. So e.g.
$backupUsers = $users;
...
$users = $backupUsers;
Also, you definitely need to check if $users[clan] is zero! Otherwise any unclanned empire gets free espionages on other unclanned empires.
Finally, it would be nice if the other person had a say in this. Set some sort of flag that is reset every time they join a new clan (say, $user['sharestatus'] if they want to allow the clan leader to be able to view their status). The button for toggling it could be on the status page "Allow clan officers to view" / "Disallow clan officers from viewing" "my status page".
:wq
-
FireFrenzy
- Advanced Member
- Posts: 92
- Joined: Tue Jul 17, 2007 8:30 pm
-
Members connected in real time
