Advertisement
Guest User

sotest

a guest
Oct 17th, 2013
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.55 KB | None | 0 0
  1. <?php
  2.     $sitemap = "> <a href='./index.php'>Home</a>";
  3.     $title = "E-Cig Primer - Home";
  4.     include("./common/common.php"); //PDO, $_SESSION stuff
  5. ?>
  6. <!DOCTYPE html>
  7. <html>
  8.     <head>
  9.         <title> <?php
  10.             echo $title;?>
  11.         </title>
  12.         <meta charset="utf-8" />
  13.         <link href="./common/ecigprimer.css" type="text/css" rel="stylesheet" />
  14.         <link href="./images/tinyicon.png" type="image/png" rel="icon" />
  15.         <script src="./common/javafuncts.js"></script>
  16.     </head>
  17.     <body>
  18.         <div id="top">
  19.             <div id="title">
  20.                 <a href="./index.php"><img src="./images/banner.png" alt="" /></a>
  21.             </div>
  22.             <div id="topnav">
  23.                 <div id="map"> <?php
  24.                     echo $sitemap; ?>
  25.                 </div>
  26.                 <div id="login"> <?php
  27.                     if (!isset($_SESSION["username"])) {
  28.                         echo "Welcome, Guest &nbsp;";
  29.                         echo "["."<a href='./login.php' title='login'>"."L"."</a>"."]&nbsp;";
  30.                         echo "["."<a href='./register.php' title='register'>"."R"."</a>"."]";
  31.                     } else {
  32.                         $adminch = $db->prepare("
  33.                             SELECT *
  34.                                 FROM users
  35.                                 WHERE username = :user
  36.                                 AND admin = '1'
  37.                         ");
  38.                         if ($adminch->rowCount() == 1) {
  39.                             echo "Signed in as: ".$_SESSION["username"]."&nbsp;";
  40.                             echo "["."<a href='./account.php' title='account'>"."C"."</a>"."]&nbsp;";
  41.                             echo "["."<a href='./admin.php' title='admin'>"."A"."</a>"."]&nbsp;";
  42.                             echo "["."<a href='./logout.php' title='logout'>"."O"."</a>"."]";
  43.                         } else {
  44.                             echo "Signed in as: ".$_SESSION["username"]."&nbsp;";
  45.                             echo "["."<a href='./account.php' title='account' title='account'>"."C"."</a>"."]&nbsp;";
  46.                             echo "["."<a href='./logout.php' title='logout'>"."O"."</a>"."]";
  47.                         }
  48.                     } ?>
  49.                 </div>
  50.             </div>
  51.         </div>
  52.         <div id="nav">
  53.             <a href="./introduction.php">Introduction</a><br/>
  54.             <a href="./whatecig.php">What is an E-cig?</a><br/>
  55.             <a href="./beginner.php">Beginner Topics</a><br/>
  56.             <a href="./advanced.php">Advanced Topics</a><br/>
  57.             <a href="./expert.php">Expert Topics</a><br/>
  58.             <a href="./about.php">About the Author</a><br/>
  59.             <a href="./helplinks.php">Helpful Links</a><br/>
  60.             <a href="./vendors.php">Suggested Vendors</a><br/>
  61.             <a href="./donate.php">Donate</a>
  62.         </div>
  63.         <div id="container">
  64.             container<br/>
  65.             container<br/>
  66.             container<br/>
  67.             container<br/>
  68.             container<br/>
  69.             container<br/>
  70.             container<br/>
  71.             container<br/>
  72.             container<br/>
  73.             container<br/>
  74.         </div>
  75.         <div id="bottom">
  76.             Copyright &#169; 2013 SZVapor. All Rights Reserved.<br/>
  77.             Powered by SZT v0.2B
  78.         </div>
  79.     </body> <?php
  80.     $db = null; ?>
  81. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement