<?php
session_start();

if( isset($_SESSION['init_alert']) )
{
	if( ( $str_temp = trim($_SESSION['init_alert']) ) != '' )
		$str_init_alert = $str_temp;

	unset($_SESSION['init_alert']);
}

$uint_row_count = 12;

require_once('includes/common.php');

require_once('includes/data.php');
$obj_class_data = new class_data();

if( !( $arr_news_cates = $obj_class_data->get_news_cates() ) )
{
	$_SESSION['init_alert'] = '指定的新聞分類不存在';

	header('Location: latest_news_list.php');
	exit();
}

$arr_news = $obj_class_data->get_latest_news($uint_row_count);

$arr_banner = $obj_class_data->get_banners(0, 2);

$arr_suggest_news = $obj_class_data->get_suggest_news(4);
?>
<!DOCTYPE html>
<html lang="zh-TW">
  <head>
    <meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
    <meta property="fb:app_id" content="1507360842898051" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content="聯絡我們 | 國防新聞網" />
    <title>聯絡我們 | 國防新聞網 </title>
    <!-- Bootstrap -->
	<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
	<link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/blueimp-gallery-video.css" rel="stylesheet" type="text/css" />
    <link href="css/blueimp-gallery.css" rel="stylesheet" type="text/css" />
	<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />

	<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	<!--[if lt IE 9]>
		  <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
		  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
		<![endif]-->
  </head>

   
<body<?=( isset($str_init_alert) ? ' onLoad="javascript:alert(\'' . $str_init_alert . '\');"' : '' )?>>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/zh_TW/sdk.js#xfbml=1&version=v2.5&appId=1507360842898051";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<? include('_title.php'); ?>
  <div id="c_contents" class="container" >
    <div id="c_contents_l">
    <div class="container-fluid contents_l_top" >
      <div class="nav_button"><a class="home_bn" href="index.php">首頁</a><span class="category_bn">聯絡我們</span></div>
	  
    </div>
    <div>
    <h1>聯絡我們</h1>


    <div id="c_contents_l_box">
<p></p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tbody>
    <tr>
      <td colspan="2"><h3>東愷圖書有限公司</h3></td>
      </tr>
    <tr>
      <td width="15%">公司地址：</td>
      <td>新北市土城區廣福街185號(1樓)</td>
    </tr>
    <tr>
      <td>連絡電話：</td>
      <td>(02)25176069</td>
    </tr>
    <tr>
      <td>聯絡傳真：</td>
      <td>(02)25178437</td>
    </tr>
    <tr>
      <td>客服信箱：</td>
      <td>rex65100@gmail.com</td>
    </tr>
    <tr>
      <td>統一編號：</td>
      <td>24472752 </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2">
      <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3616.1305075857877!2d121.45377231500545!3d24.995680983990365!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x346802b08c212603%3A0x6aa214de68a4cbb0!2zMjM25paw5YyX5biC5Zyf5Z-O5Y2A5buj56aP6KGXMTg16Jmf!5e0!3m2!1szh-TW!2stw!4v1466959737264" width="100%" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
      </td>
      </tr>
  </tbody>
</table>
<p><br>
</p>

    </div>
    </div>
  </div>
  
  <div id="c_contents_r">
<?
if( isset($arr_banner[0]) && $arr_banner[0] )
{
?>
     <div class="contents_r_ad"><a href="<?=$arr_banner[0]['Url']?>"<?=( $arr_banner[0]['NewTarget'] ? ' target="_blank"' : '' )?>><img alt="<?=$arr_banner[0]['Slogan']?>" title="<?=$arr_banner[0]['Slogan']?>" src="images/banners/<?=$arr_banner[0]['BannerId']?>.jpg" /></a></div>
<?
}
?>
     <div class="container top_title_a">推薦要聞</div>
    <div class="container column_5" >
    <ul>
<?
if( $arr_suggest_news )
{
	foreach( $arr_suggest_news as $arr_row )
	{
?>
      <li>
      <a href="news.php?news_id=<?=$arr_row['NewsId']?>&cate_id=<?=$arr_row['NewsCateId']?>"><img src="images/news/<?=$arr_row['NewsId']?>.jpg" /></a>
      <h1><a href="news.php?news_id=<?=$arr_row['NewsId']?>&cate_id=<?=$arr_row['NewsCateId']?>"><?=mb_substr($arr_row['Subject'], 0, 25, 'UTF-8')?>...</a></h1>
      <h2><?=$arr_row['Date']?>｜<span class="category_subhead"><a href="news_list.php?cate_id=<?=$arr_row['NewsCateId']?>"><?=$arr_row['NewsCateName']?></a></span></h2>
      </li>
<?
	}
}
?>
    </ul>
    
    </div> 
<?
if( isset($arr_banner[1]) && $arr_banner[1] )
{
?>
     <div class="contents_r_ad"><a href="<?=$arr_banner[1]['Url']?>"<?=( $arr_banner[1]['NewTarget'] ? ' target="_blank"' : '' )?>><img alt="<?=$arr_banner[1]['Slogan']?>" title="<?=$arr_banner[1]['Slogan']?>" src="images/banners/<?=$arr_banner[1]['BannerId']?>.jpg" /></a></div>
<?
}
?>
  </div>
  </div>
  <div class="container-fluid" id="footer">
    <div class="container footer_nav">
      <ul>
      <li><a href="terms.php">使用條款</a></li>
      <li><a href="about.php">關於國防新聞網</a></li>
      <li><a href="policy.php">隱私政策</a></li>
      <li><a href="contact.php">聯絡我們</a></li>
      </ul>
    </div>
    <div class="container">
      <div class="copyright">Copyright © 2015 國防新聞網 All Rights Reserved.</div>
      <div class="go_top">
      <ul>
      <li><a id="footer_menu_2" title="返回頂端" href="#">go top</a></li>
      <li><a id="footer_menu_1" href="https://www.facebook.com/%E9%98%B2%E5%8B%99%E5%BF%AB%E9%96%80-243554065699495/" title="防務快門粉絲團" target="_blank" >防務快門粉絲團</a></li>
      </ul>
      </div>
    </div>
  </div>
  <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> 
	<script src="js/jquery-1.11.2.min.js"></script>

	<!-- Include all compiled plugins (below), or include individual files as needed --> 
	<script src="js/bootstrap.js"></script>
    <?php include_once("analyticstracking.php") ?>
  </body>
</html>
