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
22c47b64
Commit
22c47b64
authored
Feb 29, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init für JSON Rechte Datei
parent
82f23b32
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
api.class.php
api.class.php
+1
-0
index.php
webapp/index.php
+24
-0
No files found.
api.class.php
View file @
22c47b64
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
define
(
API_KEY_LEN
,
10
);
define
(
API_KEY_LEN
,
10
);
define
(
API_VERSION
,
0.05
);
define
(
API_VERSION
,
0.05
);
define
(
API_KEY_DB
,
"/var/www/mediadb.ivaya.de/Key.sqlite"
);
define
(
API_KEY_DB
,
"/var/www/mediadb.ivaya.de/Key.sqlite"
);
define
(
API_Rights
,
"/var/www/mediadb.ivaya.de/Rights.json"
);
if
(
!
isset
(
$_GET
[
'Pretty'
]))
{
if
(
!
isset
(
$_GET
[
'Pretty'
]))
{
error_reporting
(
0
);
error_reporting
(
0
);
...
...
webapp/index.php
View file @
22c47b64
...
@@ -43,6 +43,7 @@ if((isset($_SESSION['api-key']) OR (isset($_COOKIE['api-key']) AND isset($_COOKI
...
@@ -43,6 +43,7 @@ if((isset($_SESSION['api-key']) OR (isset($_COOKIE['api-key']) AND isset($_COOKI
if
(
!
$API
->
APIinit
(
$_SESSION
[
'api-key'
]))
{
header
(
'location: /'
);
}
if
(
!
$API
->
APIinit
(
$_SESSION
[
'api-key'
]))
{
header
(
'location: /'
);
}
}
}
}
else
{
header
(
'location: /'
);}
}
else
{
header
(
'location: /'
);}
$StatistikArray
=
$API
->
API_GetStatistic
(
array
(
"Statistik"
=>
"DBstatistik"
));
$StatistikArray
=
$API
->
API_GetStatistic
(
array
(
"Statistik"
=>
"DBstatistik"
));
/// Ausgabe der Einzelnen Webseiten...
/// Ausgabe der Einzelnen Webseiten...
...
@@ -96,7 +97,30 @@ if($_GET["action"] == "filme"){
...
@@ -96,7 +97,30 @@ if($_GET["action"] == "filme"){
</script>
</script>
<script type="text/javascript" src="js/jquery.flexisel.js"></script></div>'
;
<script type="text/javascript" src="js/jquery.flexisel.js"></script></div>'
;
}
else
if
(
$_GET
[
"action"
]
==
"rechte"
){
if
(
!
file_exists
(
API_Rights
)){
// defaultdatei anlegen...
echo
"Erzeuge Default Rechtedatei <br>"
.
PHP_EOL
;
$rights
=
array
(
1
=>
array
(
"from"
=>
0
,
"to"
=>
100
,
"SpaltenFil"
=>
array
(),
"SpaltenEpi"
=>
array
(),
"StatiViews"
=>
array
(),
"webapp"
=>
true
,
"Update"
=>
true
,
"DebugO"
=>
true
)
);
file_put_contents
(
API_Rights
,
json_encode
(
$rights
));
}
if
(
!
file_exists
(
API_Rights
)){
$Data
=
json_decode
(
file_get_contents
(
API_Rights
));
var_dump
(
$Data
);
}
}
else
if
(
$_GET
[
"action"
]
==
"vergleich"
){
}
else
if
(
$_GET
[
"action"
]
==
"vergleich"
){
$titel
=
"Vergleich von 2 DB"
;
$titel
=
"Vergleich von 2 DB"
;
$MovieArray
=
jsonCacheDecoder
(
"http://mediadb.ddns.net/api.php?key=ee3aTi5soo&action=GetDataList&Tabelle=Filme&Spalten=imdbID,3d,name,md5,added,size,resolution,rating&3d=0&Sortierung=added%20DESC"
);
$MovieArray
=
jsonCacheDecoder
(
"http://mediadb.ddns.net/api.php?key=ee3aTi5soo&action=GetDataList&Tabelle=Filme&Spalten=imdbID,3d,name,md5,added,size,resolution,rating&3d=0&Sortierung=added%20DESC"
);
$movies
=
""
;
$movies
=
""
;
...
...
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