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
9942d4ca
Commit
9942d4ca
authored
Mar 02, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lastUpdate überprüfung nur wenn md5 berechnet werden soll...
parent
1dcb0b4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
media.class.php
media.class.php
+5
-4
No files found.
media.class.php
View file @
9942d4ca
...
@@ -538,12 +538,13 @@ class Media {
...
@@ -538,12 +538,13 @@ class Media {
if
(
$mysqli
->
error
!=
""
){
echo
"Mysql-Fehler: "
.
$mysqli
->
error
.
PHP_EOL
;
return
false
;}
if
(
$mysqli
->
error
!=
""
){
echo
"Mysql-Fehler: "
.
$mysqli
->
error
.
PHP_EOL
;
return
false
;}
if
(
$result
->
num_rows
==
1
){
if
(
$result
->
num_rows
==
1
){
$Film
=
$result
->
fetch_assoc
();
$Film
=
$result
->
fetch_assoc
();
if
(
strtotime
(
$Film
[
"lastUpdate"
])
>=
time
()
-
(
7
*
24
*
60
*
60
)){
echo
"Film wurde innerhalb der jetzten 7 Tage Aktualisiert!"
.
PHP_EOL
;
return
false
;
}
// Jetzt noch MD5 berechnen
// Jetzt noch MD5 berechnen
if
(
$md5
){
if
(
$md5
){
if
(
strtotime
(
$Film
[
"lastUpdate"
])
>=
time
()
-
(
30
*
24
*
60
*
60
)){
echo
"Film wurde innerhalb der jetzten 30 Tage Aktualisiert (md5 Prüfung)!"
.
PHP_EOL
;
return
false
;
}
echo
" Berechne MD5... "
;
echo
" Berechne MD5... "
;
$DataArr
[
"md5"
]
=
substr
(
shell_exec
(
'md5sum -b "'
.
$File
.
'"'
),
0
,
32
);
$DataArr
[
"md5"
]
=
substr
(
shell_exec
(
'md5sum -b "'
.
$File
.
'"'
),
0
,
32
);
file_put_contents
(
"./phpTestout/"
.
$DataArr
[
'imdbID'
]
.
".txt"
,
"md5 = "
.
$DataArr
[
"md5"
]
.
PHP_EOL
,
FILE_APPEND
);
file_put_contents
(
"./phpTestout/"
.
$DataArr
[
'imdbID'
]
.
".txt"
,
"md5 = "
.
$DataArr
[
"md5"
]
.
PHP_EOL
,
FILE_APPEND
);
...
...
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