Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- include("_gvars.php");
- ?>
- <html>
- <head>
- <title>[HOME] NJ-20003rd AFJROTC Corps Website</title>
- <link rel="stylesheet" src="default.css" />
- <style>
- li
- {
- display:inline;
- }
- a
- {
- display:block;
- width:150px;
- }
- ul
- {
- list-style-type:none;
- margin:0;
- padding:0;
- }
- /* CSS Configuration File: DEFAULT.CSS
- This file controls all style and layout features of the website. If you do not know
- how to use CSS2.0 - do not modify this file!
- Syntax for CSS2.0:
- single-line
- [identifier]{attribute:[value(s)];}
- multi-line
- [identifier]{
- [attribute]:[value];
- [attribute]:[value];
- [attribute]:[value];
- }
- */
- /* text hyperlinks */
- a:link {color:#0000CC;}
- a:visited {color:#0000AA;}
- a:hover {color:#FFFFFF;}
- a:active {color:#0000FF;}
- a:link {text-decoration:none;}
- a:visited {text-decoration:none;}
- a:hover {text-decoration:none;}
- a:active {text-decoration:none;}
- ul
- {
- list-style-type:none;
- margin:0;
- padding:0;
- }
- li
- {
- float:left;
- }
- a
- {
- display:block;
- width:100px;
- }
- /* global layout */
- body {
- background-image:url("/images/cascade.png");
- }
- #body {
- padding:0px;
- spacing:0px;
- width:100%;
- vertical-align:middle;
- }
- #header {
- width:100%;
- position:_absolute;
- padding-right:0px;
- padding-left:0px;
- padding-top:0px;
- background-image:url("/images/header.png");
- background-repeat:no-repeat;
- vertical-align:middle;
- }
- .header {
- width:100%;
- position:_absolute;
- padding-right:0px;
- padding-left:0px;
- padding-top:0px;
- }
- .con1 {
- position:_absolute;
- left:0px;
- width:300px;
- vertical-align:top;
- }
- .con2 {
- background-color:#999999;
- position:_absolute;
- }
- .con3 {
- position:_absolute;
- right:0px;
- width:300px;
- vertical-align:top;
- }
- .footer {
- background-color:#757575;
- }
- .console {
- }
- a.nav {
- color:white;
- font-weight:bold;
- font-size:1.15em;
- text-decoration:none;
- }
- .members-bar {
- width:100%;
- text-align:center;
- margin-left:auto;
- margin-right:auto;
- }
- .left-header {
- font-size:1.25em;
- font-weight:bold;
- font-color:white;
- text-align:center;
- text-decoration:underline;
- font-family:impact,charcoal,sans-serif;
- }
- .globalnews {
- vertical-align:middle;
- text-align:center;
- }
- td.siteshell {
- padding:15px;
- }
- .sidebar {
- padding:15px;
- }
- #sidebar-left {
- padding-left:15px;
- }
- #sidebar-right {
- padding-right:15px;
- }
- </style>
- </head>
- <body>
- <table border="0" id="body">
- <!--- START TOP SECTION --->
- <tr>
- <td colspan="5">
- <img src="/images/header.png" width="100%">
- </td>
- </tr>
- <tr>
- <td colspan="5" background="/images/nav.png" width="100%">
- <center>
- <?PHP
- if($_SESSION['online'] == 1)
- {
- echo '
- <table border="1" width="100%">
- <tr>
- <td>
- <a href="index.php"><center>HOME</center></a>
- </td>
- <td>
- <a href="groups.php"><center>GROUPS</center></a>
- </td>
- <td>
- <a href="news.php"><center>NEWS</center></a>
- </td>
- <td>
- <a href="console.php"><center>CONSOLE</center></a>
- </td>
- <td>
- <a href="logout.php"><center>LOGOUT</center></a>
- </td>
- </tr>
- </table>
- ';
- }
- else
- {
- echo '
- <table border="0" background="/images/nav.png" width="100%">
- <tr>
- <td>
- <a href="index.php"><center>HOME</center></a>
- </td>
- <td>
- <a href="groups.php"><center>GROUPS</center></a>
- </td>
- <td>
- <a href="news.php"><center>NEWS</center></a>
- </td>
- <td>
- <a href="register.php"><center>REGISTER</center></a>
- </td>
- <td>
- <a href="login.php"><center>LOGIN</center></a>
- </td>
- </tr>
- </table>
- ';
- }
- ?>
- </center>
- </td>
- </tr>
- </table>
- <!--- END TOP SECTION --->
- <table border="0" width="100%">
- <tr>
- <td class="con1" colspan="1">
- <table border="0" class="sidebar">
- <tr style="border-collapse:collapse;">
- <td colspan="3" background="/images/sidebartitle.png" id="sidebar-left"><strong>NEWS</strong></td>
- </tr>
- <tr style="width:10%;vertical-align:middle;">
- <td style="width:10%;vertical-align:middle;">
- <center>
- <table border="0" background="/images/sidebg.png">
- <tr>
- <td>
- <h4 background="/images/sidebg.png">Test</h4> <-------------------------------------------------------------------------- ERROR (<)
- <p>
- <?PHP
- // QUERYING THE DATABASE - SELECTING HOMEWORK-CLASSWORK
- // This module can support up to 7 posts from the database
- $sql = 'SELECT * FROM cwhw';
- $query1 = mysql_query($sql,$con);
- // set 1
- $result1a = mysql_result($query1,0,2)
- $result1b = mysql_result($query1,0,1)
- $result1c = mysql_result($query1,0,3)
- //Set 2
- $result2a = mysql_result($query1,1,2)
- $result2b = mysql_result($query1,1,1)
- $result2c = mysql_result($query1,1,3)
- //set 3
- $result3a = mysql_result($query1,2,2)
- $result3b = mysql_result($query1,2,1)
- $result3c = mysql_result($query1,2,3)
- //set 4
- $result4a = mysql_result($query1,3,2)
- $result4b = mysql_result($query1,3,1)
- $result4c = mysql_result($query1,3,3)
- //set 5
- $result5a = mysql_result($query1,4,2)
- $result5b = mysql_result($query1,4,1)
- $result5c = mysql_result($query1,4,3)
- //set 6
- $result6a = mysql_result($query1,5,2)
- $result6b = mysql_result($query1,5,1)
- $result6c = mysql_result($query1,5,3)
- //set 7
- $result7a = mysql_result($query1,6,2)
- $result7b = mysql_result($query1,6,1)
- $result7c = mysql_result($query1,6,3)
- ?>
- </p>
- </td>
- </tr>
- </table>
- </center>
- </td>
- </tr>
- </table>
- </td>
- <td class="con2" colspan="1">
- <center><marquee width="50%" style="color:red;" class="con2"><strong>Website Under Construction. Sorry for the Inconvenience.</strong></marquee></center><br />
- <?PHP
- // QUERYING THE DATABASE - SELECTING NEWS POSTS FROM DATABASE
- $sql2 = 'SELECT * FROM news';
- $query2 = mysql_query($sql,$con);
- $result7 = mysql_result($query1,0,1); // title 1
- $result8 = mysql_result($query1,0,2); // article 1
- $result9 = mysql_result($query1,1,1); // title 2
- $result10 = mysql_result($query1,1,2); // article 2
- $result11 = mysql_result($query1,2,1); // title 3
- $result12 = mysql_result($query1,2,2); // article 3
- ?>
- <table border="1" class="globalnews" cellpadding="0" cellspacing="0">
- <tr style="border-collapse:collapse;">
- <td colspan="3"><strong>NEWS</strong></td>
- </tr>
- <tr style="width:10%;vertical-align:middle;">
- <td style="width:10%;vertical-align:middle;">
- <center>
- <table border="0">
- <tr>
- <td><strong><?PHP echo $result1; ?></strong></td>
- </tr>
- <tr>
- <td><?PHP echo $result2; ?></td>
- </tr>
- <tr><td><center><hr></center></td></tr>
- <tr>
- <td><strong><?PHP echo $result3; ?></strong></td>
- </tr>
- <tr>
- <td><?PHP echo $result4; ?></td>
- </tr>
- <tr><td><center><hr></center></td></tr>
- <tr>
- <td><strong><?PHP echo $result5; ?></strong></td>
- </tr>
- <tr>
- <td><?PHP echo $result6; ?></td>
- </tr>
- <tr><td><center><hr></center></td></tr>
- </table>
- </center>
- </td>
- </tr>
- </table><br />
- <!--- LOWER CENTER SECTION : VARIABLE CONTENT!!!! --->
- <table border="0" class="con2">
- <tr>
- <td>
- <p>
- </p>
- </td>
- </tr>
- </table>
- <!--- END VARIABLE CONTENT --->
- </td>
- <td class="con3" colspan="1">
- <table border="0" class="sidebar">
- <tr style="border-collapse:collapse;">
- <td colspan="3" background="/images/sidebartitle.png" id="sidebar-right"><strong>Members Area</strong></td>
- </tr>
- <tr style="width:10%;vertical-align:middle;">
- <td style="width:10%;vertical-align:middle;">
- <center>
- <table border="0" background="/images/sidebg.png" style="width:100%;">
- <tr>
- <td style="text-align:center;vertical-align:middle;">
- <?PHP
- if(!isset($_SESSION['online'])){
- echo '
- <h4 background="/images/sidebg.png">You are not logged in.</h4>
- <p>
- <form action="_login.php">
- <label for="username"><strong>Username:</strong></label><br />
- <input type="text" maxlength="40" charlimit="40" name="username" id="username" /><br />
- <br />
- <label for="password"><strong>Password:</strong></label><br />
- <input type="password" maxlength="40" charlimit="40" name="password" id="password" /><br />
- <br />
- <input type="submit" value="Login" />
- </form>
- </p>
- ';
- }
- else {
- echo '
- <h4 background="/images/sidebg.png">You are logged in </h4>
- <p>
- Welcome back,' . $_SESSION['username'] . '.<br /><br />
- (<a href="console.php">My Console</a>)<br />
- (<a href="groups.php">Logout</a>)<br />
- </p>
- ';
- }
- ?>
- </td>
- </tr>
- </table>
- </center>
- </td>
- </tr>
- </table>
- </td>
- <tr>
- <!--- START FOOTER SECTION --->
- <td colspan="3" style="color:white;font-weight:bold;text-align:center;font-weight:georgia;" class="footer">
- <p><br /><br /><br />This is a Student Website. Opinions expressed on this page shall not be attributed to the district.<br />
- Images Copyright of their original owners/creators.<br />
- ©2011 Descent Designs, All Rights Reserved.<br />
- <strong>Descent Designs Site ID:</strong> 51101</p>
- </td>
- </tr>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement