diff search/search.php @ 0:b12c99b7c3f0

commit for previous development
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 19 Jan 2015 17:13:49 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/search/search.php	Mon Jan 19 17:13:49 2015 +0100
@@ -0,0 +1,36 @@
+<?php
+
+include_once('../interface/Lib_mb_utf8.php');
+include_once('../interface/config.php');
+include_once('search_function.php');
+
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+		<link href="search.css" type="text/css" rel="stylesheet"/>
+		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
+		<script src="search.js" charset="utf-8"></script>
+	</head>
+	<body>
+		<form action='search.php' method='POST'>
+			關鍵字: <input type="text" name="keyword" size="100"> (若要搜尋多筆關鍵字請用半型逗號,隔開)<br>
+			將結果輸出至: <input type="text" name="filename" size="40">.html (請用英文非空白字元命名)<br>
+			<input type="submit" name="search" value="搜尋">
+		</form>
+		<br>
+		<div id="search_result">
+		<?php
+			if(isset($_POST['search']) && $_POST['keyword']!='' && $_POST['filename']!=''){
+				$keywordArray=trimKeyword($_POST['keyword']);
+				$array=search($keywordArray);
+				writeCsvFile($array,$_POST['filename']);
+				printTable($array,$keywordArray,$_POST['filename'],$NO_TAG);
+			}			
+		?>
+		</div>
+	</body>
+</html>
+