forked from science-ation/science-ation
format code
This commit is contained in:
parent
5d410a023b
commit
996c3d5a0a
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005-2008 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005-2008 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2008-2012 Youth Science Ontario <info@youthscienceontario.ca>
|
* Copyright (C) 2008-2012 Youth Science Ontario <info@youthscienceontario.ca>
|
||||||
@ -46,9 +46,14 @@ class annealer
|
|||||||
var $rate;
|
var $rate;
|
||||||
var $move_bucket_ids;
|
var $move_bucket_ids;
|
||||||
|
|
||||||
function annealer($num_buckets, $start_temp, $start_moves, $rate,
|
function annealer(
|
||||||
$cost_function_cb, $items)
|
$num_buckets,
|
||||||
{
|
$start_temp,
|
||||||
|
$start_moves,
|
||||||
|
$rate,
|
||||||
|
$cost_function_cb,
|
||||||
|
$items
|
||||||
|
) {
|
||||||
$this->num_buckets = $num_buckets;
|
$this->num_buckets = $num_buckets;
|
||||||
$this->start_temp = $start_temp;
|
$this->start_temp = $start_temp;
|
||||||
$this->start_moves = $start_moves;
|
$this->start_moves = $start_moves;
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -27,10 +28,14 @@ require ('../common.inc.php');
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
|
|
||||||
send_header('Create All Divisional Awards',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Create All Divisional Awards',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Awards Main' => 'admin/awards.php'));
|
'Awards Main' => 'admin/awards.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if (get_value_from_array($_GET, 'sponsors_id'))
|
if (get_value_from_array($_GET, 'sponsors_id'))
|
||||||
$sponsors_id = $_GET['sponsors_id'];
|
$sponsors_id = $_GET['sponsors_id'];
|
||||||
@ -72,8 +77,8 @@ if ($r->num) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$divcat = array();
|
$divcat = array();
|
||||||
foreach ($dkeys AS $d) {
|
foreach ($dkeys as $d) {
|
||||||
foreach ($ckeys AS $c) {
|
foreach ($ckeys as $c) {
|
||||||
$divcat[] = array('c' => $c, 'd' => $d);
|
$divcat[] = array('c' => $c, 'd' => $d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,7 +106,7 @@ if ($r->num) {
|
|||||||
|
|
||||||
$ord = 1;
|
$ord = 1;
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
foreach ($divcat AS $dc) {
|
foreach ($divcat as $dc) {
|
||||||
$d_id = $dc['d'];
|
$d_id = $dc['d'];
|
||||||
$c_id = $dc['c'];
|
$c_id = $dc['c'];
|
||||||
$d_division = $div[$d_id];
|
$d_division = $div[$d_id];
|
||||||
@ -129,7 +134,7 @@ if ($r->num) {
|
|||||||
$ord++;
|
$ord++;
|
||||||
|
|
||||||
echo ' ' . i18n('Prizes: ');
|
echo ' ' . i18n('Prizes: ');
|
||||||
foreach ($prizes AS $prize) {
|
foreach ($prizes as $prize) {
|
||||||
$q = $pdo->prepare("INSERT INTO award_prizes (award_awards_id,cash,scholarship,value,prize,number,`order`,excludefromac,trophystudentkeeper,trophystudentreturn,trophyschoolkeeper,trophyschoolreturn,year) VALUES (
|
$q = $pdo->prepare("INSERT INTO award_prizes (award_awards_id,cash,scholarship,value,prize,number,`order`,excludefromac,trophystudentkeeper,trophystudentreturn,trophyschoolkeeper,trophyschoolreturn,year) VALUES (
|
||||||
'$award_awards_id',
|
'$award_awards_id',
|
||||||
'{$prize['cash']}',
|
'{$prize['cash']}',
|
||||||
@ -235,7 +240,7 @@ if ($r->num) {
|
|||||||
echo '<b>' . i18n('We will create the following awards with the prizes listed above') . ':</b>';
|
echo '<b>' . i18n('We will create the following awards with the prizes listed above') . ':</b>';
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
|
||||||
foreach ($divcat AS $dc) {
|
foreach ($divcat as $dc) {
|
||||||
$d_id = $dc['d'];
|
$d_id = $dc['d'];
|
||||||
$c_id = $dc['c'];
|
$c_id = $dc['c'];
|
||||||
$d_division = $div[$d_id];
|
$d_division = $div[$d_id];
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -31,15 +32,14 @@ require_once ('awards.inc.php');
|
|||||||
$_GET['action'] = $_GET['action'] ?? '';
|
$_GET['action'] = $_GET['action'] ?? '';
|
||||||
|
|
||||||
switch ($_GET['action']) {
|
switch ($_GET['action']) {
|
||||||
case 'awardinfo_load':
|
case 'awardinfo_load':;
|
||||||
;
|
|
||||||
$id = intval(get_value_from_array($_GET, 'id'));
|
$id = intval(get_value_from_array($_GET, 'id'));
|
||||||
$q = $pdo->prepare("SELECT * FROM award_awards WHERE id='$id'");
|
$q = $pdo->prepare("SELECT * FROM award_awards WHERE id='$id'");
|
||||||
$q->execute();
|
$q->execute();
|
||||||
$ret = $q->fetch(PDO::FETCH_ASSOC);
|
$ret = $q->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
// json_encode NEEDS UTF8 DATA, but we store it in the database as ISO :(
|
// json_encode NEEDS UTF8 DATA, but we store it in the database as ISO :(
|
||||||
foreach ($ret AS $k => $v) {
|
foreach ($ret as $k => $v) {
|
||||||
$ret[$k] = iconv('ISO-8859-1', 'UTF-8', $v);
|
$ret[$k] = iconv('ISO-8859-1', 'UTF-8', $v);
|
||||||
}
|
}
|
||||||
// echo iconv("ISO-8859-1","UTF-8",json_encode($ret));
|
// echo iconv("ISO-8859-1","UTF-8",json_encode($ret));
|
||||||
@ -56,6 +56,8 @@ switch ($_GET['action']) {
|
|||||||
$id = intval($_POST['id']);
|
$id = intval($_POST['id']);
|
||||||
|
|
||||||
if ($id == -1) {
|
if ($id == -1) {
|
||||||
|
error_log("INSERT INTO award_awards (year,self_nominate,schedule_judges)
|
||||||
|
VALUES ('{$config['FAIRYEAR']}','yes','yes')");
|
||||||
$q = $pdo->prepare("INSERT INTO award_awards (year,self_nominate,schedule_judges)
|
$q = $pdo->prepare("INSERT INTO award_awards (year,self_nominate,schedule_judges)
|
||||||
VALUES ('{$config['FAIRYEAR']}','yes','yes')");
|
VALUES ('{$config['FAIRYEAR']}','yes','yes')");
|
||||||
$q->execute();
|
$q->execute();
|
||||||
@ -84,6 +86,7 @@ switch ($_GET['action']) {
|
|||||||
sponsors_id='" . intval($_POST['sponsors_id']) . "' ";
|
sponsors_id='" . intval($_POST['sponsors_id']) . "' ";
|
||||||
}
|
}
|
||||||
$q .= "WHERE id='$id'";
|
$q .= "WHERE id='$id'";
|
||||||
|
error_log($q);
|
||||||
$q = $pdo->prepare($q);
|
$q = $pdo->prepare($q);
|
||||||
$q->execute();
|
$q->execute();
|
||||||
|
|
||||||
@ -124,7 +127,7 @@ switch ($_GET['action']) {
|
|||||||
// wipe out any old award-category links
|
// wipe out any old award-category links
|
||||||
$q = $pdo->prepare("DELETE FROM award_awards_projectcategories WHERE award_awards_id='$id'");
|
$q = $pdo->prepare("DELETE FROM award_awards_projectcategories WHERE award_awards_id='$id'");
|
||||||
$q->execute();
|
$q->execute();
|
||||||
foreach ($_POST['categories'] AS $key => $cat) {
|
foreach ($_POST['categories'] as $key => $cat) {
|
||||||
$c = intval($cat);
|
$c = intval($cat);
|
||||||
$q = $pdo->prepare('INSERT INTO award_awards_projectcategories (award_awards_id, projectcategories_id, year)
|
$q = $pdo->prepare('INSERT INTO award_awards_projectcategories (award_awards_id, projectcategories_id, year)
|
||||||
VALUES (:id, :c, :year)');
|
VALUES (:id, :c, :year)');
|
||||||
@ -142,7 +145,7 @@ switch ($_GET['action']) {
|
|||||||
$q->execute();
|
$q->execute();
|
||||||
|
|
||||||
// now add the new ones
|
// now add the new ones
|
||||||
foreach ($_POST['divisions'] AS $key => $div) {
|
foreach ($_POST['divisions'] as $key => $div) {
|
||||||
$d = intval($div);
|
$d = intval($div);
|
||||||
|
|
||||||
$q = $pdo->prepare('INSERT INTO award_awards_projectdivisions (award_awards_id, projectdivisions_id, year)
|
$q = $pdo->prepare('INSERT INTO award_awards_projectdivisions (award_awards_id, projectdivisions_id, year)
|
||||||
@ -195,7 +198,7 @@ switch ($_GET['action']) {
|
|||||||
$q->execute();
|
$q->execute();
|
||||||
}
|
}
|
||||||
while ($r = $q->fetch(PDO::FETCH_ASSOC)) {
|
while ($r = $q->fetch(PDO::FETCH_ASSOC)) {
|
||||||
foreach ($r AS $k => $v) {
|
foreach ($r as $k => $v) {
|
||||||
$r[$k] = iconv('ISO-8859-1', 'UTF-8', $v);
|
$r[$k] = iconv('ISO-8859-1', 'UTF-8', $v);
|
||||||
}
|
}
|
||||||
$ret[] = $r;
|
$ret[] = $r;
|
||||||
@ -208,7 +211,7 @@ switch ($_GET['action']) {
|
|||||||
$q = $pdo->prepare("SELECT * FROM award_prizes WHERE id='$id'");
|
$q = $pdo->prepare("SELECT * FROM award_prizes WHERE id='$id'");
|
||||||
$q->execute();
|
$q->execute();
|
||||||
$ret = $q->fetch(PDO::FETCH_ASSOC);
|
$ret = $q->fetch(PDO::FETCH_ASSOC);
|
||||||
foreach ($ret AS $k => $v) {
|
foreach ($ret as $k => $v) {
|
||||||
$ret[$k] = iconv('ISO-8859-1', 'UTF-8', $v);
|
$ret[$k] = iconv('ISO-8859-1', 'UTF-8', $v);
|
||||||
}
|
}
|
||||||
echo json_encode($ret);
|
echo json_encode($ret);
|
||||||
@ -304,18 +307,25 @@ switch ($_GET['action']) {
|
|||||||
<?= i18n('Allow feeder fairs to download this award.') ?></p>
|
<?= i18n('Allow feeder fairs to download this award.') ?></p>
|
||||||
<div id="feeder_en">
|
<div id="feeder_en">
|
||||||
<table class="editor">
|
<table class="editor">
|
||||||
<tr><td><?= i18n('Unique Name') ?>:</td>
|
<tr>
|
||||||
<td><input type="text" name="identifier" value="<?= $a['external_identifier'] ?>" size="40" maxlength="128" /></td></tr>
|
<td><?= i18n('Unique Name') ?>:</td>
|
||||||
|
<td><input type="text" name="identifier" value="<?= $a['external_identifier'] ?>" size="40" maxlength="128" /></td>
|
||||||
|
</tr>
|
||||||
<? $ch = $a['external_additional_materials'] ? 'checked="checked"' : ''; ?>
|
<? $ch = $a['external_additional_materials'] ? 'checked="checked"' : ''; ?>
|
||||||
<tr><td><input type="checkbox" name="register_winners" value="1" <?= $ch ?> /></td>
|
<tr>
|
||||||
<td><?= i18n('Winners uploaded by a feeder fair should be registered as participants at this fair (both download award and upload winners should be turned on below)') ?></td></tr>
|
<td><input type="checkbox" name="register_winners" value="1" <?= $ch ?> /></td>
|
||||||
|
<td><?= i18n('Winners uploaded by a feeder fair should be registered as participants at this fair (both download award and upload winners should be turned on below)') ?></td>
|
||||||
|
</tr>
|
||||||
<? $ch = $a['external_register_winners'] ? 'checked="checked"' : ''; ?>
|
<? $ch = $a['external_register_winners'] ? 'checked="checked"' : ''; ?>
|
||||||
<tr><td><input type="checkbox" name="additional_materials" value="1" <?= $ch ?> /></td>
|
<tr>
|
||||||
<td><?= i18n('There is additional material for this award (e.g. forms, instructions). If a feeder fair assigns a winner to this award, they will be told they need to contact this fair to get the additional material.') ?></td></tr>
|
<td><input type="checkbox" name="additional_materials" value="1" <?= $ch ?> /></td>
|
||||||
|
<td><?= i18n('There is additional material for this award (e.g. forms, instructions). If a feeder fair assigns a winner to this award, they will be told they need to contact this fair to get the additional material.') ?></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p><?= i18n('Select which feeder fairs can download this award and upload winners.') ?></p>
|
<p><?= i18n('Select which feeder fairs can download this award and upload winners.') ?></p>
|
||||||
<table class="tableview">
|
<table class="tableview">
|
||||||
<tr><th><?= i18n('Fair') ?></th>
|
<tr>
|
||||||
|
<th><?= i18n('Fair') ?></th>
|
||||||
<th style="width: 5em"><?= i18n('Download Award') ?></th>
|
<th style="width: 5em"><?= i18n('Download Award') ?></th>
|
||||||
<th style="width: 5em"><?= i18n('Upload Winners') ?></th>
|
<th style="width: 5em"><?= i18n('Upload Winners') ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -347,9 +357,9 @@ switch ($_GET['action']) {
|
|||||||
|
|
||||||
/* Prepare a fair-wise list */
|
/* Prepare a fair-wise list */
|
||||||
$data = array();
|
$data = array();
|
||||||
foreach ($dl AS $fairs_id)
|
foreach ($dl as $fairs_id)
|
||||||
$data[$fairs_id]['dl'] = true;
|
$data[$fairs_id]['dl'] = true;
|
||||||
foreach ($ul AS $fairs_id)
|
foreach ($ul as $fairs_id)
|
||||||
$data[$fairs_id]['ul'] = true;
|
$data[$fairs_id]['ul'] = true;
|
||||||
|
|
||||||
/* Now save each one */
|
/* Now save each one */
|
||||||
@ -382,21 +392,23 @@ switch ($_GET['action']) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header('Awards Management',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Awards Management',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Awards Main' => 'admin/awards.php'));
|
'Awards Main' => 'admin/awards.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!--<script type="text/javascript" src="../js/jquery.tablednd_0_5.js"></script>-->
|
<!--<script type="text/javascript" src="../js/jquery.tablednd_0_5.js"></script>-->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var award_id = 0;
|
var award_id = 0;
|
||||||
var award_tab_update = new Array();
|
var award_tab_update = new Array();
|
||||||
|
|
||||||
|
|
||||||
function update_awardinfo()
|
function update_awardinfo() {
|
||||||
{
|
|
||||||
|
|
||||||
if (award_tab_update['awardinfo'] == award_id) return;
|
if (award_tab_update['awardinfo'] == award_id) return;
|
||||||
award_tab_update['awardinfo'] = award_id;
|
award_tab_update['awardinfo'] = award_id;
|
||||||
@ -459,15 +471,13 @@ function update_awardinfo()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function awardinfo_save()
|
function awardinfo_save() {
|
||||||
{
|
|
||||||
var reload = (award_id == -1) ? true : false;
|
var reload = (award_id == -1) ? true : false;
|
||||||
/* This is sneaky, we're going to make the awardinfo_save possibly emit
|
/* This is sneaky, we're going to make the awardinfo_save possibly emit
|
||||||
* javascript to set a new award_id, so it will ALWAYS be correct
|
* javascript to set a new award_id, so it will ALWAYS be correct
|
||||||
* after the .load finishes */
|
* after the .load finishes */
|
||||||
$("#debug").load("<? $_SERVER['PHP_SELF'] ?>?action=awardinfo_save", $("#awardinfo").serializeArray(),
|
$("#debug").load("<? $_SERVER['PHP_SELF'] ?>?action=awardinfo_save", $("#awardinfo").serializeArray(),
|
||||||
function(responseText, textStatus, XMLHttpRequest)
|
function(responseText, textStatus, XMLHttpRequest) {
|
||||||
{
|
|
||||||
/* At this point, award_id has been updated by the load */
|
/* At this point, award_id has been updated by the load */
|
||||||
/* We want to do this AFTER the load completes.
|
/* We want to do this AFTER the load completes.
|
||||||
* Somehow, the value of reload properly makes
|
* Somehow, the value of reload properly makes
|
||||||
@ -481,8 +491,7 @@ function awardinfo_save()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_eligibility()
|
function update_eligibility() {
|
||||||
{
|
|
||||||
if (award_tab_update['eligibility'] == award_id) return;
|
if (award_tab_update['eligibility'] == award_id) return;
|
||||||
award_tab_update['eligibility'] = award_id;
|
award_tab_update['eligibility'] = award_id;
|
||||||
$.getJSON("<?= $_SERVER['PHP_SELF'] ?>?action=eligibility_load&id=" + award_id,
|
$.getJSON("<?= $_SERVER['PHP_SELF'] ?>?action=eligibility_load&id=" + award_id,
|
||||||
@ -492,8 +501,7 @@ function update_eligibility()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function prizelist_refresh()
|
function prizelist_refresh() {
|
||||||
{
|
|
||||||
//FIXME Table DnD remove CANNOT reorder prizes now or open to edit, create new award not working either (test the rest of the software)
|
//FIXME Table DnD remove CANNOT reorder prizes now or open to edit, create new award not working either (test the rest of the software)
|
||||||
$("#prizelist").tableDnD({
|
$("#prizelist").tableDnD({
|
||||||
onDrop: function(table, row) {
|
onDrop: function(table, row) {
|
||||||
@ -509,8 +517,7 @@ function prizelist_refresh()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_prizeinfo()
|
function update_prizeinfo() {
|
||||||
{
|
|
||||||
/* We can't do this filtering here, sometimes we need to fiorce
|
/* We can't do this filtering here, sometimes we need to fiorce
|
||||||
* a prizeinfo reload */
|
* a prizeinfo reload */
|
||||||
// if(award_tab_update['prizeinfo'] == award_id) return;
|
// if(award_tab_update['prizeinfo'] == award_id) return;
|
||||||
@ -537,8 +544,7 @@ function update_prizeinfo()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function edit_prize(id)
|
function edit_prize(id) {
|
||||||
{
|
|
||||||
$.getJSON("<?= $_SERVER['PHP_SELF'] ?>?action=prize_load&id=" + id,
|
$.getJSON("<?= $_SERVER['PHP_SELF'] ?>?action=prize_load&id=" + id,
|
||||||
function(json) {
|
function(json) {
|
||||||
$("#prizeinfo_edit_header").html("<?= i18n('Edit Prize') ?>");
|
$("#prizeinfo_edit_header").html("<?= i18n('Edit Prize') ?>");
|
||||||
@ -558,30 +564,25 @@ function edit_prize(id)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function eligibility_save()
|
function eligibility_save() {
|
||||||
{
|
|
||||||
$("#eligibility_award_awards_id").val(award_id);
|
$("#eligibility_award_awards_id").val(award_id);
|
||||||
$("#debug").load("<? $_SERVER['PHP_SELF'] ?>?action=eligibility_save", $("#eligibility").serializeArray());
|
$("#debug").load("<? $_SERVER['PHP_SELF'] ?>?action=eligibility_save", $("#eligibility").serializeArray());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function prize_save()
|
function prize_save() {
|
||||||
{
|
|
||||||
$("#debug").load("<? $_SERVER['PHP_SELF'] ?>?action=prize_save", $("#prizeinfo").serializeArray(),
|
$("#debug").load("<? $_SERVER['PHP_SELF'] ?>?action=prize_save", $("#prizeinfo").serializeArray(),
|
||||||
function(responseText, textStatus, XMLHttpRequest)
|
function(responseText, textStatus, XMLHttpRequest) {
|
||||||
{
|
|
||||||
update_prizeinfo();
|
update_prizeinfo();
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function prize_delete(id)
|
function prize_delete(id) {
|
||||||
{
|
|
||||||
var confirm = confirmClick('Are you sure you want to delete this prize?');
|
var confirm = confirmClick('Are you sure you want to delete this prize?');
|
||||||
if (confirm == true) {
|
if (confirm == true) {
|
||||||
$("#prizeinfo_info").load("<? $_SERVER['PHP_SELF'] ?>?action=prize_delete&id=" + id, null,
|
$("#prizeinfo_info").load("<? $_SERVER['PHP_SELF'] ?>?action=prize_delete&id=" + id, null,
|
||||||
function(responseText, textStatus, XMLHttpRequest)
|
function(responseText, textStatus, XMLHttpRequest) {
|
||||||
{
|
|
||||||
$(".prizelist_tr#" + id).fadeTo('slow', 0);
|
$(".prizelist_tr#" + id).fadeTo('slow', 0);
|
||||||
$(".prizelist_tr#" + id).remove();
|
$(".prizelist_tr#" + id).remove();
|
||||||
prizelist_refresh();
|
prizelist_refresh();
|
||||||
@ -590,8 +591,7 @@ function prize_delete(id)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function prize_create()
|
function prize_create() {
|
||||||
{
|
|
||||||
$.getJSON("<?= $_SERVER['PHP_SELF'] ?>?action=prize_create&award_awards_id=" + award_id,
|
$.getJSON("<?= $_SERVER['PHP_SELF'] ?>?action=prize_create&award_awards_id=" + award_id,
|
||||||
function(json) {
|
function(json) {
|
||||||
$(".prizeinfo").val("");
|
$(".prizeinfo").val("");
|
||||||
@ -603,8 +603,7 @@ function prize_create()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_feeder()
|
function update_feeder() {
|
||||||
{
|
|
||||||
if (award_tab_update['feeder'] == award_id) return;
|
if (award_tab_update['feeder'] == award_id) return;
|
||||||
award_tab_update['feeder'] = award_id;
|
award_tab_update['feeder'] = award_id;
|
||||||
|
|
||||||
@ -623,8 +622,7 @@ function update_feeder()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_feeder_enable()
|
function update_feeder_enable() {
|
||||||
{
|
|
||||||
var checked = $('#feeder_enable:checkbox').is(':checked');
|
var checked = $('#feeder_enable:checkbox').is(':checked');
|
||||||
if (checked == true) {
|
if (checked == true) {
|
||||||
$('#feeder_en *').removeAttr('disabled');
|
$('#feeder_en *').removeAttr('disabled');
|
||||||
@ -638,8 +636,10 @@ function update_feeder_enable()
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$("#popup_editor").dialog({
|
$("#popup_editor").dialog({
|
||||||
bgiframe: true, autoOpen: false,
|
bgiframe: true,
|
||||||
modal: true, resizable: false,
|
autoOpen: false,
|
||||||
|
modal: true,
|
||||||
|
resizable: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
create: function() {
|
create: function() {
|
||||||
var $tabs = $('#editor_tabs').tabs();
|
var $tabs = $('#editor_tabs').tabs();
|
||||||
@ -688,7 +688,6 @@ $(document).ready(function() {
|
|||||||
// selected: -1 /* None selected */
|
// selected: -1 /* None selected */
|
||||||
// });
|
// });
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
@ -698,7 +697,8 @@ $(document).ready(function() {
|
|||||||
<div id="popup_editor" title="Award Editor" style="display: none">
|
<div id="popup_editor" title="Award Editor" style="display: none">
|
||||||
<div id="popup_status"></div>
|
<div id="popup_status"></div>
|
||||||
<div id="editor_tabs">
|
<div id="editor_tabs">
|
||||||
<ul><li><a href="#editor_tab_awardinfo"><span><?= i18n('Award Info') ?></span></a></li>
|
<ul>
|
||||||
|
<li><a href="#editor_tab_awardinfo"><span><?= i18n('Award Info') ?></span></a></li>
|
||||||
<li><a href="#editor_tab_eligibility"><span><?= i18n('Eligibility') ?></span></a></li>
|
<li><a href="#editor_tab_eligibility"><span><?= i18n('Eligibility') ?></span></a></li>
|
||||||
<li><a href="#editor_tab_prizes"><span><?= i18n('Prizes') ?></span></a></li>
|
<li><a href="#editor_tab_prizes"><span><?= i18n('Prizes') ?></span></a></li>
|
||||||
<li><a href="#editor_tab_feeder"><span><?= i18n('Feeder Fairs') ?></span></a></li>
|
<li><a href="#editor_tab_feeder"><span><?= i18n('Feeder Fairs') ?></span></a></li>
|
||||||
@ -717,10 +717,14 @@ $(document).ready(function() {
|
|||||||
<form id="awardinfo">
|
<form id="awardinfo">
|
||||||
<input type="hidden" name="id" id="awardinfo_id" value="0" />
|
<input type="hidden" name="id" id="awardinfo_id" value="0" />
|
||||||
<table class="editor">
|
<table class="editor">
|
||||||
<tr><td><?= i18n('Name') ?>:</td>
|
<tr>
|
||||||
|
<td><?= i18n('Name') ?>:</td>
|
||||||
<td><input class="translatable" type="text" id="awardinfo_name" name="name" value="Loading..." size="50" maxlength="128">
|
<td><input class="translatable" type="text" id="awardinfo_name" name="name" value="Loading..." size="50" maxlength="128">
|
||||||
</td></tr>
|
</td>
|
||||||
<tr><td><?= i18n('Sponsor') ?>:</td><td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?= i18n('Sponsor') ?>:</td>
|
||||||
|
<td>
|
||||||
<?
|
<?
|
||||||
|
|
||||||
$sq = $pdo->prepare('SELECT id,organization FROM sponsors ORDER BY organization');
|
$sq = $pdo->prepare('SELECT id,organization FROM sponsors ORDER BY organization');
|
||||||
@ -731,11 +735,16 @@ while ($sr = $sq->fetch(PDO::FETCH_OBJ)) {
|
|||||||
echo "<option value=\"$sr->id\">" . i18n($sr->organization) . '</option>';
|
echo "<option value=\"$sr->id\">" . i18n($sr->organization) . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select></td></tr>
|
</select></td>
|
||||||
<tr><td><?= i18n('Presenter') ?>:</td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?= i18n('Presenter') ?>:</td>
|
||||||
<td><input type="text" id="awardinfo_presenter" name="presenter" value="Loading..." size="50" maxlength="128" />
|
<td><input type="text" id="awardinfo_presenter" name="presenter" value="Loading..." size="50" maxlength="128" />
|
||||||
</td></tr>
|
</td>
|
||||||
<tr><td><?= i18n('Type') ?>:</td><td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?= i18n('Type') ?>:</td>
|
||||||
|
<td>
|
||||||
<?
|
<?
|
||||||
$tq = $pdo->prepare("SELECT id,type FROM award_types WHERE year='{$config['FAIRYEAR']}' ORDER BY type");
|
$tq = $pdo->prepare("SELECT id,type FROM award_types WHERE year='{$config['FAIRYEAR']}' ORDER BY type");
|
||||||
$tq->execute();
|
$tq->execute();
|
||||||
@ -746,27 +755,37 @@ while ($tr = $tq->fetch(PDO::FETCH_OBJ)) {
|
|||||||
echo "<option value=\"$tr->id\">" . i18n($tr->type) . '</option>';
|
echo "<option value=\"$tr->id\">" . i18n($tr->type) . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select></td></tr>
|
</select></td>
|
||||||
<tr><td><label><?= i18n('Criteria') ?>:</label></td>
|
</tr>
|
||||||
<td><textarea class="translatable" id="awardinfo_criteria" name="criteria" rows="3" cols="50">Loading...</textarea></td></tr>
|
<tr>
|
||||||
<tr><td><?= i18n('Description') ?>:</td>
|
<td><label><?= i18n('Criteria') ?>:</label></td>
|
||||||
<td><textarea class="translatable" id="awardinfo_description" name="description" rows="3" cols="50">Loading...</textarea></td></tr>
|
<td><textarea class="translatable" id="awardinfo_criteria" name="criteria" rows="3" cols="50">Loading...</textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?= i18n('Description') ?>:</td>
|
||||||
|
<td><textarea class="translatable" id="awardinfo_description" name="description" rows="3" cols="50">Loading...</textarea></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h4>Options</h4>
|
<h4>Options</h4>
|
||||||
<table class="editor">
|
<table class="editor">
|
||||||
<tr> <td><input type="checkbox" id="awardinfo_excludefromac" name="excludefromac" value="1"></td>
|
<tr>
|
||||||
|
<td><input type="checkbox" id="awardinfo_excludefromac" name="excludefromac" value="1"></td>
|
||||||
<td><?= i18n('Exclude this award from the award ceremony script') ?></td>
|
<td><?= i18n('Exclude this award from the award ceremony script') ?></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><input type="checkbox" id="awardinfo_cwsfaward" name="cwsfaward" value="1"></td>
|
<td><input type="checkbox" id="awardinfo_cwsfaward" name="cwsfaward" value="1"></td>
|
||||||
<td><?= i18n('This award identifies the students that will be attending the Canada-Wide Science Fair') ?></td>
|
<td><?= i18n('This award identifies the students that will be attending the Canada-Wide Science Fair') ?></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><input type="checkbox" id="awardinfo_selfnominate" name="self_nominate" value="yes"></td>
|
<td><input type="checkbox" id="awardinfo_selfnominate" name="self_nominate" value="yes"></td>
|
||||||
<td><?= i18n('Students can self-nominate for this award (this is usually checked for special awards)') ?></td>
|
<td><?= i18n('Students can self-nominate for this award (this is usually checked for special awards)') ?></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><input type="checkbox" id="awardinfo_schedulejudges" name="schedule_judges" value="yes"></td>
|
<td><input type="checkbox" id="awardinfo_schedulejudges" name="schedule_judges" value="yes"></td>
|
||||||
<td><?= i18n('Allow the Automatic Judge Scheduler to assign judges to this award (usually checked)') ?></td>
|
<td><?= i18n('Allow the Automatic Judge Scheduler to assign judges to this award (usually checked)') ?></td>
|
||||||
</tr></table>
|
</tr>
|
||||||
|
</table>
|
||||||
<input type="submit" onClick="awardinfo_save();return false;" value="Save" />
|
<input type="submit" onClick="awardinfo_save();return false;" value="Save" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -778,7 +797,9 @@ while ($tr = $tq->fetch(PDO::FETCH_OBJ)) {
|
|||||||
<form id="eligibility">
|
<form id="eligibility">
|
||||||
<input type="hidden" id="eligibility_award_awards_id" name="award_awards_id" value="" />
|
<input type="hidden" id="eligibility_award_awards_id" name="award_awards_id" value="" />
|
||||||
<table class="editor">
|
<table class="editor">
|
||||||
<tr><td><?= i18n('Age Categories') ?>:</td><td>
|
<tr>
|
||||||
|
<td><?= i18n('Age Categories') ?>:</td>
|
||||||
|
<td>
|
||||||
<?
|
<?
|
||||||
// if(count($currentcategories)==0) $class="class=\"error\""; else $class="";
|
// if(count($currentcategories)==0) $class="class=\"error\""; else $class="";
|
||||||
|
|
||||||
@ -795,9 +816,12 @@ while ($cr = $cq->fetch(PDO::FETCH_OBJ)) {
|
|||||||
echo "<input type=\"checkbox\" id=\"eligibility_categories_{$cr->id}\" name=\"categories[]\" value=\"$cr->id\" />" . i18n($cr->category) . '<br />';
|
echo "<input type=\"checkbox\" id=\"eligibility_categories_{$cr->id}\" name=\"categories[]\" value=\"$cr->id\" />" . i18n($cr->category) . '<br />';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td></tr>
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr><td><?= i18n('Divisions') ?>:</td><td>
|
<tr>
|
||||||
|
<td><?= i18n('Divisions') ?>:</td>
|
||||||
|
<td>
|
||||||
<?
|
<?
|
||||||
|
|
||||||
$dq = $pdo->prepare('SELECT * FROM projectdivisions WHERE year = :year ORDER BY division');
|
$dq = $pdo->prepare('SELECT * FROM projectdivisions WHERE year = :year ORDER BY division');
|
||||||
@ -813,7 +837,9 @@ while ($dr = $dq->fetch(PDO::FETCH_OBJ)) {
|
|||||||
// echo "<tr><td colspan=\"2\" class=\"error\">".i18n("At least one age category and one division must be selected")."</td></tr>";
|
// echo "<tr><td colspan=\"2\" class=\"error\">".i18n("At least one age category and one division must be selected")."</td></tr>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</td></tr></table>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<input type="submit" onClick="eligibility_save();return false;" value="Save" />
|
<input type="submit" onClick="eligibility_save();return false;" value="Save" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -832,13 +858,15 @@ while ($dr = $dq->fetch(PDO::FETCH_OBJ)) {
|
|||||||
<th><?= i18n('Scholarship') ?></th>
|
<th><?= i18n('Scholarship') ?></th>
|
||||||
<th><?= i18n('Value') ?></th>
|
<th><?= i18n('Value') ?></th>
|
||||||
<th><?= i18n('Actions') ?></th>
|
<th><?= i18n('Actions') ?></th>
|
||||||
</tr></table>
|
</tr>
|
||||||
|
</table>
|
||||||
<br>
|
<br>
|
||||||
* <?= i18n('Click on the Script Order and drag to re-order the prizes') ?>
|
* <?= i18n('Click on the Script Order and drag to re-order the prizes') ?>
|
||||||
<br>
|
<br>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<br /><h4 id="prizeinfo_edit_header">Click on a prize to edit</h4><br />
|
<br />
|
||||||
|
<h4 id="prizeinfo_edit_header">Click on a prize to edit</h4><br />
|
||||||
<form id="prizeinfo">
|
<form id="prizeinfo">
|
||||||
<input type="hidden" id="prizeinfo_id" name="id" value="" />
|
<input type="hidden" id="prizeinfo_id" name="id" value="" />
|
||||||
<input type="hidden" id="prizeinfo_award_awards_id" name="award_awards_id" value="" />
|
<input type="hidden" id="prizeinfo_award_awards_id" name="award_awards_id" value="" />
|
||||||
@ -846,33 +874,43 @@ while ($dr = $dq->fetch(PDO::FETCH_OBJ)) {
|
|||||||
<tr>
|
<tr>
|
||||||
<td><?= i18n('Number available') ?>:</td>
|
<td><?= i18n('Number available') ?>:</td>
|
||||||
<td><input type="text" id="prizeinfo_number" class="prizeinfo" name="number" value="" size="3" maxlength="5" disabled="disabled" /></td>
|
<td><input type="text" id="prizeinfo_number" class="prizeinfo" name="number" value="" size="3" maxlength="5" disabled="disabled" /></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><?= i18n('Prize Description') ?>:</td>
|
<td><?= i18n('Prize Description') ?>:</td>
|
||||||
<td><input type="text" id="prizeinfo_prize" class="prizeinfo translatable" name="prize" value="" size="40" maxlength="128" disabled="disabled" /></td>
|
<td><input type="text" id="prizeinfo_prize" class="prizeinfo translatable" name="prize" value="" size="40" maxlength="128" disabled="disabled" /></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><?= i18n('Cash Amount') ?> ($):</td>
|
<td><?= i18n('Cash Amount') ?> ($):</td>
|
||||||
<td><input type="text" id="prizeinfo_cash" class="prizeinfo" name="cash" value="" size="10" maxlength="10" disabled="disabled" /></td>
|
<td><input type="text" id="prizeinfo_cash" class="prizeinfo" name="cash" value="" size="10" maxlength="10" disabled="disabled" /></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><?= i18n('Scholarship Amount') ?> ($):</td>
|
<td><?= i18n('Scholarship Amount') ?> ($):</td>
|
||||||
<td><input type="text" id="prizeinfo_scholarship" class="prizeinfo" name="scholarship" value="" size="10" maxlength="10" disabled="disabled" /></td>
|
<td><input type="text" id="prizeinfo_scholarship" class="prizeinfo" name="scholarship" value="" size="10" maxlength="10" disabled="disabled" /></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><?= i18n('Prize Value') ?> ($):</td>
|
<td><?= i18n('Prize Value') ?> ($):</td>
|
||||||
<td><input type="text" id="prizeinfo_value" class="prizeinfo" name="value" value="" size="10" maxlength="10" disabled="disabled" /></td>
|
<td><input type="text" id="prizeinfo_value" class="prizeinfo" name="value" value="" size="10" maxlength="10" disabled="disabled" /></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><?= i18n('Plaque/Trophy') ?>:</td>
|
<td><?= i18n('Plaque/Trophy') ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<table>
|
<table>
|
||||||
<tr> <td style="width:5%;"><input type="checkbox" id="prizeinfo_trophystudentkeeper" class="prizeinfo" name="trophystudentkeeper" value="1" disabled="disabled"></td>
|
<tr>
|
||||||
|
<td style="width:5%;"><input type="checkbox" id="prizeinfo_trophystudentkeeper" class="prizeinfo" name="trophystudentkeeper" value="1" disabled="disabled"></td>
|
||||||
<td style="width:45%"><?= i18n('Student(s) keeper trophy') ?></td>
|
<td style="width:45%"><?= i18n('Student(s) keeper trophy') ?></td>
|
||||||
<td style="width:5%;"><input type="checkbox" id="prizeinfo_trophystudentreturn" class="prizeinfo" name="trophystudentreturn" value="1" disabled="disabled"></td>
|
<td style="width:5%;"><input type="checkbox" id="prizeinfo_trophystudentreturn" class="prizeinfo" name="trophystudentreturn" value="1" disabled="disabled"></td>
|
||||||
<td style="width:45%"><?= i18n('Student(s) annual return/reuse trophy') ?></td>
|
<td style="width:45%"><?= i18n('Student(s) annual return/reuse trophy') ?></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td style="width:5%;"><input type="checkbox" id="prizeinfo_trophyschoolkeeper" class="prizeinfo" name="trophyschoolkeeper" value="1" disabled="disabled"></td>
|
<td style="width:5%;"><input type="checkbox" id="prizeinfo_trophyschoolkeeper" class="prizeinfo" name="trophyschoolkeeper" value="1" disabled="disabled"></td>
|
||||||
<td style="width:45%;"><?= i18n('School keeper trophy') ?></td>
|
<td style="width:45%;"><?= i18n('School keeper trophy') ?></td>
|
||||||
<td style="width:5%;"><input type="checkbox" id="prizeinfo_trophyschoolreturn" class="prizeinfo" name="trophyschoolreturn" value="1" disabled="disabled"></td>
|
<td style="width:5%;"><input type="checkbox" id="prizeinfo_trophyschoolreturn" class="prizeinfo" name="trophyschoolreturn" value="1" disabled="disabled"></td>
|
||||||
<td style="width:45%;"><?= i18n('School annual return/reuse trophy') ?></td>
|
<td style="width:45%;"><?= i18n('School annual return/reuse trophy') ?></td>
|
||||||
</tr></table></td>
|
</tr>
|
||||||
</tr><tr>
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><?= i18n('Awards Ceremony') ?>:</td>
|
<td><?= i18n('Awards Ceremony') ?>:</td>
|
||||||
<td><input type="checkbox" id="prizeinfo_excludefromac" class="prizeinfo" name="excludefromac" value="1" disabled="disabled"><?= i18n('Exclude this prize from the award ceremony script') ?></td>
|
<td><input type="checkbox" id="prizeinfo_excludefromac" class="prizeinfo" name="excludefromac" value="1" disabled="disabled"><?= i18n('Exclude this prize from the award ceremony script') ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -889,7 +927,8 @@ while ($dr = $dq->fetch(PDO::FETCH_OBJ)) {
|
|||||||
<div id="editor_tab_feeder"></div>
|
<div id="editor_tab_feeder"></div>
|
||||||
|
|
||||||
<? /* End tabs, end popup */ ?>
|
<? /* End tabs, end popup */ ?>
|
||||||
</div></div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
|
|
||||||
@ -900,9 +939,7 @@ while ($dr = $dq->fetch(PDO::FETCH_OBJ)) {
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
function popup_editor(id, mode) {
|
||||||
function popup_editor(id, mode)
|
|
||||||
{
|
|
||||||
var w = (document.documentElement.clientWidth * 0.8);
|
var w = (document.documentElement.clientWidth * 0.8);
|
||||||
var h = (document.documentElement.clientHeight * 0.8);
|
var h = (document.documentElement.clientHeight * 0.8);
|
||||||
|
|
||||||
@ -914,7 +951,7 @@ function popup_editor(id, mode)
|
|||||||
/* Force no tabs to be selected, need to set collapsible
|
/* Force no tabs to be selected, need to set collapsible
|
||||||
* to true first */
|
* to true first */
|
||||||
$('#editor_tabs').tabs('option', 'collapsible', true);
|
$('#editor_tabs').tabs('option', 'collapsible', true);
|
||||||
$('#editor_tabs').tabs('option', 'selected', -1);
|
$('#editor_tabs').tabs('option', 'active', -1);
|
||||||
|
|
||||||
/* Then we'll select a tab to force a reload */
|
/* Then we'll select a tab to force a reload */
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
@ -947,8 +984,7 @@ function popup_editor(id, mode)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function awardlist_refresh()
|
function awardlist_refresh() {
|
||||||
{
|
|
||||||
$("#awardlist").tableDnD({
|
$("#awardlist").tableDnD({
|
||||||
onDrop: function(table, row) {
|
onDrop: function(table, row) {
|
||||||
var order = $.tableDnD.serialize();
|
var order = $.tableDnD.serialize();
|
||||||
@ -968,8 +1004,7 @@ function awardlist_refresh()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function award_delete(id)
|
function award_delete(id) {
|
||||||
{
|
|
||||||
var conf = confirmClick('<?= i18n('Are you sure you want to remove this award?') ?>');
|
var conf = confirmClick('<?= i18n('Are you sure you want to remove this award?') ?>');
|
||||||
if (conf == true) {
|
if (conf == true) {
|
||||||
$("#info_info").load("<? $_SERVER['PHP_SELF'] ?>?action=award_delete&id=" + id);
|
$("#info_info").load("<? $_SERVER['PHP_SELF'] ?>?action=award_delete&id=" + id);
|
||||||
@ -986,7 +1021,6 @@ function award_delete(id)
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
awardlist_refresh();
|
awardlist_refresh();
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -192,7 +192,7 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
$existingprizes[$pr['prize']] = $pr;
|
$existingprizes[$pr['prize']] = $pr;
|
||||||
|
|
||||||
/* Iterate over the downloaded pizes */
|
/* Iterate over the downloaded pizes */
|
||||||
foreach ($prizes AS $prize) {
|
foreach ($prizes as $prize) {
|
||||||
// if it doesn't exist, add it
|
// if it doesn't exist, add it
|
||||||
if (!array_key_exists($prize['prize_en'], $existingprizes)) {
|
if (!array_key_exists($prize['prize_en'], $existingprizes)) {
|
||||||
/*
|
/*
|
||||||
@ -240,7 +240,7 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Delete local entries that weren't downloaded */
|
/* Delete local entries that weren't downloaded */
|
||||||
foreach ($existingprizes AS $ep) {
|
foreach ($existingprizes as $ep) {
|
||||||
echo ' ' . i18n('Removing prize %1', array($ep['prize'])) . '<br />';
|
echo ' ' . i18n('Removing prize %1', array($ep['prize'])) . '<br />';
|
||||||
award_prize_delete($ep['id']);
|
award_prize_delete($ep['id']);
|
||||||
}
|
}
|
||||||
@ -248,7 +248,7 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
|
||||||
// remove any awards that are left in the $existingawards array, they must have been removed from the source
|
// remove any awards that are left in the $existingawards array, they must have been removed from the source
|
||||||
foreach ($existingawards AS $aid => $val) {
|
foreach ($existingawards as $aid => $val) {
|
||||||
echo i18n('Removing award id %1 that was removed from external source', array($aid)) . '<br />';
|
echo i18n('Removing award id %1 that was removed from external source', array($aid)) . '<br />';
|
||||||
award_delete($aid);
|
award_delete($aid);
|
||||||
}
|
}
|
||||||
@ -257,16 +257,18 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header('Download Awards',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Download Awards',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Awards Main' => 'admin/awards.php'));
|
'Awards Main' => 'admin/awards.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
function award_download(id) {
|
||||||
function award_download(id)
|
|
||||||
{
|
|
||||||
if (id == -1) return false;
|
if (id == -1) return false;
|
||||||
$("#award_download_status").load("<?= $_SERVER['PHP_SELF'] ?>?action=check&fairs_id=" + id);
|
$("#award_download_status").load("<?= $_SERVER['PHP_SELF'] ?>?action=check&fairs_id=" + id);
|
||||||
}
|
}
|
||||||
@ -283,11 +285,14 @@ if (!function_exists('curl_init')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<table class="tableview"><thead>
|
<table class="tableview">
|
||||||
<tr><th><?= i18n('Source Name') ?></th>
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><?= i18n('Source Name') ?></th>
|
||||||
<th><?= i18n('Source Location URL') ?></th>
|
<th><?= i18n('Source Location URL') ?></th>
|
||||||
<th><?= i18n('Check') ?></th>
|
<th><?= i18n('Check') ?></th>
|
||||||
</tr></thead>
|
</tr>
|
||||||
|
</thead>
|
||||||
<?
|
<?
|
||||||
|
|
||||||
$q = $pdo->prepare("SELECT * FROM fairs WHERE enable_awards='yes' ORDER BY name");
|
$q = $pdo->prepare("SELECT * FROM fairs WHERE enable_awards='yes' ORDER BY name");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -33,7 +33,8 @@ function get_winners($awardid, $fairs_id)
|
|||||||
global $config, $pdo;
|
global $config, $pdo;
|
||||||
|
|
||||||
/* Mappings of the name we want => to the column name returned in MYSQL */
|
/* Mappings of the name we want => to the column name returned in MYSQL */
|
||||||
$school_fields = array('schoolname' => 'school',
|
$school_fields = array(
|
||||||
|
'schoolname' => 'school',
|
||||||
'schoollang' => 'schoollang',
|
'schoollang' => 'schoollang',
|
||||||
'schoollevel' => 'schoollevel',
|
'schoollevel' => 'schoollevel',
|
||||||
'board' => 'board',
|
'board' => 'board',
|
||||||
@ -44,13 +45,15 @@ function get_winners($awardid, $fairs_id)
|
|||||||
'city' => 'city',
|
'city' => 'city',
|
||||||
'province_code' => 'province_code',
|
'province_code' => 'province_code',
|
||||||
'postalcode' => 'postalcode',
|
'postalcode' => 'postalcode',
|
||||||
'schoolemail' => 'schoolemail');
|
'schoolemail' => 'schoolemail'
|
||||||
|
);
|
||||||
/* 'principal'=>'principal',
|
/* 'principal'=>'principal',
|
||||||
'sciencehead'=>'sciencehead',
|
'sciencehead'=>'sciencehead',
|
||||||
'scienceheademail'=>'scienceheademail',
|
'scienceheademail'=>'scienceheademail',
|
||||||
'scienceheadphone'=>'scienceheadphone');*/
|
'scienceheadphone'=>'scienceheadphone');*/
|
||||||
|
|
||||||
$student_fields = array('firstname' => 'firstname',
|
$student_fields = array(
|
||||||
|
'firstname' => 'firstname',
|
||||||
'lastname' => 'lastname',
|
'lastname' => 'lastname',
|
||||||
'email' => 'email',
|
'email' => 'email',
|
||||||
'gender' => 'sex',
|
'gender' => 'sex',
|
||||||
@ -63,7 +66,8 @@ function get_winners($awardid, $fairs_id)
|
|||||||
'postalcode' => 'postalcode',
|
'postalcode' => 'postalcode',
|
||||||
'phone' => 'phone',
|
'phone' => 'phone',
|
||||||
'teachername' => 'teachername',
|
'teachername' => 'teachername',
|
||||||
'teacheremail' => 'teacheremail');
|
'teacheremail' => 'teacheremail'
|
||||||
|
);
|
||||||
|
|
||||||
$awards = array();
|
$awards = array();
|
||||||
if ($awardid == -1) {
|
if ($awardid == -1) {
|
||||||
@ -100,11 +104,13 @@ function get_winners($awardid, $fairs_id)
|
|||||||
$divmap = unserialize($fair['divmap']);
|
$divmap = unserialize($fair['divmap']);
|
||||||
|
|
||||||
foreach ($awards as $award) {
|
foreach ($awards as $award) {
|
||||||
$winners = array('id' => $award['id'],
|
$winners = array(
|
||||||
|
'id' => $award['id'],
|
||||||
'award_name' => $award['name'],
|
'award_name' => $award['name'],
|
||||||
'external_identifier' => $award['external_identifier'],
|
'external_identifier' => $award['external_identifier'],
|
||||||
'year' => $config['FAIRYEAR'],
|
'year' => $config['FAIRYEAR'],
|
||||||
'prizes' => array());
|
'prizes' => array()
|
||||||
|
);
|
||||||
|
|
||||||
if ($fair['type'] != 'sfiab') {
|
if ($fair['type'] != 'sfiab') {
|
||||||
/* YSC Compatability */
|
/* YSC Compatability */
|
||||||
@ -146,8 +152,10 @@ function get_winners($awardid, $fairs_id)
|
|||||||
$school[$k] = $schoolr[$v];
|
$school[$k] = $schoolr[$v];
|
||||||
|
|
||||||
/* Pack up the student data too */
|
/* Pack up the student data too */
|
||||||
$student = array('xml_type' => 'student', /* for ysc compatability */
|
$student = array(
|
||||||
'school' => $school);
|
'xml_type' => 'student', /* for ysc compatability */
|
||||||
|
'school' => $school
|
||||||
|
);
|
||||||
foreach ($student_fields as $k => $v)
|
foreach ($student_fields as $k => $v)
|
||||||
$student[$k] = $s[$v];
|
$student[$k] = $s[$v];
|
||||||
|
|
||||||
@ -158,7 +166,8 @@ function get_winners($awardid, $fairs_id)
|
|||||||
$div_id = $divmap[$project['projectdivisions_id']];
|
$div_id = $divmap[$project['projectdivisions_id']];
|
||||||
|
|
||||||
/* Save the project info => students */
|
/* Save the project info => students */
|
||||||
$prizewinners[] = array('xml_type' => 'project', /* for ysc compatability */
|
$prizewinners[] = array(
|
||||||
|
'xml_type' => 'project', /* for ysc compatability */
|
||||||
'projectid' => $project['id'],
|
'projectid' => $project['id'],
|
||||||
'projectnumber' => $project['projectnumber'],
|
'projectnumber' => $project['projectnumber'],
|
||||||
'title' => $project['title'],
|
'title' => $project['title'],
|
||||||
@ -167,7 +176,8 @@ function get_winners($awardid, $fairs_id)
|
|||||||
'projectcategories_id' => $cat_id,
|
'projectcategories_id' => $cat_id,
|
||||||
'projectdivisions_id' => $div_id,
|
'projectdivisions_id' => $div_id,
|
||||||
'client_projectdivisions_id' => $project['projectdivisions_id'],
|
'client_projectdivisions_id' => $project['projectdivisions_id'],
|
||||||
'students' => $students);
|
'students' => $students
|
||||||
|
);
|
||||||
}
|
}
|
||||||
/* Save the prize info => projects */
|
/* Save the prize info => projects */
|
||||||
$winners['prizes'][$prize['prize']] = array(
|
$winners['prizes'][$prize['prize']] = array(
|
||||||
@ -243,8 +253,10 @@ function load_server_cats_divs($fairs_id)
|
|||||||
$q->execute();
|
$q->execute();
|
||||||
$fair = $q->fetch(PDO::FETCH_ASSOC);
|
$fair = $q->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
$req = array('get_categories' => array('year' => $config['FAIRYEAR']),
|
$req = array(
|
||||||
'get_divisions' => array('year' => $config['FAIRYEAR']));
|
'get_categories' => array('year' => $config['FAIRYEAR']),
|
||||||
|
'get_divisions' => array('year' => $config['FAIRYEAR'])
|
||||||
|
);
|
||||||
$data = curl_query($fair, $req);
|
$data = curl_query($fair, $req);
|
||||||
|
|
||||||
/* If selected mappings don't exist, try to discover some */
|
/* If selected mappings don't exist, try to discover some */
|
||||||
@ -404,7 +416,10 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
<input type="hidden" name="fairs_id" value="<?= $fairs_id ?>" />
|
<input type="hidden" name="fairs_id" value="<?= $fairs_id ?>" />
|
||||||
|
|
||||||
<table class="editor">
|
<table class="editor">
|
||||||
<tr><th><?= i18n('Our Division') ?></th><th><?= i18n('%1 Division', array($fair['abbrv'])) ?></th></tr>
|
<tr>
|
||||||
|
<th><?= i18n('Our Division') ?></th>
|
||||||
|
<th><?= i18n('%1 Division', array($fair['abbrv'])) ?></th>
|
||||||
|
</tr>
|
||||||
<?
|
<?
|
||||||
|
|
||||||
foreach ($divs as $div) {
|
foreach ($divs as $div) {
|
||||||
@ -432,7 +447,7 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
// $cat[intval($key)] = intval($c);
|
// $cat[intval($key)] = intval($c);
|
||||||
// }
|
// }
|
||||||
$div = array();
|
$div = array();
|
||||||
foreach ($_POST['div'] AS $key => $d) {
|
foreach ($_POST['div'] as $key => $d) {
|
||||||
$div[intval($key)] = intval($d);
|
$div[intval($key)] = intval($d);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -516,7 +531,8 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
foreach ($p['projects'] as &$pr) {
|
foreach ($p['projects'] as &$pr) {
|
||||||
?> <tr><td style="border: 0px;"> </td>
|
?> <tr>
|
||||||
|
<td style="border: 0px;"> </td>
|
||||||
<td><b><?= $pr['projectnumber'] ?> - <?= $pr['title'] ?></b><br />
|
<td><b><?= $pr['projectnumber'] ?> - <?= $pr['title'] ?></b><br />
|
||||||
<?
|
<?
|
||||||
$highest_grade = 0;
|
$highest_grade = 0;
|
||||||
@ -549,12 +565,14 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table class="default">
|
<table class="default">
|
||||||
<tr> <td align="right" style="border: 0px;"><?= i18n('Our division') ?>:</td>
|
<tr>
|
||||||
|
<td align="right" style="border: 0px;"><?= i18n('Our division') ?>:</td>
|
||||||
<td><b><?= $divs[$pr['client_projectdivisions_id']]['division'] ?></td>
|
<td><b><?= $divs[$pr['client_projectdivisions_id']]['division'] ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?
|
<?
|
||||||
if ($division_disabled == false) {
|
if ($division_disabled == false) {
|
||||||
?> <tr> <td align="right"><?= i18n('%1 Division', array($fair['abbrv'])) ?>:</td>
|
?> <tr>
|
||||||
|
<td align="right"><?= i18n('%1 Division', array($fair['abbrv'])) ?>:</td>
|
||||||
<td><select name="div[<?= $w['id'] ?>][<?= $p['id'] ?>][<?= $pr['projectid'] ?>]">
|
<td><select name="div[<?= $w['id'] ?>][<?= $p['id'] ?>][<?= $pr['projectid'] ?>]">
|
||||||
<?
|
<?
|
||||||
$mapto = $divmap[$pr['client_projectdivisions_id']];
|
$mapto = $divmap[$pr['client_projectdivisions_id']];
|
||||||
@ -566,13 +584,16 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
<input type="hidden" name="cat[<?= $w['id'] ?>][<?= $p['id'] ?>][<?= $pr['projectid'] ?>]" value="<?= $server_cat ?>" />
|
<input type="hidden" name="cat[<?= $w['id'] ?>][<?= $p['id'] ?>][<?= $pr['projectid'] ?>]" value="<?= $server_cat ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr> <td align="right"><?= i18n('%1 Category', array($fair['abbrv'])) ?>:</td>
|
<tr>
|
||||||
|
<td align="right"><?= i18n('%1 Category', array($fair['abbrv'])) ?>:</td>
|
||||||
<td><b><?= $server_cats[$server_cat]['category'] ?> (<?= i18n('Grade') ?> <?= $server_cats[$server_cat]['mingrade'] ?> - <?= $server_cats[$server_cat]['maxgrade'] ?>)</td>
|
<td><b><?= $server_cats[$server_cat]['category'] ?> (<?= i18n('Grade') ?> <?= $server_cats[$server_cat]['mingrade'] ?> - <?= $server_cats[$server_cat]['maxgrade'] ?>)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
?> </table>
|
?>
|
||||||
</td></tr>
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -581,33 +602,33 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header('Award Upload',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Award Upload',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Awards Main' => 'admin/awards.php'));
|
'Awards Main' => 'admin/awards.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var fairs_id = -1;
|
var fairs_id = -1;
|
||||||
var award_awards_id = -1;
|
var award_awards_id = -1;
|
||||||
|
|
||||||
function catdiv_save()
|
function catdiv_save() {
|
||||||
{
|
|
||||||
$("#debug").load("<?= $_SERVER['PHP_SELF'] ?>?action=catdiv_save",
|
$("#debug").load("<?= $_SERVER['PHP_SELF'] ?>?action=catdiv_save",
|
||||||
$('#catdiv_form').serializeArray());
|
$('#catdiv_form').serializeArray());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function popup_upload_load()
|
function popup_upload_load() {
|
||||||
{
|
|
||||||
var ids = "&id=" + award_awards_id + "&fairs_id=" + fairs_id;
|
var ids = "&id=" + award_awards_id + "&fairs_id=" + fairs_id;
|
||||||
$("#popup_upload").load("<?= $_SERVER['PHP_SELF'] ?>?action=load" + ids);
|
$("#popup_upload").load("<?= $_SERVER['PHP_SELF'] ?>?action=load" + ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
function popup_upload(fid,aaid)
|
function popup_upload(fid, aaid) {
|
||||||
{
|
|
||||||
var w = (document.documentElement.clientWidth * 0.8);
|
var w = (document.documentElement.clientWidth * 0.8);
|
||||||
var h = (document.documentElement.clientHeight * 0.8);
|
var h = (document.documentElement.clientHeight * 0.8);
|
||||||
|
|
||||||
@ -626,8 +647,7 @@ function popup_upload(fid,aaid)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function popup_divmap(fid)
|
function popup_divmap(fid) {
|
||||||
{
|
|
||||||
var w = (document.documentElement.clientWidth * 0.4);
|
var w = (document.documentElement.clientWidth * 0.4);
|
||||||
var h = (document.documentElement.clientHeight * 0.6);
|
var h = (document.documentElement.clientHeight * 0.6);
|
||||||
|
|
||||||
@ -646,8 +666,10 @@ function popup_divmap(fid)
|
|||||||
/* Setup the popup window */
|
/* Setup the popup window */
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#popup_upload").dialog({
|
$("#popup_upload").dialog({
|
||||||
bgiframe: true, autoOpen: false,
|
bgiframe: true,
|
||||||
modal: true, resizable: false,
|
autoOpen: false,
|
||||||
|
modal: true,
|
||||||
|
resizable: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
buttons: {
|
buttons: {
|
||||||
"<?= i18n('Cancel') ?>": function() {
|
"<?= i18n('Cancel') ?>": function() {
|
||||||
@ -663,8 +685,10 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#popup_divmap").dialog({
|
$("#popup_divmap").dialog({
|
||||||
bgiframe: true, autoOpen: false,
|
bgiframe: true,
|
||||||
modal: true, resizable: false,
|
autoOpen: false,
|
||||||
|
modal: true,
|
||||||
|
resizable: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
buttons: {
|
buttons: {
|
||||||
"<?= i18n('Cancel') ?>": function() {
|
"<?= i18n('Cancel') ?>": function() {
|
||||||
@ -672,7 +696,8 @@ $(document).ready(function() {
|
|||||||
},
|
},
|
||||||
"<?= i18n('Save Mappings') ?>": function() {
|
"<?= i18n('Save Mappings') ?>": function() {
|
||||||
$("#debug").load("<?= $_SERVER['PHP_SELF'] ?>?action=catdiv_save",
|
$("#debug").load("<?= $_SERVER['PHP_SELF'] ?>?action=catdiv_save",
|
||||||
$('#catdiv_form').serializeArray(), function() {
|
$('#catdiv_form').serializeArray(),
|
||||||
|
function() {
|
||||||
popup_upload_load();
|
popup_upload_load();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -711,18 +736,22 @@ show_pdo_errors_if_any($pdo);
|
|||||||
?>
|
?>
|
||||||
<h4><?= i18n('Upload all winners to a source') ?>:</h4>
|
<h4><?= i18n('Upload all winners to a source') ?>:</h4>
|
||||||
|
|
||||||
<table class="tableview"><thead>
|
<table class="tableview">
|
||||||
<tr><th><?= i18n('Source Name') ?></th>
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><?= i18n('Source Name') ?></th>
|
||||||
<th><?= i18n('Number of Awards') ?></th>
|
<th><?= i18n('Number of Awards') ?></th>
|
||||||
<th><?= i18n('Winners<br />Assigned') ?></th>
|
<th><?= i18n('Winners<br />Assigned') ?></th>
|
||||||
<th><?= i18n('Send All') ?></th>
|
<th><?= i18n('Send All') ?></th>
|
||||||
</tr></thead>
|
</tr>
|
||||||
|
</thead>
|
||||||
<?
|
<?
|
||||||
|
|
||||||
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||||
$count = count_winners(-1, $r->id);
|
$count = count_winners(-1, $r->id);
|
||||||
?>
|
?>
|
||||||
<tr><td><?= $r->name ?></td>
|
<tr>
|
||||||
|
<td><?= $r->name ?></td>
|
||||||
<td align="center"><?= $r->AWARD_COUNT ?></td>
|
<td align="center"><?= $r->AWARD_COUNT ?></td>
|
||||||
<td align="center"><?= $count ?></td>
|
<td align="center"><?= $count ?></td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
@ -755,18 +784,22 @@ show_pdo_errors_if_any($pdo);
|
|||||||
?>
|
?>
|
||||||
<h4><?= i18n('Upload individual winners to a source') ?>:</h4>
|
<h4><?= i18n('Upload individual winners to a source') ?>:</h4>
|
||||||
|
|
||||||
<table class="tableview"><thead>
|
<table class="tableview">
|
||||||
<tr><th><?= i18n('Award Name') ?></th>
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><?= i18n('Award Name') ?></th>
|
||||||
<th><?= i18n('Source Name') ?></th>
|
<th><?= i18n('Source Name') ?></th>
|
||||||
<th><?= i18n('Winners<br />Assigned') ?></th>
|
<th><?= i18n('Winners<br />Assigned') ?></th>
|
||||||
<th><?= i18n('Send') ?></th>
|
<th><?= i18n('Send') ?></th>
|
||||||
<th><?= i18n('Additional<br />Info') ?></th>
|
<th><?= i18n('Additional<br />Info') ?></th>
|
||||||
</tr></thead>
|
</tr>
|
||||||
|
</thead>
|
||||||
<?
|
<?
|
||||||
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||||
$count = count_winners($r->id, $r->award_source_fairs_id);
|
$count = count_winners($r->id, $r->award_source_fairs_id);
|
||||||
?>
|
?>
|
||||||
<tr><td><?= $r->awardname ?></td>
|
<tr>
|
||||||
|
<td><?= $r->awardname ?></td>
|
||||||
<td><?= $r->fairname ?></td>
|
<td><?= $r->fairname ?></td>
|
||||||
<td align="center"><?= $count ?></td>
|
<td align="center"><?= $count ?></td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
@ -777,7 +810,8 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
|||||||
$onclick = "alert('" . i18n('Assign a winner first') . "');return false;";
|
$onclick = "alert('" . i18n('Assign a winner first') . "');return false;";
|
||||||
?>
|
?>
|
||||||
<a href="#" onClick="<?= $onclick ?>"><?= i18n('send') ?></a>
|
<a href="#" onClick="<?= $onclick ?>"><?= i18n('send') ?></a>
|
||||||
</td><td>
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
if ($r->external_additional_materials) {
|
if ($r->external_additional_materials) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 David Grant <dave@lightbox.org>
|
* Copyright (C) 2010 David Grant <dave@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -24,7 +24,8 @@
|
|||||||
<?
|
<?
|
||||||
|
|
||||||
function award_delete($award_awards_id)
|
function award_delete($award_awards_id)
|
||||||
{ global $pdo;
|
{
|
||||||
|
global $pdo;
|
||||||
/* Delete all winners attached to this award */
|
/* Delete all winners attached to this award */
|
||||||
|
|
||||||
$q = $pdo->prepare("SELECT id FROM award_prizes WHERE award_awards_id='$award_awards_id'");
|
$q = $pdo->prepare("SELECT id FROM award_prizes WHERE award_awards_id='$award_awards_id'");
|
||||||
@ -55,7 +56,8 @@ function award_delete($award_awards_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
function award_prize_delete($award_prizes_id)
|
function award_prize_delete($award_prizes_id)
|
||||||
{ global $pdo;
|
{
|
||||||
|
global $pdo;
|
||||||
$q = $pdo->prepare("DELETE FROM winners WHERE awards_prizes_id='$award_prizes_id'");
|
$q = $pdo->prepare("DELETE FROM winners WHERE awards_prizes_id='$award_prizes_id'");
|
||||||
$q->execute();
|
$q->execute();
|
||||||
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -27,10 +28,14 @@ require ('../common.inc.php');
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
|
|
||||||
send_header('Awards',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Awards',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'awards_management');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'awards_management'
|
||||||
|
);
|
||||||
|
|
||||||
require_once('rerollprizes.php');
|
require_once('rerollprizes.php');
|
||||||
|
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 James Grant <james@lightbox.org>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -30,15 +30,21 @@ user_auth_required('committee', 'admin');
|
|||||||
if (!file_exists('../data/userfiles'))
|
if (!file_exists('../data/userfiles'))
|
||||||
mkdir('../data/userfiles');
|
mkdir('../data/userfiles');
|
||||||
|
|
||||||
send_header('Website Content Manager',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Website Content Manager',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'website_content_management');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'website_content_management'
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="element"></div>
|
<div class="element"></div>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { Editor } from 'https://esm.sh/@tiptap/core'
|
import {
|
||||||
|
Editor
|
||||||
|
} from 'https://esm.sh/@tiptap/core'
|
||||||
import StarterKit from 'https://esm.sh/@tiptap/starter-kit'
|
import StarterKit from 'https://esm.sh/@tiptap/starter-kit'
|
||||||
|
|
||||||
new Editor({
|
new Editor({
|
||||||
@ -56,7 +62,7 @@ new Editor({
|
|||||||
|
|
||||||
if (get_value_from_array($_POST, 'action') == 'save') {
|
if (get_value_from_array($_POST, 'action') == 'save') {
|
||||||
$err = false;
|
$err = false;
|
||||||
foreach ($config['languages'] AS $lang => $langname) {
|
foreach ($config['languages'] as $lang => $langname) {
|
||||||
$filename = stripslashes(get_value_from_array($_POST, 'filename', ''));
|
$filename = stripslashes(get_value_from_array($_POST, 'filename', ''));
|
||||||
// $filename=ereg_replace("[^A-Za-z0-9\.\_\/]","_",$_POST['filename']);
|
// $filename=ereg_replace("[^A-Za-z0-9\.\_\/]","_",$_POST['filename']);
|
||||||
|
|
||||||
@ -99,7 +105,7 @@ if (get_value_from_array($_GET, 'filename', '') || get_value_from_array($_GET, '
|
|||||||
|
|
||||||
echo '<table width="100%" cellpadding="3">';
|
echo '<table width="100%" cellpadding="3">';
|
||||||
echo '<tr><td valign="top">';
|
echo '<tr><td valign="top">';
|
||||||
foreach ($config['languages'] AS $lang => $langname) {
|
foreach ($config['languages'] as $lang => $langname) {
|
||||||
echo '<table class="tableview" width="100%">';
|
echo '<table class="tableview" width="100%">';
|
||||||
echo '<tr><th colspan="2">';
|
echo '<tr><th colspan="2">';
|
||||||
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -33,10 +34,14 @@ if (get_value_from_array($_POST, 'users_uid'))
|
|||||||
$uid = intval($_POST['users_uid']);
|
$uid = intval($_POST['users_uid']);
|
||||||
|
|
||||||
/* Now, start the output for this page */
|
/* Now, start the output for this page */
|
||||||
send_header('Committee Management',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Committee Management',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'committee_management');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'committee_management'
|
||||||
|
);
|
||||||
|
|
||||||
$_SESSION['last_page'] = 'committee_management';
|
$_SESSION['last_page'] = 'committee_management';
|
||||||
?>
|
?>
|
||||||
@ -44,15 +49,12 @@ $_SESSION['last_page'] = 'committee_management';
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<!--
|
<!--
|
||||||
|
function openeditor(id) {
|
||||||
function openeditor(id)
|
|
||||||
{
|
|
||||||
window.open("user_editor_window.php?id=" + id, "UserEditor", "location=no,menubar=no,directories=no,toolbar=no,width=770,height=500,scrollbars=yes");
|
window.open("user_editor_window.php?id=" + id, "UserEditor", "location=no,menubar=no,directories=no,toolbar=no,width=770,height=500,scrollbars=yes");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function neweditor()
|
function neweditor() {
|
||||||
{
|
|
||||||
var username = document.forms.addmember.add_member.value;
|
var username = document.forms.addmember.add_member.value;
|
||||||
window.open("user_editor_window.php?type=committee&username=" + username, "UserEditor", "location=no,menubar=no,directories=no,toolbar=no,width=770,height=500,scrollbars=yes");
|
window.open("user_editor_window.php?type=committee&username=" + username, "UserEditor", "location=no,menubar=no,directories=no,toolbar=no,width=770,height=500,scrollbars=yes");
|
||||||
document.forms.addmember.add_member.value = "";
|
document.forms.addmember.add_member.value = "";
|
||||||
@ -60,10 +62,8 @@ function neweditor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getElement(e,f)
|
function getElement(e, f) {
|
||||||
{
|
if (document.layers) {
|
||||||
if(document.layers)
|
|
||||||
{
|
|
||||||
f = (f) ? f : self;
|
f = (f) ? f : self;
|
||||||
if (f.document.layers[e]) {
|
if (f.document.layers[e]) {
|
||||||
return f.document.layers[e];
|
return f.document.layers[e];
|
||||||
@ -79,29 +79,24 @@ function getElement(e,f)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function actionChanged()
|
function actionChanged() {
|
||||||
{
|
|
||||||
if (document.forms.memberaction.action.selectedIndex == 1) //assign
|
if (document.forms.memberaction.action.selectedIndex == 1) //assign
|
||||||
{
|
{
|
||||||
getElement('assigndiv').style.display = 'block';
|
getElement('assigndiv').style.display = 'block';
|
||||||
|
|
||||||
}
|
} else // edit or delete
|
||||||
else // edit or delete
|
|
||||||
{
|
{
|
||||||
getElement('assigndiv').style.display = 'none';
|
getElement('assigndiv').style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function actionSubmit()
|
function actionSubmit() {
|
||||||
{
|
if (document.forms.memberaction.action.selectedIndex == 0) {
|
||||||
if(document.forms.memberaction.action.selectedIndex==0)
|
|
||||||
{
|
|
||||||
alert('You must choose an action');
|
alert('You must choose an action');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(document.forms.memberaction.users_uid.selectedIndex==0)
|
if (document.forms.memberaction.users_uid.selectedIndex == 0) {
|
||||||
{
|
|
||||||
alert('You must choose a member');
|
alert('You must choose a member');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -120,7 +115,8 @@ function actionSubmit()
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//-->
|
//
|
||||||
|
-->
|
||||||
</script>
|
</script>
|
||||||
<?
|
<?
|
||||||
global $uid;
|
global $uid;
|
||||||
@ -366,4 +362,3 @@ if ($q->rowCount()) {
|
|||||||
|
|
||||||
send_footer();
|
send_footer();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -175,4 +175,3 @@ $mailqueries = array(
|
|||||||
'volunteers_active_incomplete_thisyear' => array('name' => 'Volunteers active for this year but not complete', 'query' =>
|
'volunteers_active_incomplete_thisyear' => array('name' => 'Volunteers active for this year but not complete', 'query' =>
|
||||||
"SELECT id, firstname, lastname, email FROM users LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id WHERE users.year='{$config['FAIRYEAR']}' AND users_volunteer.volunteer_complete='no' AND users_volunteer.volunteer_active='yes' AND users.deleted='no' AND users.types LIKE '%volunteer%' ORDER BY email"),
|
"SELECT id, firstname, lastname, email FROM users LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id WHERE users.year='{$config['FAIRYEAR']}' AND users_volunteer.volunteer_complete='no' AND users_volunteer.volunteer_active='yes' AND users.deleted='no' AND users.types LIKE '%volunteer%' ORDER BY email"),
|
||||||
);
|
);
|
||||||
?>
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -51,12 +52,25 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
$e = $q->fetch(PDO::FETCH_ASSOC);
|
$e = $q->fetch(PDO::FETCH_ASSOC);
|
||||||
?>
|
?>
|
||||||
<table class="editor">
|
<table class="editor">
|
||||||
<tr><td class="label" style="width:15%"><?= i18n('Name') ?>:</td><td class="input"><?= $e['name'] ?></td></tr>
|
<tr>
|
||||||
<tr><td class="label"><?= i18n('Subject') ?>:</td><td class="input"><?= $e['subject'] ?></td></tr>
|
<td class="label" style="width:15%"><?= i18n('Name') ?>:</td>
|
||||||
<tr><td class="label"><?= i18n('From Address') ?>:</td><td class="input"><?= $e['from'] ?></td></tr>
|
<td class="input"><?= $e['name'] ?></td>
|
||||||
<tr><td></td><td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="label"><?= i18n('Subject') ?>:</td>
|
||||||
|
<td class="input"><?= $e['subject'] ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="label"><?= i18n('From Address') ?>:</td>
|
||||||
|
<td class="input"><?= $e['from'] ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>
|
||||||
<div style="border:1px solid black; overflow:auto; height=300px;"><?= $e['bodyhtml'] ?></div>
|
<div style="border:1px solid black; overflow:auto; height=300px;"><?= $e['bodyhtml'] ?></div>
|
||||||
</td></tr></table>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<?
|
<?
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
@ -65,7 +79,9 @@ case 'dialog_choose':
|
|||||||
<div id="comm_dialog_choose" title="Select a Communication" style="display: none">
|
<div id="comm_dialog_choose" title="Select a Communication" style="display: none">
|
||||||
<h4><?= i18n('Select a Communication') ?>:</h4>
|
<h4><?= i18n('Select a Communication') ?>:</h4>
|
||||||
<form id="choose" onchange="dialog_choose_change()" onkeypress="dialog_choose_change()">
|
<form id="choose" onchange="dialog_choose_change()" onkeypress="dialog_choose_change()">
|
||||||
<table style="width:100%"><tr><td>
|
<table style="width:100%">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
<select id="comm_dialog_choose_emails_id">
|
<select id="comm_dialog_choose_emails_id">
|
||||||
<option value="-1">-- <?= i18n('Choose a Communication') ?> --</option>
|
<option value="-1">-- <?= i18n('Choose a Communication') ?> --</option>
|
||||||
<?
|
<?
|
||||||
@ -77,10 +93,13 @@ case 'dialog_choose':
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td><td style="text-align:right">
|
</td>
|
||||||
|
<td style="text-align:right">
|
||||||
<input class="comm_dialog_choose_email_button" disabled="disabled" type="submit" value="<?= i18n('Choose') ?>">
|
<input class="comm_dialog_choose_email_button" disabled="disabled" type="submit" value="<?= i18n('Choose') ?>">
|
||||||
<input class="comm_dialog_choose_cancel_button" type="submit" value="<?= i18n('Cancel') ?>">
|
<input class="comm_dialog_choose_cancel_button" type="submit" value="<?= i18n('Cancel') ?>">
|
||||||
</td></tr></table>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<hr />
|
<hr />
|
||||||
<div id="comm_dialog_choose_info"></div>
|
<div id="comm_dialog_choose_info"></div>
|
||||||
<hr />
|
<hr />
|
||||||
@ -102,8 +121,7 @@ case 'dialog_choose':
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function dialog_choose_change()
|
function dialog_choose_change() {
|
||||||
{
|
|
||||||
var sel = $("#comm_dialog_choose_emails_id").val();
|
var sel = $("#comm_dialog_choose_emails_id").val();
|
||||||
$("#comm_dialog_choose_info").html("Loading...");
|
$("#comm_dialog_choose_info").html("Loading...");
|
||||||
$("#comm_dialog_choose_info").load("<?= $config['SFIABDIRECTORY'] ?>/admin/communication.php?action=dialog_choose_load&emails_id=" + sel);
|
$("#comm_dialog_choose_info").load("<?= $config['SFIABDIRECTORY'] ?>/admin/communication.php?action=dialog_choose_load&emails_id=" + sel);
|
||||||
@ -116,8 +134,10 @@ case 'dialog_choose':
|
|||||||
}
|
}
|
||||||
|
|
||||||
$("#comm_dialog_choose").dialog({
|
$("#comm_dialog_choose").dialog({
|
||||||
bgiframe: true, autoOpen: true,
|
bgiframe: true,
|
||||||
modal: true, resizable: false,
|
autoOpen: true,
|
||||||
|
modal: true,
|
||||||
|
resizable: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
width: 700, //(document.documentElement.clientWidth * 0.8);
|
width: 700, //(document.documentElement.clientWidth * 0.8);
|
||||||
height: (document.documentElement.clientHeight * 0.8),
|
height: (document.documentElement.clientHeight * 0.8),
|
||||||
@ -136,7 +156,6 @@ case 'dialog_choose':
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?
|
<?
|
||||||
exit;
|
exit;
|
||||||
@ -296,21 +315,31 @@ case 'dialog_edit':
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="label"><?= i18n('Description') ?>:</td>
|
<td class="label"><?= i18n('Description') ?>:</td>
|
||||||
<td class="input"><input type="text" name="description" size="60" value="<?= $description ?>" /></td>
|
<td class="input"><input type="text" name="description" size="60" value="<?= $description ?>" /></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
<tr><td colspan="2"><hr /></td>
|
<tr>
|
||||||
</tr><tr>
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<hr />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="label"><?= i18n('From Address') ?>:</td>
|
<td class="label"><?= i18n('From Address') ?>:</td>
|
||||||
<td class="input"><input type="text" name="from" size="60" value="<?= $from ?>" /></td>
|
<td class="input"><input type="text" name="from" size="60" value="<?= $from ?>" /></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="label"><?= i18n('Subject') ?>:</td>
|
<td class="label"><?= i18n('Subject') ?>:</td>
|
||||||
<td class="input"><input type="text" name="subject" size="60" value="<?= $subject ?>" /></td>
|
<td class="input"><input type="text" name="subject" size="60" value="<?= $subject ?>" /></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td colspan="2" class="input">
|
<td colspan="2" class="input">
|
||||||
<table width="100%"><tr><td width="85%">
|
<table width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width="85%">
|
||||||
<div id="fck">
|
<div id="fck">
|
||||||
<textarea id="bodyhtml" name="bodyhtml" rows=6 cols=80><?= $bodyhtml ?></textarea>
|
<textarea id="bodyhtml" name="bodyhtml" rows=6 cols=80><?= $bodyhtml ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
</td><td width="15%">
|
</td>
|
||||||
|
<td width="15%">
|
||||||
<select id="comm_dialog_insert_field" name="insert_field" size="20" style="height:300">
|
<select id="comm_dialog_insert_field" name="insert_field" size="20" style="height:300">
|
||||||
<option value="EMAIL">[EMAIL]</option>
|
<option value="EMAIL">[EMAIL]</option>
|
||||||
<option value="FAIRNAME">[FAIRNAME]</option>
|
<option value="FAIRNAME">[FAIRNAME]</option>
|
||||||
@ -324,9 +353,12 @@ case 'dialog_edit':
|
|||||||
<option value="URLLOGIN">[URLLOGIN]</option>
|
<option value="URLLOGIN">[URLLOGIN]</option>
|
||||||
<option value="ACCESSCODE" title="School Access Code">[ACCESSCODE]</option>
|
<option value="ACCESSCODE" title="School Access Code">[ACCESSCODE]</option>
|
||||||
</select>
|
</select>
|
||||||
</td></tr></table>
|
|
||||||
</td>
|
</td>
|
||||||
</tr></table>
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<hr />
|
<hr />
|
||||||
<div align="right">
|
<div align="right">
|
||||||
<input type="submit" id="comm_dialog_edit_save_button" value="<?= i18n('Save') ?>" />
|
<input type="submit" id="comm_dialog_edit_save_button" value="<?= i18n('Save') ?>" />
|
||||||
@ -347,17 +379,17 @@ case 'dialog_edit':
|
|||||||
$('#comm_dialog_edit').dialog("close");
|
$('#comm_dialog_edit').dialog("close");
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
$("#comm_dialog_edit_cancel_button").click(function() {
|
$("#comm_dialog_edit_cancel_button").click(function() {
|
||||||
$('#comm_dialog_edit').dialog("close");
|
$('#comm_dialog_edit').dialog("close");
|
||||||
return false;
|
return false;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
$("#comm_dialog_edit").dialog({
|
$("#comm_dialog_edit").dialog({
|
||||||
bgiframe: true, autoOpen: true,
|
bgiframe: true,
|
||||||
modal: true, resizable: false,
|
autoOpen: true,
|
||||||
|
modal: true,
|
||||||
|
resizable: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
width: 800, //(document.documentElement.clientWidth * 0.8);
|
width: 800, //(document.documentElement.clientWidth * 0.8);
|
||||||
height: (document.documentElement.clientHeight * 0.8),
|
height: (document.documentElement.clientHeight * 0.8),
|
||||||
@ -386,8 +418,7 @@ case 'dialog_edit':
|
|||||||
var value = oFCKeditor.GetHTML();
|
var value = oFCKeditor.GetHTML();
|
||||||
oFCKeditor.InsertHtml("[" + this.value + "]");
|
oFCKeditor.InsertHtml("[" + this.value + "]");
|
||||||
return false;
|
return false;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
var oFCKeditor = new FCKeditor('bodyhtml');
|
var oFCKeditor = new FCKeditor('bodyhtml');
|
||||||
@ -464,7 +495,10 @@ case 'dialog_send':
|
|||||||
$(".comm_dialog_send_send_button").click(function() {
|
$(".comm_dialog_send_send_button").click(function() {
|
||||||
$("#comm_dialog_send_info").hide();
|
$("#comm_dialog_send_info").hide();
|
||||||
$("#comm_dialog_send_processing").show();
|
$("#comm_dialog_send_processing").show();
|
||||||
$.post("communication.php?action=sendqueue",{fundraising_campaigns_id: <?= $fcid ?>, emails_id: <?= $emailid ?>}, function() {
|
$.post("communication.php?action=sendqueue", {
|
||||||
|
fundraising_campaigns_id: <?= $fcid ?>,
|
||||||
|
emails_id: <?= $emailid ?>
|
||||||
|
}, function() {
|
||||||
$("#comm_dialog_send_processing").hide();
|
$("#comm_dialog_send_processing").hide();
|
||||||
$("#comm_dialog_send_status").show();
|
$("#comm_dialog_send_status").show();
|
||||||
});
|
});
|
||||||
@ -489,8 +523,10 @@ case 'dialog_send':
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#comm_dialog_send").dialog({
|
$("#comm_dialog_send").dialog({
|
||||||
bgiframe: true, autoOpen: true,
|
bgiframe: true,
|
||||||
modal: true, resizable: false,
|
autoOpen: true,
|
||||||
|
modal: true,
|
||||||
|
resizable: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
width: 600, //(document.documentElement.clientWidth * 0.8);
|
width: 600, //(document.documentElement.clientWidth * 0.8);
|
||||||
close: function() {
|
close: function() {
|
||||||
@ -502,7 +538,6 @@ case 'dialog_send':
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?
|
<?
|
||||||
exit;
|
exit;
|
||||||
@ -551,19 +586,23 @@ case 'dialog_sender':
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="label"><?= i18n('From') ?>:</td>
|
<td class="label"><?= i18n('From') ?>:</td>
|
||||||
<td class="input"><input type="text" name="from" size="60" value="<?= $from ?>" /></td>
|
<td class="input"><input type="text" name="from" size="60" value="<?= $from ?>" /></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="label"><?= i18n('To') ?>:</td>
|
<td class="label"><?= i18n('To') ?>:</td>
|
||||||
<td class="input"><input type="text" name="to" size="60" value="<?= $to ?>" /></td>
|
<td class="input"><input type="text" name="to" size="60" value="<?= $to ?>" /></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="label"><?= i18n('Subject') ?>:</td>
|
<td class="label"><?= i18n('Subject') ?>:</td>
|
||||||
<td class="input"><input type="text" name="subject" size="60" value="<?= $subject ?>" /></td>
|
<td class="input"><input type="text" name="subject" size="60" value="<?= $subject ?>" /></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td colspan="2" class="input">
|
<td colspan="2" class="input">
|
||||||
<div id="fck">
|
<div id="fck">
|
||||||
<textarea id="bodyhtml" name="bodyhtml" rows=6 cols=80><?= $bodyhtml ?></textarea>
|
<textarea id="bodyhtml" name="bodyhtml" rows=6 cols=80><?= $bodyhtml ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr></table>
|
</tr>
|
||||||
|
</table>
|
||||||
<hr />
|
<hr />
|
||||||
<div align="right">
|
<div align="right">
|
||||||
<input type="submit" id="comm_dialog_sender_send_button" value="<?= i18n('Send') ?>" />
|
<input type="submit" id="comm_dialog_sender_send_button" value="<?= i18n('Send') ?>" />
|
||||||
@ -582,17 +621,17 @@ case 'dialog_sender':
|
|||||||
$('#comm_dialog_sender').dialog("close");
|
$('#comm_dialog_sender').dialog("close");
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
$("#comm_dialog_sender_cancel_button").click(function() {
|
$("#comm_dialog_sender_cancel_button").click(function() {
|
||||||
$('#comm_dialog_sender').dialog("close");
|
$('#comm_dialog_sender').dialog("close");
|
||||||
return false;
|
return false;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
$("#comm_dialog_sender").dialog({
|
$("#comm_dialog_sender").dialog({
|
||||||
bgiframe: true, autoOpen: true,
|
bgiframe: true,
|
||||||
modal: true, resizable: false,
|
autoOpen: true,
|
||||||
|
modal: true,
|
||||||
|
resizable: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
width: 800, //(document.documentElement.clientWidth * 0.8);
|
width: 800, //(document.documentElement.clientWidth * 0.8);
|
||||||
close: function() {
|
close: function() {
|
||||||
@ -762,10 +801,14 @@ if (get_value_from_array($_GET, 'action') == 'sendqueue') {
|
|||||||
launchQueue();
|
launchQueue();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
send_header('Communication',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Communication',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'communication');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'communication'
|
||||||
|
);
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -779,6 +822,7 @@ echo '<br />';
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadAddresses() {
|
function loadAddresses() {
|
||||||
$("#toaddresses").load("communication.php?action=loadaddresses&query=" + $("#to").val());
|
$("#toaddresses").load("communication.php?action=loadaddresses&query=" + $("#to").val());
|
||||||
}
|
}
|
||||||
@ -809,7 +853,7 @@ if (get_value_from_array($_GET, 'action') == 'send' && get_value_from_array($_GE
|
|||||||
echo '<select name="to" id="to" onchange="loadAddresses();">';
|
echo '<select name="to" id="to" onchange="loadAddresses();">';
|
||||||
echo ' <option value="">Choose Email Recipients</option>';
|
echo ' <option value="">Choose Email Recipients</option>';
|
||||||
$str = '';
|
$str = '';
|
||||||
foreach ($mailqueries AS $k => $mq) {
|
foreach ($mailqueries as $k => $mq) {
|
||||||
$tq = $pdo->prepare($mq['query']);
|
$tq = $pdo->prepare($mq['query']);
|
||||||
|
|
||||||
$tq->execute();
|
$tq->execute();
|
||||||
@ -982,8 +1026,7 @@ if (get_value_from_array($_GET, 'action') == 'send' && get_value_from_array($_GE
|
|||||||
}
|
}
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
refreshEmailList();
|
refreshEmailList();
|
||||||
}
|
});
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -120,16 +121,21 @@ if (get_value_from_array($_GET, 'action') == 'status') {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header('Communication Sending Status',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Communication Sending Status',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Communication' => 'admin/communication.php'));
|
'Communication' => 'admin/communication.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
refreshStatus();
|
refreshStatus();
|
||||||
});
|
});
|
||||||
var refreshTimeout;
|
var refreshTimeout;
|
||||||
|
|
||||||
function refreshStatus() {
|
function refreshStatus() {
|
||||||
$("#queuestatus").load("communication_send_status.php?action=status", null, function() {
|
$("#queuestatus").load("communication_send_status.php?action=status", null, function() {
|
||||||
<? if ($config['emailqueue_lock']) { ?>
|
<? if ($config['emailqueue_lock']) { ?>
|
||||||
@ -146,9 +152,10 @@ send_header('Communication Sending Status',
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cancelQueue(id) {
|
function cancelQueue(id) {
|
||||||
$("#debug").load("communication.php?action=cancel&cancel="+id,null,function() { if(!refreshTimeout) refreshStatus(); });
|
$("#debug").load("communication.php?action=cancel&cancel=" + id, null, function() {
|
||||||
|
if (!refreshTimeout) refreshStatus();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?
|
<?
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2009 David Grant <dave@lightbox.org>
|
* Copyright (C) 2009 David Grant <dave@lightbox.org>
|
||||||
@ -66,8 +66,10 @@ function curl_query($fair, $data, $ysc_url = '')
|
|||||||
$url = $fair['url'] . '/remote.php';
|
$url = $fair['url'] . '/remote.php';
|
||||||
$var = 'json';
|
$var = 'json';
|
||||||
$d = array();
|
$d = array();
|
||||||
$d['auth'] = array('username' => $fair['username'],
|
$d['auth'] = array(
|
||||||
'password' => $fair['password']);
|
'username' => $fair['username'],
|
||||||
|
'password' => $fair['password']
|
||||||
|
);
|
||||||
$str = json_encode(array_merge($d, $data));
|
$str = json_encode(array_merge($d, $data));
|
||||||
break;
|
break;
|
||||||
case 'ysc':
|
case 'ysc':
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -119,14 +120,18 @@ function get_cwsf_award_winners()
|
|||||||
require('../common.inc.php');
|
require('../common.inc.php');
|
||||||
require('../projects.inc.php');
|
require('../projects.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
send_header('One-Click CWSF Registration',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'One-Click CWSF Registration',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'one-click_cwsf_registration');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'one-click_cwsf_registration'
|
||||||
|
);
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
|
||||||
if (count(get_value_from_array($_POST, 'cwsfdivision', []))) {
|
if (count(get_value_from_array($_POST, 'cwsfdivision', []))) {
|
||||||
foreach ($_POST['cwsfdivision'] AS $p => $d) {
|
foreach ($_POST['cwsfdivision'] as $p => $d) {
|
||||||
$q = $pdo->prepare("UPDATE projects SET cwsfdivisionid=? WHERE id=?");
|
$q = $pdo->prepare("UPDATE projects SET cwsfdivisionid=? WHERE id=?");
|
||||||
$q->execute([$d, $p]);
|
$q->execute([$d, $p]);
|
||||||
}
|
}
|
||||||
@ -207,13 +212,13 @@ if ($ok) {
|
|||||||
echo '<th>' . i18n('Project Division / CWSF Project Division') . '</th>';
|
echo '<th>' . i18n('Project Division / CWSF Project Division') . '</th>';
|
||||||
echo '</tr></thead>';
|
echo '</tr></thead>';
|
||||||
|
|
||||||
foreach ($winners AS $winner) {
|
foreach ($winners as $winner) {
|
||||||
echo '<tr><td>';
|
echo '<tr><td>';
|
||||||
echo '<b>';
|
echo '<b>';
|
||||||
echo $winner['projectnumber'] . ' - ' . $winner['title'];
|
echo $winner['projectnumber'] . ' - ' . $winner['title'];
|
||||||
echo '</b>';
|
echo '</b>';
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
foreach ($winner['students'] AS $s) {
|
foreach ($winner['students'] as $s) {
|
||||||
echo ' ';
|
echo ' ';
|
||||||
echo ' ';
|
echo ' ';
|
||||||
echo ' ';
|
echo ' ';
|
||||||
@ -261,7 +266,7 @@ if ($ok) {
|
|||||||
|
|
||||||
echo '<select name="cwsfdivision[' . $winner['projectid'] . ']">';
|
echo '<select name="cwsfdivision[' . $winner['projectid'] . ']">';
|
||||||
echo '<option value="">' . i18n('No corresponding CWSF division') . "</option>\n";
|
echo '<option value="">' . i18n('No corresponding CWSF division') . "</option>\n";
|
||||||
foreach ($CWSFDivisions AS $k => $v) {
|
foreach ($CWSFDivisions as $k => $v) {
|
||||||
if ($winner['division_id']) {
|
if ($winner['division_id']) {
|
||||||
if ($k == $winner['division_id'])
|
if ($k == $winner['division_id'])
|
||||||
$sel = 'selected="selected"';
|
$sel = 'selected="selected"';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
||||||
*
|
*
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -33,18 +33,24 @@ if (!file_exists('../data/documents/.htaccess'))
|
|||||||
file_put_contents('../data/documents/.htaccess', "Order Deny,Allow\r\nDeny From All\r\n");
|
file_put_contents('../data/documents/.htaccess', "Order Deny,Allow\r\nDeny From All\r\n");
|
||||||
|
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
send_header('Internal Document Manager',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Internal Document Manager',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'internal_document_management');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'internal_document_management'
|
||||||
|
);
|
||||||
|
|
||||||
$editor = new TableEditor('documents',
|
$editor = new TableEditor(
|
||||||
|
'documents',
|
||||||
array(
|
array(
|
||||||
'date' => 'Date',
|
'date' => 'Date',
|
||||||
'title' => 'Document Title',
|
'title' => 'Document Title',
|
||||||
'sel_category' => 'Category',
|
'sel_category' => 'Category',
|
||||||
'filename' => 'Filename',
|
'filename' => 'Filename',
|
||||||
));
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$editor->setPrimaryKey('id');
|
$editor->setPrimaryKey('id');
|
||||||
$editor->setUploadPath('../data/documents');
|
$editor->setUploadPath('../data/documents');
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 James Grant <james@lightbox.org>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -32,25 +32,33 @@ include ('fundraising_sponsorship_handler.inc.php');
|
|||||||
include('fundraising_goals_handler.inc.php');
|
include('fundraising_goals_handler.inc.php');
|
||||||
include('fundraising_main.inc.php');
|
include('fundraising_main.inc.php');
|
||||||
|
|
||||||
send_header('Donations',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Donations',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Fundraising' => 'admin/fundraising.php'),
|
'Fundraising' => 'admin/fundraising.php'
|
||||||
'fundraising');
|
),
|
||||||
|
'fundraising'
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
//initialize the dialog
|
//initialize the dialog
|
||||||
$("#sponsorship_editor").dialog({
|
$("#sponsorship_editor").dialog({
|
||||||
bgiframe: true, autoOpen: false,
|
bgiframe: true,
|
||||||
modal: true, resizable: false,
|
autoOpen: false,
|
||||||
|
modal: true,
|
||||||
|
resizable: false,
|
||||||
draggable: false
|
draggable: false
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#fund_editor").dialog({
|
$("#fund_editor").dialog({
|
||||||
bgiframe: true, autoOpen: false,
|
bgiframe: true,
|
||||||
modal: true, resizable: falsefundraising,
|
autoOpen: false,
|
||||||
|
modal: true,
|
||||||
|
resizable: falsefundraising,
|
||||||
draggable: false
|
draggable: false
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -66,8 +74,14 @@ function popup_sponsorship_editor(url) {
|
|||||||
var h = (document.documentElement.clientHeight * 0.6);
|
var h = (document.documentElement.clientHeight * 0.6);
|
||||||
$('#sponsorship_editor').dialog('option','height',h);
|
$('#sponsorship_editor').dialog('option','height',h);
|
||||||
*/
|
*/
|
||||||
$('#sponsorship_editor').dialog('option','buttons',{ "<?= i18n('Save') ?>": function() { save_sponsorship(); },
|
$('#sponsorship_editor').dialog('option', 'buttons', {
|
||||||
"<?= i18n('Cancel') ?>": function(){ $(this).dialog("close");}});
|
"<?= i18n('Save') ?>": function() {
|
||||||
|
save_sponsorship();
|
||||||
|
},
|
||||||
|
"<?= i18n('Cancel') ?>": function() {
|
||||||
|
$(this).dialog("close");
|
||||||
|
}
|
||||||
|
});
|
||||||
$('#sponsorship_editor').dialog('open');
|
$('#sponsorship_editor').dialog('open');
|
||||||
|
|
||||||
$('#sponsorship_editor_content').load(url);
|
$('#sponsorship_editor_content').load(url);
|
||||||
@ -93,8 +107,14 @@ function popup_fund_editor(url) {
|
|||||||
var h = (document.documentElement.clientHeight * 0.6);
|
var h = (document.documentElement.clientHeight * 0.6);
|
||||||
$('#fund_editor').dialog('option','height',h);
|
$('#fund_editor').dialog('option','height',h);
|
||||||
*/
|
*/
|
||||||
$('#fund_editor').dialog('option','buttons',{ "<?= i18n('Save') ?>": function() { save_fund(); },
|
$('#fund_editor').dialog('option', 'buttons', {
|
||||||
"<?= i18n('Cancel') ?>": function(){ $(this).dialog("close");}});
|
"<?= i18n('Save') ?>": function() {
|
||||||
|
save_fund();
|
||||||
|
},
|
||||||
|
"<?= i18n('Cancel') ?>": function() {
|
||||||
|
$(this).dialog("close");
|
||||||
|
}
|
||||||
|
});
|
||||||
$('#fund_editor').dialog('open');
|
$('#fund_editor').dialog('open');
|
||||||
|
|
||||||
$('#fund_editor_content').load(url);
|
$('#fund_editor_content').load(url);
|
||||||
@ -114,8 +134,10 @@ function save_fund() {
|
|||||||
|
|
||||||
function delete_fund(id) {
|
function delete_fund(id) {
|
||||||
if (confirmClick('Are you sure you want to remove this fund?')) {
|
if (confirmClick('Are you sure you want to remove this fund?')) {
|
||||||
$('#debug').load("<?= $config['SFIABDIRECTORY'] ?>/admin/fundraising.php",
|
$('#debug').load("<?= $config['SFIABDIRECTORY'] ?>/admin/fundraising.php", {
|
||||||
{ action: 'funddelete', delete: id },
|
action: 'funddelete',
|
||||||
|
delete: id
|
||||||
|
},
|
||||||
function() {
|
function() {
|
||||||
refresh_fundraising_table();
|
refresh_fundraising_table();
|
||||||
}
|
}
|
||||||
@ -126,8 +148,10 @@ function delete_fund(id) {
|
|||||||
|
|
||||||
function delete_sponsorship(id) {
|
function delete_sponsorship(id) {
|
||||||
if (confirmClick('Are you sure you want to remove this sponsorship?')) {
|
if (confirmClick('Are you sure you want to remove this sponsorship?')) {
|
||||||
$('#debug').load("<?= $config['SFIABDIRECTORY'] ?>/admin/fundraising.php",
|
$('#debug').load("<?= $config['SFIABDIRECTORY'] ?>/admin/fundraising.php", {
|
||||||
{ action: 'sponsorshipdelete', delete: id },
|
action: 'sponsorshipdelete',
|
||||||
|
delete: id
|
||||||
|
},
|
||||||
function() {
|
function() {
|
||||||
refresh_fundraising_table();
|
refresh_fundraising_table();
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2008 James Grant <james@lightbox.org>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2008 James Grant <james@lightbox.org>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -37,7 +37,7 @@ if (get_value_from_array($_POST, 'search'))
|
|||||||
// NEEDS AN ARRAY AS AN ARGUMENT INSTEAD OF A STRING
|
// NEEDS AN ARRAY AS AN ARGUMENT INSTEAD OF A STRING
|
||||||
if (count(get_value_from_array($_POST, 'donortype', []))) {
|
if (count(get_value_from_array($_POST, 'donortype', []))) {
|
||||||
$sql .= ' AND (0 ';
|
$sql .= ' AND (0 ';
|
||||||
foreach ($_POST['donortype'] AS $d) {
|
foreach ($_POST['donortype'] as $d) {
|
||||||
$sql .= " OR donortype='$d'";
|
$sql .= " OR donortype='$d'";
|
||||||
}
|
}
|
||||||
$sql .= ') ';
|
$sql .= ') ';
|
||||||
@ -69,7 +69,7 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
|||||||
$thisyearsort = array();
|
$thisyearsort = array();
|
||||||
if (!get_value_from_array($_POST, 'order')) {
|
if (!get_value_from_array($_POST, 'order')) {
|
||||||
// if order is not given, lets order by donation amount this year
|
// if order is not given, lets order by donation amount this year
|
||||||
foreach ($rows AS $key => $val) {
|
foreach ($rows as $key => $val) {
|
||||||
$thisyearsort[$key] = $val['thisyeartotal'];
|
$thisyearsort[$key] = $val['thisyeartotal'];
|
||||||
}
|
}
|
||||||
array_multisort($thisyearsort, SORT_DESC, $rows);
|
array_multisort($thisyearsort, SORT_DESC, $rows);
|
||||||
@ -93,7 +93,7 @@ echo '</tr>';
|
|||||||
echo "</thead>\n";
|
echo "</thead>\n";
|
||||||
|
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($rows AS $r) {
|
foreach ($rows as $r) {
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
$eh = "style=\"cursor:pointer;\" onclick=\"open_editor({$r['id']});\"";
|
$eh = "style=\"cursor:pointer;\" onclick=\"open_editor({$r['id']});\"";
|
||||||
echo " <td $eh>{$r['name']}</td>\n";
|
echo " <td $eh>{$r['name']}</td>\n";
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 David Grant <dave@lightbox.org>
|
* Copyright (C) 2010 David Grant <dave@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -308,10 +308,14 @@ foreach ($exhibithall as &$i_eh) {
|
|||||||
$i_eh['grid_h'] = $iy + 1;
|
$i_eh['grid_h'] = $iy + 1;
|
||||||
/* Initialize element if required */
|
/* Initialize element if required */
|
||||||
if (!is_array($i_eh[$ix][$iy])) {
|
if (!is_array($i_eh[$ix][$iy])) {
|
||||||
$i_eh[$ix][$iy] = array('x' => $x, 'ix' => $ix,
|
$i_eh[$ix][$iy] = array(
|
||||||
'y' => $y, 'iy' => $iy,
|
'x' => $x,
|
||||||
|
'ix' => $ix,
|
||||||
|
'y' => $y,
|
||||||
|
'iy' => $iy,
|
||||||
'ids' => array(),
|
'ids' => array(),
|
||||||
'project_front' => 0);
|
'project_front' => 0
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scan all objects */
|
/* Scan all objects */
|
||||||
@ -604,8 +608,14 @@ $project_ids = array_keys($projects);
|
|||||||
|
|
||||||
// array_splice($project_ids, 20);
|
// array_splice($project_ids, 20);
|
||||||
|
|
||||||
$a = new annealer(count($floor_objects), 125, $e, 0.9,
|
$a = new annealer(
|
||||||
project_cost, $project_ids);
|
count($floor_objects),
|
||||||
|
125,
|
||||||
|
$e,
|
||||||
|
0.9,
|
||||||
|
project_cost,
|
||||||
|
$project_ids
|
||||||
|
);
|
||||||
$a->set_max_items_per_bucket(1);
|
$a->set_max_items_per_bucket(1);
|
||||||
// $a->set_delta_cost_bucket_ids_callback(project_bucket_ids);
|
// $a->set_delta_cost_bucket_ids_callback(project_bucket_ids);
|
||||||
$a->anneal();
|
$a->anneal();
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -31,9 +32,11 @@ require ('../lpdf.php');
|
|||||||
$catq = $pdo->prepare("SELECT * FROM projectcategories WHERE year='" . $config['FAIRYEAR'] . "' AND id='" . $_GET['cat'] . "'");
|
$catq = $pdo->prepare("SELECT * FROM projectcategories WHERE year='" . $config['FAIRYEAR'] . "' AND id='" . $_GET['cat'] . "'");
|
||||||
$catq->execute();
|
$catq->execute();
|
||||||
if ($catr = $catq->fetch(PDO::FETCH_OBJ)) {
|
if ($catr = $catq->fetch(PDO::FETCH_OBJ)) {
|
||||||
$pdf = new lpdf(i18n($config['fairname']),
|
$pdf = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
i18n('Checkin List') . ' - ' . i18n($catr->category),
|
i18n('Checkin List') . ' - ' . i18n($catr->category),
|
||||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||||
|
);
|
||||||
|
|
||||||
$pdf->newPage();
|
$pdf->newPage();
|
||||||
$pdf->setFontSize(11);
|
$pdf->setFontSize(11);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2009 David Grant <dave@lightbox.org>
|
* Copyright (C) 2009 David Grant <dave@lightbox.org>
|
||||||
@ -65,10 +65,14 @@ function stats_to_ysc($fair, $stats)
|
|||||||
return $stats;
|
return $stats;
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header('Upload Fair Statistics and Information',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Upload Fair Statistics and Information',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'fair_stats');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'fair_stats'
|
||||||
|
);
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
|
||||||
/* SFIAB config options server side */
|
/* SFIAB config options server side */
|
||||||
@ -121,8 +125,11 @@ if ($action == 'sendstats') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (function_exists('curl_init')) {
|
if (function_exists('curl_init')) {
|
||||||
$r = curl_query($fair, $req,
|
$r = curl_query(
|
||||||
'https://secure.ysf-fsj.ca/registration/xmlaffiliation.php');
|
$fair,
|
||||||
|
$req,
|
||||||
|
'https://secure.ysf-fsj.ca/registration/xmlaffiliation.php'
|
||||||
|
);
|
||||||
if ($r['error'] == 0)
|
if ($r['error'] == 0)
|
||||||
echo happy(i18n('The %1 Server said:', array($fair['name'])) . ' ' . $r['message']);
|
echo happy(i18n('The %1 Server said:', array($fair['name'])) . ' ' . $r['message']);
|
||||||
else
|
else
|
||||||
@ -271,8 +278,21 @@ $stats['students_total'] = $q->rowCount();
|
|||||||
$stats['students_public'] = 0;
|
$stats['students_public'] = 0;
|
||||||
$stats['students_private'] = 0;
|
$stats['students_private'] = 0;
|
||||||
$stats['students_atrisk'] = 0;
|
$stats['students_atrisk'] = 0;
|
||||||
$grademap = array(1 => 1, 2 => 1, 3 => 1, 4 => 4, 5 => 4, 6 => 4, 7 => 7, 8 => 7,
|
$grademap = array(
|
||||||
9 => 9, 10 => 9, 11 => 11, 12 => 11, 13 => 11);
|
1 => 1,
|
||||||
|
2 => 1,
|
||||||
|
3 => 1,
|
||||||
|
4 => 4,
|
||||||
|
5 => 4,
|
||||||
|
6 => 4,
|
||||||
|
7 => 7,
|
||||||
|
8 => 7,
|
||||||
|
9 => 9,
|
||||||
|
10 => 9,
|
||||||
|
11 => 11,
|
||||||
|
12 => 11,
|
||||||
|
13 => 11
|
||||||
|
);
|
||||||
foreach ($grademap as $k => $g) {
|
foreach ($grademap as $k => $g) {
|
||||||
$stats["male_$g"] = 0;
|
$stats["male_$g"] = 0;
|
||||||
$stats["female_$g"] = 0;
|
$stats["female_$g"] = 0;
|
||||||
@ -454,15 +474,18 @@ if ($server_config['schools_ext']) {
|
|||||||
echo '<h3>' . i18n('%1 Extended School/Participant data', array($year)) . '</h3>';
|
echo '<h3>' . i18n('%1 Extended School/Participant data', array($year)) . '</h3>';
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
echo i18n('Public schools: <b>%1</b> (<b>%2</b> students).', array(
|
echo i18n('Public schools: <b>%1</b> (<b>%2</b> students).', array(
|
||||||
$stats['schools_public'], $stats['students_public']
|
$stats['schools_public'],
|
||||||
|
$stats['students_public']
|
||||||
));
|
));
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
echo i18n('Private/Independent schools: <b>%1</b> (<b>%2</b> students).', array(
|
echo i18n('Private/Independent schools: <b>%1</b> (<b>%2</b> students).', array(
|
||||||
$stats['schools_private'], $stats['students_private']
|
$stats['schools_private'],
|
||||||
|
$stats['students_private']
|
||||||
));
|
));
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
echo i18n('At-risk/inner city schools: <b>%1</b> (<b>%2</b> students).', array(
|
echo i18n('At-risk/inner city schools: <b>%1</b> (<b>%2</b> students).', array(
|
||||||
$stats['schools_atrisk'], $stats['students_atrisk']
|
$stats['schools_atrisk'],
|
||||||
|
$stats['students_atrisk']
|
||||||
));
|
));
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
echo i18n('Number of school boards/distrcits: <b>%1</b>', array(
|
echo i18n('Number of school boards/distrcits: <b>%1</b>', array(
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?
|
<?
|
||||||
/*
|
/*
|
||||||
This file is part of the 'Science Fair In A Box' project
|
This file is part of the 'Science Fair In A Box' project
|
||||||
SFIAB Website: http://www.sfiab.ca
|
Science-ation Website: https://science-ation.ca/
|
||||||
|
|
||||||
Copyright (C) 2009 David Grant <dave@lightbox.org>
|
Copyright (C) 2009 David Grant <dave@lightbox.org>
|
||||||
|
|
||||||
@ -26,7 +26,8 @@
|
|||||||
require_once('../fair.inc.php');
|
require_once('../fair.inc.php');
|
||||||
|
|
||||||
$fair_type = array('feeder' => 'Feeder Fair', 'sfiab' => 'SFIAB Upstream', 'ysc' => 'YSC/CWSF Upstream');
|
$fair_type = array('feeder' => 'Feeder Fair', 'sfiab' => 'SFIAB Upstream', 'ysc' => 'YSC/CWSF Upstream');
|
||||||
$stats = array('participation' => 'Particpation Numbers',
|
$stats = array(
|
||||||
|
'participation' => 'Particpation Numbers',
|
||||||
'schools_ext' => 'Extra school participation data, number of public/private school students',
|
'schools_ext' => 'Extra school participation data, number of public/private school students',
|
||||||
'minorities' => 'Data on minority group participation',
|
'minorities' => 'Data on minority group participation',
|
||||||
'guests' => 'Number of student, public guests',
|
'guests' => 'Number of student, public guests',
|
||||||
@ -58,7 +59,6 @@
|
|||||||
echo "UPDATE fairs SET gather_stats='$s' WHERE id='$id'";
|
echo "UPDATE fairs SET gather_stats='$s' WHERE id='$id'";
|
||||||
happy_("Saved");
|
happy_("Saved");
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
}
|
}
|
||||||
/* Load the user we're editting */
|
/* Load the user we're editting */
|
||||||
$u = user_load($_SESSION['embed_edit_id']);
|
$u = user_load($_SESSION['embed_edit_id']);
|
||||||
@ -72,13 +72,10 @@
|
|||||||
<h4><?= i18n('Fair Stats Gathering') ?></h3>
|
<h4><?= i18n('Fair Stats Gathering') ?></h3>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
function stats_save() {
|
||||||
function stats_save()
|
|
||||||
{
|
|
||||||
$("#debug").load("fair_stats_select.php?action=save", $("#gather_stats").serializeArray());
|
$("#debug").load("fair_stats_select.php?action=save", $("#gather_stats").serializeArray());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
@ -106,6 +103,3 @@ function stats_save()
|
|||||||
<br />
|
<br />
|
||||||
<input type="submit" onClick="stats_save();return false;" value="Save" />
|
<input type="submit" onClick="stats_save();return false;" value="Save" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,5 +22,3 @@ while ($i = $q->fetch(PDO::FETCH_OBJ)) {
|
|||||||
$stmt->execute([$id, $config['FAIRYEAR']]);
|
$stmt->execute([$id, $config['FAIRYEAR']]);
|
||||||
show_pdo_errors_if_any($pdo);
|
show_pdo_errors_if_any($pdo);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -121,7 +121,9 @@ if (get_value_from_array($_GET, 'action') == 'refresh') {
|
|||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<script type="text/javascript"> $('.tableview').tablesorter();</script>
|
<script type="text/javascript">
|
||||||
|
$('.tableview').tablesorter();
|
||||||
|
</script>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<form id="thankyouform" method="post" action="fundraising.php">
|
<form id="thankyouform" method="post" action="fundraising.php">
|
||||||
@ -279,17 +281,21 @@ if (get_value_from_array($_GET, 'action') == 'refresh') {
|
|||||||
|
|
||||||
exit;
|
exit;
|
||||||
} else if (get_value_from_array($_POST, 'thanked')) {
|
} else if (get_value_from_array($_POST, 'thanked')) {
|
||||||
foreach ($_POST['thanked'] AS $t) {
|
foreach ($_POST['thanked'] as $t) {
|
||||||
$stmt = $pdo->prepare("UPDATE fundraising_donations SET thanked='yes' WHERE id='$t'");
|
$stmt = $pdo->prepare("UPDATE fundraising_donations SET thanked='yes' WHERE id='$t'");
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header('Fundraising',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Fundraising',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Fundraising' => 'admin/fundraising.php'),
|
'Fundraising' => 'admin/fundraising.php'
|
||||||
'fundraising');
|
),
|
||||||
|
'fundraising'
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
@ -309,11 +315,9 @@ function thanked() {
|
|||||||
//key is initial or followup
|
//key is initial or followup
|
||||||
//start is either 'new' to start with a blank, or 'existing' to load an existing email to start from
|
//start is either 'new' to start with a blank, or 'existing' to load an existing email to start from
|
||||||
function opencommunicationsender(uid, template) {
|
function opencommunicationsender(uid, template) {
|
||||||
$("#debug").load("communication.php?action=dialog_sender&uid="+uid+"&template=fundraising_thankyou_template",null,function() {
|
$("#debug").load("communication.php?action=dialog_sender&uid=" + uid + "&template=fundraising_thankyou_template", null, function() {});
|
||||||
});
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="dashboard"></div>
|
<div id="dashboard"></div>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -45,9 +45,11 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
echo "<table>\n";
|
echo "<table>\n";
|
||||||
display_campaign_form($r);
|
display_campaign_form($r);
|
||||||
?>
|
?>
|
||||||
<tr><td colspan="6" style="text-align: center;">
|
<tr>
|
||||||
|
<td colspan="6" style="text-align: center;">
|
||||||
<br />
|
<br />
|
||||||
<input type="submit" value="<?= i18n('Save Appeal') ?>"></td>
|
<input type="submit" value="<?= i18n('Save Appeal') ?>">
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
@ -63,9 +65,11 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
<?
|
<?
|
||||||
display_campaign_form();
|
display_campaign_form();
|
||||||
?>
|
?>
|
||||||
<tr><td colspan="6" style="text-align: center;">
|
<tr>
|
||||||
|
<td colspan="6" style="text-align: center;">
|
||||||
<br />
|
<br />
|
||||||
<input type="submit" value="<?= i18n('Create Appeal') ?>"></td>
|
<input type="submit" value="<?= i18n('Create Appeal') ?>">
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
@ -127,7 +131,9 @@ case 'managelist':
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<script type="text/javascript"> $('.tableview').tablesorter();</script>
|
<script type="text/javascript">
|
||||||
|
$('.tableview').tablesorter();
|
||||||
|
</script>
|
||||||
<br />
|
<br />
|
||||||
<?
|
<?
|
||||||
exit;
|
exit;
|
||||||
@ -268,7 +274,7 @@ case 'managelist':
|
|||||||
echo '<tr><td>' . i18n('Donor Type') . '</td><td>' . i18n(ucfirst($params['donortype'])) . "</td></tr>\n";
|
echo '<tr><td>' . i18n('Donor Type') . '</td><td>' . i18n(ucfirst($params['donortype'])) . "</td></tr>\n";
|
||||||
if (is_array($params['donationhistory'])) {
|
if (is_array($params['donationhistory'])) {
|
||||||
echo '<tr><td>' . i18n('Donation History') . '</td><td>';
|
echo '<tr><td>' . i18n('Donation History') . '</td><td>';
|
||||||
foreach ($params['donationhistory'] AS $d) {
|
foreach ($params['donationhistory'] as $d) {
|
||||||
echo i18n($donationhistorylist[$d]) . "<br />\n";
|
echo i18n($donationhistorylist[$d]) . "<br />\n";
|
||||||
}
|
}
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
@ -277,20 +283,20 @@ case 'managelist':
|
|||||||
// echo "</td></tr>\n";
|
// echo "</td></tr>\n";
|
||||||
if (is_array($params['emailaddress'])) {
|
if (is_array($params['emailaddress'])) {
|
||||||
echo '<tr><td>' . i18n('Email Address') . '</td><td>';
|
echo '<tr><td>' . i18n('Email Address') . '</td><td>';
|
||||||
foreach ($params['emailaddress'] AS $e) {
|
foreach ($params['emailaddress'] as $e) {
|
||||||
echo i18n($emailaddresslist[$e]) . "<br />\n";
|
echo i18n($emailaddresslist[$e]) . "<br />\n";
|
||||||
}
|
}
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
}
|
}
|
||||||
if ($params['donortype'] == 'individual' && is_array($params['individual_type'])) {
|
if ($params['donortype'] == 'individual' && is_array($params['individual_type'])) {
|
||||||
echo '<tr><td>' . i18n('Role') . '</td><td>';
|
echo '<tr><td>' . i18n('Role') . '</td><td>';
|
||||||
foreach ($params['individual_type'] AS $e) {
|
foreach ($params['individual_type'] as $e) {
|
||||||
echo i18n($rolelist[$e]) . "<br />\n";
|
echo i18n($rolelist[$e]) . "<br />\n";
|
||||||
}
|
}
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
} else if (is_array($params['contacttype'])) {
|
} else if (is_array($params['contacttype'])) {
|
||||||
echo '<tr><td>' . i18n('Role') . '</td><td>';
|
echo '<tr><td>' . i18n('Role') . '</td><td>';
|
||||||
foreach ($params['contacttype'] AS $e) {
|
foreach ($params['contacttype'] as $e) {
|
||||||
echo i18n(ucfirst($e)) . '<br />';
|
echo i18n(ucfirst($e)) . '<br />';
|
||||||
}
|
}
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
@ -342,22 +348,30 @@ case 'managelist':
|
|||||||
<form id="prospectform" onsubmit="return prospect_generatelist()">
|
<form id="prospectform" onsubmit="return prospect_generatelist()">
|
||||||
<input type="hidden" name="fundraising_campaigns_id" value="<?= $campaign_id ?>" />
|
<input type="hidden" name="fundraising_campaigns_id" value="<?= $campaign_id ?>" />
|
||||||
<table>
|
<table>
|
||||||
<tr><td style="width: 130px;"><?= i18n('Type') ?>:</td><td>
|
<tr>
|
||||||
|
<td style="width: 130px;"><?= i18n('Type') ?>:</td>
|
||||||
|
<td>
|
||||||
<label><input type="radio" name="donortype" value="organization" onchange="donortypechange()"><?= i18n('Organization') ?></label><br />
|
<label><input type="radio" name="donortype" value="organization" onchange="donortypechange()"><?= i18n('Organization') ?></label><br />
|
||||||
<label><input type="radio" name="donortype" value="individual" onchange="donortypechange()"><?= i18n('Individual') ?></label><br />
|
<label><input type="radio" name="donortype" value="individual" onchange="donortypechange()"><?= i18n('Individual') ?></label><br />
|
||||||
</td></tr>
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div id="prospect_common" style="display: none;">
|
<div id="prospect_common" style="display: none;">
|
||||||
<hr />
|
<hr />
|
||||||
<table>
|
<table>
|
||||||
<tr><td style="width: 130px;"><?= i18n('Donation History') ?>:</td><td>
|
<tr>
|
||||||
|
<td style="width: 130px;"><?= i18n('Donation History') ?>:</td>
|
||||||
|
<td>
|
||||||
<?
|
<?
|
||||||
foreach ($donationhistorylist AS $k => $v) {
|
foreach ($donationhistorylist as $k => $v) {
|
||||||
echo "<label><input onchange=\"return prospect_search()\" type=\"checkbox\" name=\"donationhistory[]\" value=\"$k\">" . i18n($v) . "</label><br />\n";
|
echo "<label><input onchange=\"return prospect_search()\" type=\"checkbox\" name=\"donationhistory[]\" value=\"$k\">" . i18n($v) . "</label><br />\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td></tr>
|
</td>
|
||||||
<tr><td><?= i18n('Donation Level') ?>:</td><td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?= i18n('Donation Level') ?>:</td>
|
||||||
|
<td>
|
||||||
<?
|
<?
|
||||||
$q = $pdo->prepare("SELECT * FROM fundraising_donor_levels WHERE fiscalyear='{$config['FISCALYEAR']}' ORDER BY min");
|
$q = $pdo->prepare("SELECT * FROM fundraising_donor_levels WHERE fiscalyear='{$config['FISCALYEAR']}' ORDER BY min");
|
||||||
$q->execute();
|
$q->execute();
|
||||||
@ -366,35 +380,47 @@ case 'managelist':
|
|||||||
}
|
}
|
||||||
echo '(disabled until the logic requirements can be established)';
|
echo '(disabled until the logic requirements can be established)';
|
||||||
?>
|
?>
|
||||||
</td></tr>
|
</td>
|
||||||
<tr><td><?= i18n('Email Address') ?>:</td><td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?= i18n('Email Address') ?>:</td>
|
||||||
|
<td>
|
||||||
<?
|
<?
|
||||||
foreach ($emailaddresslist AS $k => $v) {
|
foreach ($emailaddresslist as $k => $v) {
|
||||||
echo "<label><input onchange=\"return prospect_search()\" type=\"checkbox\" name=\"emailaddress[]\" value=\"$k\">" . i18n($v) . "</label><br />\n";
|
echo "<label><input onchange=\"return prospect_search()\" type=\"checkbox\" name=\"emailaddress[]\" value=\"$k\">" . i18n($v) . "</label><br />\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td></tr>
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="prospect_individual" style="display: none;">
|
<div id="prospect_individual" style="display: none;">
|
||||||
<table>
|
<table>
|
||||||
<tr><td style="width: 130px;"><?= i18n('Role') ?>:</td><td>
|
<tr>
|
||||||
|
<td style="width: 130px;"><?= i18n('Role') ?>:</td>
|
||||||
|
<td>
|
||||||
<?
|
<?
|
||||||
foreach ($rolelist AS $k => $v) {
|
foreach ($rolelist as $k => $v) {
|
||||||
echo "<label><input onchange=\"return prospect_search()\" type=\"checkbox\" name=\"individual_type[]\" value=\"$k\">" . i18n($v) . "</label><br />\n";
|
echo "<label><input onchange=\"return prospect_search()\" type=\"checkbox\" name=\"individual_type[]\" value=\"$k\">" . i18n($v) . "</label><br />\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</td></tr></table>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="prospect_organization" style="display: none;">
|
<div id="prospect_organization" style="display: none;">
|
||||||
<table>
|
<table>
|
||||||
<tr><td style="width: 130px;"><?= i18n('Role') ?>:</td><td>
|
<tr>
|
||||||
|
<td style="width: 130px;"><?= i18n('Role') ?>:</td>
|
||||||
|
<td>
|
||||||
<label><input onchange="return prospect_search()" type="checkbox" name="contacttype[]" value="primary"><?= i18n('Primary contacts') ?></label><br />
|
<label><input onchange="return prospect_search()" type="checkbox" name="contacttype[]" value="primary"><?= i18n('Primary contacts') ?></label><br />
|
||||||
<label><input onchange="return prospect_search()" type="checkbox" name="contacttype[]" value="secondary"><?= i18n('Secondary contacts') ?></label><br />
|
<label><input onchange="return prospect_search()" type="checkbox" name="contacttype[]" value="secondary"><?= i18n('Secondary contacts') ?></label><br />
|
||||||
</td></tr></table>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -412,8 +438,10 @@ case 'managelist':
|
|||||||
$q->execute();
|
$q->execute();
|
||||||
if ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
if ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||||
}
|
}
|
||||||
$communications = array('initial' => 'Initial Communication',
|
$communications = array(
|
||||||
'followup' => 'Follow-Up Communication');
|
'initial' => 'Initial Communication',
|
||||||
|
'followup' => 'Follow-Up Communication'
|
||||||
|
);
|
||||||
|
|
||||||
foreach ($communications as $key => $name) {
|
foreach ($communications as $key => $name) {
|
||||||
echo '<h4>' . i18n($name) . "</h4>\n";
|
echo '<h4>' . i18n($name) . "</h4>\n";
|
||||||
@ -545,11 +573,15 @@ function save_campaign_info()
|
|||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header('Appeal Management',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Appeal Management',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Fundraising' => 'admin/fundraising.php'),
|
'Fundraising' => 'admin/fundraising.php'
|
||||||
'fundraising');
|
),
|
||||||
|
'fundraising'
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -565,19 +597,25 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
function modifycampaigns() {
|
function modifycampaigns() {
|
||||||
$("#campaigndiv").show();
|
$("#campaigndiv").show();
|
||||||
$("#campaigndiv").load("<? $_SERVER['PHP_SELF'] ?>?action=modify", null, function() {modifycampaignsfinish();});
|
$("#campaigndiv").load("<? $_SERVER['PHP_SELF'] ?>?action=modify", null, function() {
|
||||||
|
modifycampaignsfinish();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function managecampaigns() {
|
function managecampaigns() {
|
||||||
$("#campaigndiv").show();
|
$("#campaigndiv").show();
|
||||||
$("#campaigndiv").load("<? $_SERVER['PHP_SELF'] ?>?action=managelist", null, function() {managecampaignsfinish();});
|
$("#campaigndiv").load("<? $_SERVER['PHP_SELF'] ?>?action=managelist", null, function() {
|
||||||
|
managecampaignsfinish();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentcampaignid;
|
var currentcampaignid;
|
||||||
|
|
||||||
function managecampaign(id) {
|
function managecampaign(id) {
|
||||||
$("#campaigndiv").show();
|
$("#campaigndiv").show();
|
||||||
$("#campaigndiv").load("<? $_SERVER['PHP_SELF'] ?>?action=manage&id="+id, null, function() {managecampaignfinish();});
|
$("#campaigndiv").load("<? $_SERVER['PHP_SELF'] ?>?action=manage&id=" + id, null, function() {
|
||||||
|
managecampaignfinish();
|
||||||
|
});
|
||||||
currentcampaignid = id;
|
currentcampaignid = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -606,7 +644,8 @@ function managecampaignfinish() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
selected: 0
|
selected: 0
|
||||||
});}
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// function managecampaignfinish() {
|
// function managecampaignfinish() {
|
||||||
// $("#campaign_tabs").tabs({
|
// $("#campaign_tabs").tabs({
|
||||||
@ -634,9 +673,13 @@ function managecampaignfinish() {
|
|||||||
function campaigninfo_save(id) {
|
function campaigninfo_save(id) {
|
||||||
//if we're creating we need to do the post, and get the id it returns, so we can re-open the popup window with that id
|
//if we're creating we need to do the post, and get the id it returns, so we can re-open the popup window with that id
|
||||||
if (id == -1) {
|
if (id == -1) {
|
||||||
$("#debug").load("<? $_SERVER['PHP_SELF'] ?>?action=campaigninfo_save", $("#campaigninfo_new").serializeArray(), function() { modifycampaigns(); });
|
$("#debug").load("<? $_SERVER['PHP_SELF'] ?>?action=campaigninfo_save", $("#campaigninfo_new").serializeArray(), function() {
|
||||||
|
modifycampaigns();
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$("#debug").load("<? $_SERVER['PHP_SELF'] ?>?action=campaigninfo_save&id="+id, $("#campaigninfo_"+id).serializeArray(), function() { modifycampaigns(); });
|
$("#debug").load("<? $_SERVER['PHP_SELF'] ?>?action=campaigninfo_save&id=" + id, $("#campaigninfo_" + id).serializeArray(), function() {
|
||||||
|
modifycampaigns();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -644,16 +687,21 @@ function campaigninfo_save(id) {
|
|||||||
function update_tab_overview() {
|
function update_tab_overview() {
|
||||||
$("#campaign_tab_overview").load("<? $_SERVER['PHP_SELF'] ?>?action=manage_tab_overview&id=" + currentcampaignid);
|
$("#campaign_tab_overview").load("<? $_SERVER['PHP_SELF'] ?>?action=manage_tab_overview&id=" + currentcampaignid);
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_tab_donations() {
|
function update_tab_donations() {
|
||||||
$("#campaign_tab_donations").load(
|
$("#campaign_tab_donations").load(
|
||||||
"<? $_SERVER['PHP_SELF'] ?>?action=manage_tab_donations&id=" + currentcampaignid,
|
"<? $_SERVER['PHP_SELF'] ?>?action=manage_tab_donations&id=" + currentcampaignid,
|
||||||
null,
|
null,
|
||||||
function(){$('.tableview').tablesorter();}
|
function() {
|
||||||
|
$('.tableview').tablesorter();
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_tab_prospects() {
|
function update_tab_prospects() {
|
||||||
$("#campaign_tab_prospects").load("<? $_SERVER['PHP_SELF'] ?>?action=manage_tab_prospects&id=" + currentcampaignid);
|
$("#campaign_tab_prospects").load("<? $_SERVER['PHP_SELF'] ?>?action=manage_tab_prospects&id=" + currentcampaignid);
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_tab_communications() {
|
function update_tab_communications() {
|
||||||
$("#campaign_tab_communications").load("<? $_SERVER['PHP_SELF'] ?>?action=manage_tab_communications&id=" + currentcampaignid);
|
$("#campaign_tab_communications").load("<? $_SERVER['PHP_SELF'] ?>?action=manage_tab_communications&id=" + currentcampaignid);
|
||||||
}
|
}
|
||||||
@ -663,13 +711,11 @@ function donortypechange() {
|
|||||||
$("#prospect_common").show('slow');
|
$("#prospect_common").show('slow');
|
||||||
$("#prospect_organization").show('slow');
|
$("#prospect_organization").show('slow');
|
||||||
$("#prospect_individual").hide('slow');
|
$("#prospect_individual").hide('slow');
|
||||||
}
|
} else if ($("input[@name='donortype']:checked").val() == "individual") {
|
||||||
else if($("input[@name='donortype']:checked").val()=="individual") {
|
|
||||||
$("#prospect_common").show('slow');
|
$("#prospect_common").show('slow');
|
||||||
$("#prospect_organization").hide('slow');
|
$("#prospect_organization").hide('slow');
|
||||||
$("#prospect_individual").show('slow');
|
$("#prospect_individual").show('slow');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$("#prospect_common").hide('slow');
|
$("#prospect_common").hide('slow');
|
||||||
}
|
}
|
||||||
prospect_search();
|
prospect_search();
|
||||||
@ -702,15 +748,17 @@ function prospect_removeall() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var comm_chooser_key = null;
|
var comm_chooser_key = null;
|
||||||
|
|
||||||
function opencommunicationchooser(key) {
|
function opencommunicationchooser(key) {
|
||||||
comm_chooser_key = key;
|
comm_chooser_key = key;
|
||||||
$("#dialog").empty();
|
$("#dialog").empty();
|
||||||
$("#dialog").load("communication.php?action=dialog_choose&type=fundraising",null,function() {
|
$("#dialog").load("communication.php?action=dialog_choose&type=fundraising", null, function() {});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function removecommunication(id) {
|
function removecommunication(id) {
|
||||||
$("#debug").load("fundraising_campaigns.php?action=communication_remove",{id:id},function() {
|
$("#debug").load("fundraising_campaigns.php?action=communication_remove", {
|
||||||
|
id: id
|
||||||
|
}, function() {
|
||||||
update_tab_communications();
|
update_tab_communications();
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
@ -721,8 +769,7 @@ function comm_dialog_choose_select(id) {
|
|||||||
//get rid of hte html
|
//get rid of hte html
|
||||||
var key = comm_chooser_key;
|
var key = comm_chooser_key;
|
||||||
$("#dialog").empty();
|
$("#dialog").empty();
|
||||||
$("#dialog").load("communication.php?action=dialog_edit&cloneid="+id+"&key="+key+"&fundraising_campaigns_id="+currentcampaignid,null,function() {
|
$("#dialog").load("communication.php?action=dialog_edit&cloneid=" + id + "&key=" + key + "&fundraising_campaigns_id=" + currentcampaignid, null, function() {});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function comm_dialog_choose_cancel() {
|
function comm_dialog_choose_cancel() {
|
||||||
@ -741,8 +788,7 @@ function comm_dialog_edit_cancel() {
|
|||||||
function opensendlabelsdialog(reports_id, fcid) {
|
function opensendlabelsdialog(reports_id, fcid) {
|
||||||
$("#dialog").empty();
|
$("#dialog").empty();
|
||||||
var args = "action=dialog_gen&sid=" + reports_id + "&filter[0][field]=fundraising_campaigns_id&filter[0][x]=0&filter[0][value]=" + fcid;
|
var args = "action=dialog_gen&sid=" + reports_id + "&filter[0][field]=fundraising_campaigns_id&filter[0][x]=0&filter[0][value]=" + fcid;
|
||||||
$("#dialog").load("reports_gen.php?"+args,null,function() {
|
$("#dialog").load("reports_gen.php?" + args, null, function() {});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function opensendmaildialog(fcid, key) {
|
function opensendmaildialog(fcid, key) {
|
||||||
@ -755,10 +801,8 @@ function opensendmaildialog(fcid,key) {
|
|||||||
|
|
||||||
function opensendemaildialog(fcid, emails_id) {
|
function opensendemaildialog(fcid, emails_id) {
|
||||||
$("#dialog").empty();
|
$("#dialog").empty();
|
||||||
$("#dialog").load("communication.php?action=dialog_send&type=fundraising&fundraising_campaigns_id="+fcid+"&emails_id="+emails_id,null,function() {
|
$("#dialog").load("communication.php?action=dialog_send&type=fundraising&fundraising_campaigns_id=" + fcid + "&emails_id=" + emails_id, null, function() {});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
@ -772,11 +816,12 @@ function display_campaign_form($r = null)
|
|||||||
<tr>
|
<tr>
|
||||||
<td><?= i18n('Name') ?></td>
|
<td><?= i18n('Name') ?></td>
|
||||||
<td colspan="3"><input size="40" type="text" name="name" value="<?= get_value_property_or_default($r, 'name') ?>"></td>
|
<td colspan="3"><input size="40" type="text" name="name" value="<?= get_value_property_or_default($r, 'name') ?>"></td>
|
||||||
<td><?= i18n('Type') ?></td><td>
|
<td><?= i18n('Type') ?></td>
|
||||||
|
<td>
|
||||||
<select name="type">
|
<select name="type">
|
||||||
<option value=""><?= i18n('Choose') ?></option>
|
<option value=""><?= i18n('Choose') ?></option>
|
||||||
<?
|
<?
|
||||||
foreach ($campaign_types AS $ct) {
|
foreach ($campaign_types as $ct) {
|
||||||
if ($r->type == $ct)
|
if ($r->type == $ct)
|
||||||
$sel = 'selected="selected"';
|
$sel = 'selected="selected"';
|
||||||
else
|
else
|
||||||
@ -794,13 +839,18 @@ function display_campaign_form($r = null)
|
|||||||
$sd = date('Y-m-d');
|
$sd = date('Y-m-d');
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= i18n('Start Date') ?></td><td><input type="text" name="startdate" class="date" value="<?= $sd ?>" /></td>
|
<td><?= i18n('Start Date') ?></td>
|
||||||
<td><?= i18n('Follow-Up Date') ?></td><td><input type="text" name="followupdate" class="date" value="<?= get_value_property_or_default($r, 'followupdate') ?>" /></td>
|
<td><input type="text" name="startdate" class="date" value="<?= $sd ?>" /></td>
|
||||||
<td><?= i18n('End Date') ?></td><td><input type="text" name="enddate" class="date" value="<?= get_value_property_or_default($r, 'enddate') ?>" /></td>
|
<td><?= i18n('Follow-Up Date') ?></td>
|
||||||
|
<td><input type="text" name="followupdate" class="date" value="<?= get_value_property_or_default($r, 'followupdate') ?>" /></td>
|
||||||
|
<td><?= i18n('End Date') ?></td>
|
||||||
|
<td><input type="text" name="enddate" class="date" value="<?= get_value_property_or_default($r, 'enddate') ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= i18n('Target') ?></td><td>$<input type="text" id="target" name="target" size="10" value="<?= get_value_property_or_default($r, 'target') ?>" /></td>
|
<td><?= i18n('Target') ?></td>
|
||||||
<td><?= i18n('Default Purpose') ?></td><td colspan="3">
|
<td>$<input type="text" id="target" name="target" size="10" value="<?= get_value_property_or_default($r, 'target') ?>" /></td>
|
||||||
|
<td><?= i18n('Default Purpose') ?></td>
|
||||||
|
<td colspan="3">
|
||||||
<?
|
<?
|
||||||
$fgq = $pdo->prepare("SELECT * FROM fundraising_goals WHERE fiscalyear='{$config['FISCALYEAR']}' ORDER BY name");
|
$fgq = $pdo->prepare("SELECT * FROM fundraising_goals WHERE fiscalyear='{$config['FISCALYEAR']}' ORDER BY name");
|
||||||
$fgq->execute();
|
$fgq->execute();
|
||||||
@ -821,11 +871,15 @@ function display_campaign_form($r = null)
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<table cellspacing=2 width=740 border=0>
|
<table cellspacing=2 width=740 border=0>
|
||||||
<tr><td>
|
<tr>
|
||||||
|
<td>
|
||||||
<a href="#" onclick="modifycampaigns()">Create/Modify Appeals</a>
|
<a href="#" onclick="modifycampaigns()">Create/Modify Appeals</a>
|
||||||
</td><td>
|
</td>
|
||||||
|
<td>
|
||||||
<a href="#" onclick="managecampaigns()">Appeal Management</a>
|
<a href="#" onclick="managecampaigns()">Appeal Management</a>
|
||||||
</td></tr></table>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<hr />
|
<hr />
|
||||||
<div id="campaigndiv" style="width: 780px; display: none;"></div>
|
<div id="campaigndiv" style="width: 780px; display: none;"></div>
|
||||||
<div id="dialog" style="width: 780px; display: none;"></div>
|
<div id="dialog" style="width: 780px; display: none;"></div>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -43,7 +43,7 @@ if ($_POST['donortype'] == 'organization') {
|
|||||||
|
|
||||||
$primary = '';
|
$primary = '';
|
||||||
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||||
foreach ($contacttype AS $ct) {
|
foreach ($contacttype as $ct) {
|
||||||
switch ($ct) {
|
switch ($ct) {
|
||||||
case 'primary':
|
case 'primary':
|
||||||
$primary = 'yes';
|
$primary = 'yes';
|
||||||
@ -76,7 +76,7 @@ if ($_POST['donortype'] == 'organization') {
|
|||||||
else
|
else
|
||||||
$individual_type = $_POST['individual_type'];
|
$individual_type = $_POST['individual_type'];
|
||||||
|
|
||||||
foreach ($individual_type AS $t) {
|
foreach ($individual_type as $t) {
|
||||||
$query = "SELECT *,MAX(year) FROM users WHERE types LIKE '%$t%' GROUP BY uid HAVING deleted='no' ORDER BY lastname,firstname";
|
$query = "SELECT *,MAX(year) FROM users WHERE types LIKE '%$t%' GROUP BY uid HAVING deleted='no' ORDER BY lastname,firstname";
|
||||||
$q = $pdo->prepare($query);
|
$q = $pdo->prepare($query);
|
||||||
$q->execute();
|
$q->execute();
|
||||||
@ -99,7 +99,7 @@ if (count($emailaddress) == 1) {
|
|||||||
$emailavailablelist = array();
|
$emailavailablelist = array();
|
||||||
$emailnotavailablelist = array();
|
$emailnotavailablelist = array();
|
||||||
|
|
||||||
foreach ($userslist AS $uid => $u) {
|
foreach ($userslist as $uid => $u) {
|
||||||
if ($u['email'])
|
if ($u['email'])
|
||||||
$emailavailablelist[$uid] = $u;
|
$emailavailablelist[$uid] = $u;
|
||||||
else
|
else
|
||||||
@ -138,7 +138,7 @@ $thisyearlist = $userslist;
|
|||||||
// if they DO have a sponsors id, we need to check if tere is a donation record for them
|
// if they DO have a sponsors id, we need to check if tere is a donation record for them
|
||||||
// and if so, remove them if there is because tey have donated in the past
|
// and if so, remove them if there is because tey have donated in the past
|
||||||
|
|
||||||
foreach ($neverlist AS $uid => $u) {
|
foreach ($neverlist as $uid => $u) {
|
||||||
if ($u['sponsors_id']) {
|
if ($u['sponsors_id']) {
|
||||||
$q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id='{$u['sponsors_id']}'");
|
$q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id='{$u['sponsors_id']}'");
|
||||||
$q->execute();
|
$q->execute();
|
||||||
@ -153,7 +153,7 @@ foreach ($neverlist AS $uid => $u) {
|
|||||||
// if they DO have a sponsors id, we need to check if tere is a donation record for them
|
// if they DO have a sponsors id, we need to check if tere is a donation record for them
|
||||||
// and if not remove them if there is because tey have not donated in the past
|
// and if not remove them if there is because tey have not donated in the past
|
||||||
|
|
||||||
foreach ($pastlist AS $uid => $u) {
|
foreach ($pastlist as $uid => $u) {
|
||||||
if ($u['sponsors_id']) {
|
if ($u['sponsors_id']) {
|
||||||
$q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id='{$u['sponsors_id']}'");
|
$q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id='{$u['sponsors_id']}'");
|
||||||
$q->execute();
|
$q->execute();
|
||||||
@ -169,7 +169,7 @@ foreach ($pastlist AS $uid => $u) {
|
|||||||
|
|
||||||
$lastyear = $config['FISCALYEAR'] - 1;
|
$lastyear = $config['FISCALYEAR'] - 1;
|
||||||
|
|
||||||
foreach ($lastyearlist AS $uid => $u) {
|
foreach ($lastyearlist as $uid => $u) {
|
||||||
if ($u['sponsors_id']) {
|
if ($u['sponsors_id']) {
|
||||||
$q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id='{$u['sponsors_id']}' AND fiscalyear='$lastyear'");
|
$q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id='{$u['sponsors_id']}' AND fiscalyear='$lastyear'");
|
||||||
$q->execute();
|
$q->execute();
|
||||||
@ -183,7 +183,7 @@ foreach ($lastyearlist AS $uid => $u) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($thisyearlist AS $uid => $u) {
|
foreach ($thisyearlist as $uid => $u) {
|
||||||
if ($u['sponsors_id']) {
|
if ($u['sponsors_id']) {
|
||||||
$q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id='{$u['sponsors_id']}' AND fiscalyear='{$config['FISCALYEAR']}'");
|
$q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id='{$u['sponsors_id']}' AND fiscalyear='{$config['FISCALYEAR']}'");
|
||||||
$q->execcute();
|
$q->execcute();
|
||||||
@ -205,9 +205,9 @@ foreach ($thisyearlist AS $uid => $u) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$userslist = array();
|
$userslist = array();
|
||||||
foreach ($donationhistory AS $dh) {
|
foreach ($donationhistory as $dh) {
|
||||||
$arr = $dh . 'list';
|
$arr = $dh . 'list';
|
||||||
foreach ($$arr AS $uid => $u) {
|
foreach ($$arr as $uid => $u) {
|
||||||
$userslist[$uid] = $u;
|
$userslist[$uid] = $u;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -219,7 +219,7 @@ if ($_GET['generatelist']) {
|
|||||||
$stmt = $pdo->prepare("UPDATE fundraising_campaigns SET filterparameters='{$params}' WHERE id='$campaignid'");
|
$stmt = $pdo->prepare("UPDATE fundraising_campaigns SET filterparameters='{$params}' WHERE id='$campaignid'");
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$uids = array_keys($userslist);
|
$uids = array_keys($userslist);
|
||||||
foreach ($uids AS $u) {
|
foreach ($uids as $u) {
|
||||||
$stmt = $pdo->prepare("INSERT INTO fundraising_campaigns_users_link (fundraising_campaigns_id, users_uid) VALUES ('$campaignid','$u')");
|
$stmt = $pdo->prepare("INSERT INTO fundraising_campaigns_users_link (fundraising_campaigns_id, users_uid) VALUES ('$campaignid','$u')");
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,3 @@ function getGoal($goal)
|
|||||||
$q->execute();
|
$q->execute();
|
||||||
return $q->fetch(PDO::FETCH_OBJ);
|
return $q->fetch(PDO::FETCH_OBJ);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -64,5 +64,3 @@ if ($_POST['action'] == 'fundadd') {
|
|||||||
error_('MySQL Error: %1', array($pdo->errorInfo()));
|
error_('MySQL Error: %1', array($pdo->errorInfo()));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -27,26 +27,32 @@ require_once ('../user.inc.php');
|
|||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
require('fundraising_common.inc.php');
|
require('fundraising_common.inc.php');
|
||||||
|
|
||||||
send_header('Fundraising Reports',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Fundraising Reports',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Fundraising' => 'admin/fundraising.php'),
|
'Fundraising' => 'admin/fundraising.php'
|
||||||
'fundraising');
|
),
|
||||||
|
'fundraising'
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#standardreportsaccordion").accordion();
|
$("#standardreportsaccordion").accordion();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<h3>Standard Reports</h3>
|
<h3>Standard Reports</h3>
|
||||||
<div id="standardreportsaccordion" style="width: 600px;">
|
<div id="standardreportsaccordion" style="width: 600px;">
|
||||||
<h3><a a href="#">List of Prospects by Appeal</a></h3>
|
<h3><a a href="#">List of Prospects by Appeal</a></h3>
|
||||||
<div>
|
<div>
|
||||||
<table><tr><td>
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
Choose an appeal:
|
Choose an appeal:
|
||||||
</td><td>
|
</td>
|
||||||
|
<td>
|
||||||
<form method=get action="fundraising_reports_std.php">
|
<form method=get action="fundraising_reports_std.php">
|
||||||
<input type="hidden" name="id" value="1">
|
<input type="hidden" name="id" value="1">
|
||||||
<select name="fundraising_campaigns_id">
|
<select name="fundraising_campaigns_id">
|
||||||
@ -59,28 +65,38 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td></tr>
|
</td>
|
||||||
<tr><td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
Report Type:
|
Report Type:
|
||||||
</td><td>
|
</td>
|
||||||
|
<td>
|
||||||
<select name="type">
|
<select name="type">
|
||||||
<!-- FIXME -->
|
<!-- FIXME -->
|
||||||
<!--<option value="pdf">PDF</option>-->
|
<!--<option value="pdf">PDF</option>-->
|
||||||
<option value="csv">CSV</option>
|
<option value="csv">CSV</option>
|
||||||
</select>
|
</select>
|
||||||
</td></tr>
|
</td>
|
||||||
<tr><td colspan="2" style="text-align: center;">
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" style="text-align: center;">
|
||||||
<input type="submit" value="Generate Report">
|
<input type="submit" value="Generate Report">
|
||||||
</td></tr></table>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<h3><a href="#">Results of Appeal by Purpose</a></h3>
|
<h3><a href="#">Results of Appeal by Purpose</a></h3>
|
||||||
<div>
|
<div>
|
||||||
<form method=get action="fundraising_reports_std.php">
|
<form method=get action="fundraising_reports_std.php">
|
||||||
<input type="hidden" name="id" value="2">
|
<input type="hidden" name="id" value="2">
|
||||||
<table><tr><td>
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
Choose a Purpose:
|
Choose a Purpose:
|
||||||
</td><td>
|
</td>
|
||||||
|
<td>
|
||||||
<select name="goal">
|
<select name="goal">
|
||||||
<option value="">All purposes</option>
|
<option value="">All purposes</option>
|
||||||
<?
|
<?
|
||||||
@ -91,19 +107,26 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td></tr>
|
</td>
|
||||||
<tr><td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
Report Type:
|
Report Type:
|
||||||
</td><td>
|
</td>
|
||||||
|
<td>
|
||||||
<select name="type">
|
<select name="type">
|
||||||
<!-- FIXME -->
|
<!-- FIXME -->
|
||||||
<!--<option value="pdf">PDF</option>-->
|
<!--<option value="pdf">PDF</option>-->
|
||||||
<option value="csv">CSV</option>
|
<option value="csv">CSV</option>
|
||||||
</select>
|
</select>
|
||||||
</td></tr>
|
</td>
|
||||||
<tr><td colspan="2" style="text-align: center;">
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" style="text-align: center;">
|
||||||
<input type="submit" value="Generate Report">
|
<input type="submit" value="Generate Report">
|
||||||
</td></tr></table>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -38,9 +38,11 @@ if ($id && $type) {
|
|||||||
if ($type == 'csv') {
|
if ($type == 'csv') {
|
||||||
$rep = new lcsv($config['FAIRNAME']);
|
$rep = new lcsv($config['FAIRNAME']);
|
||||||
} else if ($type == 'pdf') {
|
} else if ($type == 'pdf') {
|
||||||
$rep = new lpdf(i18n($config['fairname']),
|
$rep = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
i18n('List of Prospects By Appeal'),
|
i18n('List of Prospects By Appeal'),
|
||||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||||
|
);
|
||||||
$rep->newPage();
|
$rep->newPage();
|
||||||
$rep->setFontSize(8);
|
$rep->setFontSize(8);
|
||||||
}
|
}
|
||||||
@ -120,9 +122,11 @@ if ($id && $type) {
|
|||||||
if ($type == 'csv') {
|
if ($type == 'csv') {
|
||||||
$rep = new lcsv($config['FAIRNAME'], 'Results of Appeal by Purpose', '');
|
$rep = new lcsv($config['FAIRNAME'], 'Results of Appeal by Purpose', '');
|
||||||
} else if ($type == 'pdf') {
|
} else if ($type == 'pdf') {
|
||||||
$rep = new lpdf(i18n($config['fairname']),
|
$rep = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
i18n('Results of Appeal by Purpose'),
|
i18n('Results of Appeal by Purpose'),
|
||||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||||
|
);
|
||||||
$rep->newPage();
|
$rep->newPage();
|
||||||
$rep->setFontSize(8);
|
$rep->setFontSize(8);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -335,10 +335,14 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header('Fundraising Setup',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Fundraising Setup',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Fundraising' => 'admin/fundraising.php'));
|
'Fundraising' => 'admin/fundraising.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -396,14 +400,18 @@ function level_save(id) {
|
|||||||
if (id) var f = $("#level_form_" + id);
|
if (id) var f = $("#level_form_" + id);
|
||||||
else var f = $("#level_form");
|
else var f = $("#level_form");
|
||||||
|
|
||||||
$("#debug").load("fundraising_setup.php?action=level_save",f.serializeArray(), function() { update_levels(); });
|
$("#debug").load("fundraising_setup.php?action=level_save", f.serializeArray(), function() {
|
||||||
|
update_levels();
|
||||||
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function level_delete(id) {
|
function level_delete(id) {
|
||||||
if (confirmClick('Are you sure you want to delete this fundraising level?')) {
|
if (confirmClick('Are you sure you want to delete this fundraising level?')) {
|
||||||
var f = $("#level_form_" + id);
|
var f = $("#level_form_" + id);
|
||||||
$("#debug").load("fundraising_setup.php?action=level_delete",f.serializeArray(), function() { update_levels(); });
|
$("#debug").load("fundraising_setup.php?action=level_delete", f.serializeArray(), function() {
|
||||||
|
update_levels();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -414,16 +422,23 @@ function update_goals() {
|
|||||||
$("#goalaccordion").accordion({
|
$("#goalaccordion").accordion({
|
||||||
heightStyle: "content"
|
heightStyle: "content"
|
||||||
});
|
});
|
||||||
$("[name=deadline]").datepicker({ dateFormat: 'yy-mm-dd'});
|
$("[name=deadline]").datepicker({
|
||||||
|
dateFormat: 'yy-mm-dd'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_setup() {
|
function update_setup() {
|
||||||
$("#editor_tab_setup").load("fundraising_setup.php?gettab=setup",null,function() { charitychange(); });
|
$("#editor_tab_setup").load("fundraising_setup.php?gettab=setup", null, function() {
|
||||||
|
charitychange();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_save() {
|
function setup_save() {
|
||||||
$("#debug").load("fundraising_setup.php?action=setup_save",$("#setup_form").serializeArray(), function() { update_setup(); });
|
$("#debug").load("fundraising_setup.php?action=setup_save", $("#setup_form").serializeArray(), function() {
|
||||||
|
update_setup();
|
||||||
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -431,14 +446,18 @@ function goal_save(id) {
|
|||||||
if (id) var f = $("#goal_form_" + id);
|
if (id) var f = $("#goal_form_" + id);
|
||||||
else var f = $("#goal_form");
|
else var f = $("#goal_form");
|
||||||
|
|
||||||
$("#debug").load("fundraising_setup.php?action=goal_save",f.serializeArray(), function() { update_goals(); });
|
$("#debug").load("fundraising_setup.php?action=goal_save", f.serializeArray(), function() {
|
||||||
|
update_goals();
|
||||||
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function goal_delete(id) {
|
function goal_delete(id) {
|
||||||
if (confirmClick('Are you sure you want to delete this fundraising goal?')) {
|
if (confirmClick('Are you sure you want to delete this fundraising goal?')) {
|
||||||
var f = $("#goal_form_" + id);
|
var f = $("#goal_form_" + id);
|
||||||
$("#debug").load("fundraising_setup.php?action=goal_delete",f.serializeArray(), function() { update_goals(); });
|
$("#debug").load("fundraising_setup.php?action=goal_delete", f.serializeArray(), function() {
|
||||||
|
update_goals();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -446,14 +465,11 @@ function goal_delete(id) {
|
|||||||
function charitychange() {
|
function charitychange() {
|
||||||
if ($("input[name='registeredcharity']:checked").val() == "yes") {
|
if ($("input[name='registeredcharity']:checked").val() == "yes") {
|
||||||
$("#charitynumber").attr("disabled", "");
|
$("#charitynumber").attr("disabled", "");
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$("#charitynumber").attr("disabled", "disabled");
|
$("#charitynumber").attr("disabled", "disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="setup" style="width: 780px;">
|
<div id="setup" style="width: 780px;">
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 James Grant <james@lightbox.org>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -139,7 +139,7 @@ echo '<td>';
|
|||||||
echo '<select name="status">';
|
echo '<select name="status">';
|
||||||
echo '<option value="">' . i18n('Choose') . "</option>\n";
|
echo '<option value="">' . i18n('Choose') . "</option>\n";
|
||||||
$statuses = array('pending', 'confirmed', 'received');
|
$statuses = array('pending', 'confirmed', 'received');
|
||||||
foreach ($statuses AS $status) {
|
foreach ($statuses as $status) {
|
||||||
if ($sponsorship->status == $status)
|
if ($sponsorship->status == $status)
|
||||||
$sel = 'selected="selected"';
|
$sel = 'selected="selected"';
|
||||||
else
|
else
|
||||||
@ -154,7 +154,7 @@ echo '<td>';
|
|||||||
echo '<select name="probability">';
|
echo '<select name="probability">';
|
||||||
echo '<option value="">' . i18n('Choose') . "</option>\n";
|
echo '<option value="">' . i18n('Choose') . "</option>\n";
|
||||||
$probs = array('25', '50', '75', '90', '95', '99', '100');
|
$probs = array('25', '50', '75', '90', '95', '99', '100');
|
||||||
foreach ($probs AS $prob) {
|
foreach ($probs as $prob) {
|
||||||
if ($sponsorship->probability == $prob)
|
if ($sponsorship->probability == $prob)
|
||||||
$sel = 'selected="selected"';
|
$sel = 'selected="selected"';
|
||||||
else
|
else
|
||||||
|
@ -45,7 +45,7 @@ if ($_POST['action'] == 'sponsorshipedit') {
|
|||||||
if (count($log)) {
|
if (count($log)) {
|
||||||
$stmt = $pdo->prepare("UPDATE fundraising_donations SET fundraising_type='$fundraising_type', value='$value', status='$status', probability='$probability' WHERE id='$fundraising_donations_id'");
|
$stmt = $pdo->prepare("UPDATE fundraising_donations SET fundraising_type='$fundraising_type', value='$value', status='$status', probability='$probability' WHERE id='$fundraising_donations_id'");
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
foreach ($log AS $l) {
|
foreach ($log as $l) {
|
||||||
$stmt = $pdo->prepare("INSERT INTO fundraising_donor_logs (sponsors_id,dt,users_id,log) VALUES (
|
$stmt = $pdo->prepare("INSERT INTO fundraising_donor_logs (sponsors_id,dt,users_id,log) VALUES (
|
||||||
'$current->sponsors_id',
|
'$current->sponsors_id',
|
||||||
NOW(),
|
NOW(),
|
||||||
@ -82,5 +82,3 @@ if ($_POST['action'] == 'sponsorshipadd') {
|
|||||||
error_($pdo->errorInfo());
|
error_($pdo->errorInfo());
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 James Grant <james@lightbox.org>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -27,7 +28,7 @@ include '../common.inc.php';
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
$ret = array();
|
$ret = array();
|
||||||
foreach ($config['languages'] AS $l => $ln) {
|
foreach ($config['languages'] as $l => $ln) {
|
||||||
if ($l == $config['default_language'])
|
if ($l == $config['default_language'])
|
||||||
continue;
|
continue;
|
||||||
$q = $pdo->prepare("SELECT * FROM translations WHERE lang='$l' AND strmd5='" . md5(iconv('ISO-8859-1', 'UTF-8', $_GET['str'])) . "'");
|
$q = $pdo->prepare("SELECT * FROM translations WHERE lang='$l' AND strmd5='" . md5(iconv('ISO-8859-1', 'UTF-8', $_GET['str'])) . "'");
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?
|
<?
|
||||||
/*
|
/*
|
||||||
This file is part of the 'Science Fair In A Box' project
|
This file is part of the 'Science Fair In A Box' project
|
||||||
SFIAB Website: http://www.sfiab.ca
|
Science-ation Website: https://science-ation.ca/
|
||||||
|
|
||||||
Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
Copyright (C) 2005-2008 James Grant <james@lightbox.org>
|
Copyright (C) 2005-2008 James Grant <james@lightbox.org>
|
||||||
@ -29,9 +29,11 @@
|
|||||||
|
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
|
|
||||||
send_header("Administration",
|
send_header(
|
||||||
|
"Administration",
|
||||||
array('Committee Main' => 'committee_main.php'),
|
array('Committee Main' => 'committee_main.php'),
|
||||||
"administration");
|
"administration"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ function getJudgingTeams()
|
|||||||
while ($mr = $mq->fetch(PDO::FETCH_OBJ)) {
|
while ($mr = $mq->fetch(PDO::FETCH_OBJ)) {
|
||||||
$u = user_load($mr->judges_id, false);
|
$u = user_load($mr->judges_id, false);
|
||||||
$judgelangs = join('/', $u['languages']);
|
$judgelangs = join('/', $u['languages']);
|
||||||
foreach ($u['languages'] AS $l) {
|
foreach ($u['languages'] as $l) {
|
||||||
if (!in_array($l, $teamlangs))
|
if (!in_array($l, $teamlangs))
|
||||||
$teamlangs[] = $l;
|
$teamlangs[] = $l;
|
||||||
}
|
}
|
||||||
@ -264,5 +264,3 @@ function judges_load_all()
|
|||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -27,10 +28,14 @@ require ('../common.inc.php');
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
|
|
||||||
send_header('Judges',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Judges',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'judging_management');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'judging_management'
|
||||||
|
);
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
echo '<b>' . i18n('Judges') . '</b><ul>';
|
echo '<b>' . i18n('Judges') . '</b><ul>';
|
||||||
echo '<li><a href="../user_invite.php?type=judge">' . i18n('Invite Judges') . '</a></li></li>';
|
echo '<li><a href="../user_invite.php?type=judge">' . i18n('Invite Judges') . '</a></li></li>';
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -156,7 +157,8 @@ $catPreferenceText .= '</ul>';
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<table class="tableview" style="margin:auto; width:100%; text-align:left; margin-top:5px;">
|
<table class="tableview" style="margin:auto; width:100%; text-align:left; margin-top:5px;">
|
||||||
<tr><td>
|
<tr>
|
||||||
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li><strong><?= "Active for {$config['FAIRYEAR']}"; ?>: </strong>
|
<li><strong><?= "Active for {$config['FAIRYEAR']}"; ?>: </strong>
|
||||||
@ -228,7 +230,8 @@ echo " </td>\n";
|
|||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
</td></tr>
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -28,10 +29,14 @@ require_once ('../user.inc.php');
|
|||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
include 'judges.inc.php';
|
include 'judges.inc.php';
|
||||||
|
|
||||||
send_header('Invite Judges',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Invite Judges',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Judges' => 'admin/judges.php'));
|
'Judges' => 'admin/judges.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
if ($_POST['action'] == 'invite' && $_POST['email']) {
|
if ($_POST['action'] == 'invite' && $_POST['email']) {
|
||||||
$q = $pdo->prepare("SELECT id FROM judges WHERE email=?");
|
$q = $pdo->prepare("SELECT id FROM judges WHERE email=?");
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -28,28 +29,29 @@ require_once ('../user.inc.php');
|
|||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
include 'judges.inc.php';
|
include 'judges.inc.php';
|
||||||
|
|
||||||
send_header('Judging Division Groupings',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Judging Division Groupings',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Judges' => 'admin/judges.php'));
|
'Judges' => 'admin/judges.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
echo i18n('Instructions: The goal is to create groupings that have the least number of divisions/categories required to have at least %1 projects in the group. %1 is the number of projects that a single team can judge that you have specifed in the judge scheduler configuration. Judge division groupings indicate which divisions/categories can be judged together (by the same team of judges), so the divisons/categories should be somewhat similar to ensure there are judges that can handle judging all divisions assigned to a grouping.', array($config['max_projects_per_team']));
|
echo i18n('Instructions: The goal is to create groupings that have the least number of divisions/categories required to have at least %1 projects in the group. %1 is the number of projects that a single team can judge that you have specifed in the judge scheduler configuration. Judge division groupings indicate which divisions/categories can be judged together (by the same team of judges), so the divisons/categories should be somewhat similar to ensure there are judges that can handle judging all divisions assigned to a grouping.', array($config['max_projects_per_team']));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
function addbuttonclicked(jdiv)
|
function addbuttonclicked(jdiv) {
|
||||||
{
|
|
||||||
document.forms.jdivs.action.value = "add";
|
document.forms.jdivs.action.value = "add";
|
||||||
document.forms.jdivs.jdiv_id.value = jdiv;
|
document.forms.jdivs.jdiv_id.value = jdiv;
|
||||||
document.forms.jdivs.submit();
|
document.forms.jdivs.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function newbuttonclicked(jdivs)
|
function newbuttonclicked(jdivs) {
|
||||||
{
|
|
||||||
document.forms.jdivs.action.value = "new";
|
document.forms.jdivs.action.value = "new";
|
||||||
document.forms.jdivs.jdivs.value = jdivs;
|
document.forms.jdivs.jdivs.value = jdivs;
|
||||||
document.forms.jdivs.submit();
|
document.forms.jdivs.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
@ -82,8 +84,8 @@ if ($config['filterdivisionbycategory'] == 'yes') {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$divcat = array();
|
$divcat = array();
|
||||||
foreach ($dkeys AS $d) {
|
foreach ($dkeys as $d) {
|
||||||
foreach ($ckeys AS $c) {
|
foreach ($ckeys as $c) {
|
||||||
$divcat[] = array('c' => $c, 'd' => $d);
|
$divcat[] = array('c' => $c, 'd' => $d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,7 +123,7 @@ function get_all_divs()
|
|||||||
$catkeys = array_keys($cat);
|
$catkeys = array_keys($cat);
|
||||||
$lankeys = array_keys($langr);
|
$lankeys = array_keys($langr);
|
||||||
|
|
||||||
foreach ($divcat AS $dc) {
|
foreach ($divcat as $dc) {
|
||||||
$y = $dc['d'];
|
$y = $dc['d'];
|
||||||
$x = $dc['c'];
|
$x = $dc['c'];
|
||||||
foreach ($lankeys as $z) {
|
foreach ($lankeys as $z) {
|
||||||
@ -179,7 +181,7 @@ function get_all_divs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (get_value_from_array($_POST, 'action') == 'add' && get_value_from_array($_POST, 'jdiv_id') && count(get_value_from_array($_POST, 'cdllist', [])) > 0) {
|
if (get_value_from_array($_POST, 'action') == 'add' && get_value_from_array($_POST, 'jdiv_id') && count(get_value_from_array($_POST, 'cdllist', [])) > 0) {
|
||||||
foreach ($_POST['cdllist'] AS $selectedcdl) {
|
foreach ($_POST['cdllist'] as $selectedcdl) {
|
||||||
$q = $pdo->prepare("UPDATE judges_jdiv SET jdiv_id='{$_POST['jdiv_id']}' WHERE "
|
$q = $pdo->prepare("UPDATE judges_jdiv SET jdiv_id='{$_POST['jdiv_id']}' WHERE "
|
||||||
. " id='$selectedcdl' ");
|
. " id='$selectedcdl' ");
|
||||||
$q->execute();
|
$q->execute();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005-2008 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005-2008 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2008-2012 Youth Science Ontario <info@youthscienceontario.ca>
|
* Copyright (C) 2008-2012 Youth Science Ontario <info@youthscienceontario.ca>
|
||||||
@ -302,9 +302,11 @@ function judge_available_for_round($j, $r)
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
foreach ($j['availability'] as $a) {
|
foreach ($j['availability'] as $a) {
|
||||||
if ($a['start'] <= $r['starttime'] &&
|
if (
|
||||||
|
$a['start'] <= $r['starttime'] &&
|
||||||
$a['end'] >= $r['endtime'] &&
|
$a['end'] >= $r['endtime'] &&
|
||||||
$a['date'] == $r['date']) {
|
$a['date'] == $r['date']
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -389,7 +391,7 @@ function pr_judge(&$jt, $jid)
|
|||||||
foreach ($jt['cats'] as $c)
|
foreach ($jt['cats'] as $c)
|
||||||
print("c{$c}={$j['cat_prefs'][$c]} ");
|
print("c{$c}={$j['cat_prefs'][$c]} ");
|
||||||
echo ' / ';
|
echo ' / ';
|
||||||
foreach ($j['cat_prefs'] AS $k => $v) {
|
foreach ($j['cat_prefs'] as $k => $v) {
|
||||||
print("c{$k}=$v ");
|
print("c{$k}=$v ");
|
||||||
}
|
}
|
||||||
echo ') (';
|
echo ') (';
|
||||||
@ -398,7 +400,7 @@ function pr_judge(&$jt, $jid)
|
|||||||
print("d{$d}={$j['div_prefs'][$d]} ");
|
print("d{$d}={$j['div_prefs'][$d]} ");
|
||||||
|
|
||||||
echo ' / ';
|
echo ' / ';
|
||||||
foreach ($j['div_prefs'] AS $k => $v) {
|
foreach ($j['div_prefs'] as $k => $v) {
|
||||||
print("d{$k}=$v ");
|
print("d{$k}=$v ");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -482,9 +484,11 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
|||||||
if ($r->jdiv_id == 0)
|
if ($r->jdiv_id == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$jdiv[$r->jdiv_id]['config'][] = array('div' => $r->projectdivisions_id,
|
$jdiv[$r->jdiv_id]['config'][] = array(
|
||||||
|
'div' => $r->projectdivisions_id,
|
||||||
'cat' => $r->projectcategories_id,
|
'cat' => $r->projectcategories_id,
|
||||||
'lang' => $r->lang);
|
'lang' => $r->lang
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$keys = array_keys($jdiv);
|
$keys = array_keys($jdiv);
|
||||||
@ -779,8 +783,14 @@ for ($k = 0; $k < count($keys); $k++) {
|
|||||||
$current_jdiv = $jdiv[$jdiv_id];
|
$current_jdiv = $jdiv[$jdiv_id];
|
||||||
|
|
||||||
$e = 100 + 10 * ($config['effort'] / 1000);
|
$e = 100 + 10 * ($config['effort'] / 1000);
|
||||||
$a = new annealer($jdiv[$jdiv_id]['num_jteams'], 125, $e, 0.9,
|
$a = new annealer(
|
||||||
'jdiv_compute_cost', $project_ids);
|
$jdiv[$jdiv_id]['num_jteams'],
|
||||||
|
125,
|
||||||
|
$e,
|
||||||
|
0.9,
|
||||||
|
'jdiv_compute_cost',
|
||||||
|
$project_ids
|
||||||
|
);
|
||||||
$a->anneal();
|
$a->anneal();
|
||||||
|
|
||||||
$jdiv[$jdiv_id]['jteams'] = array();
|
$jdiv[$jdiv_id]['jteams'] = array();
|
||||||
@ -862,7 +872,7 @@ for ($x = 1; $x < count($jteam); $x++) {
|
|||||||
|
|
||||||
if (count($t['cats'])) {
|
if (count($t['cats'])) {
|
||||||
$first = true;
|
$first = true;
|
||||||
foreach ($t['cats'] AS $cid) {
|
foreach ($t['cats'] as $cid) {
|
||||||
print('c' . $cid . ' ');
|
print('c' . $cid . ' ');
|
||||||
if (!$first)
|
if (!$first)
|
||||||
$catstr .= '+';
|
$catstr .= '+';
|
||||||
@ -874,7 +884,7 @@ for ($x = 1; $x < count($jteam); $x++) {
|
|||||||
$divstr = '';
|
$divstr = '';
|
||||||
if (count($t['divs'])) {
|
if (count($t['divs'])) {
|
||||||
$first = true;
|
$first = true;
|
||||||
foreach ($t['divs'] AS $did) {
|
foreach ($t['divs'] as $did) {
|
||||||
print('d' . $did . ' ');
|
print('d' . $did . ' ');
|
||||||
if (!$first)
|
if (!$first)
|
||||||
$divstr .= '/';
|
$divstr .= '/';
|
||||||
@ -1364,8 +1374,14 @@ if ($config['scheduler_enable_sa_scheduling'] == 'yes') {
|
|||||||
$judge_ids = $r['available_judge_ids'];
|
$judge_ids = $r['available_judge_ids'];
|
||||||
|
|
||||||
$e = $config['effort'];
|
$e = $config['effort'];
|
||||||
$a = new annealer(count($r['jteam_ids']), 25, $e, 0.98,
|
$a = new annealer(
|
||||||
'judges_sa_cost_function', $judge_ids);
|
count($r['jteam_ids']),
|
||||||
|
25,
|
||||||
|
$e,
|
||||||
|
0.98,
|
||||||
|
'judges_sa_cost_function',
|
||||||
|
$judge_ids
|
||||||
|
);
|
||||||
// $a->set_update_callback(judges_to_teams_update);
|
// $a->set_update_callback(judges_to_teams_update);
|
||||||
// $a->set_pick_move(judges_sa_pick_move);
|
// $a->set_pick_move(judges_sa_pick_move);
|
||||||
$a->anneal();
|
$a->anneal();
|
||||||
@ -1444,10 +1460,12 @@ $q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE
|
|||||||
$q->execute();
|
$q->execute();
|
||||||
$x = 0;
|
$x = 0;
|
||||||
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||||
$available_timeslots[] = array('id' => $r->id,
|
$available_timeslots[] = array(
|
||||||
|
'id' => $r->id,
|
||||||
'date' => $r->date,
|
'date' => $r->date,
|
||||||
'starttime' => substr($r->starttime, 0, -3),
|
'starttime' => substr($r->starttime, 0, -3),
|
||||||
'endtime' => substr($r->endtime, 0, -3));
|
'endtime' => substr($r->endtime, 0, -3)
|
||||||
|
);
|
||||||
print(' ' . $available_timeslots[$x]['starttime'] . ' -> '
|
print(' ' . $available_timeslots[$x]['starttime'] . ' -> '
|
||||||
. $available_timeslots[$x]['endtime'] . "\n");
|
. $available_timeslots[$x]['endtime'] . "\n");
|
||||||
$x++;
|
$x++;
|
||||||
|
@ -54,4 +54,3 @@ if ($pos === false) {
|
|||||||
// usleep(1500000); // 1.5 second to allow the judges_sa to update the % status to 0% otherwise the status page will think its not running if it gets there too soon
|
// usleep(1500000); // 1.5 second to allow the judges_sa to update the % status to 0% otherwise the status page will think its not running if it gets there too soon
|
||||||
header('Location: judges_scheduler_status.php');
|
header('Location: judges_scheduler_status.php');
|
||||||
exit;
|
exit;
|
||||||
?>
|
|
||||||
|
@ -2,5 +2,3 @@
|
|||||||
// In Windows OS with Apache server this exec call will start judges_sa.php as a separate process but the call to exec() does not return until the scheduler completes. Note the process runs at normal priority. Status can be checked with judges_scheduler_status.php. This is a temporary solution for Windows / Apache
|
// In Windows OS with Apache server this exec call will start judges_sa.php as a separate process but the call to exec() does not return until the scheduler completes. Note the process runs at normal priority. Status can be checked with judges_scheduler_status.php. This is a temporary solution for Windows / Apache
|
||||||
exec('php judges_sa.php >../data/logs/judge_scheduler_' . date('YmdHis') . '.log 2>&1 &');
|
exec('php judges_sa.php >../data/logs/judge_scheduler_' . date('YmdHis') . '.log 2>&1 &');
|
||||||
exit;
|
exit;
|
||||||
?>
|
|
||||||
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -24,10 +25,14 @@
|
|||||||
?>
|
?>
|
||||||
<?
|
<?
|
||||||
require('../common.inc.php');
|
require('../common.inc.php');
|
||||||
send_header('Scheduler Status',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Scheduler Status',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Judges' => 'admin/judges.php'));
|
'Judges' => 'admin/judges.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -53,8 +58,7 @@ function updateStatus() {
|
|||||||
$("#schedulerpercent").html("100%");
|
$("#schedulerpercent").html("100%");
|
||||||
$("#updatestatus").html("Scheduling Complete");
|
$("#updatestatus").html("Scheduling Complete");
|
||||||
$("#schedulereta").html("Complete");
|
$("#schedulereta").html("Complete");
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$("#schedulerpercent").html(obj[0] + "%");
|
$("#schedulerpercent").html(obj[0] + "%");
|
||||||
setTimeout('updateStatus()', 5000);
|
setTimeout('updateStatus()', 5000);
|
||||||
$("#updatestatus").html("Updating... Done!");
|
$("#updatestatus").html("Updating... Done!");
|
||||||
@ -73,8 +77,7 @@ function updateStatus() {
|
|||||||
remainingtime = remainingpercent * avgtimeperpercent;
|
remainingtime = remainingpercent * avgtimeperpercent;
|
||||||
if (remainingtime > 0 && remainingtime != "Infinity" && obj[0] > 0) {
|
if (remainingtime > 0 && remainingtime != "Infinity" && obj[0] > 0) {
|
||||||
$("#schedulereta").html(format_duration(Math.round(remainingtime / 1000)));
|
$("#schedulereta").html(format_duration(Math.round(remainingtime / 1000)));
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
$("#schedulereta").html("Calculating...");
|
$("#schedulereta").html("Calculating...");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -100,28 +103,30 @@ function format_duration(seconds) {
|
|||||||
if (s > 86400) {
|
if (s > 86400) {
|
||||||
var days = Math.floor(s / 86400)
|
var days = Math.floor(s / 86400)
|
||||||
s -= days * 86400;
|
s -= days * 86400;
|
||||||
if(days>1) pl='s'; else pl='';
|
if (days > 1) pl = 's';
|
||||||
|
else pl = '';
|
||||||
output += days + ' day' + pl + ' ';
|
output += days + ' day' + pl + ' ';
|
||||||
}
|
}
|
||||||
if (s > 3600) {
|
if (s > 3600) {
|
||||||
var hours = Math.floor(s / 3600)
|
var hours = Math.floor(s / 3600)
|
||||||
s -= hours * 3600;
|
s -= hours * 3600;
|
||||||
if(hours>1) pl='s'; else pl='';
|
if (hours > 1) pl = 's';
|
||||||
|
else pl = '';
|
||||||
output += hours + ' hour' + pl + ' ';
|
output += hours + ' hour' + pl + ' ';
|
||||||
}
|
}
|
||||||
if (s > 60) {
|
if (s > 60) {
|
||||||
var minutes = Math.floor(s / 60)
|
var minutes = Math.floor(s / 60)
|
||||||
s -= minutes * 60;
|
s -= minutes * 60;
|
||||||
if(minutes>1) pl='s'; else pl='';
|
if (minutes > 1) pl = 's';
|
||||||
|
else pl = '';
|
||||||
output += minutes + ' minute' + pl + ' ';
|
output += minutes + ' minute' + pl + ' ';
|
||||||
}
|
}
|
||||||
if(s>1) pl='s'; else pl='';
|
if (s > 1) pl = 's';
|
||||||
|
else pl = '';
|
||||||
output += s + ' second' + pl
|
output += s + ' second' + pl
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
|
@ -13,4 +13,3 @@ $r = $q->fetch(PDO::FETCH_OBJ);
|
|||||||
$status = $r->val;
|
$status = $r->val;
|
||||||
|
|
||||||
echo "$percent:$status\n";
|
echo "$percent:$status\n";
|
||||||
?>
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -37,10 +38,14 @@ if ($action == 'update') {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header('Judge Scheduler Configuration',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Judge Scheduler Configuration',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Judges' => 'admin/judges.php'));
|
'Judges' => 'admin/judges.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
config_editor('Judge Scheduler', $config['FAIRYEAR'], 'var', $_SERVER['PHP_SELF']);
|
config_editor('Judge Scheduler', $config['FAIRYEAR'], 'var', $_SERVER['PHP_SELF']);
|
||||||
echo '<hr />';
|
echo '<hr />';
|
||||||
|
@ -62,15 +62,15 @@ function judges_scheduler_check_awards()
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$divcat = array();
|
$divcat = array();
|
||||||
foreach ($dkeys AS $d) {
|
foreach ($dkeys as $d) {
|
||||||
foreach ($ckeys AS $c) {
|
foreach ($ckeys as $c) {
|
||||||
$divcat[] = array('c' => $c, 'd' => $d);
|
$divcat[] = array('c' => $c, 'd' => $d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$missing_awards = array();
|
$missing_awards = array();
|
||||||
foreach ($divcat AS $dc) {
|
foreach ($divcat as $dc) {
|
||||||
$d = $dc['d'];
|
$d = $dc['d'];
|
||||||
$c = $dc['c'];
|
$c = $dc['c'];
|
||||||
$q = $pdo->prepare("SELECT award_awards.id FROM
|
$q = $pdo->prepare("SELECT award_awards.id FROM
|
||||||
@ -154,14 +154,14 @@ function judges_scheduler_check_judges()
|
|||||||
|
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<th></th><th>' . i18n('Total') . '</th>';
|
echo '<th></th><th>' . i18n('Total') . '</th>';
|
||||||
foreach ($config['languages'] AS $lkey => $lname)
|
foreach ($config['languages'] as $lkey => $lname)
|
||||||
echo "<th>$lkey</th>";
|
echo "<th>$lkey</th>";
|
||||||
echo '<th>' . i18n('Total') . '</th>';
|
echo '<th>' . i18n('Total') . '</th>';
|
||||||
foreach ($config['languages'] AS $lkey => $lname)
|
foreach ($config['languages'] as $lkey => $lname)
|
||||||
echo "<th>$lkey</th>";
|
echo "<th>$lkey</th>";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
foreach ($jdiv AS $jdiv_id => $jd) {
|
foreach ($jdiv as $jdiv_id => $jd) {
|
||||||
$c = $jd['num_projects']['total'];
|
$c = $jd['num_projects']['total'];
|
||||||
|
|
||||||
// total judge teams calculation
|
// total judge teams calculation
|
||||||
@ -171,7 +171,7 @@ function judges_scheduler_check_judges()
|
|||||||
$jdiv[$jdiv_id]['num_jteams']['total'] = $t['total'];
|
$jdiv[$jdiv_id]['num_jteams']['total'] = $t['total'];
|
||||||
$totalteams['total'] += $t['total'];
|
$totalteams['total'] += $t['total'];
|
||||||
// language teams calculation
|
// language teams calculation
|
||||||
foreach ($config['languages'] AS $lkey => $lname) {
|
foreach ($config['languages'] as $lkey => $lname) {
|
||||||
$c = $jd['num_projects'][$lkey];
|
$c = $jd['num_projects'][$lkey];
|
||||||
$t['total_' . $lkey] = ceil($c / $config['max_projects_per_team'] * $config['times_judged']);
|
$t['total_' . $lkey] = ceil($c / $config['max_projects_per_team'] * $config['times_judged']);
|
||||||
if ($t['total_' . $lkey] < $config['times_judged'] && $c > 0)
|
if ($t['total_' . $lkey] < $config['times_judged'] && $c > 0)
|
||||||
@ -183,12 +183,12 @@ function judges_scheduler_check_judges()
|
|||||||
echo "<tr><td>Judging Division Group $jdiv_id</td>";
|
echo "<tr><td>Judging Division Group $jdiv_id</td>";
|
||||||
echo "<td align=\"center\">{$jd['num_projects']['total']}</td>";
|
echo "<td align=\"center\">{$jd['num_projects']['total']}</td>";
|
||||||
$langstr = '';
|
$langstr = '';
|
||||||
foreach ($config['languages'] AS $lkey => $lname) {
|
foreach ($config['languages'] as $lkey => $lname) {
|
||||||
$clang = ($jd['num_projects'][$lkey] ? $jd['num_projects'][$lkey] : 0);
|
$clang = ($jd['num_projects'][$lkey] ? $jd['num_projects'][$lkey] : 0);
|
||||||
echo "<td align=\"center\">$clang</td>";
|
echo "<td align=\"center\">$clang</td>";
|
||||||
}
|
}
|
||||||
echo "<td align=\"center\">{$t['total']}</td>";
|
echo "<td align=\"center\">{$t['total']}</td>";
|
||||||
foreach ($config['languages'] AS $lkey => $lname) {
|
foreach ($config['languages'] as $lkey => $lname) {
|
||||||
$clang = ($jd['num_projects'][$lkey] ? $jd['num_projects'][$lkey] : 0);
|
$clang = ($jd['num_projects'][$lkey] ? $jd['num_projects'][$lkey] : 0);
|
||||||
// echo "<td align=\"center\">{$t['total']}</td>";
|
// echo "<td align=\"center\">{$t['total']}</td>";
|
||||||
echo "<td align=\"center\">{$t['total_' .$lkey]}</td>";
|
echo "<td align=\"center\">{$t['total_' .$lkey]}</td>";
|
||||||
@ -207,7 +207,7 @@ function judges_scheduler_check_judges()
|
|||||||
$maxjudges['total'] = ($totalteams['total'] * $config['max_judges_per_team']);
|
$maxjudges['total'] = ($totalteams['total'] * $config['max_judges_per_team']);
|
||||||
echo i18n('Minimum number of judges required: %1', array($minjudges['total'])) . '<br />';
|
echo i18n('Minimum number of judges required: %1', array($minjudges['total'])) . '<br />';
|
||||||
|
|
||||||
foreach ($config['languages'] AS $lkey => $lname) {
|
foreach ($config['languages'] as $lkey => $lname) {
|
||||||
if ($minjudges['total'] && $projecttotal)
|
if ($minjudges['total'] && $projecttotal)
|
||||||
$minjudges[$lkey] = round($totalteams['total_' . $lkey] * $config['min_judges_per_team']); // $projectlanguagetotal[$lkey]/$projecttotal*$minjudges['total']);
|
$minjudges[$lkey] = round($totalteams['total_' . $lkey] * $config['min_judges_per_team']); // $projectlanguagetotal[$lkey]/$projecttotal*$minjudges['total']);
|
||||||
else
|
else
|
||||||
@ -234,10 +234,10 @@ function judges_scheduler_check_judges()
|
|||||||
$ok = false;
|
$ok = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($config['languages'] AS $lkey => $lname) {
|
foreach ($config['languages'] as $lkey => $lname) {
|
||||||
$lcount = 0;
|
$lcount = 0;
|
||||||
foreach ($judges AS $j) {
|
foreach ($judges as $j) {
|
||||||
foreach ($j['languages'] AS $jlang) {
|
foreach ($j['languages'] as $jlang) {
|
||||||
if ($jlang == $lkey)
|
if ($jlang == $lkey)
|
||||||
$lcount++;
|
$lcount++;
|
||||||
}
|
}
|
||||||
@ -261,5 +261,3 @@ function judges_scheduler_check_judges()
|
|||||||
// now check if we can find a divisional award for each division and category
|
// now check if we can find a divisional award for each division and category
|
||||||
return $ok;
|
return $ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -259,20 +260,21 @@ if (get_value_or_default($action) == 'add' && $_GET['num']) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (get_value_or_default($action) == 'edit' && $edit) {
|
if (get_value_or_default($action) == 'edit' && $edit) {
|
||||||
send_header('Edit Judging Team',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Edit Judging Team',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Judges' => 'admin/judges.php',
|
'Judges' => 'admin/judges.php',
|
||||||
'Manage Judging Teams' => 'admin/judges_teams.php'));
|
'Manage Judging Teams' => 'admin/judges_teams.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
function addclicked()
|
function addclicked() {
|
||||||
{
|
|
||||||
document.forms.judges.action.value = "assign";
|
document.forms.judges.action.value = "assign";
|
||||||
document.forms.judges.submit();
|
document.forms.judges.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
@ -296,7 +298,7 @@ function addclicked()
|
|||||||
echo '<tr><td>' . i18n('Awards') . ':</td><td>';
|
echo '<tr><td>' . i18n('Awards') . ':</td><td>';
|
||||||
|
|
||||||
if (count(get_value_from_array($team, 'awards', []))) {
|
if (count(get_value_from_array($team, 'awards', []))) {
|
||||||
foreach ($team['awards'] AS $award) {
|
foreach ($team['awards'] as $award) {
|
||||||
echo '<a onclick="return confirmClick(\'Are you sure you want to unassign this award from this team?\')" href="judges_teams.php?action=unassign&unassign=' . $award['id'] . '&edit=' . $team['id'] . '"><img border=0 src="' . $config['SFIABDIRECTORY'] . '/images/16/button_cancel.' . $config['icon_extension'] . '"></a>';
|
echo '<a onclick="return confirmClick(\'Are you sure you want to unassign this award from this team?\')" href="judges_teams.php?action=unassign&unassign=' . $award['id'] . '&edit=' . $team['id'] . '"><img border=0 src="' . $config['SFIABDIRECTORY'] . '/images/16/button_cancel.' . $config['icon_extension'] . '"></a>';
|
||||||
echo ' (' . $award['award_type'] . ') ' . $award['name'] . ' <br />';
|
echo ' (' . $award['award_type'] . ') ' . $award['name'] . ' <br />';
|
||||||
}
|
}
|
||||||
@ -373,17 +375,21 @@ function addclicked()
|
|||||||
echo '<input type=submit value="' . i18n('Save Changes') . '">';
|
echo '<input type=submit value="' . i18n('Save Changes') . '">';
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
} else {
|
} else {
|
||||||
send_header('Manage Judging Teams',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Manage Judging Teams',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Judges' => 'admin/judges.php'));
|
'Judges' => 'admin/judges.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
|
||||||
$teams = getJudgingTeams();
|
$teams = getJudgingTeams();
|
||||||
$newteamnum = null;
|
$newteamnum = null;
|
||||||
if (count($teams)) {
|
if (count($teams)) {
|
||||||
// grab an array of all the current team numbers
|
// grab an array of all the current team numbers
|
||||||
foreach ($teams AS $team)
|
foreach ($teams as $team)
|
||||||
$teamnumbers[$team['num']] = 1;
|
$teamnumbers[$team['num']] = 1;
|
||||||
|
|
||||||
// start at 1, and find the next available team number
|
// start at 1, and find the next available team number
|
||||||
@ -417,14 +423,14 @@ function addclicked()
|
|||||||
echo '<th>Award(s)</th>';
|
echo '<th>Award(s)</th>';
|
||||||
echo '<th>Actions</th>';
|
echo '<th>Actions</th>';
|
||||||
echo '</tr></thead>';
|
echo '</tr></thead>';
|
||||||
foreach ($teams AS $team) {
|
foreach ($teams as $team) {
|
||||||
echo '<tr><td>#' . $team['num'] . '</td><td>';
|
echo '<tr><td>#' . $team['num'] . '</td><td>';
|
||||||
echo $team['name'];
|
echo $team['name'];
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
echo '<td>';
|
echo '<td>';
|
||||||
if (count(get_value_from_array($team, 'awards', []))) {
|
if (count(get_value_from_array($team, 'awards', []))) {
|
||||||
foreach ($team['awards'] AS $award) {
|
foreach ($team['awards'] as $award) {
|
||||||
echo $award['name'] . ' <br />';
|
echo $award['name'] . ' <br />';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -28,39 +29,39 @@ require_once ('../user.inc.php');
|
|||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
require_once('judges.inc.php');
|
require_once('judges.inc.php');
|
||||||
|
|
||||||
send_header('Judging Team Members',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Judging Team Members',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Judges' => 'admin/judges.php'));
|
'Judges' => 'admin/judges.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
function addbuttonclicked(team)
|
function addbuttonclicked(team) {
|
||||||
{
|
|
||||||
document.forms.judges.action.value = "add";
|
document.forms.judges.action.value = "add";
|
||||||
document.forms.judges.team_num.value = team;
|
document.forms.judges.team_num.value = team;
|
||||||
document.forms.judges.submit();
|
document.forms.judges.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function switchjudgeinfo()
|
function switchjudgeinfo() {
|
||||||
{
|
if (document.forms.judges["judgelist[]"].selectedIndex != -1) {
|
||||||
if(document.forms.judges["judgelist[]"].selectedIndex != -1)
|
|
||||||
{
|
|
||||||
currentname = document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].text;
|
currentname = document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].text;
|
||||||
currentid = document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].value;
|
currentid = document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].value;
|
||||||
|
|
||||||
document.forms.judges.judgeinfobutton.disabled = false;
|
document.forms.judges.judgeinfobutton.disabled = false;
|
||||||
document.forms.judges.judgeinfobutton.value = currentname;
|
document.forms.judges.judgeinfobutton.value = currentname;
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
document.forms.judges.judgeinfobutton.disabled = true;
|
document.forms.judges.judgeinfobutton.disabled = true;
|
||||||
document.forms.judges.judgeinfobutton.value = "<? echo i18n('Judge Info') ?>";
|
document.forms.judges.judgeinfobutton.value = "<? echo i18n('Judge Info') ?>";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var mousex = 0, mousey = 0;
|
var mousex = 0,
|
||||||
|
mousey = 0;
|
||||||
var selectedMemberId;
|
var selectedMemberId;
|
||||||
|
|
||||||
function showMemberDetails(judgeId) {
|
function showMemberDetails(judgeId) {
|
||||||
@ -68,7 +69,9 @@ function showMemberDetails(judgeId){
|
|||||||
judgeId = document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].value;
|
judgeId = document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].value;
|
||||||
}
|
}
|
||||||
$('#infodiv').load("judges_info.php?id=" + judgeId,
|
$('#infodiv').load("judges_info.php?id=" + judgeId,
|
||||||
function(){ eval('doShowMemberDetails(' + judgeId + ');'); }
|
function() {
|
||||||
|
eval('doShowMemberDetails(' + judgeId + ');');
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,13 +99,14 @@ function doShowMemberDetails(judgeId){
|
|||||||
}
|
}
|
||||||
|
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
$('#infodivcover').click(function(){ editMember(); });
|
$('#infodivcover').click(function() {
|
||||||
|
editMember();
|
||||||
|
});
|
||||||
$(document).mousemove(function(e) {
|
$(document).mousemove(function(e) {
|
||||||
mousex = e.pageX;
|
mousex = e.pageX;
|
||||||
mousey = e.pageY;
|
mousey = e.pageY;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?
|
<?
|
||||||
|
|
||||||
@ -124,7 +128,7 @@ if (get_value_from_array($_POST, 'action') == 'add' && get_value_from_array($_PO
|
|||||||
}
|
}
|
||||||
$added = 0;
|
$added = 0;
|
||||||
|
|
||||||
foreach ($_POST['judgelist'] AS $selectedjudge) {
|
foreach ($_POST['judgelist'] as $selectedjudge) {
|
||||||
// before we insert them, we need to make sure they dont already belong to this team. We can not have the same judge assigned to the same team multiple times.
|
// before we insert them, we need to make sure they dont already belong to this team. We can not have the same judge assigned to the same team multiple times.
|
||||||
|
|
||||||
$q = $pdo->prepare("SELECT * FROM judges_teams_link WHERE users_id='$selectedjudge' AND judges_teams_id='$team_id'");
|
$q = $pdo->prepare("SELECT * FROM judges_teams_link WHERE users_id='$selectedjudge' AND judges_teams_id='$team_id'");
|
||||||
@ -191,7 +195,7 @@ if (get_value_from_array($_GET, 'action') == 'empty' && get_value_from_array($_G
|
|||||||
|
|
||||||
if (get_value_from_array($_POST, 'action') == 'saveteamnames') {
|
if (get_value_from_array($_POST, 'action') == 'saveteamnames') {
|
||||||
if (count($_POST['team_names'])) {
|
if (count($_POST['team_names'])) {
|
||||||
foreach ($_POST['team_names'] AS $team_id => $team_name) {
|
foreach ($_POST['team_names'] as $team_id => $team_name) {
|
||||||
$stmt = $pdo->prepare("UPDATE judges_teams SET name='" . stripslashes($team_name) . "' WHERE id='$team_id'");
|
$stmt = $pdo->prepare("UPDATE judges_teams SET name='" . stripslashes($team_name) . "' WHERE id='$team_id'");
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
}
|
}
|
||||||
@ -247,11 +251,11 @@ if (get_value_from_array($_GET, 'action') == 'autoassignspecial') {
|
|||||||
$jlist[] = $j['id'];
|
$jlist[] = $j['id'];
|
||||||
}
|
}
|
||||||
echo 'We have ' . count($jlist) . ' special awards judges to assign';
|
echo 'We have ' . count($jlist) . ' special awards judges to assign';
|
||||||
foreach ($jlist AS $jid) {
|
foreach ($jlist as $jid) {
|
||||||
$j = $judgelist[$jid];
|
$j = $judgelist[$jid];
|
||||||
if (is_array($j['special_award_selected']) && count($j['special_award_selected'])) {
|
if (is_array($j['special_award_selected']) && count($j['special_award_selected'])) {
|
||||||
// assing them to ALL teams for ALL awards
|
// assing them to ALL teams for ALL awards
|
||||||
foreach ($j['special_award_selected'] AS $awardid) {
|
foreach ($j['special_award_selected'] as $awardid) {
|
||||||
echo "Looking for a team for award $awardid <br />";
|
echo "Looking for a team for award $awardid <br />";
|
||||||
// find the award id linked to a team
|
// find the award id linked to a team
|
||||||
$q = $pdo->prepare("SELECT * FROM judges_teams_awards_link WHERE award_awards_id='{$awardid}' AND year='{$config['FAIRYEAR']}'");
|
$q = $pdo->prepare("SELECT * FROM judges_teams_awards_link WHERE award_awards_id='{$awardid}' AND year='{$config['FAIRYEAR']}'");
|
||||||
@ -360,7 +364,7 @@ echo '<td valign="top">';
|
|||||||
|
|
||||||
$teams = getJudgingTeams();
|
$teams = getJudgingTeams();
|
||||||
|
|
||||||
foreach ($teams AS $team) {
|
foreach ($teams as $team) {
|
||||||
echo '<hr>';
|
echo '<hr>';
|
||||||
|
|
||||||
echo '<table width="100%">';
|
echo '<table width="100%">';
|
||||||
@ -379,7 +383,7 @@ foreach ($teams AS $team) {
|
|||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
|
|
||||||
if (count(get_value_from_array($team, 'members', []))) {
|
if (count(get_value_from_array($team, 'members', []))) {
|
||||||
foreach ($team['members'] AS $member) {
|
foreach ($team['members'] as $member) {
|
||||||
$j = &$judgelist[$member['id']];
|
$j = &$judgelist[$member['id']];
|
||||||
echo '<tr><td>';
|
echo '<tr><td>';
|
||||||
|
|
||||||
@ -394,7 +398,7 @@ foreach ($teams AS $team) {
|
|||||||
|
|
||||||
$langerr = false;
|
$langerr = false;
|
||||||
$judgeerr = false;
|
$judgeerr = false;
|
||||||
foreach ($team['languages'] AS $teamlang) {
|
foreach ($team['languages'] as $teamlang) {
|
||||||
if (is_array($j['languages'])) {
|
if (is_array($j['languages'])) {
|
||||||
if (!in_array($teamlang, $j['languages'])) {
|
if (!in_array($teamlang, $j['languages'])) {
|
||||||
$langerr = true;
|
$langerr = true;
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -29,26 +30,25 @@ user_auth_required('committee', 'admin');
|
|||||||
require('judges.inc.php');
|
require('judges.inc.php');
|
||||||
require('../projects.inc.php');
|
require('../projects.inc.php');
|
||||||
|
|
||||||
send_header('Judging Teams Projects',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Judging Teams Projects',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Judges' => 'admin/judges.php'));
|
'Judges' => 'admin/judges.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
function assign(ts)
|
function assign(ts) {
|
||||||
{
|
|
||||||
document.forms.teamsprojects.timeslot.value = ts;
|
document.forms.teamsprojects.timeslot.value = ts;
|
||||||
document.forms.teamsprojects.submit();
|
document.forms.teamsprojects.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function eligibleclick()
|
function eligibleclick() {
|
||||||
{
|
if (document.forms.teamsprojects.showeligible.checked) {
|
||||||
if(document.forms.teamsprojects.showeligible.checked)
|
|
||||||
{
|
|
||||||
window.location.href = "judges_teams_projects.php?action=edit&edit=" + document.forms.teamsprojects.edit.value + "&judges_projects_list_eligible=true";
|
window.location.href = "judges_teams_projects.php?action=edit&edit=" + document.forms.teamsprojects.edit.value + "&judges_projects_list_eligible=true";
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
window.location.href = "judges_teams_projects.php?action=edit&edit=" + document.forms.teamsprojects.edit.value + "&judges_projects_list_eligible=false";
|
window.location.href = "judges_teams_projects.php?action=edit&edit=" + document.forms.teamsprojects.edit.value + "&judges_projects_list_eligible=false";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -111,7 +111,7 @@ if (($action == 'edit' || $action == 'assign') && $edit) {
|
|||||||
echo '<b>' . $team['name'] . ' (#' . $team['num'] . ')</b><br />';
|
echo '<b>' . $team['name'] . ' (#' . $team['num'] . ')</b><br />';
|
||||||
if (count($team['members'])) {
|
if (count($team['members'])) {
|
||||||
$memberlist = ' ';
|
$memberlist = ' ';
|
||||||
foreach ($team['members'] AS $member) {
|
foreach ($team['members'] as $member) {
|
||||||
if ($member['captain'] == 'yes')
|
if ($member['captain'] == 'yes')
|
||||||
$memberlist .= '<i>';
|
$memberlist .= '<i>';
|
||||||
$memberlist .= $member['firstname'] . ' ' . $member['lastname'];
|
$memberlist .= $member['firstname'] . ' ' . $member['lastname'];
|
||||||
@ -132,7 +132,7 @@ if (($action == 'edit' || $action == 'assign') && $edit) {
|
|||||||
$award_ids = array();
|
$award_ids = array();
|
||||||
if (count($team['awards'])) {
|
if (count($team['awards'])) {
|
||||||
$awardlist = ' ';
|
$awardlist = ' ';
|
||||||
foreach ($team['awards'] AS $award) {
|
foreach ($team['awards'] as $award) {
|
||||||
$awardlist .= $award['name'];
|
$awardlist .= $award['name'];
|
||||||
$awardlist .= ', ';
|
$awardlist .= ', ';
|
||||||
$award_ids[] = $award['id'];
|
$award_ids[] = $award['id'];
|
||||||
@ -318,16 +318,16 @@ if (($action == 'edit' || $action == 'assign') && $edit) {
|
|||||||
echo '</tr></thead>';
|
echo '</tr></thead>';
|
||||||
|
|
||||||
$teams = getJudgingTeams();
|
$teams = getJudgingTeams();
|
||||||
foreach ($teams AS $team) {
|
foreach ($teams as $team) {
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td width="200">';
|
echo '<td width="200">';
|
||||||
echo '<b>' . $team['name'] . ' (#' . $team['num'] . ')</b><br />';
|
echo '<b>' . $team['name'] . ' (#' . $team['num'] . ')</b><br />';
|
||||||
$memberlist = '';
|
$memberlist = '';
|
||||||
if (count(get_value_from_array($team, 'members', []))) {
|
if (count(get_value_from_array($team, 'members', []))) {
|
||||||
foreach ($team['members'] AS $member) {
|
foreach ($team['members'] as $member) {
|
||||||
echo ' ';
|
echo ' ';
|
||||||
$err = false;
|
$err = false;
|
||||||
foreach ($team['languages_projects'] AS $projectlang) {
|
foreach ($team['languages_projects'] as $projectlang) {
|
||||||
if (!in_array($projectlang, $member['languages_array'])) {
|
if (!in_array($projectlang, $member['languages_array'])) {
|
||||||
$err = true;
|
$err = true;
|
||||||
break;
|
break;
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -30,11 +31,13 @@ require_once ('judges.inc.php');
|
|||||||
|
|
||||||
$action = null;
|
$action = null;
|
||||||
|
|
||||||
$round_str = array('timeslot' => 'Judging Timeslot',
|
$round_str = array(
|
||||||
|
'timeslot' => 'Judging Timeslot',
|
||||||
'divisional1' => 'Divisional Round 1',
|
'divisional1' => 'Divisional Round 1',
|
||||||
'divisional2' => 'Divisional Round 2',
|
'divisional2' => 'Divisional Round 2',
|
||||||
'grand' => 'Grand Awards',
|
'grand' => 'Grand Awards',
|
||||||
'special' => 'Special Awards');
|
'special' => 'Special Awards'
|
||||||
|
);
|
||||||
if (array_key_exists('action', $_GET))
|
if (array_key_exists('action', $_GET))
|
||||||
$action = $_GET['action'];
|
$action = $_GET['action'];
|
||||||
if (array_key_exists('action', $_POST))
|
if (array_key_exists('action', $_POST))
|
||||||
@ -58,8 +61,8 @@ if ($action == 'assign') {
|
|||||||
// the db handles the uniqueness (to ensure the same timeslot isnt assigned to the same team more than once)
|
// the db handles the uniqueness (to ensure the same timeslot isnt assigned to the same team more than once)
|
||||||
// so all we'll do here is just mass insert without regards for whats already there.
|
// so all we'll do here is just mass insert without regards for whats already there.
|
||||||
if (count($_POST['teams']) && count($_POST['timeslots'])) {
|
if (count($_POST['teams']) && count($_POST['timeslots'])) {
|
||||||
foreach ($_POST['teams'] AS $tm) {
|
foreach ($_POST['teams'] as $tm) {
|
||||||
foreach ($_POST['timeslots'] AS $ts) {
|
foreach ($_POST['timeslots'] as $ts) {
|
||||||
$stmt = $pdo->prepare("INSERT INTO judges_teams_timeslots_link (judges_teams_id,judges_timeslots_id,year)
|
$stmt = $pdo->prepare("INSERT INTO judges_teams_timeslots_link (judges_teams_id,judges_timeslots_id,year)
|
||||||
VALUES ('$tm','$ts','{$config['FAIRYEAR']}')");
|
VALUES ('$tm','$ts','{$config['FAIRYEAR']}')");
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
@ -71,15 +74,18 @@ if ($action == 'assign') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header('Judging Teams Timeslots',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Judging Teams Timeslots',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Judges' => 'admin/judges.php'));
|
'Judges' => 'admin/judges.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
function checkall(what)
|
function checkall(what) {
|
||||||
{
|
|
||||||
for (i = 0; i < document.forms.teamstimeslots.elements.length; i++) {
|
for (i = 0; i < document.forms.teamstimeslots.elements.length; i++) {
|
||||||
if (document.forms.teamstimeslots.elements[i].name == what + "[]")
|
if (document.forms.teamstimeslots.elements[i].name == what + "[]")
|
||||||
document.forms.teamstimeslots.elements[i].checked = true;
|
document.forms.teamstimeslots.elements[i].checked = true;
|
||||||
@ -89,8 +95,8 @@ function checkall(what)
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function checknone(what)
|
|
||||||
{
|
function checknone(what) {
|
||||||
for (i = 0; i < document.forms.teamstimeslots.elements.length; i++) {
|
for (i = 0; i < document.forms.teamstimeslots.elements.length; i++) {
|
||||||
if (document.forms.teamstimeslots.elements[i].name == what + "[]")
|
if (document.forms.teamstimeslots.elements[i].name == what + "[]")
|
||||||
document.forms.teamstimeslots.elements[i].checked = false;
|
document.forms.teamstimeslots.elements[i].checked = false;
|
||||||
@ -99,8 +105,8 @@ function checknone(what)
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function checkinvert(what)
|
|
||||||
{
|
function checkinvert(what) {
|
||||||
|
|
||||||
for (i = 0; i < document.forms.teamstimeslots.elements.length; i++) {
|
for (i = 0; i < document.forms.teamstimeslots.elements.length; i++) {
|
||||||
if (document.forms.teamstimeslots.elements[i].name == what + "[]")
|
if (document.forms.teamstimeslots.elements[i].name == what + "[]")
|
||||||
@ -184,14 +190,14 @@ echo '<th>' . i18n('Timeslots') . '</th>';
|
|||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
$teams = getJudgingTeams();
|
$teams = getJudgingTeams();
|
||||||
foreach ($teams AS $team) {
|
foreach ($teams as $team) {
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td><input type="checkbox" name="teams[]" value="' . $team['id'] . '" /></td>';
|
echo '<td><input type="checkbox" name="teams[]" value="' . $team['id'] . '" /></td>';
|
||||||
echo '<td>';
|
echo '<td>';
|
||||||
echo '<b>' . $team['name'] . ' (#' . $team['num'] . ')</b><br />';
|
echo '<b>' . $team['name'] . ' (#' . $team['num'] . ')</b><br />';
|
||||||
$memberlist = '';
|
$memberlist = '';
|
||||||
if (count(get_value_from_array($team, 'members', []))) {
|
if (count(get_value_from_array($team, 'members', []))) {
|
||||||
foreach ($team['members'] AS $member) {
|
foreach ($team['members'] as $member) {
|
||||||
echo ' ';
|
echo ' ';
|
||||||
if ($member['captain'] == 'yes')
|
if ($member['captain'] == 'yes')
|
||||||
echo '<i>';
|
echo '<i>';
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -27,11 +28,13 @@ require_once ('../common.inc.php');
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
|
|
||||||
$round_str = array('timeslot' => 'Judging Timeslot',
|
$round_str = array(
|
||||||
|
'timeslot' => 'Judging Timeslot',
|
||||||
'divisional1' => 'Divisional Round 1',
|
'divisional1' => 'Divisional Round 1',
|
||||||
'divisional2' => 'Divisional Round 2',
|
'divisional2' => 'Divisional Round 2',
|
||||||
'grand' => 'Grand Awards',
|
'grand' => 'Grand Awards',
|
||||||
'special' => 'Special Awards');
|
'special' => 'Special Awards'
|
||||||
|
);
|
||||||
|
|
||||||
if (array_key_exists('action', $_POST))
|
if (array_key_exists('action', $_POST))
|
||||||
$action = $_POST['action'];
|
$action = $_POST['action'];
|
||||||
@ -218,16 +221,24 @@ if ($action == 'savemultiple') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($action == '') {
|
if ($action == '') {
|
||||||
send_header('Judging Rounds and Timeslots',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Judging Rounds and Timeslots',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Judges' => 'admin/judges.php'));
|
'Judges' => 'admin/judges.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
send_header('Judging Rounds and Timeslots',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Judging Rounds and Timeslots',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Judges' => 'admin/judges.php',
|
'Judges' => 'admin/judges.php',
|
||||||
'Judging Rounds and Timeslots' => 'admin/judges_timeslots.php'));
|
'Judging Rounds and Timeslots' => 'admin/judges_timeslots.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005-2006 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005-2006 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005-2006 James Grant <james@lightbox.org>
|
* Copyright (C) 2005-2006 James Grant <james@lightbox.org>
|
||||||
@ -27,10 +27,14 @@ require ('../common.inc.php');
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
require_once('judges.inc.php');
|
require_once('judges.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
send_header('Judging Score Entry - Update',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Judging Score Entry - Update',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Judging Score Entry' => 'admin/judging_score_entry.php'));
|
'Judging Score Entry' => 'admin/judging_score_entry.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$year = $config['FAIRYEAR'];
|
$year = $config['FAIRYEAR'];
|
||||||
$project_id = NULL;
|
$project_id = NULL;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005-2006 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005-2006 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005-2006 James Grant <james@lightbox.org>
|
* Copyright (C) 2005-2006 James Grant <james@lightbox.org>
|
||||||
@ -38,9 +38,13 @@ if ($_GET['csv'] == 'yes') {
|
|||||||
header('Cache-Control: no-cache');
|
header('Cache-Control: no-cache');
|
||||||
header('Content-disposition: inline; filename=judging_scores.csv');
|
header('Content-disposition: inline; filename=judging_scores.csv');
|
||||||
} else {
|
} else {
|
||||||
send_header('Judging Score Entry',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Judging Score Entry',
|
||||||
'Administration' => 'admin/index.php'));
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?
|
<?
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005-2006 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005-2006 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005-2006 James Grant <james@lightbox.org>
|
* Copyright (C) 2005-2006 James Grant <james@lightbox.org>
|
||||||
@ -244,8 +244,7 @@ function project_load()
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
function countwords()
|
function countwords() {
|
||||||
{
|
|
||||||
var wordmax = <?= $config['participant_project_summary_wordmax']; ?>;
|
var wordmax = <?= $config['participant_project_summary_wordmax']; ?>;
|
||||||
var summaryobj = document.getElementById('summary');
|
var summaryobj = document.getElementById('summary');
|
||||||
var wordcountobj = document.getElementById('wordcount');
|
var wordcountobj = document.getElementById('wordcount');
|
||||||
@ -273,21 +272,25 @@ function countwords()
|
|||||||
<form id="project_form">
|
<form id="project_form">
|
||||||
<input type="hidden" name="id" value="<?= $projectinfo->id ?>">
|
<input type="hidden" name="id" value="<?= $projectinfo->id ?>">
|
||||||
<table>
|
<table>
|
||||||
<tr> <td><?= i18n('Project Title') ?>: </td>
|
<tr>
|
||||||
|
<td><?= i18n('Project Title') ?>: </td>
|
||||||
<td><input type="text" name="title" size="50" value="<?= htmlspecialchars($projectinfo->title, null, 'ISO8859-1') ?>" /><?= REQUIREDFIELD ?>
|
<td><input type="text" name="title" size="50" value="<?= htmlspecialchars($projectinfo->title, null, 'ISO8859-1') ?>" /><?= REQUIREDFIELD ?>
|
||||||
<?
|
<?
|
||||||
if ($config['participant_project_title_charmax'])
|
if ($config['participant_project_title_charmax'])
|
||||||
echo i18n('(Max %1 characters)', array($config['participant_project_title_charmax']));
|
echo i18n('(Max %1 characters)', array($config['participant_project_title_charmax']));
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><?= i18n('Project Number') ?>: </td>
|
<td><?= i18n('Project Number') ?>: </td>
|
||||||
<td><input type="text" name="projectnumber" size="10" value="<?= $projectinfo->projectnumber ?>" />
|
<td><input type="text" name="projectnumber" size="10" value="<?= $projectinfo->projectnumber ?>" />
|
||||||
<input type="button" id="project_regenerate_number" value="<?= i18n('Re-Generate Project Number') ?>" />
|
<input type="button" id="project_regenerate_number" value="<?= i18n('Re-Generate Project Number') ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><?= i18n('Project Sort') ?>: </td>
|
<td><?= i18n('Project Sort') ?>: </td>
|
||||||
<td><input type="text" name="projectsort" size="10" value="<?= $projectinfo->projectsort ?>" /></td></tr>
|
<td><input type="text" name="projectsort" size="10" value="<?= $projectinfo->projectsort ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
if ($config['project_type'] == 'yes') {
|
if ($config['project_type'] == 'yes') {
|
||||||
@ -311,7 +314,8 @@ function countwords()
|
|||||||
<tr>
|
<tr>
|
||||||
<td><?= i18n('Age Category') ?>: </td>
|
<td><?= i18n('Age Category') ?>: </td>
|
||||||
<td><?= i18n($agecategories[$projectcategories_id]['category']) ?> (<?= i18n('Grades %1-%2', array($agecategories[$projectcategories_id]['mingrade'], $agecategories[$projectcategories_id]['maxgrade'])) ?>)</td>
|
<td><?= i18n($agecategories[$projectcategories_id]['category']) ?> (<?= i18n('Grades %1-%2', array($agecategories[$projectcategories_id]['mingrade'], $agecategories[$projectcategories_id]['maxgrade'])) ?>)</td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><?= i18n('Division') ?>: </td>
|
<td><?= i18n('Division') ?>: </td>
|
||||||
<td>
|
<td>
|
||||||
<?
|
<?
|
||||||
@ -340,9 +344,7 @@ function countwords()
|
|||||||
if ($config['usedivisionselector'] == 'yes') {
|
if ($config['usedivisionselector'] == 'yes') {
|
||||||
?>
|
?>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
|
function openDivSelWindow() {
|
||||||
function openDivSelWindow()
|
|
||||||
{
|
|
||||||
divselwin = window.open('register_participants_project_divisionselector.php', 'divsel', 'width=500,height=220,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no')
|
divselwin = window.open('register_participants_project_divisionselector.php', 'divsel', 'width=500,height=220,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no')
|
||||||
if (divselwin.opener == null) divselwin.opener = self;
|
if (divselwin.opener == null) divselwin.opener = self;
|
||||||
return false;
|
return false;
|
||||||
@ -363,7 +365,7 @@ function countwords()
|
|||||||
else
|
else
|
||||||
$currentlang = $_SESSION['lang'];
|
$currentlang = $_SESSION['lang'];
|
||||||
|
|
||||||
foreach ($config['languages'] AS $key => $val) {
|
foreach ($config['languages'] as $key => $val) {
|
||||||
if ($currentlang == $key)
|
if ($currentlang == $key)
|
||||||
$selected = 'selected="selected"';
|
$selected = 'selected="selected"';
|
||||||
else
|
else
|
||||||
@ -478,7 +480,8 @@ function countwords()
|
|||||||
echo '<tr><td>' . i18n('Feedback') . ': </td><td><textarea cols="60" rows="4" id="feedback" name="feedback">' . htmlspecialchars($projectinfo->feedback, null, 'ISO8859-1') . '</textarea><br />';
|
echo '<tr><td>' . i18n('Feedback') . ': </td><td><textarea cols="60" rows="4" id="feedback" name="feedback">' . htmlspecialchars($projectinfo->feedback, null, 'ISO8859-1') . '</textarea><br />';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</td></tr>
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<input type="button" id="project_save" value="<?= i18n('Save Project Information') ?>" />
|
<input type="button" id="project_save" value="<?= i18n('Save Project Information') ?>" />
|
||||||
</form>
|
</form>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -27,25 +27,34 @@ require ('../tableeditor.class.php');
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
|
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
send_header('Registration Fee Items Manager',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Registration Fee Items Manager',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'registration_fee_items_management');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'registration_fee_items_management'
|
||||||
|
);
|
||||||
|
|
||||||
$editor = new TableEditor('regfee_items',
|
$editor = new TableEditor(
|
||||||
|
'regfee_items',
|
||||||
array(
|
array(
|
||||||
'name' => 'Name (for regfee line)',
|
'name' => 'Name (for regfee line)',
|
||||||
'description' => 'Description',
|
'description' => 'Description',
|
||||||
'cost' => 'Cost',
|
'cost' => 'Cost',
|
||||||
'per' => 'Cost Per',
|
'per' => 'Cost Per',
|
||||||
), null,
|
),
|
||||||
array('year' => $config['FAIRYEAR']));
|
null,
|
||||||
|
array('year' => $config['FAIRYEAR'])
|
||||||
|
);
|
||||||
|
|
||||||
$editor->setPrimaryKey('id');
|
$editor->setPrimaryKey('id');
|
||||||
$editor->setDefaultSortField('description');
|
$editor->setDefaultSortField('description');
|
||||||
$editor->setRecordType('Registration Fee Item');
|
$editor->setRecordType('Registration Fee Item');
|
||||||
$editor->setFieldOptions('per', array(array('key' => 'student', 'val' => 'Student'),
|
$editor->setFieldOptions('per', array(
|
||||||
array('key' => 'project', 'val' => 'Project')));
|
array('key' => 'student', 'val' => 'Student'),
|
||||||
|
array('key' => 'project', 'val' => 'Project')
|
||||||
|
));
|
||||||
$editor->setFieldInputType('per', 'select');
|
$editor->setFieldInputType('per', 'select');
|
||||||
$editor->filterList('year', $config['FAIRYEAR']);
|
$editor->filterList('year', $config['FAIRYEAR']);
|
||||||
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -27,10 +28,14 @@ require ('../common.inc.php');
|
|||||||
include '../config/signaturepage_or_permissionform.php';
|
include '../config/signaturepage_or_permissionform.php';
|
||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
send_header('Participant Registration',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Participant Registration',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'participant_registration');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'participant_registration'
|
||||||
|
);
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
echo '<a href="registration_receivedforms.php">' . i18n("Input Received $plural_participationform") . '</a> <br />';
|
echo '<a href="registration_receivedforms.php">' . i18n("Input Received $plural_participationform") . '</a> <br />';
|
||||||
echo '<a href="registration_list.php">' . i18n('Registration List and Student/Project Editor') . '</a> <br />';
|
echo '<a href="registration_list.php">' . i18n('Registration List and Student/Project Editor') . '</a> <br />';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005-2006 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005-2006 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005-2006 James Grant <james@lightbox.org>
|
* Copyright (C) 2005-2006 James Grant <james@lightbox.org>
|
||||||
@ -95,13 +95,19 @@ switch ($action) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($auth_type == 'committee') {
|
if ($auth_type == 'committee') {
|
||||||
send_header('Registration Management',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Registration Management',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Participant Registration' => 'admin/registration.php'));
|
'Participant Registration' => 'admin/registration.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
send_header('Student/Project Management',
|
send_header(
|
||||||
array('Fair Main' => 'fair_main.php'));
|
'Student/Project Management',
|
||||||
|
array('Fair Main' => 'fair_main.php')
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -124,12 +130,10 @@ if ($auth_type == 'committee') {
|
|||||||
|
|
||||||
|
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
|
|
||||||
var registrations_id = 0;
|
var registrations_id = 0;
|
||||||
var registrations_new = 0;
|
var registrations_new = 0;
|
||||||
|
|
||||||
function popup_editor(id, open_tab)
|
function popup_editor(id, open_tab) {
|
||||||
{
|
|
||||||
var w = (document.documentElement.clientWidth * 0.9);
|
var w = (document.documentElement.clientWidth * 0.9);
|
||||||
var h = (document.documentElement.clientHeight * 0.9);
|
var h = (document.documentElement.clientHeight * 0.9);
|
||||||
|
|
||||||
@ -176,8 +180,7 @@ function popup_editor(id, open_tab)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_students(numstudents)
|
function update_students(numstudents) {
|
||||||
{
|
|
||||||
var id = registrations_id;
|
var id = registrations_id;
|
||||||
|
|
||||||
var req = "action=students_load&id=" + id;
|
var req = "action=students_load&id=" + id;
|
||||||
@ -215,8 +218,7 @@ function update_students(numstudents)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_project()
|
function update_project() {
|
||||||
{
|
|
||||||
var id = registrations_id;
|
var id = registrations_id;
|
||||||
$("#editor_tab_project").load("project_editor.php?action=project_load&id=" + id, '',
|
$("#editor_tab_project").load("project_editor.php?action=project_load&id=" + id, '',
|
||||||
function(responseText, textStatus, XMLHttpRequest) {
|
function(responseText, textStatus, XMLHttpRequest) {
|
||||||
@ -242,8 +244,7 @@ function update_project()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_registration(id)
|
function delete_registration(id) {
|
||||||
{
|
|
||||||
registrations_id = id;
|
registrations_id = id;
|
||||||
var conf = confirmClick('<?= i18n('Are you sure you want to completely delete this registration?') ?>');
|
var conf = confirmClick('<?= i18n('Are you sure you want to completely delete this registration?') ?>');
|
||||||
if (conf == false) return false;
|
if (conf == false) return false;
|
||||||
@ -256,8 +257,7 @@ function delete_registration(id)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_reg()
|
function update_reg() {
|
||||||
{
|
|
||||||
var id = registrations_id;
|
var id = registrations_id;
|
||||||
$("#editor_tab_reg").load("student_editor.php?action=registration_load&id=" + id, '',
|
$("#editor_tab_reg").load("student_editor.php?action=registration_load&id=" + id, '',
|
||||||
function(responseText, textStatus, XMLHttpRequest) {
|
function(responseText, textStatus, XMLHttpRequest) {
|
||||||
@ -284,8 +284,10 @@ function update_reg()
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$("#student_editor").dialog({
|
$("#student_editor").dialog({
|
||||||
bgiframe: true, autoOpen: false,
|
bgiframe: true,
|
||||||
modal: true, resizable: false,
|
autoOpen: false,
|
||||||
|
modal: true,
|
||||||
|
resizable: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
buttons: {
|
buttons: {
|
||||||
/* "<?= i18n('Cancel') ?>": function() {
|
/* "<?= i18n('Cancel') ?>": function() {
|
||||||
@ -349,25 +351,29 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
$("#newproject").on("click", (function() {
|
$("#newproject").on("click", (function() {
|
||||||
popup_editor(-1);
|
popup_editor(-1);
|
||||||
}
|
}));
|
||||||
));
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr><td>
|
<tr>
|
||||||
|
<td>
|
||||||
<?= i18n('Choose Status') ?>:
|
<?= i18n('Choose Status') ?>:
|
||||||
<form name="statuschangerform" method="get" action="registration_list.php">
|
<form name="statuschangerform" method="get" action="registration_list.php">
|
||||||
<select name="showstatus" onchange="document.forms.statuschangerform.submit()">
|
<select name="showstatus" onchange="document.forms.statuschangerform.submit()">
|
||||||
|
|
||||||
<?
|
<?
|
||||||
// if there is no reg fee, then we dont need to show this status, because nobody will ever be in this status
|
// if there is no reg fee, then we dont need to show this status, because nobody will ever be in this status
|
||||||
$status_str = array('' => 'Any Status', 'complete' => 'Complete',
|
$status_str = array(
|
||||||
|
'' => 'Any Status',
|
||||||
|
'complete' => 'Complete',
|
||||||
'paymentpending' => ($config['regfee'] > 0) ? 'Payment Pending' : '',
|
'paymentpending' => ($config['regfee'] > 0) ? 'Payment Pending' : '',
|
||||||
'completeorpaymentpending' => ($config['regfee'] > 0) ? 'Complete or Payment Pending' : '',
|
'completeorpaymentpending' => ($config['regfee'] > 0) ? 'Complete or Payment Pending' : '',
|
||||||
'open' => 'Open', 'new' => 'New');
|
'open' => 'Open',
|
||||||
|
'new' => 'New'
|
||||||
|
);
|
||||||
|
|
||||||
$showstatus = $_GET['showstatus'];
|
$showstatus = $_GET['showstatus'];
|
||||||
|
|
||||||
@ -378,9 +384,12 @@ foreach ($status_str as $s => $str) {
|
|||||||
echo "<option $sel value=\"$s\">" . i18n($str) . "</option>\n";
|
echo "<option $sel value=\"$s\">" . i18n($str) . "</option>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select></form></td>
|
</select>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
<td align="right"><button id="newproject"><?= i18n('Create New Project') ?></button></td>
|
<td align="right"><button id="newproject"><?= i18n('Create New Project') ?></button></td>
|
||||||
</tr></table>
|
</tr>
|
||||||
|
</table>
|
||||||
<?
|
<?
|
||||||
|
|
||||||
if ($showstatus) {
|
if ($showstatus) {
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -33,10 +34,14 @@ require_once ('../user.inc.php');
|
|||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
require('../register_participants.inc.php');
|
require('../register_participants.inc.php');
|
||||||
|
|
||||||
send_header("Input Received $plural_participationform",
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
"Input Received $plural_participationform",
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Participant Registration' => 'admin/registration.php'));
|
'Participant Registration' => 'admin/registration.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
|
||||||
$showformatbottom = true;
|
$showformatbottom = true;
|
||||||
@ -221,7 +226,7 @@ if (get_value_from_array($_POST, 'action') == 'received' && get_value_from_array
|
|||||||
// actually set it to 'complete'
|
// actually set it to 'complete'
|
||||||
$stmt = $pdo->prepare("UPDATE registrations SET status='complete' WHERE num='$regnum' AND year='{$config['FAIRYEAR']}'");
|
$stmt = $pdo->prepare("UPDATE registrations SET status='complete' WHERE num='$regnum' AND year='{$config['FAIRYEAR']}'");
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
foreach ($recipients AS $recip) {
|
foreach ($recipients as $recip) {
|
||||||
$to = $recip['to'];
|
$to = $recip['to'];
|
||||||
$subsub = array();
|
$subsub = array();
|
||||||
$subbod = array(
|
$subbod = array(
|
||||||
@ -241,7 +246,7 @@ if (get_value_from_array($_POST, 'action') == 'received' && get_value_from_array
|
|||||||
// actually set it to 'paymentpending'
|
// actually set it to 'paymentpending'
|
||||||
$stmt = $pdo->prepare("UPDATE registrations SET status='paymentpending' WHERE num='$regnum' AND year='{$config['FAIRYEAR']}'");
|
$stmt = $pdo->prepare("UPDATE registrations SET status='paymentpending' WHERE num='$regnum' AND year='{$config['FAIRYEAR']}'");
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
foreach ($recipients AS $recip) {
|
foreach ($recipients as $recip) {
|
||||||
$to = $recip['to'];
|
$to = $recip['to'];
|
||||||
$subsub = array();
|
$subsub = array();
|
||||||
$subbod = array(
|
$subbod = array(
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005-2006 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005-2006 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005-2006 James Grant <james@lightbox.org>
|
* Copyright (C) 2005-2006 James Grant <james@lightbox.org>
|
||||||
@ -33,10 +33,14 @@ if (get_value_from_array($_GET, 'year'))
|
|||||||
else
|
else
|
||||||
$year = $config['FAIRYEAR'];
|
$year = $config['FAIRYEAR'];
|
||||||
|
|
||||||
send_header('Registration Statistics',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Registration Statistics',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Participant Registration' => 'admin/registration.php'));
|
'Participant Registration' => 'admin/registration.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
echo i18n('Choose Status') . ':';
|
echo i18n('Choose Status') . ':';
|
||||||
@ -215,18 +219,18 @@ echo "<tr><td colspan=\"2\"><h3>{$status_str[$showstatus]} - " . i18n('Students
|
|||||||
echo '<tr><td colspan="2">';
|
echo '<tr><td colspan="2">';
|
||||||
echo '<table class="tableview" width="100%">';
|
echo '<table class="tableview" width="100%">';
|
||||||
echo '<thead><tr><td width="50%"></td>';
|
echo '<thead><tr><td width="50%"></td>';
|
||||||
foreach ($cats AS $c => $cn) {
|
foreach ($cats as $c => $cn) {
|
||||||
echo "<th>$cn<br /><nobr>" . i18n('Stud | Proj') . '</nobr></th>';
|
echo "<th>$cn<br /><nobr>" . i18n('Stud | Proj') . '</nobr></th>';
|
||||||
}
|
}
|
||||||
echo '<th>' . i18n('Total') . '<br /><nobr>' . i18n('Stud | Proj') . '</th>';
|
echo '<th>' . i18n('Total') . '<br /><nobr>' . i18n('Stud | Proj') . '</th>';
|
||||||
echo '</tr></thead>';
|
echo '</tr></thead>';
|
||||||
foreach ($divs AS $d => $dn) {
|
foreach ($divs as $d => $dn) {
|
||||||
echo "<tr><td>$dn</td>";
|
echo "<tr><td>$dn</td>";
|
||||||
$tstud = 0;
|
$tstud = 0;
|
||||||
$tstudcat = array();
|
$tstudcat = array();
|
||||||
$tproj = 0;
|
$tproj = 0;
|
||||||
$tprojcat = array();
|
$tprojcat = array();
|
||||||
foreach ($cats AS $c => $cn) {
|
foreach ($cats as $c => $cn) {
|
||||||
echo '<td align="center">';
|
echo '<td align="center">';
|
||||||
|
|
||||||
echo ($stats_students_catdiv[$c][$d] ?? 0);
|
echo ($stats_students_catdiv[$c][$d] ?? 0);
|
||||||
@ -250,7 +254,7 @@ foreach ($divs AS $d => $dn) {
|
|||||||
echo '<tr><td><b>' . i18n('Total') . '</b></td>';
|
echo '<tr><td><b>' . i18n('Total') . '</b></td>';
|
||||||
$tstud = 0;
|
$tstud = 0;
|
||||||
$tproj = 0;
|
$tproj = 0;
|
||||||
foreach ($cats AS $c => $cn) {
|
foreach ($cats as $c => $cn) {
|
||||||
echo '<td align="center"><b>';
|
echo '<td align="center"><b>';
|
||||||
echo ($tstudcat[$c] ? $tstudcat[$c] : 0);
|
echo ($tstudcat[$c] ? $tstudcat[$c] : 0);
|
||||||
echo ' ';
|
echo ' ';
|
||||||
@ -274,18 +278,18 @@ echo "<tr><td colspan=\"2\"><h3>{$status_str[$showstatus]} - " . i18n('Students
|
|||||||
echo '<tr><td colspan="2">';
|
echo '<tr><td colspan="2">';
|
||||||
echo '<table class="tableview" width="100%">';
|
echo '<table class="tableview" width="100%">';
|
||||||
echo '<thead><tr><td width="50%"></td>';
|
echo '<thead><tr><td width="50%"></td>';
|
||||||
foreach ($cats AS $c => $cn) {
|
foreach ($cats as $c => $cn) {
|
||||||
echo "<th>$cn<br /><nobr>" . i18n('Stud | Proj') . '</nobr></th>';
|
echo "<th>$cn<br /><nobr>" . i18n('Stud | Proj') . '</nobr></th>';
|
||||||
}
|
}
|
||||||
echo '<th>' . i18n('Total') . '<br /><nobr>' . i18n('Stud | Proj') . '</nobr></th>';
|
echo '<th>' . i18n('Total') . '<br /><nobr>' . i18n('Stud | Proj') . '</nobr></th>';
|
||||||
echo '</tr></thead>';
|
echo '</tr></thead>';
|
||||||
|
|
||||||
asort($schools_names);
|
asort($schools_names);
|
||||||
foreach ($schools_names AS $id => $sn) {
|
foreach ($schools_names as $id => $sn) {
|
||||||
echo "<tr><td>$sn</td>";
|
echo "<tr><td>$sn</td>";
|
||||||
$tstud = 0;
|
$tstud = 0;
|
||||||
$tproj = 0;
|
$tproj = 0;
|
||||||
foreach ($cats AS $c => $cn) {
|
foreach ($cats as $c => $cn) {
|
||||||
echo '<td align="center">' . ($stats_students_schools[$c][$id] ? $stats_students_schools[$c][$id] : 0);
|
echo '<td align="center">' . ($stats_students_schools[$c][$id] ? $stats_students_schools[$c][$id] : 0);
|
||||||
echo ' ';
|
echo ' ';
|
||||||
echo ($stats_projects_schools[$c][$id] ? $stats_projects_schools[$c][$id] : 0) . '</td>';
|
echo ($stats_projects_schools[$c][$id] ? $stats_projects_schools[$c][$id] : 0) . '</td>';
|
||||||
@ -306,27 +310,27 @@ echo "<tr><td colspan=\"2\"><h3>{$status_str[$showstatus]} - " . i18n('Projects
|
|||||||
echo '<tr><td colspan="2">';
|
echo '<tr><td colspan="2">';
|
||||||
echo '<table class="tableview" width="100%">';
|
echo '<table class="tableview" width="100%">';
|
||||||
echo '<thead><tr><td rowspan=\'2\' width="50%"></td>';
|
echo '<thead><tr><td rowspan=\'2\' width="50%"></td>';
|
||||||
foreach ($cats AS $c => $cn) {
|
foreach ($cats as $c => $cn) {
|
||||||
echo "<th colspan='" . count($languages) . "'>$cn</th>";
|
echo "<th colspan='" . count($languages) . "'>$cn</th>";
|
||||||
}
|
}
|
||||||
echo "<th colspan='" . count($languages) . "'>" . i18n('Total') . '</nobr></th>';
|
echo "<th colspan='" . count($languages) . "'>" . i18n('Total') . '</nobr></th>';
|
||||||
echo '</tr><tr>';
|
echo '</tr><tr>';
|
||||||
ksort($languages);
|
ksort($languages);
|
||||||
$tprojcat = array();
|
$tprojcat = array();
|
||||||
foreach ($cats AS $c => $cn) {
|
foreach ($cats as $c => $cn) {
|
||||||
foreach ($languages AS $l => $ln) {
|
foreach ($languages as $l => $ln) {
|
||||||
echo "<th>$l</th>";
|
echo "<th>$l</th>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($languages AS $l => $ln) {
|
foreach ($languages as $l => $ln) {
|
||||||
echo "<th>$l</th>";
|
echo "<th>$l</th>";
|
||||||
}
|
}
|
||||||
echo '</tr></thead>';
|
echo '</tr></thead>';
|
||||||
foreach ($divs AS $d => $dn) {
|
foreach ($divs as $d => $dn) {
|
||||||
echo "<tr><td>$dn</td>";
|
echo "<tr><td>$dn</td>";
|
||||||
$tproj = array();
|
$tproj = array();
|
||||||
foreach ($cats AS $c => $cn) {
|
foreach ($cats as $c => $cn) {
|
||||||
foreach ($languages AS $l => $ln) {
|
foreach ($languages as $l => $ln) {
|
||||||
echo '<td align="center">';
|
echo '<td align="center">';
|
||||||
echo ($stats_projects_lang[$c][$d][$l] ?? 0);
|
echo ($stats_projects_lang[$c][$d][$l] ?? 0);
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
@ -334,7 +338,7 @@ foreach ($divs AS $d => $dn) {
|
|||||||
$tprojcat[$c][$l] = add_or_initialize_multi_2($tprojcat, $c, $l, $stats_projects_lang[$c][$d][$l] ?? 0);
|
$tprojcat[$c][$l] = add_or_initialize_multi_2($tprojcat, $c, $l, $stats_projects_lang[$c][$d][$l] ?? 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($tproj AS $l => $ln) {
|
foreach ($tproj as $l => $ln) {
|
||||||
echo '<td align="center"><b>';
|
echo '<td align="center"><b>';
|
||||||
echo ($ln ? $ln : 0);
|
echo ($ln ? $ln : 0);
|
||||||
echo '</b></td>';
|
echo '</b></td>';
|
||||||
@ -343,15 +347,15 @@ foreach ($divs AS $d => $dn) {
|
|||||||
}
|
}
|
||||||
echo '<tr><td><b>' . i18n('Total') . '</b></td>';
|
echo '<tr><td><b>' . i18n('Total') . '</b></td>';
|
||||||
$tproj = array();
|
$tproj = array();
|
||||||
foreach ($cats AS $c => $cn) {
|
foreach ($cats as $c => $cn) {
|
||||||
foreach ($languages AS $l => $ln) {
|
foreach ($languages as $l => $ln) {
|
||||||
echo '<td align="center"><b>';
|
echo '<td align="center"><b>';
|
||||||
echo ($tprojcat[$c][$l] ? $tprojcat[$c][$l] : 0);
|
echo ($tprojcat[$c][$l] ? $tprojcat[$c][$l] : 0);
|
||||||
echo '</b></td>';
|
echo '</b></td>';
|
||||||
$tproj[$l] = add_or_initialize($tproj, $l, $tprojcat[$c][$l] ?? 0);
|
$tproj[$l] = add_or_initialize($tproj, $l, $tprojcat[$c][$l] ?? 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($tproj AS $l => $ln) {
|
foreach ($tproj as $l => $ln) {
|
||||||
echo '<td align="center"><b>';
|
echo '<td align="center"><b>';
|
||||||
echo ($ln);
|
echo ($ln);
|
||||||
echo '</b></td>';
|
echo '</b></td>';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005-2006 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005-2006 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005-2006 James Grant <james@lightbox.org>
|
* Copyright (C) 2005-2006 James Grant <james@lightbox.org>
|
||||||
@ -27,16 +27,20 @@ require ('../common.inc.php');
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
|
|
||||||
send_header('Web Consent',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Web Consent',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Participant Registration' => 'admin/registration.php'));
|
'Participant Registration' => 'admin/registration.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
|
||||||
if (get_value_from_array($_POST, 'changed')) {
|
if (get_value_from_array($_POST, 'changed')) {
|
||||||
$numchanged = 0;
|
$numchanged = 0;
|
||||||
foreach ($_POST['changed'] AS $id => $val) {
|
foreach ($_POST['changed'] as $id => $val) {
|
||||||
if ($val == 1) {
|
if ($val == 1) {
|
||||||
$numchanged++;
|
$numchanged++;
|
||||||
$webfirst = get_value_from_2d_array($_POST, 'webfirst', $id) == 'yes' ? 'yes' : 'no';
|
$webfirst = get_value_from_2d_array($_POST, 'webfirst', $id) == 'yes' ? 'yes' : 'no';
|
||||||
@ -63,8 +67,7 @@ if (get_value_from_array($_POST, 'changed')) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function changed(id)
|
function changed(id) {
|
||||||
{
|
|
||||||
var o = document.getElementById('changed_' + id);
|
var o = document.getElementById('changed_' + id);
|
||||||
o.value = 1;
|
o.value = 1;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -42,7 +43,8 @@
|
|||||||
require_once('../lcsv.php');
|
require_once('../lcsv.php');
|
||||||
require_once('../tcpdf.inc.php');
|
require_once('../tcpdf.inc.php');
|
||||||
|
|
||||||
$filter_ops = array( 0 => '=',
|
$filter_ops = array(
|
||||||
|
0 => '=',
|
||||||
1 => '<=',
|
1 => '<=',
|
||||||
2 => '>=',
|
2 => '>=',
|
||||||
3 => '<',
|
3 => '<',
|
||||||
@ -55,36 +57,52 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
$report_options = array();
|
$report_options = array();
|
||||||
$report_options['type'] = array('desc' => 'Report Format',
|
$report_options['type'] = array(
|
||||||
|
'desc' => 'Report Format',
|
||||||
'values' => array('pdf' => 'PDF', 'csv' => 'CSV', 'label' => 'Label', 'tcpdf_label' => 'TCPDF Label (experimental)')
|
'values' => array('pdf' => 'PDF', 'csv' => 'CSV', 'label' => 'Label', 'tcpdf_label' => 'TCPDF Label (experimental)')
|
||||||
);
|
);
|
||||||
$report_options['group_new_page'] = array('desc' => 'Start each new grouping on a new page',
|
$report_options['group_new_page'] = array(
|
||||||
|
'desc' => 'Start each new grouping on a new page',
|
||||||
'values' => array('no' => 'No', 'yes' => 'Yes')
|
'values' => array('no' => 'No', 'yes' => 'Yes')
|
||||||
);
|
);
|
||||||
$report_options['allow_multiline'] = array('desc' => 'Allow table rows to span multiple lines',
|
$report_options['allow_multiline'] = array(
|
||||||
|
'desc' => 'Allow table rows to span multiple lines',
|
||||||
'values' => array('no' => 'No', 'yes' => 'Yes')
|
'values' => array('no' => 'No', 'yes' => 'Yes')
|
||||||
);
|
);
|
||||||
$report_options['fit_columns'] = array('desc' => 'Scale column widths to fit on the page width',
|
$report_options['fit_columns'] = array(
|
||||||
|
'desc' => 'Scale column widths to fit on the page width',
|
||||||
'values' => array('no' => 'No', 'yes' => 'Yes')
|
'values' => array('no' => 'No', 'yes' => 'Yes')
|
||||||
);
|
);
|
||||||
$report_options['label_box'] = array('desc' => 'Draw a box around each label',
|
$report_options['label_box'] = array(
|
||||||
|
'desc' => 'Draw a box around each label',
|
||||||
'values' => array('no' => 'No', 'yes' => 'Yes')
|
'values' => array('no' => 'No', 'yes' => 'Yes')
|
||||||
);
|
);
|
||||||
$report_options['field_box'] = array('desc' => 'Draw a box around each text field on the label',
|
$report_options['field_box'] = array(
|
||||||
|
'desc' => 'Draw a box around each text field on the label',
|
||||||
'values' => array('no' => 'No', 'yes' => 'Yes')
|
'values' => array('no' => 'No', 'yes' => 'Yes')
|
||||||
);
|
);
|
||||||
$report_options['label_fairname'] = array('desc' => 'Print the fair name at the top of each label',
|
$report_options['label_fairname'] = array(
|
||||||
|
'desc' => 'Print the fair name at the top of each label',
|
||||||
'values' => array('no' => 'No', 'yes' => 'Yes')
|
'values' => array('no' => 'No', 'yes' => 'Yes')
|
||||||
);
|
);
|
||||||
$report_options['label_logo'] = array('desc' => 'Print the fair logo at the top of each label',
|
$report_options['label_logo'] = array(
|
||||||
|
'desc' => 'Print the fair logo at the top of each label',
|
||||||
'values' => array('no' => 'No', 'yes' => 'Yes')
|
'values' => array('no' => 'No', 'yes' => 'Yes')
|
||||||
);
|
);
|
||||||
$report_options['default_font_size'] = array('desc' => 'Default font size to use in the report',
|
$report_options['default_font_size'] = array(
|
||||||
|
'desc' => 'Default font size to use in the report',
|
||||||
'values' => array(
|
'values' => array(
|
||||||
'10' => '10',
|
'10' => '10',
|
||||||
'11'=>'11', '12'=>'12',
|
'11' => '11',
|
||||||
'13'=>'13', '14'=>'14', '15'=>'15', '16'=>'16', '18'=>'18',
|
'12' => '12',
|
||||||
'20'=>'20', '22'=>'22', '24'=>'24'
|
'13' => '13',
|
||||||
|
'14' => '14',
|
||||||
|
'15' => '15',
|
||||||
|
'16' => '16',
|
||||||
|
'18' => '18',
|
||||||
|
'20' => '20',
|
||||||
|
'22' => '22',
|
||||||
|
'24' => '24'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -104,7 +122,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
|
|
||||||
/* FIXME: put these in a databse */
|
/* FIXME: put these in a databse */
|
||||||
$report_stock = array();
|
$report_stock = array();
|
||||||
$report_stock['fullpage'] = array('name' => 'Letter 8.5 x 11 (3/4" margin)',
|
$report_stock['fullpage'] = array(
|
||||||
|
'name' => 'Letter 8.5 x 11 (3/4" margin)',
|
||||||
'page_width' => 8.5,
|
'page_width' => 8.5,
|
||||||
'page_height' => 11,
|
'page_height' => 11,
|
||||||
'label_width' => 7,
|
'label_width' => 7,
|
||||||
@ -117,7 +136,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
'page_orientation' => 'P',
|
'page_orientation' => 'P',
|
||||||
);
|
);
|
||||||
|
|
||||||
$report_stock['fullpage_landscape'] = array('name' => 'Letter 8.5 x 11 Landscape (3/4" margin)',
|
$report_stock['fullpage_landscape'] = array(
|
||||||
|
'name' => 'Letter 8.5 x 11 Landscape (3/4" margin)',
|
||||||
'page_width' => 11,
|
'page_width' => 11,
|
||||||
'page_height' => 8.5,
|
'page_height' => 8.5,
|
||||||
'label_width' => 9.5,
|
'label_width' => 9.5,
|
||||||
@ -130,7 +150,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
'page_orientation' => 'L',
|
'page_orientation' => 'L',
|
||||||
);
|
);
|
||||||
|
|
||||||
$report_stock['fullpage_full'] = array('name' => 'Letter 8.5 x 11 (no margin)',
|
$report_stock['fullpage_full'] = array(
|
||||||
|
'name' => 'Letter 8.5 x 11 (no margin)',
|
||||||
'page_width' => 8.5,
|
'page_width' => 8.5,
|
||||||
'page_height' => 11,
|
'page_height' => 11,
|
||||||
'label_width' => 8.5,
|
'label_width' => 8.5,
|
||||||
@ -143,7 +164,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
'page_orientation' => 'P',
|
'page_orientation' => 'P',
|
||||||
);
|
);
|
||||||
|
|
||||||
$report_stock['fullpage_landscape_full'] = array('name' => 'Letter 8.5 x 11 Landscape (no margin)',
|
$report_stock['fullpage_landscape_full'] = array(
|
||||||
|
'name' => 'Letter 8.5 x 11 Landscape (no margin)',
|
||||||
'page_width' => 11,
|
'page_width' => 11,
|
||||||
'page_height' => 8.5,
|
'page_height' => 8.5,
|
||||||
'label_width' => 11,
|
'label_width' => 11,
|
||||||
@ -156,7 +178,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
'page_orientation' => 'L',
|
'page_orientation' => 'L',
|
||||||
);
|
);
|
||||||
|
|
||||||
$report_stock['5161'] = array('name' => 'Avery 5161/5261/5961/8161, G&T 99189 (1"x4")',
|
$report_stock['5161'] = array(
|
||||||
|
'name' => 'Avery 5161/5261/5961/8161, G&T 99189 (1"x4")',
|
||||||
'page_width' => 8.5,
|
'page_width' => 8.5,
|
||||||
'page_height' => 11,
|
'page_height' => 11,
|
||||||
'label_width' => 4,
|
'label_width' => 4,
|
||||||
@ -170,7 +193,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
'page_orientation' => 'P',
|
'page_orientation' => 'P',
|
||||||
);
|
);
|
||||||
|
|
||||||
$report_stock['5162'] = array('name' => 'Avery 5162/5262/5962/8162/8462, G&T 99190 (1 1/3"x4")',
|
$report_stock['5162'] = array(
|
||||||
|
'name' => 'Avery 5162/5262/5962/8162/8462, G&T 99190 (1 1/3"x4")',
|
||||||
'page_width' => 8.5,
|
'page_width' => 8.5,
|
||||||
'page_height' => 11,
|
'page_height' => 11,
|
||||||
'label_width' => 3.99,
|
'label_width' => 3.99,
|
||||||
@ -183,7 +207,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
'page_format' => 'LETTER',
|
'page_format' => 'LETTER',
|
||||||
'page_orientation' => 'P',
|
'page_orientation' => 'P',
|
||||||
);
|
);
|
||||||
$report_stock['5163'] = array('name' => 'Avery 5163/5263/5963/8163/8463, G&T 99181 (2"x4")',
|
$report_stock['5163'] = array(
|
||||||
|
'name' => 'Avery 5163/5263/5963/8163/8463, G&T 99181 (2"x4")',
|
||||||
'page_width' => 8.5,
|
'page_width' => 8.5,
|
||||||
'page_height' => 11,
|
'page_height' => 11,
|
||||||
'label_width' => 4,
|
'label_width' => 4,
|
||||||
@ -209,7 +234,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
);
|
);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$report_stock['5164'] = array('name' => 'Avery 5164/5264/5964/8164, G&T 99763 (4"x3 1/3")',
|
$report_stock['5164'] = array(
|
||||||
|
'name' => 'Avery 5164/5264/5964/8164, G&T 99763 (4"x3 1/3")',
|
||||||
'page_width' => 8.5,
|
'page_width' => 8.5,
|
||||||
'page_height' => 11,
|
'page_height' => 11,
|
||||||
'label_width' => 4,
|
'label_width' => 4,
|
||||||
@ -222,7 +248,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
'page_orientation' => 'P', /* tcpdf orientation */
|
'page_orientation' => 'P', /* tcpdf orientation */
|
||||||
|
|
||||||
);
|
);
|
||||||
$report_stock['nametag'] = array('name' => 'Cards 4"x3"',
|
$report_stock['nametag'] = array(
|
||||||
|
'name' => 'Cards 4"x3"',
|
||||||
'page_width' => 8.5,
|
'page_width' => 8.5,
|
||||||
'page_height' => 11,
|
'page_height' => 11,
|
||||||
'label_width' => 4,
|
'label_width' => 4,
|
||||||
@ -235,7 +262,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
'page_orientation' => 'P',
|
'page_orientation' => 'P',
|
||||||
);
|
);
|
||||||
|
|
||||||
$report_stock['letter_4up'] = array('name' => 'Fullpage, 4up',
|
$report_stock['letter_4up'] = array(
|
||||||
|
'name' => 'Fullpage, 4up',
|
||||||
'page_width' => 8.5,
|
'page_width' => 8.5,
|
||||||
'page_height' => 11,
|
'page_height' => 11,
|
||||||
'label_width' => 4,
|
'label_width' => 4,
|
||||||
@ -248,7 +276,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
'page_orientation' => 'P',
|
'page_orientation' => 'P',
|
||||||
);
|
);
|
||||||
|
|
||||||
$report_stock['ledger'] = array('name' => 'Ledger/Tabloid 11 x 17',
|
$report_stock['ledger'] = array(
|
||||||
|
'name' => 'Ledger/Tabloid 11 x 17',
|
||||||
'page_width' => 11,
|
'page_width' => 11,
|
||||||
'page_height' => 17,
|
'page_height' => 17,
|
||||||
'label_width' => 11,
|
'label_width' => 11,
|
||||||
@ -261,7 +290,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
'page_orientation' => 'P',
|
'page_orientation' => 'P',
|
||||||
);
|
);
|
||||||
|
|
||||||
$report_stock['ledger_landscape'] = array('name' => 'Ledger/Tabloid 11 x 17 Landscape',
|
$report_stock['ledger_landscape'] = array(
|
||||||
|
'name' => 'Ledger/Tabloid 11 x 17 Landscape',
|
||||||
'page_width' => 17,
|
'page_width' => 17,
|
||||||
'page_height' => 11,
|
'page_height' => 11,
|
||||||
'label_width' => 17,
|
'label_width' => 17,
|
||||||
@ -275,8 +305,10 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$report_options['stock'] = array('desc' => "Paper Type",
|
$report_options['stock'] = array(
|
||||||
'values' => array() );
|
'desc' => "Paper Type",
|
||||||
|
'values' => array()
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/* Add more types to the report format */
|
/* Add more types to the report format */
|
||||||
@ -291,50 +323,77 @@ foreach($report_stock as $n=>$v) {
|
|||||||
* format, but with the 'custom_url' attached. */
|
* format, but with the 'custom_url' attached. */
|
||||||
$report_custom = array();
|
$report_custom = array();
|
||||||
$x = 1;
|
$x = 1;
|
||||||
$report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Mailing Labels',
|
$report_custom[$x] = array(
|
||||||
|
'id' => $x,
|
||||||
|
'name' => 'Custom -- Mailing Labels',
|
||||||
'desc' => 'Mailing Label Generator',
|
'desc' => 'Mailing Label Generator',
|
||||||
'custom_url' => 'admin/reports_mailinglabels.php',
|
'custom_url' => 'admin/reports_mailinglabels.php',
|
||||||
'creator' => 'The Grant Brothers');
|
'creator' => 'The Grant Brothers'
|
||||||
|
);
|
||||||
$x++;
|
$x++;
|
||||||
$report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Project Details (PDF)',
|
$report_custom[$x] = array(
|
||||||
|
'id' => $x,
|
||||||
|
'name' => 'Custom -- Project Details (PDF)',
|
||||||
'desc' => 'Project Details',
|
'desc' => 'Project Details',
|
||||||
'custom_url' => 'admin/reports_projects_details.php?type=pdf',
|
'custom_url' => 'admin/reports_projects_details.php?type=pdf',
|
||||||
'creator' => 'The Grant Brothers');
|
'creator' => 'The Grant Brothers'
|
||||||
|
);
|
||||||
$x++;
|
$x++;
|
||||||
$report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Judges List (CSV)',
|
$report_custom[$x] = array(
|
||||||
|
'id' => $x,
|
||||||
|
'name' => 'Custom -- Judges List (CSV)',
|
||||||
'desc' => 'Judges List',
|
'desc' => 'Judges List',
|
||||||
'custom_url' => 'admin/reports_judges.php?type=csv',
|
'custom_url' => 'admin/reports_judges.php?type=csv',
|
||||||
'creator' => 'The Grant Brothers');
|
'creator' => 'The Grant Brothers'
|
||||||
|
);
|
||||||
$x++;
|
$x++;
|
||||||
$report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Judges List (CSV) -- ALL YEARS',
|
$report_custom[$x] = array(
|
||||||
|
'id' => $x,
|
||||||
|
'name' => 'Custom -- Judges List (CSV) -- ALL YEARS',
|
||||||
'desc' => 'Judges List - All Years',
|
'desc' => 'Judges List - All Years',
|
||||||
'custom_url' => 'admin/reports_judges_allyears.php?type=csv',
|
'custom_url' => 'admin/reports_judges_allyears.php?type=csv',
|
||||||
'creator' => 'The Grant Brothers');
|
'creator' => 'The Grant Brothers'
|
||||||
|
);
|
||||||
$x++;
|
$x++;
|
||||||
$report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Judging Teams Project Assignments (PDF)',
|
$report_custom[$x] = array(
|
||||||
|
'id' => $x,
|
||||||
|
'name' => 'Custom -- Judging Teams Project Assignments (PDF)',
|
||||||
'desc' => 'Judging Teams Project Assignments',
|
'desc' => 'Judging Teams Project Assignments',
|
||||||
'custom_url' => 'admin/reports_judges_teams_projects.php?type=pdf',
|
'custom_url' => 'admin/reports_judges_teams_projects.php?type=pdf',
|
||||||
'creator' => 'The Grant Brothers');
|
'creator' => 'The Grant Brothers'
|
||||||
|
);
|
||||||
$x++;
|
$x++;
|
||||||
$report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Judging Teams Project Assignments (CSV)',
|
$report_custom[$x] = array(
|
||||||
|
'id' => $x,
|
||||||
|
'name' => 'Custom -- Judging Teams Project Assignments (CSV)',
|
||||||
'desc' => 'Judging Teams Project Assignments',
|
'desc' => 'Judging Teams Project Assignments',
|
||||||
'custom_url' => 'admin/reports_judges_teams_projects.php?type=csv',
|
'custom_url' => 'admin/reports_judges_teams_projects.php?type=csv',
|
||||||
'creator' => 'The Grant Brothers');
|
'creator' => 'The Grant Brothers'
|
||||||
|
);
|
||||||
$x++;
|
$x++;
|
||||||
$report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Projects Judging Team Assignments (PDF)',
|
$report_custom[$x] = array(
|
||||||
|
'id' => $x,
|
||||||
|
'name' => 'Custom -- Projects Judging Team Assignments (PDF)',
|
||||||
'desc' => 'Projects Judging Team Assignments',
|
'desc' => 'Projects Judging Team Assignments',
|
||||||
'custom_url' => 'admin/reports_projects_judges_teams.php?type=pdf',
|
'custom_url' => 'admin/reports_projects_judges_teams.php?type=pdf',
|
||||||
'creator' => 'The Grant Brothers');
|
'creator' => 'The Grant Brothers'
|
||||||
|
);
|
||||||
$x++;
|
$x++;
|
||||||
$report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Projects Judging Team Assignments (CSV)',
|
$report_custom[$x] = array(
|
||||||
|
'id' => $x,
|
||||||
|
'name' => 'Custom -- Projects Judging Team Assignments (CSV)',
|
||||||
'desc' => 'Projects Judging Team Assignments',
|
'desc' => 'Projects Judging Team Assignments',
|
||||||
'custom_url' => 'admin/reports_projects_judges_teams.php?type=csv',
|
'custom_url' => 'admin/reports_projects_judges_teams.php?type=csv',
|
||||||
'creator' => 'The Grant Brothers');
|
'creator' => 'The Grant Brothers'
|
||||||
|
);
|
||||||
$x++;
|
$x++;
|
||||||
$report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Award List for Award Ceremony Program (CSV)',
|
$report_custom[$x] = array(
|
||||||
|
'id' => $x,
|
||||||
|
'name' => 'Custom -- Award List for Award Ceremony Program (CSV)',
|
||||||
'desc' => 'Award List for Award Ceremony Program creation',
|
'desc' => 'Award List for Award Ceremony Program creation',
|
||||||
'custom_url' => 'admin/reports_program_awards.php?type=csv',
|
'custom_url' => 'admin/reports_program_awards.php?type=csv',
|
||||||
'creator' => 'The Grant Brothers');
|
'creator' => 'The Grant Brothers'
|
||||||
|
);
|
||||||
|
|
||||||
function report_save_field($report, $type, $loc)
|
function report_save_field($report, $type, $loc)
|
||||||
{
|
{
|
||||||
@ -389,7 +448,6 @@ foreach($report_stock as $n=>$v) {
|
|||||||
|
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
show_pdo_errors_if_any($pdo);
|
show_pdo_errors_if_any($pdo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function report_load($report_id)
|
function report_load($report_id)
|
||||||
@ -482,7 +540,8 @@ foreach($report_stock as $n=>$v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function report_save($report)
|
function report_save($report)
|
||||||
{ global $pdo;
|
{
|
||||||
|
global $pdo;
|
||||||
if ($report['id'] == 0) {
|
if ($report['id'] == 0) {
|
||||||
/* New report */
|
/* New report */
|
||||||
$stmt = $pdo->prepare("INSERT INTO reports (`id`) VALUES ('')");
|
$stmt = $pdo->prepare("INSERT INTO reports (`id`) VALUES ('')");
|
||||||
@ -530,7 +589,8 @@ foreach($report_stock as $n=>$v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function report_load_all()
|
function report_load_all()
|
||||||
{ global $pdo;
|
{
|
||||||
|
global $pdo;
|
||||||
$ret = array();
|
$ret = array();
|
||||||
$q = $pdo->prepare("SELECT * FROM reports ORDER BY `name`");
|
$q = $pdo->prepare("SELECT * FROM reports ORDER BY `name`");
|
||||||
|
|
||||||
@ -566,7 +626,8 @@ foreach($report_stock as $n=>$v) {
|
|||||||
$stmt = $pdo->prepare("DELETE FROM reports WHERE `id`=$r");
|
$stmt = $pdo->prepare("DELETE FROM reports WHERE `id`=$r");
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$stmt = $pdo->prepare("DELETE FROM reports_items WHERE `reports_id`=$r");
|
$stmt = $pdo->prepare("DELETE FROM reports_items WHERE `reports_id`=$r");
|
||||||
$stmt->execute();}
|
$stmt->execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function report_gen($report)
|
function report_gen($report)
|
||||||
@ -613,28 +674,38 @@ foreach($report['col'] as $v)
|
|||||||
case 'label':
|
case 'label':
|
||||||
/* Label */
|
/* Label */
|
||||||
$label_stock = $report_stock[$report['option']['stock']];
|
$label_stock = $report_stock[$report['option']['stock']];
|
||||||
$rep=new lpdf( i18n($config['fairname']),
|
$rep = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
i18n($report['name']),
|
i18n($report['name']),
|
||||||
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo.gif");
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . "/data/logo.gif"
|
||||||
|
);
|
||||||
$rep->setPageStyle("labels");
|
$rep->setPageStyle("labels");
|
||||||
$rep->newPage($label_stock['page_width'], $label_stock['page_height']);
|
$rep->newPage($label_stock['page_width'], $label_stock['page_height']);
|
||||||
$rep->setFontSize(11);
|
$rep->setFontSize(11);
|
||||||
$rep->setLabelDimensions($label_stock['label_width'], $label_stock['label_height'],
|
$rep->setLabelDimensions(
|
||||||
$label_stock['x_spacing'], $label_stock['y_spacing'],11,$label_stock['y_padding']);
|
$label_stock['label_width'],
|
||||||
|
$label_stock['label_height'],
|
||||||
|
$label_stock['x_spacing'],
|
||||||
|
$label_stock['y_spacing'],
|
||||||
|
11,
|
||||||
|
$label_stock['y_padding']
|
||||||
|
);
|
||||||
$gen_mode = 'label';
|
$gen_mode = 'label';
|
||||||
break;
|
break;
|
||||||
case 'pdf': case '':
|
case 'pdf':
|
||||||
|
case '':
|
||||||
/* FIXME: handle landscape pages in here */
|
/* FIXME: handle landscape pages in here */
|
||||||
$label_stock = $report_stock[$report['option']['stock']];
|
$label_stock = $report_stock[$report['option']['stock']];
|
||||||
$rep=new lpdf( i18n($config['fairname']),
|
$rep = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
i18n($report['name']),
|
i18n($report['name']),
|
||||||
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo.gif");
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . "/data/logo.gif"
|
||||||
|
);
|
||||||
$rep->newPage($label_stock['page_width'], $label_stock['page_height']);
|
$rep->newPage($label_stock['page_width'], $label_stock['page_height']);
|
||||||
if ($report['option']['default_font_size']) {
|
if ($report['option']['default_font_size']) {
|
||||||
$rep->setDefaultFontSize($report['option']['default_font_size']);
|
$rep->setDefaultFontSize($report['option']['default_font_size']);
|
||||||
$rep->setFontSize($report['option']['default_font_size']);
|
$rep->setFontSize($report['option']['default_font_size']);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$rep->setDefaultFontSize(11);
|
$rep->setDefaultFontSize(11);
|
||||||
$rep->setFontSize(11);
|
$rep->setFontSize(11);
|
||||||
}
|
}
|
||||||
@ -650,10 +721,17 @@ foreach($report['col'] as $v)
|
|||||||
$show_logo = ($report['option']['label_logo'] == 'yes') ? true : false;
|
$show_logo = ($report['option']['label_logo'] == 'yes') ? true : false;
|
||||||
|
|
||||||
$rep = new pdf($report['name'], $label_stock['page_format'], $label_stock['page_orientation']);
|
$rep = new pdf($report['name'], $label_stock['page_format'], $label_stock['page_orientation']);
|
||||||
$rep->setup_for_labels($show_box, $show_fair, $show_logo,
|
$rep->setup_for_labels(
|
||||||
$label_stock['label_width'] * 25.4, $label_stock['label_height'] * 25.4,
|
$show_box,
|
||||||
$label_stock['x_spacing'] * 25.4, $label_stock['y_spacing'] * 25.4,
|
$show_fair,
|
||||||
$label_stock['rows'], $label_stock['cols']);
|
$show_logo,
|
||||||
|
$label_stock['label_width'] * 25.4,
|
||||||
|
$label_stock['label_height'] * 25.4,
|
||||||
|
$label_stock['x_spacing'] * 25.4,
|
||||||
|
$label_stock['y_spacing'] * 25.4,
|
||||||
|
$label_stock['rows'],
|
||||||
|
$label_stock['cols']
|
||||||
|
);
|
||||||
$gen_mode = 'tcpdf_label';
|
$gen_mode = 'tcpdf_label';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -723,8 +801,10 @@ foreach($report['col'] as $v)
|
|||||||
$post_group_by = array_merge($group_by, $fields[$f]['group_by']);
|
$post_group_by = array_merge($group_by, $fields[$f]['group_by']);
|
||||||
|
|
||||||
if (is_array($fields[$f]['components'])) {
|
if (is_array($fields[$f]['components'])) {
|
||||||
$components = array_merge($components,
|
$components = array_merge(
|
||||||
$fields[$f]['components']);
|
$components,
|
||||||
|
$fields[$f]['components']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
@ -743,8 +823,10 @@ foreach($report['col'] as $v)
|
|||||||
$order[] = $fieldname[$f];
|
$order[] = $fieldname[$f];
|
||||||
|
|
||||||
if (is_array($fields[$f]['components'])) {
|
if (is_array($fields[$f]['components'])) {
|
||||||
$components = array_merge($components,
|
$components = array_merge(
|
||||||
$fields[$f]['components']);
|
$components,
|
||||||
|
$fields[$f]['components']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -784,8 +866,10 @@ foreach($report['col'] as $v)
|
|||||||
$t = $filter_ops[$d['x']];
|
$t = $filter_ops[$d['x']];
|
||||||
$filter[] = "{$fields[$f]['table']} $t '{$d['value']}'";
|
$filter[] = "{$fields[$f]['table']} $t '{$d['value']}'";
|
||||||
if (is_array($fields[$f]['components'])) {
|
if (is_array($fields[$f]['components'])) {
|
||||||
$components = array_merge($components,
|
$components = array_merge(
|
||||||
$fields[$f]['components']);
|
$components,
|
||||||
|
$fields[$f]['components']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sel = implode(",", $sel);
|
$sel = implode(",", $sel);
|
||||||
@ -882,7 +966,6 @@ foreach($report['col'] as $v)
|
|||||||
$rep->heading($h);
|
$rep->heading($h);
|
||||||
$rep->nextLine();
|
$rep->nextLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
@ -919,16 +1002,26 @@ foreach($report['col'] as $v)
|
|||||||
//the page content is filled
|
//the page content is filled
|
||||||
/* Special column, draw a box */
|
/* Special column, draw a box */
|
||||||
if ($f == 'static_box') {
|
if ($f == 'static_box') {
|
||||||
$rep->addLabelBox($d['x'], $d['y'], $d['w'],
|
$rep->addLabelBox(
|
||||||
$d['h']);
|
$d['x'],
|
||||||
|
$d['y'],
|
||||||
|
$d['w'],
|
||||||
|
$d['h']
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
/* Special column, override result with static text */
|
/* Special column, override result with static text */
|
||||||
if ($f == 'static_text') $v = $d['value'];
|
if ($f == 'static_text') $v = $d['value'];
|
||||||
|
|
||||||
$lh = ($d['lines'] == 0) ? 0 : $d['h'] / $d['lines'];
|
$lh = ($d['lines'] == 0) ? 0 : $d['h'] / $d['lines'];
|
||||||
$rep->addLabelText2($d['x'], $d['y'], $d['w'],
|
$rep->addLabelText2(
|
||||||
$d['h'], $lh,
|
$d['x'],
|
||||||
$v, $opt);
|
$d['y'],
|
||||||
|
$d['w'],
|
||||||
|
$d['h'],
|
||||||
|
$lh,
|
||||||
|
$v,
|
||||||
|
$opt
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else if ($gen_mode == 'tcpdf_label') {
|
} else if ($gen_mode == 'tcpdf_label') {
|
||||||
/* Setup additional options */
|
/* Setup additional options */
|
||||||
@ -962,10 +1055,20 @@ foreach($report['col'] as $v)
|
|||||||
|
|
||||||
$v = iconv("ISO-8859-1", "UTF-8", $v);
|
$v = iconv("ISO-8859-1", "UTF-8", $v);
|
||||||
|
|
||||||
$rep->label_text($d['x'], $d['y'], $d['w'], $d['h'],
|
$rep->label_text(
|
||||||
$v, $show_box, $d['align'], $d['valign'],
|
$d['x'],
|
||||||
$d['fontname'],$d['fontstyle'],$d['fontsize'],
|
$d['y'],
|
||||||
$d['on_overflow']);
|
$d['w'],
|
||||||
|
$d['h'],
|
||||||
|
$v,
|
||||||
|
$show_box,
|
||||||
|
$d['align'],
|
||||||
|
$d['valign'],
|
||||||
|
$d['fontname'],
|
||||||
|
$d['fontstyle'],
|
||||||
|
$d['fontsize'],
|
||||||
|
$d['on_overflow']
|
||||||
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1000,7 +1103,6 @@ foreach($report['col'] as $v)
|
|||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
|
|
||||||
@ -1016,5 +1118,3 @@ foreach($report['col'] as $v)
|
|||||||
|
|
||||||
$rep->output();
|
$rep->output();
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -135,9 +136,11 @@ switch (get_value_from_array($_GET, 'action')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// send the header
|
// send the header
|
||||||
send_header('My Reports',
|
send_header(
|
||||||
|
'My Reports',
|
||||||
array('Committee Main' => 'committee_main.php'),
|
array('Committee Main' => 'committee_main.php'),
|
||||||
'print/export_reports');
|
'print/export_reports'
|
||||||
|
);
|
||||||
|
|
||||||
/* Send a greeting */
|
/* Send a greeting */
|
||||||
echo i18n('Welcome to the new report interface. You can select and save specific reports under specific categories so you can always find the report you need without having to go through the list each time. To begin customizing this list, click on the "Edit This List" button at the bottom of this page.');
|
echo i18n('Welcome to the new report interface. You can select and save specific reports under specific categories so you can always find the report you need without having to go through the list each time. To begin customizing this list, click on the "Edit This List" button at the bottom of this page.');
|
||||||
@ -145,15 +148,12 @@ echo i18n('Welcome to the new report interface. You can select and save specifi
|
|||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
function remove_report(id) {
|
||||||
function remove_report(id)
|
|
||||||
{
|
|
||||||
$('#debug').load("<? $_SERVER['PHP_SELF'] ?>?action=remove_report&id=" + id);
|
$('#debug').load("<? $_SERVER['PHP_SELF'] ?>?action=remove_report&id=" + id);
|
||||||
$("#report_tr_" + id).remove();
|
$("#report_tr_" + id).remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
function edit_report(id,reports_id)
|
function edit_report(id, reports_id) {
|
||||||
{
|
|
||||||
var r = (id == -1) ? '&reports_id=' + reports_id : '';
|
var r = (id == -1) ? '&reports_id=' + reports_id : '';
|
||||||
$.getJSON("<?= $_SERVER['PHP_SELF'] ?>?action=load_report&id=" + id + r,
|
$.getJSON("<?= $_SERVER['PHP_SELF'] ?>?action=load_report&id=" + id + r,
|
||||||
function(json) {
|
function(json) {
|
||||||
@ -175,15 +175,13 @@ function edit_report(id,reports_id)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function save_report()
|
function save_report() {
|
||||||
{
|
|
||||||
$('#debug').load("<? $_SERVER['PHP_SELF'] ?>?action=save", $('#report_form').serializeArray(), function() {
|
$('#debug').load("<? $_SERVER['PHP_SELF'] ?>?action=save", $('#report_form').serializeArray(), function() {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_report()
|
function add_report() {
|
||||||
{
|
|
||||||
edit_report(-1, $('#report').val());
|
edit_report(-1, $('#report').val());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,8 +191,8 @@ function gen_report() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var edit = false;
|
var edit = false;
|
||||||
function edit_toggle()
|
|
||||||
{
|
function edit_toggle() {
|
||||||
if (edit == false) {
|
if (edit == false) {
|
||||||
$('#edit_toggle').val("<?= i18n('Done Editing') ?>");
|
$('#edit_toggle').val("<?= i18n('Done Editing') ?>");
|
||||||
$('#edit_info').show();
|
$('#edit_info').show();
|
||||||
@ -208,8 +206,7 @@ function edit_toggle()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function popup_editor(id)
|
function popup_editor(id) {
|
||||||
{
|
|
||||||
var w = (document.documentElement.clientWidth * 0.6);
|
var w = (document.documentElement.clientWidth * 0.6);
|
||||||
var h = (document.documentElement.clientHeight * 0.4);
|
var h = (document.documentElement.clientHeight * 0.4);
|
||||||
|
|
||||||
@ -225,8 +222,10 @@ function popup_editor(id)
|
|||||||
/* Setup the popup window */
|
/* Setup the popup window */
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#popup_editor").dialog({
|
$("#popup_editor").dialog({
|
||||||
bgiframe: true, autoOpen: false,
|
bgiframe: true,
|
||||||
modal: true, resizable: false,
|
autoOpen: false,
|
||||||
|
modal: true,
|
||||||
|
resizable: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
buttons: {
|
buttons: {
|
||||||
"<?= i18n('Cancel') ?>": function() {
|
"<?= i18n('Cancel') ?>": function() {
|
||||||
@ -239,7 +238,6 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?
|
<?
|
||||||
|
|
||||||
|
@ -54,9 +54,11 @@ if (!$scriptformat)
|
|||||||
$scriptformat = 'default';
|
$scriptformat = 'default';
|
||||||
|
|
||||||
if ($type == 'pdf') {
|
if ($type == 'pdf') {
|
||||||
$rep = new lpdf(i18n($config['fairname']),
|
$rep = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
i18n('Awards Ceremony Script'),
|
i18n('Awards Ceremony Script'),
|
||||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||||
|
);
|
||||||
|
|
||||||
$rep->newPage();
|
$rep->newPage();
|
||||||
if ($scriptformat == 'default')
|
if ($scriptformat == 'default')
|
||||||
@ -307,4 +309,3 @@ foreach ($awards as $r) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$rep->output();
|
$rep->output();
|
||||||
?>
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -47,8 +48,8 @@ $pdf->SetKeywords('');
|
|||||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||||
|
|
||||||
// set header and footer fonts
|
// set header and footer fonts
|
||||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||||
|
|
||||||
// set default monospaced font
|
// set default monospaced font
|
||||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -149,7 +150,8 @@ $report_awards_fields = array(
|
|||||||
'header' => 'Sp. Status',
|
'header' => 'Sp. Status',
|
||||||
'width' => 0.5,
|
'width' => 0.5,
|
||||||
'table' => 'sponsorships.status',
|
'table' => 'sponsorships.status',
|
||||||
'value_map' => array('pending' => 'Pending', 'confirmed' => 'Confirmed'), 'received' => 'Received'
|
'value_map' => array('pending' => 'Pending', 'confirmed' => 'Confirmed'),
|
||||||
|
'received' => 'Received'
|
||||||
),
|
),
|
||||||
'pcontact_salutation' => array(
|
'pcontact_salutation' => array(
|
||||||
'start_option_group' => 'Sponsor Primary Contact',
|
'start_option_group' => 'Sponsor Primary Contact',
|
||||||
@ -448,5 +450,3 @@ function report_awards_fromwhere($report, $components)
|
|||||||
|
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -27,10 +28,14 @@ require ('../common.inc.php');
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
require_once('reports.inc.php');
|
require_once('reports.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
send_header('Award Ceremony Scripts',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Award Ceremony Scripts',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'print_awards_ceremony_scripts');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'print_awards_ceremony_scripts'
|
||||||
|
);
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
echo '<form action="reports_acscript.php" method="get">';
|
echo '<form action="reports_acscript.php" method="get">';
|
||||||
echo '<table class="tableedit">';
|
echo '<table class="tableedit">';
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -169,5 +170,3 @@ function report_committees_fromwhere($report, $components)
|
|||||||
|
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -192,15 +193,18 @@ if ($repaction == 'try') {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header('Reports Editor',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Reports Editor',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'report_management');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'report_management'
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function reportReload()
|
function reportReload() {
|
||||||
{
|
|
||||||
document.forms.report.reloadaction.value = 'reload';
|
document.forms.report.reloadaction.value = 'reload';
|
||||||
document.forms.report.submit();
|
document.forms.report.submit();
|
||||||
}
|
}
|
||||||
@ -309,7 +313,6 @@ function createDataTCPDF(x,y,w,h,align,valign,fontname,fontstyle,fontsize,value)
|
|||||||
|
|
||||||
canvasObjectIndex++;
|
canvasObjectIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?
|
<?
|
||||||
|
|
||||||
@ -425,13 +428,22 @@ echo "<td><textarea name=\"desc\" rows=\"3\" cols=\"60\">{$report['desc']}</text
|
|||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
echo '<tr><td>Type: </td>';
|
echo '<tr><td>Type: </td>';
|
||||||
echo '<td>';
|
echo '<td>';
|
||||||
selector('type', array('student' => 'Student Report', 'judge' => 'Judge Report',
|
selector(
|
||||||
'award' => 'Award Report', 'committee' => 'Committee Member Report',
|
'type',
|
||||||
'school' => 'School Report', 'volunteer' => 'Volunteer Report',
|
array(
|
||||||
'tour' => 'Tour Report', 'fair' => 'Feeder Fair Report',
|
'student' => 'Student Report',
|
||||||
'fundraising' => 'Fundraising Report'),
|
'judge' => 'Judge Report',
|
||||||
|
'award' => 'Award Report',
|
||||||
|
'committee' => 'Committee Member Report',
|
||||||
|
'school' => 'School Report',
|
||||||
|
'volunteer' => 'Volunteer Report',
|
||||||
|
'tour' => 'Tour Report',
|
||||||
|
'fair' => 'Feeder Fair Report',
|
||||||
|
'fundraising' => 'Fundraising Report'
|
||||||
|
),
|
||||||
$report['type'],
|
$report['type'],
|
||||||
'onChange="reportReload();"');
|
'onChange="reportReload();"'
|
||||||
|
);
|
||||||
echo '<input type="hidden" name="reloadaction" value="">';
|
echo '<input type="hidden" name="reloadaction" value="">';
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '</tr></table>';
|
echo '</tr></table>';
|
||||||
@ -524,15 +536,24 @@ if (get_value_from_2d_array($report, 'option', 'type') == 'label' || get_value_f
|
|||||||
selector("col[$x][face]", array('' => '', 'bold' => 'Bold'), $d['face']);
|
selector("col[$x][face]", array('' => '', 'bold' => 'Bold'), $d['face']);
|
||||||
}
|
}
|
||||||
echo 'Align';
|
echo 'Align';
|
||||||
selector("col[$x][align]", array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'),
|
selector(
|
||||||
$d['align']);
|
"col[$x][align]",
|
||||||
|
array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'),
|
||||||
|
$d['align']
|
||||||
|
);
|
||||||
echo 'vAlign';
|
echo 'vAlign';
|
||||||
if ($report['option']['type'] == 'label') {
|
if ($report['option']['type'] == 'label') {
|
||||||
selector("col[$x][valign]", array('vcenter' => 'Center', 'vtop' => 'Top', 'vbottom' => 'Bottom'),
|
selector(
|
||||||
$d['valign']);
|
"col[$x][valign]",
|
||||||
|
array('vcenter' => 'Center', 'vtop' => 'Top', 'vbottom' => 'Bottom'),
|
||||||
|
$d['valign']
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
selector("col[$x][valign]", array('middle' => 'Middle', 'top' => 'Top', 'bottom' => 'Bottom'),
|
selector(
|
||||||
$d['valign']);
|
"col[$x][valign]",
|
||||||
|
array('middle' => 'Middle', 'top' => 'Top', 'bottom' => 'Bottom'),
|
||||||
|
$d['valign']
|
||||||
|
);
|
||||||
|
|
||||||
echo 'Font=';
|
echo 'Font=';
|
||||||
selector("col[$x][fontname]", $fontlist, $d['fontname']);
|
selector("col[$x][fontname]", $fontlist, $d['fontname']);
|
||||||
@ -569,12 +590,18 @@ if (get_value_from_2d_array($report, 'option', 'type') == 'label' || get_value_f
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo 'Align';
|
echo 'Align';
|
||||||
selector("col[$x][align]", array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'),
|
selector(
|
||||||
'center');
|
"col[$x][align]",
|
||||||
|
array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'),
|
||||||
|
'center'
|
||||||
|
);
|
||||||
echo 'vAlign';
|
echo 'vAlign';
|
||||||
if ($report['option']['type'] == 'label') {
|
if ($report['option']['type'] == 'label') {
|
||||||
selector("col[$x][valign]", array('vcenter' => 'Center', 'vtop' => 'Top', 'vbottom' => 'Bottom'),
|
selector(
|
||||||
'top');
|
"col[$x][valign]",
|
||||||
|
array('vcenter' => 'Center', 'vtop' => 'Top', 'vbottom' => 'Bottom'),
|
||||||
|
'top'
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
selector("col[$x][valign]", array('middle' => 'Middle', 'top' => 'Top', 'bottom' => 'Bottom'), 'middle');
|
selector("col[$x][valign]", array('middle' => 'Middle', 'top' => 'Top', 'bottom' => 'Bottom'), 'middle');
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 David Grant <dave@lightbox.org>
|
* Copyright (C) 2005 David Grant <dave@lightbox.org>
|
||||||
*
|
*
|
||||||
@ -470,5 +470,3 @@ function report_fairs_fromwhere($report, $components)
|
|||||||
|
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -202,5 +203,3 @@ function report_fundraisings_fromwhere($report, $components)
|
|||||||
|
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -70,24 +71,32 @@ switch ($_GET['action']) {
|
|||||||
?>
|
?>
|
||||||
<div id="report_dialog_gen" title="Generate Report" style="display: none">
|
<div id="report_dialog_gen" title="Generate Report" style="display: none">
|
||||||
<div id="report_gen_tabs">
|
<div id="report_gen_tabs">
|
||||||
<ul><li><a href="#report_gen_tab_info"><span><?= i18n('Report Information') ?></span></a></li>
|
<ul>
|
||||||
|
<li><a href="#report_gen_tab_info"><span><?= i18n('Report Information') ?></span></a></li>
|
||||||
<li><a href="#report_gen_tab_advanced"><span><?= i18n('Advanced Options') ?></span></a></li>
|
<li><a href="#report_gen_tab_advanced"><span><?= i18n('Advanced Options') ?></span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<form id="report_dialog_form">
|
<form id="report_dialog_form">
|
||||||
<div id="report_gen_tab_info">
|
<div id="report_gen_tab_info">
|
||||||
<input type="hidden" name="id" value="<?= $id ?>" />
|
<input type="hidden" name="id" value="<?= $id ?>" />
|
||||||
<table class="editor" style="width:95%"><tr>
|
<table class="editor" style="width:95%">
|
||||||
<td colspan="2"><br /><h3><?= i18n('Report Information') ?></h3><br /></td>
|
<tr>
|
||||||
</tr><tr>
|
<td colspan="2"><br />
|
||||||
|
<h3><?= i18n('Report Information') ?></h3><br />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="label"><b><?= i18n('Report Name') ?></b>:</td>
|
<td class="label"><b><?= i18n('Report Name') ?></b>:</td>
|
||||||
<td class="input"><?= $report['name'] ?></b></td>
|
<td class="input"><?= $report['name'] ?></b></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="label"><b><?= i18n('Description') ?></b>:</td>
|
<td class="label"><b><?= i18n('Description') ?></b>:</td>
|
||||||
<td class="input"><?= $report['desc'] ?></b></td>
|
<td class="input"><?= $report['desc'] ?></b></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="label"><b><?= i18n('Created By') ?></b>:</td>
|
<td class="label"><b><?= i18n('Created By') ?></b>:</td>
|
||||||
<td class="input"><?= $report['creator'] ?></td>
|
<td class="input"><?= $report['creator'] ?></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<?
|
<?
|
||||||
/* See if the report is in this committee member's list */
|
/* See if the report is in this committee member's list */
|
||||||
$q = $pd->prepare("SELECT * FROM reports_committee
|
$q = $pd->prepare("SELECT * FROM reports_committee
|
||||||
@ -97,17 +106,26 @@ switch ($_GET['action']) {
|
|||||||
if ($q->rowCount() > 0) {
|
if ($q->rowCount() > 0) {
|
||||||
$i = $q->fetch(PDO::FETCH_ASSOC);
|
$i = $q->fetch(PDO::FETCH_ASSOC);
|
||||||
?>
|
?>
|
||||||
<td colspan="2"><hr /><h3><?= i18n('My Reports Info') ?></h3></td>
|
<td colspan="2">
|
||||||
</tr><tr>
|
<hr />
|
||||||
|
<h3><?= i18n('My Reports Info') ?></h3>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="label"><b><?= i18n('Category') ?></b>:</td>
|
<td class="label"><b><?= i18n('Category') ?></b>:</td>
|
||||||
<td class="input"><?= $i['category'] ?></b></td>
|
<td class="input"><?= $i['category'] ?></b></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="label"><b><?= i18n('Comment') ?></b>:</td>
|
<td class="label"><b><?= i18n('Comment') ?></b>:</td>
|
||||||
<td class="input"><?= $i['comment'] ?></b></td>
|
<td class="input"><?= $i['comment'] ?></b></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
|
||||||
<td colspan="2"><br /><hr /><h3><?= i18n('Report Options') ?></h3><br /></td>
|
<td colspan="2"><br />
|
||||||
|
<hr />
|
||||||
|
<h3><?= i18n('Report Options') ?></h3><br />
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?
|
<?
|
||||||
$format = $report['options']['type'];
|
$format = $report['options']['type'];
|
||||||
@ -143,21 +161,28 @@ switch ($_GET['action']) {
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="report_gen_tab_advanced">
|
<div id="report_gen_tab_advanced">
|
||||||
<table class="editor" style="width:95%"><tr>
|
<table class="editor" style="width:95%">
|
||||||
<td colspan="2"><br /><h4><?= i18n('Advanced Options') ?></h4><br /></td>
|
<tr>
|
||||||
</tr><tr>
|
<td colspan="2"><br />
|
||||||
|
<h4><?= i18n('Advanced Options') ?></h4><br />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="label"><input type="checkbox" name="include_incomplete_registrations" value="yes" /></td>
|
<td class="label"><input type="checkbox" name="include_incomplete_registrations" value="yes" /></td>
|
||||||
<td class="input"><?= i18n('Include student and project data from incomplete registrations. The registration only needs to have a division and category selected.') ?></td>
|
<td class="input"><?= i18n('Include student and project data from incomplete registrations. The registration only needs to have a division and category selected.') ?></td>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div></div>
|
</div>
|
||||||
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#report_gen_tabs").tabs();
|
$("#report_gen_tabs").tabs();
|
||||||
|
|
||||||
$("#report_dialog_gen").dialog({
|
$("#report_dialog_gen").dialog({
|
||||||
bgiframe: true, autoOpen: true,
|
bgiframe: true,
|
||||||
modal: true, resizable: false,
|
autoOpen: true,
|
||||||
|
modal: true,
|
||||||
|
resizable: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
width: 800, //(document.documentElement.clientWidth * 0.8);
|
width: 800, //(document.documentElement.clientWidth * 0.8);
|
||||||
height: 600, //(document.documentElement.clientHeight * 0.7),
|
height: 600, //(document.documentElement.clientHeight * 0.7),
|
||||||
@ -165,7 +190,8 @@ switch ($_GET['action']) {
|
|||||||
$(this).dialog('destroy');
|
$(this).dialog('destroy');
|
||||||
$('#report_dialog_gen').remove();
|
$('#report_dialog_gen').remove();
|
||||||
},
|
},
|
||||||
buttons: { "<?= i18n('Cancel') ?>": function() {
|
buttons: {
|
||||||
|
"<?= i18n('Cancel') ?>": function() {
|
||||||
$('#report_dialog_gen').dialog("close");
|
$('#report_dialog_gen').dialog("close");
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
@ -181,7 +207,6 @@ switch ($_GET['action']) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?
|
<?
|
||||||
exit;
|
exit;
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -172,9 +173,13 @@ function report_judges_div_exp($report, $field, $text)
|
|||||||
|
|
||||||
function report_judges_cat_pref($report, $field, $text)
|
function report_judges_cat_pref($report, $field, $text)
|
||||||
{
|
{
|
||||||
$prefs = array(-2 => 'Lowest', -1 => 'Low',
|
$prefs = array(
|
||||||
|
-2 => 'Lowest',
|
||||||
|
-1 => 'Low',
|
||||||
0 => '--',
|
0 => '--',
|
||||||
'1' => 'High', 2 => 'Highest');
|
'1' => 'High',
|
||||||
|
2 => 'Highest'
|
||||||
|
);
|
||||||
/* Field is 'div_pref_x', users_id is passed in $text */
|
/* Field is 'div_pref_x', users_id is passed in $text */
|
||||||
$cat_id = substr($field, 9);
|
$cat_id = substr($field, 9);
|
||||||
$year = $report['year'];
|
$year = $report['year'];
|
||||||
@ -288,9 +293,11 @@ function report_judges_time_availability($report, $field, $text)
|
|||||||
$q->execute();
|
$q->execute();
|
||||||
// echo mysql_error();
|
// echo mysql_error();
|
||||||
while (($r = $q->fetch(PDO::FETCH_ASSOC))) {
|
while (($r = $q->fetch(PDO::FETCH_ASSOC))) {
|
||||||
if ($r['start'] <= $round['starttime'] &&
|
if (
|
||||||
|
$r['start'] <= $round['starttime'] &&
|
||||||
$r['end'] >= $round['endtime'] &&
|
$r['end'] >= $round['endtime'] &&
|
||||||
$r['date'] == $round['date']) {
|
$r['date'] == $round['date']
|
||||||
|
) {
|
||||||
return 'Yes';
|
return 'Yes';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1093,5 +1100,3 @@ function report_judges_fromwhere($report, $components)
|
|||||||
|
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -36,9 +37,11 @@ else
|
|||||||
$type = $_GET['type'];
|
$type = $_GET['type'];
|
||||||
|
|
||||||
if ($type == 'pdf') {
|
if ($type == 'pdf') {
|
||||||
$rep = new lpdf(i18n($config['fairname']),
|
$rep = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
i18n('Judge List'),
|
i18n('Judge List'),
|
||||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||||
|
);
|
||||||
|
|
||||||
$rep->newPage();
|
$rep->newPage();
|
||||||
$rep->setFontSize(11);
|
$rep->setFontSize(11);
|
||||||
@ -115,10 +118,12 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$found) {
|
if (!$found) {
|
||||||
$times[$x] = array('date' => $r->date,
|
$times[$x] = array(
|
||||||
|
'date' => $r->date,
|
||||||
'starttime' => $r->starttime,
|
'starttime' => $r->starttime,
|
||||||
'endtime' => $r->endtime,
|
'endtime' => $r->endtime,
|
||||||
'name' => $r->name);
|
'name' => $r->name
|
||||||
|
);
|
||||||
$datetimeheadings[] = $r->name;
|
$datetimeheadings[] = $r->name;
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
@ -160,17 +165,17 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
|||||||
$catdata = array();
|
$catdata = array();
|
||||||
$languages = '';
|
$languages = '';
|
||||||
|
|
||||||
foreach ($u['cat_prefs'] AS $c) {
|
foreach ($u['cat_prefs'] as $c) {
|
||||||
$catdata[] = $c + 2;
|
$catdata[] = $c + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($u['div_prefs'] AS $d) {
|
foreach ($u['div_prefs'] as $d) {
|
||||||
$divdata[] = $d;
|
$divdata[] = $d;
|
||||||
// FIXME: 2010-01-22 - James - get the sub divisions for now we use a placeholder
|
// FIXME: 2010-01-22 - James - get the sub divisions for now we use a placeholder
|
||||||
$divdata[] = '';
|
$divdata[] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($u['languages'] AS $k => $v) {
|
foreach ($u['languages'] as $k => $v) {
|
||||||
$languages .= "$v/";
|
$languages .= "$v/";
|
||||||
}
|
}
|
||||||
$languages = substr($languages, 0, -1);
|
$languages = substr($languages, 0, -1);
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -36,9 +37,11 @@ else
|
|||||||
$type = $_GET['type'];
|
$type = $_GET['type'];
|
||||||
|
|
||||||
if ($type == 'pdf') {
|
if ($type == 'pdf') {
|
||||||
$rep = new lpdf(i18n($config['fairname']),
|
$rep = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
i18n('Judge List'),
|
i18n('Judge List'),
|
||||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||||
|
);
|
||||||
|
|
||||||
$rep->newPage();
|
$rep->newPage();
|
||||||
$rep->setFontSize(11);
|
$rep->setFontSize(11);
|
||||||
@ -132,17 +135,17 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
|||||||
$catdata = array();
|
$catdata = array();
|
||||||
$languages = '';
|
$languages = '';
|
||||||
|
|
||||||
foreach ($u['cat_prefs'] AS $c) {
|
foreach ($u['cat_prefs'] as $c) {
|
||||||
$catdata[] = $c + 2;
|
$catdata[] = $c + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($u['div_prefs'] AS $d) {
|
foreach ($u['div_prefs'] as $d) {
|
||||||
$divdata[] = $d;
|
$divdata[] = $d;
|
||||||
// FIXME: 2010-01-22 - James - get the sub divisions for now we use a placeholder
|
// FIXME: 2010-01-22 - James - get the sub divisions for now we use a placeholder
|
||||||
$divdata[] = '';
|
$divdata[] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($u['languages'] AS $k => $v) {
|
foreach ($u['languages'] as $k => $v) {
|
||||||
$languages .= "$v/";
|
$languages .= "$v/";
|
||||||
}
|
}
|
||||||
$languages = substr($languages, 0, -1);
|
$languages = substr($languages, 0, -1);
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -33,9 +34,11 @@ require ('judges.inc.php');
|
|||||||
$type = $_GET['type'];
|
$type = $_GET['type'];
|
||||||
|
|
||||||
if ($type == 'pdf') {
|
if ($type == 'pdf') {
|
||||||
$rep = new lpdf(i18n($config['fairname']),
|
$rep = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
i18n('Judging Team Project Assignments'),
|
i18n('Judging Team Project Assignments'),
|
||||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||||
|
);
|
||||||
|
|
||||||
$rep->newPage();
|
$rep->newPage();
|
||||||
$rep->setFontSize(11);
|
$rep->setFontSize(11);
|
||||||
@ -52,7 +55,7 @@ if ($q->rowCount() > 1)
|
|||||||
else
|
else
|
||||||
$show_date = false;
|
$show_date = false;
|
||||||
|
|
||||||
foreach ($teams AS $team) {
|
foreach ($teams as $team) {
|
||||||
$table = array();
|
$table = array();
|
||||||
$table['header'] = array(i18n('Timeslot'), i18n('Proj #'), i18n('Project Title'));
|
$table['header'] = array(i18n('Timeslot'), i18n('Proj #'), i18n('Project Title'));
|
||||||
if ($show_date)
|
if ($show_date)
|
||||||
@ -66,7 +69,7 @@ foreach ($teams AS $team) {
|
|||||||
|
|
||||||
$memberlist = '';
|
$memberlist = '';
|
||||||
if (count(get_value_from_array($team, 'members', []))) {
|
if (count(get_value_from_array($team, 'members', []))) {
|
||||||
foreach ($team['members'] AS $member) {
|
foreach ($team['members'] as $member) {
|
||||||
$memberlist .= $member['firstname'] . ' ' . $member['lastname'];
|
$memberlist .= $member['firstname'] . ' ' . $member['lastname'];
|
||||||
if ($member['captain'] == 'yes')
|
if ($member['captain'] == 'yes')
|
||||||
$memberlist .= '*';
|
$memberlist .= '*';
|
||||||
@ -78,7 +81,7 @@ foreach ($teams AS $team) {
|
|||||||
|
|
||||||
if (count($team['awards'])) {
|
if (count($team['awards'])) {
|
||||||
$rep->heading(i18n('Awards that this team judges') . ':');
|
$rep->heading(i18n('Awards that this team judges') . ':');
|
||||||
foreach ($team['awards'] AS $award) {
|
foreach ($team['awards'] as $award) {
|
||||||
$rep->addText($award['name']);
|
$rep->addText($award['name']);
|
||||||
$rep->addText(i18n('Criteria') . ': ' . $award['criteria']);
|
$rep->addText(i18n('Criteria') . ': ' . $award['criteria']);
|
||||||
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -26,16 +27,19 @@
|
|||||||
require('../common.inc.php');
|
require('../common.inc.php');
|
||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
send_header('Mailing Label Generator',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Mailing Label Generator',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Reports' => 'admin/reports.php'));
|
'Reports' => 'admin/reports.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function stockChange()
|
function stockChange() {
|
||||||
{
|
|
||||||
var val = document.forms.mailinglabels.stock.options[document.forms.mailinglabels.stock.selectedIndex].value;
|
var val = document.forms.mailinglabels.stock.options[document.forms.mailinglabels.stock.selectedIndex].value;
|
||||||
var v = val.split(":");
|
var v = val.split(":");
|
||||||
|
|
||||||
@ -48,8 +52,7 @@ function stockChange()
|
|||||||
document.forms.mailinglabels.type.value = v[7];
|
document.forms.mailinglabels.type.value = v[7];
|
||||||
}
|
}
|
||||||
|
|
||||||
function reportChange()
|
function reportChange() {
|
||||||
{
|
|
||||||
var val = document.forms.mailinglabels.reportselect.options[document.forms.mailinglabels.reportselect.selectedIndex].value;
|
var val = document.forms.mailinglabels.reportselect.options[document.forms.mailinglabels.reportselect.selectedIndex].value;
|
||||||
var v = val.split(":");
|
var v = val.split(":");
|
||||||
document.forms.mailinglabels.report.value = v[0];
|
document.forms.mailinglabels.report.value = v[0];
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -57,9 +58,11 @@ if ($report) {
|
|||||||
if ($_GET['toppadding'])
|
if ($_GET['toppadding'])
|
||||||
$toppadding = $_GET['toppadding'];
|
$toppadding = $_GET['toppadding'];
|
||||||
|
|
||||||
$rep = new lpdf(i18n($config['fairname']),
|
$rep = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
"$reportname Mailing Labels",
|
"$reportname Mailing Labels",
|
||||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||||
|
);
|
||||||
|
|
||||||
$rep->setPageStyle('labels');
|
$rep->setPageStyle('labels');
|
||||||
$rep->newPage(8.5, 11);
|
$rep->newPage(8.5, 11);
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -27,9 +28,13 @@ require ('../common.inc.php');
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
require_once('reports.inc.php');
|
require_once('reports.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
send_header('Reports',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Reports',
|
||||||
'Administration' => 'admin/index.php'));
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
echo error("This page will no longer be available after Summer 2008. Please use the new 'My Reports' interface. ");
|
echo error("This page will no longer be available after Summer 2008. Please use the new 'My Reports' interface. ");
|
||||||
|
|
||||||
|
@ -10,9 +10,11 @@ if (!$type)
|
|||||||
$type = 'pdf';
|
$type = 'pdf';
|
||||||
|
|
||||||
if ($type == 'pdf') {
|
if ($type == 'pdf') {
|
||||||
$rep = new lpdf(i18n($config['fairname']),
|
$rep = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
i18n('Program Awards'),
|
i18n('Program Awards'),
|
||||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||||
|
);
|
||||||
|
|
||||||
$rep->newPage();
|
$rep->newPage();
|
||||||
$rep->setFontSize(11);
|
$rep->setFontSize(11);
|
||||||
@ -103,4 +105,3 @@ if ($q->rowCount()) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$rep->output();
|
$rep->output();
|
||||||
?>
|
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -33,9 +34,11 @@ require ('judges.inc.php');
|
|||||||
$type = $_GET['type'];
|
$type = $_GET['type'];
|
||||||
|
|
||||||
if ($type == 'pdf') {
|
if ($type == 'pdf') {
|
||||||
$rep = new lpdf(i18n($config['fairname']),
|
$rep = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
i18n('Project Details'),
|
i18n('Project Details'),
|
||||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||||
|
);
|
||||||
|
|
||||||
$rep->newPage();
|
$rep->newPage();
|
||||||
$rep->setFontSize(11);
|
$rep->setFontSize(11);
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -37,9 +38,11 @@ require ('judges.inc.php');
|
|||||||
$type = $_GET['type'];
|
$type = $_GET['type'];
|
||||||
|
|
||||||
if ($type == 'pdf') {
|
if ($type == 'pdf') {
|
||||||
$rep = new lpdf(i18n($config['fairname']),
|
$rep = new lpdf(
|
||||||
|
i18n($config['fairname']),
|
||||||
i18n('Project Judging Team Assignments'),
|
i18n('Project Judging Team Assignments'),
|
||||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||||
|
);
|
||||||
|
|
||||||
$rep->newPage();
|
$rep->newPage();
|
||||||
$rep->setFontSize(11);
|
$rep->setFontSize(11);
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -220,5 +221,3 @@ function report_schools_fromwhere($report, $components)
|
|||||||
|
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -374,8 +375,14 @@ $report_students_fields = array(
|
|||||||
'header' => 'T-Shirt',
|
'header' => 'T-Shirt',
|
||||||
'width' => 0.7,
|
'width' => 0.7,
|
||||||
'table' => 'students.tshirt',
|
'table' => 'students.tshirt',
|
||||||
'value_map' => array('none' => '', 'xsmall' => 'X-Small', 'small' => 'Small', 'medium' => 'Medium',
|
'value_map' => array(
|
||||||
'large' => 'Large', 'xlarge' => 'X-Large')
|
'none' => '',
|
||||||
|
'xsmall' => 'X-Small',
|
||||||
|
'small' => 'Small',
|
||||||
|
'medium' => 'Medium',
|
||||||
|
'large' => 'Large',
|
||||||
|
'xlarge' => 'X-Large'
|
||||||
|
)
|
||||||
),
|
),
|
||||||
'medicalalert' => array(
|
'medicalalert' => array(
|
||||||
'name' => 'Student -- Medical Alert Info',
|
'name' => 'Student -- Medical Alert Info',
|
||||||
@ -1253,5 +1260,3 @@ function report_students_fromwhere($report, $components)
|
|||||||
|
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -98,5 +99,3 @@ function report_tours_fromwhere($report, $components)
|
|||||||
|
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -160,5 +161,3 @@ function report_volunteers_fromwhere($report, $components)
|
|||||||
|
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -159,4 +160,3 @@ if ($config['FAIRYEAR'] == 2008) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -210,11 +211,15 @@ if (get_value_from_array($_GET, 'action') == 'makeaccesscodes') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (get_value_from_array($_GET, 'action') == 'edit' || get_value_from_array($_GET, 'action') == 'add') {
|
if (get_value_from_array($_GET, 'action') == 'edit' || get_value_from_array($_GET, 'action') == 'add') {
|
||||||
send_header(get_value_from_array($_GET, 'action') == 'edit' ? 'Edit School' : 'Add New School',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
get_value_from_array($_GET, 'action') == 'edit' ? 'Edit School' : 'Add New School',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'School Management' => 'admin/schools.php'),
|
'School Management' => 'admin/schools.php'
|
||||||
'schools_management');
|
),
|
||||||
|
'schools_management'
|
||||||
|
);
|
||||||
if (get_value_from_array($_GET, 'action') == 'edit') {
|
if (get_value_from_array($_GET, 'action') == 'edit') {
|
||||||
$buttontext = 'Save School';
|
$buttontext = 'Save School';
|
||||||
$q = $pdo->prepare("SELECT * FROM schools WHERE id='" . get_value_from_array($_GET, 'edit', '') . "'");
|
$q = $pdo->prepare("SELECT * FROM schools WHERE id='" . get_value_from_array($_GET, 'edit', '') . "'");
|
||||||
@ -238,16 +243,19 @@ if (get_value_from_array($_GET, 'action') == 'edit' || get_value_from_array($_GE
|
|||||||
echo '<select name="schoollang">';
|
echo '<select name="schoollang">';
|
||||||
echo '<option value="">' . i18n('Choose') . "</option>\n";
|
echo '<option value="">' . i18n('Choose') . "</option>\n";
|
||||||
|
|
||||||
foreach ($config['languages'] AS $k => $l) {
|
foreach ($config['languages'] as $k => $l) {
|
||||||
echo "<option $sel value=\"$k\">" . i18n($l) . "</option>\n";
|
echo "<option $sel value=\"$k\">" . i18n($l) . "</option>\n";
|
||||||
}
|
}
|
||||||
echo '</select>';
|
echo '</select>';
|
||||||
|
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
echo '<tr><td>' . i18n('School Designation') . '</td><td>';
|
echo '<tr><td>' . i18n('School Designation') . '</td><td>';
|
||||||
$des = array('' => 'Choose', 'public' => 'Public',
|
$des = array(
|
||||||
|
'' => 'Choose',
|
||||||
|
'public' => 'Public',
|
||||||
'independent' => 'Independent/Private',
|
'independent' => 'Independent/Private',
|
||||||
'home' => 'Home School');
|
'home' => 'Home School'
|
||||||
|
);
|
||||||
echo '<select name="schooldesignate">';
|
echo '<select name="schooldesignate">';
|
||||||
foreach ($des as $k => $v) {
|
foreach ($des as $k => $v) {
|
||||||
$sel = ($r->designate == $k) ? 'selected="selected"' : '';
|
$sel = ($r->designate == $k) ? 'selected="selected"' : '';
|
||||||
@ -327,10 +335,14 @@ if (get_value_from_array($_GET, 'action') == 'edit' || get_value_from_array($_GE
|
|||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
} else {
|
} else {
|
||||||
send_header('School Management',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'School Management',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'schools_management');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'schools_management'
|
||||||
|
);
|
||||||
|
|
||||||
global $notice;
|
global $notice;
|
||||||
switch ($notice) {
|
switch ($notice) {
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -33,10 +34,14 @@ require ('../csvimport.inc.php');
|
|||||||
|
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
|
|
||||||
send_header('Schools Import',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Schools Import',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'School Management' => 'admin/schools.php'));
|
'School Management' => 'admin/schools.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$showform = true;
|
$showform = true;
|
||||||
|
|
||||||
@ -54,7 +59,7 @@ if (get_value_from_array($_POST, 'action') == 'import') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$loaded = 0;
|
$loaded = 0;
|
||||||
foreach ($CSVP->data AS $row) {
|
foreach ($CSVP->data as $row) {
|
||||||
for ($n = 0; $n < count($row); $n++) {
|
for ($n = 0; $n < count($row); $n++) {
|
||||||
$row[$n] = trim($row[$n]);
|
$row[$n] = trim($row[$n]);
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -31,10 +32,14 @@ require ('../common.inc.php');
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
|
|
||||||
send_header('Science Fair Management',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Science Fair Management',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'sciencefair_management');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'sciencefair_management'
|
||||||
|
);
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
echo '<a href="user_list.php?show_types[]=fair">' . i18n('Science Fair Manager') . '</a><br />';
|
echo '<a href="user_list.php?show_types[]=fair">' . i18n('Science Fair Manager') . '</a><br />';
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -30,7 +31,7 @@
|
|||||||
include '../common.inc.php';
|
include '../common.inc.php';
|
||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
foreach ($config['languages'] AS $l => $ln) {
|
foreach ($config['languages'] as $l => $ln) {
|
||||||
if ($l == $config['default_language'])
|
if ($l == $config['default_language'])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the 'Science Fair In A Box' project
|
* This file is part of the 'Science Fair In A Box' project
|
||||||
* SFIAB Website: http://www.sfiab.ca
|
* Science-ation Website: https://science-ation.ca/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005-2008 James Grant <james@lightbox.org>
|
* Copyright (C) 2005-2008 James Grant <james@lightbox.org>
|
||||||
@ -27,10 +27,14 @@ require ('../common.inc.php');
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
|
|
||||||
send_header('Donor Contacts',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Donor Contacts',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Donor' => 'admin/donors.php'));
|
'Donor' => 'admin/donors.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if ($_GET['sponsors_id'])
|
if ($_GET['sponsors_id'])
|
||||||
$sponsors_id = $_GET['sponsors_id'];
|
$sponsors_id = $_GET['sponsors_id'];
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -85,4 +86,3 @@ $stats_data = array(
|
|||||||
'delegate3_size' => array('manual' => true),
|
'delegate3_size' => array('manual' => true),
|
||||||
'delegate4_size' => array('manual' => true),
|
'delegate4_size' => array('manual' => true),
|
||||||
);
|
);
|
||||||
?>
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -517,10 +518,12 @@ function registration_load()
|
|||||||
<tr>
|
<tr>
|
||||||
<td><?= i18n('Registration Number') ?>:</td>
|
<td><?= i18n('Registration Number') ?>:</td>
|
||||||
<td><input type="text" name="registration_num" value="<?= get_value_from_array($r, 'num') ?>"></td>
|
<td><input type="text" name="registration_num" value="<?= get_value_from_array($r, 'num') ?>"></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><?= i18n('Registration Email') ?>:</td>
|
<td><?= i18n('Registration Email') ?>:</td>
|
||||||
<td><input type="text" name="registration_email" value="<?= get_value_from_array($r, 'email') ?>"></td>
|
<td><input type="text" name="registration_email" value="<?= get_value_from_array($r, 'email') ?>"></td>
|
||||||
</tr><tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td><?= i18n('Status') ?>:</td>
|
<td><?= i18n('Status') ?>:</td>
|
||||||
<td><select name="registration_status">
|
<td><select name="registration_status">
|
||||||
<?
|
<?
|
||||||
@ -547,7 +550,8 @@ function registration_load()
|
|||||||
$sel = ($fid == $r['fairs_id']) ? 'selected="selected"' : '';
|
$sel = ($fid == $r['fairs_id']) ? 'selected="selected"' : '';
|
||||||
echo "<option $sel value=\"$fid\">{$f['name']}</option>";
|
echo "<option $sel value=\"$fid\">{$f['name']}</option>";
|
||||||
}
|
}
|
||||||
?> </select>
|
?>
|
||||||
|
</select>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
?> </td>
|
?> </td>
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -31,10 +32,14 @@ require ('../common.inc.php');
|
|||||||
require_once('../user.inc.php');
|
require_once('../user.inc.php');
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
|
|
||||||
send_header('Tours',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Tours',
|
||||||
'Administration' => 'admin/index.php'),
|
array(
|
||||||
'tour_management');
|
'Committee Main' => 'committee_main.php',
|
||||||
|
'Administration' => 'admin/index.php'
|
||||||
|
),
|
||||||
|
'tour_management'
|
||||||
|
);
|
||||||
echo '<a href="tours_manager.php">' . i18n('Manage Tours') . '</a> ' . i18n('- Add, Delete, Edit, and List tours') . '<br />';
|
echo '<a href="tours_manager.php">' . i18n('Manage Tours') . '</a> ' . i18n('- Add, Delete, Edit, and List tours') . '<br />';
|
||||||
echo '<a href="tours_assignments.php">' . i18n('Edit Student-Tour Assignments') . '</a><br />';
|
echo '<a href="tours_assignments.php">' . i18n('Edit Student-Tour Assignments') . '</a><br />';
|
||||||
echo '<hr />';
|
echo '<hr />';
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -51,8 +52,10 @@ if (get_value_from_array($_GET, 'action') == 'info') {
|
|||||||
$r->execute();
|
$r->execute();
|
||||||
$i = $r->fetch(PDO::FETCH_OBJ);
|
$i = $r->fetch(PDO::FETCH_OBJ);
|
||||||
|
|
||||||
send_popup_header(i18n('Student Tour Rank Information - %1 %2',
|
send_popup_header(i18n(
|
||||||
array($i->firstname, $i->lastname)));
|
'Student Tour Rank Information - %1 %2',
|
||||||
|
array($i->firstname, $i->lastname)
|
||||||
|
));
|
||||||
$query = "SELECT * FROM tours_choice
|
$query = "SELECT * FROM tours_choice
|
||||||
WHERE students_id='$sid'
|
WHERE students_id='$sid'
|
||||||
AND year='{$config['FAIRYEAR']}'
|
AND year='{$config['FAIRYEAR']}'
|
||||||
@ -70,8 +73,10 @@ if (get_value_from_array($_GET, 'action') == 'info') {
|
|||||||
echo '<br /><br />';
|
echo '<br /><br />';
|
||||||
$count--;
|
$count--;
|
||||||
} else {
|
} else {
|
||||||
echo '<b>' . i18n('Tour Preference %1',
|
echo '<b>' . i18n(
|
||||||
array($i->rank)) . ':</b>';
|
'Tour Preference %1',
|
||||||
|
array($i->rank)
|
||||||
|
) . ':</b>';
|
||||||
echo '</td><td>';
|
echo '</td><td>';
|
||||||
echo "#{$tours[$i->tour_id]['num']}: {$tours[$i->tour_id]['name']}";
|
echo "#{$tours[$i->tour_id]['num']}: {$tours[$i->tour_id]['name']}";
|
||||||
echo '</td><td>';
|
echo '</td><td>';
|
||||||
@ -88,22 +93,25 @@ if (get_value_from_array($_GET, 'action') == 'info') {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header('Tour Assignments',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Tour Assignments',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Tours' => 'admin/tours.php'));
|
'Tours' => 'admin/tours.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
var infowindow = '';
|
var infowindow = '';
|
||||||
function addbuttonclicked(id)
|
|
||||||
{
|
function addbuttonclicked(id) {
|
||||||
document.forms.tours.action.value = "add";
|
document.forms.tours.action.value = "add";
|
||||||
document.forms.tours.tours_id.value = id;
|
document.forms.tours.tours_id.value = id;
|
||||||
document.forms.tours.submit();
|
document.forms.tours.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function openinfo(id)
|
function openinfo(id) {
|
||||||
{
|
|
||||||
if (id)
|
if (id)
|
||||||
currentid = id;
|
currentid = id;
|
||||||
else
|
else
|
||||||
@ -114,10 +122,8 @@ function openinfo(id)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function switchinfo()
|
function switchinfo() {
|
||||||
{
|
if (document.forms.tours["studentlist[]"].selectedIndex != -1) {
|
||||||
if(document.forms.tours["studentlist[]"].selectedIndex != -1)
|
|
||||||
{
|
|
||||||
currentname = document.forms.tours["studentlist[]"].options[document.forms.tours["studentlist[]"].selectedIndex].text;
|
currentname = document.forms.tours["studentlist[]"].options[document.forms.tours["studentlist[]"].selectedIndex].text;
|
||||||
currentid = document.forms.tours["studentlist[]"].options[document.forms.tours["studentlist[]"].selectedIndex].value;
|
currentid = document.forms.tours["studentlist[]"].options[document.forms.tours["studentlist[]"].selectedIndex].value;
|
||||||
|
|
||||||
@ -127,15 +133,12 @@ function switchinfo()
|
|||||||
if (!infowindow.closed && infowindow.location) {
|
if (!infowindow.closed && infowindow.location) {
|
||||||
openinfo();
|
openinfo();
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
document.forms.tours.studentinfobutton.disabled = true;
|
document.forms.tours.studentinfobutton.disabled = true;
|
||||||
document.forms.tours.studentinfobutton.value = "<? echo i18n('Student Tour Rank Info') ?>";
|
document.forms.tours.studentinfobutton.value = "<? echo i18n('Student Tour Rank Info') ?>";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
@ -152,7 +155,7 @@ if (get_value_from_array($_POST, 'action') == 'add' && $tours_id != 0 && count($
|
|||||||
}
|
}
|
||||||
|
|
||||||
$added = 0;
|
$added = 0;
|
||||||
foreach ($student_list AS $sid) {
|
foreach ($student_list as $sid) {
|
||||||
/* Make sure the student exists */
|
/* Make sure the student exists */
|
||||||
$sid = intval($sid);
|
$sid = intval($sid);
|
||||||
|
|
||||||
@ -184,7 +187,10 @@ if (get_value_from_array($_POST, 'action') == 'add' && $tours_id != 0 && count($
|
|||||||
$j = i18n('students');
|
$j = i18n('students');
|
||||||
|
|
||||||
echo happy(i18n('%1 %2 added to tour #%3 (%4)', array(
|
echo happy(i18n('%1 %2 added to tour #%3 (%4)', array(
|
||||||
$added, $j, $tours[$tours_id]['num'], $tours[$tours_id]['name']
|
$added,
|
||||||
|
$j,
|
||||||
|
$tours[$tours_id]['num'],
|
||||||
|
$tours[$tours_id]['name']
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,7 +301,7 @@ foreach ($tours as $tid => $t) {
|
|||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
$x = 0;
|
$x = 0;
|
||||||
if (is_array($t['students'])) {
|
if (is_array($t['students'])) {
|
||||||
foreach ($t['students'] AS $sid) {
|
foreach ($t['students'] as $sid) {
|
||||||
$s = $student[$sid];
|
$s = $student[$sid];
|
||||||
if ($x == 0)
|
if ($x == 0)
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
* Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
|
* Copyright (C) 2024 AlgoLibre Inc. <science-ation@algolibre.io>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public
|
* modify it under the terms of the GNU General Public
|
||||||
@ -33,10 +34,14 @@ user_auth_required('committee', 'admin');
|
|||||||
require('../tours.class.php');
|
require('../tours.class.php');
|
||||||
require('../tableeditor.class.php');
|
require('../tableeditor.class.php');
|
||||||
|
|
||||||
send_header('Tour Management',
|
send_header(
|
||||||
array('Committee Main' => 'committee_main.php',
|
'Tour Management',
|
||||||
|
array(
|
||||||
|
'Committee Main' => 'committee_main.php',
|
||||||
'Administration' => 'admin/index.php',
|
'Administration' => 'admin/index.php',
|
||||||
'Tours' => 'admin/tours.php'));
|
'Tours' => 'admin/tours.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if ($_GET['action'] == 'renumber') {
|
if ($_GET['action'] == 'renumber') {
|
||||||
$q = $pdo->prepare("SELECT id FROM tours WHERE year='{$config['FAIRYEAR']}'");
|
$q = $pdo->prepare("SELECT id FROM tours WHERE year='{$config['FAIRYEAR']}'");
|
||||||
@ -52,9 +57,7 @@ if ($_GET['action'] == 'renumber') {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
|
function opentoursinfo(id) {
|
||||||
function opentoursinfo(id)
|
|
||||||
{
|
|
||||||
if (id)
|
if (id)
|
||||||
currentid = id;
|
currentid = id;
|
||||||
else
|
else
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user