summaryrefslogtreecommitdiff
path: root/bPod/php/buckyk.php
diff options
context:
space:
mode:
authorJules Laplace <carbon@melanarchy.org>2013-08-02 17:14:26 -0500
committerJules Laplace <carbon@melanarchy.org>2013-08-02 17:14:26 -0500
commit79670053c7247d3a49b607960efd284e93f057e5 (patch)
tree9617f6eefa38b2686ae409bf75cc27a340444eda /bPod/php/buckyk.php
parentc53827d5d044ae5ca7ebb27acb404b7a8988918e (diff)
install.pl
Diffstat (limited to 'bPod/php/buckyk.php')
-rw-r--r--bPod/php/buckyk.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/bPod/php/buckyk.php b/bPod/php/buckyk.php
new file mode 100644
index 0000000..bda0355
--- /dev/null
+++ b/bPod/php/buckyk.php
@@ -0,0 +1,37 @@
+ <?php
+
+ // TOUCH NOT LEST YE BE TOUCHED _______________________________
+
+ mysql_connect ("localhost","tfarnon","blunderbus"); // lol security
+ mysql_select_db ("bucky");
+
+ $query = mysql_query ("SELECT * FROM `keywords` order by `keyword` asc");
+
+ $nrows = mysql_num_rows ($query);
+
+ if (!isset ($_GET['s']) || !isset ($_GET['e'])) {
+ $startIndex = 0;
+ $endIndex = $nrows;
+ } else {
+ $startIndex = $_GET['s'];
+ $endIndex = $_GET['e'];
+ }
+
+ if ($startIndex != 0) {
+ $page = ($endIndex - $startIndex); // select a set between _ and _
+ } else {
+ $page = $nrows; // select all from _
+ }
+
+ // SET UP STRING BELOW HERE ___________________________________
+
+ $rString = "&numItems=" . $page;
+
+ for ($i = 0 ; $i <= $endIndex; $i++) {
+ $row = mysql_fetch_array($query);
+ $rString .= "&keyword" .$i ."=". $row['keyword'];
+ if ($row['color']) $rString .= "&color" .$i ."=". $row['color'];
+ else $rString .= "&color" .$i ."=". "plain";
+ }
+ echo $rString;
+?> \ No newline at end of file