Auswertung Handy
This commit is contained in:
parent
4bb21bf23c
commit
5d8b00feba
@ -97,7 +97,12 @@ if ($action == '') {
|
||||
FROM jumi_umfragen_ergebnisse
|
||||
WHERE uaid = $row2[uaid]");
|
||||
$row_cur_antw = $result_cur_antw->fetch_array();
|
||||
|
||||
if($row_anz_antworten['Anz'] != '0'){
|
||||
$prozent = 100/$row_anz_antworten['Anz']*$row_cur_antw['Anz'];
|
||||
}else{
|
||||
$prozent = 0;
|
||||
}
|
||||
|
||||
$inner1[$ln2]['prozent'] = $prozent;
|
||||
$inner1[$ln2]['uaid'] = $row2['uaid'];
|
||||
@ -105,16 +110,35 @@ if ($action == '') {
|
||||
$value2 = $inner1;
|
||||
$ln2++;
|
||||
}
|
||||
if($row_anz_userfrage['Anz'] != 0){
|
||||
$anz_userfrage = $row_anz_userfrage['Anz'];
|
||||
}else{
|
||||
$anz_userfrage = 0;
|
||||
}
|
||||
$row['inner'] = $value2;
|
||||
$row['anz_userfrage'] = $row_anz_userfrage['Anz'];
|
||||
$row['anz_userfrage'] = $anz_userfrage;
|
||||
$row['anz_antworten_frage'] = $row_anz_antworten['Anz'];
|
||||
$table_data[] = $row;
|
||||
}
|
||||
$smarty->assign('table_data', $table_data);
|
||||
|
||||
echo"<pre>";
|
||||
print_r($table_data);
|
||||
echo"</pre>";
|
||||
# echo"<pre>";
|
||||
# print_r($table_data);
|
||||
# echo"</pre>";
|
||||
|
||||
|
||||
$query3 = "SELECT freitext
|
||||
FROM jumi_umfragen_erg_freitext
|
||||
WHERE umid = $row_umid[umid]
|
||||
ORDER BY uefid desc";
|
||||
$result3 = $db->query($query3);
|
||||
|
||||
|
||||
// Ergebnisse lesen und an den Client ausgeben
|
||||
while ($row3 = $result3->fetch_array()) {
|
||||
$table_data3[] = $row3;
|
||||
}
|
||||
$smarty->assign('table_data3', $table_data3);
|
||||
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>Auswertung</title>
|
||||
<!-- https://www.budde-mediendesign.de/blog/programmierung/das-bootstrap-4-grid-system-->
|
||||
<link href="../bootstrap/node_modules/bootstrap/dist/css/bootstrap.ali.css" rel="stylesheet">
|
||||
<link href="../bootstrap/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!--
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
|
||||
-->
|
||||
@ -17,62 +17,100 @@
|
||||
.headline {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
|
||||
}
|
||||
.container2 {
|
||||
width: 80%;
|
||||
}
|
||||
.progress {
|
||||
height: 28px;
|
||||
}
|
||||
.progress-bar {
|
||||
background-color: #0BA7AD;
|
||||
font-size: 16px;
|
||||
line-height: 28px;
|
||||
}
|
||||
span {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
color: #002C6C;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="grid">
|
||||
<div class="headline col-12 bg-white">
|
||||
<h2><p class="text-center">{$result_headline}</p></h2>
|
||||
<h2>
|
||||
<p class="text-center">{$result_headline}</p>
|
||||
</h2>
|
||||
<p class="text-center small">({$result_datum_von} bis {$result_datum_bis})</p>
|
||||
</div>
|
||||
<div class="col-12 ">
|
||||
<table class="table table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Vollständige Teilnehmer</th>
|
||||
<td>{$result_anz_fertige}</td>
|
||||
<tr>
|
||||
<th scope="row">Teilweise beantwortet</th>
|
||||
<td>{$result_anz_angefangen}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="question col-12 ">
|
||||
{section name=table_data loop=$table_data}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" colspan="2">
|
||||
{$table_data[table_data].frage}
|
||||
{if $table_data[table_data].multiple == '1'}
|
||||
<br>
|
||||
<p class="small">(Multiple Choice Frage)</p>
|
||||
{/if}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{section name=inner loop=$table_data[table_data].inner}
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<div class="progress" style="height: 20px;">
|
||||
<div class="progress-bar" role="progressbar" style="width: {$table_data[table_data].inner[inner].prozent}%;" aria-valuenow="{$table_data[table_data].inner[inner].prozent}" aria-valuemin="0.1" aria-valuemax="100"></div>
|
||||
{$table_data[table_data].inner[inner].antwort} ({$table_data[table_data].inner[inner].prozent}%)
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
{/section}
|
||||
</table>
|
||||
{/section}
|
||||
</div>
|
||||
<table class="table table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Vollständige Teilnehmer</th>
|
||||
<td>{$result_anz_fertige}</td>
|
||||
<tr>
|
||||
<th scope="row">Teilweise beantwortet</th>
|
||||
<td>{$result_anz_angefangen}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
{section name=table_data loop=$table_data}
|
||||
<p class="text-primary">{$table_data[table_data].frage} ({$table_data[table_data].anz_userfrage} Personen)</p>
|
||||
{if $table_data[table_data].multiple == '1'}
|
||||
<p class="small">(Multiple Choice Frage)</p>
|
||||
{/if}
|
||||
{section name=inner loop=$table_data[table_data].inner}
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<label>
|
||||
<p class="small">{$table_data[table_data].inner[inner].antwort}</p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="{$table_data[table_data].inner[inner].prozent}" aria-valuemin="0" aria-valuemax="100" style="width: {$table_data[table_data].inner[inner].prozent}%;"><span>{$table_data[table_data].inner[inner].prozent}%</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/section}
|
||||
<br>
|
||||
{/section}
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="grid">
|
||||
|
||||
<div class="col-12 ">
|
||||
<table class="table table-striped">
|
||||
{section name=table_data3 loop=$table_data3}
|
||||
{if $smarty.section.table_data3.rownum == 1}
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><p class="text-primary">Bemerkungen</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{/if}
|
||||
<tr>
|
||||
<td>{$table_data3[table_data3].freitext}</td>
|
||||
</tr>
|
||||
{/section}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
{/if}
|
||||
{/if}
|
||||
|
@ -1,18 +1,18 @@
|
||||
<?php
|
||||
/* Smarty version 3.1.39, created on 2023-03-19 19:58:42
|
||||
/* Smarty version 3.1.39, created on 2023-03-20 19:12:36
|
||||
from 'F:\git\survey\templates\modern\survey\index.html' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '3.1.39',
|
||||
'unifunc' => 'content_64175b626c3dc2_11111328',
|
||||
'unifunc' => 'content_6418a21400dc07_76008401',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'2b06f8f36ebdb45c10ebd7bf157223e300660449' =>
|
||||
array (
|
||||
0 => 'F:\\git\\survey\\templates\\modern\\survey\\index.html',
|
||||
1 => 1679252315,
|
||||
1 => 1679332471,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
@ -20,7 +20,7 @@ if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
array (
|
||||
),
|
||||
),false)) {
|
||||
function content_64175b626c3dc2_11111328 (Smarty_Internal_Template $_smarty_tpl) {
|
||||
function content_6418a21400dc07_76008401 (Smarty_Internal_Template $_smarty_tpl) {
|
||||
if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
@ -58,7 +58,14 @@ if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
|
||||
</h4>
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php if ($_smarty_tpl->tpl_vars['umfrage_anzeigen']->value == '1') {?>
|
||||
<?php if ($_smarty_tpl->tpl_vars['umfrage_ende']->value == '1') {?>
|
||||
<div class="col-12 ">
|
||||
<h4>
|
||||
<p class="text-center">Vielen Dank für Deine Abstimmung!</p>
|
||||
</h4>
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php if ($_smarty_tpl->tpl_vars['umfrage_anzeigen']->value == '1' && $_smarty_tpl->tpl_vars['umfrage_ende']->value == 0) {?>
|
||||
<input type="hidden" name="umid" value="<?php echo $_smarty_tpl->tpl_vars['umfrage_umid']->value;?>
|
||||
">
|
||||
<?php echo '<script'; ?>
|
||||
|
@ -0,0 +1,181 @@
|
||||
<?php
|
||||
/* Smarty version 3.1.39, created on 2023-03-20 19:31:32
|
||||
from 'F:\git\survey\templates\modern\admin\result_latest.html' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '3.1.39',
|
||||
'unifunc' => 'content_6418a684be5836_46614688',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'ac93cbaf5f60a3d3489e5f0b05d04c66ce346410' =>
|
||||
array (
|
||||
0 => 'F:\\git\\survey\\templates\\modern\\admin\\result_latest.html',
|
||||
1 => 1679337091,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
),
|
||||
),false)) {
|
||||
function content_6418a684be5836_46614688 (Smarty_Internal_Template $_smarty_tpl) {
|
||||
if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>Auswertung</title>
|
||||
<!-- https://www.budde-mediendesign.de/blog/programmierung/das-bootstrap-4-grid-system-->
|
||||
<link href="../bootstrap/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!--
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
|
||||
-->
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color : #FFF;
|
||||
}
|
||||
.headline {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.container2 {
|
||||
width: 80%;
|
||||
}
|
||||
.progress {
|
||||
height: 28px;
|
||||
}
|
||||
.progress-bar {
|
||||
background-color: #0BA7AD;
|
||||
font-size: 16px;
|
||||
line-height: 28px;
|
||||
}
|
||||
span {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
color: #002C6C;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="grid">
|
||||
<div class="headline col-12 bg-white">
|
||||
<h2>
|
||||
<p class="text-center"><?php echo $_smarty_tpl->tpl_vars['result_headline']->value;?>
|
||||
</p>
|
||||
</h2>
|
||||
<p class="text-center small">(<?php echo $_smarty_tpl->tpl_vars['result_datum_von']->value;?>
|
||||
bis <?php echo $_smarty_tpl->tpl_vars['result_datum_bis']->value;?>
|
||||
)</p>
|
||||
</div>
|
||||
<div class="col-12 ">
|
||||
<table class="table table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Vollständige Teilnehmer</th>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['result_anz_fertige']->value;?>
|
||||
</td>
|
||||
<tr>
|
||||
<th scope="row">Teilweise beantwortet</th>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['result_anz_angefangen']->value;?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<?php
|
||||
$__section_table_data_0_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['table_data']->value) ? count($_loop) : max(0, (int) $_loop));
|
||||
$__section_table_data_0_total = $__section_table_data_0_loop;
|
||||
$_smarty_tpl->tpl_vars['__smarty_section_table_data'] = new Smarty_Variable(array());
|
||||
if ($__section_table_data_0_total !== 0) {
|
||||
for ($__section_table_data_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] = 0; $__section_table_data_0_iteration <= $__section_table_data_0_total; $__section_table_data_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']++){
|
||||
?>
|
||||
<p class="text-primary"><?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['frage'];?>
|
||||
(<?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['anz_userfrage'];?>
|
||||
Personen)</p>
|
||||
<?php if ($_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['multiple'] == '1') {?>
|
||||
<p class="small">(Multiple Choice Frage)</p>
|
||||
<?php }?>
|
||||
<?php
|
||||
$__section_inner_1_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['inner']) ? count($_loop) : max(0, (int) $_loop));
|
||||
$__section_inner_1_total = $__section_inner_1_loop;
|
||||
$_smarty_tpl->tpl_vars['__smarty_section_inner'] = new Smarty_Variable(array());
|
||||
if ($__section_inner_1_total !== 0) {
|
||||
for ($__section_inner_1_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_inner']->value['index'] = 0; $__section_inner_1_iteration <= $__section_inner_1_total; $__section_inner_1_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_inner']->value['index']++){
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<label>
|
||||
<p class="small"><?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['inner'][(isset($_smarty_tpl->tpl_vars['__smarty_section_inner']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_inner']->value['index'] : null)]['antwort'];?>
|
||||
</p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['inner'][(isset($_smarty_tpl->tpl_vars['__smarty_section_inner']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_inner']->value['index'] : null)]['prozent'];?>
|
||||
" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['inner'][(isset($_smarty_tpl->tpl_vars['__smarty_section_inner']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_inner']->value['index'] : null)]['prozent'];?>
|
||||
%;"><span><?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['inner'][(isset($_smarty_tpl->tpl_vars['__smarty_section_inner']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_inner']->value['index'] : null)]['prozent'];?>
|
||||
%</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="grid">
|
||||
|
||||
<div class="col-12 ">
|
||||
<table class="table table-striped">
|
||||
<?php
|
||||
$__section_table_data3_2_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['table_data3']->value) ? count($_loop) : max(0, (int) $_loop));
|
||||
$__section_table_data3_2_total = $__section_table_data3_2_loop;
|
||||
$_smarty_tpl->tpl_vars['__smarty_section_table_data3'] = new Smarty_Variable(array());
|
||||
if ($__section_table_data3_2_total !== 0) {
|
||||
for ($__section_table_data3_2_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_table_data3']->value['index'] = 0; $__section_table_data3_2_iteration <= $__section_table_data3_2_total; $__section_table_data3_2_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_table_data3']->value['index']++){
|
||||
$_smarty_tpl->tpl_vars['__smarty_section_table_data3']->value['rownum'] = $__section_table_data3_2_iteration;
|
||||
?>
|
||||
<?php if ((isset($_smarty_tpl->tpl_vars['__smarty_section_table_data3']->value['rownum']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data3']->value['rownum'] : null) == 1) {?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><p class="text-primary">Bemerkungen</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php }?>
|
||||
<tr>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['table_data3']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data3']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data3']->value['index'] : null)]['freitext'];?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<?php }
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user