Initial commit
This commit is contained in:
18
job_user_inaktiv.php
Normal file
18
job_user_inaktiv.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
require("config/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
||||
# http://www.cronjob.de/
|
||||
# netblack...de
|
||||
# 76.....
|
||||
$db = dbconnect();
|
||||
$result_abs = $db->query("SELECT a.user, b.vaid
|
||||
FROM vw_last_logins a, admin b
|
||||
WHERE a.user=b.user
|
||||
AND DATE_SUB(NOW(), INTERVAL 12 Month) > Datum
|
||||
AND DATE_SUB(NOW(), INTERVAL 30 DAY) > mail_inaktiv
|
||||
AND mail_inaktiv != '0000-00-00 00:00:00'
|
||||
AND b.inaktiv!='J'");
|
||||
|
||||
while ($row = $result_abs->fetch_array()){
|
||||
$sql = $db->query("UPDATE admin SET inaktiv='J' WHERE vaid='$row[vaid]'");
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user