Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VMSone
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Designerscripte
VMSone
Commits
ffd30828
Commit
ffd30828
authored
4 years ago
by
Henoch Einbier
Committed by
Joel Kuder
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
new features: add and delete cronjob files in database
parent
559bd45e
1 merge request
!46
Release 3.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
adminforce/content/interfacedaten/crons.php
+74
-6
74 additions, 6 deletions
adminforce/content/interfacedaten/crons.php
with
74 additions
and
6 deletions
adminforce/content/interfacedaten/crons.php
+
74
−
6
View file @
ffd30828
<?php
head
(
"Crons (Übersicht und manuell Start)"
);
?>
<table
class=
"tabellen"
>
<tr
class=
"tabellenhead"
>
<?php
//Dateien holen
$files
=
array_slice
(
scandir
(
'../crons/'
),
2
);
head
(
"Cronjob hinzufügen"
);
//wenn formular abgeschickt cron hinzufügen
if
(
(
isset
(
$_POST
[
'cron_art'
]))
&&
(
isset
(
$_POST
[
'cron_dateiname'
]))
&&
(
isset
(
$_POST
[
'cron_bezeichnung'
]))
)
{
$sql
=
sql
::
$db
->
query
(
"INSERT INTO "
.
_VMS_
.
"_crons (`cron`, `datei`, `bezeichnung`)
VALUES ('"
.
$_POST
[
'cron_art'
]
.
"', 'crons/"
.
$_POST
[
'cron_dateiname'
]
.
"', '"
.
$_POST
[
'cron_bezeichnung'
]
.
"')"
);
echo
'Cron eingetragen!'
;
}
?>
<br>
Cron Datei bitte vorher in /crons kopieren!
<br>
<br>
<form
action=
""
method=
"post"
>
<table
class=
"table table-hover table-sm table-responsive"
>
<tr>
<td>
Cron Art:
</td>
<td>
<select
name=
"cron_art"
size=
"1"
>
<option>
ext_cron
</option>
<option>
int_forcedbanner
</option>
<option>
int_highforcedbanner
</option>
<option>
int_text
</option>
<option>
int_traffic
</option>
<option>
int_paidmail
</option>
<option>
int_htmlpaidmail
</option>
</select>
</td>
</tr>
<tr>
<td>
Cron Datei wählen:
</td>
<td><select
name=
"cron_dateiname"
size=
"1"
/>
<?php
//alle crons aus DB einlesen
$cronfiles_sql
=
sql
::
$db
->
prepare
(
"SELECT datei FROM "
.
_VMS_
.
"_crons "
);
$cronfiles_sql
->
execute
();
$cronfiles
=
$cronfiles_sql
->
fetchAll
(
PDO
::
FETCH_COLUMN
,
0
);
for
(
$x
=
0
;
$x
<
count
(
$files
);
$x
++
)
{
//wenn Datei noch nicht eingetragen dann zur Auswahl zeigen
$temp
=
'crons/'
.
$files
[
$x
];
if
(
in_array
(
$temp
,
$cronfiles
)
!=
true
)
{
echo
'<option value="'
.
$files
[
$x
]
.
'">'
.
$files
[
$x
]
.
'</option>'
.
PHP_EOL
;
}
}
echo
'</select> (zeigt nur Dateien die noch nicht in der DB sind)</td></tr>'
;
?>
<tr>
<td>
Bezeichnung
</td>
<td><input
type=
"text"
name=
"cron_bezeichnung"
size=
"60"
/></td>
</tr>
</table>
<input
class=
"btn btn-light"
type=
"submit"
value=
"Eintragen"
/>
</form>
<br><br>
<?php
foot
();
head
(
"Crons (Übersicht, manueller Start und Löschen)"
);
?>
<table
class=
"table table-hover table-sm table-responsive"
>
<tr>
<td
align=
"center"
><b>
Cron
</b></td>
<td
align=
"center"
><b>
Laufzeit
</b></td>
<td
align=
"center"
>
URL
</td>
<td
align=
"center"
>
Ausführen
</td>
<td
align=
"center"
>
Löschen
</td>
</tr>
<?php
$i
=
0
;
...
...
@@ -19,11 +83,15 @@ while ($crontabelle = $crons->fetch() ) {
</td>
<td align="center" valign="middle">
<font color="#000080">
'
.
date
(
"d.m.Y - H:i:s"
,
$crontabelle
[
'laufzeit'
])
.
'
</font>
'
.
date
(
"d.m.Y - H:i:s"
,
$crontabelle
[
'laufzeit'
])
.
'
</td>
<td align="center" valign="middle">
<a href="../cron.php?id='
.
$crontabelle
[
'id'
]
.
'&pw='
.
$system
[
'cron_pw'
]
.
'" target="_blank"><img src="images/gruen.gif" width="15" height="15" border="0" alt="Ausführen"></a>
<a href="../cron.php?id='
.
$crontabelle
[
'id'
]
.
'&pw='
.
$system
[
'cron_pw'
]
.
'" target="_blank"><button class="btn btn-light">Starten</button></a>
</td>
<td align="center" valign="middle">
<a href="../cron.php?id='
.
$crontabelle
[
'id'
]
.
'&delete=yes&pw='
.
$system
[
'cron_pw'
]
.
'" target="_blank"><button class="btn btn-light">Löschen</button></a>
</td>
</tr>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment