Jump to content

Web page not showing correctly


wezze

Recommended Posts

I have a login script from the internet i modified some stuff when not logged in the page shows like it should but when logged in it skips some html code any ideas?

 

http://mcbevers.be/login/index.php

 

user test1

pass test

 

 

CODE

 

 

<?

include("include/session.php");

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>

<title>Mc Bevers home</title>

<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen"/>

<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

<!--<link rel="stylesheet" type="text/css" href="css/styles.css" />-->

<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

<script type="text/javascript" src="script.js"></script>-->

</head>

<body>

<div id="wrapper">

<nav>

<ul class="lang">

<li><a href="../indexnl.html" class="nl">Nl</a></li>

<li class="last"><a href="../indexfr.html" class="fr">Fr</a></li>

</ul>

 

<ul class="menu">

<li><a class="active" title="home" href="../indexnl.html">Home</a></li>

<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>

<li><a title="Album" href="../albumnl.html">Album</a></li>

<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>

<li><a title="Contact" href="../contactnl.html">Contact</a></li>

</ul>

</nav>

 

<header>

<h1><a title="html5 template" href="../index.html">Mc Bevers</a></h1>

</header>

 

<section id="main" class="clearfix">

 

<section id="content">

<article>

<?

/**

* User has already logged in, so display relavent links, including

* a link to the admin center if the user is an administrator.

*/

if($session->logged_in){

echo '<h1><img src="images/lock_unlocked.png" width="32" height="32">Logged In</h1>';

 

echo "<table width='600' cellpadding='5' cellspacing='5' border='1'>";

echo "<p>Welcome <b>$session->username</b></p> <br/><br/>"

."<tr><td>[<a href=\"userinfo.php?user=$session->username\">My Account</a>]</td></tr>"

."<tr><td>[<a href=\"useredit.php\">Edit Account</a>]</td></tr>";

if($session->isAdmin()){

echo "<tr><td>[<a href=\"admin/admin.php\">Admin Center</a>]</td></tr>";

echo "<tr><td>[<a href=\"../gastenboek/admin/index.php\">Gastenboek</a>]</td></tr>";

echo "<tr><td>[<a href=\"../livre d'or/admin/index.php\">livre d'or</a>]</td></tr>";

echo "<tr><td>[<a href=\"../upload/upload.form.php\">upload</a>]</td></tr>";

}

echo "<tr><td>[<a href=\"process.php\">Logout</a>]</td></tr>";

}

else{

?>

 

<?

/**

* User not logged in, display the login form.

* If user has already tried to login, but errors were

* found, display the total number of errors.

* If errors occurred, they will be displayed.

*/

if($form->num_errors > 0){

echo "<p><font size=\"2\">".$form->num_errors." error(s) found</font></p>";

}

?>

<section id="form1">

<h3>Login</h3>

<form action="process.php" method="post">

<p><label>Gebruikers naam</label></p>

<input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"><? echo $form->error("user"); ?>

<p><label>Wachtwoord</label></p>

<input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"><? echo $form->error("pass"); ?>

<p><label>Onthoud mij     </label><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>

<input type="hidden" name="sublogin" value="1">

<p><input type="submit" value="Login"></p>

<!--<font size="2">[<a href="forgotpass.php">Wachtwoord vergeten?</a>]</font>

<p>Nog niet geregistreerd? <a href="register.php">Aanmelden!</a></p>-->

</form>

</section>

</article>

</section>

 

<aside id="sidebar">

 

<h3>Links</h3>

<ul class="clearfix">

<li><a title="Home" href="../indexnl.html">Home</a></li>

<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>

<li><a title="Album" href="../albumnl.html">Album</a></li>

<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>

<li><a title="Contact" href="../contactnl.html">Contact</a></li>

</ul>

 

 

<h3></h3>

<ul class="clearfix">

<!--<li><a title="twitter" href="index.html">Twitter</a></li>-->

<li><a title="Inschrijven" href="../inschrijvennl.html">Inschrijven</a></li>

<li><a title="Gastenboek" href="gastenboek/guestbook.php">Gastenboek</a></li>

<li><a title="Facebook" href="http://www.facebook.com/profile.php?id=100003840519242&ref=tn_tnmn#" class="new_window">Facebook</a></li>

</ul>

 

</aside>

 

</section>

 

<footer>

 

<section id="footertop">

 

<aside class="footer-column">

<h4>Info</h4>

Html5 en css3 beste resultaat in google chrome.

 

</aside>

 

<aside class="footer-column">

<h4>Mc bevers</h4>

<address>

<span>Postcode:</span>1547<br/>

<span>Land:</span>Belgie<br/>

<span>Plaats:</span>Bever<br/>

<!--<span>Telefoon 1:</span>0<br/>

<span>Telefoon 2:</span>0<br/>

<span>Fax:</span>0<br/>-->

<span>Email:</span><a href="mailto:info@mcbevers.be">info@mcbevers.be</a>

</address>

</aside>

 

</section>

 

<!--<section id="copyright">

<h4>Copyright</h4>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta.</p>

</section>-->

 

<section id="banners">

<ul class="banners">

<li><span><span><span><img src="../images/icon1.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>

<li><span><span><span><img src="../images/icon2.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>

<li class="last"><span><span><span><img src="../images/icon3.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>

</ul>

</section>

 

<br>

 

<section id="templatecopy">

<p>Edited by DeWezze</p>

<p>Template design by <a title="derby web design" href="http://www.tristarwebdesign.co.uk">tristar web design</a></p>

</section>

<?

}

 

/**

* Just a little page footer, tells how many registered members

* there are, how many users currently logged in and viewing site,

* and how many guests viewing site. Active users are displayed,

* with link to their user information.

*/

echo "<center><b>Member Total:</b>".$database->getNumMembers()."<br/></center>";

echo "<center>There are $database->num_active_users registered members and ";

echo "$database->num_active_guests guests viewing the site.</center>";

 

include("login/include/view_active.php");

 

?>

</footer>

 

</div>

 

</body>

</html>

 

thx

Link to comment
Share on other sites

if($session->logged_in){
echo '<h1><img src="images/lock_unlocked.png" width="32" height="32">Logged In</h1>';

echo "<table width='600' cellpadding='5' cellspacing='5' border='1'>";
echo "<p>Welcome <b>$session->username</b></p> <br/><br/>"
."<tr><td>[<a href=\"userinfo.php?user=$session->username\">My Account</a>]</td></tr>"
."<tr><td>[<a href=\"useredit.php\">Edit Account</a>]</td></tr>";
if($session->isAdmin()){
echo "<tr><td>[<a href=\"admin/admin.php\">Admin Center</a>]</td></tr>";
echo "<tr><td>[<a href=\"../gastenboek/admin/index.php\">Gastenboek</a>]</td></tr>";
echo "<tr><td>[<a href=\"../livre d'or/admin/index.php\">livre d'or</a>]</td></tr>";
echo "<tr><td>[<a href=\"../upload/upload.form.php\">upload</a>]</td></tr>";   
}
echo "<tr><td>[<a href=\"process.php\">Logout</a>]</td></tr>";
}

 

