Advertisement
Guest User

Untitled

a guest
Sep 15th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.79 KB | None | 0 0
  1. <?PHP
  2. include("_gvars.php");
  3. ?>
  4. <html>
  5.  
  6. <head>
  7. <title>[HOME] NJ-20003rd AFJROTC Corps Website</title>
  8. <link rel="stylesheet" src="default.css" />
  9. <style>
  10. li
  11. {
  12. display:inline;
  13. }
  14. a
  15. {
  16. display:block;
  17. width:150px;
  18. }
  19. ul
  20. {
  21. list-style-type:none;
  22. margin:0;
  23. padding:0;
  24. }
  25. /* CSS Configuration File: DEFAULT.CSS
  26. This file controls all style and layout features of the website. If you do not know
  27. how to use CSS2.0 - do not modify this file!
  28.  
  29. Syntax for CSS2.0:
  30. single-line
  31. [identifier]{attribute:[value(s)];}
  32. multi-line
  33. [identifier]{
  34. [attribute]:[value];
  35. [attribute]:[value];
  36. [attribute]:[value];
  37. }
  38.  
  39. */
  40. /* text hyperlinks */
  41.  
  42. a:link {color:#0000CC;}
  43. a:visited {color:#0000AA;}
  44. a:hover {color:#FFFFFF;}
  45. a:active {color:#0000FF;}
  46. a:link {text-decoration:none;}
  47. a:visited {text-decoration:none;}
  48. a:hover {text-decoration:none;}
  49. a:active {text-decoration:none;}
  50. a:link {font-weight:normal;}
  51. a:visited {font-weight:normal;}
  52. a:hover {font-weight:bold;}
  53. a:active {font-weight:normal;}
  54.  
  55.  
  56.  
  57. ul
  58. {
  59. list-style-type:none;
  60. margin:0;
  61. padding:0;
  62. }
  63. li
  64. {
  65. float:left;
  66. }
  67. a
  68. {
  69. display:block;
  70. width:100px;
  71. }
  72.  
  73. /* global layout */
  74.  
  75. body {
  76. background-image:url("/images/cascade.png");
  77. }
  78. #body {
  79. padding:0px;
  80. spacing:0px;
  81. width:100%;
  82. vertical-align:middle;
  83. }
  84. #header {
  85. width:100%;
  86. position:_absolute;
  87. padding-right:0px;
  88. padding-left:0px;
  89. padding-top:0px;
  90. background-image:url("/images/header.png");
  91. background-repeat:no-repeat;
  92. vertical-align:middle;
  93. }
  94. .header {
  95. width:100%;
  96. position:_absolute;
  97. padding-right:0px;
  98. padding-left:0px;
  99. padding-top:0px;
  100. }
  101. .con1 {
  102. position:_absolute;
  103. left:0px;
  104. width:300px;
  105. vertical-align:top;
  106. }
  107. .con2 {
  108. background-color:#999999;
  109. position:_absolute;
  110. }
  111. .con3 {
  112. position:_absolute;
  113. right:0px;
  114. width:300px;
  115. vertical-align:top;
  116. }
  117. .footer {
  118. background-color:#757575;
  119. }
  120. .console {
  121. }
  122. a.nav {
  123. color:white;
  124. font-weight:bold;
  125. font-size:1.15em;
  126. text-decoration:none;
  127. }
  128. .members-bar {
  129. width:100%;
  130. text-align:center;
  131. margin-left:auto;
  132. margin-right:auto;
  133. }
  134. .left-header {
  135. font-size:1.25em;
  136. font-weight:bold;
  137. font-color:white;
  138. text-align:center;
  139. text-decoration:underline;
  140. font-family:impact,charcoal,sans-serif;
  141. }
  142. .globalnews {
  143. vertical-align:middle;
  144. text-align:center;
  145. }
  146. td.siteshell {
  147. padding:15px;
  148. }
  149. .sidebar {
  150. padding:15px;
  151. }
  152. #sidebar-left {
  153. padding-left:15px;
  154. }
  155. #sidebar-right {
  156. padding-right:15px;
  157. }
  158. td {
  159. vertical-align:top;
  160. text-align:top;
  161. }
  162. </style>
  163. </head>
  164.  
  165. <body>
  166. <table border="0" id="body">
  167. <!--- START TOP SECTION --->
  168. <tr>
  169. <td colspan="5">
  170. <img src="/images/header.png" width="100%">
  171. </td>
  172. </tr>
  173. <tr>
  174. <td colspan="5" background="/images/nav.png" width="100%">
  175. <center>
  176. <?PHP
  177. if($_SESSION['online'] == 1)
  178. {
  179. echo '
  180. <table border="1" width="100%">
  181. <tr>
  182. <td>
  183. <a href="index.php"><center>HOME</center></a>
  184. </td>
  185. <td>
  186. <a href="groups.php"><center>GROUPS</center></a>
  187. </td>
  188. <td>
  189. <a href="news.php"><center>NEWS</center></a>
  190. </td>
  191. <td>
  192. <a href="console.php"><center>CONSOLE</center></a>
  193. </td>
  194. <td>
  195. <a href="logout.php"><center>LOGOUT</center></a>
  196. </td>
  197. </tr>
  198. </table>
  199. ';
  200. }
  201. else
  202. {
  203. echo '
  204. <table border="0" background="/images/nav.png" width="100%">
  205. <tr>
  206. <td>
  207. <a href="index.php"><center>HOME</center></a>
  208. </td>
  209. <td>
  210. <a href="groups.php"><center>GROUPS</center></a>
  211. </td>
  212. <td>
  213. <a href="news.php"><center>NEWS</center></a>
  214. </td>
  215. <td>
  216. <a href="register.php"><center>REGISTER</center></a>
  217. </td>
  218. <td>
  219. <a href="login.php"><center>LOGIN</center></a>
  220. </td>
  221. </tr>
  222. </table>
  223. ';
  224. }
  225. ?>
  226. </center>
  227. </td>
  228. </tr>
  229. </table>
  230. <!--- END TOP SECTION --->
  231. <table border="0" width="100%">
  232. <tr>
  233. <td class="con1" colspan="1">
  234. <table border="0" class="sidebar">
  235. <tr style="border-collapse:collapse;">
  236. <td colspan="3" background="/images/sidebartitle.png" id="sidebar-left"><strong>Classwork/Homework</strong></td>
  237. </tr>
  238. <tr style="width:10%;vertical-align:middle;">
  239. <td style="width:10%;vertical-align:middle;">
  240. <center>
  241. <table border="0" background="/images/sidebg.png" style="width:100%;">
  242. <tr>
  243. <td>
  244. <h4 background="/images/sidebg.png">Test</h4>
  245. <?PHP
  246. // QUERYING THE DATABASE - SELECTING HOMEWORK-CLASSWORK
  247. // This module can support up to 7 posts from the database
  248. $sql = 'SELECT * FROM cwhw';
  249. $query1 = mysql_query($sql,$con);
  250. // set 1
  251. $result1a = mysql_result($query1,0,2);
  252. $result1b = mysql_result($query1,0,1);
  253. $result1c = mysql_result($query1,0,3);
  254. //Set 2
  255. $result2a = mysql_result($query1,1,2);
  256. $result2b = mysql_result($query1,1,1);
  257. $result2c = mysql_result($query1,1,3);
  258. //set 3
  259. $result3a = mysql_result($query1,2,2);
  260. $result3b = mysql_result($query1,2,1);
  261. $result3c = mysql_result($query1,2,3);
  262. //set 4
  263. $result4a = mysql_result($query1,3,2);
  264. $result4b = mysql_result($query1,3,1);
  265. $result4c = mysql_result($query1,3,3);
  266. //set 5
  267. $result5a = mysql_result($query1,4,2);
  268. $result5b = mysql_result($query1,4,1);
  269. $result5c = mysql_result($query1,4,3);
  270. //set 6
  271. $result6a = mysql_result($query1,5,2);
  272. $result6b = mysql_result($query1,5,1);
  273. $result6c = mysql_result($query1,5,3);
  274. //set 7
  275. $result7a = mysql_result($query1,6,2);
  276. $result7b = mysql_result($query1,6,1);
  277. $result7c = mysql_result($query1,6,3);
  278. ?>
  279. <h5><?PHP echo $result1a; ?></h5><br />
  280. <p>
  281. <strong>Assignment: </strong><?PHP echo $result1b; ?><br />
  282. <strong>Due Date: </strong><?PHP echo $result1c; ?><br />
  283. </p>
  284. <hr>
  285. <h5><?PHP echo $result2a; ?></h5><br />
  286. <p>
  287. <strong>Assignment: </strong><?PHP echo $result2b; ?><br />
  288. <strong>Due Date: </strong><?PHP echo $result2c; ?><br />
  289. </p>
  290. <hr>
  291. <h5><?PHP echo $result3a; ?></h5><br />
  292. <p>
  293. <strong>Assignment: </strong><?PHP echo $result3b; ?><br />
  294. <strong>Due Date: </strong><?PHP echo $result3c; ?><br />
  295. </p>
  296. <hr>
  297. <h5><?PHP echo $result4a; ?></h5><br />
  298. <p>
  299. <strong>Assignment: </strong><?PHP echo $result4b; ?><br />
  300. <strong>Due Date: </strong><?PHP echo $result4c; ?><br />
  301. </p>
  302. <hr>
  303. <h5><?PHP echo $result5a; ?></h5><br />
  304. <p>
  305. <strong>Assignment: </strong><?PHP echo $result5b; ?><br />
  306. <strong>Due Date: </strong><?PHP echo $result5c; ?><br />
  307. </p>
  308. <hr>
  309. <h5><?PHP echo $result6a; ?></h5><br />
  310. <p>
  311. <strong>Assignment: </strong><?PHP echo $result6b; ?><br />
  312. <strong>Due Date: </strong><?PHP echo $result6c; ?><br />
  313. </p>
  314. <hr>
  315. <h5><?PHP echo $result7a; ?></h5><br />
  316. <p>
  317. <strong>Assignment: </strong><?PHP echo $result7b; ?><br />
  318. <strong>Due Date: </strong><?PHP echo $result7c; ?><br />
  319. </p>
  320. <hr>
  321. </td></tr>
  322. <tr
  323.  
  324. </td>
  325. </tr>
  326. </table>
  327. </center>
  328. </td>
  329. </tr>
  330. </table>
  331. </td>
  332. <td class="con2" colspan="1">
  333. <center><marquee width="50%" style="color:red;vertical-align:top;" class="con2"><strong>Website Under Construction. Sorry for the Inconvenience.</strong></marquee></center><br />
  334. <?PHP
  335. // QUERYING THE DATABASE - SELECTING NEWS POSTS FROM DATABASE
  336. $sql = 'SELECT * FROM news';
  337. $query1 = mysql_query($sql,$con);
  338. $result1 = mysql_result($query1,0,1); // title 1
  339. $result2 = mysql_result($query1,0,2); // article 1
  340. $result3 = mysql_result($query1,1,1); // title 2
  341. $result4 = mysql_result($query1,1,2); // article 2
  342. $result5 = mysql_result($query1,2,1); // title 3
  343. $result6 = mysql_result($query1,2,2); // article 3
  344. ?>
  345. <table border="1" class="globalnews" cellpadding="0" cellspacing="0" style="vertical-align:top;">
  346. <tr style="border-collapse:collapse;">
  347. <td colspan="3"><strong>Global News</strong></td>
  348. </tr>
  349. <tr style="width:10%;vertical-align:middle;">
  350. <td style="width:10%;vertical-align:middle;">
  351. <center>
  352. <table border="0">
  353. <tr>
  354. <td><strong><?PHP echo $result1; ?></strong></td>
  355. </tr>
  356. <tr>
  357. <td><?PHP echo $result2; ?></td>
  358. </tr>
  359. <tr><td><center><hr></center></td></tr>
  360. <tr>
  361. <td><strong><?PHP echo $result3; ?></strong></td>
  362. </tr>
  363. <tr>
  364. <td><?PHP echo $result4; ?></td>
  365. </tr>
  366. <tr><td><center><hr></center></td></tr>
  367. <tr>
  368. <td><strong><?PHP echo $result5; ?></strong></td>
  369. </tr>
  370. <tr>
  371. <td><?PHP echo $result6; ?></td>
  372. </tr>
  373. <tr><td><center><hr></center></td></tr>
  374. </table>
  375. </center>
  376. </td>
  377. </tr>
  378. </table><br />
  379. <!--- LOWER CENTER SECTION : VARIABLE CONTENT!!!! --->
  380. <table border="0" class="con2">
  381. <tr>
  382. <td>
  383. <p>
  384.  
  385.  
  386.  
  387. </p>
  388. </td>
  389. </tr>
  390. </table>
  391. <!--- END VARIABLE CONTENT --->
  392. </td>
  393. <td class="con3" colspan="1">
  394. <table border="0" class="sidebar">
  395. <tr style="border-collapse:collapse;">
  396. <td colspan="3" background="/images/sidebartitle.png" id="sidebar-right"><strong>Members Area</strong></td>
  397. </tr>
  398. <tr style="width:10%;vertical-align:middle;">
  399. <td style="width:10%;vertical-align:middle;">
  400. <center>
  401. <table border="0" background="/images/sidebg.png" style="width:100%;">
  402. <tr>
  403. <td style="text-align:center;vertical-align:middle;">
  404. <?PHP
  405. if(!isset($_SESSION['online'])){
  406. echo '
  407. <h4 background="/images/sidebg.png">You are not logged in.</h4>
  408. <p>
  409. <form action="_login.php">
  410. <label for="username"><strong>Username:</strong></label><br />
  411. <input type="text" maxlength="40" charlimit="40" name="username" id="username" /><br />
  412. <br />
  413. <label for="password"><strong>Password:</strong></label><br />
  414. <input type="password" maxlength="40" charlimit="40" name="password" id="password" /><br />
  415. <br />
  416. <input type="submit" value="Login" />
  417. </form>
  418. </p>
  419. ';
  420. }
  421. else {
  422. echo '
  423. <h4 background="/images/sidebg.png">You are logged in </h4>
  424. <p>
  425. Welcome back,' . $_SESSION['username'] . '.<br /><br />
  426. (<a href="console.php">My Console</a>)<br />
  427. (<a href="groups.php">Logout</a>)<br />
  428. </p>
  429. ';
  430. }
  431. ?>
  432. </td>
  433. </tr>
  434. </table>
  435. </center>
  436. </td>
  437. </tr>
  438. </table>
  439. </td>
  440. <tr>
  441. <!--- START FOOTER SECTION --->
  442. <td colspan="3" style="color:white;font-weight:bold;text-align:center;font-weight:georgia;" class="footer">
  443. <p><br /><br /><br />This is a Student Website. Opinions expressed on this page shall not be attributed to the district.<br />
  444. Images Copyright of their original owners/creators.<br />
  445. &copy;2011 Descent Designs, All Rights Reserved.<br />
  446. <strong>Descent Designs Site ID:</strong> 51101</p>
  447. </td>
  448. </tr>
  449. </table>
  450. </body>
  451. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement