forked from science-ation/science-ation
- Judge autocomplete function, there's no menu link to it. This should work
for timmins and fraser valley
This commit is contained in:
parent
3b55ddd4a7
commit
1d3ee3f83e
22
admin/fix_judges_autocomplete.php
Normal file
22
admin/fix_judges_autocomplete.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?
|
||||||
|
|
||||||
|
require_once("../common.inc.php");
|
||||||
|
require_once("../user.inc.php");
|
||||||
|
|
||||||
|
user_auth_required('committee', 'admin');
|
||||||
|
|
||||||
|
$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();
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user