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
c30bbd7b
Commit
c30bbd7b
authored
4 years ago
by
Eric Laufer
Browse files
Options
Downloads
Patches
Plain Diff
Bug
#39
Bug
#39
parent
56c7da00
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
adminforce/lib/class/betreiber.class.php
+27
-19
27 additions, 19 deletions
adminforce/lib/class/betreiber.class.php
lib/var.php
+1
-1
1 addition, 1 deletion
lib/var.php
with
28 additions
and
20 deletions
adminforce/lib/class/betreiber.class.php
+
27
−
19
View file @
c30bbd7b
...
...
@@ -4,6 +4,7 @@ class betreiber{
private
$db
;
private
$error
=
0
;
private
$meldung
;
private
$post
=
array
();
public
function
__construct
(){
global
$datenbank
;
...
...
@@ -20,36 +21,42 @@ class betreiber{
public
function
post_pruef
(){
global
$_POST
;
if
(
empty
(
$_POST
[
'name'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_NAME_FALSE
;}
if
(
empty
(
$_POST
[
'betreiber_id'
])
OR
!
is_numeric
(
$_POST
[
'betreiber_id'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_BID_FALSE
;}
if
(
empty
(
$_POST
[
'betreiber_passwort'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_BPW_FALSE
;}
if
(
empty
(
$_POST
[
'schnittstelle'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_DATEI
;}
if
(
empty
(
$_POST
[
'einzahltext'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_EINZAHLTEXT
;}
if
(
empty
(
$_POST
[
'auszahltext'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_AUSZAHLTEXT
;}
if
(
$_POST
[
'anfragen_tag'
]
!=
0
AND
(
empty
(
$_POST
[
'anfragen_tag'
])
OR
!
is_numeric
(
$_POST
[
'anfragen_tag'
]))
){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_ANFRAGEN_TAG
;}
if
(
$_POST
[
'anfragen_user'
]
!=
0
AND
(
empty
(
$_POST
[
'anfragen_user'
])
OR
!
is_numeric
(
$_POST
[
'anfragen_user'
]))
){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_ANFRAGEN_USER
;}
if
(
empty
(
$_POST
[
'waehrung_name'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_WNAME
;}
if
(
empty
(
$_POST
[
'punktewert'
])
OR
!
is_numeric
(
$_POST
[
'punktewert'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_PUNKTEWERT
;}
if
(
empty
(
$_POST
[
'wertepunkt'
])
OR
!
is_numeric
(
$_POST
[
'wertepunkt'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_WERTPUNKTE
;}
if
(
isset
(
$_POST
[
'aktiv'
])
||
$_POST
[
'aktiv'
]
==
'on'
){
$_POST
[
'aktiv'
]
=
1
;}
else
{
$_POST
[
'aktiv'
]
=
0
;}
if
(
isset
(
$_POST
[
'aktiv_ein'
])
||
$_POST
[
'aktiv_ein'
]
==
'on'
){
$_POST
[
'aktiv_ein'
]
=
1
;}
else
{
$_POST
[
'aktiv_ein'
]
=
0
;}
if
(
isset
(
$_POST
[
'aktiv_aus'
])
||
$_POST
[
'aktiv_aus'
]
==
'on'
){
$_POST
[
'aktiv_aus'
]
=
1
;}
else
{
$_POST
[
'aktiv_aus'
]
=
0
;}
if
(
empty
(
$this
->
post
[
'name'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_NAME_FALSE
;}
if
(
empty
(
$this
->
post
[
'betreiber_id'
])
OR
!
is_numeric
(
$this
->
post
[
'betreiber_id'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_BID_FALSE
;}
if
(
empty
(
$this
->
post
[
'betreiber_passwort'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_BPW_FALSE
;}
if
(
empty
(
$this
->
post
[
'schnittstelle'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_DATEI
;}
if
(
empty
(
$this
->
post
[
'einzahltext'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_EINZAHLTEXT
;}
if
(
empty
(
$this
->
post
[
'auszahltext'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_AUSZAHLTEXT
;}
if
(
$this
->
post
[
'anfragen_tag'
]
!=
0
AND
(
empty
(
$this
->
post
[
'anfragen_tag'
])
OR
!
is_numeric
(
$this
->
post
[
'anfragen_tag'
]))
){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_ANFRAGEN_TAG
;}
if
(
$this
->
post
[
'anfragen_user'
]
!=
0
AND
(
empty
(
$this
->
post
[
'anfragen_user'
])
OR
!
is_numeric
(
$this
->
post
[
'anfragen_user'
]))
){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_ANFRAGEN_USER
;}
if
(
empty
(
$this
->
post
[
'waehrung_name'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_WNAME
;}
if
(
empty
(
$this
->
post
[
'punktewert'
])
OR
!
is_numeric
(
$this
->
post
[
'punktewert'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_PUNKTEWERT
;}
if
(
empty
(
$this
->
post
[
'wertepunkt'
])
OR
!
is_numeric
(
$this
->
post
[
'wertepunkt'
])){
$this
->
error
=
1
;
$this
->
meldung
.
=
POST_PRUEF_BETREIBERDATEN_WERTPUNKTE
;}
if
(
isset
(
$this
->
post
[
'aktiv'
])){
if
(
$this
->
post
[
'aktiv'
]
==
'on'
){
$this
->
post
[
'aktiv'
]
=
1
;}
else
{
$this
->
post
[
'aktiv'
]
=
0
;}
}
if
(
isset
(
$this
->
post
[
'aktiv_ein'
])){
if
(
$this
->
post
[
'aktiv_ein'
]
==
'on'
){
$this
->
post
[
'aktiv_ein'
]
=
1
;}
else
{
$this
->
post
[
'aktiv_ein'
]
=
0
;}
}
if
(
isset
(
$this
->
post
[
'aktiv_aus'
])){
if
(
$this
->
post
[
'aktiv_aus'
]
==
'on'
){
$this
->
post
[
'aktiv_aus'
]
=
1
;}
else
{
$this
->
post
[
'aktiv_aus'
]
=
0
;}
}
}
public
function
post_array
(
$daten
){
foreach
(
$daten
as
$key
=>
$value
)
{
if
(
$key
!=
''
AND
$key
!=
'run'
){
$
array
[
$key
]
=
$this
->
db
->
escape
(
$value
);
if
(
$key
!=
''
AND
$key
!=
'run'
&&
$value
!=
''
){
$
this
->
post
[
$this
->
db
->
escape
(
$key
)
]
=
$this
->
db
->
escape
(
$value
);
}
}
return
$array
;
}
public
function
hinzufuegen
(){
global
$_POST
;
$this
->
post_array
(
$_POST
);
$this
->
post_pruef
();
if
(
$this
->
error
==
0
){
$insert
=
$this
->
db
->
insert
(
PREFIX
.
SCHNITT
,
$this
->
post
_array
(
$_POST
)
);
$insert
=
$this
->
db
->
insert
(
PREFIX
.
SCHNITT
,
$this
->
post
);
if
(
$insert
==
true
){
$this
->
meldung
=
BETREIBERDATEN_SAVE_TRUE
;
}
else
{
...
...
@@ -63,8 +70,9 @@ class betreiber{
public
function
updaten
(){
global
$_POST
;
$this
->
post_array
(
$_POST
);
$this
->
post_pruef
();
$update
=
$this
->
db
->
update
(
PREFIX
.
SCHNITT
,
$this
->
post
_array
(
$_POST
)
,
array
(
"schnittstelle"
=>
$this
->
db
->
escape
(
$_POST
[
'schnittstelle'
])
)
,
1
);
$update
=
$this
->
db
->
update
(
PREFIX
.
SCHNITT
,
$this
->
post
,
array
(
"schnittstelle"
=>
$this
->
db
->
escape
(
$_POST
[
'schnittstelle'
])
)
,
1
);
if
(
$update
==
true
){
$this
->
meldung
=
BETREIBERDATEN_SAVE_TRUE
;
}
else
{
...
...
This diff is collapsed.
Click to expand it.
lib/var.php
+
1
−
1
View file @
c30bbd7b
...
...
@@ -32,7 +32,7 @@ if(!isset($_POST['passwort_2'])) { $_POST['passwort_2'] = "";}
if
(
!
isset
(
$_POST
[
'bdate'
]))
{
$_POST
[
'badate'
]
=
""
;}
if
(
!
isset
(
$_POST
[
'agb'
]))
{
$_POST
[
'agb'
]
=
""
;}
if
(
!
isset
(
$_POST
[
'data'
]))
{
$_POST
[
'data'
]
=
""
;}
if
(
!
isset
(
$_POST
[
'newsletter'
]))
{
$_POST
[
'newsletter'
]
=
"
1
"
;}
if
(
!
isset
(
$_POST
[
'newsletter'
]))
{
$_POST
[
'newsletter'
]
=
""
;}
if
(
!
isset
(
$error
))
{
$error
=
""
;}
if
(
!
isset
(
$anmeldeok
))
{
$anmeldeok
=
""
;}
if
(
!
isset
(
$ak
))
{
$ak
=
""
;}
...
...
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