Exemple #1
0
 function showOutputStaticsResponse()
 {
     $displayOutput = new DisplayOutput();
     return $displayOutput->showOutputResponse();
 }
Exemple #2
0
 function showAuxDataRes()
 {
     /* update last page */
     $_SESSION['LASTPAGE'] = substr($_SESSION['LASTPAGE'], 0, strripos($_SESSION['LASTPAGE'], "res"));
     $displayOutput = new DisplayOutput();
     $de = new DataExport(loadvar('survey'));
     $de->setProperty(DATA_OUTPUT_CLEAN, loadvar(DATA_OUTPUT_CLEAN));
     $de->setProperty(DATA_OUTPUT_HIDDEN, loadvar(DATA_OUTPUT_HIDDEN));
     $de->setProperty(DATA_OUTPUT_COMPLETED, loadvar(DATA_OUTPUT_COMPLETED));
     $de->setProperty(DATA_OUTPUT_FIELDNAME_CASE, loadvar(DATA_OUTPUT_FIELDNAME_CASE));
     if (loadvar(DATA_OUTPUT_FILENAME) != "") {
         $de->setProperty(DATA_OUTPUT_FILENAME, loadvar(DATA_OUTPUT_FILENAME));
     }
     $cookievars = "";
     if (isset($_COOKIE['uscicvariablecookie'])) {
         if (loadvar(DATA_OUTPUT_SUBDATA) == SUBDATA_YES) {
             $vars = explode("-", $_COOKIE['uscicvariablecookie']);
             $arr = array();
             foreach ($vars as $var) {
                 $varsplit = explode("~", $var);
                 if (loadvar('survey') == $varsplit[0]) {
                     // only consider variables from survey we are downloading for
                     $survey = new Survey($varsplit[0]);
                     $v = $survey->getVariableDescriptive($varsplit[1]);
                     if ($v->getName() != "") {
                         $arr[] = strtoupper($v->getName());
                     }
                 }
             }
             if (sizeof($arr) > 0) {
                 $cookievars = implode("~", $arr);
             }
         }
     }
     $de->setProperty(DATA_OUTPUT_VARLIST, $cookievars);
     $de->setProperty(DATA_OUTPUT_FILETYPE, loadvar(DATA_OUTPUT_FILETYPE));
     $de->setProperty(DATA_OUTPUT_INCLUDE_VALUE_LABELS, loadvar(DATA_OUTPUT_INCLUDE_VALUE_LABELS));
     $de->setProperty(DATA_OUTPUT_INCLUDE_VALUE_LABEL_NUMBERS, loadvar(DATA_OUTPUT_INCLUDE_VALUE_LABEL_NUMBERS));
     $de->setProperty(DATA_OUTPUT_LANGUAGES, implode("~", loadvar(DATA_OUTPUT_LANGUAGES)));
     $de->setProperty(DATA_OUTPUT_MARK_EMPTY, loadvar(DATA_OUTPUT_MARK_EMPTY));
     $de->setProperty(DATA_OUTPUT_MODES, implode("~", loadvar(DATA_OUTPUT_MODES)));
     $de->setProperty(DATA_OUTPUT_PRIMARY_KEY_ENCRYPTION, loadvar(DATA_OUTPUT_PRIMARY_KEY_ENCRYPTION));
     $de->setProperty(DATA_OUTPUT_PRIMARY_KEY_IN_DATA, loadvar(DATA_OUTPUT_PRIMARY_KEY_IN_DATA));
     $de->setProperty(DATA_OUTPUT_SURVEY, loadvar(DATA_OUTPUT_SURVEY));
     $de->setProperty(DATA_OUTPUT_TYPEDATA, loadvar(DATA_OUTPUT_TYPEDATA));
     $de->setProperty(DATA_OUTPUT_VARIABLES_WITHOUT_DATA, loadvar(DATA_OUTPUT_VARIABLES_WITHOUT_DATA));
     $de->setProperty(DATA_OUTPUT_KEEP_ONLY, loadvar(DATA_OUTPUT_KEEP_ONLY));
     $de->setProperty(DATA_OUTPUT_TYPE, loadvar(DATA_OUTPUT_TYPE));
     $de->setProperty(DATA_OUTPUT_ENCODING, "UTF-8");
     $de->setProperty(DATA_OUTPUT_FROM, loadvar(DATA_OUTPUT_FROM));
     $de->setProperty(DATA_OUTPUT_TO, loadvar(DATA_OUTPUT_TO));
     //$de->displayProperties();
     $de->generateAuxiliary();
     $de->download();
     //$de->displayProperties();
     //$de->writeCSVFile();
     //$de->displayLog();
     return $displayOutput->showOutputAddOnData();
 }
Exemple #3
0
 function showOutputTranslation()
 {
     $displayOutput = new DisplayOutput();
     return $displayOutput->showOutputTranslation();
 }