Index: Dev/trunk/classes/pipelineSequencer.php
===================================================================
--- Dev/trunk/classes/pipelineSequencer.php	(revision 188)
+++ 	(revision )
@@ -1,112 +1,0 @@
-<?php
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-/**
- * A visual interface object for editing and viewing a session's pipeline.
- *
- * @author Tschipper
- */
-class PipelineSequencer {
-
-    // properties
-    private $loadedSession;
-    private $selectedStep;
-    private $dbi;
-
-    public function __construct() {
-        $this->dbi = new DatabaseInterface();
-    }
-
-    public function init() {
-        $stringPipeline = "";
-        $stringPipelineType = "";
-        $stringPipelineUpdated = "";
-        $numberOfSteps = 0;
-
-        if (is_array($this->loadedSession->pipeline)) {
-            foreach ($this->loadedSession->pipeline as $object) {
-                $stringPipeline .= "$object->uid,";
-                $stringPipelineType .= get_class($object) . ",";
-                $stringPipelineUpdated .= "0,";
-                $numberOfSteps++;
-            }
-        } else {
-            $stringPipeline = $this->loadedSession->pipeline;
-            $stringPipelineType = $_POST['pipelineTypes'];
-            $stringPipelineUpdated = $_POST['pipelineUpdatedField'];
-        }
-        ?>
-        <br />
-
-        <div id="sequencer" class="largeFrame">
-            <div class="largeTitle">Name <?php echo $this->loadedSession->title; ?></div>
-            
-            <div id="seqContent" class="innerLargeFrame">
-                <div id="seqContentWrapper"></div>
-            </div>
-
-            <div class="controls">
-                <input type="button" id="moveSelectedL" value="< Move" class="smallButton"  onClick="moveStep(-1);" />
-                <input type="button" id="moveSelectedR" value="Move >" class="smallButton"  onClick="moveStep(1);" />
-                <input type="button" id="editSelected" value="Edit step" class="smallButton" onClick="editStep();" />
-                <input type="button" id="deleteSelected" value="Delete step" class="smallButton" onClick="deleteStep();" />
-                <input type="submit" id ="clearPipeline" name="clearPipeline" value="Clear pipeline" class="smallButton dis" disabled="true"/>
-                <input type="checkbox" id="confirmClear" name="confirmClear" onChange="IsCheckEnabled(this, document.getElementById('clearPipeline'));" />Really clear?
-                <input type="button" value="debug_save" onClick="savePipeline(true);" />
-            </div>
-            
-            <div id="hiddenInputs">
-                <input type="hidden" id="selectedStepField" value="" />
-                <input type="hidden" id="pipelineStringField" value="<?php echo $stringPipeline; ?>" />
-                <input type="hidden" id="pipelineTypeField" value="<?php echo $stringPipelineType; ?>" />
-                <input type="hidden" id="pipelineUpdatedField" value="<?php echo $stringPipelineUpdated; ?>" />
-                <input type="hidden" id="numSteps" value="<?php echo $numberOfSteps; ?>" />
-                <input type="hidden" id="sessionField" value="<?php echo $this->loadedSession->uid; ?>" />
-                <input type="hidden" id="sessionTitleField" value="<?php echo $this->loadedSession->title; ?>" />
-            </div>
-        </div>
-
-        
-        <?php
-    }
-
-    public function Javascript() {
-        ?>
-        <script type="text/javascript" src="js/generalScripts.js"></script>
-        <script type="text/javascript" src="js/sequencerScripts.js"></script>
-        <script type="text/javascript" src="js/jquery.js"></script>
-        <script type="text/javascript">
-            $(document).ready(function() {
-                loadSequencer();
-            });
-        </script>
-        <?php
-    }
-
-    public function LoadSession() {   // Initialize variables on page load.
-        // Redirect if no session is set
-        if (!isset($_SESSION['currentSession'])) {
-            redirect("selectSession.php");
-        }
-        // Store the current session in internal variable
-        $results = $this->dbi->get("Session", array("uid"=> $_SESSION['currentSession']));
-        if (!empty($results)) {
-            if ($results[0]->evaluate()) {
-                $this->loadedSession = $results[0];
-            }
-        }
-        else {
-            // Throw error and quit if no results found
-            die("No session with that UID found!");
-        }
-    }
-
-    public function HandlePostData() {
-                
-    }
-
-}
-?>
Index: Dev/trunk/classes/pipelineSequencer_1.php
===================================================================
--- Dev/trunk/classes/pipelineSequencer_1.php	(revision 188)
+++ 	(revision )
@@ -1,192 +1,0 @@
-<?php
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-/**
- * A visual interface object for editing and viewing a session's pipeline.
- *
- * @author Tschipper
- */
-class PipelineSequencer_1 {
-
-    // properties
-    private $loadedSession;
-    private $selectedStep;
-    private $dbi;
-
-    public function __construct() {
-        $this->dbi = new DatabaseInterface();
-    }
-
-    public function init() {
-        $stringPipeline = "";
-        $stringPipelineType = "";
-        $stringPipelineUpdated = "";
-        $numberOfSteps = 0;
-
-        if (is_array($this->loadedSession->pipeline)) {
-            foreach ($this->loadedSession->pipeline as $object) {
-                $stringPipeline .= "$object->uid,";
-                $stringPipelineType .= get_class($object) . ",";
-                $stringPipelineUpdated .= "0,";
-                $numberOfSteps++;
-            }
-        } else {
-            $stringPipeline = $this->loadedSession->pipeline;
-            $stringPipelineType = $_POST['pipelineTypes'];
-            $stringPipelineUpdated = $_POST['pipelineUpdatedField'];
-        }
-        ?>
-        <br />
-
-        <div id="sequencer" class="largeFrame">
-            <div class="largeTitle">Name <?php echo $this->loadedSession->title; ?></div>
-            
-            <div id="seqContent" class="innerLargeFrame">
-                <div id="seqContentWrapper"></div>
-            </div>
-
-            <div class="controls">
-                <input type="button" id="moveSelectedL" value="< Move" class="smallButton"  onClick="moveStep(-1);" />
-                <input type="button" id="moveSelectedR" value="Move >" class="smallButton"  onClick="moveStep(1);" />
-                <input type="button" id="editSelected" value="Edit step" class="smallButton" onClick="editStep();" />
-                <input type="button" id="deleteSelected" value="Delete step" class="smallButton" onClick="deleteStep();" />
-                <input type="submit" id ="clearPipeline" name="clearPipeline" value="Clear pipeline" class="smallButton dis" disabled="true"/>
-                <input type="checkbox" id="confirmClear" name="confirmClear" onChange="IsCheckEnabled(this, document.getElementById('clearPipeline'));" />Really clear?
-                <input type="button" value="debug_save" onClick="savePipeline(true);" />
-            </div>
-            
-            <div id="hiddenInputs">
-                <input type="hidden" name="selectedStep" id="selectedStepField" value="" />
-                <input type="hidden" name="pipelineString" id="pipelineStringField" value="<?php echo $stringPipeline; ?>" />
-                <input type="hidden" name="pipelineTypes" id="pipelineTypeField" value="<?php echo $stringPipelineType; ?>" />
-                <input type="hidden" name="pipelineUpDated" id="pipelineUpdatedField" value="<?php echo $stringPipelineUpdated; ?>" />
-                <input type="hidden" name="numSteps" id="numSteps" value="<?php echo $numberOfSteps; ?>" />
-                <input type="hidden" name="session" id="sessionField" value="<?php echo $this->loadedSession->uid; ?>" />
-            </div>
-        </div>
-
-        <!--
-        <form name="sequencerForm" action="pipelineEditor.php" method="post">
-            <fieldset id="sequencer">
-                <div class="fieldsetTitle">Name: <?php echo $this->loadedSession->title; ?> </div>
-
-                <div id="seqContent">
-                    <div id="seqContentWrapper"></div>
-                </div>
-
-                <div id="controls">
-                    <input type="button" id="moveSelectedL" value="< Move" class="surveyButton"  onClick="moveStep(-1);" />
-                    <input type="button" id="moveSelectedR" value="Move >" class="surveyButton"  onClick="moveStep(1);" />
-                    <input type="button" id="editSelected" value="Edit step" class="surveyButton" onClick="editStep();" />
-                    <input type="button" id="deleteSelected" value="Delete step" class="surveyButton" onClick="deleteStep();" />
-                    <input type="submit" id ="clearPipeline" name="clearPipeline" value="Clear pipeline" class="surveyButton dis" disabled="true"/>
-                    <input type="checkbox" id="confirmClear" name="confirmClear" onChange="IsCheckEnabled(this, document.getElementById('clearPipeline'));" />Really clear?
-                    <input type="button" value="debug_save" onClick="savePipeline(true);" />
-                </div>
-                <div id="hiddenInputs">
-                    <input type="hidden" name="selectedStep" id="selectedStepField" value="" />
-                    <input type="hidden" name="pipelineString" id="pipelineStringField" value="<?php echo $stringPipeline; ?>" />
-                    <input type="hidden" name="pipelineTypes" id="pipelineTypeField" value="<?php echo $stringPipelineType; ?>" />
-                    <input type="hidden" name="pipelineUpDated" id="pipelineUpdatedField" value="<?php echo $stringPipelineUpdated; ?>" />
-                    <input type="hidden" name="numSteps" id="numSteps" value="<?php echo $numberOfSteps; ?>" />
-                    <input type="hidden" name="session" id="sessionField" value="<?php echo $this->loadedSession->uid; ?>" />
-                </div>
-            </fieldset>
-        </form>
-        -->
-        <?php
-    }
-
-    public function Javascript() {
-        ?>
-        <script type="text/javascript" src="js/sequencerScripts.js"></script>
-        <script type="text/javascript" src="js/jquery.js"></script>
-        <script type="text/javascript">
-            $(document).ready(function() {
-                updateSequencer(true);      // true means it is the first refresh of the page.
-            });
-        </script>
-        <?php
-    }
-
-    public function LoadSession($currentSession) {   // Initialize variables on page load.
-        if (!isset($currentSession)) {
-            redirect("selectSession.php");
-        }
-        if (isset($_SESSION['updateNeeded'])) {    // user has performed an operation that flags session to be reloaded from DB, or is first load of page for that session
-            $sessionResults = $this->dbi->get("Session", array("uid" => $currentSession));
-
-            if (count($sessionResults) > 0) {
-                $_SESSION['localSessionCopy'] = $sessionResults[0];
-                unset($_SESSION['updateNeeded']);
-            } else {
-                die("No session with that UID found!");
-            }
-        }
-
-        if (isset($_SESSION['localSessionCopy']) && !empty($_SESSION['localSessionCopy'])) {
-
-            $this->loadedSession = $_SESSION['localSessionCopy'];
-            unset($_SESSION['updateNeeded']);
-        }
-    }
-
-    public function HandlePostData() {
-        if (isset($_POST['editSelected'])) {
-            if (isset($_POST['selectedStep']) && !empty($_POST['selectedStep'])) {
-                redirect("editredirect.php");
-            }
-        }
-
-        if (isset($_POST['moveSelectedLeft'])) {
-            if (isset($_POST['selectedStep']) && !empty($_POST['selectedStep'])) {
-                $this->MoveStep($_POST['selectedStep'], -1);
-            }
-        }
-
-        if (isset($_POST['moveSelectedRight'])) {
-            if (isset($_POST['selectedStep']) && !empty($_POST['selectedStep'])) {
-                $this->MoveStep($_POST['selectedStep'], 1);
-            }
-        }
-
-        if (isset($_POST['objectToCreate']) && !empty($_POST['objectToCreate'])) {
-            switch (strtolower($_POST['objectToCreate'])) {
-                case "survey":
-                    redirect("createsurvey.php");
-                    break;
-                case "application":
-                    redirect("createapplication.php");
-                    break;
-                case "dashboard":
-                    redirect("createdashboard.php");
-                    break;
-                default:
-                    // Er is iets fout gegaan, want er is geen valid type meegegeven!
-                    break;
-            }
-        }
-    }
-
-    // Dit is een pure php versie. Deze slaat nog niet op in de Database, en reageert nog niet op 
-    public function MoveStep($uid, $direction) {
-        $newSession = $this->loadedSession;
-
-        for ($i = 0; $i < count($newSession->pipeline); $i++) {
-            if ($newSession->pipeline[$i]->uid == $uid) {
-                $temp = $newSession->pipeline[$i];
-                $newSession->pipeline[$i] = $newSession->pipeline[$i + $direction];
-                $newSession->pipeline[$i + $direction] = $temp;
-                break;
-            }
-        }
-
-        $this->loadedSession = $newSession;
-        redirect("pipelineEditor.php");
-    }
-
-}
-?>
Index: Dev/trunk/classes/sessionEditorWidget.php
===================================================================
--- Dev/trunk/classes/sessionEditorWidget.php	(revision 191)
+++ Dev/trunk/classes/sessionEditorWidget.php	(revision 191)
@@ -0,0 +1,112 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * A visual interface object for editing and viewing a session's pipeline.
+ *
+ * @author Tschipper
+ */
+class SessionEditorWidget {
+
+    // properties
+    private $loadedSession;
+    private $selectedStep;
+    private $dbi;
+
+    public function __construct() {
+        $this->dbi = new DatabaseInterface();
+    }
+
+    public function init() {
+        $stringPipeline = "";
+        $stringPipelineType = "";
+        $stringPipelineUpdated = "";
+        $numberOfSteps = 0;
+
+        if (is_array($this->loadedSession->pipeline)) {
+            foreach ($this->loadedSession->pipeline as $object) {
+                $stringPipeline .= "$object->uid,";
+                $stringPipelineType .= get_class($object) . ",";
+                $stringPipelineUpdated .= "0,";
+                $numberOfSteps++;
+            }
+        } else {
+            $stringPipeline = $this->loadedSession->pipeline;
+            $stringPipelineType = $_POST['pipelineTypes'];
+            $stringPipelineUpdated = $_POST['pipelineUpdatedField'];
+        }
+        ?>
+        <br />
+
+        <div id="sequencer" class="largeFrame">
+            <div class="largeTitle">Name <?php echo $this->loadedSession->title; ?></div>
+            
+            <div id="seqContent" class="innerLargeFrame">
+                <div id="seqContentWrapper"></div>
+            </div>
+
+            <div class="controls">
+                <input type="button" id="moveSelectedL" value="< Move" class="smallButton"  onClick="moveStep(-1);" />
+                <input type="button" id="moveSelectedR" value="Move >" class="smallButton"  onClick="moveStep(1);" />
+                <input type="button" id="editSelected" value="Edit step" class="smallButton" onClick="editStep();" />
+                <input type="button" id="deleteSelected" value="Delete step" class="smallButton" onClick="deleteStep();" />
+                <input type="submit" id ="clearPipeline" name="clearPipeline" value="Clear pipeline" class="smallButton dis" disabled="true"/>
+                <input type="checkbox" id="confirmClear" name="confirmClear" onChange="IsCheckEnabled(this, document.getElementById('clearPipeline'));" />Really clear?
+                <input type="button" value="debug_save" onClick="savePipeline(true);" />
+            </div>
+            
+            <div id="hiddenInputs">
+                <input type="hidden" id="selectedStepField" value="" />
+                <input type="hidden" id="pipelineStringField" value="<?php echo $stringPipeline; ?>" />
+                <input type="hidden" id="pipelineTypeField" value="<?php echo $stringPipelineType; ?>" />
+                <input type="hidden" id="pipelineUpdatedField" value="<?php echo $stringPipelineUpdated; ?>" />
+                <input type="hidden" id="numSteps" value="<?php echo $numberOfSteps; ?>" />
+                <input type="hidden" id="sessionField" value="<?php echo $this->loadedSession->uid; ?>" />
+                <input type="hidden" id="sessionTitleField" value="<?php echo $this->loadedSession->title; ?>" />
+            </div>
+        </div>
+
+        
+        <?php
+    }
+
+    public function Javascript() {
+        ?>
+        <script type="text/javascript" src="js/generalScripts.js"></script>
+        <script type="text/javascript" src="js/sequencerScripts.js"></script>
+        <script type="text/javascript" src="js/jquery.js"></script>
+        <script type="text/javascript">
+            $(document).ready(function() {
+                loadSequencer();
+            });
+        </script>
+        <?php
+    }
+
+    public function LoadSession() {   // Initialize variables on page load.
+        // Redirect if no session is set
+        if (!isset($_SESSION['currentSession'])) {
+            redirect("selectSession.php");
+        }
+        // Store the current session in internal variable
+        $results = $this->dbi->get("Session", array("uid"=> $_SESSION['currentSession']));
+        if (!empty($results)) {
+            if ($results[0]->evaluate()) {
+                $this->loadedSession = $results[0];
+            }
+        }
+        else {
+            // Throw error and quit if no results found
+            die("No session with that UID found!");
+        }
+    }
+
+    public function HandlePostData() {
+                
+    }
+
+}
+?>
Index: Dev/trunk/classes/surveyEditorWidget.php
===================================================================
--- Dev/trunk/classes/surveyEditorWidget.php	(revision 188)
+++ Dev/trunk/classes/surveyEditorWidget.php	(revision 191)
@@ -27,5 +27,5 @@
             $surveyResults = $dbi->get("Survey", array("uid" => $_POST['objectUid']));
             if (!empty($surveyResults)) {
-                (is_array($surveyResults)) ? $this->loadedSurvey = $surveyResults[0] : $this->loadedSurvey = $surveyResults;
+                $this->loadedSurvey = $surveyResults[0];
             } else {
                 die("No surveys found!");
@@ -39,5 +39,5 @@
         $questionString = "";
         foreach ($this->loadedSurvey->questions as $question) {
-            $questionString .= $question->uid . ",";
+            $questionString .= $question->code . ",";
         }
         // echo the HTML markup to display the editor on the screen
@@ -72,5 +72,5 @@
 
                 <input type="button" value="Discard survey" onClick="javascript:alert('discard not yet supported');" class="smallButton" />
-                <input type="button" value="Save survey" onClick="javascript:alert('save not yet supported');" class="smallButton" />
+                <input type="button" value="Save survey" onClick="saveSurvey(true);" class="smallButton" />
             </div>
 
Index: Dev/trunk/createObject.php
===================================================================
--- Dev/trunk/createObject.php	(revision 188)
+++ Dev/trunk/createObject.php	(revision 191)
@@ -14,10 +14,11 @@
 
 $dbi = new DatabaseInterface();
-$creator_results = $dbi->get("User", array("name" => $_SESSION['username']));
+$creator_results = $dbi->get("User", array("uid" => $_SESSION['userUid']));
+$creator = $creator_results[0];
 
-if (count($creator_results) > 0) {
-    $creator = $creator_results[0];
-} else {
-    //die ("Invalid creator, make sure you are logged in!");
+//var_dump($creator);
+
+if (!$creator) {
+    die("Stuff is broke, yo!");
 }
 
Index: Dev/trunk/css/visualeditors.css
===================================================================
--- Dev/trunk/css/visualeditors.css	(revision 188)
+++ Dev/trunk/css/visualeditors.css	(revision 191)
@@ -117,4 +117,5 @@
     box-shadow: 2px 2px 1px #888;
     border: 1px solid #FFF;
+    margin: 0;
 }
 
@@ -357,8 +358,10 @@
 
 #seqContentWrapper .divider.vertical {
-    height: 1px;
-    width: 200px;
-    background-color: #FF00FF; /* VIES MAGENTA! */
-    margin: 1em auto;
+    float: left;
+    clear: both;
+    height: 2px;
+    width: 400px;
+    background-color: #555; /* VIES MAGENTA! */
+    margin: 0.75em 100px;
 }
 
