2008-02-22 06:19:22 +00:00
|
|
|
<?
|
|
|
|
|
|
|
|
require_once("../common.inc.php");
|
|
|
|
require_once("../user.inc.php");
|
|
|
|
|
2010-07-13 03:30:17 +00:00
|
|
|
user_auth_required('admin');
|
2008-02-22 06:19:22 +00:00
|
|
|
|
|
|
|
$q = mysql_query("SELECT * FROM judges WHERE passwordexpiry IS NULL");
|
|
|
|
while($i = mysql_fetch_object($q)) {
|
|
|
|
echo "Autocompleting Judge {$i->email}<br />";
|
|
|
|
$id = $i->id;
|
|
|
|
|
|
|
|
$p = generatePassword(12);
|
|
|
|
mysql_query("UPDATE judges SET password='$p',complete='yes'");
|
|
|
|
echo mysql_error();
|
|
|
|
mysql_query("DELETE FROM judges_years WHERE judges_id='$id'");
|
|
|
|
echo mysql_error();
|
|
|
|
mysql_query("INSERT INTO judges_years (`judges_id`,`year`) VALUES ('$id','{$config['FAIRYEAR']}')");
|
|
|
|
echo mysql_error();
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|