Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VMS-SUEE_2.0
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Eric Laufer
VMS-SUEE_2.0
Commits
b119f771
Commit
b119f771
authored
4 years ago
by
Eric Laufer
Browse files
Options
Downloads
Patches
Plain Diff
Update der Buchungsliste
Hinzufügen der Jquery Data Table zur besseren Übersicht in der Buchungsliste
parent
605d05ea
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
index.php
+2
-0
2 additions, 0 deletions
index.php
lib/class/buchungsliste.class.php
+29
-54
29 additions, 54 deletions
lib/class/buchungsliste.class.php
page/konto/buchungen.php
+33
-8
33 additions, 8 deletions
page/konto/buchungen.php
with
64 additions
and
62 deletions
index.php
+
2
−
0
View file @
b119f771
...
@@ -43,12 +43,14 @@ if ($datenbank->num_rows($start_reload) != 0) {
...
@@ -43,12 +43,14 @@ if ($datenbank->num_rows($start_reload) != 0) {
<meta
name=
"Description"
content=
"Verdien was Du willst"
>
<meta
name=
"Description"
content=
"Verdien was Du willst"
>
<meta
name=
"Robots"
content=
"INDEX,FOLLOW"
>
<meta
name=
"Robots"
content=
"INDEX,FOLLOW"
>
<link
href=
"css/bootstrap.min.css"
rel=
"stylesheet"
>
<link
href=
"css/bootstrap.min.css"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://cdn.datatables.net/1.10.20/css/jquery.dataTables.css"
>
<script
src=
"https://code.jquery.com/jquery-latest.js"
></script>
<script
src=
"https://code.jquery.com/jquery-latest.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity=
"sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity=
"sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin=
"anonymous"
></script>
<script
src=
"js/bootstrap.min.js"
></script>
<script
src=
"js/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
>
var
CountDownTimer
=
<?php
echo
$CountDownTime
;
?>
;
</script>
<script
type=
"text/javascript"
>
var
CountDownTimer
=
<?php
echo
$CountDownTime
;
?>
;
</script>
<script
src=
"js/countdown.js"
></script>
<script
src=
"js/countdown.js"
></script>
<script
src=
"js/sort.js"
></script>
<script
src=
"js/sort.js"
></script>
<script
type=
"text/javascript"
charset=
"utf8"
src=
"https://cdn.datatables.net/1.10.20/js/jquery.dataTables.js"
></script>
</head>
</head>
<body>
<body>
...
...
This diff is collapsed.
Click to expand it.
lib/class/buchungsliste.class.php
+
29
−
54
View file @
b119f771
<?php
<?php
class
BUCHUNGSLISTE
{
class
buchungsliste
{
private
$db
;
private
$db
;
private
$minus
=
1
;
private
$minus
=
1
;
private
$seiteAktuell
;
private
$seiteAktuell
;
...
@@ -18,64 +18,39 @@ class BUCHUNGSLISTE{
...
@@ -18,64 +18,39 @@ class BUCHUNGSLISTE{
}
}
public
function
get_results
(){
public
function
get_results
(){
$start
=
$this
->
seiteAktuell
*
MAX_EINTRAEGE
-
MAX_EINTRAEGE
;
$result
=
$this
->
db
->
get_results
(
"SELECT * FROM "
.
PREFIX
.
BUCH
.
" WHERE uid = '"
.
$this
->
session
[
'uid'
]
.
"' ORDER BY id DESC"
);
$result
=
$this
->
db
->
get_results
(
"SELECT * FROM "
.
PREFIX
.
BUCH
.
" WHERE uid = '"
.
$this
->
session
[
'uid'
]
.
"' ORDER BY id DESC LIMIT
$start
, "
.
MAX_EINTRAEGE
);
$aus
=
'
echo
'<ul class="list-group">
<table class="table" id="Buchungsliste">
<li class="list-group-item">
<thead>
<div class="row">
<tr>
<div class="col-md-3"><b></b>Buchungstag</b></div>
<th>#</th>
<div class="col-md-3"><b>Verwendungszweck</b></div>
<th>Datum</th>
<div class="col-md-3"><b>Buchungs-ID</b></div>
<th>Zeit</th>
<div class="col-md-3"><b>Buchungsmenge</b></div>
<th>Betrag</th>
</div>
<th>Verwendungszweck</th>
</li>
<th>Buchungs-ID</th>
</tr>
</thead>
<tbody>
'
;
'
;
foreach
(
$result
AS
$res
){
foreach
(
$result
AS
$res
){
echo
'
$aus
.
=
'
<
li class="list-group-item"
>
<
tr
>
<
div class="row"
>
<
td>'
.
$res
->
id
.
'</td
>
<div class="col-md-3"
>'
.
date
(
"d.m.Y"
,
$res
->
buchungszeit
)
.
'</d
iv
>
<td
>'
.
date
(
"d.m.Y"
,
$res
->
buchungszeit
)
.
'</
t
d>
<div class="col-md-3">'
.
$res
->
verwend
ungsz
weck
.
'</d
iv
>
<td>'
.
date
(
"H:i"
,
$res
->
buch
ungsz
eit
)
.
'</
t
d>
<div class="col-md-3">'
.
$res
->
buchungs_id
.
'</d
iv
>
<td>'
.
number_format
(
$res
->
buchungsmenge
,
2
,
','
,
'.'
)
.
'</
t
d>
<div class="col-md-3 text-right">'
.
number_format
(
$res
->
buchungsmenge
,
2
,
','
,
'.'
)
.
' '
.
$this
->
config
->
waehrung
.
'</d
iv
>
<td>'
.
$res
->
verwendungszweck
.
'</
t
d>
<
/div
>
<
td>'
.
$res
->
buchungs_id
.
'</td
>
</
li
>
</
tr
>
'
;
'
;
}
}
echo
'</ul>'
;
$aus
.
=
'
}
</tbody>
</table>
public
function
grunddaten
(){
'
;
$this
->
seiteAktuell
=
$this
->
minus
+
0
;
$Eintraege
=
$this
->
db
->
num_rows
(
"SELECT * FROM "
.
PREFIX
.
BUCH
.
" WHERE uid = '"
.
$this
->
session
[
'uid'
]
.
"'"
);
$this
->
SitesComplete
=
ceil
(
$Eintraege
/
MAX_EINTRAEGE
);
$this
->
extVariables
=
''
;
echo
'<center><div class="btn-group">'
.
$this
->
navigationsLeiste
(
'minus'
,
"?page=/konto/buchungen"
)
.
'</div></center>'
;
}
private
function
navigationsLeiste
(
$art
,
$link
){
$string
=
''
;
$NavCeil
=
floor
(
NAV_LEISTE
/
2
);
if
(
$this
->
seiteAktuell
>
1
){
$string
.
=
'<a class="btn btn-light" href="'
.
$link
.
'&'
.
$art
.
'=1'
.
$this
->
extVariables
.
'"><<</a> '
;
$string
.
=
'<a class="btn btn-light" href="'
.
$link
.
'&'
.
$art
.
'='
.
(
$this
->
seiteAktuell
-
1
)
.
$this
->
extVariables
.
'">
<</a> '
;
}
for
(
$x
=
$this
->
seiteAktuell
-
$NavCeil
;
$x
<=
$this
->
seiteAktuell
+
$NavCeil
;
$x
++
){
// Alle Seitenzahlen vor und nach der aktuellen Seite verlinken
if
((
$x
>
0
&&
$x
<
$this
->
seiteAktuell
)
||
(
$x
>
$this
->
seiteAktuell
&&
$x
<=
$this
->
SitesComplete
))
$string
.
=
'<a class="btn btn-light" href="'
.
$link
.
'&'
.
$art
.
'='
.
$x
.
$this
->
extVariables
.
'">'
.
$x
.
'</a> '
;
if
(
$x
==
$this
->
seiteAktuell
)
$string
.
=
'<button class="btn btn-primary" disabled="disabled">'
.
$x
.
'</button>'
;
}
if
(
$this
->
seiteAktuell
<
$this
->
SitesComplete
){
$string
.
=
'<a class="btn btn-light" href="'
.
$link
.
'&'
.
$art
.
'='
.
(
$this
->
seiteAktuell
+
1
)
.
$this
->
extVariables
.
'">>
</a> '
;
$string
.
=
'<a class="btn btn-light" href="'
.
$link
.
'&'
.
$art
.
'='
.
$this
->
SitesComplete
.
$this
->
extVariables
.
'">>>
</a> '
;
}
return
$string
;
return
$aus
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
page/konto/buchungen.php
+
33
−
8
View file @
b119f771
<?php
<?php
define
(
"MAX_EINTRAEGE"
,
"30"
);
define
(
"NAV_LEISTE"
,
"6"
);
head
(
"Buchungsliste"
);
if
(
!
isset
(
$_GET
[
'minus'
])){
$_GET
[
'minus'
]
=
''
;}
$Class
=
Classloader
(
'buchungsliste'
);
require_once
(
'lib/class/buchungsliste.class.php'
);
echo
$Class
->
get_results
();
$buchung
=
new
BUCHUNGSLISTE
;
foot
();
$buchung
->
grunddaten
();
echo
'<hr>'
;
$buchung
->
get_results
();
?>
?>
<script>
$
(
document
).
ready
(
function
()
{
$
(
'
#Buchungsliste
'
).
DataTable
({
'
paging
'
:
true
,
'
lengthChange
'
:
false
,
'
searching
'
:
true
,
'
ordering
'
:
true
,
'
info
'
:
true
,
'
autoWidth
'
:
false
,
"
language
"
:
{
"
lengthMenu
"
:
"
Display _MENU_ Einträge pro Seite
"
,
"
zeroRecords
"
:
"
Nichts gefunden Entschuldigung
"
,
"
info
"
:
"
Zeige Seite _PAGE_ von _PAGES_
"
,
"
infoEmpty
"
:
"
Keine Einträge vorhanden
"
,
"
infoFiltered
"
:
"
(filtered from _MAX_ total records)
"
,
"
paginate
"
:
{
"
first
"
:
"
erste
"
,
"
last
"
:
"
letzte
"
,
"
next
"
:
"
Weiter
"
,
"
previous
"
:
"
Zurück
"
}
},
"
order
"
:
[[
0
,
"
desc
"
]]
});
});
</script>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment