Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Philipp
phplib_mystic
Commits
e13580f0
Commit
e13580f0
authored
Apr 05, 2017
by
Philipp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added "days" parameter
parent
1e70d9c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
newfiles.php
newfiles.php
+8
-3
No files found.
newfiles.php
View file @
e13580f0
...
...
@@ -2,13 +2,18 @@
<?php
include
(
'mystic_library.php'
);
if
(
isset
(
$argv
[
1
]
)
)
{
$header
=
iconv
(
'cp437'
,
'utf-8'
,
file_get_contents
(
$argv
[
1
]
)
);
if
(
isset
(
$argv
[
2
]
)
)
{
$header
=
iconv
(
'cp437'
,
'utf-8'
,
file_get_contents
(
$argv
[
2
]
)
);
$header
=
str_replace
(
'@DATE@'
,
date
(
'Y-m-d'
),
$header
);
}
else
{
$header
=
"Last Update: "
.
date
(
'Y-m-d'
)
.
"
\n\n
"
;
}
echo
$header
;
if
(
isset
(
$argv
[
1
]
)
)
{
$days
=
intval
(
$argv
[
1
]
);
}
else
{
$days
=
1
;
}
$bases
=
true
;
$count
=
0
;
while
(
$bases
!=
false
)
{
...
...
@@ -22,7 +27,7 @@
$files
=
mystic_files
(
'/opt/mystic/data/'
,
$base
[
'filename'
],
10
,
$count2
*
10
);
if
(
$files
!=
false
)
{
foreach
(
$files
as
$file
)
{
if
(
$file
[
'datetime'
]
>=
time
()
-
11
86400
)
{
if
(
$file
[
'datetime'
]
>=
time
()
-
(
86400
*
$days
)
)
{
if
(
$title
==
false
)
{
echo
"
\n\n\n
"
.
$base
[
'name'
]
.
"
\n
"
;
echo
str_repeat
(
'='
,
strlen
(
$base
[
'name'
]
)
)
.
"
\n\n
"
;
...
...
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