This is what is displayed when the user logs into the system, it's doing what it's suppose to. If you want the rest of the HTML to display then you have to also include here. That code is sloppy so I hope you didn't pay for it.

Link to comment
Share on other sites

<?php
include("include/session.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Mc Bevers home</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen"/>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--<link rel="stylesheet" type="text/css" href="css/styles.css" />-->
<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="script.js"></script>-->
</head>
<body>
<div id="wrapper">
<nav>
<ul class="lang">
<li><a href="../indexnl.html" class="nl">Nl</a></li>
<li class="last"><a href="../indexfr.html" class="fr">Fr</a></li>
</ul>

<ul class="menu">
<li><a class="active" title="home" href="../indexnl.html">Home</a></li>
<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>
<li><a title="Album" href="../albumnl.html">Album</a></li>
<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="../contactnl.html">Contact</a></li>
</ul>
</nav>

<header>
<h1><a title="html5 template" href="../index.html">Mc Bevers</a></h1>
</header>

<section id="main" class="clearfix">

<section id="content">
<article>
<?php
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
echo '<h1><img src="images/lock_unlocked.png" width="32" height="32">Logged In</h1>';

echo "<table width='600' cellpadding='5' cellspacing='5' border='1'>";
echo "<p>Welcome <b>$session->username</b></p> <br/><br/>"
."<tr><td>[<a href=\"userinfo.php?user=$session->username\">My Account</a>]</td></tr>"
."<tr><td>[<a href=\"useredit.php\">Edit Account</a>]</td></tr>";
if($session->isAdmin()){
echo "<tr><td>[<a href=\"admin/admin.php\">Admin Center</a>]</td></tr>";
echo "<tr><td>[<a href=\"../gastenboek/admin/index.php\">Gastenboek</a>]</td></tr>";
echo "<tr><td>[<a href=\"../livre d'or/admin/index.php\">livre d'or</a>]</td></tr>";
echo "<tr><td>[<a href=\"../upload/upload.form.php\">upload</a>]</td></tr>";   
}
echo "<tr><td>[<a href=\"process.php\">Logout</a>]</td></tr>";
}
<aside id="sidebar">

<h3>Links</h3>
<ul class="clearfix">
<li><a title="Home" href="../indexnl.html">Home</a></li>
<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>
<li><a title="Album" href="../albumnl.html">Album</a></li>
<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="../contactnl.html">Contact</a></li>
</ul>


<h3></h3>
<ul class="clearfix">
<!--<li><a title="twitter" href="index.html">Twitter</a></li>-->
<li><a title="Inschrijven" href="../inschrijvennl.html">Inschrijven</a></li>
<li><a title="Gastenboek" href="gastenboek/guestbook.php">Gastenboek</a></li>
<li><a title="Facebook" href="http://www.facebook.com/profile.php?id=100003840519242&ref=tn_tnmn#" class="new_window">Facebook</a></li>
</ul>

</aside>

</section>

<footer>

<section id="footertop">

<aside class="footer-column">
<h4>Info</h4>
Html5 en css3 beste resultaat in google chrome.

</aside>

<aside class="footer-column">
<h4>Mc bevers</h4>
<address>
<span>Postcode:</span>1547<br/>
<span>Land:</span>Belgie<br/>
<span>Plaats:</span>Bever<br/>
<!--<span>Telefoon 1:</span>0<br/>
<span>Telefoon 2:</span>0<br/>
<span>Fax:</span>0<br/>-->
<span>Email:</span><a href="mailto:info@mcbevers.be">info@mcbevers.be</a>
</address>
</aside>

</section>

<!--<section id="copyright">
<h4>Copyright</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta.</p>
</section>-->

<section id="banners">
<ul class="banners">
<li><span><span><span><img src="../images/icon1.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li><span><span><span><img src="../images/icon2.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li class="last"><span><span><span><img src="../images/icon3.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
</ul>
</section>

<br>

<section id="templatecopy">
<p>Edited by DeWezze</p>
<p>Template design by <a title="derby web design" href="http://www.tristarwebdesign.co.uk">tristar web design</a></p>
</section>
<?php
}

/**
* Just a little page footer, tells how many registered members
* there are, how many users currently logged in and viewing site,
* and how many guests viewing site. Active users are displayed,
* with link to their user information.
*/
echo "<center><b>Member Total:</b>".$database->getNumMembers()."<br/></center>";
echo "<center>There are $database->num_active_users registered members and ";
echo "$database->num_active_guests guests viewing the site.</center>";

include("login/include/view_active.php");
else{
?>

<?php
/**
* User not logged in, display the login form.
* If user has already tried to login, but errors were
* found, display the total number of errors.
* If errors occurred, they will be displayed.
*/
if($form->num_errors > 0){
echo "<p><font size=\"2\">".$form->num_errors." error(s) found</font></p>";
}
?>
<section id="form1">
<h3>Login</h3>
<form action="process.php" method="post">
<p><label>Gebruikers naam</label></p>
<input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"><? echo $form->error("user"); ?>
<p><label>Wachtwoord</label></p>
<input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"><? echo $form->error("pass"); ?>
<p><label>Onthoud mij     </label><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
<input type="hidden" name="sublogin" value="1">
<p><input type="submit" value="Login"></p>
<!--<font size="2">[<a href="forgotpass.php">Wachtwoord vergeten?</a>]</font>
<p>Nog niet geregistreerd? <a href="register.php">Aanmelden!</a></p>-->
</form>
</section>
</article>
</section>

<aside id="sidebar">

<h3>Links</h3>
<ul class="clearfix">
<li><a title="Home" href="../indexnl.html">Home</a></li>
<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>
<li><a title="Album" href="../albumnl.html">Album</a></li>
<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="../contactnl.html">Contact</a></li>
</ul>


<h3></h3>
<ul class="clearfix">
<!--<li><a title="twitter" href="index.html">Twitter</a></li>-->
<li><a title="Inschrijven" href="../inschrijvennl.html">Inschrijven</a></li>
<li><a title="Gastenboek" href="gastenboek/guestbook.php">Gastenboek</a></li>
<li><a title="Facebook" href="http://www.facebook.com/profile.php?id=100003840519242&ref=tn_tnmn#" class="new_window">Facebook</a></li>
</ul>

</aside>

</section>

<footer>

<section id="footertop">

<aside class="footer-column">
<h4>Info</h4>
Html5 en css3 beste resultaat in google chrome.

</aside>

<aside class="footer-column">
<h4>Mc bevers</h4>
<address>
<span>Postcode:</span>1547<br/>
<span>Land:</span>Belgie<br/>
<span>Plaats:</span>Bever<br/>
<!--<span>Telefoon 1:</span>0<br/>
<span>Telefoon 2:</span>0<br/>
<span>Fax:</span>0<br/>-->
<span>Email:</span><a href="mailto:info@mcbevers.be">info@mcbevers.be</a>
</address>
</aside>

</section>

<!--<section id="copyright">
<h4>Copyright</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta.</p>
</section>-->

<section id="banners">
<ul class="banners">
<li><span><span><span><img src="../images/icon1.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li><span><span><span><img src="../images/icon2.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li class="last"><span><span><span><img src="../images/icon3.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
</ul>
</section>

<br>

<section id="templatecopy">
<p>Edited by DeWezze</p>
<p>Template design by <a title="derby web design" href="http://www.tristarwebdesign.co.uk">tristar web design</a></p>
</section>
<?php
}

/**
* Just a little page footer, tells how many registered members
* there are, how many users currently logged in and viewing site,
* and how many guests viewing site. Active users are displayed,
* with link to their user information.
*/
echo "<center><b>Member Total:</b>".$database->getNumMembers()."<br/></center>";
echo "<center>There are $database->num_active_users registered members and ";
echo "$database->num_active_guests guests viewing the site.</center>";

include("login/include/view_active.php");

?>
</footer>

</div>

</body>
</html>

 

 

That's a hackish way to do this, but should do what you want.

Link to comment
Share on other sites

<?
include("include/session.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Mc Bevers home</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen"/>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--<link rel="stylesheet" type="text/css" href="css/styles.css" />-->
<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="script.js"></script>-->
</head>
<body>
<div id="wrapper">
<nav>
<ul class="lang">
<li><a href="../indexnl.html" class="nl">Nl</a></li>
<li class="last"><a href="../indexfr.html" class="fr">Fr</a></li>
</ul>

<ul class="menu">
<li><a class="active" title="home" href="../indexnl.html">Home</a></li>
<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>
<li><a title="Album" href="../albumnl.html">Album</a></li>
<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="../contactnl.html">Contact</a></li>
</ul>
</nav>

<header>
<h1><a title="html5 template" href="../index.html">Mc Bevers</a></h1>
</header>

<section id="main" class="clearfix">

<section id="content">
<article>
<?
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
echo '<h1><img src="images/lock_unlocked.png" width="32" height="32">Logged In</h1>';

echo "<table width='600' cellpadding='5' cellspacing='5' border='1'>";
echo "<p>Welcome <b>$session->username</b></p> <br/><br/>"
."<tr><td>[<a href=\"userinfo.php?user=$session->username\">My Account</a>]</td></tr>"
."<tr><td>[<a href=\"useredit.php\">Edit Account</a>]</td></tr>";
if($session->isAdmin()){
echo "<tr><td>[<a href=\"admin/admin.php\">Admin Center</a>]</td></tr>";
echo "<tr><td>[<a href=\"../gastenboek/admin/index.php\">Gastenboek</a>]</td></tr>";
echo "<tr><td>[<a href=\"../livre d'or/admin/index.php\">livre d'or</a>]</td></tr>";
echo "<tr><td>[<a href=\"../upload/upload.form.php\">upload</a>]</td></tr>";   
}
echo "<tr><td>[<a href=\"process.php\">Logout</a>]</td></tr>";
}
<aside id="sidebar">

<h3>Links</h3>
<ul class="clearfix">
<li><a title="Home" href="../indexnl.html">Home</a></li>
<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>
<li><a title="Album" href="../albumnl.html">Album</a></li>
<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="../contactnl.html">Contact</a></li>
</ul>


<h3></h3>
<ul class="clearfix">
<!--<li><a title="twitter" href="index.html">Twitter</a></li>-->
<li><a title="Inschrijven" href="../inschrijvennl.html">Inschrijven</a></li>
<li><a title="Gastenboek" href="gastenboek/guestbook.php">Gastenboek</a></li>
<li><a title="Facebook" href="http://www.facebook.com/profile.php?id=100003840519242&ref=tn_tnmn#" class="new_window">Facebook</a></li>
</ul>

</aside>

</section>

<footer>

<section id="footertop">

<aside class="footer-column">
<h4>Info</h4>
Html5 en css3 beste resultaat in google chrome.

</aside>

<aside class="footer-column">
<h4>Mc bevers</h4>
<address>
<span>Postcode:</span>1547<br/>
<span>Land:</span>Belgie<br/>
<span>Plaats:</span>Bever<br/>
<!--<span>Telefoon 1:</span>0<br/>
<span>Telefoon 2:</span>0<br/>
<span>Fax:</span>0<br/>-->
<span>Email:</span><a href="mailto:info@mcbevers.be">info@mcbevers.be</a>
</address>
</aside>

</section>

<!--<section id="copyright">
<h4>Copyright</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta.</p>
</section>-->

<section id="banners">
<ul class="banners">
<li><span><span><span><img src="../images/icon1.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li><span><span><span><img src="../images/icon2.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li class="last"><span><span><span><img src="../images/icon3.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
</ul>
</section>

<br>

<section id="templatecopy">
<p>Edited by DeWezze</p>
<p>Template design by <a title="derby web design" href="http://www.tristarwebdesign.co.uk">tristar web design</a></p>
</section>
<?
}

/**
* Just a little page footer, tells how many registered members
* there are, how many users currently logged in and viewing site,
* and how many guests viewing site. Active users are displayed,
* with link to their user information.
*/
echo "<center><b>Member Total:</b>".$database->getNumMembers()."<br/></center>";
echo "<center>There are $database->num_active_users registered members and ";
echo "$database->num_active_guests guests viewing the site.</center>";

include("login/include/view_active.php");

?>
</footer>

</div>