@@ -415,2 +418,6 @@
 }
 
+.smallFrame .smallButton {
+    width:55px;
+}
+
Index: Dev/trunk/getInfo.php
===================================================================
--- Dev/trunk/getInfo.php	(revision 188)
+++ Dev/trunk/getInfo.php	(revision 191)
@@ -37,4 +37,5 @@
     case "Session":
         $returnString .= "<span class='property'>Title: </span><span class='value'>$result->title</span>";
+        $result->evaluate();
         $returnString .= "<span class='property'>Created: </span><span class='value'>" . $result->datetime->format("H:i:s, d-m-Y") . " by " . $result->creator->name . "</span>";
         $cS = 0; $cD = 0; $cA = 0;
Index: Dev/trunk/index.php
===================================================================
--- Dev/trunk/index.php	(revision 188)
+++ Dev/trunk/index.php	(revision 191)
@@ -8,5 +8,5 @@
 
 //Even voor tijdelijk, aangezien er nog pagina's missen en redirects daarom niet goed werken:
-if (isset($_SESSION['username'])) {
+if (isset($_SESSION['userUid'])) {
     redirect("logout.php");
 }
@@ -15,45 +15,38 @@
 
 if (isset($_POST['register'])) {
-    if ($_POST['username'] != null && $_POST['password'] != null) {
+    if (isset($_POST['username']) && isset($_POST['password'])) {
         $dbi = new DatabaseInterface();
         $user_results = $dbi->get("user", array("name" => $_POST['username']));
-        $user_exists = (count($user_results) > 0);
-        if (!$user_exists) {
+        if (count($user_results) == 0 || !$user_results) {
             if (strlen($_POST['password']) > 6) {
                 $user = new User(null, $_POST['username'], $_POST['password']);
                 $dbi->set($user);
-                $_SESSION['username'] = $_POST['username'];
+                $_SESSION['userUid'] = $user->uid;
             } else {
-                $errorMessage[] = "Password is too short!";
-                //echo "Password is too short!";
+                $errorMessage[] = "Password is too short";
             }
         }
         else
             $errorMessage[] = "Username already exists, try something else!";
-        //echo "Username already exists, try something else";
     }
     else
         $errorMessage[] = "Please fill in a username and password";
-    //echo "please fill in a username and password";
 }
 
-if (isset($_POST['login'])) {
+if (isset($_POST['login'])) {   // User clicked the login button
     $dbi = new DatabaseInterface();
     $user_results = $dbi->get("user", array("name" => $_POST['username']));
     if (isset($user_results[0])) {
         if ($user_results[0]->password == $_POST['password']) {
-            $_SESSION['username'] = $user_results[0]->name;
-            // USER HAS LOGGED IN
+            $_SESSION['userUid'] = $user_results[0]->uid;
         } else {
             $errorMessage[] = "Incorrect password!";
-            //echo "Incorrect password!";
         }
     } else {
         $errorMessage[] = "Username doesn't exist!";
-        //echo "Username doesn't exist!";
     }
 }
 
-if (isset($_SESSION['username'])) {
+if (isset($_SESSION['userUid'])) {  // User just registered a new account
     redirect('selectSession.php');
 }
Index: Dev/trunk/js/ajax.js
===================================================================
--- Dev/trunk/js/ajax.js	(revision 188)
+++ 	(revision )
@@ -1,39 +1,0 @@
-function loadContent (query, url, target, callback) {
-    newAjaxRequest(query, url, target, handleResponse());
-    return false;
-}
-
-// Waar is bovenstaande tussenstap voor nodig..? Hij doet niets anders dan redirecten naar loadExternalContent en false returnen.
-
-function newAjaxRequest(query, url, target, callback) {
-    var xmlhttp;
-    document.getElementById(target).innerHTML = 'Fetching data...';
-    if (window.XMLHttpRequest) {
-        xmlhttp = new XMLHttpRequest();
-    }
-    else if (window.ActiveXObject) {
-        xmlttp = new ActiveXObject("Microsoft.XMLHTTP");
-    }
-    else {
-        document.getElementById(target).innerHTML = "AJAX not supported!";
-    }
-    
-    if (xmlhttp !== undefined) {
-        xmlhttp.onreadystatechange = handleResponse(xmlhttp, url, target, callback);
-        xmlhttp.open("POST", url, true);
-        xmlhttp.send(query);
-    }
-}
-
-//Handle response is een soort standaard response functie, is het nodig om deze te kunnen overriden met een custom callback functie?
-function handleResponse(xmlhttp, url, target, callback) {
-    if (xmlhttp.readyState == 4) {
-        if (xmlhttp.Status == 200) {
-            callback(xmlhttp, target);
-            //document.getElementById(target).innerHTML = xmlhttp.responseText;
-        }
-        else {
-            //document.getElementById(target).innerHTML = "loadExternalContent error: \n" + xmlhttp.status + "\n" + xmlhttp.statusText;
-        }
-    }
-}
Index: Dev/trunk/js/creation.js
===================================================================
--- Dev/trunk/js/creation.js	(revision 188)
+++ 	(revision )
@@ -1,53 +1,0 @@
-function handleFocus(input)
-{
-    /* this is such ugly code it makes me sad */
-    /* because it is hard coded. */
-    if (input.clicked == null && 
-        (input.value == "Untitled Survey"
-            || input.value == "Write a helpful description for this survey here."
-            || input.value == "Write a question description here."
-            || input.value == "Untitled Question"
-            || input.value == "Untitled Session"
-            || input.value == "Write a description for this session here."
-            || input.value == "Untitled Application"
-            || input.value == "Write a description for this application here."))
-            {
-        input.value = "";
-        input.style.color = "black";   
-        input.clicked = true; 
-    }
-}
-                                                                                                                                                                                                                                                                                                                                                                                    
-function handleBlur(input)
-{                                                                                                                                                                                                                                                                                                                                                                           
-    if (input.value == "")
-    {
-        input.style.color = "#555";
-        input.clicked = null;
-        if (input.id == "surveyTitle")
-        {
-            input.value = "Untitled Survey";
-        }
-        else if (input.id == "surveyDescription")
-        {
-            input.value = "Write a helpful description for this survey here.";
-        }
-        else if (input.id == "sessionTitle")
-        {
-            input.value = "Untitled Session";
-        }
-        else if (input.id == "sessionDescription")
-        {
-            input.value = "Write a description for this session here.";
-        }
-        else if (input.id == "applicationTitle")
-        {
-            input.value = "Untitled Application";
-        }
-        else if (input.id == "applicationDescription")
-        {
-            input.value = "Write a description for this application here.";
-        }
-            
-    }                           
-}
Index: Dev/trunk/js/generalScripts.js
===================================================================
--- Dev/trunk/js/generalScripts.js	(revision 188)
+++ Dev/trunk/js/generalScripts.js	(revision 191)
@@ -76,4 +76,16 @@
 }
 
+// Function that handles updating of info panel via AJAX getInfo.php. Currently operates on HTML to paste into #infoPanelContent, should eventually involve JSON arrays, to have more control over formatting.
+function ajaxInfoRequest(uid, el, type) {
+    // Info panel update.
+    
+    var c = "uid="+uid;
+    c += "&type="+type;
+    var u = "getInfo.php";
+    newAjaxRequest(c, u, function(result) {
+        el.innerHTML = result.responseText;
+    }, true);
+}
+
 // Function to save the object currently being edited.
 // !! Still needs to be generalized !!
Index: Dev/trunk/js/menu.js
===================================================================
--- Dev/trunk/js/menu.js	(revision 188)
+++ 	(revision )
@@ -1,36 +1,0 @@
-function loadSurvey()
-{
-    var form = document.getElementById('loadForm');
-    var select = document.getElementById('surveysToLoad');
-    var surveyUID = select.valueOf().value; 
-    
-    if (surveyUID != '')
-    {
-        var surveyInput = document.createElement('input');
-        surveyInput.name = "UID";
-        surveyInput.value = surveyUID;
-        surveyInput.type = "hidden";
-
-        form.appendChild(surveyInput);
-
-        form.submit();
-    }
-}
-
-function loadApplication()
-{
-    var form = document.getElementById('loadApplicationForm');
-    var select = document.getElementById('applicationsToLoad');
-    var applicationUID = select.valueOf().value;
-    
-    if (applicationUID != '')
-    {
-        var applicationInput = document.createElement('input');
-        applicationInput.name = 'applicationUID';
-        applicationInput.value = applicationUID;
-        applicationInput.type = "hidden";
-       
-        form.appendChild(applicationInput);
-        form.submit();
-    }
-}
Index: Dev/trunk/js/sequencerScripts.js
===================================================================
--- Dev/trunk/js/sequencerScripts.js	(revision 188)
+++ Dev/trunk/js/sequencerScripts.js	(revision 191)
@@ -73,5 +73,5 @@
         // settings fields first
         initSequencer();
-        
+        debugger;
         switch (sequencer.settings.content.contentType.toLowerCase()) {
             case "session":
@@ -230,4 +230,5 @@
         requestString = "args="+JSON.stringify(args);
         newAjaxRequest(requestString, "returnObjectDisplay.php", function(result){
+            console.log(result.responseText);
             insertNewObjects(result.responseText, needsUpdating);
         }, true);
@@ -290,5 +291,4 @@
 
         // This means that one or more steps are being added, not an entire pipeline's worth of them
-        debugger;
         needsUpdating = new Array();
         args = [];
@@ -305,4 +305,5 @@
         requestString = "args="+JSON.stringify(args);
         newAjaxRequest(requestString, "returnObjectDisplay.php", function(result){
+            //console.log(result.responseText);
             insertNewObjects(result.responseText, needsUpdating);
         }, true);
@@ -388,4 +389,5 @@
 
 function insertNewObjects(responseText, needsUpdating) {
+    //console.log(responseText);
     // Container function that calls different insertNewX() functions depending on content type. Called from updateSequencer().
     var response = JSON.parse(responseText);
@@ -520,4 +522,9 @@
     // Loop through returned question objects
     for (var i = 0; i < response.length; i++) {
+        
+        /*
+         * The following block of code defines the layout and composition of the question display
+         */
+        
         // Define the outer frame
         var frameDiv = ce("div");
@@ -570,6 +577,10 @@
         frameDiv.appendChild(controlsDiv);
         
+        /* 
+         * This is where the layout code ends
+         * We proceed to insertion of the created DIV into the document
+         */ 
+        
         // We now have a full question display DIV contained in the frameDiv variable. We should now add this to the sequencer content.
-        debugger;
         for (var j = needsUpdating.length - 1; j >= 0; j--) {
             if (needsUpdating[j][1] != response[i].uid) continue;
@@ -587,4 +598,33 @@
     
     sequencer.state.updating = false;   //re-enable user commands
+}
+
+function saveSurvey(confirmSave) {
+    // Sends an AJAX request to the PHP server that saves the current object.
+    var answer = (confirmSave == true) ? confirm("Save changes?") : true;
+    if (answer == false) return;
+    
+    // Check for object type being edited, adjust requestString and target URL to this information.
+    var request = new Object(), url, requestString;
+    switch (sequencer.settings.content.contentType.toLowerCase()) {
+        case "survey":
+            url = "saveSurvey.php";
+            request.title = sequencer.survey.title;
+            request.uid = sequencer.survey.uid;
+            request.description = sequencer.survey.description;
+            request.questions = new Object();
+            request.questions.uids = sequencer.survey.questions.uids;
+            requestString = "args="+JSON.stringify(request);
+            console.log(request);
+            newAjaxRequest(requestString, url, function(result){
+                console.log(result.responseText);
+            }, true);
+            break;
+        case "blaaaat":
+            url = "savesession.php";
+            request.pipeline.uids = sequencer.session.pipeline.uids;
+            request.pipeline.types = sequencer.session.pipeline.types;
+            break;
+    }
 }
 
@@ -648,14 +688,5 @@
 }
 
-function ajaxInfoRequest(uid, el, type) {
-    // Info panel update.
-    
-    var c = "uid="+uid;
-    c += "&type="+type;
-    var u = "getInfo.php";
-    newAjaxRequest(c, u, function(result) {
-        el.innerHTML = result.responseText;
-    }, true);
-}
+
 
 function savePipeline (confirmSave) {
@@ -784,4 +815,5 @@
 
 // Temp function that creates a dummy question to test the insertNewQuestions function.
+// NOTE: CAN BE REMOVED!
 function debug_addQuestion() {
     // Derp, natuurlijk werkt de addQuestion call niet twee keer. Hij creeert twee keer exact hetzelfde object. Bottom line: het werkt. Nu de editing code voor deze questions gaan schrijven!
@@ -803,4 +835,5 @@
 
 // Temp function that articially switches content type when the page is already loaded, to easily test layout changes and content flow.
+// NOTE: CAN BE REMOVED!
 function debug_switchType() {
     var content = ge("seqContent");
Index: Dev/trunk/js/surveyEditorScripts.js
===================================================================
--- Dev/trunk/js/surveyEditorScripts.js	(revision 188)
+++ 	(revision )
@@ -1,80 +1,0 @@
-/* 
- * Scripts needed for operation of the survey editor
- */
-
-var surveyEditor = {
-    uid: "",                        // the uid of the currently opened survey
-    title: "No title",         // the name of the currently opened survey
-    description: "No description",  // the description of the currently opened survey
-    numQuestions: 0,                // the number of questions contained in this survey
-    questions: [],             // the array containing question objectliterals/uids
-    state: {                        // used for checks in onClick events
-        editing: false,             // whether or not a question is currently being edited
-        editUid: ""                 // the uid of the question being edited, if any
-    }
-}
-
-
-
-function loadSurvey() {
-    
-    /*
-     * Take the values from the hiddenfields on the page, load them into the object literal defined at the top of this script,
-     * Then delete these fields from the HTML page, since they are not needed anymore.
-     * This is possibly more secure than leaving them on the page, and results in cleaner HTML markup
-     */
-
-    debugger;
-    var fTitle = document.getElementById("surveyTitle");
-    if (fTitle != undefined && fTitle.value != "") {
-        surveyEditor.title = fTitle.value;
-    }
-    else {
-        surveyEditor.title = "Undefined title";
-    }
-    
-    var fNumQuestions = document.getElementById("numQuestions");
-    if (fNumQuestions != undefined && fNumQuestions.value != "") {
-        surveyEditor.numQuestions = fNumQuestions;
-    }
-    else {
-        surveyEditor.numQuestions = 0;
-        return;
-    }
-    
-    var fQuestions = document.getElementById("questionUids");
-    if (fQuestions != undefined && surveyEditor.numQuestions > 0) {
-        surveyEditor.questions = stringToArray(fQuestions.value, ",");
-        if (surveyEditor.questions.length != surveyEditor.numQuestions) {
-            alert("numQuestions and the questions array passed do not match!");
-            return;
-        }
-    }
-    else {
-        alert("Questions field not found!");
-        return;
-    }
-}
-
-function drawQuestions(firstTime) {
-    var length = surveyEditor.questions.length;
-    if (length <= 0) return;
-    
-    var container = document.getElementById("surveyEditorContent");
-    
-    
-    if (firstTime == true) {
-        // Loop through questions, add a new smallFrame div for each question with id=question->uid
-        // do this via AJAX calls, returnQuestion.php
-        // dependencies: stringToArray/arrayToString
-        var requestString = "uids=";
-        requestString += arrayToString(surveyEditor.questions, ",");
-        newAjaxRequest(requestString, "returnQuestionDisplay.php", function(result) {
-            //var holderDiv = document.createElement("div");
-            //holderDiv.innerHTML = result.responseText;
-            container.innerHTML = result.responseText;
-        });
-    }
-    
-    
-}
Index: Dev/trunk/pipelineEditor.php
===================================================================
--- Dev/trunk/pipelineEditor.php	(revision 188)
+++ 	(revision )
@@ -1,46 +1,0 @@
-<?php
-require 'classes/master.php'; //should be at top of every page
-
-if (!isset($_SESSION['username'])) {
-    redirect('index.php');
-}
-
-$sequencer = new PipelineSequencer();
-$sequencer->LoadSession(); //load session into php part of the sequencer
-$sequencer->HandlePostData();
-?>
-
-<!--
-To change this template, choose Tools | Templates
-and open the template in the editor.
--->
-<!DOCTYPE html>
-
-<html>
-    <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-        <title></title>
-        <?php
-        new StyleSheet("visualeditors");
-        $sequencer->Javascript();
-        ?>
-
-    </head>
-    <body>
-        <div id="header">
-            <?php new Logo(); ?>
-        </div>
-
-        <div id="wrapper">
-            <div id="content">
-                <?php $sequencer->init(); ?>
-                <?php $toolbox = new Toolbox(); ?>
-                <?php new PipelineInfoPanel(); ?>
-            </div>
-        </div>
-        <div id="settingsFields">
-            <input type="hidden" id="sContentTypeField" value="session" />
-        </div>
-
-    </body>
-</html>
Index: Dev/trunk/returnObjectDisplay.php
===================================================================
--- Dev/trunk/returnObjectDisplay.php	(revision 188)
+++ Dev/trunk/returnObjectDisplay.php	(revision 191)
@@ -21,7 +21,12 @@
 foreach ($requestArray as $request) {
     
+    //!!! DEZE SHIT MOET WEER TERUGGEDRAAID WORDEN ZODRA QUESTIONS WEER GEWOON UIDS HEBBEN IPV CODES!
+    if ($request->type == "Question"){
     $results = $dbi->get($request->type, array("code" => $request->uid));
     // Bottom line, werkt prima. Questions werken nu op ns1:question_code, accessible als question->code
-    
+    }
+    else {
+        $results =  $dbi->get($request->type, array("uid"=>$request->uid));
+    }
     if (isset($results) && !empty($results)) {
         is_array($results) ? $object = $results[0] : $object = $results;
Index: Dev/trunk/returnQuestionDisplay.php
===================================================================
--- Dev/trunk/returnQuestionDisplay.php	(revision 188)
+++ 	(revision )
@@ -1,38 +1,0 @@
-<?php
-
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-if (!isset($_POST['uids']) || empty($_POST['uids'])) {
-    return;
-}
-
-$uids = explode(",", $_POST['uids']);
-$dbi = new DatabaseInterface();
-$output = "";
-foreach ($uids as $uid) {
-    $results = $dbi->get("Question", array("uid" => $uid));
-    (is_array($results)) ? $result = $results[0] : $result = $results;  //ternary operation!
-    $output += '
-<div id="questionUID" class="smallFrame">
-                    <div class="smallTitle"><div class="listNumber">1</div>#QUESTION-IDENT-NO</div>
-                    <div class="content">
-                        <p class="questionBody">
-                            This is the question body text. This is what the user will read when he/she is answering the survey.This is the question body text. This is what the user will read when he is answering the survey.This is the question body text. This is what the user will read when he is answering the survey.
-                        </p>
-                        <div class="questionParamsView">
-                            PARAMETERS GO HERE, probably in one line (Only answer type and identifier?) Tags?
-                        </div>
-                    </div>
-                    <div id="questionDisplayControls" class="controls">
-                        <input type="button" value="Edit" onClick="javascript:alert(\'editing not yet supported\');" class =" smallButton"/>
-                        <input type="button" value="Remove" onClick="javascript:alert(\'removing not yet supported\');" class =" smallButton"/>
-                    </div>
-                </div>
-';
-}
-
-echo $output;
-?>
Index: Dev/trunk/returnStep.php
===================================================================
--- Dev/trunk/returnStep.php	(revision 188)
+++ 	(revision )
@@ -1,137 +1,0 @@
-<?php
-
-require 'classes/master.php'; //should be at top of every page
-/*
- * Return the HTML markup for visualisation of an object in a pipeline, to be used in the PipelineSequencer.php
- * Called by PipelineSequencer, posting UID of the step in question.
- *  TODO: Selection code. Onload doen of serverside?
- * Javascript voor selection scripts staat ook nog niet in de -onclick- property, eerst dat script uitzoeken, daarna pas invoegen.
- */
-
-// Check if calling script actually passed a uid to use
-if (isset($_POST['uids'])) {
-    if (!empty($_POST['uids'])) {
-        $sUids = $_POST['uids'];    // string uids
-    } else {
-        echo "Invalid UIDs passed!";
-        return;
-    }
-} else {
-    echo "No UID passed!";
-}
-
-$sTypes = "unknown";    // string types
-if (isset($_POST['types'])) {
-    if (!empty($_POST['types'])) {
-        $sTypes = $_POST['types'];
-    }
-}
-
-$uids = explode(",", $sUids);   // array uids
-if ($sTypes != "unknown") {
-    $types = explode(",", $sTypes);
-}
-$response = "";
-$dbi = new DatabaseInterface();
-
-if (isset($types)) {
-    for ($i = 0; $i < count($uids); $i++) {
-        $response .= processUid($uids[$i], $types[$i]);
-    }
-} else {
-    for ($i = 0; $i < count($uids); $i++) {
-        $response .= processUid($uids[$i]);
-    }
-}
-
-
-
-echo $response;
-
-
-/*
- * ProcessUid needs to be changed once all the object classes are fixed. The '123', '456' test cases are not functional and are for testing puroses only.
- * Additional onclick events for selecting objects would need to be added as well.
- */
-
-function processUid($uid, $type = null) {
-    $dbi = new DatabaseInterface();
-
-    if ($uid == "divider") {    //a divider has been requested instead of a displaystep
-        $responsePart = '<div class="divider"></div>';
-        return $responsePart;
-    }
-
-    $result = null;
-    $resultType = null;
-
-    if ($type != null) {    // Als er een type is gespecificeerd
-        $resultType = $type;
-        $results = $dbi->get($type, array("uid" => $uid));
-        if (count($results) > 0) {
-            $result = $results[0];
-        }
-    }
-
-    // Als er geen type is gespecificeerd, doorloop de queries in de volgorde: Survey, Application, Dashboard
-    else {
-        $surveys = $dbi->get("Survey", array("uid" => $uid));
-        if (count($surveys) > 0) {
-            if ($surveys[0] != null) {
-                // A survey exists with the given UID!
-                $result = $surveys[0];
-                $resultType = "Survey";
-            }
-        }
-
-        if ($result == null) {
-            $applications = $dbi->get("Application", array("uid" => $uid));
-            if (count($applications) > 0) {
-                if ($applications[0] != null) {
-                    // An application exists with the given UID!
-                    $result = $applications[0];
-                    $resultType = "Application";
-                }
-            }
-        }
-
-        if ($result == null) {
-            $dashboards = $dbi->get("Dashboard", array("uid" => $uid));
-            if (count($dashboards) > 0) {
-                if ($dashboards[0] != null) {
-                    // A dashboard exists with the given UID!
-                    $result = $dashboards[0];
-                    $resultType = "Dashboard";
-                }
-            }
-        }
-    }
-
-// If result is still null at this point, the passed UID does not refer to an existing object!
-    if ($result == null || $resultType == null) {
-        echo "Non-existing UID passed!";
-    } else {
-
-        // set relevant variables based on the type and properties of the step in question (currently stored in $result)
-        switch (strtolower($resultType)) {
-            case "survey":
-                $imageURL = "images/icons/survey.png";
-                break;
-            case "dashboard":
-                $imageURL = "images/icons/dashboard.png";
-                break;
-            case "application":
-                $imageURL = "images/icons/application.png";
-                break;
-            default:
-                $imageURL = "images/icons/unknowntype.png";
-                break;
-        }
-
-//echo out the HTML markup
-        $responsePart = '<div class="displayStep" id="' . $result->uid . '" onClick="clickStep(this.id);"><div class="displayStepIcon"><img src="' . $imageURL . '" /></div>' . $result->title . '</div>';
-        return $responsePart;
-    }
-}
-
-?>
Index: Dev/trunk/saveSurvey.php
===================================================================
--- Dev/trunk/saveSurvey.php	(revision 191)
+++ Dev/trunk/saveSurvey.php	(revision 191)
@@ -0,0 +1,45 @@
+<?php
+
+require 'classes/master.php';
+
+// Quit if no arguments have been passed.
+if (!isset($_POST['args'])) {
+    if (empty($_POST['args'])) {
+        die("Error! No arguments passed!");
+    }
+}
+
+$args = json_decode($_POST['args']);
+if ($args == false) {
+    die("Error decoding JSON arguments!");
+}
+
+// At this point we know we have arguments in the POST data.
+// Query the survey object from the database.
+
+$dbi = new DatabaseInterface();
+$survey_results = $dbi->get("Survey", array("uid" => $args->uid));
+if (!empty($survey_results)) {
+    $survey = $survey_results[0];
+} else {
+    die("No survey found!");
+}
+
+$question->questions = array();
+foreach ($args->questions->uids as $questionUid) {
+    $question_results = $dbi->get("Question", array("code"=>$questionUid));
+    $question = $question_results[0];
+    $survey->questions[] = $question;
+}
+
+// The next part is a rather experimental way of automatically writing all passed arguments to the session object.
+// If this does not work properly, we should write the "write title to session->title" call by hand.
+/*
+  foreach ($args as $key=>$value) {
+  $session->$key = $value;
+  }
+ */
+var_dump($survey);
+// Do I need to check if this is done before proceeding?
+$dbi->set($survey);
+?>
Index: Dev/trunk/savesession.php
===================================================================
--- Dev/trunk/savesession.php	(revision 188)
+++ Dev/trunk/savesession.php	(revision 191)
@@ -2,4 +2,9 @@
 
 require 'classes/master.php'; //should be at top of every page
+
+/*
+ * Dit kan een STUK sneller. Vervang gewoon de hele pipeline string met de lokale versie.
+ * Daarna: $session->eval
+ */
 
 if (isset($_POST['uids']) && isset($_POST['types']) && isset($_POST['sessionUid'])) {
Index: Dev/trunk/selectSession.php
===================================================================
--- Dev/trunk/selectSession.php	(revision 188)
+++ Dev/trunk/selectSession.php	(revision 191)
@@ -2,5 +2,5 @@
 require 'classes/master.php'; //should be at top of every page
 
-if (!isset($_SESSION['username'])) {
+if (!isset($_SESSION['userUid'])) {
     redirect("index.php");
 }
@@ -18,9 +18,9 @@
         // check if name is available
         if (!empty($_POST['newSessionName'])) {
-            $matching = $dbi->get("Session", array("title" => $_POST['newSessionName']));
-            if (count($matching) == 0) {
+            $session_results = $dbi->get("Session", array("title" => $_POST['newSessionName']));
+            if (count($session_results) == 0) {
                 // make new session!
-                unset($matching);
-                $creators = $dbi->get("User", array("username"=>$_SESSION['username']));
+                unset($session_results);
+                $creators = $dbi->get("User", array("uid" => $_SESSION['userUid']));
                 $creator = $creators[0];
                 $session = new Session(null, $_POST['newSessionName'], $creator, new DateTime(), null, null);
@@ -43,10 +43,10 @@
 if (isset($_POST['editSession'])) {
     if (isset($_POST['sessionUID'])) {
-        $matching = $dbi->get("SESSION", array("uid" => $_POST['sessionUID']));
-        if (count($matching) == 1 && $matching[0] != null) {
+        $session_results = $dbi->get("SESSION", array("uid" => $_POST['sessionUID']));
+        if (count($session_results) == 1 && $session_results[0] != null) {
             // DEZE SESSION MOET UITEINDELIJK EEN POST WORDEN, WANNEER DEZE HELE PAGINA IS OVERGEZET IN JAVASCRIPT!
             $_SESSION['currentSession'] = $_POST['sessionUID'];
             $_SESSION['updateNeeded'] = "true";
-            redirect("pipelineEditor.php");
+            redirect("sessionEditor.php");
         }
     }
@@ -66,4 +66,5 @@
         <?php new StyleSheet("awesome"); ?>
         <script type="text/javascript" src="js/sequencerScripts.js"></script>
+        <script type="text/javascript" src="js/generalScripts.js"></script>
     </head>
     <body>
@@ -74,44 +75,44 @@
         <div id="wrapper">
             <div id="content">
-            <form action="selectSession.php" method="POST">
-                <fieldset name="selectionMenu">
-                    <!-- onchange van volgende select linkt deze aan de ajax-based info panel, script staat in sequencerScripts.js -->
-                    <select name="sessionUID" style="float: left;" onChange="ajaxInfoRequest(this.value, document.getElementById('infoPanelContent'), 'Session');">
-                        <option value="" disabled="true" selected>Please select a session</option>
-            <?php
-                        foreach ($sessions as $session) {
-                            $selected = "";
-                            if ($session->title == $_POST['newSessionName']) {
-                                $selected = ' selected="true"';
+                <form action="selectSession.php" method="POST">
+                    <fieldset name="selectionMenu">
+                        <!-- onchange van volgende select linkt deze aan de ajax-based info panel, script staat in sequencerScripts.js -->
+                        <select name="sessionUid" style="float: left;" onChange="ajaxInfoRequest(this.value, document.getElementById('infoPanelContent'), 'Session');">
+                            <option value="" disabled="true" selected>Please select a session</option>
+                            <?php
+                            foreach ($sessions as $session) {
+                                $selected = "";
+                                if ($session->title == $_POST['newSessionName']) {
+                                    $selected = ' selected="true"';
+                                }
+
+                                echo '<option value="' . $session->uid . '"' . $selected . '>' . $session->title . '</option>' . "\n";
                             }
-                            
-                            echo '<option value="' . $session->uid . '"' . $selected . '>' . $session->title . '</option>' . "\n";
-                        }
-                        ?>                    
-                    </select>
-                    <br /><br />
-                    <input type="hidden" name="updateNeeded" value="true" />
-                    <input type="text" name="newSessionName" value="Name..." style="float: left;" /><br />
-                    <input type="submit" name="createSession" value="Create new session" class="surveybutton" style="float: left;" />
-                    <input type="submit" name="editSession" value="Edit session" class="surveybutton" style="float: left;" />
-                    <input type="submit" name="deleteSession" value="Delete session" class="surveybutton" style="float: left;" />
-                    <br /><br /><br />
-                    <div id="errorDisplay"><?php
-                        if (isset($errorMessage)) {
-                            foreach ($errorMessage as $message) {
-                                echo $message;
+                            ?>                    
+                        </select>
+                        <br /><br />
+                        <input type="hidden" name="updateNeeded" value="true" />
+                        <input type="text" name="newSessionName" value="Name..." style="float: left;" /><br />
+                        <input type="submit" name="createSession" value="Create new session" class="surveybutton" style="float: left;" />
+                        <input type="submit" name="editSession" value="Edit session" class="surveybutton" style="float: left;" />
+                        <input type="submit" name="deleteSession" value="Delete session" class="surveybutton" style="float: left;" />
+                        <br /><br /><br />
+                        <div id="errorDisplay"><?php
+                            if (isset($errorMessage)) {
+                                foreach ($errorMessage as $message) {
+                                    echo $message;
+                                }
                             }
-                        }
-                        ?></div>
-                </fieldset>
-                <fieldset id="sessionDescription">
-                    <div class="fieldsetTitle">
-                        Info
-                    </div>
-                    <div id="infoPanelContent">
-                    </div>
-                </fieldset>
-            </form>
-        </div>
+                            ?></div>
+                    </fieldset>
+                    <fieldset id="sessionDescription">
+                        <div class="fieldsetTitle">
+                            Info
+                        </div>
+                        <div id="infoPanelContent">
+                        </div>
+                    </fieldset>
+                </form>
+            </div>
         </div>
     </body>
Index: Dev/trunk/sessionEditor.php
===================================================================
--- Dev/trunk/sessionEditor.php	(revision 191)
+++ Dev/trunk/sessionEditor.php	(revision 191)
@@ -0,0 +1,46 @@
+<?php
+require 'classes/master.php'; //should be at top of every page
+
+if (!isset($_SESSION['userUid'])) {
+    redirect('index.php');
+}
+
+$sequencer = new SessionEditorWidget();
+$sequencer->LoadSession(); //load session into php part of the sequencer
+$sequencer->HandlePostData();
+?>
+
+<!--
+To change this template, choose Tools | Templates
+and open the template in the editor.
+-->
+<!DOCTYPE html>
+
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <title></title>
+        <?php
+        new StyleSheet("visualeditors");
+        $sequencer->Javascript();
+        ?>
+
+    </head>
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+
+        <div id="wrapper">
+            <div id="content">
+                <?php $sequencer->init(); ?>
+                <?php $toolbox = new Toolbox(); ?>
+                <?php new PipelineInfoPanel(); ?>
+            </div>
+        </div>
+        <div id="settingsFields">
+            <input type="hidden" id="sContentTypeField" value="session" />
+        </div>
+
+    </body>
+</html>
