4 Replies - 1266 Views - Last Post: 05 June 2010 - 08:20 PM Rate Topic: -----

#1 adgarci  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 96
  • Joined: 26-August 09

Webpage not displaying

Posted 04 June 2010 - 07:37 PM

I'm revamping a Battle.Net clan website to include more StarCraft II pictures.

My problem is the Webmaster account can log in, but not out. No one else can log in.

The members page will not display. The user control options do nothing. the url directs are all correct.

if($y != "1") {
$membername = $_SESSION['membername'];

$query = "UPDATE {$dbprefix}members SET loggedin = '0', remember = '0' WHERE username = '$membername'";
$result = mysql_query($query)
	or die(mysql_error());


unset($_SESSION['membername']);
unset($_SESSION['memberpass']);
//session_destroy();

echo "
<script language=\"Javascript\"> 
window.location.href = 'index.php?p=Logout&y=1'; 
</script>
";
}



Once $y becomes 1 it shows a conformation.

Navigation
<a href='index.php' class='menufont'>Home</a>
<a href='index.php?p=News' class='menufont'>News</a>
<a href='console.php' class='menufont'>Console</a>
<a href='index.php?p=ChatBoard' class='menufont'>Chat Board</a>
<a href='index.php?p=Members' class='menufont'>Members</a>
<a href='index.php?p=Ranks' class='menufont'>Rankings</a>
<a href='index.php?p=Webbot' class='menufont'>Webbot</a>
<a href='index.php?p=Rules' class='menufont'>Rules</a>
<a href='index.php?p=Diplomacy' class='menufont'>Diplomacy</a>
<a href='index.php?p=ReqDiplomacy' class='menufont'>Req. Diplomacy</a>
<a href='index.php?p=History' class='menufont'>History</a>
<a href='index.php?p=PastWars' class='menufont'>Past Wars</a>
<a href='index.php?p=HallofFame' class='menufont'>Hall Of Fame</a>
<a href='index.php?p=HallofShame' class='menufont'>Hall Of Shame</a>
<a href='index.php?p=Heroes' class='menufont'>Heroes</a>
<a href='index.php?p=ClanLegends' class='menufont'>Clan Legends</a>
<a href='index.php?p=MOTM' class='menufont'>MOTM</a>
<a href='index.php?p=Squads' class='menufont'>Squads</a>
<a href='index.php?p=Calendar' class='menufont'>Calendar</a>
<a href='index.php?p=Challenges' class='menufont'>Challenges</a>
<a href='index.php?p=MemberPics' class='menufont'>Member Pics</a>
<a href='index.php?p=LostPassword' class='menufont'>Lost Password</a>



$p is then checked on the index.php to find out what pages are included rather than the home page.

The same thing is basically used in the control panels. The only difference is that the page URLs are stored in the database, the links just return an ID. A function then reruns the URL.

None of the pages display. Only include/homepage.php(?p=Homepage) and console.php show up. I really can't think of anything else to try.

To solve the logging out problem I tried to use session_destroy with no anvil.

Thanks in advance.

The site is here.

This post has been edited by adgarci: 04 June 2010 - 07:39 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Webpage not displaying

#2 webpeater  Icon User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 95
  • Joined: 04-June 10

Re: Webpage not displaying

Posted 04 June 2010 - 07:42 PM

View Postadgarci, on 04 June 2010 - 06:37 PM, said:

I'm revamping a Battle.Net clan website to include more StarCraft II pictures.

My problem is the Webmaster account can log in, but not out. No one else can log in.

The members page will not display. The user control options do nothing. the url directs are all correct.

if($y != "1") {
$membername = $_SESSION['membername'];

$query = "UPDATE {$dbprefix}members SET loggedin = '0', remember = '0' WHERE username = '$membername'";
$result = mysql_query($query)
	or die(mysql_error());


unset($_SESSION['membername']);
unset($_SESSION['memberpass']);
//session_destroy();

echo "
<script language=\"Javascript\"> 
window.location.href = 'index.php?p=Logout&y=1'; 
</script>
";
}



Once $y becomes 1 it shows a conformation.

Navigation
<a href='index.php' class='menufont'>Home</a>
<a href='index.php?p=News' class='menufont'>News</a>
<a href='console.php' class='menufont'>Console</a>
<a href='index.php?p=ChatBoard' class='menufont'>Chat Board</a>
<a href='index.php?p=Members' class='menufont'>Members</a>
<a href='index.php?p=Ranks' class='menufont'>Rankings</a>
<a href='index.php?p=Webbot' class='menufont'>Webbot</a>
<a href='index.php?p=Rules' class='menufont'>Rules</a>
<a href='index.php?p=Diplomacy' class='menufont'>Diplomacy</a>
<a href='index.php?p=ReqDiplomacy' class='menufont'>Req. Diplomacy</a>
<a href='index.php?p=History' class='menufont'>History</a>
<a href='index.php?p=PastWars' class='menufont'>Past Wars</a>
<a href='index.php?p=HallofFame' class='menufont'>Hall Of Fame</a>
<a href='index.php?p=HallofShame' class='menufont'>Hall Of Shame</a>
<a href='index.php?p=Heroes' class='menufont'>Heroes</a>
<a href='index.php?p=ClanLegends' class='menufont'>Clan Legends</a>
<a href='index.php?p=MOTM' class='menufont'>MOTM</a>
<a href='index.php?p=Squads' class='menufont'>Squads</a>
<a href='index.php?p=Calendar' class='menufont'>Calendar</a>
<a href='index.php?p=Challenges' class='menufont'>Challenges</a>
<a href='index.php?p=MemberPics' class='menufont'>Member Pics</a>
<a href='index.php?p=LostPassword' class='menufont'>Lost Password</a>