</body>
</html>
else{
?>

<?
/**
* User not logged in, display the login form.
* If user has already tried to login, but errors were
* found, display the total number of errors.
* If errors occurred, they will be displayed.
*/
if($form->num_errors > 0){
echo "<p><font size=\"2\">".$form->num_errors." error(s) found</font></p>";
}
?>
<section id="form1">
<h3>Login</h3>
<form action="process.php" method="post">
<p><label>Gebruikers naam</label></p>
<input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"><? echo $form->error("user"); ?>
<p><label>Wachtwoord</label></p>
<input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"><? echo $form->error("pass"); ?>
<p><label>Onthoud mij     </label><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
<input type="hidden" name="sublogin" value="1">
<p><input type="submit" value="Login"></p>
<!--<font size="2">[<a href="forgotpass.php">Wachtwoord vergeten?</a>]</font>
<p>Nog niet geregistreerd? <a href="register.php">Aanmelden!</a></p>-->
</form>
</section>
</article>
</section>

<aside id="sidebar">

<h3>Links</h3>
<ul class="clearfix">
<li><a title="Home" href="../indexnl.html">Home</a></li>
<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>
<li><a title="Album" href="../albumnl.html">Album</a></li>
<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="../contactnl.html">Contact</a></li>
</ul>


<h3></h3>
<ul class="clearfix">
<!--<li><a title="twitter" href="index.html">Twitter</a></li>-->
<li><a title="Inschrijven" href="../inschrijvennl.html">Inschrijven</a></li>
<li><a title="Gastenboek" href="gastenboek/guestbook.php">Gastenboek</a></li>
<li><a title="Facebook" href="http://www.facebook.com/profile.php?id=100003840519242&ref=tn_tnmn#" class="new_window">Facebook</a></li>
</ul>

</aside>

</section>

<footer>

<section id="footertop">

<aside class="footer-column">
<h4>Info</h4>
Html5 en css3 beste resultaat in google chrome.

</aside>

<aside class="footer-column">
<h4>Mc bevers</h4>
<address>
<span>Postcode:</span>1547<br/>
<span>Land:</span>Belgie<br/>
<span>Plaats:</span>Bever<br/>
<!--<span>Telefoon 1:</span>0<br/>
<span>Telefoon 2:</span>0<br/>
<span>Fax:</span>0<br/>-->
<span>Email:</span><a href="mailto:info@mcbevers.be">info@mcbevers.be</a>
</address>
</aside>

</section>

<!--<section id="copyright">
<h4>Copyright</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta.</p>
</section>-->

<section id="banners">
<ul class="banners">
<li><span><span><span><img src="../images/icon1.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li><span><span><span><img src="../images/icon2.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li class="last"><span><span><span><img src="../images/icon3.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
</ul>
</section>

<br>

<section id="templatecopy">
<p>Edited by DeWezze</p>
<p>Template design by <a title="derby web design" href="http://www.tristarwebdesign.co.uk">tristar web design</a></p>
</section>
<?
}

/**
* Just a little page footer, tells how many registered members
* there are, how many users currently logged in and viewing site,
* and how many guests viewing site. Active users are displayed,
* with link to their user information.
*/
echo "<center><b>Member Total:</b>".$database->getNumMembers()."<br/></center>";
echo "<center>There are $database->num_active_users registered members and ";
echo "$database->num_active_guests guests viewing the site.</center>";

include("login/include/view_active.php");

?>
</footer>

</div>

</body>
</html>

 

I added <?php to the tags for starting the php script, removed them. Give the above a try.

Link to comment
Share on other sites

What my thinking was is that you have a condition:

 

If the session exists then load the following options...

{}

Check for admin login and load additional options...

{}

 

ELSE we load a form for the user to login with...

{

INSIDE HERE - all of the layout is completed

}

 

So I copied the CSS elements and output from the section where the user isn't logged in and transplanted them also in the top portion where the user is logged in. I added <?php to the tag <? so it would color the php in the code tags and make it easier to read the code. So the below code is just putting a few of the elements in the logged in section, the goal was to render the remaining portion of the page.. your side bar, footer, etc..

 

<?
include("include/session.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Mc Bevers home</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen"/>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--<link rel="stylesheet" type="text/css" href="css/styles.css" />-->
<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="script.js"></script>-->
</head>
<body>
<div id="wrapper">
<nav>
<ul class="lang">
<li><a href="../indexnl.html" class="nl">Nl</a></li>
<li class="last"><a href="../indexfr.html" class="fr">Fr</a></li>
</ul>

<ul class="menu">
<li><a class="active" title="home" href="../indexnl.html">Home</a></li>
<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>
<li><a title="Album" href="../albumnl.html">Album</a></li>
<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="../contactnl.html">Contact</a></li>
</ul>
</nav>

<header>
<h1><a title="html5 template" href="../index.html">Mc Bevers</a></h1>
</header>

<section id="main" class="clearfix">

<section id="content">
<article>
<?
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
echo '<h1><img src="images/lock_unlocked.png" width="32" height="32">Logged In</h1>';

echo "<table width='600' cellpadding='5' cellspacing='5' border='1'>";
echo "<p>Welcome <b>$session->username</b></p> <br/><br/>"
."<tr><td>[<a href=\"userinfo.php?user=$session->username\">My Account</a>]</td></tr>"
."<tr><td>[<a href=\"useredit.php\">Edit Account</a>]</td></tr>";
if($session->isAdmin()){
echo "<tr><td>[<a href=\"admin/admin.php\">Admin Center</a>]</td></tr>";
echo "<tr><td>[<a href=\"../gastenboek/admin/index.php\">Gastenboek</a>]</td></tr>";
echo "<tr><td>[<a href=\"../livre d'or/admin/index.php\">livre d'or</a>]</td></tr>";
echo "<tr><td>[<a href=\"../upload/upload.form.php\">upload</a>]</td></tr>";   
}
echo "<tr><td>[<a href=\"process.php\">Logout</a>]</td></tr>";
}

</article>
</section>

/**
* Just a little page footer, tells how many registered members
* there are, how many users currently logged in and viewing site,
* and how many guests viewing site. Active users are displayed,
* with link to their user information.
*/
echo "<center><b>Member Total:</b>".$database->getNumMembers()."<br/></center>";
echo "<center>There are $database->num_active_users registered members and ";
echo "$database->num_active_guests guests viewing the site.</center>";

include("login/include/view_active.php");

else{
?>

<?
/**
* User not logged in, display the login form.
* If user has already tried to login, but errors were
* found, display the total number of errors.
* If errors occurred, they will be displayed.
*/
if($form->num_errors > 0){
echo "<p><font size=\"2\">".$form->num_errors." error(s) found</font></p>";
}
?>
<section id="form1">
<h3>Login</h3>
<form action="process.php" method="post">
<p><label>Gebruikers naam</label></p>
<input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"><? echo $form->error("user"); ?>
<p><label>Wachtwoord</label></p>
<input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"><? echo $form->error("pass"); ?>
<p><label>Onthoud mij     </label><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
<input type="hidden" name="sublogin" value="1">
<p><input type="submit" value="Login"></p>
<!--<font size="2">[<a href="forgotpass.php">Wachtwoord vergeten?</a>]</font>
<p>Nog niet geregistreerd? <a href="register.php">Aanmelden!</a></p>-->
</form>
</section>
</article>
</section>

<aside id="sidebar">

<h3>Links</h3>
<ul class="clearfix">
<li><a title="Home" href="../indexnl.html">Home</a></li>
<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>
<li><a title="Album" href="../albumnl.html">Album</a></li>
<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="../contactnl.html">Contact</a></li>
</ul>


<h3></h3>
<ul class="clearfix">
<!--<li><a title="twitter" href="index.html">Twitter</a></li>-->
<li><a title="Inschrijven" href="../inschrijvennl.html">Inschrijven</a></li>
<li><a title="Gastenboek" href="gastenboek/guestbook.php">Gastenboek</a></li>
<li><a title="Facebook" href="http://www.facebook.com/profile.php?id=100003840519242&ref=tn_tnmn#" class="new_window">Facebook</a></li>
</ul>

</aside>

</section>

<footer>

<section id="footertop">

<aside class="footer-column">
<h4>Info</h4>
Html5 en css3 beste resultaat in google chrome.

</aside>

<aside class="footer-column">
<h4>Mc bevers</h4>
<address>
<span>Postcode:</span>1547<br/>
<span>Land:</span>Belgie<br/>
<span>Plaats:</span>Bever<br/>
<!--<span>Telefoon 1:</span>0<br/>
<span>Telefoon 2:</span>0<br/>
<span>Fax:</span>0<br/>-->
<span>Email:</span><a href="mailto:info@mcbevers.be">info@mcbevers.be</a>
</address>
</aside>

</section>

<!--<section id="copyright">
<h4>Copyright</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta.</p>
</section>-->

<section id="banners">
<ul class="banners">
<li><span><span><span><img src="../images/icon1.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li><span><span><span><img src="../images/icon2.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li class="last"><span><span><span><img src="../images/icon3.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
</ul>
</section>

<br>

<section id="templatecopy">
<p>Edited by DeWezze</p>
<p>Template design by <a title="derby web design" href="http://www.tristarwebdesign.co.uk">tristar web design</a></p>
</section>
<?
}

/**
* Just a little page footer, tells how many registered members
* there are, how many users currently logged in and viewing site,
* and how many guests viewing site. Active users are displayed,
* with link to their user information.
*/
echo "<center><b>Member Total:</b>".$database->getNumMembers()."<br/></center>";
echo "<center>There are $database->num_active_users registered members and ";
echo "$database->num_active_guests guests viewing the site.</center>";

include("login/include/view_active.php");

?>
</footer>

</div>

</body>
</html>

Link to comment
Share on other sites

<?
include("include/session.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Mc Bevers home</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen"/>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--<link rel="stylesheet" type="text/css" href="css/styles.css" />-->
<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="script.js"></script>-->
</head>
<body>
<div id="wrapper">
<nav>
<ul class="lang">
<li><a href="../indexnl.html" class="nl">Nl</a></li>
<li class="last"><a href="../indexfr.html" class="fr">Fr</a></li>
</ul>

<ul class="menu">
<li><a class="active" title="home" href="../indexnl.html">Home</a></li>
<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>
<li><a title="Album" href="../albumnl.html">Album</a></li>
<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="../contactnl.html">Contact</a></li>
</ul>
</nav>

<header>
<h1><a title="html5 template" href="../index.html">Mc Bevers</a></h1>
</header>

<section id="main" class="clearfix">

<section id="content">
<article>
<?
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
echo '<h1><img src="images/lock_unlocked.png" width="32" height="32">Logged In</h1>';

echo "<table width='600' cellpadding='5' cellspacing='5' border='1'>";
echo "<p>Welcome <b>$session->username</b></p> <br/><br/>"
."<tr><td>[<a href=\"userinfo.php?user=$session->username\">My Account</a>]</td></tr>"
."<tr><td>[<a href=\"useredit.php\">Edit Account</a>]</td></tr>";
if($session->isAdmin()){
echo "<tr><td>[<a href=\"admin/admin.php\">Admin Center</a>]</td></tr>";
echo "<tr><td>[<a href=\"../gastenboek/admin/index.php\">Gastenboek</a>]</td></tr>";
echo "<tr><td>[<a href=\"../livre d'or/admin/index.php\">livre d'or</a>]</td></tr>";
echo "<tr><td>[<a href=\"../upload/upload.form.php\">upload</a>]</td></tr>";   
}
echo "<tr><td>[<a href=\"process.php\">Logout</a>]</td></tr>";
}
else{
?>

<?
/**
* User not logged in, display the login form.
* If user has already tried to login, but errors were
* found, display the total number of errors.
* If errors occurred, they will be displayed.
*/
if($form->num_errors > 0){
echo "<p><font size=\"2\">".$form->num_errors." error(s) found</font></p>";
}
?>
<section id="form1">
<h3>Login</h3>
<form action="process.php" method="post">
<p><label>Gebruikers naam</label></p>
<input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"><? echo $form->error("user"); ?>
<p><label>Wachtwoord</label></p>
<input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"><? echo $form->error("pass"); ?>
<p><label>Onthoud mij     </label><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
<input type="hidden" name="sublogin" value="1">
<p><input type="submit" value="Login"></p>
<!--<font size="2">[<a href="forgotpass.php">Wachtwoord vergeten?</a>]</font>
<p>Nog niet geregistreerd? <a href="register.php">Aanmelden!</a></p>-->
</form>
</section>
</article>
</section>
<? } ?>
<aside id="sidebar">

<h3>Links</h3>
<ul class="clearfix">
<li><a title="Home" href="../indexnl.html">Home</a></li>
<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>
<li><a title="Album" href="../albumnl.html">Album</a></li>
<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="../contactnl.html">Contact</a></li>
</ul>


<h3></h3>
<ul class="clearfix">
<!--<li><a title="twitter" href="index.html">Twitter</a></li>-->
<li><a title="Inschrijven" href="../inschrijvennl.html">Inschrijven</a></li>
<li><a title="Gastenboek" href="gastenboek/guestbook.php">Gastenboek</a></li>
<li><a title="Facebook" href="http://www.facebook.com/profile.php?id=100003840519242&ref=tn_tnmn#" class="new_window">Facebook</a></li>
</ul>

</aside>

</section>

<footer>

<section id="footertop">

<aside class="footer-column">
<h4>Info</h4>
Html5 en css3 beste resultaat in google chrome.

</aside>

<aside class="footer-column">
<h4>Mc bevers</h4>
<address>
<span>Postcode:</span>1547<br/>
<span>Land:</span>Belgie<br/>
<span>Plaats:</span>Bever<br/>
<!--<span>Telefoon 1:</span>0<br/>
<span>Telefoon 2:</span>0<br/>
<span>Fax:</span>0<br/>-->
<span>Email:</span><a href="mailto:info@mcbevers.be">info@mcbevers.be</a>
</address>
</aside>

</section>

<!--<section id="copyright">
<h4>Copyright</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta.</p>
</section>-->

<section id="banners">
<ul class="banners">
<li><span><span><span><img src="../images/icon1.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li><span><span><span><img src="../images/icon2.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li class="last"><span><span><span><img src="../images/icon3.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
</ul>
</section>

<br>

<section id="templatecopy">
<p>Edited by DeWezze</p>
<p>Template design by <a title="derby web design" href="http://www.tristarwebdesign.co.uk">tristar web design</a></p>
</section>
<?

/**
* Just a little page footer, tells how many registered members
* there are, how many users currently logged in and viewing site,
* and how many guests viewing site. Active users are displayed,
* with link to their user information.
*/
echo "<center><b>Member Total:</b>".$database->getNumMembers()."<br/></center>";
echo "<center>There are $database->num_active_users registered members and ";
echo "$database->num_active_guests guests viewing the site.</center>";

include("login/include/view_active.php");

?>
</footer>

</div>

</body>
</html>

 

Give this a go  :D :D :D

Link to comment
Share on other sites

I didn't add any php tags, I noticed the } ending bracket for the if / else loop was not in the right place. The issue now is that the <article> tag is not ending where it needs to and causing the page to shift down, and those links to be displayed at the bottom of the page. So I added a </article> closing tag after those links to cut it off. Give this new one a go and hopefully it will resolve your issue... This is some very sloppy code and I'm glad you didn't buy it! HTML, CSS, and PHP should all be separated and written cleanly. That's what I mean when I say sloppy code, as you can see this isn't how this code is written.

 

 

<?
include("include/session.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Mc Bevers home</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen"/>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--<link rel="stylesheet" type="text/css" href="css/styles.css" />-->
<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="script.js"></script>-->
</head>
<body>
<div id="wrapper">
<nav>
<ul class="lang">
<li><a href="../indexnl.html" class="nl">Nl</a></li>
<li class="last"><a href="../indexfr.html" class="fr">Fr</a></li>
</ul>

<ul class="menu">
<li><a class="active" title="home" href="../indexnl.html">Home</a></li>
<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>
<li><a title="Album" href="../albumnl.html">Album</a></li>
<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="../contactnl.html">Contact</a></li>
</ul>
</nav>

<header>
<h1><a title="html5 template" href="../index.html">Mc Bevers</a></h1>
</header>

<section id="main" class="clearfix">

<section id="content">
<article>
<?
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
echo '<h1><img src="images/lock_unlocked.png" width="32" height="32">Logged In</h1>';

echo "<table width='600' cellpadding='5' cellspacing='5' border='1'>";
echo "<p>Welcome <b>$session->username</b></p> <br/><br/>"
."<tr><td>[<a href=\"userinfo.php?user=$session->username\">My Account</a>]</td></tr>"
."<tr><td>[<a href=\"useredit.php\">Edit Account</a>]</td></tr>";
if($session->isAdmin()){
echo "<tr><td>[<a href=\"admin/admin.php\">Admin Center</a>]</td></tr>";
echo "<tr><td>[<a href=\"../gastenboek/admin/index.php\">Gastenboek</a>]</td></tr>";
echo "<tr><td>[<a href=\"../livre d'or/admin/index.php\">livre d'or</a>]</td></tr>";
echo "<tr><td>[<a href=\"../upload/upload.form.php\">upload</a>]</td></tr>";   
}
echo "<tr><td>[<a href=\"process.php\">Logout</a>]</td></tr>";
}
</article>
else{
?>

<?
/**
* User not logged in, display the login form.
* If user has already tried to login, but errors were
* found, display the total number of errors.
* If errors occurred, they will be displayed.
*/
if($form->num_errors > 0){
echo "<p><font size=\"2\">".$form->num_errors." error(s) found</font></p>";
}
?>
<section id="form1">
<h3>Login</h3>
<form action="process.php" method="post">
<p><label>Gebruikers naam</label></p>
<input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"><? echo $form->error("user"); ?>
<p><label>Wachtwoord</label></p>
<input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"><? echo $form->error("pass"); ?>
<p><label>Onthoud mij     </label><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
<input type="hidden" name="sublogin" value="1">
<p><input type="submit" value="Login"></p>
<!--<font size="2">[<a href="forgotpass.php">Wachtwoord vergeten?</a>]</font>
<p>Nog niet geregistreerd? <a href="register.php">Aanmelden!</a></p>-->
</form>
</section>
</article>
</section>
<? } ?>
<aside id="sidebar">

<h3>Links</h3>
<ul class="clearfix">
<li><a title="Home" href="../indexnl.html">Home</a></li>
<li><a title="Leden" href="../ledennlp1.html">Leden</a></li>
<li><a title="Album" href="../albumnl.html">Album</a></li>
<li><a title="Kalender" href="../kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="../contactnl.html">Contact</a></li>
</ul>


<h3></h3>
<ul class="clearfix">
<!--<li><a title="twitter" href="index.html">Twitter</a></li>-->
<li><a title="Inschrijven" href="../inschrijvennl.html">Inschrijven</a></li>
<li><a title="Gastenboek" href="gastenboek/guestbook.php">Gastenboek</a></li>
<li><a title="Facebook" href="http://www.facebook.com/profile.php?id=100003840519242&ref=tn_tnmn#" class="new_window">Facebook</a></li>
</ul>

</aside>

</section>

<footer>

<section id="footertop">

<aside class="footer-column">
<h4>Info</h4>
Html5 en css3 beste resultaat in google chrome.

</aside>

<aside class="footer-column">
<h4>Mc bevers</h4>
<address>
<span>Postcode:</span>1547<br/>
<span>Land:</span>Belgie<br/>
<span>Plaats:</span>Bever<br/>
<!--<span>Telefoon 1:</span>0<br/>
<span>Telefoon 2:</span>0<br/>
<span>Fax:</span>0<br/>-->
<span>Email:</span><a href="mailto:info@mcbevers.be">info@mcbevers.be</a>
</address>
</aside>

</section>

<!--<section id="copyright">
<h4>Copyright</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta.</p>
</section>-->

