Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MediaDBPythonScripte
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
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
MediaDBPythonScripte
Commits
2966f912
Commit
2966f912
authored
Jan 25, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
366f157e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
9 deletions
+42
-9
media.class.php
media.class.php
+32
-3
media.php
media.php
+10
-6
No files found.
media.class.php
View file @
2966f912
<?php
<?php
class
Media
{
class
Media
{
private
$Console
;
private
$configfile
;
private
$config
;
public
function
__construct
(
$configfile
)
{
$this
->
Console
=
new
Console
();
$this
->
configfile
=
$configfile
;
if
(
file_exists
(
$configfile
)){
echo
$this
->
Console
->
getColoredString
(
"Hinweis:"
,
"black"
,
"light_gray"
)
.
" Configfile: "
.
$configfile
.
" geladen!"
;
}
else
{
echo
$this
->
Console
->
getColoredString
(
"Hinweis:"
,
"black"
,
"light_gray"
)
.
" Configfile: "
.
$configfile
.
" exisitiert nicht! Es werden defaults geladen!"
;
echo
" Zum Anlegen der config bitte config save eingeben!"
;
$this
->
config
=
array
(
"configChangeTime"
=>
time
(),
"HDD"
=>
array
(
1
=>
array
(
"HDDdir"
=>
"/media/QNAP/"
,
"FolderFilme"
=>
"Filme/"
,
"Folder3D"
=>
"Filme3D/"
),
2
=>
NULL
,
3
=>
NULL
,
4
=>
NULL
,
5
=>
NULL
)
);
function
__construct
()
{
;
}
}
}
public
function
config_save
(){
}
}
}
\ No newline at end of file
media.php
View file @
2966f912
...
@@ -4,7 +4,9 @@ include './media.class.php';
...
@@ -4,7 +4,9 @@ include './media.class.php';
$Console
=
new
Console
();
$Console
=
new
Console
();
$Media
=
new
Media
();
$Console
->
clearscreen
();
$Media
=
new
Media
(
"config.json"
);
...
@@ -15,13 +17,15 @@ $exit = false;
...
@@ -15,13 +17,15 @@ $exit = false;
do
{
do
{
$Console
->
clearscreen
();
echo
$Console
->
getColoredString
(
"Benutzung:"
,
"black"
,
"light_gray"
)
.
PHP_EOL
.
PHP_EOL
;
echo
$Console
->
getColoredString
(
"Benutzung:"
,
"black"
,
"light_gray"
)
.
PHP_EOL
.
PHP_EOL
;
echo
" filme Filme aus einen Verzeichnis zur DB hinzufügen"
.
PHP_EOL
;
echo
" filme Filme aus einen Verzeichnis zur DB hinzufügen"
.
PHP_EOL
;
echo
" config save Speichert die Konfiguration!"
.
PHP_EOL
;
echo
" exit beendet das Programm"
.
PHP_EOL
.
PHP_EOL
;
echo
" exit beendet das Programm"
.
PHP_EOL
.
PHP_EOL
;
echo
"Bitte Befehl eingeben: "
;
echo
"Bitte Befehl eingeben: "
;
$name
=
trim
(
fgets
(
STDIN
));
$name
=
trim
(
fgets
(
STDIN
));
$Console
->
clearscreen
();
//echo "Hallo $name \n";
//echo "Hallo $name \n";
switch
(
$name
){
switch
(
$name
){
case
"exit"
:
case
"exit"
:
...
@@ -34,8 +38,8 @@ do{
...
@@ -34,8 +38,8 @@ do{
break
;
break
;
}
}
echo
"Weiter mit (ENTER)"
.
PHP_EOL
;
//
echo "Weiter mit (ENTER)".PHP_EOL;
trim
(
fgets
(
STDIN
));
//
trim(fgets(STDIN));
}
while
(
!
$exit
);
}
while
(
!
$exit
);
...
...
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