/usr/www/mdg/public/donations/cronjob.php: line 2: syntax error near unexpected token `"connectionfile.php"'
/usr/www/mdg/public/donations/cronjob.php: line 2: `include("connectionfile.php");'
cronjob.php:
Code: Select all
<?php
include("connectionfile.php");
include("config.php");
$auth = $_GET['p'];
if($auth == "test"){
$q = $dbc->prepare("SELECT * FROM users WHERE used = ? AND expiration != ?");
$query = $q->execute(array(
1,
0
));
$arr = $q->fetchAll();
foreach($arr as $row){
$newExp = $row['expiration'] - 1;
$qT = $dbc->prepare("UPDATE users SET expiration = ?");
$queryT = $qT->execute(array(
$newExp
));
if($queryT){
echo "The user with the SteamID of ".$row['steamid']." has expired another day<br>";
}
}
}else{
echo "Authorization failed!";
}
?>