diff --git a/survey/config.php b/survey/config.php
new file mode 100644
index 0000000..05d41da
--- /dev/null
+++ b/survey/config.php
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/survey/index.php b/survey/index.php
index da35f10..41b8512 100644
--- a/survey/index.php
+++ b/survey/index.php
@@ -34,7 +34,7 @@ if(isset($_POST['save'])){
WHERE ufid = $frage;");
$row_multiple = $result_multiple->fetch_array();
if($row_multiple['multiple'] == '0'){
- echo "Antwort: $_POST[antwort]
";
+# echo "Antwort: $_POST[antwort]
";
}
if($row_multiple['multiple'] == '1'){
$query = "SELECT uaid
@@ -45,7 +45,7 @@ if(isset($_POST['save'])){
while ($row = $result->fetch_array()){
$antwort = $_POST['antwort_'.$row['uaid']];
if($antwort != ''){
- echo "Antwort: $antwort
";
+# echo "Antwort: $antwort
";
}
}
}
@@ -55,10 +55,31 @@ if(isset($_POST['save'])){
+ $rowperpage = 1;
+ $row1234 = 0;
+
+ // Previous Button
+ if(isset($_POST['but_prev'])){
+ $row1234 = $_POST['row'];
+ $row1234 -= $rowperpage;
+ if( $row1234 < 0 ){
+ $row1234 = 0;
+ }
+ }
+
+ // Next Button
+ if(isset($_POST['but_next'])){
+ $row1234 = $_POST['row'];
+ $allcount = $_POST['allcount'];
+
+ $val = $row1234 + $rowperpage;
+ if( $val < $allcount ){
+ $row1234 = $val;
+ }
+ }
-
-
+$smarty->assign('pagination_row', $row1234);
@@ -80,22 +101,18 @@ if(isset($_POST['save'])){
WHERE umid = $umid;");
$row = $result->fetch_array();
$smarty->assign('umfrage_progress', $row['progress']);
- $total = $row['total'];
+ $allcount = $row['total'];
+ $smarty->assign('pagination_allcount', $allcount);
#$show = ceil($total/$limit); //Seitenzahlen aufrunden
if(isset($_POST['start'])){
-echo "hier|$total|$limit|$start";
+#echo "hier|$total|$limit|$start";
$start = ($_POST['start'] >= $total) ? $total - $limit : $start;
}else{
$start = 0;
}
-echo"
-
-$start
-
-";
#echo "$row[Anz_limit]
";
@@ -104,7 +121,7 @@ $query = "SELECT ufid, frage, multiple
FROM jumi_umfragen_fragen
WHERE umid = 1
ORDER BY ufid ASC
- LIMIT ".$start.",1";
+ LIMIT ".$row1234.",1";
$result = $db->query( $query);
// Ergebnisse lesen und an den Client ausgeben
@@ -141,6 +158,7 @@ $smarty->assign('table_data', $table_data);
// Zurück- und Vorblättern
if ($start > 0){
$newStart = ($start - $limit < 0) ? 0 : ($start-$limit); // wenn $start-$limit kleiner 0 dann $newstart=0 sonst $start-$limit
+echo "
1: ".$newStart;
$smarty->assign('umfrage_start0', "1");
$smarty->assign('umfrage_start_newstart', "$newStart");
}else{
@@ -150,6 +168,7 @@ $smarty->assign('table_data', $table_data);
if ($start + $limit < $total){
$newStart = $start + $limit;
+echo "
2: ".$newStart;
$smarty->assign('umfrage_end0', "1");
$smarty->assign('umfrage_end_newstart', "$newStart");
$smarty->assign('umfrage_end_last', "$last");
diff --git a/survey/style.css b/survey/style.css
new file mode 100644
index 0000000..acfa9e4
--- /dev/null
+++ b/survey/style.css
@@ -0,0 +1,54 @@
+.container{
+ border:1px solid darkgrey;
+ border-radius:3px;
+ padding:5px;
+ width: 60%;
+ margin: 0 auto;
+}
+
+/* Table */
+#emp_table {
+ border:3px solid lavender;
+ border-radius:3px;
+}
+
+/* Table header */
+.tr_header{
+ background-color:dodgerblue;
+}
+.tr_header th{
+ color:white;
+ padding:10px 0px;
+ letter-spacing: 1px;
+}
+
+/* Table rows and columns */
+#emp_table td{
+ padding:10px;
+}
+#emp_table tr:nth-child(even){
+ background-color:lavender;
+ color:black;
+}
+
+/* */
+#div_pagination{
+ width:100%;
+ margin-top:5px;
+ text-align:center;
+}
+
+.button{
+ border-radius:3px;
+ border:0px;
+ background-color:mediumpurple;
+ color:white;
+ padding:10px 20px;
+ letter-spacing: 1px;
+}
+
+.divnum_rows{
+ display: inline-block;
+ text-align: right;
+ width: 30%;
+}
\ No newline at end of file
diff --git a/survey/sw.php b/survey/sw.php
new file mode 100644
index 0000000..9a2061c
--- /dev/null
+++ b/survey/sw.php
@@ -0,0 +1,85 @@
+";
+
+if(isset($_GET['start'])){
+ $start = $_GET['start'];
+}
+unset($_GET['start']);
+$limit = 1; // Fragen pro Seite
+$total = 8;
+$last = floor($total/$limit)*$limit; //Sprungziel zur letzten Seite BSP abrunden(1954/13)*13 ==> 150*13=1950 Sprungmarke auf Zeile 1950, 4 DS werden angezeigt
+echo "$start
";
+ $akt = round((($start-$limit)/$limit+2),0);
+
+
+
+ // Zurück- und Vorblättern
+if ($start > 0){
+ $newStart = ($start - $limit < 0) ? 0 : ($start-$limit); // wenn $start-$limit kleiner 0 dann $newstart=0 sonst $start-$limit
+
+ $umfrage_start0 = 1;
+ $umfrage_start_newstart = $newStart;
+ }else{
+ $umfrage_start0 = 2;
+ }
+
+
+ if ($start + $limit < $total){
+ $newStart = $start + $limit;
+
+ $umfrage_end0 = 1;
+ $umfrage_end_newstart = $newStart;
+ $umfrage_end_last = $last;
+ }else{
+ $umfrage_end0=2;
+ }
+
+ echo "";
+
+}
+
+?>
\ No newline at end of file
diff --git a/survey/test.php b/survey/test.php
new file mode 100644
index 0000000..4901aa3
--- /dev/null
+++ b/survey/test.php
@@ -0,0 +1,12 @@
+";
+
+$mode = next($transport); // $mode = 'bike';
+echo $mode."
";
+
+$mode = prev($transport); // $mode = 'bike';
+echo $mode."
";
+
+?>
diff --git a/survey/test2.php b/survey/test2.php
new file mode 100644
index 0000000..7c9b1e0
--- /dev/null
+++ b/survey/test2.php
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/modern/survey/index.html b/templates/modern/survey/index.html
index 7fe844f..6387953 100644
--- a/templates/modern/survey/index.html
+++ b/templates/modern/survey/index.html
@@ -119,31 +119,39 @@
-
+
+ {$umfrage_start_newstart}
{/if}
{if $umfrage_start0 == '2'}
Zurück
{/if}
{if $umfrage_end0 == '1'}
-
+ {$umfrage_end_newstart}
{/if}
{if $umfrage_end0 == '2'}
-
+ {$umfrage_end_newstart}
{/if}
+-->
+
{/section}
diff --git a/templates_c/2b06f8f36ebdb45c10ebd7bf157223e300660449_0.file.index.html.php b/templates_c/2b06f8f36ebdb45c10ebd7bf157223e300660449_0.file.index.html.php
new file mode 100644
index 0000000..45b2404
--- /dev/null
+++ b/templates_c/2b06f8f36ebdb45c10ebd7bf157223e300660449_0.file.index.html.php
@@ -0,0 +1,248 @@
+_decodeProperties($_smarty_tpl, array (
+ 'version' => '3.1.39',
+ 'unifunc' => 'content_6415a5253b6db4_22747192',
+ 'has_nocache_code' => false,
+ 'file_dependency' =>
+ array (
+ '2b06f8f36ebdb45c10ebd7bf157223e300660449' =>
+ array (
+ 0 => 'F:\\git\\survey\\templates\\modern\\survey\\index.html',
+ 1 => 1679140131,
+ 2 => 'file',
+ ),
+ ),
+ 'includes' =>
+ array (
+ ),
+),false)) {
+function content_6415a5253b6db4_22747192 (Smarty_Internal_Template $_smarty_tpl) {
+?>
+
+
+
+
+ Umfrage
+
+
+
+
+
+
+
+
+
+
+
+
+
+
tpl_vars['umfrage_headline']->value;?>
+
+
+
+
+
+
+
+
+ src="../jquery/jquery-3.4.1.min.js">
+>
+
+ src="../bootstrap/node_modules/@popperjs/core/dist/umd/popper.min.js">
+>
+
+ src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js">
+>
+
+
+