-
Notifications
You must be signed in to change notification settings - Fork 2
/
corpus.php
162 lines (139 loc) · 4.98 KB
/
corpus.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?php session_start();
if (!isset($_SESSION['email'])) {
header("Location: login.php?test=fail");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Art2Artifact - View Corpus</title>
<link rel="stylesheet" href="Content/bootstrap.css"/>
<link rel="stylesheet" href="Content/bootstrap-responsive.css"/>
<link rel="stylesheet" href="Content/style.css" />
<script type="text/javascript" src="Content/jquery.js"></script>
<script type="text/javascript" src="Content/bootstrap.js"></script>
<style type="text/css" media="all">@import "Content/master.css";</style> <style type="text/css" media="all">@import "Content/master.css";</style>
<link rel="stylesheet" href="Content/bootstrap_navbar.css"/>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map-canvas { height: 700px;}
#map-canvas img {
max-width: none;
}
/* Fix Google Maps canvas
*
* Wrap your Google Maps embed in a `.google-map-canvas` to reset Bootstrap's
* global `box-sizing` changes. You may optionally need to reset the `max-width`
* on images in case you've applied that anywhere else. (That shouldn't be as
* necessary with Bootstrap 3 though as that behavior is relegated to the
* `.img-responsive` class.)
*/
.google-map-canvas,
.google-map-canvas * { .box-sizing(content-box); }
/* Optional responsive image override */
img { max-width: none; }
</style>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBUGO7amceEOOtnYLa7lVeDeTJlbg3tenE&sensor=false">
</script>
<script type="text/javascript">
var map;
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map-canvas"),
mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
<script type="text/javascript">
$(document).ready(function() {
$("button[name$='view_finder']").click(function() {
var test = $(this).val();
$("div.desc").hide();
$("#view_finder_" + test).show();
});
$("#delete_group").click(function() {
$("#delete_from_corpus_bar").toggle();
});
$(".thumbnail").click(function(){
if ($(this).hasClass("thumbnail-success")) {
$(this).removeClass("thumbnail-success");
}
else {
//$(this).removeClass("thumbnail");
$(this).addClass("thumbnail-success");
}
});
$("#map_button").click(function() {
google.maps.event.trigger(map, "resize");
});
});
</script>
<script>
function getParameterByName(name) {
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}
$(function(){
function yourfunction(event) {
var coins = [];
$('.thumbnail-success').each(function() {
coins.push(this.id);
});
//var tag_title = $('#tag_title').val();
//alert (coins.toString() + "Tag title: " + tag_title);
//$.post("tag_coin_set.php", {"tag_title": tag_title});
var $_GET = getParameterByName("idcorpus");
window.location.href = "delete_coin_set.php?coins=" + coins.toString() + "&idcorpus=" + $_GET;
}
$('#delete_coins_button').click(yourfunction);
});
</script>
</head>
<?php include('Includes/header.php'); ?>
<body style="background-image: url(Content/Login_map.jpg); background-size: 100%;">
<div class="hero-unit" style="width: 100%; height: 100%; padding: 20px; background-color: rgba(150, 27, 25, 0.75); border-color: black;">
<?php
mb_internal_encoding('UTF-8');
mb_http_output('UTF-8');
include 'phpfunctions.php';
$db = new SunapeeDB();
$db->connect();
//echo '<h1>IDcorpus='.$_GET["idcorpus"].'</h1>';
$db->display_corpus($_GET["idcorpus"]);
$db->disconnect();
?>
<?php include('Includes/footer.php'); ?>
</div>
<div class="modal hide fade" id="deleteCorpusModal" style="display: block;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">x</button>
<h3>Sure you want to delete?</h3>
</div>
<div class="modal-body">
<center>
<h5>This action cannot be undone</h5>
<a href="delete_corpus.php?idcorpus=<?php echo $_GET["idcorpus"]; ?>" class="btn btn-danger">I'm Sure, delete it!</a>
</center>
</div>
</div>
<div class="modal hide fade" id="publishCorpusModal" style="display: block;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">x</button>
<h3>Sure you want to publish this corpus to all Art2Artifact members?</h3>
</div>
<div class="modal-body">
<center>
<h5>This action cannot be undone</h5>
<a href="publish_corpus.php?idcorpus=<?php echo $_GET["idcorpus"]; ?>" class="btn btn-danger">I'm Sure, publish it!</a>
</center>
</div>
</div>
</body>
</html>