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");
- }
- #header {
- width:100%;
- position:_absolute;
- top:0px;
- }
- .con1 {
- position:absolute;
- left:0px;
- width:300px;
- }
- .con2 {
- position:absolute;
- margin-left:auto;
- margin-right:auto;
- width:70%;
- }
- .con3 {
- position:absolute;
- right:0px;
- width:300px;
- }
- .footercon {
- }
- .console {
- }
- a.nav {
- text-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;
- </style>
- </head>
- <body>
- <!--- START TOP SECTION --->
- <div class="top">
- <div class="headercon">
- <img src="/images/header.png" id="header" width="100%" align="top" /><br />
- </div>
- <center>
- <?PHP
- if($_SESSION['online'] == 1)
- {
- 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="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>
- </div>
- <div class="members-bar">
- <table border="0" background="/images/nav.png" width="100%" class="members-bar">
- <tr>
- <?PHP
- if($_SESSION['online'] = 1){
- echo '<td>Logged in as ' . $_SESSION[\'username\'] . '|| <a href="console.php">Console</a> | <a href="logout.php">Logout</a> || </td>';
- }
- else {
- echo '<form action="clogin.php" method="post">
- <td><label for="user">Username: </label><input type="text" id="user" name="user" maxlength="40" charlimit="40" /></td>
- <td><label for="pwd">Password: </label><input type="text" id="pwd" name="pwd" maxlength="40" charlimit="40" />
- <input type="submit" value="Login" /></td>';
- }
- ?>
- </tr>
- </table>
- </div>
- </div>
- <!--- END TOP SECTION --->
- <!--- START LEFT SIDEBAR --->
- <div class="con1">
- <?PHP
- // QUERYING THE DATABASE - SELECTING NEWS POSTS FROM DATABASE
- $sql = 'SELECT * FROM news';
- $query1 = mysql_query($sql,$con);
- $result1 = mysql_result($query1,0,1); // title 1
- $result2 = mysql_result($query1,0,2); // article 1
- $result3 = mysql_result($query1,1,1); // title 2
- $result4 = mysql_result($query1,1,2); // article 2
- $result5 = mysql_result($query1,2,1); // title 3
- $result6 = mysql_result($query1,2,2); // article 3
- ?>
- <table border="1">
- <thead style="font-family:Impact,Charcoal,sans-serif;font-color:white;font-size:1em;">
- <center>NEWS</center>
- </thead>
- <tr style="width:30%;align:left;">
- <td style="width:30%;align:left;">
- <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>
- </td>
- </tr>
- </table>
- </center>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement