aboutsummaryrefslogtreecommitdiff
path: root/index.php
blob: dd5dd40117b8e415d74d7edbb40fe64061dde240 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/**
 * Bayonet Conent Management System
 * Copyright (C) Joseph Hunkeler & Evan O'Connell
 * 
 * Purpose of this software is to allow users to manage their website
 * with ease and without needing to have any coding knowledge in order 
 * to maintain it. Visit www.eodesign.com/cms for any updates or feedback. 
 */

/* Begin try/catch block */
try {

include './includes/config.php'; 
include './includes/debug.php';
include './includes/sql.class.php';
include './includes/functions.php';

/* Setup error handing callbacks */
ob_start("fatal_error_handler");
set_error_handler("handle_error");

$db = new Bayonet_SQL();
$db->Connect(
  $config['sql']['hostname'],
  $config['sql']['username'],
  $config['sql']['password']
  );
$db->Select_db($config['sql']['database']);

include 'header.php';
//session_start(); 
?>

<div class="container">

<!-- banner -->
<!-- <div class="banner"><a href="index.php"><img src="images/logo.jpg" alt="3rd Infantry Division - ArmAII Unit" /></a></div> -->
<div class="banner"><a href="index.php"><img src="images/3rdidtext.png" alt="3rd Infantry Division - ArmAII Unit" /></a></div>

<!-- navigation -->
 <div class="nav"><?php require_once 'navigation.php'; ?></div>

<!-- content -->
<table border="0" cellspacing="10px" cellpadding="0"  class="main" width="100%">
	<tr>
		
	  <!-- block area LEFT -->
	  <?php  //if(!defined('BLOCK_LEFT_DISABLE')): ?>
	    <td class="leftcol">
	      	<?php GetBlocks(BLOCK_LEFT); ?>
	    </td>    
	  <?php //endif; ?>
	  
		<td class="midcol">
	    	<?php  require_once 'modules.php'; ?>
 		</td>
 		
	  <!-- block area RIGHT -->
	  <?php  if(!defined('BLOCK_RIGHT_DISABLE')): ?>
	    <td class="rightcol">
	      	<?php GetBlocks(BLOCK_RIGHT); ?>
	    </td>    
	  <?php endif; ?>
  		
	</tr>
</table>

</div>
<?php include 'footer.php'; ?>
<?php
/* Flushing is needed by the error handler */
ob_end_flush();

} //try ^^    
catch(Exception $e)
{
  ReportError( 
    "<style>td.short{width:100%;}</style><table style=\"width:0;\"><tr><th>Code</th>" . "<td class=\"short\">" . $e->getCode() . "</td>" . "</tr><tr><th>In File</th>" . "<td class=\"short\">" . $e->getFile() . "</td>" . "</tr></table>" . $e->getLine() . " - " . $e->getMessage() . "<br/>" 
  );        
}
?>