2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Merging the Limesurvey 1.91+ branch of queXS in to the trunk

This commit is contained in:
azammitdcarf
2011-09-08 01:58:41 +00:00
parent dfa55a3b9e
commit eaa9578ab8
2312 changed files with 811461 additions and 597534 deletions

View File

@@ -1,17 +1,17 @@
<?php
/*
* LimeSurvey
* Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz
* All rights reserved.
* License: GNU/GPL License v2 or later, see LICENSE.php
* LimeSurvey is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*
* $Id: listcolumn.php 7212 2009-07-03 07:32:05Z c_schmitz $
*/
* LimeSurvey
* Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz
* All rights reserved.
* License: GNU/GPL License v2 or later, see LICENSE.php
* LimeSurvey is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*
* $Id: listcolumn.php 10925 2011-09-02 14:12:02Z c_schmitz $
*/
include_once("login_check.php");
@@ -25,56 +25,56 @@ if (!isset($sql)) {$sql=returnglobal('sql');}
if (!$surveyid)
{
//NOSID
exit;
//NOSID
exit;
}
if (!$column)
{
//NOCOLUMN
exit;
//NOCOLUMN
exit;
}
if ($connect->databaseType == 'odbc_mssql' || $connect->databaseType == 'odbtp' || $connect->databaseType == 'mssql_n')
{ $query = "SELECT id, ".db_quote_id($column)." FROM {$dbprefix}survey_$surveyid WHERE (".db_quote_id($column)." NOT LIKE '')"; }
if ($connect->databaseType == 'odbc_mssql' || $connect->databaseType == 'odbtp' || $connect->databaseType == 'mssql_n' || $connect->databaseType == 'mssqlnative')
{ $query = "SELECT id, ".db_quote_id($column)." FROM {$dbprefix}survey_$surveyid WHERE (".db_quote_id($column)." NOT LIKE '')"; }
else
{ $query = "SELECT id, ".db_quote_id($column)." FROM {$dbprefix}survey_$surveyid WHERE (".db_quote_id($column)." != '')"; }
{ $query = "SELECT id, ".db_quote_id($column)." FROM {$dbprefix}survey_$surveyid WHERE (".db_quote_id($column)." != '')"; }
if ($sql && $sql != "NULL")
{
$query .= " AND ".auto_unescape(urldecode($sql));
$query .= " AND ".auto_unescape(urldecode($sql));
}
switch (incompleteAnsFilterstate()) {
case 'inc':
//Inclomplete answers only
$query .= ' AND submitdate is null ';
break;
case 'filter':
//Inclomplete answers only
$query .= ' AND submitdate is not null ';
break;
}
case 'inc':
//Inclomplete answers only
$query .= ' AND submitdate is null ';
break;
case 'filter':
//Inclomplete answers only
$query .= ' AND submitdate is not null ';
break;
}
if ($order == "alpha")
{
$query .= " ORDER BY ".db_quote_id($column);
$query .= " ORDER BY ".db_quote_id($column);
}
$result=db_execute_assoc($query) or safe_die("Error with query: ".$query."<br />".$connect->ErrorMsg());
$listcolumnoutput= "<table width='98%' class='statisticstable' border='1' cellpadding='2' cellspacing='0'>\n";
$listcolumnoutput.= "<thead><tr><th><input type='image' src='$imagefiles/downarrow.png' align='middle' onclick=\"window.open('admin.php?action=listcolumn&amp;sid=$surveyid&amp;column=$column&amp;order=id', '_self')\" /></th>\n";
$listcolumnoutput.= "<th valign='top'><input type='image' align='right' src='$imagefiles/close.gif' onclick='window.close()' />";
if ($connect->databaseType != 'odbc_mssql' && $connect->databaseType != 'odbtp' && $connect->databaseType != 'mssql_n')
{ $listcolumnoutput.= "<input type='image' src='$imagefiles/downarrow.png' align='left' onclick=\"window.open('admin.php?action=listcolumn&amp;sid=$surveyid&amp;column=$column&amp;order=alpha', '_self')\" />"; }
$listcolumnoutput.= "<thead><tr><th><input type='image' src='$imageurl/downarrow.png' align='middle' onclick=\"window.open('admin.php?action=listcolumn&amp;sid=$surveyid&amp;column=$column&amp;order=id', '_self')\" /></th>\n";
$listcolumnoutput.= "<th valign='top'><input type='image' align='right' src='$imageurl/close.gif' onclick='window.close()' />";
if ($connect->databaseType != 'odbc_mssql' && $connect->databaseType != 'odbtp' && $connect->databaseType != 'mssql_n' || $connect->databaseType == 'mssqlnative')
{ $listcolumnoutput.= "<input type='image' src='$imageurl/downarrow.png' align='left' onclick=\"window.open('admin.php?action=listcolumn&amp;sid=$surveyid&amp;column=$column&amp;order=alpha', '_self')\" />"; }
$listcolumnoutput.= "</th></tr>\n";
while ($row=$result->FetchRow())
{
$listcolumnoutput.= "<tr><td valign='top' align='center' >"
. "<a href='$scriptname?action=browse&amp;sid=$surveyid&amp;subaction=id&amp;id=".$row['id']."' target='home'>"
. $row['id']."</a></td>"
. "<td valign='top'>".htmlspecialchars($row[$column])."</td></tr>\n";
$listcolumnoutput.= "<tr><td valign='top' align='center' >"
. "<a href='$scriptname?action=browse&amp;sid=$surveyid&amp;subaction=id&amp;id=".$row['id']."' target='home'>"
. $row['id']."</a></td>"
. "<td valign='top'>".htmlspecialchars($row[$column])."</td></tr>\n";
}
$listcolumnoutput.= "</table>\n";
?>