<?php require_once('Connections/telmanik_press.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_telmanik_press, $telmanik_press);
$query_page_article = "SELECT * FROM content WHERE page_name = 'home'";
$page_article = mysql_query($query_page_article, $telmanik_press) or die(mysql_error());
$row_page_article = mysql_fetch_assoc($page_article);
$totalRows_page_article = mysql_num_rows($page_article);

mysql_select_db($database_telmanik_press, $telmanik_press);
$query_pages_info = "SELECT * FROM pages WHERE page_name LIKE '%home%'";
$pages_info = mysql_query($query_pages_info, $telmanik_press) or die(mysql_error());
$row_pages_info = mysql_fetch_assoc($pages_info);
$totalRows_pages_info = mysql_num_rows($pages_info);


mysql_select_db($database_telmanik_press, $telmanik_press);
$query_slider = "SELECT * FROM slider WHERE enable_disable = '1'";
$slider = mysql_query($query_slider, $telmanik_press) or die(mysql_error());
$row_slider = mysql_fetch_assoc($slider);
$totalRows_slider = mysql_num_rows($slider);

$photogallery= $row_slider['gallery_selected'];

mysql_select_db($database_telmanik_press, $telmanik_press);
$query_frontslider = "SELECT * FROM photos WHERE gallery = '$photogallery'";
$frontslider = mysql_query($query_frontslider, $telmanik_press) or die(mysql_error());
$row_frontslider = mysql_fetch_assoc($frontslider);
$totalRows_frontslider = mysql_num_rows($frontslider);
mysql_select_db($database_telmanik_press, $telmanik_press);



?>
<?php $title = $row_pages_info['page_title']; ?>
<?php require_once('header.php');?>
<script type="text/javascript" src="<?php echo $row_webinfo_select['website']?>/themes/<?php echo $row_theme_select['theme']?>/scripts/1-4-2-jquery-min.js"></script>
<script type="text/javascript" src="<?php echo $row_webinfo_select['website']?>/themes/<?php echo $row_theme_select['theme']?>/scripts/jquery.cycle.all.2.74.js"></script>
<script type="text/javascript" src="<?php echo $row_webinfo_select['website']?>/themes/<?php echo $row_theme_select['theme']?>/scripts/jquery.bk.js"></script>
<script type="text/javascript" src="<?php echo $row_webinfo_select['website']?>/themes/<?php echo $row_theme_select['theme']?>/scripts/fadeslideshow.js">


/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>
<script type="text/javascript">
$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
});
</script>
<div id="mid_section">


<!--slider fade --->
<div align="center"><div class="slideshow">

<?php do { ?>
      <?php echo '<img src="'. $row_webinfo_select['website'].'/photos/'.$row_frontslider['image_name'].'" width="500" height="375" alt="'.$row_frontslider['title'].' ">'; ?>
      <?php } while ($row_frontslider = mysql_fetch_assoc($frontslider)); ?>







 <?php echo $row_frontslider['imagethumb']; ?></div></div>






   <p> 
    <?php do { ?>
      <?php echo $row_page_article['block_content']; ?>
      <?php } while ($row_page_article = mysql_fetch_assoc($page_article)); ?></p>

  <p>&nbsp; </p>
</div>

<?php require_once('footer.php');?>
<?php
mysql_free_result($page_article);

mysql_free_result($pages_info);


?>
