-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.php
72 lines (64 loc) · 2.03 KB
/
search.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!Doctype html>
<?php
require_once('goWiki.class.php');
if (isset($_GET['search_field'])){
$query = $_GET['search_field'];
$info = new goWiki();
$res = $info->getArticles($query);
}else{
$query = '';
}
?>
<html>
<head>
<link rel="stylesheet" href="css/reset.css"/>
<link rel="stylesheet" href="css/style.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" charset="utf-8" src="js/jquery-1.7.2.min.js">
</script>
<title>Re:wikize</title>
</head>
<body>
<div class="mid-holder">
<?php if($query !=='' ):?>
<div class="header">
<a href="/" class="logo"></a>
<form action="" method="GET">
<input id="id_search_field" name="search_field" />
<button type="submit"></button>
</form>
</div>
<div class="article-content">
<h1>
<?php echo $query ?>
</h1>
<?php if (!empty($res['1'])):?>
<form action="view.php" id="search_list" method="GET">
<?php foreach($res['1'] as $articles):?>
<input type="radio" name="search_field" value="<?php echo $articles?>"><?php echo $articles ?></input></br>
<?php endforeach; ?>
<hr/>
<input type="checkbox" name="with_colors" value="true" /> З кольорами (beta)
<button type="submit" value="Показати"></button>
</form>
<?php else:?>
<p>Нічого не знайдено.</p>
<?php endif;?>
</div>
<?php else:?>
<div class="search-content">
<a href="/" class="logo-large"><img src="img/logo-large.png"/></a>
<form action="" method="GET">
<input id="id_search_field" name="search_field" />
<button type="submit"></button>
</form>
</div>
<?php endif;?>
<div class="footer-container">
<div id="footer-text">
© 2012 ТЕМ-51. Плотніков, Коведа, Микитин, Гринда;
</div>
</div>
</div>
<script type="text/javascript" charset="utf-8" src="js/deco.js"></script>
</body>