<?php require_once('../../Connections/WWF_Questionaire.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $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;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO questionaire (Event, `Session`, `Date`, Post, Post_Other, SchoolType, SchoolType_Other, SchoolType2, SchoolType2_Other, `3a`, `3b`, `3c`, `3d`, q4, q5, q6) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['Event'], "text"),
                       GetSQLValueString($_POST['Session'], "text"),
                       GetSQLValueString($_POST['date'], "text"),
                       GetSQLValueString($_POST['Post'], "text"),
                       GetSQLValueString($_POST['Post_other'], "text"),
                       GetSQLValueString($_POST['SchoolType'], "text"),
                       GetSQLValueString($_POST['SchoolType_other'], "text"),
                       GetSQLValueString($_POST['School'], "text"),
                       GetSQLValueString($_POST['School_other'], "text"),
                       GetSQLValueString($_POST['3_a'], "text"),
                       GetSQLValueString($_POST['3_b'], "text"),
                       GetSQLValueString($_POST['3_c'], "text"),
                       GetSQLValueString($_POST['3_d'], "text"),
                       GetSQLValueString($_POST['question4'], "text"),
                       GetSQLValueString($_POST['question5'], "text"),
                       GetSQLValueString($_POST['question6'], "text"));

  mysql_select_db($database_WWF_Questionaire, $WWF_Questionaire);
  $Result1 = mysql_query($insertSQL, $WWF_Questionaire) or die(mysql_error());

  $insertGoTo = "questionaire_Thanks.html";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}
?><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">
<!--
.style25 {
	font-size: 12pt;
	color: #006600;
} 
.style29 {font-size: 12}
.style30 {font-size: 12px}
.style31 {font-size: 12pt}
.style32 {color: #006600}
.style33 {font-size: 12pt; color: #006600; font-weight: bold; }
.style35 {
	font-size: 14pt;
	color: #006600;
	font-family: "新細明體";
}
-->
</style>
</head>

<body style="background-attachment: fixed" bgcolor="#FFFFCC">
<div align="center">
  <p><img src="questionaire1.jpg" width="172" height="56"></p>
  <p align="center"><span class="style35"><strong>資訊科技專業發展課程</strong> <br>
  <strong><u>課程評估表 </u></strong></span></p>
  <form action="<?php echo $editFormAction; ?>" name="form1" method="POST">
    <table width="810" border="0">
      <tr>
        <td colspan="4"><span class="style25"><strong>課程名稱: 資訊科技教育教學法系列︰應用流動技術於小學環境教育<strong>(二零零九年十一月至二零一零年二月) </strong></strong></span></td>
      </tr>
      <tr>
        <td width="244" height="22"><span class="style25"><strong>課程編號:</strong>
            <label></label>
        EI0020090264</span></td>
        <td width="146"><span class="style25"><strong>
          <label></label>
        場次:</strong>
            <label>
            <select name="Event" id="Event">
              <option value="1">1</option>
              <option value="2">2</option>
              <option value="3">3</option>
              <option value="4">4</option>
              <option value="5">5</option>
              <option value="6">6</option>
              <option value="7">7</option>
              <option value="8">8</option>
              <option value="9">9</option>
              <option value="10">10</option>
            </select>
            </label>
        </span></td>
        <td width="134"><span class="style25"><strong>節次:
          <label>
          <select name="session" id="session">
            <option value="1">1</option>
            <option value="2">2</option>
          </select>
          </label>
          <label></label>
        </strong></span></td>
        <td width="268"><span class="style25"><strong>日期:
              <label>
              <input name="Date" type="text" id="Date" size="20">
              </label>
        </strong></span></td>
      </tr>
    </table>
    <p><span class="style29"><span class="style30"><span class="style31"><span class="style32"><strong>本評估表旨在收集參加者對課程成效的意見，以便作出檢討和改進。 </strong></span></span></span></span></p>
    <p class="style33">一、職級</p>
    <table width="709" border="0">
      <tr>
        <td width="179"><span class="style25">校長
          <label>
          <input name="Post" type="radio" value="HM">
          </label>
        </span></td>
        <td width="194"><span class="style25">副校長
          <input name="Post" type="radio" value="DH">
        </span></td>
        <td width="167"><span class="style25">主任
          <input name="Post" type="radio" value="Panel">
        </span></td>
        <td width="151"><span class="style25">教師
          <input name="Post" type="radio" value="Teacher">
        </span></td>
      </tr>
      <tr>
        <td colspan="4"><span class="style25">其他
          <input name="Post" type="radio" value="other">
        (請註明：
        <label>
        <input name="Post_other" type="text" id="Post_other">
        </label>
        )</span></td>
      </tr>
    </table>
    <p class="style33">二、任教學校類別</p>
    <table width="709" border="0">
      <tr>
        <td colspan="4"><span class="style25">(一)</span></td>
      </tr>
      <tr>
        <td width="172"><span class="style25">官立
          <label>
          <input name="SchoolType" type="radio" value="GPS">
          </label>
        </span></td>
        <td width="172"><span class="style25">津貼
          <label>
          <input name="SchoolType" type="radio" value="Aided">
          </label>
        </span></td>
        <td width="152"><span class="style25">直資
          <label>
          <input name="SchoolType" type="radio" value="DSS">
          </label>
        </span></td>
        <td width="195"><span class="style25">私立
          <label>
          <input name="SchoolType" type="radio" value="Private">
          </label>
        </span></td>
      </tr>
      <tr>
        <td colspan="4"><span class="style25">其他
          <label>
          <input name="SchoolType" type="radio" value="other">
          </label>
        (請註明：
        <label>
        <input name="SchoolType_other" type="text" id="SchoolType_other">
        </label>
        )</span></td>
      </tr>
    </table>
    <p>&nbsp;</p>
    <table width="709" border="0">
      <tr>
        <td colspan="3"><span class="style25">(二)</span></td>
      </tr>
      <tr>
        <td width="146"><span class="style25">中學
          <label>
          <input name="School" type="radio" value="Secondary">
          </label>
        </span></td>
        <td width="140"><span class="style25">小學
          <label>
          <input name="School" type="radio" value="Primary">
          </label>
        </span></td>
        <td width="409"><span class="style25">其他
          <label>
          <input name="School" type="radio" value="Other">
          </label>
        (請註明：
        <label>
        <input name="School_other" type="text" id="School_other">
        </label>
        )</span></td>
      </tr>
    </table>
    <p class="style25"><strong>三、對本課程的意見</strong></p>
    <table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td colspan="2" class="style25">&nbsp;</td>
        <td class="style25">&nbsp;</td>
        <td colspan="6" class="style25"><div align="center">最高 &lt;--  滿意程度--&gt;最低</div></td>
      </tr>
      <tr>
        <td colspan="2" class="style25"><p><strong>&nbsp;</strong></p></td>
        <td width="383" class="style25"><p><strong>&nbsp;</strong></p></td>
        <td width="20" class="style25"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50" class="style25"><p align="center"><strong>5</strong></p></td>
        <td width="50" class="style25"><p align="center"><strong>4</strong></p></td>
        <td width="50" class="style25"><p align="center"><strong>3</strong></p></td>
        <td width="50" class="style25"><p align="center"><strong>2</strong></p></td>
        <td width="50" class="style25"><p align="center"><strong>1</strong></p></td>
      </tr>
      <tr>
        <td width="40" class="style25"><p><strong>a.</strong></p></td>
        <td colspan="2" class="style25"><p><strong>總括來說，我對這課程感到滿意(整體評估)</strong></p></td>
        <td width="20" class="style25"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>&nbsp;</strong>
          <label>
          <input name="3_a" type="radio" value="5">
          </label>
        </p></td>
        <td width="50"><p align="center"><strong><input name="3_a" type="radio" value="4">
        </strong></p></td>
        <td width="50"><p align="center"><strong><input name="3_a" type="radio" value="3">
        &nbsp;</strong></p></td>
        <td width="50"><p align="center"><input name="3_a" type="radio" value="2">
        </p></td>
        <td width="50"><p align="center"><strong><input name="3_a" type="radio" value="1">
        &nbsp;</strong></p></td>
      </tr>
      <tr>
        <td width="40" class="style25"><p><strong>&nbsp;</strong></p></td>
        <td colspan="2" class="style25"><p><strong>&nbsp;</strong></p></td>
        <td width="20" class="style25"><p align="center"><strong>&nbsp;</strong></p></td>
        <td><p align="center"><strong>&nbsp;</strong>
                <label></label>
        </p></td>
        <td><p align="center"><strong>&nbsp;</strong></p></td>
        <td><p align="center"><strong>&nbsp;</strong></p></td>
        <td><p align="center"><strong>&nbsp;</strong></p></td>
        <td><p align="center"><strong>&nbsp;</strong></p></td>
      </tr>
      <tr>
        <td width="40" class="style25"><p><strong>b.</strong></p></td>
        <td colspan="2" class="style25"><p><strong>課程的目標可以達到 </strong></p></td>
        <td width="20" class="style25"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>&nbsp;</strong>
          <input name="3_b" type="radio" value="5">
        </p></td>
        <td width="50"><p align="center"><strong><input name="3_b" type="radio" value="4">
        </strong></p></td>
        <td width="50"><p align="center"><strong>
          <input name="3_b" type="radio" value="3">
        </strong></p></td>
        <td width="50"><p align="center"><strong><input name="3_b" type="radio" value="2">
        &nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>
          <input name="3_b" type="radio" value="1">
        &nbsp;</strong></p></td>
      </tr>
      <tr>
        <td width="40" class="style25"><p><strong>&nbsp;</strong></p></td>
        <td colspan="2" class="style25"><p><strong>&nbsp;</strong></p></td>
        <td width="20" class="style25"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>&nbsp;</strong></p></td>
      </tr>
      <tr>
        <td width="40" class="style25"><p><strong>c.</strong></p></td>
        <td colspan="2" class="style25"><p><strong>課程內容切合主題 </strong></p></td>
        <td width="20" class="style25"><p align="center"><strong>&nbsp;</strong></p></td>
        <td><p align="center"><strong>&nbsp;</strong>
                <input name="3_c" type="radio" value="5">
        </p></td>
        <td><p align="center"><strong><input name="3_c" type="radio" value="4">
          &nbsp;</strong></p></td>
        <td><p align="center"><strong>
          <input name="3_c" type="radio" value="3">
        </strong></p></td>
        <td><p align="center"><strong><input name="3_c" type="radio" value="2">
          &nbsp;</strong></p></td>
        <td><p align="center"><strong>
            <input name="3_c" type="radio" value="1">
          &nbsp;</strong></p></td>
      </tr>
      <tr>
        <td width="40" class="style25"><p><strong>&nbsp;</strong></p></td>
        <td colspan="2" class="style25"><p><strong>&nbsp;</strong></p></td>
        <td width="20" class="style25"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>&nbsp;</strong></p></td>
        <td width="50"><p align="center"><strong>&nbsp;</strong></p></td>
      </tr>
      <tr>
        <td width="40" class="style25"><p><strong>d.</strong></p></td>
        <td colspan="2" class="style25"><p><strong>總括來說，導師的整體表現有效 </strong></p></td>
        <td width="20" class="style25"><p align="center"><strong>&nbsp;</strong></p></td>
        <td><p align="center"><strong>&nbsp;</strong>
          <input name="3_d" type="radio" value="5">
        </p></td>
        <td><p align="center"><strong>
            <input name="3_d" type="radio" value="4">
          &nbsp;</strong></p></td>
        <td><p align="center"><strong>&nbsp;</strong><strong>
            <input name="3_d" type="radio" value="3">
        </strong></p></td>
        <td><p align="center"><strong>
            <input name="3_d" type="radio" value="2">
          &nbsp;</strong></p></td>
        <td><p align="center"><strong>
            <input name="3_d" type="radio" value="1">
          &nbsp;</strong></p></td>
      </tr>
    </table>
    <p class="style25"><strong>四、你認為在課程中哪個環節對學與教最有幫助？</strong></p>
    <p class="style33">
      <label>
      <textarea name="question4" cols="40" rows="8" id="question4"></textarea>
      </label>
    </p>
    <p class="style25"><strong>五、希望將來的課程能夠更深入探討的課題： </strong></p>
    <p class="style25">
      <label>
      <textarea name="question5" cols="40" rows="8" id="question5"></textarea>
      </label>
    </p>
    <p align="center" class="style25"><strong>六、其他意見/建議： </strong></p>
    <p align="center" class="style25">
      <label>
      <textarea name="question6" cols="40" rows="8" id="question6"></textarea>
      </label>
    </p>
    <p align="center" class="style25">‾ 謝謝 ‾ </p>
    <label></label>
    <br>
    <label>
    <input type="submit" name="Submit" value="送出"><?php
$f=fopen("text.txt","a");
$event=$_POST[Event];
$session=$_POST[Session];
$date=$_POST[Date];
$post=$_POST[Post];
$postOther=$POST[Post_Other];
$SchoolType=$_POST[SchoolType];
$SchoolType_Other=$_POST[SchoolType_Other];
$SchoolType2=$_POST[School];
$SchoolType2_Other=$_POST[School_Other];
$Question3a=$_POST['3_a'];
$Question3b=$_POST['3_b'];
$Question3c=$_POST['3_c'];
$Question3d=$_POST['3_d'];
$Question4=$_POST[question4];
$Question5=$_POST[question5];
$Question6=$_POST[question6];

fwrite($f,"****************************************\r\n\r\n");
fwrite($f," Event:$event\r\n");
fwrite($f," Session: $session\r\n\r\n");
fwrite($f," Date: $date\r\n\r\n");
fwrite($f," Post: $post\r\n\r\n");
fwrite($f," Post_Other: $postOther\r\n\r\n");
fwrite($f," Type of School: $SchoolType\r\n\r\n");
fwrite($f," Type of School_Other: $SchoolType_Other\r\n\r\n");
fwrite($f," Type of School2: $SchoolType2\r\n\r\n");
fwrite($f," Type of School2_Other: $SchoolType2_Other\r\n\r\n");
fwrite($f," Question 3a: $Question3a\r\n\r\n");
fwrite($f," Question 3b: $Question3b\r\n\r\n");
fwrite($f," Question 3c: $Question3c\r\n\r\n");
fwrite($f," Question 3d: $Question3d\r\n\r\n");
fwrite($f," Question 4: $Question4\r\n\r\n");
fwrite($f," Question 5: $Question5\r\n\r\n");
fwrite($f," Question 6: $Question6\r\n\r\n");

fclose($f);
?>
  </label>
    <input type="hidden" name="MM_insert" value="form1">
  </form>
  <p class="style25">&nbsp;</p>
  <p><a href="map.html"><img src="main.jpg" width="172" height="56" border="0"></a></p>
  <p>&nbsp;</p>
</div>
<p align="center">&nbsp;</p>
</body>

</html>