Esempio n. 1
0
        //set clean session so ->ask knows to just store the questions
        //get all basic variablenames and set the as global;
        global $xi;
        foreach ($survey->getSections() as $section) {
            eval('?>' . file_get_contents($xi['surveys']['metadata']['path'] . $section->getRulesLocation()) . '<?');
        }
        unset($_SESSION['clean']);
        $_SESSION['data'] = array_intersect_key($_SESSION['data'], array_flip($cleanQuestions));
        //delete the ones we don't want
        $survey->getDatabase()->updateRecord($_SESSION["primkey"], $_SESSION['data']);
        //store endts
    }
    showSurveyPastLastQuestion();
}
//DISPLAY QUESTION OR QUESTIONGROUP
$question = getCurrentQuestion($currentRouting);
//for arrays
/*if (isset($_SESSION['currentQuestion'])){
  $_SESSION['lastQuestion'] = $_SESSION['currentQuestion'];
}
else {
  $_SESSION['lastQuestion'] = array();
} */
$_SESSION['currentQuestion'] = setCurrentQuestion($question, array());
$_SESSION['currentRouting'] = $question->getName();
$_SESSION['data']['currentRouting'] = $question->getName();
//store as last question answered for when we get back.
echo $question->showQuestion();
//adjust next/back buttons
echo setNextButton($question->showNextButton());
echo setBackButton($question->showBackButton());
Esempio n. 2
0
<head>
<title>Conseil general - Titre du site</title>
<?php 
include "head.php";
?>
<link rel="stylesheet" type="text/css" href="styles/mosaic.css?v=1"></link>
<script src="js/mosaic.js?v=1" type="text/javascript"></script>
</head>
<body><div class="all" id="all-global"><?php 
//ORDRE DES ELEMENTS EST IMPORTANT
if (strlen($cat) < 1) {
    $qsts = getQuestions();
    if (count($qsts) < 1) {
        die("Pas de questions");
    }
    $question = getCurrentQuestion();
    $qstId = $question["id"];
    include "mosaicContent.php";
} else {
    if (strpos($cat, "presentation") > -1) {
        list($cat, $subcat) = explode("-", $cat);
        include "presentation.php";
    } else {
        include $cat . ".php";
    }
}
?>
		</div>
		
		<?php 
include "analytics.php";
Esempio n. 3
0
$qsts = getQuestions();
var_dump($qsts);
echo "<hr>QUESTIONS<hr>";
foreach ($qsts as $q) {
    var_dump($q);
    echo "<br/><br/>";
}
echo "<hr>EACH QUESTIONS<hr>";
foreach ($qsts as $q) {
    var_dump($q["id"]);
    echo "<br/>";
}
echo "<hr>QUESTION 76<hr>";
var_dump(getQuestion(76));
echo "<hr>CURRENT QUESTION<hr>";
var_dump(getCurrentQuestion());
echo "<hr>ITEMS<hr>";
$items = getItems(76);
var_dump($items);
echo "<hr>ITEM index 2<hr>";
$item = $items[2];
var_dump($item);
echo "<hr>ITEM MORE OF ITEMS<hr>";
$more = getItemMore($items);
var_dump($more);
echo "<hr>ITEM RATE<hr>";
$voteCount = getItemRate($item);
var_dump($voteCount);
echo "<hr>ITEM COMMENTS<hr>";
$voteCount = getItemComments($item);
var_dump($voteCount);