-
Notifications
You must be signed in to change notification settings - Fork 2
/
template.php
68 lines (66 loc) · 1.78 KB
/
template.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
<?php
require_once('uuid.php');
if(isset($_GET['id'])) {
$template_id = $_GET['id'];
} else {
$template_id = gen_uuid();
}
if(!isset($_GET['upload_id'])) {
die('no');
}
$upload_file = $_GET['upload_id'] . '.jpg';
?>
<!doctype html>
<html>
<head>
<title>Form OCR</title>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
<script type="text/javascript" src="scripts/jcrop/js/jquery.Jcrop.min.js"></script>
<script type="text/javascript" src="scripts/jquery.ba-resize.min.js"></script>
<script type="text/javascript" src="canvas.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/jquery-ui-git.css" type="text/css" media="all" />
<link rel="stylesheet" type="text/css" media="screen" href="scripts/jcrop/css/jquery.Jcrop.css" />
<style type="text/css">
#crop-preview-ocr {
font-style: italic;
}
#crop-preview {
margin-bottom: 10px;
}
#mapName {
width: 100%;
}
.fragment-box {
position: absolute;
border: 1px dotted #1a8cce;
background-color: rgba(24,140,206,.75);
z-index: 1001;
cursor: pointer;
text-align: center;
}
#scan-img {
position: absolute;
z-index: 1000;
}
body {
padding: 0; margin: 0;
}
.fragment-box-label {
font-size: 2em;
font-weight: bold;
color: rgb(252, 155, 0);
}
</style>
</head>
<body data-template_id="<?=$template_id?>">
<img src="files/<?=$upload_file?>" id="scan-img" />
<div id="mapzone-dialog" class="ui-helper-hidden">
<div id="crop-preview"></div>
OCR Preview <br />
<span id="crop-preview-ocr"></span>
<hr />
<input type="text" placeholder="Name" id="mapName" /><br />
</div>
</body>
</html>