mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Will skip welcome screen for question by question
This commit is contained in:
@@ -71,7 +71,7 @@ if ($surveyexists <1)
|
|||||||
if (!isset($_SESSION['step']) || !$_SESSION['step'])
|
if (!isset($_SESSION['step']) || !$_SESSION['step'])
|
||||||
{
|
{
|
||||||
$totalquestions = buildsurveysession();
|
$totalquestions = buildsurveysession();
|
||||||
sendcacheheaders();
|
/* sendcacheheaders();
|
||||||
doHeader();
|
doHeader();
|
||||||
|
|
||||||
echo templatereplace(file_get_contents("$thistpl/startpage.pstpl"));
|
echo templatereplace(file_get_contents("$thistpl/startpage.pstpl"));
|
||||||
@@ -96,7 +96,8 @@ if (!isset($_SESSION['step']) || !$_SESSION['step'])
|
|||||||
echo "\n</form>\n";
|
echo "\n</form>\n";
|
||||||
echo templatereplace(file_get_contents("$thistpl/endpage.pstpl"));
|
echo templatereplace(file_get_contents("$thistpl/endpage.pstpl"));
|
||||||
doFooter();
|
doFooter();
|
||||||
exit;
|
exit;*/
|
||||||
|
$_SESSION['step'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//******************************************************************************************************
|
//******************************************************************************************************
|
||||||
|
|||||||
@@ -267,6 +267,7 @@ function savedcontrol()
|
|||||||
"startlanguage"=>GetBaseLanguageFromSurveyID($surveyid),
|
"startlanguage"=>GetBaseLanguageFromSurveyID($surveyid),
|
||||||
"refurl"=>getenv("HTTP_REFERER"),
|
"refurl"=>getenv("HTTP_REFERER"),
|
||||||
"token"=>$_POST['token']);
|
"token"=>$_POST['token']);
|
||||||
|
|
||||||
//One of the strengths of ADOdb's AutoExecute() is that only valid field names for $table are updated
|
//One of the strengths of ADOdb's AutoExecute() is that only valid field names for $table are updated
|
||||||
if ($connect->AutoExecute($thissurvey['tablename'], $sdata,'INSERT')) // Checked
|
if ($connect->AutoExecute($thissurvey['tablename'], $sdata,'INSERT')) // Checked
|
||||||
{
|
{
|
||||||
@@ -409,6 +410,9 @@ function createinsertquery()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (isset($_POST['token']) && in_array('token',$colnames))
|
||||||
|
$values[array_search('token',$colnames)] = $_POST['token'];
|
||||||
|
|
||||||
// INSERT NEW ROW
|
// INSERT NEW ROW
|
||||||
$query = "INSERT INTO ".db_quote_id($thissurvey['tablename'])."\n"
|
$query = "INSERT INTO ".db_quote_id($thissurvey['tablename'])."\n"
|
||||||
."(".implode(', ', array_map('db_quote_id',$colnames));
|
."(".implode(', ', array_map('db_quote_id',$colnames));
|
||||||
@@ -430,7 +434,7 @@ function createinsertquery()
|
|||||||
{
|
{
|
||||||
$query .= ",".db_quote_id('submitdate');
|
$query .= ",".db_quote_id('submitdate');
|
||||||
}
|
}
|
||||||
if (isset($_POST['token']))
|
if (isset($_POST['token']) && !in_array('token',$colnames))
|
||||||
$query .= ",".db_quote_id('token');
|
$query .= ",".db_quote_id('token');
|
||||||
$query .=") ";
|
$query .=") ";
|
||||||
$query .="VALUES (".implode(", ", $values);
|
$query .="VALUES (".implode(", ", $values);
|
||||||
@@ -453,7 +457,7 @@ function createinsertquery()
|
|||||||
// is if a ALL-IN-ONE survey, we don't set the submit date before the data is validated
|
// is if a ALL-IN-ONE survey, we don't set the submit date before the data is validated
|
||||||
$query .= ", ".$connect->DBDate($mysubmitdate);
|
$query .= ", ".$connect->DBDate($mysubmitdate);
|
||||||
}
|
}
|
||||||
if (isset($_POST['token']))
|
if (isset($_POST['token']) && !in_array('token',$colnames))
|
||||||
$query .= ",'".$_POST['token']."'";
|
$query .= ",'".$_POST['token']."'";
|
||||||
$query .=")";
|
$query .=")";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user