Addition to job schedule

Post your support requests/solutions for
ijyoung
Guru
Guru
Posts: 84
Joined: Mon Nov 15, 2004 12:17 pm
Location: Stirling, Scotland
Contact:

Addition to job schedule

Postby ijyoung » Wed Oct 29, 2008 6:01 pm


davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1810
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Postby davidgwalker » Wed Oct 29, 2008 6:47 pm


davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1810
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Postby davidgwalker » Wed Oct 29, 2008 6:50 pm


ijyoung
Guru
Guru
Posts: 84
Joined: Mon Nov 15, 2004 12:17 pm
Location: Stirling, Scotland
Contact:

Postby ijyoung » Wed Oct 29, 2008 7:32 pm


davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1810
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Postby davidgwalker » Wed Oct 29, 2008 7:48 pm


ijyoung
Guru
Guru
Posts: 84
Joined: Mon Nov 15, 2004 12:17 pm
Location: Stirling, Scotland
Contact:

Postby ijyoung » Wed Oct 29, 2008 9:27 pm


ijyoung
Guru
Guru
Posts: 84
Joined: Mon Nov 15, 2004 12:17 pm
Location: Stirling, Scotland
Contact:

Postby ijyoung » Thu Oct 30, 2008 8:04 am


ijyoung
Guru
Guru
Posts: 84
Joined: Mon Nov 15, 2004 12:17 pm
Location: Stirling, Scotland
Contact:

A solution

Postby ijyoung » Thu Oct 30, 2008 11:10 am

Following additions to the code allow the setting of the start date.

in add-modify.html
add extra input field <tr>
<td>Start Date</td><td><input class="box" name ="start" ></td>
</tr>
I have put this after the "name" input field.

In the add-modify.php we need the following:

$start=clean_input($_POST['start']);
$start = str_replace('/','-', $start);
$dat = date('Y-m-d', strtotime("$start"));
$startdate=strtotime("$dat");

This takes the date input, cleans it up replaces any slashes and converts to seconds.

The start date is then midnight of the day in question.
The time interval is set in usual manner.

So far it seems to work for both US and UK format of writing dates.

Hoep this is useful

Cheers

Ian


Return to “phpJobScheduler [forum]”

Who is online

Users browsing this forum: No registered users and 2 guests

cron