<?php require_once('Connections/myuserconnection.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$maxRows_courselisting = 10;
$pageNum_courselisting = 0;
if (isset($_GET['pageNum_courselisting'])) {
  $pageNum_courselisting = $_GET['pageNum_courselisting'];
}
$startRow_courselisting = $pageNum_courselisting * $maxRows_courselisting;

mysql_select_db($database_myuserconnection, $myuserconnection);
$query_courselisting = "SELECT * FROM classinfo ORDER BY classdate ASC";
$query_limit_courselisting = sprintf("%s LIMIT %d, %d", $query_courselisting, $startRow_courselisting, $maxRows_courselisting);
$courselisting = mysql_query($query_limit_courselisting, $myuserconnection) or die(mysql_error());
$row_courselisting = mysql_fetch_assoc($courselisting);

if (isset($_GET['totalRows_courselisting'])) {
  $totalRows_courselisting = $_GET['totalRows_courselisting'];
} else {
  $all_courselisting = mysql_query($query_courselisting);
  $totalRows_courselisting = mysql_num_rows($all_courselisting);
}
$totalPages_courselisting = ceil($totalRows_courselisting/$maxRows_courselisting)-1;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="shortcut icon" href="Tool_Bar_Image.png"> 
<title>Madsen's Guns</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="description" content="Madsen's Guns: Quality firearms at reasonable prices in La Grande, Oregon..."/> 
<meta name="keywords" content="Handguns, La Grande Oregon, Concealed Carry Classes, Hunting and Fishing Supplies, Guns, Firearms" />
<meta name="robots" content="index, follow"/>

<!--[if (gte IE 7)|(!IE)]><!-->
<link rel="stylesheet" type="text/css" href="menu.css" />
<!--<![endif]-->

<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="menuie6.css" />
<![endif]-->

<style type="text/css">

ul.MenuBarVertical
{
	margin: 0 auto;
	width: 8em;
}


body {
	background-image: url(images/background.jpg);
	background-repeat: repeat;
}



.Title_Typset {
	font-family: pal;
	font-size: x-large;
	font-weight: bold;
}
.form {
	font-family: Palatino;
	font-size: 14px;
	font-style: normal;
	line-height: normal;
	font-weight: bold;
	text-transform: none;
	color: #000000;
	background-color: #33FFFF;
	border: 1px solid #000000;
}
.style1 {color: #FF0000}
.red_heading {
	color: #FF2740;
}
</style>


<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  return false;
}
//-->
</script>

</head>

<body>
<table width="950" border="1" cellspacing="2" cellpadding="2" align="center" background="images/background2.jpg">
  <tr>
    <td align="center">
<!-- 	   <h1 align="center">Madsen's Guns</h1> -->
	   <h1 align="center"><img src="images/dark_walk.jpg" width="320" height="240" /><img src="images/woman_handgun_bw_blur.jpg" width="432" height="240" alt="handgun training women" /></h1>
	   <table width="910" border="1" cellspacing="1" cellpadding="3">

        <tr>
          <td width="137" align="left" valign="top">
		  
<!--Begin Menu -->
<div id ="menuContainer"> 
<ul>
  <li><a href="#menuContainer">Gun Purchases</a>
    <ul>
      <li><a href="http://www.davidsonsinc.com/consumers/subsites/dealer_home.asp?dealer_id=315899" target="_new">Davidson's<br />
        <span class="style1">Purchase Online</span></a></li>
      <li><a href="http://consumer.gzanders.com">Zander's<br />
        <span class="style1">Contact Madsen's</span></a></li>
    </ul>
  </li>
  <li><a href="#menuContainer">Specialty Guns & Suppressors</a>
    <ul>
      <li><a href="http://www.gem-tech.com/store/pc/home.asp" target="_blank">Gem-Tech</a></li>
      <li><a href="http://www.tacticalinc.com/" target="_blank">Tactical Innovations</a></li>
      <li><a href="http://thunderbeastarms.com/" target="_blank">Thunder Beast Arms</a></li>
      <li><a href="http://www.tacticalsol.com/" target="_blank">Tactical Solutions</a></li>
    </ul>
  </li>
  <li><a href="#menuContainer">Sporting Goods</a>
     <ul>
      <li><a href="http://consumer.gzanders.com/" target="_blank">Sporting Goods</a></li>
     </ul>
  </li>
  <li><a href="#menuContainer">Special Packages</a>
     <ul>
      <li><a href="specials.html" target="_blank">Special Packages</a></li>
     </ul>
  </li>
  <li><a href="#menuContainer">Training and Classes</a>
    <ul>
      <li><a href="#menuContainer" target="_blank">Concealed Carry Classes</a></li>
      <li><a href="#menuContainer">Advanced Training</a></li>
    </ul>
  </li>
  <li><a href="#menuContainer">Contact Us</a>
    <ul>
      <li><a href="mailto:madsensguns@eoni.com">Email Us</a></li>
	  <li><a href="contactInfo.html">Contact Information</a></li>
      <li><a href="coming_soon.html" target="_blank">Madsen Gun's Blog</a></li>
    </ul>
  </li>
</ul>
</div>

<!--End Menu -->
</td>
          <td width="542" valign="top">
	   <h1 align="center">Concealed Carry Classes</h1>
		  <p align="left">Take responsibility for your own safety.  Sign up for a class below.</p>
		  <p align="left">Not only do we offer firearms and specialty accessories, such as <a href="specials.html">suppressors</a>, and fully-automatic firearms, but we offer <a href="ccwClasses.html">classes for concealed carry licenses</a>. If you are looking for concealed carry classes in La Grande or Elgin, we would enjoy talking to you. If you have group of 10 people or more and a location to meet, we can come to you.</p>
		  <h2 align="center" class="red_heading">Upcoming Classes</h2></td>
          <td width="201" align="left" valign="top">
          

          <h3>Instructors</h3>
          <p>Eric Madsen has BLANK years experience in firearm training. He...</p>
          <!-- Start WxSticker --><!-- End WxSticker -->

</td>
        </tr>
        <tr align="center">
          <td colspan="3">
      <div id="wrapper">
      <div id="middle" title="Class List">
        <table width="840" border="1">
  <tr>
    <th width="225" height="37" scope="col">Class</th>
    <th width="125" scope="col">Date</th>
    <th width="75" scope="col">Time</th>
    <th width="200" scope="col">Location</th>
    <th width="90" scope="col">&nbsp;</th>
    <th width="90" scope="col">&nbsp;</th>
  </tr>
  <?php do { ?>
    <tr>
      <td align="left" valign="top"><?php echo $row_courselisting['classname']; ?></td>
      <td valign="top"><?php echo date("l, F j, Y", strtotime($row_courselisting['classdate'])); ?></td>
      <td valign="top"><?php echo date("g:i a", strtotime($row_courselisting['time'])); ?></td>
      <td align="left" valign="top"><?php echo $row_courselisting['streetlocation']; ?><br><?php echo $row_courselisting['citylocation']; ?>, <?php echo $row_courselisting['state']; ?></td>
      <td align="center" valign="top"><a href="admin/course_description.php?classname=<?php echo $row_courselisting['classname']; ?>" target="new">Description</a></td>
      <td align="center" valign="top"><a href="admin/registration.php?class_id=<?php echo $row_courselisting['class_id']; ?>">Register</a></td>
    </tr>
    <?php } while ($row_courselisting = mysql_fetch_assoc($courselisting)); ?>
        </table>
      </div>
          <div id="footer" align="center"><a href="../index.html">Home</a> | <a href="http://www.davidsonsinc.com/consumers/subsites/dealer_home.asp?dealer_id=315899" title="Gun Purchases" target="_new">Gun Purchases</a>| <a href="#menuContainer">Concealed Carry Classes</a> |<a href="mailto:madsensguns@eoni.com">Email Us</a></div>
 </div>
          </td>
        </tr>
</table>      
    <p>&nbsp;</p></td>
  </tr>
</table>
<p align="center">This page modified on <!-- #BeginDate format:fcAm1 -->Monday, December 10, 2012<!-- #EndDate -->.</p>
</body>
</html>
<?php
mysql_free_result($courselisting);
?>
