forked from vermashresth/AgriTech
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcropdata.php
More file actions
executable file
·234 lines (209 loc) · 8.39 KB
/
cropdata.php
File metadata and controls
executable file
·234 lines (209 loc) · 8.39 KB
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<?php
$target_dir = "/var/www/uploads/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
// Check if image file is a actual image or fake image
if(isset($_POST["submit"]))
{
//echo "herehvhhv";
if($_FILES['fileToUpload']['name'])
{
//echo "here";
//if no errors...
if(!$_FILES['fileToUpload']['error'])
{
//echo "here1";
$imageData = file_get_contents($_FILES['fileToUpload']['tmp_name']);
$valid_file=True;
//now is the time to modify the future file name and validate the file
$new_file_name = strtolower($_FILES['fileToUpload']['name']); //rename file
if($_FILES['fileToUpload']['size'] > (1024000)) //can't be larger than 1 MB
{
$valid_file = false;
$message = 'Oops! Your file\'s size is to large.';
}
//if the file has passed the test
if($valid_file)
{
//move it to where we want it to be
//echo "hihih";
move_uploaded_file($_FILES['fileToUpload']['tmp_name'], 'uploads/'.$new_file_name);
$message = 'Congratulations! Your file was accepted.';
}
//echo $message;
}
//if there is an error...
else
{
//set that to be the returned message
$message = 'Ooops! Your upload triggered the following error: '.$_FILES['photo']['error'];
}
//echo $message;
}
$var = 'python scripts/label_image.py step1.png tf_files/rounded_graph.pb';
$command = escapeshellcmd($var);
$output = shell_exec($command);
echo $output;
$uploadOk = 1;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="assets/img/favicon.png">
<title>AgriTech</title>
<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="assets/css/main.css" rel="stylesheet">
<!-- Fonts from Google Fonts -->
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,900' rel='stylesheet' type='text/css'>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="row mt centered">
<div class="col-lg-6 col-lg-offset-3">
<h1>Your Landing Page<br/>Looks Wonderful Now.</h1>
<h3>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</h3>
</div>
</div><!-- /row -->
<div class="row mt centered">
<div class="col-lg-4">
<img src="assets/img/ser01.png" width="180" alt="">
<h4>1 - Browser Compatibility</h4>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.</p>
</div><!--/col-lg-4 -->
<div class="col-lg-4">
<img src="assets/img/ser02.png" width="180" alt="">
<h4>2 - Email Campaigns</h4>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.</p>
</div><!--/col-lg-4 -->
<div class="col-lg-4">
<img src="assets/img/ser03.png" width="180" alt="">
<h4>3 - Gather Your Notes</h4>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.</p>
</div><!--/col-lg-4 -->
</div><!-- /row -->
</div><!-- /container -->
<div class="container">
<hr>
<div class="row centered">
<div class="col-lg-6 col-lg-offset-3">
<form class="form-inline" role="form">
<div class="form-group">
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter your email address">
</div>
<button type="submit" class="btn btn-warning btn-lg">Invite Me!</button>
</form>
</div>
<div class="col-lg-3"></div>
</div><!-- /row -->
<hr>
</div><!-- /container -->
<div class="container">
<div class="row mt centered">
<div class="col-lg-6 col-lg-offset-3">
<h1>Flatty is for Everyone.</h1>
<h3>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</h3>
</div>
</div><!-- /row -->
<! -- CAROUSEL -->
<div class="row mt centered">
<div class="col-lg-6 col-lg-offset-3">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="assets/img/p01.png" alt="">
</div>
<div class="item">
<img src="assets/img/p02.png" alt="">
</div>
<div class="item">
<img src="assets/img/p03.png" alt="">
</div>
</div>
</div>
</div><!-- /col-lg-8 -->
</div><!-- /row -->
</div><! --/container -->
<div class="container">
<hr>
<div class="row centered">
<div class="col-lg-6 col-lg-offset-3">
<form class="form-inline" role="form">
<div class="form-group">
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter your email address">
</div>
<button type="submit" class="btn btn-warning btn-lg">Invite Me!</button>
</form>
</div>
<div class="col-lg-3"></div>
</div><!-- /row -->
<hr>
</div><!-- /container -->
<div class="container">
<div class="row mt centered">
<div class="col-lg-6 col-lg-offset-3">
<h1>Our Awesome Team.<br/>Design Lovers.</h1>
<h3>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</h3>
</div>
</div><!-- /row -->
<div class="row mt centered">
<div class="col-lg-4">
<img class="img-circle" src="assets/img/pic1.jpg" width="140" alt="">
<h4>Michael Robson</h4>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.</p>
<p><i class="glyphicon glyphicon-send"></i> <i class="glyphicon glyphicon-phone"></i> <i class="glyphicon glyphicon-globe"></i></p>
</div><!--/col-lg-4 -->
<div class="col-lg-4">
<img class="img-circle" src="assets/img/pic2.jpg" width="140" alt="">
<h4>Pete Ford</h4>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.</p>
<p><i class="glyphicon glyphicon-send"></i> <i class="glyphicon glyphicon-phone"></i> <i class="glyphicon glyphicon-globe"></i></p>
</div><!--/col-lg-4 -->
<div class="col-lg-4">
<img class="img-circle" src="assets/img/pic3.jpg" width="140" alt="">
<h4>Angelica Finning</h4>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.</p>
<p><i class="glyphicon glyphicon-send"></i> <i class="glyphicon glyphicon-phone"></i> <i class="glyphicon glyphicon-globe"></i></p>
</div><!--/col-lg-4 -->
</div><!-- /row -->
</div><!-- /container -->
<div class="container">
<hr>
<div class="row centered">
<div class="col-lg-6 col-lg-offset-3">
<form class="form-inline" role="form">
<div class="form-group">
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter your email address">
</div>
<button type="submit" class="btn btn-warning btn-lg">Invite Me!</button>
</form>
</div>
<div class="col-lg-3"></div>
</div><!-- /row -->
<hr>
<p class="centered">Created by BlackTie.co - Attribution License 3.0 - 2013</p>
</div><!-- /container -->
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
</body>
</html>