diff --git a/archives/elknet.py b/archives/elknet.py
new file mode 100644
index 0000000..f254845
--- /dev/null
+++ b/archives/elknet.py
@@ -0,0 +1,46 @@
+import os
+import sys
+import argparse
+import quotes
+from bottle import route, run, template, static_file
+
+
+# get current location, set as current location, and append to path
+current_dir = os.path.dirname(os.path.abspath(__file__))
+os.chdir(current_dir)
+sys.path.append(current_dir)
+
+# get absolute path of database file
+dbfile = current_dir + '/quotes.db'
+print(dbfile)
+
+
+@route('/')
+def index():
+ quote = quotes.get_random_quote(dbfile)
+ return template('templates/index.tpl', text=quote[0], author=quote[1])
+
+
+@route('/static/')
+def server_static(filename):
+ return static_file(filename, root=os.path.join(current_dir, 'static'))
+
+
+@route('/contact')
+def contact():
+ quote = quotes.get_random_quote(dbfile)
+ return template('templates/contact.tpl', text=quote[0], author=quote[1])
+
+
+def get_port():
+ description = 'A bottle server for the HILT Institute'
+ parser = argparse.ArgumentParser(description)
+ parser.add_argument('-p', '--port', type=int,
+ help="The port number the server will run on")
+ args = parser.parse_args()
+
+ return args.port if args.port else 8080
+
+
+if __name__ == '__main__':
+ run(host='0.0.0.0', port=get_port(), reloader=True, debug=True)
diff --git a/archives/old_homepage.php b/archives/old_homepage.php
new file mode 100644
index 0000000..a18c645
--- /dev/null
+++ b/archives/old_homepage.php
@@ -0,0 +1,227 @@
+
+
+
+
+Welcome to elkner.net!
+
+
+
+
+
+
+
+
+
Welcome to elkner.net!
+
+I'm *WAY* too busy with all the exciting projects I'm working on to do much
+with this page, so let me just include contact information and some links.
+Check them out!
+
+
+
+
+
+
diff --git a/archives/quotes.py b/archives/quotes.py
new file mode 100644
index 0000000..da6b89b
--- /dev/null
+++ b/archives/quotes.py
@@ -0,0 +1,77 @@
+import sqlite3
+import random
+
+
+def query(db, stmnt):
+ con = sqlite3.connect(db)
+ cur = con.cursor()
+ cur.execute(stmnt)
+ results = cur.fetchall()
+ con.close()
+ return results
+
+
+def get_authors(db):
+ return query(db, 'SELECT * FROM Author ORDER BY lname')
+
+
+def get_quotes(db):
+ stmnt = """SELECT qtext, fname, lname, source, qdate FROM Quote
+ NATURAL JOIN Author ORDER BY RANDOM()"""
+ return query(db, stmnt)
+
+
+def format_quote(raw_quote):
+ """
+ Return a tuple containing (text, source) for a quote given a raw quote
+ containing [text, author first name, author last name, source document,
+ quote date] where all fields accept text are possibly None values. Source
+ should be set to "Anonymous" if no other info is provided.
+
+ Examples:
+
+ >>> format_quote(['Quote', 'F', 'L', 'Source', 'Date'])
+ ('Quote', 'F L, Source, Date')
+ >>> format_quote(['Quote', 'F', 'L', None, None])
+ ('Quote', 'F L')
+ >>> format_quote(['Quote', 'F', 'L', 'Source', None])
+ ('Quote', 'F L, Source')
+ >>> format_quote(['Quote', 'F', 'L', None, 'Date'])
+ ('Quote', 'F L, Date')
+ >>> format_quote(['Quote', None, 'L', None, None])
+ ('Quote', 'L')
+ >>> format_quote(['Quote', None, None, 'Source', None])
+ ('Quote', 'Source')
+ >>> format_quote(['Quote', None, None, None, None])
+ ('Quote', 'Anonymous')
+ """
+ text = raw_quote[0]
+ source = []
+
+ # append author name (first and last) to source list if provided
+ if raw_quote[1] and raw_quote[2]:
+ source.append("%s %s" % (raw_quote[1], raw_quote[2]))
+ elif raw_quote[2]: # only last name provided
+ source.append(raw_quote[2])
+
+ # append source document and date to source list if provided
+ for item in raw_quote[-2:]:
+ if item:
+ source.append(item)
+
+ # join the pieces into a string seperated by comma and space
+ if source:
+ source = ", ".join(source)
+ else: # no source information provided, so make it "Anonymous"
+ source = "Anonymous"
+
+ return text, source
+
+
+def get_random_quote(db):
+ return format_quote(get_quotes(db)[0])
+
+
+if __name__ == '__main__':
+ import doctest
+ doctest.testmod()
diff --git a/learnphp/HeadFirst/abduction_form.html b/learnphp/HeadFirst/abduction_form.html
new file mode 100644
index 0000000..b5d7630
--- /dev/null
+++ b/learnphp/HeadFirst/abduction_form.html
@@ -0,0 +1,66 @@
+
+
+
+
+Abduction Form
+
+
+
+
Abduction Form
+
+
+Share your story of alien abduction:
+
+
+
+
+
+
+
+
+
diff --git a/learnphp/HeadFirst/abduction_list.php b/learnphp/HeadFirst/abduction_list.php
new file mode 100644
index 0000000..022b81d
--- /dev/null
+++ b/learnphp/HeadFirst/abduction_list.php
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+query($query) as $row)
+{
+ echo $row[1];
+}
+$dbh = null; //This is how you close a PDO connection
+?>
+
+
+
+
+
+
+
diff --git a/learnphp/HeadFirst/dbscripts/create_alien_abductions.sql b/learnphp/HeadFirst/dbscripts/create_alien_abductions.sql
new file mode 100644
index 0000000..21187bc
--- /dev/null
+++ b/learnphp/HeadFirst/dbscripts/create_alien_abductions.sql
@@ -0,0 +1,15 @@
+DROP TABLE IF EXISTS Abductions;
+
+CREATE TABLE Abductions(
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ firstname TEXT NOT NULL,
+ lastname TEXT NOT NULL,
+ email TEXT NOT NULL,
+ occured TEXT NOT NULL,
+ howlong TEXT NOT NULL,
+ howmany TEXT NOT NULL,
+ description TEXT NOT NULL,
+ whattheydid TEXT NOT NULL,
+ tabbyspotted INTEGER NOT NULL,
+ other TEXT NOT NULL
+);
diff --git a/learnphp/HeadFirst/images/tabby.jpg b/learnphp/HeadFirst/images/tabby.jpg
new file mode 100644
index 0000000..d95f14b
Binary files /dev/null and b/learnphp/HeadFirst/images/tabby.jpg differ
diff --git a/learnphp/HeadFirst/index.php b/learnphp/HeadFirst/index.php
new file mode 100644
index 0000000..bef8846
--- /dev/null
+++ b/learnphp/HeadFirst/index.php
@@ -0,0 +1,46 @@
+
+
+
+
+Head First PHP & MySQL
+
+
+
+