<?php require_once('../Connections/demuth.php'); ?>
<?php require_once('../sys_connection/demuth.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;
}
}

mysql_select_db($database_demuth, $demuth);
$query_services = "SELECT * FROM services";
$services = mysql_query($query_services, $demuth) or die(mysql_error());
$row_services = mysql_fetch_assoc($services);
$totalRows_services = mysql_num_rows($services);
?>
<!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>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>M-Demuth - Services</title>
		<link href="../sys_css/css_global.css" rel="stylesheet" type="text/css" />
		<link href="../sys_css/css_default.css" rel="stylesheet" type="text/css" />
		<?php include('../sys_inc/inc_meta.php'); ?>
		<?php include('../sys_js/sys_google.php'); ?>
	</head>
	<body id="services">
		<div id="wrap_container">
		<!-- KOPF START -->
			<?php include('../sys_inc/inc_header.php'); ?>
		<!-- KOPF STOPP -->
		<!-- CONTENT START -->
			<div id="wrap_content">
				<h2>Unsere Serviceleistungen</h2>
				<div>
					<?php do { ?>
						<div class="content_column_220 floatLeft <?php if ($service_counter<2) { echo "margin_right_18px"; } ?>">
						<img src="../sys_pix/dummi.gif" width="220px" height="152px" />
						<p><?php echo $row_services['service_NAME']; ?></p>
						<div><a class="button" href="details.php?service_ID=<?php echo $row_services['service_ID']; ?>">Mehr lesen</a></div>
					</div>
				  <?php $service_counter++; } while (($row_services = mysql_fetch_assoc($services)) && ($service_counter<3)); ?>
					<div class="clear"></div>
				</div>
				<div class="line_grey"></div>
				<div>
					<h2>Liste aller Serviceleistungen</h2>
					<div class="floatLeft content_column">
						<ul class="service_list">
						<?php do { ?>
							<li><a href="details.php?service_ID=<?php echo $row_services['service_ID']; ?>"><?php echo $row_services['service_NAME']; ?></a></li>
						<?php $service_counter_1++;} while (($row_services = mysql_fetch_assoc($services)) && ($service_counter_1<7)); ?>
                	    </ul>
					</div>
					<div class="floatRight content_column">
						<ul class="service_list">
						<?php do { ?>
							<li><a href="details.php?service_ID=<?php echo $row_services['service_ID']; ?>"><?php echo $row_services['service_NAME']; ?></a></li>
						<?php $service_counter_2++;} while (($row_services = mysql_fetch_assoc($services)) && ($service_counter_2<7)); ?>
                	    </ul>
					</div>
					<div class="clear"></div>
				</div>
			</div>
		<!-- CONTENT STOPP -->
		<!-- FOOTER START -->
			<?php include('../sys_inc/inc_footer.php'); ?>
		<!-- FOOTER STOPP -->
		</div>
	</body>
</html>
<?php
mysql_free_result($services);
?>
