Advertisement
Guest User

Untitled

a guest
Sep 15th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.38 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.  
  51. ul
  52. {
  53. list-style-type:none;
  54. margin:0;
  55. padding:0;
  56. }
  57. li
  58. {
  59. float:left;
  60. }
  61. a
  62. {
  63. display:block;
  64. width:100px;
  65. }
  66.  
  67. /* global layout */
  68.  
  69. body {
  70. background-image:url("/images/cascade.png");
  71. }
  72. #body {
  73. padding:0px;
  74. spacing:0px;
  75. width:100%;
  76. vertical-align:middle;
  77. }
  78. #header {
  79. width:100%;
  80. position:_absolute;
  81. padding-right:0px;
  82. padding-left:0px;
  83. padding-top:0px;
  84. background-image:url("/images/header.png");
  85. background-repeat:no-repeat;
  86. vertical-align:middle;
  87. }
  88. .header {
  89. width:100%;
  90. position:_absolute;
  91. padding-right:0px;
  92. padding-left:0px;
  93. padding-top:0px;
  94. }
  95. .con1 {
  96. position:_absolute;
  97. left:0px;
  98. width:300px;
  99. vertical-align:top;
  100. }
  101. .con2 {
  102. background-color:#999999;
  103. position:_absolute;
  104. }
  105. .con3 {
  106. position:_absolute;
  107. right:0px;
  108. width:300px;
  109. vertical-align:top;
  110. }
  111. .footer {
  112. background-color:#757575;
  113. }
  114. .console {
  115. }
  116. a.nav {
  117. color:white;
  118. font-weight:bold;
  119. font-size:1.15em;
  120. text-decoration:none;
  121. }
  122. .members-bar {
  123. width:100%;
  124. text-align:center;
  125. margin-left:auto;
  126. margin-right:auto;
  127. }
  128. .left-header {
  129. font-size:1.25em;
  130. font-weight:bold;
  131. font-color:white;
  132. text-align:center;
  133. text-decoration:underline;
  134. font-family:impact,charcoal,sans-serif;
  135. }
  136. .globalnews {
  137. vertical-align:middle;
  138. text-align:center;
  139. }
  140. td.siteshell {
  141. padding:15px;
  142. }
  143. .sidebar {
  144. padding:15px;
  145. }
  146. #sidebar-left {
  147. padding-left:15px;
  148. }
  149. #sidebar-right {
  150. padding-right:15px;
  151. }
  152. </style>
  153. </head>
  154.  
  155. <body>
  156. <table border="0" id="body">
  157. <!--- START TOP SECTION --->
  158. <tr>
  159. <td colspan="5">
  160. <img src="/images/header.png" width="100%">
  161. </td>
  162. </tr>
  163. <tr>
  164. <td colspan="5" background="/images/nav.png" width="100%">
  165. <center>
  166. <?PHP
  167. if($_SESSION['online'] == 1)
  168. {
  169. echo '
  170. <table border="1" width="100%">
  171. <tr>
  172. <td>
  173. <a href="index.php"><center>HOME</center></a>
  174. </td>
  175. <td>
  176. <a href="groups.php"><center>GROUPS</center></a>
  177. </td>
  178. <td>
  179. <a href="news.php"><center>NEWS</center></a>
  180. </td>
  181. <td>
  182. <a href="console.php"><center>CONSOLE</center></a>
  183. </td>
  184. <td>
  185. <a href="logout.php"><center>LOGOUT</center></a>
  186. </td>
  187. </tr>
  188. </table>
  189. ';
  190. }
  191. else
  192. {
  193. echo '
  194. <table border="0" background="/images/nav.png" width="100%">
  195. <tr>
  196. <td>
  197. <a href="index.php"><center>HOME</center></a>
  198. </td>
  199. <td>
  200. <a href="groups.php"><center>GROUPS</center></a>
  201. </td>
  202. <td>
  203. <a href="news.php"><center>NEWS</center></a>
  204. </td>
  205. <td>
  206. <a href="register.php"><center>REGISTER</center></a>
  207. </td>
  208. <td>
  209. <a href="login.php"><center>LOGIN</center></a>
  210. </td>
  211. </tr>
  212. </table>
  213. ';
  214. }
  215. ?>
  216. </center>
  217. </td>
  218. </tr>
  219. </table>
  220. <!--- END TOP SECTION --->
  221. <table border="0" width="100%">
  222. <tr>
  223. <td class="con1" colspan="1">
  224. <table border="0" class="sidebar">
  225. <tr style="border-collapse:collapse;">
  226. <td colspan="3" background="/images/sidebartitle.png" id="sidebar-left"><strong>NEWS</strong></td>
  227. </tr>
  228. <tr style="width:10%;vertical-align:middle;">
  229. <td style="width:10%;vertical-align:middle;">
  230. <center>
  231. <table border="0" background="/images/sidebg.png">
  232. <tr>
  233. <td>
  234. <h4 background="/images/sidebg.png">Test</h4> <-------------------------------------------------------------------------- ERROR (<)
  235. <p>
  236. <?PHP
  237. // QUERYING THE DATABASE - SELECTING HOMEWORK-CLASSWORK
  238. // This module can support up to 7 posts from the database
  239. $sql = 'SELECT * FROM cwhw';
  240. $query1 = mysql_query($sql,$con);
  241. // set 1
  242. $result1a = mysql_result($query1,0,2)
  243. $result1b = mysql_result($query1,0,1)
  244. $result1c = mysql_result($query1,0,3)
  245. //Set 2
  246. $result2a = mysql_result($query1,1,2)
  247. $result2b = mysql_result($query1,1,1)
  248. $result2c = mysql_result($query1,1,3)
  249. //set 3
  250. $result3a = mysql_result($query1,2,2)
  251. $result3b = mysql_result($query1,2,1)
  252. $result3c = mysql_result($query1,2,3)
  253. //set 4
  254. $result4a = mysql_result($query1,3,2)
  255. $result4b = mysql_result($query1,3,1)
  256. $result4c = mysql_result($query1,3,3)
  257. //set 5
  258. $result5a = mysql_result($query1,4,2)
  259. $result5b = mysql_result($query1,4,1)
  260. $result5c = mysql_result($query1,4,3)
  261. //set 6
  262. $result6a = mysql_result($query1,5,2)
  263. $result6b = mysql_result($query1,5,1)
  264. $result6c = mysql_result($query1,5,3)
  265. //set 7
  266. $result7a = mysql_result($query1,6,2)
  267. $result7b = mysql_result($query1,6,1)
  268. $result7c = mysql_result($query1,6,3)
  269. ?>
  270. </p>
  271. </td>
  272. </tr>
  273. </table>
  274. </center>
  275. </td>
  276. </tr>
  277. </table>
  278. </td>
  279. <td class="con2" colspan="1">
  280. <center><marquee width="50%" style="color:red;" class="con2"><strong>Website Under Construction.  Sorry for the Inconvenience.</strong></marquee></center><br />
  281. <?PHP
  282. // QUERYING THE DATABASE - SELECTING NEWS POSTS FROM DATABASE
  283. $sql2 = 'SELECT * FROM news';
  284. $query2 = mysql_query($sql,$con);
  285. $result7 = mysql_result($query1,0,1); // title 1
  286. $result8 = mysql_result($query1,0,2); // article 1
  287. $result9 = mysql_result($query1,1,1); // title 2
  288. $result10 = mysql_result($query1,1,2); // article 2
  289. $result11 = mysql_result($query1,2,1); // title 3
  290. $result12 = mysql_result($query1,2,2); // article 3
  291. ?>
  292. <table border="1" class="globalnews" cellpadding="0" cellspacing="0">
  293. <tr style="border-collapse:collapse;">
  294. <td colspan="3"><strong>NEWS</strong></td>
  295. </tr>
  296. <tr style="width:10%;vertical-align:middle;">
  297. <td style="width:10%;vertical-align:middle;">
  298. <center>
  299. <table border="0">
  300. <tr>
  301. <td><strong><?PHP echo $result1; ?></strong></td>
  302. </tr>
  303. <tr>
  304. <td><?PHP echo $result2; ?></td>
  305. </tr>
  306. <tr><td><center><hr></center></td></tr>
  307. <tr>
  308. <td><strong><?PHP echo $result3; ?></strong></td>
  309. </tr>
  310. <tr>
  311. <td><?PHP echo $result4; ?></td>
  312. </tr>
  313. <tr><td><center><hr></center></td></tr>
  314. <tr>
  315. <td><strong><?PHP echo $result5; ?></strong></td>
  316. </tr>
  317. <tr>
  318. <td><?PHP echo $result6; ?></td>
  319. </tr>
  320. <tr><td><center><hr></center></td></tr>
  321. </table>
  322. </center>
  323. </td>
  324. </tr>
  325. </table><br />
  326. <!--- LOWER CENTER SECTION :  VARIABLE CONTENT!!!! --->
  327. <table border="0" class="con2">
  328. <tr>
  329. <td>
  330. <p>
  331.  
  332.  
  333.  
  334. </p>
  335. </td>
  336. </tr>
  337. </table>
  338. <!--- END VARIABLE CONTENT --->
  339. </td>
  340. <td class="con3" colspan="1">
  341. <table border="0" class="sidebar">
  342. <tr style="border-collapse:collapse;">
  343. <td colspan="3" background="/images/sidebartitle.png" id="sidebar-right"><strong>Members Area</strong></td>
  344. </tr>
  345. <tr style="width:10%;vertical-align:middle;">
  346. <td style="width:10%;vertical-align:middle;">
  347. <center>
  348. <table border="0" background="/images/sidebg.png" style="width:100%;">
  349. <tr>
  350. <td style="text-align:center;vertical-align:middle;">
  351. <?PHP
  352. if(!isset($_SESSION['online'])){
  353. echo '
  354. <h4 background="/images/sidebg.png">You are not logged in.</h4>
  355. <p>
  356. <form action="_login.php">
  357. <label for="username"><strong>Username:</strong></label><br />
  358. <input type="text" maxlength="40" charlimit="40" name="username" id="username" /><br />
  359. <br />
  360. <label for="password"><strong>Password:</strong></label><br />
  361. <input type="password" maxlength="40" charlimit="40" name="password" id="password" /><br />
  362. <br />
  363. <input type="submit" value="Login" />
  364. </form>
  365. </p>
  366. ';
  367. }
  368. else {
  369. echo '
  370. <h4 background="/images/sidebg.png">You are logged in </h4>
  371. <p>
  372. Welcome back,' . $_SESSION['username'] . '.<br /><br />
  373. (<a href="console.php">My Console</a>)<br />
  374. (<a href="groups.php">Logout</a>)<br />
  375. </p>
  376. ';
  377. }
  378. ?>
  379. </td>
  380. </tr>
  381. </table>
  382. </center>
  383. </td>
  384. </tr>
  385. </table>
  386. </td>
  387. <tr>
  388. <!--- START FOOTER SECTION --->
  389. <td colspan="3" style="color:white;font-weight:bold;text-align:center;font-weight:georgia;" class="footer">
  390. <p><br /><br /><br />This is a Student Website. Opinions expressed on this page shall not be attributed to the district.<br />
  391. Images Copyright of their original owners/creators.<br />
  392. &copy;2011 Descent Designs, All Rights Reserved.<br />
  393. <strong>Descent Designs Site ID:</strong> 51101</p>
  394. </td>
  395. </tr>
  396. </table>
  397. </body>
  398. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement