Jump to content

Skewled

Members
  • Posts

    387
  • Joined

  • Last visited

Everything posted by Skewled

  1. <? 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
  2. setcookie("user", mysql_insert_id(), $time); setcookie("pass", mysql_real_escape_string(md5($password)), $time); header("Location: index.php"); 1st line - sets a cookie to store the user 2nd line - sets a cookie to store the pass These are just for creating a session, the cookies are used to "remember" the user that is logged in. 3rd line - this is the redirect sending the user to the index.php page once the session has been created. You could just remove the 3rd line and display a thank you for registering type of message and providing a link to the index.php, or if the navigation menu is displayed no link is needed.
  3. http://www.daretothink.co.uk/blog/snippets/eu-cookie-law-script/ This one seems to do the trick, don't copy and paste all the code though. Just get the portions that are needed for your code to comply with the new law.
  4. I didn't read the tutorial fully, I just skimmed over it. Looking now I see others had issues and the code never got updated, sorry about that... I'm looking now on Google at a few alternatives.
  5. I don't know the code that index.php consists of so I can't really help you blindly guessing... But the issue is the headers can only be sent once, the way I have my custom registration setup is that the page is it's own entity and performs no redirect and just displays a typical thank you for registering and check your email message. Clearer: There is an HTML form that a user fills out to register The HTML form sends the information to say register.php register.php takes the information and does whatever it needs with it and displays a status message upon completion Also, don't go editing the existing code unless you back it up so you can revert all changes you've made!
  6. 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>
  7. Ok restore the default one your using and I'll go over the code on my end while my son is taking a nap.
  8. IMO If the user has Javascript disabled they know what they are doing and can enable it at will, it's enabled by default with most browser installs. You can validate with Javascript but you want to also validate on the server side using PHP or whatever your using on the server. If you don't validate at the server side then your opening up a lot of security issues.
  9. http://www.portent.com/blog/design-dev/web-browser-cookie-law.htm This seems to be what you need.
  10. <? 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.
  11. Yes that's what it's doing, you can only redirect once so I'd suggest moving the redirect to after the mail has been sent.
  12. <?php if($row2['type'] == 4 && acc_status(getUsername()) > 1) { } elseif($row2['type'] == 5 && acc_status(getUsername()) > 2) { } else { } ?> What is the value the getUsername() function is returning? Is the default value for this 0 for normal users?
  13. <?php $actName = "Word"; $actPass = "pa$$word"; // Send the registration e-mail $to = $email; // Send email to our user $subject = 'Registration Information'; // Give the email a subject $message = ' Your Registration Information: -------------------------- Username: '.$actName.' Password: '.$actPass.' -------------------------- Congratulations, this is just random junk. '; // Our message above including the link $headers = 'From:webmaster@mydomain.com' . "\r\n"; // Set from headers mail($to, $subject, $message, $headers); // Send our email ?> Using mail() to send the email... give it a go and tweak it to your needs as you want.
  14. <?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.
  15. Give me a few minutes and I'll adjust the code to suit what you need it to do.. My son is fussy at the moment!
  16. Have you verified the information obtained here: $Image = $Image99; From what you posted that's pretty much all you modified, so I'm taking a guess here. Before it was hard coded, now you're passing a variable and is it escaped properly?
  17. 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.
  18. You should attempt this on your own first and post feasible code, then ask for assistance. If you're unable to do that you could visit the freelancing forum: http://www.phpfreaks.com/forums/index.php?board=8.0 and make a offer for the work to be completed.
  19. look up mysql_real_escape_string in the php manuel.. along with trim()
  20. $data = mysql_query("SELECT * FROM blog WHERE articleid = '" . $_GET["articleid"] . "' ORDER by date_posted ASC")
  21. If you give include() or require() an absolute path, that file will be included. An absolute path starts with a "/" on unix, and with a drive letter and colon on Windows.
  22. https://cms.paypal.com/cms_content/US/en_US/files/developer/nvp_DoDirectPayment_php.txt Directly related to what your looking to do.
  23. Paypal has a IPN system that you can implement. It took me a day to get everything together but it was not that difficult once I understood it. https://www.paypal.com/ipn You can also create testing accounts that use the testing environment so you can make sure your code is working as intended. They even have some PHP code examples on the site. https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_testing_sandbox -- Testing environment
  24. echo "<input type='text' name='A2'>"; you forgot to add ' to text and A2
×
×
  • 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.