Compare commits
6 Commits
56e9fd1d76
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ff33c0e063 | |||
| b4f05b0559 | |||
| 37831d20b1 | |||
| b4e1617e52 | |||
| 9321bf1881 | |||
| fc8bde55e8 |
5
.htaccess
Normal file
5
.htaccess
Normal file
@@ -0,0 +1,5 @@
|
||||
AuthType Basic
|
||||
AuthName "EoQ Data"
|
||||
AuthUserFile /var/www/private/.htpasswd
|
||||
require valid-user
|
||||
|
||||
4
db.php
4
db.php
@@ -120,7 +120,7 @@ $stmt = $pdo->prepare("
|
||||
if (is_numeric($val) && $val >= -3 && $val <= 100) {
|
||||
$value = (int) $val;
|
||||
} else {
|
||||
$text = substr($val, 0, 255); // enforce VARCHAR(255) limit
|
||||
$text = substr($val, 0, 1024); // enforce VARCHAR(1024) limit
|
||||
}
|
||||
|
||||
$stmt->execute([
|
||||
@@ -143,7 +143,7 @@ $stmt = $pdo->prepare("
|
||||
}
|
||||
updateResponseQ2($pdo, $value, $responseId);
|
||||
}
|
||||
if ($qid == "QID70"){
|
||||
if ($qid == "QID71"){
|
||||
if ($value === 'null' || is_null($value)) {
|
||||
$value = 0;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ if (isset($data['result']['elements']) && is_array($data['result']['elements']))
|
||||
foreach ($data['result']['elements'] as $element) {
|
||||
if (isset($element['QuestionID'])) {
|
||||
|
||||
/* if (isset($element['QuestionID']) && $element['QuestionID'] === "QID70") {
|
||||
/* if (isset($element['QuestionID']) && $element['QuestionID'] === "QID71") {
|
||||
//echo json_encode($element, JSON_PRETTY_PRINT) . PHP_EOL;
|
||||
}*/
|
||||
|
||||
@@ -105,7 +105,7 @@ if (isset($data['result']['elements']) && is_array($data['result']['elements']))
|
||||
echo "ID: $index, Display: " . $choice['Display'] . "<br>";
|
||||
}
|
||||
}
|
||||
if (isset($element['QuestionID']) && $element['QuestionID'] === "QID70") {
|
||||
if (isset($element['QuestionID']) && $element['QuestionID'] === "QID71") {
|
||||
echo "Survey: {$surveyId}, QuestionID: {$element['QuestionID']} : ";
|
||||
echo "Description: {$element['QuestionDescription']} : 0 ". PHP_EOL;
|
||||
insertOption($surveyId, 3, 0, $element['QuestionDescription'], $pdo);
|
||||
|
||||
@@ -353,7 +353,7 @@
|
||||
<hr>
|
||||
|
||||
|
||||
<h3>Great EO Strategy: <span id="Strategy_avg" class="avgs"></h3>
|
||||
<h3>Great EO Strategy: <span id="Strategy_avg" class="avgs"></span></h3>
|
||||
|
||||
|
||||
<div class="section">
|
||||
@@ -374,7 +374,7 @@
|
||||
<hr>
|
||||
|
||||
|
||||
<h3>Great EO Innovation: <span id="Innovation_avg" class="avgs"></h3>
|
||||
<h3>Great EO Innovation: <span id="Innovation_avg" class="avgs"></span></h3>
|
||||
|
||||
|
||||
<div class="section">
|
||||
@@ -397,7 +397,7 @@
|
||||
<hr>
|
||||
|
||||
|
||||
<h3>Great EO Advantage: <span id="Advantage_avg" class="avgs"></h3>
|
||||
<h3>Great EO Advantage: <span id="Advantage_avg" class="avgs"></span></h3>
|
||||
|
||||
|
||||
<div class="section">
|
||||
@@ -428,7 +428,7 @@
|
||||
<svg class="triangle no-axis no-text big-number" style="display: inline-block" xmlns="http://www.w3.org/2000/svg" id="svg_results_test" width="500" height="500"></svg>
|
||||
<hr>
|
||||
|
||||
<h3>Great EO Measurement: <span id="Measurement_avg" class="avgs"></h3>
|
||||
<h3>Great EO Measurement: <span id="Measurement_avg" class="avgs"></span></h3>
|
||||
|
||||
|
||||
<div class="section">
|
||||
@@ -450,7 +450,7 @@
|
||||
<hr>
|
||||
|
||||
|
||||
<h3>Great EO Evaluation: <span id="Evaluation_avg" class="avgs"></h3>
|
||||
<h3>Great EO Evaluation: <span id="Evaluation_avg" class="avgs"></span></h3>
|
||||
|
||||
|
||||
<div class="section">
|
||||
@@ -470,7 +470,7 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Great EO Impact: <span id="Impact_avg" class="avgs"></h3>
|
||||
<h3>Great EO Impact: <span id="Impact_avg" class="avgs"></span></h3>
|
||||
|
||||
|
||||
<div class="section">
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p>Number of completed surveys. (No data will be shown if this is less than 8) : <span id="record_no">0</span></p>
|
||||
<p>Number of completed surveys. (No data will be shown if this is number is 0) : <span id="record_no">0</span></p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
<hr>
|
||||
|
||||
|
||||
<h3>Great EO Strategy: <span id="Strategy_avg" class="avgs"></h3>
|
||||
<h3>Great EO Strategy: <span id="Strategy_avg" class="avgs"></span></h3>
|
||||
|
||||
|
||||
<div class="section">
|
||||
@@ -376,7 +376,7 @@
|
||||
<hr>
|
||||
|
||||
|
||||
<h3>Great EO Innovation: <span id="Innovation_avg" class="avgs"></h3>
|
||||
<h3>Great EO Innovation: <span id="Innovation_avg" class="avgs"></span></h3>
|
||||
|
||||
|
||||
<div class="section">
|
||||
@@ -399,7 +399,7 @@
|
||||
<hr>
|
||||
|
||||
|
||||
<h3>Great EO Advantage: <span id="Advantage_avg" class="avgs"></h3>
|
||||
<h3>Great EO Advantage: <span id="Advantage_avg" class="avgs"></span></h3>
|
||||
|
||||
|
||||
<div class="section">
|
||||
@@ -430,7 +430,7 @@
|
||||
<svg class="triangle no-axis no-text big-number" style="display: inline-block" xmlns="http://www.w3.org/2000/svg" id="svg_results_test" width="500" height="500"></svg>
|
||||
<hr>
|
||||
|
||||
<h3>Great EO Measurement: <span id="Measurement_avg" class="avgs"></h3>
|
||||
<h3>Great EO Measurement: <span id="Measurement_avg" class="avgs"></span></h3>
|
||||
|
||||
|
||||
<div class="section">
|
||||
@@ -452,7 +452,7 @@
|
||||
<hr>
|
||||
|
||||
|
||||
<h3>Great EO Evaluation: <span id="Evaluation_avg" class="avgs"></h3>
|
||||
<h3>Great EO Evaluation: <span id="Evaluation_avg" class="avgs"></span></h3>
|
||||
|
||||
|
||||
<div class="section">
|
||||
@@ -472,7 +472,7 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Great EO Impact: <span id="Impact_avg" class="avgs"></h3>
|
||||
<h3>Great EO Impact: <span id="Impact_avg" class="avgs"></span></h3>
|
||||
|
||||
|
||||
<div class="section">
|
||||
|
||||
@@ -36,7 +36,7 @@ try {
|
||||
$qidToColumn = [
|
||||
'QID68' => 'Q1',
|
||||
'QID69' => 'Q2',
|
||||
'QID70' => 'Q3'
|
||||
'QID71' => 'Q3'
|
||||
];
|
||||
|
||||
$totalUpdated = 0;
|
||||
|
||||
Reference in New Issue
Block a user