$p is then checked on the index.php to find out what pages are included rather than the home page.

The same thing is basically used in the control panels. The only difference is that the page URLs are stored in the database, the links just return an ID. A function then reruns the URL.

None of the pages display. Only include/homepage.php(?p=Homepage) and console.php show up. I really can't think of anything else to try.

To solve the logging out problem I tried to use session_destroy with no anvil.

Thanks in advance.

The site is here.


I don't really get what you mean.
What is the problem ?

Administrator can not logout ?
No pages are displayed?

You say so many things, i dont get the big problem.
Was This Post Helpful? 0
  • +
  • -

#3 adgarci  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 96
  • Joined: 26-August 09

Re: Webpage not displaying

Posted 04 June 2010 - 08:10 PM

Sorry, I've been at this all day.

Problems
1 )I was able to log the Webmaster account in, but when I added the leaders back in, they could not log in. I them made a test account, and could not log in and I have tried to log out the Webmaster account with the pages, @session_destroy(), and manually in the database changing loggedin to 0 from 1.
2 )When an account is logged in (more so high ranking members) the can click the "Console" nav item taking them to a page that allows them to perform certain commands, I.E. send a PM. None of these pages display.
3 )The only two links that actually work in the nav bar are: "Home" and "Console" (The console at least works for me because I am logged in, I'm not sure how it would work for all of you.)
4 )Minor display problems.

How it's all displayed
1 )The index.php page is set up so that the variable p can be used for navigation.
For example index.php?p=Members would use the include statement to implement the members page with the _functions.php,
2 )config.php, header.php, footer.php pages.
The console page does the same thing except the page URLs are stored in the database, and found using a function called "getConsoleInfoById($needed, $idnum)"
3 )console.php and index.php are both in the main directory. the console commands are in: /include/console while index pages are in /include/

Thanks for your help.

Again the URL is here.

EDIT: I was able to log out the Webmaster account in the database, but now I can't get back in.

This post has been edited by adgarci: 04 June 2010 - 08:29 PM

Was This Post Helpful? 0
  • +
  • -

#4 webpeater  Icon User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 95
  • Joined: 04-June 10

Re: Webpage not displaying

Posted 04 June 2010 - 09:02 PM

View Postadgarci, on 04 June 2010 - 07:10 PM, said:

Sorry, I've been at this all day.

Problems
1 )I was able to log the Webmaster account in, but when I added the leaders back in, they could not log in. I them made a test account, and could not log in and I have tried to log out the Webmaster account with the pages, @session_destroy(), and manually in the database changing loggedin to 0 from 1.
2 )When an account is logged in (more so high ranking members) the can click the "Console" nav item taking them to a page that allows them to perform certain commands, I.E. send a PM. None of these pages display.
3 )The only two links that actually work in the nav bar are: "Home" and "Console" (The console at least works for me because I am logged in, I'm not sure how it would work for all of you.)
4 )Minor display problems.

How it's all displayed
1 )The index.php page is set up so that the variable p can be used for navigation.
For example index.php?p=Members would use the include statement to implement the members page with the _functions.php,
2 )config.php, header.php, footer.php pages.
The console page does the same thing except the page URLs are stored in the database, and found using a function called "getConsoleInfoById($needed, $idnum)"
3 )console.php and index.php are both in the main directory. the console commands are in: /include/console while index pages are in /include/

Thanks for your help.

Again the URL is here.

EDIT: I was able to log out the Webmaster account in the database, but now I can't get back in.



How do you do your login / logout ?
Was This Post Helpful? 0
  • +
  • -

#5 adgarci  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 96
  • Joined: 26-August 09

Re: Webpage not displaying

Posted 05 June 2010 - 08:20 PM

I use a <input> wrapped in a <form method='post'>.

The log in page takes the password and username from the $_POST array and makes a database query to check the login information, days since last login, and inactive status.

After it updates the user's row "logged in = 1", "remember = 1", "last login = time()", "totallogins = $totallogins", "ip = $ip".

If passed, the page then uses the $_SESSION array and goes to the console.

If failed it goes into the IP column and updates that IPs failed login attempts, if that reaches a certain number, then the ip cannot access the site for one hour. The login warning only happened when the site thought that an account was disabled.

I don't think the site is doing anything with any of the information.

If you need it, I can add an account for you to try.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1