forked from science-ation/science-ation
63 lines
2.8 KiB
PHP
63 lines
2.8 KiB
PHP
<?
|
|
|
|
function db_update_75_pre() {}
|
|
|
|
function db_update_75_post()
|
|
{
|
|
global $config;
|
|
|
|
$q = $pdo->prepare("SELECT id FROM users WHERE types LIKE '%committee%'");
|
|
$q->execute();
|
|
|
|
$x = 0;
|
|
while ($i = $q->fetch(PDO::FETCH_OBJ)) {
|
|
$uid = $i->id;
|
|
|
|
$sid = array(9, 36, -1, -2, 17, 19, 16, 30, 26, 27,
|
|
28, -3, 21, 22, -4, -6, 29, -8, -9);
|
|
foreach ($sid as $s) {
|
|
if ($s > 0) {
|
|
$qq = $pdo->prepare("SELECT id FROM reports WHERE
|
|
system_report_id=?");
|
|
$qq->execute([$s]);
|
|
$ii = $qq->fetch(PDO::FETCH_OBJ);
|
|
$rid[$x] = $ii->id;
|
|
} else {
|
|
$rid[$x] = $s;
|
|
}
|
|
$x++;
|
|
}
|
|
|
|
/* Find all committee members */
|
|
$qq = "INSERT INTO `reports_committee` (`id`, `users_id`, `reports_id`, `category`, `comment`, `format`, `stock`) VALUES
|
|
(NULL, ?, ?, '1. Fair Day', 'Checkin Lists for the Front Desk', 'pdf', 'fullpage'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'School Access Codes and Passwords', 'pdf', 'fullpage'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Mailing Label Generator', '', ''),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Project Summary Details', 'pdf', 'fullpage'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Student emergency contact names and numbers', 'pdf', 'fullpage'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Students/Projects From Each School', 'pdf', 'fullpage'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Project Logistical Requirements (tables, electricity)', 'pdf', 'fullpage'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Project Table Labels', 'label', 'fullpage_landscape'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Student Nametags', 'label', 'nametag'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Judge Nametags', 'label', 'nametag'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Committee Member Nametags', 'label', 'nametag'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Judges List', 'pdf', 'fullpage'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Judging Teams', 'pdf', 'fullpage'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Awards each Judging Team will judge for', 'pdf', 'fullpage'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Judging Teams Project Assignments', 'pdf', 'fullpage'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Projects Judging Team Assignments', 'pdf', 'fullpage'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Project Identification Labels (for judging sheets)', 'label', '5961'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Award List for Award Ceremony Program', 'pdf', 'fullpage'),
|
|
(NULL, ?, ?, '2. Old Custom Reports', 'Winners for each award', 'pdf', 'fullpage');";
|
|
|
|
echo $qq;
|
|
echo "\n\n";
|
|
|
|
$stmt = $pdo->prepare($qq);
|
|
$stmt->execute([$uid,$rid[0],$uid,$rid[1],$uid,$rid[2],$uid,$rid[3],$uid,$rid[4],$uid,$rid[5],$uid,$rid[6],$uid,$rid[7],$uid,$rid[8],$uid,$rid[9],$uid,$rid[10],$uid,$rid[11],$uid,$rid[12],$uid,$rid[13],$uid,$rid[14],$uid,$rid[15],$uid,$rid[16],$uid,$rid[17],$uid,$rid[18]]);
|
|
|
|
}
|
|
}
|
|
|
|
?>
|