<section id="banners">
<ul class="banners">
<li><span><span><span><img src="../images/icon1.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li><span><span><span><img src="../images/icon2.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
<li class="last"><span><span><span><img src="../images/icon3.gif" alt="sponsor"><strong>Sponsor</strong>Sponsor worden?<a href="../contactnl.html" class="new_window"><br/>Klik hier</a></span></span></span></li>
</ul>
</section>

<br>

<section id="templatecopy">
<p>Edited by DeWezze</p>
<p>Template design by <a title="derby web design" href="http://www.tristarwebdesign.co.uk">tristar web design</a></p>
</section>
<?

/**
* Just a little page footer, tells how many registered members
* there are, how many users currently logged in and viewing site,
* and how many guests viewing site. Active users are displayed,
* with link to their user information.
*/
echo "<center><b>Member Total:</b>".$database->getNumMembers()."<br/></center>";
echo "<center>There are $database->num_active_users registered members and ";
echo "$database->num_active_guests guests viewing the site.</center>";

include("login/include/view_active.php");

?>
</footer>

</div>

</body>
</html>

Link to comment
Share on other sites

error again :s

the sloppy part of the code could be mine i added some code to the php script so it would fit in my site.

 

this was the original file

 

<?

/**

* Main.php

*

* This is an example of the main page of a website. Here

* users will be able to login. However, like on most sites

* the login form doesn't just have to be on the main page,

* but re-appear on subsequent pages, depending on whether

* the user has logged in or not.

*

* Please subscribe to our feeds at http://blog.geotitles.com for more such tutorials

*/

include("include/session.php");

?>

 

<html>

<title>login page | jQuery, AJAX, PHP, MySQL, javascript, web design tutorials & demos | php login script demo</title>

<body>

 

<table>

<tr>

  <td>

 

 

<?

/**

* User has already logged in, so display relavent links, including

* a link to the admin center if the user is an administrator.

*/

if($session->logged_in){

  echo '<h3>This is the live demo of <a href="http://blog.geotitles.com/2011/08/php-login-script-with-advanced-features">PHP login script with added features</a> at <a href="http://blog.geotitles.com">GEO WEB STATION</a>, Click here for the tutorial <a href="http://blog.geotitles.com/2011/08/php-login-script-with-advanced-features">link</a></h3>';

  echo '<h1><img src="images/lock_unlocked.png" width="32" height="32">Logged In</h1>';

 

  echo "Welcome <b>$session->username</b>, you are logged in. <br><br>"

      ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>]   "

      ."[<a href=\"useredit.php\">Edit Account</a>]   ";

  if($session->isAdmin()){

      echo "[<a href=\"admin/admin.php\">Admin Center</a>]   ";

  }

  echo "[<a href=\"process.php\">Logout</a>]";

}

else{

?>

 

<h3>This is the live demo of <a href="http://blog.geotitles.com/2011/08/php-login-script-with-advanced-features">PHP login script with added features</a> at <a href="http://blog.geotitles.com">GEO WEB STATION</a>, Click here for the tutorial <a href="http://blog.geotitles.com/2011/08/php-login-script-with-advanced-features">link</a></h3>

<h1><img src="images/lock_locked.png" width="32" height="32" alt="Login">Admin Login</h1>

<?

/**

* User not logged in, display the login form.

* If user has already tried to login, but errors were

* found, display the total number of errors.

* If errors occurred, they will be displayed.

*/

if($form->num_errors > 0){

  echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>";

}

?>

<form action="process.php" method="POST">

<table align="left" border="0" cellspacing="0" cellpadding="3">

<tr><td>Username:</td><td><input readonly type="text" name="user" maxlength="30" value="<? echo "Admin"; ?>"></td><td><? echo $form->error("user"); ?></td></tr>

<tr><td>Password:</td><td><input readonly type="password" name="pass" maxlength="30" value="<? echo "vvstgy"; ?>"></td><td><? echo $form->error("pass"); ?></td></tr>

<tr><td colspan="2" align="left"><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>

<font size="2">Remember me next time     

<input type="hidden" name="sublogin" value="1">

<input type="submit" value="Login"></td></tr>

<tr><td colspan="2" align="left"><br><font size="2">[<a href="forgotpass.php">Forgot Password?</a>]</font></td><td align="right"></td></tr>

<tr><td colspan="2" align="left"><br>Not registered? <a href="register.php">Sign-Up!</a></td></tr>

</table>

</form>

 

<?

}

 

/**

* Just a little page footer, tells how many registered members

* there are, how many users currently logged in and viewing site,

* and how many guests viewing site. Active users are displayed,

* with link to their user information.

*/

echo "</td></tr><tr><td align=\"center\"><br><br>";

echo "<b>Member Total:</b> ".$database->getNumMembers()."<br>";

echo "There are $database->num_active_users registered members and ";

echo "$database->num_active_guests guests viewing the site.<br><br>";

 

include("include/view_active.php");

 

?>

 

 

</td></tr>

</table>

 

 

</body>

</html>

Link to comment
Share on other sites

