This repository has been archived by the owner on Jun 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added cron job execution, Fixed unload on recaptcha interact
Signed-off-by: Scrumplex <[email protected]>
- Loading branch information
Showing
3 changed files
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
<?php | ||
require_once __DIR__ . "/mysql.inc.php"; | ||
|
||
$conn = getMYSQL(); | ||
function runJob() { | ||
$conn = getMYSQL(); | ||
|
||
//Clear ip log | ||
$now = time(); | ||
$twoWeeksAgo = $now - (60 * 60 * 24 * 14); // 60s * 60min * 24h * 14d | ||
//Clear ip log | ||
$now = time(); | ||
$twoWeeksAgo = $now - (60 * 60 * 24 * 14); // 60s * 60min * 24h * 14d | ||
|
||
$ps = $conn->prepare("DELETE FROM `iplog` WHERE `DATE` < (?)"); | ||
$ps->bind_param("i", $twoWeeksAgo); | ||
$ps->execute(); | ||
$ps = $conn->prepare("DELETE FROM `iplog` WHERE `DATE` < (?)"); | ||
$ps->bind_param("i", $twoWeeksAgo); | ||
$ps->execute(); | ||
|
||
//Clear archived passwords | ||
$ps = $conn->prepare("DELETE FROM `passwords` WHERE `ARCHIVED` = 1 AND `ARCHIVED_DATE` < (?)"); | ||
$ps->bind_param("i", $twoWeeksAgo); | ||
$ps->execute(); | ||
//Clear archived passwords | ||
$ps = $conn->prepare("DELETE FROM `passwords` WHERE `ARCHIVED` = 1 AND `ARCHIVED_DATE` < (?)"); | ||
$ps->bind_param("i", $twoWeeksAgo); | ||
$ps->execute(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters