Index: Dev/branches/jQueryUI/pages_old/createObject.php
===================================================================
--- Dev/branches/jQueryUI/pages_old/createObject.php	(revision 246)
+++ 	(revision )
@@ -1,62 +1,0 @@
-<?php
-
-require 'classes/master.php'; //should be at top of every page
-
-if (isset($_POST['objectToCreate'])) {
-    if (!empty($_POST['objectToCreate'])) {
-        $otc = $_POST['objectToCreate'];
-    } else {
-        //die ("Invalid arguments passed!");
-    }
-} else {
-    //die ("No arguments passed!");
-}
-
-
-$creator_results = User::get(array("uid" => $_SESSION['userUid']));
-$creator = $creator_results[0];
-
-//var_dump($creator);
-
-if (!$creator) {
-    die("Stuff is broke, yo!");
-}
-
-$uid = null;
-switch (strtolower($otc)) {
-    case "application":
-        $newApp = new Application(null, "New application", "Default description", "Default style");
-        $newApp->save();
-        $uid = $newApp->uid;
-        break;
-    case "survey":
-        $newSurvey = new Survey(null, "New Survey", "Default description", $creator, null);
-        $newSurvey->save();
-        $uid = $newSurvey->uid;
-        break;
-    case "dashboard":
-        //TODO
-        break;
-    case "question":
-        $newQuestion = new Question(null, "QCode", "new Question", "int", "Default description", "Standard category", array());
-        $newQuestion->save();
-        $uid = $newQuestion->uid;
-        break;
-    case "session":
-        if (isset($_POST['newSessionName']) && !empty($_POST['newSessionName'])) {
-            $newSession = new Session(null, $_POST['newSessionName'], $creator, new DateTime(), null, null);
-            $newSession->save();
-            $uid = $newSession->uid;
-        } else {
-            die("No session name specified!");
-        }
-
-
-        break;
-    default:
-        //die ("Variable \$otc: $otc does not match a compatible object type!");
-        break;
-}
-
-echo $uid;
-?>
Index: Dev/branches/jQueryUI/pages_old/getObject.php
===================================================================
--- Dev/branches/jQueryUI/pages_old/getObject.php	(revision 246)
+++ 	(revision )
@@ -1,35 +1,0 @@
-<?php
-
-require "classes/master.php";
-
-//Get post variables
-if (isset($_POST['args']) || !empty($_POST['args'])) {
-    $requestArray = JSON_decode($_POST['args']);
-} else {
-    die("No input passed!");
-}
-
-$resultArray = array();
-
-foreach ($requestArray as $request) {
-    $type = $request->type;
-
-    if (isset($request->uid)) {
-        $results = $type::get(array("uid" => $request->uid));
-    } else if (isset($request->title)) {
-        $results = $type::get(array("title" => $request->title));
-    }
-
-
-    if (isset($results) && !empty($results) && count($results) > 0) {
-        // Add type property for easier identification in JS.
-        $results[0]->objectType = $type;
-        $resultArray[] = $results[0];
-    } else {
-        $resultArray[] = false; //Insert a false return so that the calling JS code knows when an object is not found
-    }
-}
-
-$output = JSON_encode($resultArray);
-echo $output;
-?>
Index: Dev/branches/jQueryUI/pages_old/mainmenu.php
===================================================================
--- Dev/branches/jQueryUI/pages_old/mainmenu.php	(revision 246)
+++ 	(revision )
@@ -1,94 +1,0 @@
-<?php
-require 'classes/master.php'; //should be at top of every page
-?>
-
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-        <title>Facilitator</title>
-        <?php new StyleSheet("visualeditors"); ?>
-        <script type="text/javascript" src="js/generalScripts.js"></script>
-        <script type="text/javascript">
-            function browseSessions() {
-                // This one doesn't use the objectSelector yet. Just redirect to selectSession.php
-                window.location = 'selectSession.php';
-            }
-            
-            function browseSurveys() {
-                var form = ce("form");
-                form.method = "POST";
-                form.action = "selectObject.php";
-                var input1 = ce("input");
-                input1.name = "objectType";
-                input1.value = "Survey";
-                var input2 = ce("input");
-                input2.name = "function";
-                input2.value = "redirEditor";
-                form.appendChild(input1);
-                form.appendChild(input2);
-                form.submit();
-            }
-            
-            function browseQuestions() {
-                var form = ce("form");
-                form.method = "POST";
-                form.action = "selectObject.php";
-                var input1 = ce("input");
-                input1.name = "objectType";
-                input1.value = "Question";
-                var input2 = ce("input");
-                input2.name = "function";
-                input2.value = "redirEditor";
-                form.appendChild(input1);
-                form.appendChild(input2);
-                form.submit();
-            }
-            
-            function browseApplications() {
-                var form = ce("form");
-                form.method = "POST";
-                form.action = "selectObject.php";
-                var input1 = ce("input");
-                input1.name = "objectType";
-                input1.value = "Application";
-                var input2 = ce("input");
-                input2.name = "function";
-                input2.value = "redirEditor";
-                form.appendChild(input1);
-                form.appendChild(input2);
-                form.submit();
-            }
-        </script>
-    </head>
-    <body>
-        <div id="header">
-            <?php new Logo(); ?>
-        </div>
-
-        <div id="wrapper">
-            <div id="content">
-                <div class="largeFrame side" id="adminPanel">
-                    <div class="largeTitle">Administrator</div>
-                    <div class="innerLargeFrame">
-                        <p>Use the below buttons to access, edit and create new sessions and content.</p><br />
-                        <input type="button" class="bigButton vertical" value="Browse Sessions" id="btnBrowseSessions" onClick="browseSessions()" /><br />
-                        <input type="button" class="bigButton vertical" value="Browse Surveys" id="btnBrowseSurveys" onClick="browseSurveys()" /><br />
-                        <input type="button" class="bigButton vertical" value="Browse Questions" id="btnBrowseQuestions" onClick="browseQuestions()" /><br />
-                        <input type="button" class="bigButton vertical" value="Browse Applications" id="btnBrowseApplications" onClick="browseApplications()" /><br />
-
-                    </div>
-                    <div class="controls"></div>
-                </div>
-                <div class="largeFrame side" id="facilitatorPanel">
-                    <div class="largeTitle">Facilitator</div>
-                    <div class="innerLargeFrame">
-                        <p>Use the Start button below to start hosting a session.</p>
-                        <input type="button" class="bigButton vertical" value="Start" id="btnFacStart" onClick="window.location='facpanel.php'" style="margin-top: 0.25em;"/>
-                    </div>
-                    <div class="controls"></div>
-                </div>
-            </div>
-        </div>
-    </body>
-</html>
Index: Dev/branches/jQueryUI/pages_old/selectSession.php
===================================================================
--- Dev/branches/jQueryUI/pages_old/selectSession.php	(revision 246)
+++ 	(revision )
@@ -1,176 +1,0 @@
-<?php
-require 'classes/master.php'; //should be at top of every page
-
-if (!isset($_SESSION['userUid'])) {
-    redirect("index.php");
-}
-
-if (isset($_SESSION['message'])) {
-    echo $_SESSION['message'];
-    unset($_SESSION['message']);
-}
-
-if (isset($_POST['createSession'])) {
-    //check if name is set
-    if (isset($_POST['newSessionName'])) {
-        // check if name is available
-        if (!empty($_POST['newSessionName'])) {
-            $session_results = Session::get(array("title" => $_POST['newSessionName']));
-            if (count($session_results) == 0) {
-                // make new session!
-                unset($session_results);
-                $creators = User::get(array("uid" => $_SESSION['userUid']));
-                $creator = $creators[0];
-                $session = new Session(null, $_POST['newSessionName'], $creator, new DateTime(), null, null);
-                $session->save();
-            } else {
-                $errorMessage[] = "A session with the name " . $_POST['newSessionName'] . " already exists!";
-            }
-        }
-    } else {
-        $errorMessage[] = "Please enter a name for the new session!";
-    }
-}
-
-if (isset($_POST['deleteSession'])) {
-    if (isset($_POST['sessionUID'])) {
-        //Kan de database al objecten verwijderen?
-    }
-}
-
-if (isset($_POST['editSession'])) {
-    var_dump($_POST);
-    if (isset($_POST['sessionUid'])) {
-        $session_results = Session::get((array("uid" => $_POST['sessionUid'])));
-        var_dump($session_results);
-        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("sessionEditor.php");
-        }
-    }
-}
-
-//Get available sessions for current user
-//$sessions = $dbi->get("Session", array("creator"=>$_SESSION['username']));  //This does not work, session.php does not yet have a property 'creator'
-$sessions = Session::get(array());  // Let's just load everything then...
-?>
-
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-        <title>Select a session</title>
-        <?php new StyleSheet("visualeditors"); ?>
-        <script type="text/javascript" src="js/sequencerScripts.js"></script>
-        <script type="text/javascript" src="js/generalScripts.js"></script>
-        <script type="text/javascript">
-            function sendToEditor() {
-                debugger;
-                var uid = ge('objectUid').value;
-                if (uid.length == 32) {
-                    // A valid uid has actually been passed
-                    var form = ce("form");
-                    form.method = "POST";
-                    form.action = "sessionEditor.php";
-                    var input = ce("input");
-                    input.name = "objectUid";
-                    input.value = uid;
-                    form.appendChild(input);
-                    form.submit();
-                }
-            }
-            
-            function createNewSession() {
-                //debugger;
-                var desiredName = ge('newSessionName').value;
-                if (desiredName.length < 1) return;
-                var request = Array({
-                    type: "Session",
-                    title: desiredName
-                });
-                var requestString = "args="+JSON.stringify(request);
-                newAjaxRequest(requestString, "getObject.php", function(result){
-                    debugger;
-                    console.log(result.responseText);
-                    var session = JSON.parse(result.responseText)[0];
-                    if (session != false) {
-                        alert("Session with that name already exists. Please choose a different name.");
-                    }
-                    else {
-                        var requestString = "objectToCreate=Session&newSessionName="+desiredName;
-                        
-                        newAjaxRequest(requestString, "createObject.php", function(result){
-                            var objectUid = result.responseText;
-                            if (objectUid.length != 32) return;
-                            var form = ce("form");
-                            form.method = "POST";
-                            form.action = "sessionEditor.php";
-                            var input = ce("input");
-                            input.value = objectUid;
-                            input.name = "objectUid";
-                            form.appendChild(input);
-                            form.submit();
-                        },false);
-                    }
-                }, false);
-            }
-        </script>
-    </head>
-    <body>
-        <div id="header">
-            <?php new Logo(); ?>
-        </div>
-
-        <div id="wrapper">
-            <div id="content">
-                <div class="largeFrame" id="sessionSelector" style="width: 400px;">
-                    <div class="largeTitle">Select session</div>
-                    <div class="content">
-                        <form action="selectSession.php" method="POST">
-                            <div style="float: left; clear: left;">
-                                <select id ="objectUid" name="objectUid" 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";
-                                    }
-                                    ?>                    
-                                </select>
-                                <input type="hidden" name="updateNeeded" value="true" />
-                                <input type="text" id="newSessionName" name="newSessionName" value="Name..." style="float: left; clear: left;" /><br />
-                            </div>
-                            <div style="float: left; clear: none;">
-                                <input type="button" onclick="createNewSession();" name="createSession" value="Create new session" class="smallButton vertical" style="float: left;" />
-                                <input type="button" name="editSession" value="Edit session" class="smallButton vertical" style="float: left;" onclick="sendToEditor();" />
-                                <input type="submit" name="deleteSession" value="Delete session" class="smallButton vertical" style="float: left;" />
-                            </div>
-                            <div id="errorDisplay"><?php
-                                    if (isset($errorMessage)) {
-                                        foreach ($errorMessage as $message) {
-                                            echo $message;
-                                        }
-                                    }
-                                    ?>
-                            </div>
-                    </div>
-                </div>
-
-                <div id="sessionInfoPanel" class="largeFrame" style="margin-top: 10px; width: 400px; height: 100px;">
-                    <div class="largeTitle">Info</div>
-                    <div id="infoPanelContent" class="content" style="float: left; clear: left;">
-                    </div>
-                </div>
-                </form>
-            </div>
-        </div>
-    </div>
-</div>
-</body>
-</html>
