summaryrefslogtreecommitdiff
path: root/im/cgi-bin/imweb/databaser.py
diff options
context:
space:
mode:
Diffstat (limited to 'im/cgi-bin/imweb/databaser.py')
-rwxr-xr-xim/cgi-bin/imweb/databaser.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/im/cgi-bin/imweb/databaser.py b/im/cgi-bin/imweb/databaser.py
new file mode 100755
index 0000000..07b8723
--- /dev/null
+++ b/im/cgi-bin/imweb/databaser.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+from db import *
+import os
+DB = db ()
+
+PATH_TO_S3CMD = "/var/www/asdf.us/cgi-bin/im/s3/s3cmd-1.1.0-beta3/s3cmd"
+PATH_TO_IMAGES = "/var/www/asdf.us/docs/im"
+
+global idnumber
+
+function dbGet(idnumber):
+ try:
+ DB.cursor.execute('SELECT dir, newfile, id FROM im_cmd WHERE id='+id)
+ #sql = "INSERT INTO im_cmd (date,remote_addr,name,dir,newfile,cmd) VALUES(%s,%s,%s,%s,%s,%s)"
+ #args = (now(), remoteaddress, name, dir, newfile, cmd)
+ data = cursor.fetchall
+ print str(data)
+ except ():
+ return
+
+if __name__ == '__main__':
+ sys.argv[1] = idnumber
+ dbGet(idnumber) \ No newline at end of file