Exemplo n.º 1
0
include "../functions/functions.xhtml.php";
if (isset($_GET['ddi'])) {
    export_ddi(intval($_GET['ddi']));
    exit;
}
if (isset($_GET['data'])) {
    outputdata(intval($_GET['data']), "", true, true, true);
    exit;
}
if (isset($_GET['csvlabel'])) {
    outputdatacsv(intval($_GET['csvlabel']), "", true, true);
    exit;
}
if (isset($_GET['csv'])) {
    outputdatacsv(intval($_GET['csv']), "", false, true);
    exit;
}
if (isset($_GET['banding'])) {
    export_banding(intval($_GET['banding']));
    exit;
}
if (isset($_GET['pspp'])) {
    export_pspp(intval($_GET['pspp']), true);
    exit;
}
xhtml_head(T_("Output unverified data"), true, array("../css/table.css"));
$sql = "SELECT description,\r\n\t\tCONCAT('<a href=\"?data=', qid, '\">" . T_("Data") . "</a>') as data,\r\n\t\tCONCAT('<a href=\"?ddi=', qid, '\">" . T_("DDI") . "</a>') as ddi,\r\n\t\tCONCAT('<a href=\"?csv=', qid, '\">" . T_("CSV") . "</a>') as csv,\r\n\t\tCONCAT('<a href=\"?csvlabel=', qid, '\">" . T_("CSV Labelled") . "</a>') as csvlabel,\r\n\t\tCONCAT('<a href=\"?pspp=', qid, '\">" . T_("PSPP (SPSS)") . "</a>') as pspp,\r\n\t\tCONCAT('<a href=\"?banding=', qid, '\">" . T_("Banding XML") . "</a>') as banding\r\n\tFROM questionnaires\r\n\tORDER BY qid DESC";
$qs = $db->GetAll($sql);
print "<h2>" . T_("Warning: the data downloaded from here is unverified") . "</h2>";
xhtml_table($qs, array('description', 'data', 'ddi', 'csv', 'csvlabel', 'pspp', 'banding'), array(T_("Questionnaire"), T_("Data"), T_("DDI"), T_("CSV"), T_("CSV Labelled"), T_("PSPP (SPSS)"), T_("Banding XML")));
xhtml_foot();
Exemplo n.º 2
0
    exit;
}
if (isset($_GET['data'])) {
    outputdata(intval($_GET['data']));
    exit;
}
if (isset($_GET['csvlabel'])) {
    outputdatacsv(intval($_GET['csvlabel']), "", true);
    exit;
}
if (isset($_GET['csv'])) {
    outputdatacsv(intval($_GET['csv']));
    exit;
}
if (isset($_GET['csvmerged'])) {
    outputdatacsv(intval($_GET['csvmerged']), "", false, false, false, true);
    exit;
}
if (isset($_GET['banding'])) {
    export_banding(intval($_GET['banding']));
    exit;
}
if (isset($_GET['pspp'])) {
    export_pspp(intval($_GET['pspp']));
    exit;
}
xhtml_head(T_("Output data"), true, array("../css/table.css"));
$sql = "SELECT description,\n\t\tCONCAT('<a href=\"?data=', qid, '\">" . T_("Data") . "</a>') as data,\n\t\tCONCAT('<a href=\"?ddi=', qid, '\">" . T_("DDI") . "</a>') as ddi,\n\t\tCONCAT('<a href=\"?csv=', qid, '\">" . T_("CSV") . "</a>') as csv,\n\t\tCONCAT('<a href=\"?csvmerged=', qid, '\">" . T_("CSV Merged") . "</a>') as csvmerged,\n\t\tCONCAT('<a href=\"?csvlabel=', qid, '\">" . T_("CSV Labelled") . "</a>') as csvlabel,\n\t\tCONCAT('<a href=\"?pspp=', qid, '\">" . T_("PSPP (SPSS)") . "</a>') as pspp,\n\t\tCONCAT('<a href=\"?banding=', qid, '\">" . T_("Banding XML") . "</a>') as banding\n\tFROM questionnaires\n\tORDER BY qid ASC";
$qs = $db->GetAll($sql);
xhtml_table($qs, array('description', 'data', 'ddi', 'csv', 'csvmerged', 'csvlabel', 'pspp', 'banding'), array(T_("Questionnaire"), T_("Data"), T_("DDI"), T_("CSV"), T_("CSV Merged"), T_("CSV Labelled"), T_("PSPP (SPSS)"), T_("Banding XML")));
xhtml_foot();
Exemplo n.º 3
0
    exit;
}
if (isset($_GET['csv'])) {
    export_csv(intval($_GET['csv']));
    exit;
}
if (isset($_GET['csvl'])) {
    export_csv(intval($_GET['csvl']), true, true);
    exit;
}
if (isset($_GET['pspp'])) {
    export_pspp(intval($_GET['pspp']));
    exit;
}
if (isset($_GET['psppn'])) {
    export_pspp(intval($_GET['psppn']), false);
    exit;
}
xhtml_head(T_("Export Data"), true, array("../css/table.css"), array("../js/display.js"));
$data_id = 0;
if (isset($_GET['data_id'])) {
    $data_id = intval($_GET['data_id']);
}
//Select a data file to export data from
$sql = "SELECT data_id as value,description, CASE WHEN data_id = '{$data_id}' THEN 'selected=\\'selected\\'' ELSE '' END AS selected\r\n\tFROM data";
print "<div>" . T_("Select data file: ");
display_chooser($db->GetAll($sql), 'data_id', 'data_id');
print "</div>";
if ($data_id != 0) {
    //List download links for fixed width and data file
    print "<p><a href='?data_id={$data_id}&amp;data={$data_id}'>" . T_("Export fixed width data file") . "</a></p>";