Index: Dev/trunk/classes/StyleSheet.php
===================================================================
--- Dev/trunk/classes/StyleSheet.php	(revision 174)
+++ Dev/trunk/classes/StyleSheet.php	(revision 177)
@@ -20,5 +20,7 @@
         $this->path = "css/" . $styleName . ".css";
 
+        echo '<link rel="Stylesheet" type="text/css" href="css/resetstyle.css" />';
         echo '<link rel="Stylesheet" type="text/css" href="' . $this->path . '"/>';
+        
         echo "\n";
     }
Index: Dev/trunk/classes/Toolbox.php
===================================================================
--- Dev/trunk/classes/Toolbox.php	(revision 174)
+++ Dev/trunk/classes/Toolbox.php	(revision 177)
@@ -16,4 +16,17 @@
 
         <br />
+        
+        <div id="toolbox" class="largeFrame">
+            <div class="largeTitle">Toolbox</div>
+            <div class="content">
+                <p style="float: left; clear:both; margin-bottom: 1em;">Add new:</p>
+                <div class="bigButton vert" onClick="SubmitToolbox('Survey');"><img src="images/icons/survey.png" class="buttonIcon" /><p>Survey</p></div>
+                <div class="bigButton vert" onClick="SubmitToolbox('Application');"><img src="images/icons/application.png" class="buttonIcon" /><p>Application</p></div>
+                <div class="bigButton vert" onClick="SubmitToolbox('Dashboard');"><img src="images/icons/dashboard.png" class="buttonIcon" /><p>Dashboard</p></div>
+            </div>
+        </div>
+        
+        
+        <!--
         <form name="toolbox" action="pipelineEditor.php" method="POST">
             <fieldset id="toolbox">
@@ -25,4 +38,6 @@
             </fieldset>
         </form>
+        
+        -->
         <?php
     }
Index: Dev/trunk/classes/pipelineSequencer_1.php
===================================================================
--- Dev/trunk/classes/pipelineSequencer_1.php	(revision 177)
+++ Dev/trunk/classes/pipelineSequencer_1.php	(revision 177)
@@ -0,0 +1,192 @@
+<?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");
+    }
+
+}
+?>
