[142] | 1 | <?php |
---|
| 2 | require 'classes/master.php'; //should be at top of every page |
---|
| 3 | |
---|
| 4 | /* |
---|
| 5 | if(isset($_SESSION['username'])){ //user is logged in |
---|
| 6 | //get pipeline contents from database, and store in displayObject() array "pipelineSteps" |
---|
| 7 | //nu nog even gewoon een hardcoded workaround |
---|
| 8 | foreach () |
---|
| 9 | |
---|
| 10 | } |
---|
| 11 | * */ |
---|
| 12 | |
---|
| 13 | // generate a random array of pipeline contents |
---|
| 14 | $displaySteps = array(); // array containing a number of random-generated stings "$type", to fill up the sequencer |
---|
| 15 | $numSteps = 9; // number of steps to random-generate for testing purposes. |
---|
| 16 | $maxNumSteps = 9; // maximum number of steps that can be displayed in the sequencer (without scrollbars, at current) |
---|
| 17 | |
---|
| 18 | for ($n = 1; $n <= $numSteps; $n++) { // fill the array of types |
---|
| 19 | $rnd = rand(1, 4); |
---|
| 20 | switch ($rnd) { |
---|
| 21 | case 1: |
---|
| 22 | $type = "Dashboard"; |
---|
| 23 | break; |
---|
| 24 | case 2: |
---|
| 25 | $type = "Questionnaire"; |
---|
| 26 | break; |
---|
| 27 | case 3: |
---|
| 28 | $type = "Notice"; |
---|
| 29 | break; |
---|
| 30 | case 4: |
---|
| 31 | $type = "Application"; |
---|
| 32 | break; |
---|
| 33 | default: |
---|
| 34 | $type = "Questionnaire"; |
---|
| 35 | break; |
---|
| 36 | } |
---|
| 37 | $displaySteps[] = $type; |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | $pipelineName = "Test pipeline"; |
---|
| 41 | ?> |
---|
| 42 | |
---|
| 43 | <!-- |
---|
| 44 | To change this template, choose Tools | Templates |
---|
| 45 | and open the template in the editor. |
---|
| 46 | --> |
---|
| 47 | <!DOCTYPE html> |
---|
| 48 | <html> |
---|
| 49 | <head> |
---|
| 50 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
---|
| 51 | <title></title> |
---|
| 52 | <?php new StyleSheet("awesome"); ?> |
---|
| 53 | <script type="text/javascript" src="js/menu.js"></script> |
---|
| 54 | <script type="text/javascript" src="js/jquery.jps"></script> |
---|
| 55 | </head> |
---|
| 56 | <body> |
---|
| 57 | <div id="logo"> |
---|
| 58 | <?php new Logo(); ?> |
---|
| 59 | </div> |
---|
| 60 | |
---|
| 61 | <div id="wrapper"> |
---|
| 62 | <div id="content"> |
---|
| 63 | <form action="pipelineEditor.php" method="POST"> |
---|
| 64 | |
---|
| 65 | <fieldset id="sequencer"> |
---|
| 66 | |
---|
| 67 | <div class="title">Name: <?php echo $pipelineName; ?></div> |
---|
| 68 | |
---|
| 69 | <div id="seqContent"> |
---|
| 70 | <?php |
---|
| 71 | $n = 0; |
---|
| 72 | foreach ($displaySteps as $displayStep) { |
---|
| 73 | if ($n <= $maxNumSteps) { |
---|
| 74 | $n++; |
---|
| 75 | new DisplayStep($displayStep, null, "Step " . $n); |
---|
| 76 | if ($n != $numSteps){ |
---|
| 77 | echo "<div class='divider'></div>"; |
---|
| 78 | } |
---|
| 79 | } |
---|
| 80 | } |
---|
| 81 | ?> |
---|
| 82 | </div> |
---|
| 83 | |
---|
| 84 | <div id="controls"> |
---|
| 85 | <input type="submit" name="moveSelectedLeft" value="< Move" class="surveyButton" /> |
---|
| 86 | <input type="submit" name="moveSelectedRight" value="Move >" class="surveyButton" /> |
---|
| 87 | <input type="submit" name="editSelected" value="Edit step" class="surveyButton" /> |
---|
| 88 | <input type="submit" name="deleteSelected" value="Delete step" class="surveyButton" /> |
---|
| 89 | <input type="hidden" name="selectedStep" /> |
---|
| 90 | </div> |
---|
| 91 | |
---|
| 92 | </fieldset> |
---|
| 93 | |
---|
| 94 | <br /> |
---|
| 95 | <fieldset id="toolbox"> |
---|
| 96 | <div class="title">Toolbox</div> |
---|
| 97 | <?php |
---|
| 98 | new DisplayStep("Questionnaire", null, "Questionnaire"); |
---|
| 99 | new DisplayStep("Notice", null, "Notice"); |
---|
| 100 | new DisplayStep("Application", null, "Application"); |
---|
| 101 | new DisplayStep("Dashboard", null, "Dashboard"); |
---|
| 102 | ?> |
---|
| 103 | </fieldset> |
---|
| 104 | </form> |
---|
| 105 | </div> |
---|
| 106 | </body> |
---|
| 107 | </html> |
---|