echo "<tr><td>[<a href=\"process.php\">Logout</a>]</td></tr>";
}
</article>
else{
?>

 

add </section> above article and give that a go.

 

If you get the error then you have to remove both </section> and </article> that have been added.

 

I know the issue is with the div for that content, just need to think it through to correct the layout now..

Link to comment
Share on other sites

For the site at this moment it's a CSS issue and I have to run for now, but the <article> and <section> CSS are empty because the login form is no longer required when you log in so something has to fill the void to move the other elements back in place. I'll see what I can do when I get back home in a few hours, but I encourage you to tweak the CSS portion and possibly make sure the <section> and <article> areas have content, then it should all adjust properly and fit in place.

Link to comment
Share on other sites

the loggin needs to be replaced with this code

so you get the links instead of the login when logged

 

<?

/**

* User has already logged in, so display relavent links, including

* a link to the admin center if the user is an administrator.

*/

if($session->logged_in){

echo '<h1><img src="images/lock_unlocked.png" width="32" height="32">Logged In</h1>';

 

echo "<table width='600' cellpadding='5' cellspacing='5' border='1'>";

echo "<p>Welcome <b>$session->username</b></p> <br/><br/>"

."<tr><td>[<a href=\"userinfo.php?user=$session->username\">My Account</a>]</td></tr>"

."<tr><td>[<a href=\"useredit.php\">Edit Account</a>]</td></tr>";

if($session->isAdmin()){

echo "<tr><td>[<a href=\"admin/admin.php\">Admin Center</a>]</td></tr>";

echo "<tr><td>[<a href=\"../gastenboek/admin/index.php\">Gastenboek</a>]</td></tr>";

echo "<tr><td>[<a href=\"../livre d'or/admin/index.php\">livre d'or</a>]</td></tr>";

echo "<tr><td>[<a href=\"../upload/upload.form.php\">upload</a>]</td></tr>"; 

}

echo "<tr><td>[<a href=\"process.php\">Logout</a>]</td></tr>";

}

else{

?>

 

ill have a look at it tommorow causse its almost bed time over here.

 

tyvm for the help  kadeous

Link to comment
Share on other sites

<article>
<?
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
echo '<h1><img src="images/lock_unlocked.png" width="32" height="32">Logged In</h1>';

echo "<table width='600' cellpadding='5' cellspacing='5' border='1'>";
echo "<p>Welcome <b>$session->username</b></p> <br/><br/>"
."<tr><td>[<a href=\"userinfo.php?user=$session->username\">My Account</a>]</td></tr>"
."<tr><td>[<a href=\"useredit.php\">Edit Account</a>]</td></tr>";
if($session->isAdmin()){
echo "<tr><td>[<a href=\"admin/admin.php\">Admin Center</a>]</td></tr>";
echo "<tr><td>[<a href=\"../gastenboek/admin/index.php\">Gastenboek</a>]</td></tr>";
echo "<tr><td>[<a href=\"../livre d'or/admin/index.php\">livre d'or</a>]</td></tr>";
echo "<tr><td>[<a href=\"../upload/upload.form.php\">upload</a>]</td></tr>";   
}
echo "<tr><td>[<a href=\"process.php\">Logout</a>]</td></tr>";
}
else{
?>
</article>

 

Wrap that in <article> </article> so it will be considered an article as opposed to just sitting on the page.  The reason it was an error before is because I did it within the <? ?> php tags... Shouldn't give you an error this time and should hopefully render the page properly.

Link to comment
Share on other sites

ok page still showing but not how it should be.

you said its prob a css thing want me to post the css file?

im moving some stuff on my page, sometimes it shows sometimes it doesnt.

I also checked google and found this http://www.w3schools.com/php/php_includes.aspi was looking for something like this when i started

the site but didnt find it maybe this could be a solution only i wouldnt know how to start this:s

 

ill have another go when my kids asleep this afternoon cant concentrate with his noise :P

 

Will do pikachu.

 

thanks

Link to comment
Share on other sites

So im triyng to get this to work now this is on my main page if it works ill try it on my login page later.

indexnl.php

<div id="wrapper">
	<nav>
		<ul class="lang"><?php include("includes/lang.php"); ?></ul>		
            <ul class="menu"><?php include("includes/menu.php"); ?></ul>
	</nav> 

menu.php

<li><a class="active" title="home" href="indexnl.html">Home</a></li>
<li><a title="Leden" href="ledennlp1.html">Leden</a></li>
<li><a title="Album" href="albumnl.html">Album</a></li>
<li><a title="Kalender" href="kalendernl.html">Kalender</a></li>
<li><a title="Contact" href="contactnl.html">Contact</a></li> 

 

now is this the correct way to do it?

 

thx

Link to comment
Share on other sites

ok so i moved some code and implented the include but still not showing correctly

this is the new page

<?
include("include/session.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Mc Bevers home</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen"/>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--<link rel="stylesheet" type="text/css" href="css/styles.css" />-->
<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="script.js"></script>-->
</head>
<body>
<div id="wrapper">
<nav>
	<ul class="lang"><?php include("../includes/subs/lang_nl.php"); ?></ul>		
        <ul class="menu"><?php include("../includes/subs/menu_nl.php"); ?></ul>
</nav>
	<header><?php include("../includes/subs/header.php"); ?></header>
	<section id="main" class="clearfix">
	<section id="content">
<article>
<?
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
echo '<h1><img src="images/lock_unlocked.png" width="32" height="32">Logged In</h1>';

echo "<table width='600' cellpadding='5' cellspacing='5' border='1'>";
echo "<p>Welcome <b>$session->username</b></p> <br/><br/>"
."<tr><td>[<a href=\"userinfo.php?user=$session->username\">My Account</a>]</td></tr>"
."<tr><td>[<a href=\"useredit.php\">Edit Account</a>]</td></tr>";
if($session->isAdmin()){
echo "<tr><td>[<a href=\"admin/admin.php\">Admin Center</a>]</td></tr>";
echo "<tr><td>[<a href=\"../gastenboek/admin/index.php\">Gastenboek</a>]</td></tr>";
echo "<tr><td>[<a href=\"../livre d'or/admin/index.php\">livre d'or</a>]</td></tr>";
echo "<tr><td>[<a href=\"../upload_album/upload.form.php\">upload album</a>]</td></tr>";  
echo "<tr><td>[<a href=\"../upload_kalender/upload.form.php\">upload kalender</a>]</td></tr>";   

}
echo "<tr><td>[<a href=\"process.php\">Logout</a>]</td></tr>";
}
else{
?>
</article>
<article>
<?
/**
* User not logged in, display the login form.
* If user has already tried to login, but errors were
* found, display the total number of errors.
* If errors occurred, they will be displayed.
*/
if($form->num_errors > 0){
echo "<p><font size=\"2\">".$form->num_errors." error(s) found</font></p>";
}
?>
<section id="form1">
<h3>Login</h3>
<form action="process.php" method="post">
<p><label>Gebruikers naam</label></p>
<input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"><? echo $form->error("user"); ?>
<p><label>Wachtwoord</label></p>
<input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"><? echo $form->error("pass"); ?>
<p><label>Onthoud mij     </label><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
<input type="hidden" name="sublogin" value="1">
<p><input type="submit" value="Login"></p>
<!--<font size="2">[<a href="forgotpass.php">Wachtwoord vergeten?</a>]</font>
<p>Nog niet geregistreerd? <a href="register.php">Aanmelden!</a></p>-->
</form>
</section>
</article>
</section>
<? } ?>
<aside id="sidebar">
                <ul class="clearfix"><?php include("../includes/subs/side_menu_nl.php"); ?></ul>
		</aside>
       </section>
<footer>
	<section id="templatecopy"><?php include("../includes/subs/templatecopy.php"); ?></section>
	<?

/**
* Just a little page footer, tells how many registered members
* there are, how many users currently logged in and viewing site,
* and how many guests viewing site. Active users are displayed,
* with link to their user information.
*/
echo "<center><b>Totaal leden:</b>".$database->getNumMembers()."<br/></center>";
echo "<center>Er zijn $database->num_active_users geregistreerde leden en ";
echo "$database->num_active_guests gasten online.</center>";

include("login/include/view_active.php");

?>
    </footer>
</div>

</body>
</html>

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.