diff --git a/admin/result_latest.php b/admin/result_latest.php index b818325..f939a42 100644 --- a/admin/result_latest.php +++ b/admin/result_latest.php @@ -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"
";
-    print_r($table_data);
-    echo"
"; +# echo"
";
+#    print_r($table_data);
+#    echo"
"; + + + $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); } diff --git a/templates/modern/admin/result_latest.html b/templates/modern/admin/result_latest.html index f4c6923..2ded57e 100644 --- a/templates/modern/admin/result_latest.html +++ b/templates/modern/admin/result_latest.html @@ -6,7 +6,7 @@ Auswertung - + @@ -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; +}
-

{$result_headline}

+

+

{$result_headline}

+

({$result_datum_von} bis {$result_datum_bis})

- - - - - - - - - - -
Vollständige Teilnehmer{$result_anz_fertige}
Teilweise beantwortet{$result_anz_angefangen}
-
- {section name=table_data loop=$table_data} - - - - - - - {section name=inner loop=$table_data[table_data].inner} - - - - - - {/section} -
- {$table_data[table_data].frage} - {if $table_data[table_data].multiple == '1'} -
-

(Multiple Choice Frage)

- {/if} -
-
-
- {$table_data[table_data].inner[inner].antwort} ({$table_data[table_data].inner[inner].prozent}%) -
-
- {/section} -
+ + + + + + + + + + +
Vollständige Teilnehmer{$result_anz_fertige}
Teilweise beantwortet{$result_anz_angefangen}
+
+ {section name=table_data loop=$table_data} +

{$table_data[table_data].frage} ({$table_data[table_data].anz_userfrage} Personen)

+ {if $table_data[table_data].multiple == '1'} +

(Multiple Choice Frage)

+ {/if} + {section name=inner loop=$table_data[table_data].inner} +
+
+ +
+
+
+
{$table_data[table_data].inner[inner].prozent}%
+
+
+
+ {/section} +
+ {/section} +
+
+
+ +
+ + {section name=table_data3 loop=$table_data3} + {if $smarty.section.table_data3.rownum == 1} + + + + + + + {/if} + + + + {/section} + +

Bemerkungen

{$table_data3[table_data3].freitext}
+
+
+
+ - -{/if} \ No newline at end of file +{/if} diff --git a/templates_c/2b06f8f36ebdb45c10ebd7bf157223e300660449_0.file.index.html.php b/templates_c/2b06f8f36ebdb45c10ebd7bf157223e300660449_0.file.index.html.php index fbc9194..d1f5739 100644 --- a/templates_c/2b06f8f36ebdb45c10ebd7bf157223e300660449_0.file.index.html.php +++ b/templates_c/2b06f8f36ebdb45c10ebd7bf157223e300660449_0.file.index.html.php @@ -1,18 +1,18 @@ _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 == '') {?> @@ -58,7 +58,14 @@ if ($_smarty_tpl->tpl_vars['action']->value == '') {?> - tpl_vars['umfrage_anzeigen']->value == '1') {?> + tpl_vars['umfrage_ende']->value == '1') {?> +
+

+

Vielen Dank für Deine Abstimmung!

+

+
+ + tpl_vars['umfrage_anzeigen']->value == '1' && $_smarty_tpl->tpl_vars['umfrage_ende']->value == 0) {?> diff --git a/templates_c/ac93cbaf5f60a3d3489e5f0b05d04c66ce346410_0.file.result_latest.html.php b/templates_c/ac93cbaf5f60a3d3489e5f0b05d04c66ce346410_0.file.result_latest.html.php new file mode 100644 index 0000000..a715adf --- /dev/null +++ b/templates_c/ac93cbaf5f60a3d3489e5f0b05d04c66ce346410_0.file.result_latest.html.php @@ -0,0 +1,181 @@ +_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 == '') {?> + + + + + + Auswertung + + + + + + +
+
+
+

+

tpl_vars['result_headline']->value;?> +

+

+

(tpl_vars['result_datum_von']->value;?> + bis tpl_vars['result_datum_bis']->value;?> +)

+
+
+ + + + + + + + + + +
Vollständige Teilnehmertpl_vars['result_anz_fertige']->value;?> +
Teilweise beantwortettpl_vars['result_anz_angefangen']->value;?> +
+
+
+
+
+ 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']++){ +?> +

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'];?> + (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)

+ 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') {?> +

(Multiple Choice Frage)

+ + 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']++){ +?> +
+
+ +
+
+
+
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'];?> +%
+
+
+
+ +
+ +
+
+
+ +
+ + 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; +?> + tpl_vars['__smarty_section_table_data3']->value['rownum']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data3']->value['rownum'] : null) == 1) {?> + + + + + + + + + + + + +

Bemerkungen

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'];?> +
+
+
+
+ + + +