コード例 #1
0
ファイル: index.php プロジェクト: elzadj/DDESCCG
    } 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']);
        }
        ### Load outro into string
        if (is_null($outroPath)) {