<?php require_once('../../Connections/WWF.php'); ?>
<?php
mysql_select_db($database_WWF, $WWF);
$query_Mangrove1 = "SELECT * FROM mangrove1";
$Mangrove1 = mysql_query($query_Mangrove1, $WWF) or die(mysql_error());
$row_Mangrove1 = mysql_fetch_assoc($Mangrove1);
$totalRows_Mangrove1 = mysql_num_rows($Mangrove1);

mysql_select_db($database_WWF, $WWF);
$query_Mangrove2 = "SELECT * FROM mangrove2";
$Mangrove2 = mysql_query($query_Mangrove2, $WWF) or die(mysql_error());
$row_Mangrove2 = mysql_fetch_assoc($Mangrove2);
$totalRows_Mangrove2 = mysql_num_rows($Mangrove2);

mysql_select_db($database_WWF, $WWF);
$query_Mangrove3 = "SELECT * FROM mangrove3";
$Mangrove3 = mysql_query($query_Mangrove3, $WWF) or die(mysql_error());
$row_Mangrove3 = mysql_fetch_assoc($Mangrove3);
$totalRows_Mangrove3 = mysql_num_rows($Mangrove3);

mysql_select_db($database_WWF, $WWF);
$query_Mangrove4 = "SELECT * FROM mangrove4";
$Mangrove4 = mysql_query($query_Mangrove4, $WWF) or die(mysql_error());
$row_Mangrove4 = mysql_fetch_assoc($Mangrove4);
$totalRows_Mangrove4 = mysql_num_rows($Mangrove4);
?>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-tw">
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>植物尋寶圖</title>
<base target="_self">
<style type="text/css">
<!--
.style28 {font-size: 12pt; color: #006600; }
.style29 {font-size: 12pt; color: #006600; font-weight: bold; }
.style31 {
	font-size: 12pt;
	color: #006500;
}
-->
</style>
</head>

<body style="background-attachment: fixed" bgcolor="#FFFFCC">
<div align="center">
  <p><img src="mangrove2_s.jpg" alt="植物尋寶圖" width="228" height="113"></p>
  <table width="826" border="1">
    <tr>
      <td colspan="2" bgcolor="#E1FFF0"><div align="center" class="style29">任務</div></td>
    </tr>
    <tr>
      <td width="98" bgcolor="#E1FFF0"><span class="style28">任務一</span></td>
      <td width="712" bgcolor="#E1FFF0"><span class="style28">請選擇以下植物，找出並拍攝指定的植物部份。</span></td>
    </tr>
    <tr>
      <td bgcolor="#E1FFF0"><span class="style28">任務二</span></td>
      <td bgcolor="#E1FFF0"><span class="style28">植物1及2為濕地品種，植物3及4為陸生品種，試比較不同。</span></td>
    </tr>
  </table>
  <br>
  <table width="950" border="0">
    <tr>
      <td><a href="mangrove1.php"><img src="mangrove/KandeliaObovata.jpg" alt="秋茄樹" width="230" height="95" border="0"></a></td>
      <td><a href="mangrove2.php"><img src="mangrove/AcanthsIlicifolius.jpg" alt="老鼠" width="230" height="95" border="0"></a></td>
      <td><a href="mangrove3.php"><img src="mangrove/Macaranga_Tanarius.jpg" alt="血桐" width="230" height="95" border="0"></a></td>
      <td><a href="mangrove4.php"><img src="mangrove/Cinnamomum_Camphora.jpg" width="230" height="95" border="0"></a></td>
    </tr>
  </table>
  <br>
  <?php if ($totalRows_Mangrove1 > 0) { // Show if recordset not empty ?>
    <?php if ($totalRows_Mangrove4 > 0) { // Show if recordset not empty ?>
      <?php if ($totalRows_Mangrove3 > 0) { // Show if recordset not empty ?>
        <?php if ($totalRows_Mangrove2 > 0) { // Show if recordset not empty ?>
          <p> <a href="MangroveResult.php"><img src="mangrove_result.jpg" width="230" height="95" border="0"></a>
          <table width="826" border="1">
              <tr>
                <td width="98" bgcolor="#E1FFF0"><span class="style28">任務三</span></td>
                <td width="712" bgcolor="#E1FFF0"><span class="style31">試找出保護區裡的其他紅樹，並紀錄它們的特徵。 </span></td>
              </tr>
                        </table>
          <p>
            <a href="Mangrovethird.php"><img src="mangrove-third.jpg" width="196" height="94" border="0"></a>
            <?php } // Show if recordset not empty ?>
        <?php } // Show if recordset not empty ?>
      <?php } // Show if recordset not empty ?>
    <?php } // Show if recordset not empty ?>
  </p>
</div>
<p align="center"><a href="activity.html"><img src="back to activity.jpg" width="172" height="56" border="0" /></a></p>
<p align="center"><a href="map.html"><img src="main.jpg" width="172" height="56" border="0"></a></p>
</body>

</html>
<?php
mysql_free_result($Mangrove1);

mysql_free_result($Mangrove2);

mysql_free_result($Mangrove3);

mysql_free_result($Mangrove4);
?>