Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MediaDBViewerAPI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BA_SI-Projekt
MediaDBViewerAPI
Commits
4751da5a
Commit
4751da5a
authored
Jan 15, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
c70ec71d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
api.class.php
api.class.php
+10
-1
No files found.
api.class.php
View file @
4751da5a
...
@@ -10,6 +10,7 @@ class MediaDBViewerAPI{
...
@@ -10,6 +10,7 @@ class MediaDBViewerAPI{
private
$DB_Username
;
private
$DB_Username
;
private
$DB_Passwort
;
private
$DB_Passwort
;
private
$DB_Database
;
private
$DB_Database
;
private
$Statistik
=
array
(
"QueryCounter"
=>
0
);
public
$DB_Objekt
;
public
$DB_Objekt
;
function
APIinit
(
$KEY
)
{
function
APIinit
(
$KEY
)
{
...
@@ -211,6 +212,10 @@ class MediaDBViewerAPI{
...
@@ -211,6 +212,10 @@ class MediaDBViewerAPI{
private
function
DebugOut
(
$Output
){
private
function
DebugOut
(
$Output
){
echo
(
strpos
(
$_SERVER
[
"HTTP_USER_AGENT"
],
"Android"
)
==
0
?
$Output
.
"
\r\n
"
:
""
);
echo
(
strpos
(
$_SERVER
[
"HTTP_USER_AGENT"
],
"Android"
)
==
0
?
$Output
.
"
\r\n
"
:
""
);
}
}
private
function
Query
(
$Query
){
$this
->
Statistik
[
"QueryCounter"
]
++
;
return
$this
->
DB_Objekt
->
query
(
$Query
);
}
/*
/*
* Funktion nur ändern, Um Markus zu ärgern ;-)
* Funktion nur ändern, Um Markus zu ärgern ;-)
*/
*/
...
@@ -218,7 +223,11 @@ class MediaDBViewerAPI{
...
@@ -218,7 +223,11 @@ class MediaDBViewerAPI{
return
array
(
"API_VERSION"
=>
API_VERSION
,
return
array
(
"API_VERSION"
=>
API_VERSION
,
"API_KEY"
=>
$this
->
API_KEY
,
"API_KEY"
=>
$this
->
API_KEY
,
"API_Laufzeit"
=>
$Laufzeit
,
"API_Laufzeit"
=>
$Laufzeit
,
"Antwort"
=>
$respons
);
"Antwort"
=>
$respons
,
(
strpos
(
$_SERVER
[
"HTTP_USER_AGENT"
],
"Android"
)
==
0
?
array
(
"Statistik"
=>
$Statistik
)
:
null
)
);
//"Statistik" => $Statistik
//TODO Statistikausgabe hinzufügen
}
}
public
function
error
(
$ErrID
,
$Description
=
""
){
public
function
error
(
$ErrID
,
$Description
=
""
){
switch
(
$ErrID
)
{
switch
(
$ErrID
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment