-
Notifications
You must be signed in to change notification settings - Fork 1
/
SearchShort.php
70 lines (58 loc) · 1.54 KB
/
SearchShort.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
<?php
/**
* @author : SuperBlee
* 2014-12-11
* Handle the request of Search : Input Abbreviation Output Detailed List
*
* @param searchShortname : Shortname of the Conference Being Searched
* @param searchconf_id : The ID of the Conference
* @param searchconf_res : What The PaChong returns
*/
?>
<!DOCTYPE html>
<html>
<head>
<?php
require_once('ClassFramework.php');
$echohead = new Framework();
$echohead->headbootstrap();
$echohead->headcontent();
?>
<title>Searching</title>
</head>
<body>
<div style="margin:0 20% 0 20%">
<p><strong>搜索结果</strong></p>
<?php
require_once('ClassConference.php');
$searchShortname = $_POST['search_cfnm'];
$searchconf = new Conference();
$searchconf_id = $searchconf->findConferenceID($searchShortname);
if($searchconf_id!=null){
session_start();
$_SESSION['last_url'] = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];
$searchconf_res = $searchconf->findConferenceInfo($searchconf_id);
$searchconf->showConferenceInfo($searchconf_res);
echo
'<div>
<!-- This Shit Part Is the API to Google. Where it F google-->
<form role="form" action="add_event.php" method="post">
<div class="form-group">
<input type="text" value="您的谷歌账号" placeholder="example@gmail.com" name="googleid">
<input type="submit" value="添加到我的Google Calendar" class="btn btn-primary"/>
</div>
</form>
</div> ';
}
else{
echo
'<div>
<p>对不起,没有找到您需要的信息。</p>
</div>';
}
?>
<h2>
<a href="index.php"><strong>回到主页</strong></a></h2>
</div>
</body>
</html>