Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Commit [e44c95] Maximize Restore History

merge feito

Maurilio Atila Maurilio Atila 2012-02-12

1 2 > >> (Page 1 of 2)
added .gitignore
added php/genxmlcidades.php
added php/genxmlregiao.php
removed javascripts/jquery-1.3.2.min.js
removed javascripts/jquery.coda-slider-2.0.js
removed javascripts/jquery.easing.1.3.js
removed php/tagcloud.php
removed stylesheets
removed stylesheets/coda-slider-2.0.css
removed stylesheets/reset.css
removed libColection.js
removed mapaComTabs.html
removed markers.sql
removed phpsqlajax_dbinfo.php
removed phpsqlajax_genxml3.php
removed tagcloud.css
changed TODO
changed index.html
changed javascripts/jquery-1.4.2.min.js
changed php/dbinfo.php
changed php/genxml.php
changed README
changed index.html
copied css/reset.css -> php/gentagcloud.php
.gitignore Diff Switch to side-by-side view
Loading...
php/genxmlcidades.php Diff Switch to side-by-side view
Loading...
php/genxmlregiao.php Diff Switch to side-by-side view
Loading...
php/tagcloud.php
File was removed.
stylesheets
File was removed.
stylesheets/reset.css
File was removed.
libColection.js
File was removed.
mapaComTabs.html
File was removed.
markers.sql
File was removed.
phpsqlajax_dbinfo.php
File was removed.
phpsqlajax_genxml3.php
File was removed.
tagcloud.css
File was removed.
TODO Diff Switch to side-by-side view
Loading...
index.html Diff Switch to side-by-side view
Loading...
javascripts/jquery-1.4.2.min.js Diff Switch to side-by-side view
Loading...
php/dbinfo.php Diff Switch to side-by-side view
Loading...
php/genxml.php Diff Switch to side-by-side view
Loading...
README Diff Switch to side-by-side view
Loading...
index.html Diff Switch to side-by-side view
Loading...
css/reset.css to php/gentagcloud.php
--- a/css/reset.css
+++ b/php/gentagcloud.php
@@ -1,33 +1,40 @@
-/* 
-	Using a customized version of Eric Meyer's CSS Reset to give us an even, cross-browser playing field. More info:
-	http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
-*/
+<?php
 
-html, body, div, span, applet, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-a, abbr, acronym, address, big, cite, code,
-del, dfn, em, font, img, ins, kbd, q, s, samp,
-small, strike, strong, sub, sup, tt, var,
-b, u, i, center,
-dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td {
-	background: transparent;
-	border: 0;
-	font-size: 99%;
-	font-family: Arial;
-	margin: 0;
-	outline: 0;
-	padding: 0;
-	vertical-align: baseline;
-}
-body {
-	line-height: 1.2;
-}
-ol, ul {
-	margin-left: 25px;
-}
+  //connection information
+  $host = "localhost";
+  $user = "root";
+  $password = "foobar";
+  $database = "mapeamento";
 
-:focus {
-	outline: 1px #c0c dotted;
-}+  //make connection
+  $server = mysql_connect($host, $user, $password);
+  $connection = mysql_select_db($database, $server);
+
+  //query the database
+
+  $query = mysql_query("SELECT * FROM  ? ");
+  //start json object
+  $json = "({ tags:["; 
+
+  //loop through and return results
+  for ($x = 0; $x < mysql_num_rows($query); $x++) {
+    $row = mysql_fetch_assoc($query);
+
+    //continue json object
+    $json .= "{tag:'" . $row["type"] . "',freq:'" . $row["frequency"] . "'}";
+
+    //add comma if not last row, closing brackets if is
+    if ($x < mysql_num_rows($query) -1)
+      $json .= ",";
+    else
+      $json .= "]})";
+  }
+
+  //return JSON with GET for JSONP callback
+  $response = $_GET["callback"] . $json;
+  echo $response;
+
+  //close connection
+  mysql_close($server);
+?>
+
1 2 > >> (Page 1 of 2)