Ejemplo n.º 1
0
        #### Load intro from session
        $content = $_SESSION['wrapper']['data'][$surveyID][$langCode]['intro.md'];
    } else {
        #### Load intro from file
        $content = file_get_contents($introPath);
        if ($devMode === FALSE) {
            $_SESSION['wrapper']['data'][$surveyID][$langCode]['intro.md'] = $content;
        }
    }
}
## Get required content
switch ($pageType) {
    case 'date':
        break;
    case 'survey':
        $page->bool_ignore_defaults = config_var_exists($config, 'settings', 'ignoreDefaults') ? $config['settings']['ignoreDefaults'] : TRUE;
        ### Check for page id and reset survey if none exists
        $firstPageID = $page->get_first_page_id();
        if (isset($_GET['pid']) && strlen($_GET['pid']) > 0) {
            $pageID = $_GET['pid'];
        } else {
            ### Start survey
            $pageID = $firstPageID;
            SC_Survey_Flow::reset_survey($pageID, $initialAnswers);
        }
        break;
    case 'thankyou':
        ### Forget device ID if web or data-entry, to allow staff to switch between the two
        if ($_SESSION['deviceID'] === 'web' || $_SESSION['deviceID'] === 'data-entry') {
            unset($_SESSION['deviceID']);
        }
Ejemplo n.º 2
0
img/logo-250w.jpg 250w">
        </div>
    </header>


    <header class="survey-titles" role="banner">
    <?php 
if (config_var_exists($config, 'surveyTitle')) {
    ?>
        <h1 class="title"><?php 
    echo html($config['surveyTitle']);
    ?>
</h1>
    <?php 
}
if (config_var_exists($config, 'surveySubtitle')) {
    ?>
        <h2 class="subtitle"><?php 
    echo html($config['surveySubtitle']);
    ?>
</h2>
    <?php 
}
?>
    </header>
    
    <div class="frame" id="frame">
        <section class="page <?php 
echo $pageType;
?>
">