]> git.quilime.com - aggregate.git/commitdiff
Added edit
authorGabriel Dunne <gdunne@quilime.com>
Tue, 17 Sep 2013 03:14:18 +0000 (20:14 -0700)
committerGabriel Dunne <gdunne@quilime.com>
Tue, 17 Sep 2013 03:14:18 +0000 (20:14 -0700)
edit.php [new file with mode: 0644]

diff --git a/edit.php b/edit.php
new file mode 100644 (file)
index 0000000..7a960ee
--- /dev/null
+++ b/edit.php
@@ -0,0 +1,56 @@
+<?
+    include('/home/quilime/i/php/function.php');    
+    
+    $chandle = null;
+    
+    function get_db_connection()
+    {
+        global $chandle;
+    
+        $dbuser = "quilime";
+        $dbpass = "redsink67";
+        $dbname = "projectDatabase";  //the name of the database
+
+        $chandle = mysql_connect("mysql.quilime.com", $dbuser, $dbpass) 
+            or die("Connection Failure to Database");
+
+        mysql_select_db($dbname, $chandle) 
+            or die ($dbname . " Database not found." . $dbuser);
+    }
+    
+    function close_db_connection()
+    {
+        global $chandle;
+        mysql_close($chandle);    
+    }
+    
+    
+    get_db_connection();
+    
+    $query = sprintf("SELECT * 
+                      FROM aggregate 
+                      WHERE 1",
+                      mysql_real_escape_string($firstname),
+                      mysql_real_escape_string($lastname));                    
+    
+    $result = mysql_query($query);        
+
+    $agg = array();
+
+    while ($row = mysql_fetch_assoc($result)) {
+        $agg[] = $row;
+    }        
+
+    $agg1 = fileArray('agg/', array(), array('.','..'), "http://quilime.com/aggregate/bin/");
+    $agg1 = sortFiles($agg1, 'D', 'M');
+
+
+    foreach($agg as $file)
+    {
+      echo '<a href="'.$file['url'].'">';
+      echo '<img border="0" title="'.$file['name'].'" src="agg/'.$file['name'].'">';
+      echo '<br/>';
+      echo '</a>';
+    }
+
+?>