forked from msu-evrl/soda
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCategorization.php
More file actions
160 lines (138 loc) · 5.23 KB
/
Categorization.php
File metadata and controls
160 lines (138 loc) · 5.23 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
<html>
<head>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine or request Chrome Frame -->
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Use title if it's in the page YAML frontmatter -->
<title>Welcome to XAMPP</title>
<meta name="description" content="XAMPP is an easy to install Apache distribution containing MariaDB, PHP and Perl." />
<meta name="keywords" content="xampp, apache, php, perl, mariadb, open source distribution" />
<link href="/dashboard/stylesheets/normalize.css" rel="stylesheet" type="text/css" /><link href="/dashboard/stylesheets/all.css" rel="stylesheet" type="text/css" />
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<script src="/dashboard/javascripts/modernizr.js" type="text/javascript"></script>
<link href="/dashboard/images/favicon.png" rel="icon" type="image/png" />
<style>
table
{
border-style:solid;
border-width:2px;
border-color:pink;
}
</style>
</head>
<body class="index">
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=277385395761685";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="contain-to-grid">
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name">
<h1><a href="/dashboard/index.html">Home</a></h1>
</li>
<li class="toggle-topbar menu-icon">
<a href="#">
<span>Menu</span>
</a>
</li>
</ul>
<section class="top-bar-section">
<!-- Right Nav Section -->
<ul class="right">
<li class=""><a href="/applications.html">Applications</a></li>
<li class=""><a href="/dashboard/faq.html">FAQs</a></li>
<li class=""><a href="/dashboard/howto.html">HOW-TO Guides</a></li>
<li class=""><a target="_blank" href="/dashboard/phpinfo.php">PHPInfo</a></li>
<li class=""><a href="/phpmyadmin/">phpMyAdmin</a></li>
<li class=""><a href="/dashboard/phpscripts/Categorization.php">Manual Categorization</a></li>
</ul>
</section>
</nav>
</div>
<div id="wrapper">
<div class="hero">
<div class="row">
<div class="large-12 columns">
<h1><img src="/dashboard/images/evrl_logo.jpg" /> MSU EVRL + John Hopkins APL <span> Data Mining</span></h1>
</div>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<h3 align="center"> Uncatergorized Tweets </h3>
</div>
</div>
<?php
$con = mysqli_connect("127.0.0.1:3306", "root", "toor", "soda");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$result = mysqli_query($con, "SELECT tweets_table.tweets_key,tweets_table.content, category_table.category_1 FROM tweets_table,category_table WHERE tweets_table.tweets_key=category_table.tweets_key LIMIT 100");
echo "<table border='1'>
<tr>
<th>ID</th>
<th>Content</th>
<th>Machine Category(Jk)</th>
<th>Category</th>
<td><input type='submit' value='Submit All' action=''></td>
</tr>
";
$i=0;
while ($i<100){
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['tweets_key']. "</td>";
echo "<td>" . $row['content'] . "</td>";
echo "<td>" . $row['category_1'] . "</td>";
echo "<td><form method='POST' type='text' id='".$i."'action=''>
<select name='category' >
<option disabled selected>Select One...</option>
<option value=1>Violent Crimes</option>
<option value=2>Arrests Made</option>
<option value=3>Community Activities</option>
<option value=4>Missing Persons</option>
<option value=5>Victim of Crimes</option>
<option value=6>Humanizing</option>
<option value=7>DBP Campaigns
<option value=8>Other</option>
</select> </td>
<td> <input type='submit'></form> </td>";
echo "</tr>";
$i++;
}}
echo "</table>";
echo "<div>". mysqli_fetch_array($result)."</div>";
mysqli_close($con);
?>
<div class="row">
<div class="large-12 columns"></div>
</div>
</div>
<footer>
<div class="row">
<div class="large-12 columns">
<div class="row">
<div class="large-8 columns">
<ul class="inline-list">
</ul>
</div>
<div class="large-4 columns">
<p class="text-right">Copyright (c) 2015, Apache Friends</p>
</div>
</div>
</div>
</div>
</footer>
<!-- JS Libraries -->
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="/dashboard/javascripts/all.js" type="text/javascript"></script>
</body>
</html>