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
|
||||
* 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) 2008-2012 Youth Science Ontario <info@youthscienceontario.ca>
|
||||
@ -46,9 +46,14 @@ class annealer
|
||||
var $rate;
|
||||
var $move_bucket_ids;
|
||||
|
||||
function annealer($num_buckets, $start_temp, $start_moves, $rate,
|
||||
$cost_function_cb, $items)
|
||||
{
|
||||
function annealer(
|
||||
$num_buckets,
|
||||
$start_temp,
|
||||
$start_moves,
|
||||
$rate,
|
||||
$cost_function_cb,
|
||||
$items
|
||||
) {
|
||||
$this->num_buckets = $num_buckets;
|
||||
$this->start_temp = $start_temp;
|
||||
$this->start_moves = $start_moves;
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -27,10 +28,14 @@ require ('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
|
||||
send_header('Create All Divisional Awards',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Create All Divisional Awards',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Awards Main' => 'admin/awards.php'));
|
||||
'Awards Main' => 'admin/awards.php'
|
||||
)
|
||||
);
|
||||
|
||||
if (get_value_from_array($_GET, 'sponsors_id'))
|
||||
$sponsors_id = $_GET['sponsors_id'];
|
||||
@ -72,8 +77,8 @@ if ($r->num) {
|
||||
}
|
||||
} else {
|
||||
$divcat = array();
|
||||
foreach ($dkeys AS $d) {
|
||||
foreach ($ckeys AS $c) {
|
||||
foreach ($dkeys as $d) {
|
||||
foreach ($ckeys as $c) {
|
||||
$divcat[] = array('c' => $c, 'd' => $d);
|
||||
}
|
||||
}
|
||||
@ -101,7 +106,7 @@ if ($r->num) {
|
||||
|
||||
$ord = 1;
|
||||
echo '<br />';
|
||||
foreach ($divcat AS $dc) {
|
||||
foreach ($divcat as $dc) {
|
||||
$d_id = $dc['d'];
|
||||
$c_id = $dc['c'];
|
||||
$d_division = $div[$d_id];
|
||||
@ -129,7 +134,7 @@ if ($r->num) {
|
||||
$ord++;
|
||||
|
||||
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 (
|
||||
'$award_awards_id',
|
||||
'{$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 '<br />';
|
||||
|
||||
foreach ($divcat AS $dc) {
|
||||
foreach ($divcat as $dc) {
|
||||
$d_id = $dc['d'];
|
||||
$c_id = $dc['c'];
|
||||
$d_division = $div[$d_id];
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -31,15 +32,14 @@ require_once ('awards.inc.php');
|
||||
$_GET['action'] = $_GET['action'] ?? '';
|
||||
|
||||
switch ($_GET['action']) {
|
||||
case 'awardinfo_load':
|
||||
;
|
||||
case 'awardinfo_load':;
|
||||
$id = intval(get_value_from_array($_GET, 'id'));
|
||||
$q = $pdo->prepare("SELECT * FROM award_awards WHERE id='$id'");
|
||||
$q->execute();
|
||||
$ret = $q->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
// 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);
|
||||
}
|
||||
// echo iconv("ISO-8859-1","UTF-8",json_encode($ret));
|
||||
@ -56,6 +56,8 @@ switch ($_GET['action']) {
|
||||
$id = intval($_POST['id']);
|
||||
|
||||
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)
|
||||
VALUES ('{$config['FAIRYEAR']}','yes','yes')");
|
||||
$q->execute();
|
||||
@ -84,6 +86,7 @@ switch ($_GET['action']) {
|
||||
sponsors_id='" . intval($_POST['sponsors_id']) . "' ";
|
||||
}
|
||||
$q .= "WHERE id='$id'";
|
||||
error_log($q);
|
||||
$q = $pdo->prepare($q);
|
||||
$q->execute();
|
||||
|
||||
@ -124,7 +127,7 @@ switch ($_GET['action']) {
|
||||
// wipe out any old award-category links
|
||||
$q = $pdo->prepare("DELETE FROM award_awards_projectcategories WHERE award_awards_id='$id'");
|
||||
$q->execute();
|
||||
foreach ($_POST['categories'] AS $key => $cat) {
|
||||
foreach ($_POST['categories'] as $key => $cat) {
|
||||
$c = intval($cat);
|
||||
$q = $pdo->prepare('INSERT INTO award_awards_projectcategories (award_awards_id, projectcategories_id, year)
|
||||
VALUES (:id, :c, :year)');
|
||||
@ -142,7 +145,7 @@ switch ($_GET['action']) {
|
||||
$q->execute();
|
||||
|
||||
// now add the new ones
|
||||
foreach ($_POST['divisions'] AS $key => $div) {
|
||||
foreach ($_POST['divisions'] as $key => $div) {
|
||||
$d = intval($div);
|
||||
|
||||
$q = $pdo->prepare('INSERT INTO award_awards_projectdivisions (award_awards_id, projectdivisions_id, year)
|
||||
@ -195,7 +198,7 @@ switch ($_GET['action']) {
|
||||
$q->execute();
|
||||
}
|
||||
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);
|
||||
}
|
||||
$ret[] = $r;
|
||||
@ -208,7 +211,7 @@ switch ($_GET['action']) {
|
||||
$q = $pdo->prepare("SELECT * FROM award_prizes WHERE id='$id'");
|
||||
$q->execute();
|
||||
$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);
|
||||
}
|
||||
echo json_encode($ret);
|
||||
@ -304,18 +307,25 @@ switch ($_GET['action']) {
|
||||
<?= i18n('Allow feeder fairs to download this award.') ?></p>
|
||||
<div id="feeder_en">
|
||||
<table class="editor">
|
||||
<tr><td><?= i18n('Unique Name') ?>:</td>
|
||||
<td><input type="text" name="identifier" value="<?= $a['external_identifier'] ?>" size="40" maxlength="128" /></td></tr>
|
||||
<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"' : ''; ?>
|
||||
<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>
|
||||
<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"' : ''; ?>
|
||||
<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>
|
||||
<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>
|
||||
<p><?= i18n('Select which feeder fairs can download this award and upload winners.') ?></p>
|
||||
<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('Upload Winners') ?></th>
|
||||
</tr>
|
||||
@ -347,9 +357,9 @@ switch ($_GET['action']) {
|
||||
|
||||
/* Prepare a fair-wise list */
|
||||
$data = array();
|
||||
foreach ($dl AS $fairs_id)
|
||||
foreach ($dl as $fairs_id)
|
||||
$data[$fairs_id]['dl'] = true;
|
||||
foreach ($ul AS $fairs_id)
|
||||
foreach ($ul as $fairs_id)
|
||||
$data[$fairs_id]['ul'] = true;
|
||||
|
||||
/* Now save each one */
|
||||
@ -382,21 +392,23 @@ switch ($_GET['action']) {
|
||||
exit;
|
||||
}
|
||||
|
||||
send_header('Awards Management',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Awards Management',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.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">
|
||||
|
||||
var award_id = 0;
|
||||
var award_tab_update = new Array();
|
||||
|
||||
|
||||
function update_awardinfo()
|
||||
{
|
||||
function update_awardinfo() {
|
||||
|
||||
if (award_tab_update['awardinfo'] == award_id) return;
|
||||
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;
|
||||
/* 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
|
||||
* after the .load finishes */
|
||||
$("#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 */
|
||||
/* We want to do this AFTER the load completes.
|
||||
* Somehow, the value of reload properly makes
|
||||
@ -481,8 +491,7 @@ function awardinfo_save()
|
||||
return false;
|
||||
}
|
||||
|
||||
function update_eligibility()
|
||||
{
|
||||
function update_eligibility() {
|
||||
if (award_tab_update['eligibility'] == award_id) return;
|
||||
award_tab_update['eligibility'] = 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)
|
||||
$("#prizelist").tableDnD({
|
||||
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
|
||||
* a prizeinfo reload */
|
||||
// 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,
|
||||
function(json) {
|
||||
$("#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);
|
||||
$("#debug").load("<? $_SERVER['PHP_SELF'] ?>?action=eligibility_save", $("#eligibility").serializeArray());
|
||||
return false;
|
||||
}
|
||||
|
||||
function prize_save()
|
||||
{
|
||||
function prize_save() {
|
||||
$("#debug").load("<? $_SERVER['PHP_SELF'] ?>?action=prize_save", $("#prizeinfo").serializeArray(),
|
||||
function(responseText, textStatus, XMLHttpRequest)
|
||||
{
|
||||
function(responseText, textStatus, XMLHttpRequest) {
|
||||
update_prizeinfo();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function prize_delete(id)
|
||||
{
|
||||
function prize_delete(id) {
|
||||
var confirm = confirmClick('Are you sure you want to delete this prize?');
|
||||
if (confirm == true) {
|
||||
$("#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).remove();
|
||||
prizelist_refresh();
|
||||
@ -590,8 +591,7 @@ function prize_delete(id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
function prize_create()
|
||||
{
|
||||
function prize_create() {
|
||||
$.getJSON("<?= $_SERVER['PHP_SELF'] ?>?action=prize_create&award_awards_id=" + award_id,
|
||||
function(json) {
|
||||
$(".prizeinfo").val("");
|
||||
@ -603,8 +603,7 @@ function prize_create()
|
||||
});
|
||||
}
|
||||
|
||||
function update_feeder()
|
||||
{
|
||||
function update_feeder() {
|
||||
if (award_tab_update['feeder'] == award_id) return;
|
||||
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');
|
||||
if (checked == true) {
|
||||
$('#feeder_en *').removeAttr('disabled');
|
||||
@ -638,8 +636,10 @@ function update_feeder_enable()
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#popup_editor").dialog({
|
||||
bgiframe: true, autoOpen: false,
|
||||
modal: true, resizable: false,
|
||||
bgiframe: true,
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
create: function() {
|
||||
var $tabs = $('#editor_tabs').tabs();
|
||||
@ -688,7 +688,6 @@ $(document).ready(function() {
|
||||
// selected: -1 /* None selected */
|
||||
// });
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<?
|
||||
@ -698,7 +697,8 @@ $(document).ready(function() {
|
||||
<div id="popup_editor" title="Award Editor" style="display: none">
|
||||
<div id="popup_status"></div>
|
||||
<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_prizes"><span><?= i18n('Prizes') ?></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">
|
||||
<input type="hidden" name="id" id="awardinfo_id" value="0" />
|
||||
<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></tr>
|
||||
<tr><td><?= i18n('Sponsor') ?>:</td><td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= i18n('Sponsor') ?>:</td>
|
||||
<td>
|
||||
<?
|
||||
|
||||
$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>';
|
||||
}
|
||||
?>
|
||||
</select></td></tr>
|
||||
<tr><td><?= i18n('Presenter') ?>:</td>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= i18n('Presenter') ?>:</td>
|
||||
<td><input type="text" id="awardinfo_presenter" name="presenter" value="Loading..." size="50" maxlength="128" />
|
||||
</td></tr>
|
||||
<tr><td><?= i18n('Type') ?>:</td><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->execute();
|
||||
@ -746,27 +755,37 @@ while ($tr = $tq->fetch(PDO::FETCH_OBJ)) {
|
||||
echo "<option value=\"$tr->id\">" . i18n($tr->type) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select></td></tr>
|
||||
<tr><td><label><?= i18n('Criteria') ?>:</label></td>
|
||||
<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>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label><?= i18n('Criteria') ?>:</label></td>
|
||||
<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>
|
||||
|
||||
<h4>Options</h4>
|
||||
<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>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
</tr></table>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" onClick="awardinfo_save();return false;" value="Save" />
|
||||
</form>
|
||||
</div>
|
||||
@ -778,7 +797,9 @@ while ($tr = $tq->fetch(PDO::FETCH_OBJ)) {
|
||||
<form id="eligibility">
|
||||
<input type="hidden" id="eligibility_award_awards_id" name="award_awards_id" value="" />
|
||||
<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="";
|
||||
|
||||
@ -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 />';
|
||||
}
|
||||
?>
|
||||
</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');
|
||||
@ -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>";
|
||||
|
||||
?>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" onClick="eligibility_save();return false;" value="Save" />
|
||||
</form>
|
||||
</div>
|
||||
@ -832,13 +858,15 @@ while ($dr = $dq->fetch(PDO::FETCH_OBJ)) {
|
||||
<th><?= i18n('Scholarship') ?></th>
|
||||
<th><?= i18n('Value') ?></th>
|
||||
<th><?= i18n('Actions') ?></th>
|
||||
</tr></table>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
* <?= i18n('Click on the Script Order and drag to re-order the prizes') ?>
|
||||
<br>
|
||||
<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">
|
||||
<input type="hidden" id="prizeinfo_id" name="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>
|
||||
<td><?= i18n('Number available') ?>:</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><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><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><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><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>
|
||||
<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: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>
|
||||
</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: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:45%;"><?= i18n('School annual return/reuse trophy') ?></td>
|
||||
</tr></table></td>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
@ -889,7 +927,8 @@ while ($dr = $dq->fetch(PDO::FETCH_OBJ)) {
|
||||
<div id="editor_tab_feeder"></div>
|
||||
|
||||
<? /* End tabs, end popup */ ?>
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?
|
||||
|
||||
@ -900,9 +939,7 @@ while ($dr = $dq->fetch(PDO::FETCH_OBJ)) {
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function popup_editor(id, mode)
|
||||
{
|
||||
function popup_editor(id, mode) {
|
||||
var w = (document.documentElement.clientWidth * 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
|
||||
* to true first */
|
||||
$('#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 */
|
||||
switch (mode) {
|
||||
@ -947,8 +984,7 @@ function popup_editor(id, mode)
|
||||
return true;
|
||||
}
|
||||
|
||||
function awardlist_refresh()
|
||||
{
|
||||
function awardlist_refresh() {
|
||||
$("#awardlist").tableDnD({
|
||||
onDrop: function(table, row) {
|
||||
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?') ?>');
|
||||
if (conf == true) {
|
||||
$("#info_info").load("<? $_SERVER['PHP_SELF'] ?>?action=award_delete&id=" + id);
|
||||
@ -986,7 +1021,6 @@ function award_delete(id)
|
||||
$(document).ready(function() {
|
||||
awardlist_refresh();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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>
|
||||
*
|
||||
@ -192,7 +192,7 @@ switch (get_value_from_array($_GET, 'action')) {
|
||||
$existingprizes[$pr['prize']] = $pr;
|
||||
|
||||
/* Iterate over the downloaded pizes */
|
||||
foreach ($prizes AS $prize) {
|
||||
foreach ($prizes as $prize) {
|
||||
// if it doesn't exist, add it
|
||||
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 */
|
||||
foreach ($existingprizes AS $ep) {
|
||||
foreach ($existingprizes as $ep) {
|
||||
echo ' ' . i18n('Removing prize %1', array($ep['prize'])) . '<br />';
|
||||
award_prize_delete($ep['id']);
|
||||
}
|
||||
@ -248,7 +248,7 @@ switch (get_value_from_array($_GET, 'action')) {
|
||||
echo '<br />';
|
||||
|
||||
// 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 />';
|
||||
award_delete($aid);
|
||||
}
|
||||
@ -257,16 +257,18 @@ switch (get_value_from_array($_GET, 'action')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
send_header('Download Awards',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Download Awards',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Awards Main' => 'admin/awards.php'));
|
||||
'Awards Main' => 'admin/awards.php'
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
function award_download(id)
|
||||
{
|
||||
function award_download(id) {
|
||||
if (id == -1) return false;
|
||||
$("#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>
|
||||
<tr><th><?= i18n('Source Name') ?></th>
|
||||
<table class="tableview">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= i18n('Source Name') ?></th>
|
||||
<th><?= i18n('Source Location URL') ?></th>
|
||||
<th><?= i18n('Check') ?></th>
|
||||
</tr></thead>
|
||||
</tr>
|
||||
</thead>
|
||||
<?
|
||||
|
||||
$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
|
||||
* SFIAB Website: http://www.sfiab.ca
|
||||
* Science-ation Website: https://science-ation.ca/
|
||||
*
|
||||
* Copyright (C) 2007 James Grant <james@lightbox.org>
|
||||
*
|
||||
@ -33,7 +33,8 @@ function get_winners($awardid, $fairs_id)
|
||||
global $config, $pdo;
|
||||
|
||||
/* 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',
|
||||
'schoollevel' => 'schoollevel',
|
||||
'board' => 'board',
|
||||
@ -44,13 +45,15 @@ function get_winners($awardid, $fairs_id)
|
||||
'city' => 'city',
|
||||
'province_code' => 'province_code',
|
||||
'postalcode' => 'postalcode',
|
||||
'schoolemail' => 'schoolemail');
|
||||
'schoolemail' => 'schoolemail'
|
||||
);
|
||||
/* 'principal'=>'principal',
|
||||
'sciencehead'=>'sciencehead',
|
||||
'scienceheademail'=>'scienceheademail',
|
||||
'scienceheadphone'=>'scienceheadphone');*/
|
||||
|
||||
$student_fields = array('firstname' => 'firstname',
|
||||
$student_fields = array(
|
||||
'firstname' => 'firstname',
|
||||
'lastname' => 'lastname',
|
||||
'email' => 'email',
|
||||
'gender' => 'sex',
|
||||
@ -63,7 +66,8 @@ function get_winners($awardid, $fairs_id)
|
||||
'postalcode' => 'postalcode',
|
||||
'phone' => 'phone',
|
||||
'teachername' => 'teachername',
|
||||
'teacheremail' => 'teacheremail');
|
||||
'teacheremail' => 'teacheremail'
|
||||
);
|
||||
|
||||
$awards = array();
|
||||
if ($awardid == -1) {
|
||||
@ -100,11 +104,13 @@ function get_winners($awardid, $fairs_id)
|
||||
$divmap = unserialize($fair['divmap']);
|
||||
|
||||
foreach ($awards as $award) {
|
||||
$winners = array('id' => $award['id'],
|
||||
$winners = array(
|
||||
'id' => $award['id'],
|
||||
'award_name' => $award['name'],
|
||||
'external_identifier' => $award['external_identifier'],
|
||||
'year' => $config['FAIRYEAR'],
|
||||
'prizes' => array());
|
||||
'prizes' => array()
|
||||
);
|
||||
|
||||
if ($fair['type'] != 'sfiab') {
|
||||
/* YSC Compatability */
|
||||
@ -146,8 +152,10 @@ function get_winners($awardid, $fairs_id)
|
||||
$school[$k] = $schoolr[$v];
|
||||
|
||||
/* Pack up the student data too */
|
||||
$student = array('xml_type' => 'student', /* for ysc compatability */
|
||||
'school' => $school);
|
||||
$student = array(
|
||||
'xml_type' => 'student', /* for ysc compatability */
|
||||
'school' => $school
|
||||
);
|
||||
foreach ($student_fields as $k => $v)
|
||||
$student[$k] = $s[$v];
|
||||
|
||||
@ -158,7 +166,8 @@ function get_winners($awardid, $fairs_id)
|
||||
$div_id = $divmap[$project['projectdivisions_id']];
|
||||
|
||||
/* Save the project info => students */
|
||||
$prizewinners[] = array('xml_type' => 'project', /* for ysc compatability */
|
||||
$prizewinners[] = array(
|
||||
'xml_type' => 'project', /* for ysc compatability */
|
||||
'projectid' => $project['id'],
|
||||
'projectnumber' => $project['projectnumber'],
|
||||
'title' => $project['title'],
|
||||
@ -167,7 +176,8 @@ function get_winners($awardid, $fairs_id)
|
||||
'projectcategories_id' => $cat_id,
|
||||
'projectdivisions_id' => $div_id,
|
||||
'client_projectdivisions_id' => $project['projectdivisions_id'],
|
||||
'students' => $students);
|
||||
'students' => $students
|
||||
);
|
||||
}
|
||||
/* Save the prize info => projects */
|
||||
$winners['prizes'][$prize['prize']] = array(
|
||||
@ -243,8 +253,10 @@ function load_server_cats_divs($fairs_id)
|
||||
$q->execute();
|
||||
$fair = $q->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
$req = array('get_categories' => array('year' => $config['FAIRYEAR']),
|
||||
'get_divisions' => array('year' => $config['FAIRYEAR']));
|
||||
$req = array(
|
||||
'get_categories' => array('year' => $config['FAIRYEAR']),
|
||||
'get_divisions' => array('year' => $config['FAIRYEAR'])
|
||||
);
|
||||
$data = curl_query($fair, $req);
|
||||
|
||||
/* 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 ?>" />
|
||||
|
||||
<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) {
|
||||
@ -432,7 +447,7 @@ switch (get_value_from_array($_GET, 'action')) {
|
||||
// $cat[intval($key)] = intval($c);
|
||||
// }
|
||||
$div = array();
|
||||
foreach ($_POST['div'] AS $key => $d) {
|
||||
foreach ($_POST['div'] as $key => $d) {
|
||||
$div[intval($key)] = intval($d);
|
||||
}
|
||||
|
||||
@ -516,7 +531,8 @@ switch (get_value_from_array($_GET, 'action')) {
|
||||
continue;
|
||||
}
|
||||
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 />
|
||||
<?
|
||||
$highest_grade = 0;
|
||||
@ -549,12 +565,14 @@ switch (get_value_from_array($_GET, 'action')) {
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</tr>
|
||||
<?
|
||||
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'] ?>]">
|
||||
<?
|
||||
$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 ?>" />
|
||||
</td>
|
||||
</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>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
?> </table>
|
||||
</td></tr>
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
}
|
||||
@ -581,33 +602,33 @@ switch (get_value_from_array($_GET, 'action')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
send_header('Award Upload',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Award Upload',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Awards Main' => 'admin/awards.php'));
|
||||
'Awards Main' => 'admin/awards.php'
|
||||
)
|
||||
);
|
||||
echo '<br />';
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
var fairs_id = -1;
|
||||
var award_awards_id = -1;
|
||||
|
||||
function catdiv_save()
|
||||
{
|
||||
function catdiv_save() {
|
||||
$("#debug").load("<?= $_SERVER['PHP_SELF'] ?>?action=catdiv_save",
|
||||
$('#catdiv_form').serializeArray());
|
||||
return false;
|
||||
}
|
||||
|
||||
function popup_upload_load()
|
||||
{
|
||||
function popup_upload_load() {
|
||||
var ids = "&id=" + award_awards_id + "&fairs_id=" + fairs_id;
|
||||
$("#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 h = (document.documentElement.clientHeight * 0.8);
|
||||
|
||||
@ -626,8 +647,7 @@ function popup_upload(fid,aaid)
|
||||
return true;
|
||||
}
|
||||
|
||||
function popup_divmap(fid)
|
||||
{
|
||||
function popup_divmap(fid) {
|
||||
var w = (document.documentElement.clientWidth * 0.4);
|
||||
var h = (document.documentElement.clientHeight * 0.6);
|
||||
|
||||
@ -646,8 +666,10 @@ function popup_divmap(fid)
|
||||
/* Setup the popup window */
|
||||
$(document).ready(function() {
|
||||
$("#popup_upload").dialog({
|
||||
bgiframe: true, autoOpen: false,
|
||||
modal: true, resizable: false,
|
||||
bgiframe: true,
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
buttons: {
|
||||
"<?= i18n('Cancel') ?>": function() {
|
||||
@ -663,8 +685,10 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
$("#popup_divmap").dialog({
|
||||
bgiframe: true, autoOpen: false,
|
||||
modal: true, resizable: false,
|
||||
bgiframe: true,
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
buttons: {
|
||||
"<?= i18n('Cancel') ?>": function() {
|
||||
@ -672,7 +696,8 @@ $(document).ready(function() {
|
||||
},
|
||||
"<?= i18n('Save Mappings') ?>": function() {
|
||||
$("#debug").load("<?= $_SERVER['PHP_SELF'] ?>?action=catdiv_save",
|
||||
$('#catdiv_form').serializeArray(), function() {
|
||||
$('#catdiv_form').serializeArray(),
|
||||
function() {
|
||||
popup_upload_load();
|
||||
}
|
||||
);
|
||||
@ -711,18 +736,22 @@ show_pdo_errors_if_any($pdo);
|
||||
?>
|
||||
<h4><?= i18n('Upload all winners to a source') ?>:</h4>
|
||||
|
||||
<table class="tableview"><thead>
|
||||
<tr><th><?= i18n('Source Name') ?></th>
|
||||
<table class="tableview">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= i18n('Source Name') ?></th>
|
||||
<th><?= i18n('Number of Awards') ?></th>
|
||||
<th><?= i18n('Winners<br />Assigned') ?></th>
|
||||
<th><?= i18n('Send All') ?></th>
|
||||
</tr></thead>
|
||||
</tr>
|
||||
</thead>
|
||||
<?
|
||||
|
||||
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
$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"><?= $count ?></td>
|
||||
<td align="center">
|
||||
@ -755,18 +784,22 @@ show_pdo_errors_if_any($pdo);
|
||||
?>
|
||||
<h4><?= i18n('Upload individual winners to a source') ?>:</h4>
|
||||
|
||||
<table class="tableview"><thead>
|
||||
<tr><th><?= i18n('Award Name') ?></th>
|
||||
<table class="tableview">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= i18n('Award Name') ?></th>
|
||||
<th><?= i18n('Source Name') ?></th>
|
||||
<th><?= i18n('Winners<br />Assigned') ?></th>
|
||||
<th><?= i18n('Send') ?></th>
|
||||
<th><?= i18n('Additional<br />Info') ?></th>
|
||||
</tr></thead>
|
||||
</tr>
|
||||
</thead>
|
||||
<?
|
||||
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
$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 align="center"><?= $count ?></td>
|
||||
<td align="center">
|
||||
@ -777,7 +810,8 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
$onclick = "alert('" . i18n('Assign a winner first') . "');return false;";
|
||||
?>
|
||||
<a href="#" onClick="<?= $onclick ?>"><?= i18n('send') ?></a>
|
||||
</td><td>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<?
|
||||
if ($r->external_additional_materials) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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>
|
||||
*
|
||||
@ -24,7 +24,8 @@
|
||||
<?
|
||||
|
||||
function award_delete($award_awards_id)
|
||||
{ global $pdo;
|
||||
{
|
||||
global $pdo;
|
||||
/* Delete all winners attached to this award */
|
||||
|
||||
$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)
|
||||
{ global $pdo;
|
||||
{
|
||||
global $pdo;
|
||||
$q = $pdo->prepare("DELETE FROM winners WHERE awards_prizes_id='$award_prizes_id'");
|
||||
$q->execute();
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -27,10 +28,14 @@ require ('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
|
||||
send_header('Awards',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'awards_management');
|
||||
send_header(
|
||||
'Awards',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'awards_management'
|
||||
);
|
||||
|
||||
require_once('rerollprizes.php');
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
/*
|
||||
* 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -30,15 +30,21 @@ user_auth_required('committee', 'admin');
|
||||
if (!file_exists('../data/userfiles'))
|
||||
mkdir('../data/userfiles');
|
||||
|
||||
send_header('Website Content Manager',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'website_content_management');
|
||||
send_header(
|
||||
'Website Content Manager',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'website_content_management'
|
||||
);
|
||||
|
||||
?>
|
||||
<div class="element"></div>
|
||||
<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'
|
||||
|
||||
new Editor({
|
||||
@ -56,7 +62,7 @@ new Editor({
|
||||
|
||||
if (get_value_from_array($_POST, 'action') == 'save') {
|
||||
$err = false;
|
||||
foreach ($config['languages'] AS $lang => $langname) {
|
||||
foreach ($config['languages'] as $lang => $langname) {
|
||||
$filename = stripslashes(get_value_from_array($_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 '<tr><td valign="top">';
|
||||
foreach ($config['languages'] AS $lang => $langname) {
|
||||
foreach ($config['languages'] as $lang => $langname) {
|
||||
echo '<table class="tableview" width="100%">';
|
||||
echo '<tr><th colspan="2">';
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* 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']);
|
||||
|
||||
/* Now, start the output for this page */
|
||||
send_header('Committee Management',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'committee_management');
|
||||
send_header(
|
||||
'Committee Management',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'committee_management'
|
||||
);
|
||||
|
||||
$_SESSION['last_page'] = 'committee_management';
|
||||
?>
|
||||
@ -44,15 +49,12 @@ $_SESSION['last_page'] = 'committee_management';
|
||||
|
||||
<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");
|
||||
return false;
|
||||
}
|
||||
|
||||
function neweditor()
|
||||
{
|
||||
function neweditor() {
|
||||
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");
|
||||
document.forms.addmember.add_member.value = "";
|
||||
@ -60,10 +62,8 @@ function neweditor()
|
||||
}
|
||||
|
||||
|
||||
function getElement(e,f)
|
||||
{
|
||||
if(document.layers)
|
||||
{
|
||||
function getElement(e, f) {
|
||||
if (document.layers) {
|
||||
f = (f) ? f : self;
|
||||
if (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
|
||||
{
|
||||
getElement('assigndiv').style.display = 'block';
|
||||
|
||||
}
|
||||
else // edit or delete
|
||||
} else // edit or delete
|
||||
{
|
||||
getElement('assigndiv').style.display = 'none';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function actionSubmit()
|
||||
{
|
||||
if(document.forms.memberaction.action.selectedIndex==0)
|
||||
{
|
||||
function actionSubmit() {
|
||||
if (document.forms.memberaction.action.selectedIndex == 0) {
|
||||
alert('You must choose an action');
|
||||
return false;
|
||||
}
|
||||
if(document.forms.memberaction.users_uid.selectedIndex==0)
|
||||
{
|
||||
if (document.forms.memberaction.users_uid.selectedIndex == 0) {
|
||||
alert('You must choose a member');
|
||||
return false;
|
||||
}
|
||||
@ -120,7 +115,8 @@ function actionSubmit()
|
||||
|
||||
return true;
|
||||
}
|
||||
//-->
|
||||
//
|
||||
-->
|
||||
</script>
|
||||
<?
|
||||
global $uid;
|
||||
@ -366,4 +362,3 @@ if ($q->rowCount()) {
|
||||
|
||||
send_footer();
|
||||
?>
|
||||
|
||||
|
@ -175,4 +175,3 @@ $mailqueries = array(
|
||||
'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"),
|
||||
);
|
||||
?>
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* 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);
|
||||
?>
|
||||
<table class="editor">
|
||||
<tr><td class="label" style="width:15%"><?= i18n('Name') ?>:</td><td class="input"><?= $e['name'] ?></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>
|
||||
<tr>
|
||||
<td class="label" style="width:15%"><?= i18n('Name') ?>:</td>
|
||||
<td class="input"><?= $e['name'] ?></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>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
exit;
|
||||
|
||||
@ -65,7 +79,9 @@ case 'dialog_choose':
|
||||
<div id="comm_dialog_choose" title="Select a Communication" style="display: none">
|
||||
<h4><?= i18n('Select a Communication') ?>:</h4>
|
||||
<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">
|
||||
<option value="-1">-- <?= i18n('Choose a Communication') ?> --</option>
|
||||
<?
|
||||
@ -77,10 +93,13 @@ case 'dialog_choose':
|
||||
}
|
||||
?>
|
||||
</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_cancel_button" type="submit" value="<?= i18n('Cancel') ?>">
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
<div id="comm_dialog_choose_info"></div>
|
||||
<hr />
|
||||
@ -102,8 +121,7 @@ case 'dialog_choose':
|
||||
});
|
||||
|
||||
|
||||
function dialog_choose_change()
|
||||
{
|
||||
function dialog_choose_change() {
|
||||
var sel = $("#comm_dialog_choose_emails_id").val();
|
||||
$("#comm_dialog_choose_info").html("Loading...");
|
||||
$("#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({
|
||||
bgiframe: true, autoOpen: true,
|
||||
modal: true, resizable: false,
|
||||
bgiframe: true,
|
||||
autoOpen: true,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
width: 700, //(document.documentElement.clientWidth * 0.8);
|
||||
height: (document.documentElement.clientHeight * 0.8),
|
||||
@ -136,7 +156,6 @@ case 'dialog_choose':
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<?
|
||||
exit;
|
||||
@ -296,21 +315,31 @@ case 'dialog_edit':
|
||||
<tr>
|
||||
<td class="label"><?= i18n('Description') ?>:</td>
|
||||
<td class="input"><input type="text" name="description" size="60" value="<?= $description ?>" /></td>
|
||||
</tr><tr>
|
||||
<tr><td colspan="2"><hr /></td>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<hr />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><?= i18n('From Address') ?>:</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="input"><input type="text" name="subject" size="60" value="<?= $subject ?>" /></td>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="input">
|
||||
<table width="100%"><tr><td width="85%">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="85%">
|
||||
<div id="fck">
|
||||
<textarea id="bodyhtml" name="bodyhtml" rows=6 cols=80><?= $bodyhtml ?></textarea>
|
||||
</div>
|
||||
</td><td width="15%">
|
||||
</td>
|
||||
<td width="15%">
|
||||
<select id="comm_dialog_insert_field" name="insert_field" size="20" style="height:300">
|
||||
<option value="EMAIL">[EMAIL]</option>
|
||||
<option value="FAIRNAME">[FAIRNAME]</option>
|
||||
@ -324,9 +353,12 @@ case 'dialog_edit':
|
||||
<option value="URLLOGIN">[URLLOGIN]</option>
|
||||
<option value="ACCESSCODE" title="School Access Code">[ACCESSCODE]</option>
|
||||
</select>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr></table>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
<div align="right">
|
||||
<input type="submit" id="comm_dialog_edit_save_button" value="<?= i18n('Save') ?>" />
|
||||
@ -347,17 +379,17 @@ case 'dialog_edit':
|
||||
$('#comm_dialog_edit').dialog("close");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
);
|
||||
});
|
||||
$("#comm_dialog_edit_cancel_button").click(function() {
|
||||
$('#comm_dialog_edit').dialog("close");
|
||||
return false;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$("#comm_dialog_edit").dialog({
|
||||
bgiframe: true, autoOpen: true,
|
||||
modal: true, resizable: false,
|
||||
bgiframe: true,
|
||||
autoOpen: true,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
width: 800, //(document.documentElement.clientWidth * 0.8);
|
||||
height: (document.documentElement.clientHeight * 0.8),
|
||||
@ -386,8 +418,7 @@ case 'dialog_edit':
|
||||
var value = oFCKeditor.GetHTML();
|
||||
oFCKeditor.InsertHtml("[" + this.value + "]");
|
||||
return false;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
var oFCKeditor = new FCKeditor('bodyhtml');
|
||||
@ -464,7 +495,10 @@ case 'dialog_send':
|
||||
$(".comm_dialog_send_send_button").click(function() {
|
||||
$("#comm_dialog_send_info").hide();
|
||||
$("#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_status").show();
|
||||
});
|
||||
@ -489,8 +523,10 @@ case 'dialog_send':
|
||||
});
|
||||
|
||||
$("#comm_dialog_send").dialog({
|
||||
bgiframe: true, autoOpen: true,
|
||||
modal: true, resizable: false,
|
||||
bgiframe: true,
|
||||
autoOpen: true,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
width: 600, //(document.documentElement.clientWidth * 0.8);
|
||||
close: function() {
|
||||
@ -502,7 +538,6 @@ case 'dialog_send':
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<?
|
||||
exit;
|
||||
@ -551,19 +586,23 @@ case 'dialog_sender':
|
||||
<tr>
|
||||
<td class="label"><?= i18n('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="input"><input type="text" name="to" size="60" value="<?= $to ?>" /></td>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><?= i18n('Subject') ?>:</td>
|
||||
<td class="input"><input type="text" name="subject" size="60" value="<?= $subject ?>" /></td>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="input">
|
||||
<div id="fck">
|
||||
<textarea id="bodyhtml" name="bodyhtml" rows=6 cols=80><?= $bodyhtml ?></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr></table>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
<div align="right">
|
||||
<input type="submit" id="comm_dialog_sender_send_button" value="<?= i18n('Send') ?>" />
|
||||
@ -582,17 +621,17 @@ case 'dialog_sender':
|
||||
$('#comm_dialog_sender').dialog("close");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
);
|
||||
});
|
||||
$("#comm_dialog_sender_cancel_button").click(function() {
|
||||
$('#comm_dialog_sender').dialog("close");
|
||||
return false;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$("#comm_dialog_sender").dialog({
|
||||
bgiframe: true, autoOpen: true,
|
||||
modal: true, resizable: false,
|
||||
bgiframe: true,
|
||||
autoOpen: true,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
width: 800, //(document.documentElement.clientWidth * 0.8);
|
||||
close: function() {
|
||||
@ -762,10 +801,14 @@ if (get_value_from_array($_GET, 'action') == 'sendqueue') {
|
||||
launchQueue();
|
||||
exit;
|
||||
}
|
||||
send_header('Communication',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'communication');
|
||||
send_header(
|
||||
'Communication',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'communication'
|
||||
);
|
||||
echo '<br />';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
@ -779,6 +822,7 @@ echo '<br />';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function loadAddresses() {
|
||||
$("#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 ' <option value="">Choose Email Recipients</option>';
|
||||
$str = '';
|
||||
foreach ($mailqueries AS $k => $mq) {
|
||||
foreach ($mailqueries as $k => $mq) {
|
||||
$tq = $pdo->prepare($mq['query']);
|
||||
|
||||
$tq->execute();
|
||||
@ -982,8 +1026,7 @@ if (get_value_from_array($_GET, 'action') == 'send' && get_value_from_array($_GE
|
||||
}
|
||||
$(document).ready(function() {
|
||||
refreshEmailList();
|
||||
}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
<?
|
||||
}
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -120,16 +121,21 @@ if (get_value_from_array($_GET, 'action') == 'status') {
|
||||
exit;
|
||||
}
|
||||
|
||||
send_header('Communication Sending Status',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Communication Sending Status',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Communication' => 'admin/communication.php'));
|
||||
'Communication' => 'admin/communication.php'
|
||||
)
|
||||
);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
refreshStatus();
|
||||
});
|
||||
var refreshTimeout;
|
||||
|
||||
function refreshStatus() {
|
||||
$("#queuestatus").load("communication_send_status.php?action=status", null, function() {
|
||||
<? if ($config['emailqueue_lock']) { ?>
|
||||
@ -146,9 +152,10 @@ send_header('Communication Sending Status',
|
||||
}
|
||||
|
||||
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>
|
||||
<?
|
||||
echo '<br />';
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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) 2009 David Grant <dave@lightbox.org>
|
||||
@ -66,8 +66,10 @@ function curl_query($fair, $data, $ysc_url = '')
|
||||
$url = $fair['url'] . '/remote.php';
|
||||
$var = 'json';
|
||||
$d = array();
|
||||
$d['auth'] = array('username' => $fair['username'],
|
||||
'password' => $fair['password']);
|
||||
$d['auth'] = array(
|
||||
'username' => $fair['username'],
|
||||
'password' => $fair['password']
|
||||
);
|
||||
$str = json_encode(array_merge($d, $data));
|
||||
break;
|
||||
case 'ysc':
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -119,14 +120,18 @@ function get_cwsf_award_winners()
|
||||
require('../common.inc.php');
|
||||
require('../projects.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
send_header('One-Click CWSF Registration',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'one-click_cwsf_registration');
|
||||
send_header(
|
||||
'One-Click CWSF Registration',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'one-click_cwsf_registration'
|
||||
);
|
||||
echo '<br />';
|
||||
|
||||
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->execute([$d, $p]);
|
||||
}
|
||||
@ -207,13 +212,13 @@ if ($ok) {
|
||||
echo '<th>' . i18n('Project Division / CWSF Project Division') . '</th>';
|
||||
echo '</tr></thead>';
|
||||
|
||||
foreach ($winners AS $winner) {
|
||||
foreach ($winners as $winner) {
|
||||
echo '<tr><td>';
|
||||
echo '<b>';
|
||||
echo $winner['projectnumber'] . ' - ' . $winner['title'];
|
||||
echo '</b>';
|
||||
echo '<br />';
|
||||
foreach ($winner['students'] AS $s) {
|
||||
foreach ($winner['students'] as $s) {
|
||||
echo ' ';
|
||||
echo ' ';
|
||||
echo ' ';
|
||||
@ -261,7 +266,7 @@ if ($ok) {
|
||||
|
||||
echo '<select name="cwsfdivision[' . $winner['projectid'] . ']">';
|
||||
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 ($k == $winner['division_id'])
|
||||
$sel = 'selected="selected"';
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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>
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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>
|
||||
*
|
||||
@ -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");
|
||||
|
||||
user_auth_required('committee', 'admin');
|
||||
send_header('Internal Document Manager',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'internal_document_management');
|
||||
send_header(
|
||||
'Internal Document Manager',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'internal_document_management'
|
||||
);
|
||||
|
||||
$editor = new TableEditor('documents',
|
||||
$editor = new TableEditor(
|
||||
'documents',
|
||||
array(
|
||||
'date' => 'Date',
|
||||
'title' => 'Document Title',
|
||||
'sel_category' => 'Category',
|
||||
'filename' => 'Filename',
|
||||
));
|
||||
)
|
||||
);
|
||||
|
||||
$editor->setPrimaryKey('id');
|
||||
$editor->setUploadPath('../data/documents');
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
/*
|
||||
* 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
|
||||
* 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_main.inc.php');
|
||||
|
||||
send_header('Donations',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Donations',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Fundraising' => 'admin/fundraising.php'),
|
||||
'fundraising');
|
||||
'Fundraising' => 'admin/fundraising.php'
|
||||
),
|
||||
'fundraising'
|
||||
);
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
//initialize the dialog
|
||||
$("#sponsorship_editor").dialog({
|
||||
bgiframe: true, autoOpen: false,
|
||||
modal: true, resizable: false,
|
||||
bgiframe: true,
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
draggable: false
|
||||
});
|
||||
|
||||
$("#fund_editor").dialog({
|
||||
bgiframe: true, autoOpen: false,
|
||||
modal: true, resizable: falsefundraising,
|
||||
bgiframe: true,
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
resizable: falsefundraising,
|
||||
draggable: false
|
||||
});
|
||||
|
||||
@ -66,8 +74,14 @@ function popup_sponsorship_editor(url) {
|
||||
var h = (document.documentElement.clientHeight * 0.6);
|
||||
$('#sponsorship_editor').dialog('option','height',h);
|
||||
*/
|
||||
$('#sponsorship_editor').dialog('option','buttons',{ "<?= i18n('Save') ?>": function() { save_sponsorship(); },
|
||||
"<?= i18n('Cancel') ?>": function(){ $(this).dialog("close");}});
|
||||
$('#sponsorship_editor').dialog('option', 'buttons', {
|
||||
"<?= i18n('Save') ?>": function() {
|
||||
save_sponsorship();
|
||||
},
|
||||
"<?= i18n('Cancel') ?>": function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
});
|
||||
$('#sponsorship_editor').dialog('open');
|
||||
|
||||
$('#sponsorship_editor_content').load(url);
|
||||
@ -93,8 +107,14 @@ function popup_fund_editor(url) {
|
||||
var h = (document.documentElement.clientHeight * 0.6);
|
||||
$('#fund_editor').dialog('option','height',h);
|
||||
*/
|
||||
$('#fund_editor').dialog('option','buttons',{ "<?= i18n('Save') ?>": function() { save_fund(); },
|
||||
"<?= i18n('Cancel') ?>": function(){ $(this).dialog("close");}});
|
||||
$('#fund_editor').dialog('option', 'buttons', {
|
||||
"<?= i18n('Save') ?>": function() {
|
||||
save_fund();
|
||||
},
|
||||
"<?= i18n('Cancel') ?>": function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
});
|
||||
$('#fund_editor').dialog('open');
|
||||
|
||||
$('#fund_editor_content').load(url);
|
||||
@ -114,8 +134,10 @@ function save_fund() {
|
||||
|
||||
function delete_fund(id) {
|
||||
if (confirmClick('Are you sure you want to remove this fund?')) {
|
||||
$('#debug').load("<?= $config['SFIABDIRECTORY'] ?>/admin/fundraising.php",
|
||||
{ action: 'funddelete', delete: id },
|
||||
$('#debug').load("<?= $config['SFIABDIRECTORY'] ?>/admin/fundraising.php", {
|
||||
action: 'funddelete',
|
||||
delete: id
|
||||
},
|
||||
function() {
|
||||
refresh_fundraising_table();
|
||||
}
|
||||
@ -126,8 +148,10 @@ function delete_fund(id) {
|
||||
|
||||
function delete_sponsorship(id) {
|
||||
if (confirmClick('Are you sure you want to remove this sponsorship?')) {
|
||||
$('#debug').load("<?= $config['SFIABDIRECTORY'] ?>/admin/fundraising.php",
|
||||
{ action: 'sponsorshipdelete', delete: id },
|
||||
$('#debug').load("<?= $config['SFIABDIRECTORY'] ?>/admin/fundraising.php", {
|
||||
action: 'sponsorshipdelete',
|
||||
delete: id
|
||||
},
|
||||
function() {
|
||||
refresh_fundraising_table();
|
||||
}
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
/*
|
||||
* 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) 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
|
||||
* 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
|
||||
* 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) 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
|
||||
* 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
|
||||
if (count(get_value_from_array($_POST, 'donortype', []))) {
|
||||
$sql .= ' AND (0 ';
|
||||
foreach ($_POST['donortype'] AS $d) {
|
||||
foreach ($_POST['donortype'] as $d) {
|
||||
$sql .= " OR donortype='$d'";
|
||||
}
|
||||
$sql .= ') ';
|
||||
@ -69,7 +69,7 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
$thisyearsort = array();
|
||||
if (!get_value_from_array($_POST, 'order')) {
|
||||
// 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'];
|
||||
}
|
||||
array_multisort($thisyearsort, SORT_DESC, $rows);
|
||||
@ -93,7 +93,7 @@ echo '</tr>';
|
||||
echo "</thead>\n";
|
||||
|
||||
$x = 0;
|
||||
foreach ($rows AS $r) {
|
||||
foreach ($rows as $r) {
|
||||
echo "<tr>\n";
|
||||
$eh = "style=\"cursor:pointer;\" onclick=\"open_editor({$r['id']});\"";
|
||||
echo " <td $eh>{$r['name']}</td>\n";
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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>
|
||||
*
|
||||
@ -308,10 +308,14 @@ foreach ($exhibithall as &$i_eh) {
|
||||
$i_eh['grid_h'] = $iy + 1;
|
||||
/* Initialize element if required */
|
||||
if (!is_array($i_eh[$ix][$iy])) {
|
||||
$i_eh[$ix][$iy] = array('x' => $x, 'ix' => $ix,
|
||||
'y' => $y, 'iy' => $iy,
|
||||
$i_eh[$ix][$iy] = array(
|
||||
'x' => $x,
|
||||
'ix' => $ix,
|
||||
'y' => $y,
|
||||
'iy' => $iy,
|
||||
'ids' => array(),
|
||||
'project_front' => 0);
|
||||
'project_front' => 0
|
||||
);
|
||||
}
|
||||
|
||||
/* Scan all objects */
|
||||
@ -604,8 +608,14 @@ $project_ids = array_keys($projects);
|
||||
|
||||
// array_splice($project_ids, 20);
|
||||
|
||||
$a = new annealer(count($floor_objects), 125, $e, 0.9,
|
||||
project_cost, $project_ids);
|
||||
$a = new annealer(
|
||||
count($floor_objects),
|
||||
125,
|
||||
$e,
|
||||
0.9,
|
||||
project_cost,
|
||||
$project_ids
|
||||
);
|
||||
$a->set_max_items_per_bucket(1);
|
||||
// $a->set_delta_cost_bucket_ids_callback(project_bucket_ids);
|
||||
$a->anneal();
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* 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->execute();
|
||||
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),
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||
);
|
||||
|
||||
$pdf->newPage();
|
||||
$pdf->setFontSize(11);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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) 2009 David Grant <dave@lightbox.org>
|
||||
@ -65,10 +65,14 @@ function stats_to_ysc($fair, $stats)
|
||||
return $stats;
|
||||
}
|
||||
|
||||
send_header('Upload Fair Statistics and Information',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'fair_stats');
|
||||
send_header(
|
||||
'Upload Fair Statistics and Information',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'fair_stats'
|
||||
);
|
||||
echo '<br />';
|
||||
|
||||
/* SFIAB config options server side */
|
||||
@ -121,8 +125,11 @@ if ($action == 'sendstats') {
|
||||
}
|
||||
|
||||
if (function_exists('curl_init')) {
|
||||
$r = curl_query($fair, $req,
|
||||
'https://secure.ysf-fsj.ca/registration/xmlaffiliation.php');
|
||||
$r = curl_query(
|
||||
$fair,
|
||||
$req,
|
||||
'https://secure.ysf-fsj.ca/registration/xmlaffiliation.php'
|
||||
);
|
||||
if ($r['error'] == 0)
|
||||
echo happy(i18n('The %1 Server said:', array($fair['name'])) . ' ' . $r['message']);
|
||||
else
|
||||
@ -271,8 +278,21 @@ $stats['students_total'] = $q->rowCount();
|
||||
$stats['students_public'] = 0;
|
||||
$stats['students_private'] = 0;
|
||||
$stats['students_atrisk'] = 0;
|
||||
$grademap = array(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);
|
||||
$grademap = array(
|
||||
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) {
|
||||
$stats["male_$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 '<br />';
|
||||
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 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 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 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
|
||||
SFIAB Website: http://www.sfiab.ca
|
||||
Science-ation Website: https://science-ation.ca/
|
||||
|
||||
Copyright (C) 2009 David Grant <dave@lightbox.org>
|
||||
|
||||
@ -26,7 +26,8 @@
|
||||
require_once('../fair.inc.php');
|
||||
|
||||
$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',
|
||||
'minorities' => 'Data on minority group participation',
|
||||
'guests' => 'Number of student, public guests',
|
||||
@ -58,7 +59,6 @@
|
||||
echo "UPDATE fairs SET gather_stats='$s' WHERE id='$id'";
|
||||
happy_("Saved");
|
||||
exit;
|
||||
|
||||
}
|
||||
/* Load the user we're editting */
|
||||
$u = user_load($_SESSION['embed_edit_id']);
|
||||
@ -72,13 +72,10 @@
|
||||
<h4><?= i18n('Fair Stats Gathering') ?></h3>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function stats_save()
|
||||
{
|
||||
function stats_save() {
|
||||
$("#debug").load("fair_stats_select.php?action=save", $("#gather_stats").serializeArray());
|
||||
return 0;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?
|
||||
@ -106,6 +103,3 @@ function stats_save()
|
||||
<br />
|
||||
<input type="submit" onClick="stats_save();return false;" value="Save" />
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
@ -22,5 +22,3 @@ while ($i = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
$stmt->execute([$id, $config['FAIRYEAR']]);
|
||||
show_pdo_errors_if_any($pdo);
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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>
|
||||
*
|
||||
@ -121,7 +121,9 @@ if (get_value_from_array($_GET, 'action') == 'refresh') {
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<script type="text/javascript"> $('.tableview').tablesorter();</script>
|
||||
<script type="text/javascript">
|
||||
$('.tableview').tablesorter();
|
||||
</script>
|
||||
<br />
|
||||
|
||||
<form id="thankyouform" method="post" action="fundraising.php">
|
||||
@ -279,17 +281,21 @@ if (get_value_from_array($_GET, 'action') == 'refresh') {
|
||||
|
||||
exit;
|
||||
} 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->execute();
|
||||
}
|
||||
}
|
||||
|
||||
send_header('Fundraising',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Fundraising',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Fundraising' => 'admin/fundraising.php'),
|
||||
'fundraising');
|
||||
'Fundraising' => 'admin/fundraising.php'
|
||||
),
|
||||
'fundraising'
|
||||
);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
@ -309,11 +315,9 @@ function thanked() {
|
||||
//key is initial or followup
|
||||
//start is either 'new' to start with a blank, or 'existing' to load an existing email to start from
|
||||
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;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div id="dashboard"></div>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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>
|
||||
*
|
||||
@ -45,9 +45,11 @@ switch (get_value_from_array($_GET, 'action')) {
|
||||
echo "<table>\n";
|
||||
display_campaign_form($r);
|
||||
?>
|
||||
<tr><td colspan="6" style="text-align: center;">
|
||||
<tr>
|
||||
<td colspan="6" style="text-align: center;">
|
||||
<br />
|
||||
<input type="submit" value="<?= i18n('Save Appeal') ?>"></td>
|
||||
<input type="submit" value="<?= i18n('Save Appeal') ?>">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
@ -63,9 +65,11 @@ switch (get_value_from_array($_GET, 'action')) {
|
||||
<?
|
||||
display_campaign_form();
|
||||
?>
|
||||
<tr><td colspan="6" style="text-align: center;">
|
||||
<tr>
|
||||
<td colspan="6" style="text-align: center;">
|
||||
<br />
|
||||
<input type="submit" value="<?= i18n('Create Appeal') ?>"></td>
|
||||
<input type="submit" value="<?= i18n('Create Appeal') ?>">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
@ -127,7 +131,9 @@ case 'managelist':
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<script type="text/javascript"> $('.tableview').tablesorter();</script>
|
||||
<script type="text/javascript">
|
||||
$('.tableview').tablesorter();
|
||||
</script>
|
||||
<br />
|
||||
<?
|
||||
exit;
|
||||
@ -268,7 +274,7 @@ case 'managelist':
|
||||
echo '<tr><td>' . i18n('Donor Type') . '</td><td>' . i18n(ucfirst($params['donortype'])) . "</td></tr>\n";
|
||||
if (is_array($params['donationhistory'])) {
|
||||
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 "</td></tr>\n";
|
||||
@ -277,20 +283,20 @@ case 'managelist':
|
||||
// echo "</td></tr>\n";
|
||||
if (is_array($params['emailaddress'])) {
|
||||
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 "</td></tr>\n";
|
||||
}
|
||||
if ($params['donortype'] == 'individual' && is_array($params['individual_type'])) {
|
||||
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 "</td></tr>\n";
|
||||
} else if (is_array($params['contacttype'])) {
|
||||
echo '<tr><td>' . i18n('Role') . '</td><td>';
|
||||
foreach ($params['contacttype'] AS $e) {
|
||||
foreach ($params['contacttype'] as $e) {
|
||||
echo i18n(ucfirst($e)) . '<br />';
|
||||
}
|
||||
echo "</td></tr>\n";
|
||||
@ -342,22 +348,30 @@ case 'managelist':
|
||||
<form id="prospectform" onsubmit="return prospect_generatelist()">
|
||||
<input type="hidden" name="fundraising_campaigns_id" value="<?= $campaign_id ?>" />
|
||||
<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="individual" onchange="donortypechange()"><?= i18n('Individual') ?></label><br />
|
||||
</td></tr>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="prospect_common" style="display: none;">
|
||||
<hr />
|
||||
<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";
|
||||
}
|
||||
?>
|
||||
</td></tr>
|
||||
<tr><td><?= i18n('Donation Level') ?>:</td><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->execute();
|
||||
@ -366,35 +380,47 @@ case 'managelist':
|
||||
}
|
||||
echo '(disabled until the logic requirements can be established)';
|
||||
?>
|
||||
</td></tr>
|
||||
<tr><td><?= i18n('Email Address') ?>:</td><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";
|
||||
}
|
||||
?>
|
||||
</td></tr>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="prospect_individual" style="display: none;">
|
||||
<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";
|
||||
}
|
||||
?>
|
||||
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="prospect_organization" style="display: none;">
|
||||
<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="secondary"><?= i18n('Secondary contacts') ?></label><br />
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
@ -412,8 +438,10 @@ case 'managelist':
|
||||
$q->execute();
|
||||
if ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
}
|
||||
$communications = array('initial' => 'Initial Communication',
|
||||
'followup' => 'Follow-Up Communication');
|
||||
$communications = array(
|
||||
'initial' => 'Initial Communication',
|
||||
'followup' => 'Follow-Up Communication'
|
||||
);
|
||||
|
||||
foreach ($communications as $key => $name) {
|
||||
echo '<h4>' . i18n($name) . "</h4>\n";
|
||||
@ -545,11 +573,15 @@ function save_campaign_info()
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
send_header('Appeal Management',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Appeal Management',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Fundraising' => 'admin/fundraising.php'),
|
||||
'fundraising');
|
||||
'Fundraising' => 'admin/fundraising.php'
|
||||
),
|
||||
'fundraising'
|
||||
);
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
@ -565,19 +597,25 @@ $(document).ready(function() {
|
||||
|
||||
function modifycampaigns() {
|
||||
$("#campaigndiv").show();
|
||||
$("#campaigndiv").load("<? $_SERVER['PHP_SELF'] ?>?action=modify", null, function() {modifycampaignsfinish();});
|
||||
$("#campaigndiv").load("<? $_SERVER['PHP_SELF'] ?>?action=modify", null, function() {
|
||||
modifycampaignsfinish();
|
||||
});
|
||||
}
|
||||
|
||||
function managecampaigns() {
|
||||
$("#campaigndiv").show();
|
||||
$("#campaigndiv").load("<? $_SERVER['PHP_SELF'] ?>?action=managelist", null, function() {managecampaignsfinish();});
|
||||
$("#campaigndiv").load("<? $_SERVER['PHP_SELF'] ?>?action=managelist", null, function() {
|
||||
managecampaignsfinish();
|
||||
});
|
||||
}
|
||||
|
||||
var currentcampaignid;
|
||||
|
||||
function managecampaign(id) {
|
||||
$("#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;
|
||||
}
|
||||
|
||||
@ -606,7 +644,8 @@ function managecampaignfinish() {
|
||||
},
|
||||
|
||||
selected: 0
|
||||
});}
|
||||
});
|
||||
}
|
||||
|
||||
// function managecampaignfinish() {
|
||||
// $("#campaign_tabs").tabs({
|
||||
@ -634,9 +673,13 @@ function managecampaignfinish() {
|
||||
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 (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 {
|
||||
$("#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;
|
||||
}
|
||||
@ -644,16 +687,21 @@ function campaigninfo_save(id) {
|
||||
function update_tab_overview() {
|
||||
$("#campaign_tab_overview").load("<? $_SERVER['PHP_SELF'] ?>?action=manage_tab_overview&id=" + currentcampaignid);
|
||||
}
|
||||
|
||||
function update_tab_donations() {
|
||||
$("#campaign_tab_donations").load(
|
||||
"<? $_SERVER['PHP_SELF'] ?>?action=manage_tab_donations&id=" + currentcampaignid,
|
||||
null,
|
||||
function(){$('.tableview').tablesorter();}
|
||||
function() {
|
||||
$('.tableview').tablesorter();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function update_tab_prospects() {
|
||||
$("#campaign_tab_prospects").load("<? $_SERVER['PHP_SELF'] ?>?action=manage_tab_prospects&id=" + currentcampaignid);
|
||||
}
|
||||
|
||||
function update_tab_communications() {
|
||||
$("#campaign_tab_communications").load("<? $_SERVER['PHP_SELF'] ?>?action=manage_tab_communications&id=" + currentcampaignid);
|
||||
}
|
||||
@ -663,13 +711,11 @@ function donortypechange() {
|
||||
$("#prospect_common").show('slow');
|
||||
$("#prospect_organization").show('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_organization").hide('slow');
|
||||
$("#prospect_individual").show('slow');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$("#prospect_common").hide('slow');
|
||||
}
|
||||
prospect_search();
|
||||
@ -702,15 +748,17 @@ function prospect_removeall() {
|
||||
}
|
||||
|
||||
var comm_chooser_key = null;
|
||||
|
||||
function opencommunicationchooser(key) {
|
||||
comm_chooser_key = key;
|
||||
$("#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) {
|
||||
$("#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();
|
||||
});
|
||||
return false;
|
||||
@ -721,8 +769,7 @@ function comm_dialog_choose_select(id) {
|
||||
//get rid of hte html
|
||||
var key = comm_chooser_key;
|
||||
$("#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() {
|
||||
@ -741,8 +788,7 @@ function comm_dialog_edit_cancel() {
|
||||
function opensendlabelsdialog(reports_id, fcid) {
|
||||
$("#dialog").empty();
|
||||
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) {
|
||||
@ -755,10 +801,8 @@ function opensendmaildialog(fcid,key) {
|
||||
|
||||
function opensendemaildialog(fcid, emails_id) {
|
||||
$("#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>
|
||||
|
||||
<?
|
||||
@ -772,11 +816,12 @@ function display_campaign_form($r = null)
|
||||
<tr>
|
||||
<td><?= i18n('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">
|
||||
<option value=""><?= i18n('Choose') ?></option>
|
||||
<?
|
||||
foreach ($campaign_types AS $ct) {
|
||||
foreach ($campaign_types as $ct) {
|
||||
if ($r->type == $ct)
|
||||
$sel = 'selected="selected"';
|
||||
else
|
||||
@ -794,13 +839,18 @@ function display_campaign_form($r = null)
|
||||
$sd = date('Y-m-d');
|
||||
?>
|
||||
<tr>
|
||||
<td><?= i18n('Start Date') ?></td><td><input type="text" name="startdate" class="date" value="<?= $sd ?>" /></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>
|
||||
<td><?= i18n('Start Date') ?></td>
|
||||
<td><input type="text" name="startdate" class="date" value="<?= $sd ?>" /></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>
|
||||
<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('Default Purpose') ?></td><td colspan="3">
|
||||
<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('Default Purpose') ?></td>
|
||||
<td colspan="3">
|
||||
<?
|
||||
$fgq = $pdo->prepare("SELECT * FROM fundraising_goals WHERE fiscalyear='{$config['FISCALYEAR']}' ORDER BY name");
|
||||
$fgq->execute();
|
||||
@ -821,11 +871,15 @@ function display_campaign_form($r = null)
|
||||
}
|
||||
?>
|
||||
<table cellspacing=2 width=740 border=0>
|
||||
<tr><td>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" onclick="modifycampaigns()">Create/Modify Appeals</a>
|
||||
</td><td>
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" onclick="managecampaigns()">Appeal Management</a>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
<div id="campaigndiv" 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
|
||||
* SFIAB Website: http://www.sfiab.ca
|
||||
* Science-ation Website: https://science-ation.ca/
|
||||
*
|
||||
* Copyright (C) 2009 James Grant <james@lightbox.org>
|
||||
*
|
||||
@ -43,7 +43,7 @@ if ($_POST['donortype'] == 'organization') {
|
||||
|
||||
$primary = '';
|
||||
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
foreach ($contacttype AS $ct) {
|
||||
foreach ($contacttype as $ct) {
|
||||
switch ($ct) {
|
||||
case 'primary':
|
||||
$primary = 'yes';
|
||||
@ -76,7 +76,7 @@ if ($_POST['donortype'] == 'organization') {
|
||||
else
|
||||
$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";
|
||||
$q = $pdo->prepare($query);
|
||||
$q->execute();
|
||||
@ -99,7 +99,7 @@ if (count($emailaddress) == 1) {
|
||||
$emailavailablelist = array();
|
||||
$emailnotavailablelist = array();
|
||||
|
||||
foreach ($userslist AS $uid => $u) {
|
||||
foreach ($userslist as $uid => $u) {
|
||||
if ($u['email'])
|
||||
$emailavailablelist[$uid] = $u;
|
||||
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
|
||||
// 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']) {
|
||||
$q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id='{$u['sponsors_id']}'");
|
||||
$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
|
||||
// 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']) {
|
||||
$q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id='{$u['sponsors_id']}'");
|
||||
$q->execute();
|
||||
@ -169,7 +169,7 @@ foreach ($pastlist AS $uid => $u) {
|
||||
|
||||
$lastyear = $config['FISCALYEAR'] - 1;
|
||||
|
||||
foreach ($lastyearlist AS $uid => $u) {
|
||||
foreach ($lastyearlist as $uid => $u) {
|
||||
if ($u['sponsors_id']) {
|
||||
$q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id='{$u['sponsors_id']}' AND fiscalyear='$lastyear'");
|
||||
$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']) {
|
||||
$q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id='{$u['sponsors_id']}' AND fiscalyear='{$config['FISCALYEAR']}'");
|
||||
$q->execcute();
|
||||
@ -205,9 +205,9 @@ foreach ($thisyearlist AS $uid => $u) {
|
||||
*/
|
||||
|
||||
$userslist = array();
|
||||
foreach ($donationhistory AS $dh) {
|
||||
foreach ($donationhistory as $dh) {
|
||||
$arr = $dh . 'list';
|
||||
foreach ($$arr AS $uid => $u) {
|
||||
foreach ($$arr as $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->execute();
|
||||
$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->execute();
|
||||
}
|
||||
|
@ -9,5 +9,3 @@ function getGoal($goal)
|
||||
$q->execute();
|
||||
return $q->fetch(PDO::FETCH_OBJ);
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -64,5 +64,3 @@ if ($_POST['action'] == 'fundadd') {
|
||||
error_('MySQL Error: %1', array($pdo->errorInfo()));
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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>
|
||||
*
|
||||
@ -27,26 +27,32 @@ require_once ('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
require('fundraising_common.inc.php');
|
||||
|
||||
send_header('Fundraising Reports',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Fundraising Reports',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Fundraising' => 'admin/fundraising.php'),
|
||||
'fundraising');
|
||||
'Fundraising' => 'admin/fundraising.php'
|
||||
),
|
||||
'fundraising'
|
||||
);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#standardreportsaccordion").accordion();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<h3>Standard Reports</h3>
|
||||
<div id="standardreportsaccordion" style="width: 600px;">
|
||||
<h3><a a href="#">List of Prospects by Appeal</a></h3>
|
||||
<div>
|
||||
<table><tr><td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Choose an appeal:
|
||||
</td><td>
|
||||
</td>
|
||||
<td>
|
||||
<form method=get action="fundraising_reports_std.php">
|
||||
<input type="hidden" name="id" value="1">
|
||||
<select name="fundraising_campaigns_id">
|
||||
@ -59,28 +65,38 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Report Type:
|
||||
</td><td>
|
||||
</td>
|
||||
<td>
|
||||
<select name="type">
|
||||
<!-- FIXME -->
|
||||
<!--<option value="pdf">PDF</option>-->
|
||||
<option value="csv">CSV</option>
|
||||
</select>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" style="text-align: center;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: center;">
|
||||
<input type="submit" value="Generate Report">
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<h3><a href="#">Results of Appeal by Purpose</a></h3>
|
||||
<div>
|
||||
<form method=get action="fundraising_reports_std.php">
|
||||
<input type="hidden" name="id" value="2">
|
||||
<table><tr><td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Choose a Purpose:
|
||||
</td><td>
|
||||
</td>
|
||||
<td>
|
||||
<select name="goal">
|
||||
<option value="">All purposes</option>
|
||||
<?
|
||||
@ -91,19 +107,26 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Report Type:
|
||||
</td><td>
|
||||
</td>
|
||||
<td>
|
||||
<select name="type">
|
||||
<!-- FIXME -->
|
||||
<!--<option value="pdf">PDF</option>-->
|
||||
<option value="csv">CSV</option>
|
||||
</select>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" style="text-align: center;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: center;">
|
||||
<input type="submit" value="Generate Report">
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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>
|
||||
*
|
||||
@ -38,9 +38,11 @@ if ($id && $type) {
|
||||
if ($type == 'csv') {
|
||||
$rep = new lcsv($config['FAIRNAME']);
|
||||
} else if ($type == 'pdf') {
|
||||
$rep = new lpdf(i18n($config['fairname']),
|
||||
$rep = new lpdf(
|
||||
i18n($config['fairname']),
|
||||
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->setFontSize(8);
|
||||
}
|
||||
@ -120,9 +122,11 @@ if ($id && $type) {
|
||||
if ($type == 'csv') {
|
||||
$rep = new lcsv($config['FAIRNAME'], 'Results of Appeal by Purpose', '');
|
||||
} else if ($type == 'pdf') {
|
||||
$rep = new lpdf(i18n($config['fairname']),
|
||||
$rep = new lpdf(
|
||||
i18n($config['fairname']),
|
||||
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->setFontSize(8);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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>
|
||||
*
|
||||
@ -335,10 +335,14 @@ switch (get_value_from_array($_GET, 'action')) {
|
||||
break;
|
||||
}
|
||||
|
||||
send_header('Fundraising Setup',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Fundraising Setup',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Fundraising' => 'admin/fundraising.php'));
|
||||
'Fundraising' => 'admin/fundraising.php'
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
@ -396,14 +400,18 @@ function level_save(id) {
|
||||
if (id) var f = $("#level_form_" + id);
|
||||
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;
|
||||
}
|
||||
|
||||
function level_delete(id) {
|
||||
if (confirmClick('Are you sure you want to delete this fundraising level?')) {
|
||||
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;
|
||||
}
|
||||
@ -414,16 +422,23 @@ function update_goals() {
|
||||
$("#goalaccordion").accordion({
|
||||
heightStyle: "content"
|
||||
});
|
||||
$("[name=deadline]").datepicker({ dateFormat: 'yy-mm-dd'});
|
||||
$("[name=deadline]").datepicker({
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
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() {
|
||||
$("#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;
|
||||
}
|
||||
|
||||
@ -431,14 +446,18 @@ function goal_save(id) {
|
||||
if (id) var f = $("#goal_form_" + id);
|
||||
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;
|
||||
}
|
||||
|
||||
function goal_delete(id) {
|
||||
if (confirmClick('Are you sure you want to delete this fundraising goal?')) {
|
||||
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;
|
||||
}
|
||||
@ -446,14 +465,11 @@ function goal_delete(id) {
|
||||
function charitychange() {
|
||||
if ($("input[name='registeredcharity']:checked").val() == "yes") {
|
||||
$("#charitynumber").attr("disabled", "");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$("#charitynumber").attr("disabled", "disabled");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div id="setup" style="width: 780px;">
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
/*
|
||||
* 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -139,7 +139,7 @@ echo '<td>';
|
||||
echo '<select name="status">';
|
||||
echo '<option value="">' . i18n('Choose') . "</option>\n";
|
||||
$statuses = array('pending', 'confirmed', 'received');
|
||||
foreach ($statuses AS $status) {
|
||||
foreach ($statuses as $status) {
|
||||
if ($sponsorship->status == $status)
|
||||
$sel = 'selected="selected"';
|
||||
else
|
||||
@ -154,7 +154,7 @@ echo '<td>';
|
||||
echo '<select name="probability">';
|
||||
echo '<option value="">' . i18n('Choose') . "</option>\n";
|
||||
$probs = array('25', '50', '75', '90', '95', '99', '100');
|
||||
foreach ($probs AS $prob) {
|
||||
foreach ($probs as $prob) {
|
||||
if ($sponsorship->probability == $prob)
|
||||
$sel = 'selected="selected"';
|
||||
else
|
||||
|
@ -45,7 +45,7 @@ if ($_POST['action'] == 'sponsorshipedit') {
|
||||
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->execute();
|
||||
foreach ($log AS $l) {
|
||||
foreach ($log as $l) {
|
||||
$stmt = $pdo->prepare("INSERT INTO fundraising_donor_logs (sponsors_id,dt,users_id,log) VALUES (
|
||||
'$current->sponsors_id',
|
||||
NOW(),
|
||||
@ -82,5 +82,3 @@ if ($_POST['action'] == 'sponsorshipadd') {
|
||||
error_($pdo->errorInfo());
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
/*
|
||||
* 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
|
||||
* 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
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -27,7 +28,7 @@ include '../common.inc.php';
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
$ret = array();
|
||||
foreach ($config['languages'] AS $l => $ln) {
|
||||
foreach ($config['languages'] as $l => $ln) {
|
||||
if ($l == $config['default_language'])
|
||||
continue;
|
||||
$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
|
||||
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-2008 James Grant <james@lightbox.org>
|
||||
@ -29,9 +29,11 @@
|
||||
|
||||
user_auth_required('committee', 'admin');
|
||||
|
||||
send_header("Administration",
|
||||
send_header(
|
||||
"Administration",
|
||||
array('Committee Main' => 'committee_main.php'),
|
||||
"administration");
|
||||
"administration"
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@ function getJudgingTeams()
|
||||
while ($mr = $mq->fetch(PDO::FETCH_OBJ)) {
|
||||
$u = user_load($mr->judges_id, false);
|
||||
$judgelangs = join('/', $u['languages']);
|
||||
foreach ($u['languages'] AS $l) {
|
||||
foreach ($u['languages'] as $l) {
|
||||
if (!in_array($l, $teamlangs))
|
||||
$teamlangs[] = $l;
|
||||
}
|
||||
@ -264,5 +264,3 @@ function judges_load_all()
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -27,10 +28,14 @@ require ('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
|
||||
send_header('Judges',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'judging_management');
|
||||
send_header(
|
||||
'Judges',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'judging_management'
|
||||
);
|
||||
echo '<br />';
|
||||
echo '<b>' . i18n('Judges') . '</b><ul>';
|
||||
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
|
||||
* 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 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
|
||||
* 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;">
|
||||
<tr><td>
|
||||
<tr>
|
||||
<td>
|
||||
<ul>
|
||||
|
||||
<li><strong><?= "Active for {$config['FAIRYEAR']}"; ?>: </strong>
|
||||
@ -228,7 +230,8 @@ echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
?>
|
||||
</table>
|
||||
</td></tr>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -28,10 +29,14 @@ require_once ('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
include 'judges.inc.php';
|
||||
|
||||
send_header('Invite Judges',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Invite Judges',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Judges' => 'admin/judges.php'));
|
||||
'Judges' => 'admin/judges.php'
|
||||
)
|
||||
);
|
||||
echo '<br />';
|
||||
if ($_POST['action'] == 'invite' && $_POST['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
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -28,28 +29,29 @@ require_once ('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
include 'judges.inc.php';
|
||||
|
||||
send_header('Judging Division Groupings',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Judging Division Groupings',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.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']));
|
||||
?>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
function addbuttonclicked(jdiv)
|
||||
{
|
||||
function addbuttonclicked(jdiv) {
|
||||
document.forms.jdivs.action.value = "add";
|
||||
document.forms.jdivs.jdiv_id.value = jdiv;
|
||||
document.forms.jdivs.submit();
|
||||
}
|
||||
|
||||
function newbuttonclicked(jdivs)
|
||||
{
|
||||
function newbuttonclicked(jdivs) {
|
||||
document.forms.jdivs.action.value = "new";
|
||||
document.forms.jdivs.jdivs.value = jdivs;
|
||||
document.forms.jdivs.submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?
|
||||
@ -82,8 +84,8 @@ if ($config['filterdivisionbycategory'] == 'yes') {
|
||||
}
|
||||
} else {
|
||||
$divcat = array();
|
||||
foreach ($dkeys AS $d) {
|
||||
foreach ($ckeys AS $c) {
|
||||
foreach ($dkeys as $d) {
|
||||
foreach ($ckeys as $c) {
|
||||
$divcat[] = array('c' => $c, 'd' => $d);
|
||||
}
|
||||
}
|
||||
@ -121,7 +123,7 @@ function get_all_divs()
|
||||
$catkeys = array_keys($cat);
|
||||
$lankeys = array_keys($langr);
|
||||
|
||||
foreach ($divcat AS $dc) {
|
||||
foreach ($divcat as $dc) {
|
||||
$y = $dc['d'];
|
||||
$x = $dc['c'];
|
||||
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) {
|
||||
foreach ($_POST['cdllist'] AS $selectedcdl) {
|
||||
foreach ($_POST['cdllist'] as $selectedcdl) {
|
||||
$q = $pdo->prepare("UPDATE judges_jdiv SET jdiv_id='{$_POST['jdiv_id']}' WHERE "
|
||||
. " id='$selectedcdl' ");
|
||||
$q->execute();
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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) 2008-2012 Youth Science Ontario <info@youthscienceontario.ca>
|
||||
@ -302,9 +302,11 @@ function judge_available_for_round($j, $r)
|
||||
return true;
|
||||
|
||||
foreach ($j['availability'] as $a) {
|
||||
if ($a['start'] <= $r['starttime'] &&
|
||||
if (
|
||||
$a['start'] <= $r['starttime'] &&
|
||||
$a['end'] >= $r['endtime'] &&
|
||||
$a['date'] == $r['date']) {
|
||||
$a['date'] == $r['date']
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -389,7 +391,7 @@ function pr_judge(&$jt, $jid)
|
||||
foreach ($jt['cats'] as $c)
|
||||
print("c{$c}={$j['cat_prefs'][$c]} ");
|
||||
echo ' / ';
|
||||
foreach ($j['cat_prefs'] AS $k => $v) {
|
||||
foreach ($j['cat_prefs'] as $k => $v) {
|
||||
print("c{$k}=$v ");
|
||||
}
|
||||
echo ') (';
|
||||
@ -398,7 +400,7 @@ function pr_judge(&$jt, $jid)
|
||||
print("d{$d}={$j['div_prefs'][$d]} ");
|
||||
|
||||
echo ' / ';
|
||||
foreach ($j['div_prefs'] AS $k => $v) {
|
||||
foreach ($j['div_prefs'] as $k => $v) {
|
||||
print("d{$k}=$v ");
|
||||
}
|
||||
|
||||
@ -482,9 +484,11 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
if ($r->jdiv_id == 0)
|
||||
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,
|
||||
'lang' => $r->lang);
|
||||
'lang' => $r->lang
|
||||
);
|
||||
}
|
||||
|
||||
$keys = array_keys($jdiv);
|
||||
@ -779,8 +783,14 @@ for ($k = 0; $k < count($keys); $k++) {
|
||||
$current_jdiv = $jdiv[$jdiv_id];
|
||||
|
||||
$e = 100 + 10 * ($config['effort'] / 1000);
|
||||
$a = new annealer($jdiv[$jdiv_id]['num_jteams'], 125, $e, 0.9,
|
||||
'jdiv_compute_cost', $project_ids);
|
||||
$a = new annealer(
|
||||
$jdiv[$jdiv_id]['num_jteams'],
|
||||
125,
|
||||
$e,
|
||||
0.9,
|
||||
'jdiv_compute_cost',
|
||||
$project_ids
|
||||
);
|
||||
$a->anneal();
|
||||
|
||||
$jdiv[$jdiv_id]['jteams'] = array();
|
||||
@ -862,7 +872,7 @@ for ($x = 1; $x < count($jteam); $x++) {
|
||||
|
||||
if (count($t['cats'])) {
|
||||
$first = true;
|
||||
foreach ($t['cats'] AS $cid) {
|
||||
foreach ($t['cats'] as $cid) {
|
||||
print('c' . $cid . ' ');
|
||||
if (!$first)
|
||||
$catstr .= '+';
|
||||
@ -874,7 +884,7 @@ for ($x = 1; $x < count($jteam); $x++) {
|
||||
$divstr = '';
|
||||
if (count($t['divs'])) {
|
||||
$first = true;
|
||||
foreach ($t['divs'] AS $did) {
|
||||
foreach ($t['divs'] as $did) {
|
||||
print('d' . $did . ' ');
|
||||
if (!$first)
|
||||
$divstr .= '/';
|
||||
@ -1364,8 +1374,14 @@ if ($config['scheduler_enable_sa_scheduling'] == 'yes') {
|
||||
$judge_ids = $r['available_judge_ids'];
|
||||
|
||||
$e = $config['effort'];
|
||||
$a = new annealer(count($r['jteam_ids']), 25, $e, 0.98,
|
||||
'judges_sa_cost_function', $judge_ids);
|
||||
$a = new annealer(
|
||||
count($r['jteam_ids']),
|
||||
25,
|
||||
$e,
|
||||
0.98,
|
||||
'judges_sa_cost_function',
|
||||
$judge_ids
|
||||
);
|
||||
// $a->set_update_callback(judges_to_teams_update);
|
||||
// $a->set_pick_move(judges_sa_pick_move);
|
||||
$a->anneal();
|
||||
@ -1444,10 +1460,12 @@ $q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE
|
||||
$q->execute();
|
||||
$x = 0;
|
||||
while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
$available_timeslots[] = array('id' => $r->id,
|
||||
$available_timeslots[] = array(
|
||||
'id' => $r->id,
|
||||
'date' => $r->date,
|
||||
'starttime' => substr($r->starttime, 0, -3),
|
||||
'endtime' => substr($r->endtime, 0, -3));
|
||||
'endtime' => substr($r->endtime, 0, -3)
|
||||
);
|
||||
print(' ' . $available_timeslots[$x]['starttime'] . ' -> '
|
||||
. $available_timeslots[$x]['endtime'] . "\n");
|
||||
$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
|
||||
header('Location: judges_scheduler_status.php');
|
||||
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
|
||||
exec('php judges_sa.php >../data/logs/judge_scheduler_' . date('YmdHis') . '.log 2>&1 &');
|
||||
exit;
|
||||
?>
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -24,10 +25,14 @@
|
||||
?>
|
||||
<?
|
||||
require('../common.inc.php');
|
||||
send_header('Scheduler Status',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Scheduler Status',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Judges' => 'admin/judges.php'));
|
||||
'Judges' => 'admin/judges.php'
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
@ -53,8 +58,7 @@ function updateStatus() {
|
||||
$("#schedulerpercent").html("100%");
|
||||
$("#updatestatus").html("Scheduling Complete");
|
||||
$("#schedulereta").html("Complete");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$("#schedulerpercent").html(obj[0] + "%");
|
||||
setTimeout('updateStatus()', 5000);
|
||||
$("#updatestatus").html("Updating... Done!");
|
||||
@ -73,8 +77,7 @@ function updateStatus() {
|
||||
remainingtime = remainingpercent * avgtimeperpercent;
|
||||
if (remainingtime > 0 && remainingtime != "Infinity" && obj[0] > 0) {
|
||||
$("#schedulereta").html(format_duration(Math.round(remainingtime / 1000)));
|
||||
}
|
||||
else
|
||||
} else
|
||||
$("#schedulereta").html("Calculating...");
|
||||
}
|
||||
});
|
||||
@ -100,28 +103,30 @@ function format_duration(seconds) {
|
||||
if (s > 86400) {
|
||||
var days = Math.floor(s / 86400)
|
||||
s -= days * 86400;
|
||||
if(days>1) pl='s'; else pl='';
|
||||
if (days > 1) pl = 's';
|
||||
else pl = '';
|
||||
output += days + ' day' + pl + ' ';
|
||||
}
|
||||
if (s > 3600) {
|
||||
var hours = Math.floor(s / 3600)
|
||||
s -= hours * 3600;
|
||||
if(hours>1) pl='s'; else pl='';
|
||||
if (hours > 1) pl = 's';
|
||||
else pl = '';
|
||||
output += hours + ' hour' + pl + ' ';
|
||||
}
|
||||
if (s > 60) {
|
||||
var minutes = Math.floor(s / 60)
|
||||
s -= minutes * 60;
|
||||
if(minutes>1) pl='s'; else pl='';
|
||||
if (minutes > 1) pl = 's';
|
||||
else pl = '';
|
||||
output += minutes + ' minute' + pl + ' ';
|
||||
}
|
||||
if(s>1) pl='s'; else pl='';
|
||||
if (s > 1) pl = 's';
|
||||
else pl = '';
|
||||
output += s + ' second' + pl
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?
|
||||
|
@ -13,4 +13,3 @@ $r = $q->fetch(PDO::FETCH_OBJ);
|
||||
$status = $r->val;
|
||||
|
||||
echo "$percent:$status\n";
|
||||
?>
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -37,10 +38,14 @@ if ($action == 'update') {
|
||||
exit;
|
||||
}
|
||||
|
||||
send_header('Judge Scheduler Configuration',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Judge Scheduler Configuration',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Judges' => 'admin/judges.php'));
|
||||
'Judges' => 'admin/judges.php'
|
||||
)
|
||||
);
|
||||
|
||||
config_editor('Judge Scheduler', $config['FAIRYEAR'], 'var', $_SERVER['PHP_SELF']);
|
||||
echo '<hr />';
|
||||
|
@ -62,15 +62,15 @@ function judges_scheduler_check_awards()
|
||||
}
|
||||
} else {
|
||||
$divcat = array();
|
||||
foreach ($dkeys AS $d) {
|
||||
foreach ($ckeys AS $c) {
|
||||
foreach ($dkeys as $d) {
|
||||
foreach ($ckeys as $c) {
|
||||
$divcat[] = array('c' => $c, 'd' => $d);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$missing_awards = array();
|
||||
foreach ($divcat AS $dc) {
|
||||
foreach ($divcat as $dc) {
|
||||
$d = $dc['d'];
|
||||
$c = $dc['c'];
|
||||
$q = $pdo->prepare("SELECT award_awards.id FROM
|
||||
@ -154,14 +154,14 @@ function judges_scheduler_check_judges()
|
||||
|
||||
echo '<tr>';
|
||||
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>' . i18n('Total') . '</th>';
|
||||
foreach ($config['languages'] AS $lkey => $lname)
|
||||
foreach ($config['languages'] as $lkey => $lname)
|
||||
echo "<th>$lkey</th>";
|
||||
echo "</tr>\n";
|
||||
|
||||
foreach ($jdiv AS $jdiv_id => $jd) {
|
||||
foreach ($jdiv as $jdiv_id => $jd) {
|
||||
$c = $jd['num_projects']['total'];
|
||||
|
||||
// total judge teams calculation
|
||||
@ -171,7 +171,7 @@ function judges_scheduler_check_judges()
|
||||
$jdiv[$jdiv_id]['num_jteams']['total'] = $t['total'];
|
||||
$totalteams['total'] += $t['total'];
|
||||
// language teams calculation
|
||||
foreach ($config['languages'] AS $lkey => $lname) {
|
||||
foreach ($config['languages'] as $lkey => $lname) {
|
||||
$c = $jd['num_projects'][$lkey];
|
||||
$t['total_' . $lkey] = ceil($c / $config['max_projects_per_team'] * $config['times_judged']);
|
||||
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 "<td align=\"center\">{$jd['num_projects']['total']}</td>";
|
||||
$langstr = '';
|
||||
foreach ($config['languages'] AS $lkey => $lname) {
|
||||
foreach ($config['languages'] as $lkey => $lname) {
|
||||
$clang = ($jd['num_projects'][$lkey] ? $jd['num_projects'][$lkey] : 0);
|
||||
echo "<td align=\"center\">$clang</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);
|
||||
// echo "<td align=\"center\">{$t['total']}</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']);
|
||||
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)
|
||||
$minjudges[$lkey] = round($totalteams['total_' . $lkey] * $config['min_judges_per_team']); // $projectlanguagetotal[$lkey]/$projecttotal*$minjudges['total']);
|
||||
else
|
||||
@ -234,10 +234,10 @@ function judges_scheduler_check_judges()
|
||||
$ok = false;
|
||||
}
|
||||
|
||||
foreach ($config['languages'] AS $lkey => $lname) {
|
||||
foreach ($config['languages'] as $lkey => $lname) {
|
||||
$lcount = 0;
|
||||
foreach ($judges AS $j) {
|
||||
foreach ($j['languages'] AS $jlang) {
|
||||
foreach ($judges as $j) {
|
||||
foreach ($j['languages'] as $jlang) {
|
||||
if ($jlang == $lkey)
|
||||
$lcount++;
|
||||
}
|
||||
@ -261,5 +261,3 @@ function judges_scheduler_check_judges()
|
||||
// now check if we can find a divisional award for each division and category
|
||||
return $ok;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* 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) {
|
||||
send_header('Edit Judging Team',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Edit Judging Team',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.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">
|
||||
function addclicked()
|
||||
{
|
||||
function addclicked() {
|
||||
document.forms.judges.action.value = "assign";
|
||||
document.forms.judges.submit();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?
|
||||
@ -296,7 +298,7 @@ function addclicked()
|
||||
echo '<tr><td>' . i18n('Awards') . ':</td><td>';
|
||||
|
||||
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 ' (' . $award['award_type'] . ') ' . $award['name'] . ' <br />';
|
||||
}
|
||||
@ -373,17 +375,21 @@ function addclicked()
|
||||
echo '<input type=submit value="' . i18n('Save Changes') . '">';
|
||||
echo '</form>';
|
||||
} else {
|
||||
send_header('Manage Judging Teams',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Manage Judging Teams',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Judges' => 'admin/judges.php'));
|
||||
'Judges' => 'admin/judges.php'
|
||||
)
|
||||
);
|
||||
echo '<br />';
|
||||
|
||||
$teams = getJudgingTeams();
|
||||
$newteamnum = null;
|
||||
if (count($teams)) {
|
||||
// grab an array of all the current team numbers
|
||||
foreach ($teams AS $team)
|
||||
foreach ($teams as $team)
|
||||
$teamnumbers[$team['num']] = 1;
|
||||
|
||||
// start at 1, and find the next available team number
|
||||
@ -417,14 +423,14 @@ function addclicked()
|
||||
echo '<th>Award(s)</th>';
|
||||
echo '<th>Actions</th>';
|
||||
echo '</tr></thead>';
|
||||
foreach ($teams AS $team) {
|
||||
foreach ($teams as $team) {
|
||||
echo '<tr><td>#' . $team['num'] . '</td><td>';
|
||||
echo $team['name'];
|
||||
echo '</td>';
|
||||
|
||||
echo '<td>';
|
||||
if (count(get_value_from_array($team, 'awards', []))) {
|
||||
foreach ($team['awards'] AS $award) {
|
||||
foreach ($team['awards'] as $award) {
|
||||
echo $award['name'] . ' <br />';
|
||||
}
|
||||
} else {
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -28,39 +29,39 @@ require_once ('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
require_once('judges.inc.php');
|
||||
|
||||
send_header('Judging Team Members',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Judging Team Members',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Judges' => 'admin/judges.php'));
|
||||
'Judges' => 'admin/judges.php'
|
||||
)
|
||||
);
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function addbuttonclicked(team)
|
||||
{
|
||||
function addbuttonclicked(team) {
|
||||
document.forms.judges.action.value = "add";
|
||||
document.forms.judges.team_num.value = team;
|
||||
document.forms.judges.submit();
|
||||
}
|
||||
|
||||
function switchjudgeinfo()
|
||||
{
|
||||
if(document.forms.judges["judgelist[]"].selectedIndex != -1)
|
||||
{
|
||||
function switchjudgeinfo() {
|
||||
if (document.forms.judges["judgelist[]"].selectedIndex != -1) {
|
||||
currentname = document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].text;
|
||||
currentid = document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].value;
|
||||
|
||||
document.forms.judges.judgeinfobutton.disabled = false;
|
||||
document.forms.judges.judgeinfobutton.value = currentname;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
document.forms.judges.judgeinfobutton.disabled = true;
|
||||
document.forms.judges.judgeinfobutton.value = "<? echo i18n('Judge Info') ?>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var mousex = 0, mousey = 0;
|
||||
var mousex = 0,
|
||||
mousey = 0;
|
||||
var selectedMemberId;
|
||||
|
||||
function showMemberDetails(judgeId) {
|
||||
@ -68,7 +69,9 @@ function showMemberDetails(judgeId){
|
||||
judgeId = document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].value;
|
||||
}
|
||||
$('#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() {
|
||||
$('#infodivcover').click(function(){ editMember(); });
|
||||
$('#infodivcover').click(function() {
|
||||
editMember();
|
||||
});
|
||||
$(document).mousemove(function(e) {
|
||||
mousex = e.pageX;
|
||||
mousey = e.pageY;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<?
|
||||
|
||||
@ -124,7 +128,7 @@ if (get_value_from_array($_POST, 'action') == 'add' && get_value_from_array($_PO
|
||||
}
|
||||
$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.
|
||||
|
||||
$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 (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->execute();
|
||||
}
|
||||
@ -247,11 +251,11 @@ if (get_value_from_array($_GET, 'action') == 'autoassignspecial') {
|
||||
$jlist[] = $j['id'];
|
||||
}
|
||||
echo 'We have ' . count($jlist) . ' special awards judges to assign';
|
||||
foreach ($jlist AS $jid) {
|
||||
foreach ($jlist as $jid) {
|
||||
$j = $judgelist[$jid];
|
||||
if (is_array($j['special_award_selected']) && count($j['special_award_selected'])) {
|
||||
// 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 />";
|
||||
// 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']}'");
|
||||
@ -360,7 +364,7 @@ echo '<td valign="top">';
|
||||
|
||||
$teams = getJudgingTeams();
|
||||
|
||||
foreach ($teams AS $team) {
|
||||
foreach ($teams as $team) {
|
||||
echo '<hr>';
|
||||
|
||||
echo '<table width="100%">';
|
||||
@ -379,7 +383,7 @@ foreach ($teams AS $team) {
|
||||
echo '</td></tr>';
|
||||
|
||||
if (count(get_value_from_array($team, 'members', []))) {
|
||||
foreach ($team['members'] AS $member) {
|
||||
foreach ($team['members'] as $member) {
|
||||
$j = &$judgelist[$member['id']];
|
||||
echo '<tr><td>';
|
||||
|
||||
@ -394,7 +398,7 @@ foreach ($teams AS $team) {
|
||||
|
||||
$langerr = false;
|
||||
$judgeerr = false;
|
||||
foreach ($team['languages'] AS $teamlang) {
|
||||
foreach ($team['languages'] as $teamlang) {
|
||||
if (is_array($j['languages'])) {
|
||||
if (!in_array($teamlang, $j['languages'])) {
|
||||
$langerr = true;
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -29,26 +30,25 @@ user_auth_required('committee', 'admin');
|
||||
require('judges.inc.php');
|
||||
require('../projects.inc.php');
|
||||
|
||||
send_header('Judging Teams Projects',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Judging Teams Projects',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Judges' => 'admin/judges.php'));
|
||||
'Judges' => 'admin/judges.php'
|
||||
)
|
||||
);
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function assign(ts)
|
||||
{
|
||||
function assign(ts) {
|
||||
document.forms.teamsprojects.timeslot.value = ts;
|
||||
document.forms.teamsprojects.submit();
|
||||
}
|
||||
|
||||
function eligibleclick()
|
||||
{
|
||||
if(document.forms.teamsprojects.showeligible.checked)
|
||||
{
|
||||
function eligibleclick() {
|
||||
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";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
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 />';
|
||||
if (count($team['members'])) {
|
||||
$memberlist = ' ';
|
||||
foreach ($team['members'] AS $member) {
|
||||
foreach ($team['members'] as $member) {
|
||||
if ($member['captain'] == 'yes')
|
||||
$memberlist .= '<i>';
|
||||
$memberlist .= $member['firstname'] . ' ' . $member['lastname'];
|
||||
@ -132,7 +132,7 @@ if (($action == 'edit' || $action == 'assign') && $edit) {
|
||||
$award_ids = array();
|
||||
if (count($team['awards'])) {
|
||||
$awardlist = ' ';
|
||||
foreach ($team['awards'] AS $award) {
|
||||
foreach ($team['awards'] as $award) {
|
||||
$awardlist .= $award['name'];
|
||||
$awardlist .= ', ';
|
||||
$award_ids[] = $award['id'];
|
||||
@ -318,16 +318,16 @@ if (($action == 'edit' || $action == 'assign') && $edit) {
|
||||
echo '</tr></thead>';
|
||||
|
||||
$teams = getJudgingTeams();
|
||||
foreach ($teams AS $team) {
|
||||
foreach ($teams as $team) {
|
||||
echo '<tr>';
|
||||
echo '<td width="200">';
|
||||
echo '<b>' . $team['name'] . ' (#' . $team['num'] . ')</b><br />';
|
||||
$memberlist = '';
|
||||
if (count(get_value_from_array($team, 'members', []))) {
|
||||
foreach ($team['members'] AS $member) {
|
||||
foreach ($team['members'] as $member) {
|
||||
echo ' ';
|
||||
$err = false;
|
||||
foreach ($team['languages_projects'] AS $projectlang) {
|
||||
foreach ($team['languages_projects'] as $projectlang) {
|
||||
if (!in_array($projectlang, $member['languages_array'])) {
|
||||
$err = true;
|
||||
break;
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -30,11 +31,13 @@ require_once ('judges.inc.php');
|
||||
|
||||
$action = null;
|
||||
|
||||
$round_str = array('timeslot' => 'Judging Timeslot',
|
||||
$round_str = array(
|
||||
'timeslot' => 'Judging Timeslot',
|
||||
'divisional1' => 'Divisional Round 1',
|
||||
'divisional2' => 'Divisional Round 2',
|
||||
'grand' => 'Grand Awards',
|
||||
'special' => 'Special Awards');
|
||||
'special' => 'Special Awards'
|
||||
);
|
||||
if (array_key_exists('action', $_GET))
|
||||
$action = $_GET['action'];
|
||||
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)
|
||||
// so all we'll do here is just mass insert without regards for whats already there.
|
||||
if (count($_POST['teams']) && count($_POST['timeslots'])) {
|
||||
foreach ($_POST['teams'] AS $tm) {
|
||||
foreach ($_POST['timeslots'] AS $ts) {
|
||||
foreach ($_POST['teams'] as $tm) {
|
||||
foreach ($_POST['timeslots'] as $ts) {
|
||||
$stmt = $pdo->prepare("INSERT INTO judges_teams_timeslots_link (judges_teams_id,judges_timeslots_id,year)
|
||||
VALUES ('$tm','$ts','{$config['FAIRYEAR']}')");
|
||||
$stmt->execute();
|
||||
@ -71,15 +74,18 @@ if ($action == 'assign') {
|
||||
}
|
||||
}
|
||||
|
||||
send_header('Judging Teams Timeslots',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Judging Teams Timeslots',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Judges' => 'admin/judges.php'));
|
||||
'Judges' => 'admin/judges.php'
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function checkall(what)
|
||||
{
|
||||
function checkall(what) {
|
||||
for (i = 0; i < document.forms.teamstimeslots.elements.length; i++) {
|
||||
if (document.forms.teamstimeslots.elements[i].name == what + "[]")
|
||||
document.forms.teamstimeslots.elements[i].checked = true;
|
||||
@ -89,8 +95,8 @@ function checkall(what)
|
||||
|
||||
return false;
|
||||
}
|
||||
function checknone(what)
|
||||
{
|
||||
|
||||
function checknone(what) {
|
||||
for (i = 0; i < document.forms.teamstimeslots.elements.length; i++) {
|
||||
if (document.forms.teamstimeslots.elements[i].name == what + "[]")
|
||||
document.forms.teamstimeslots.elements[i].checked = false;
|
||||
@ -99,8 +105,8 @@ function checknone(what)
|
||||
|
||||
return false;
|
||||
}
|
||||
function checkinvert(what)
|
||||
{
|
||||
|
||||
function checkinvert(what) {
|
||||
|
||||
for (i = 0; i < document.forms.teamstimeslots.elements.length; i++) {
|
||||
if (document.forms.teamstimeslots.elements[i].name == what + "[]")
|
||||
@ -184,14 +190,14 @@ echo '<th>' . i18n('Timeslots') . '</th>';
|
||||
echo '</tr>';
|
||||
|
||||
$teams = getJudgingTeams();
|
||||
foreach ($teams AS $team) {
|
||||
foreach ($teams as $team) {
|
||||
echo '<tr>';
|
||||
echo '<td><input type="checkbox" name="teams[]" value="' . $team['id'] . '" /></td>';
|
||||
echo '<td>';
|
||||
echo '<b>' . $team['name'] . ' (#' . $team['num'] . ')</b><br />';
|
||||
$memberlist = '';
|
||||
if (count(get_value_from_array($team, 'members', []))) {
|
||||
foreach ($team['members'] AS $member) {
|
||||
foreach ($team['members'] as $member) {
|
||||
echo ' ';
|
||||
if ($member['captain'] == 'yes')
|
||||
echo '<i>';
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -27,11 +28,13 @@ require_once ('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
|
||||
$round_str = array('timeslot' => 'Judging Timeslot',
|
||||
$round_str = array(
|
||||
'timeslot' => 'Judging Timeslot',
|
||||
'divisional1' => 'Divisional Round 1',
|
||||
'divisional2' => 'Divisional Round 2',
|
||||
'grand' => 'Grand Awards',
|
||||
'special' => 'Special Awards');
|
||||
'special' => 'Special Awards'
|
||||
);
|
||||
|
||||
if (array_key_exists('action', $_POST))
|
||||
$action = $_POST['action'];
|
||||
@ -218,16 +221,24 @@ if ($action == 'savemultiple') {
|
||||
}
|
||||
|
||||
if ($action == '') {
|
||||
send_header('Judging Rounds and Timeslots',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Judging Rounds and Timeslots',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Judges' => 'admin/judges.php'));
|
||||
'Judges' => 'admin/judges.php'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
send_header('Judging Rounds and Timeslots',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Judging Rounds and Timeslots',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Judges' => 'admin/judges.php',
|
||||
'Judging Rounds and Timeslots' => 'admin/judges_timeslots.php'));
|
||||
'Judging Rounds and Timeslots' => 'admin/judges_timeslots.php'
|
||||
)
|
||||
);
|
||||
}
|
||||
echo '<br />';
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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 James Grant <james@lightbox.org>
|
||||
@ -27,10 +27,14 @@ require ('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
require_once('judges.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
send_header('Judging Score Entry - Update',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Judging Score Entry - Update',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Judging Score Entry' => 'admin/judging_score_entry.php'));
|
||||
'Judging Score Entry' => 'admin/judging_score_entry.php'
|
||||
)
|
||||
);
|
||||
|
||||
$year = $config['FAIRYEAR'];
|
||||
$project_id = NULL;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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 James Grant <james@lightbox.org>
|
||||
@ -38,9 +38,13 @@ if ($_GET['csv'] == 'yes') {
|
||||
header('Cache-Control: no-cache');
|
||||
header('Content-disposition: inline; filename=judging_scores.csv');
|
||||
} else {
|
||||
send_header('Judging Score Entry',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'));
|
||||
send_header(
|
||||
'Judging Score Entry',
|
||||
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
|
||||
* 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 James Grant <james@lightbox.org>
|
||||
@ -244,8 +244,7 @@ function project_load()
|
||||
?>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
function countwords()
|
||||
{
|
||||
function countwords() {
|
||||
var wordmax = <?= $config['participant_project_summary_wordmax']; ?>;
|
||||
var summaryobj = document.getElementById('summary');
|
||||
var wordcountobj = document.getElementById('wordcount');
|
||||
@ -273,21 +272,25 @@ function countwords()
|
||||
<form id="project_form">
|
||||
<input type="hidden" name="id" value="<?= $projectinfo->id ?>">
|
||||
<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 ?>
|
||||
<?
|
||||
if ($config['participant_project_title_charmax'])
|
||||
echo i18n('(Max %1 characters)', array($config['participant_project_title_charmax']));
|
||||
?>
|
||||
</td>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= i18n('Project Number') ?>: </td>
|
||||
<td><input type="text" name="projectnumber" size="10" value="<?= $projectinfo->projectnumber ?>" />
|
||||
<input type="button" id="project_regenerate_number" value="<?= i18n('Re-Generate Project Number') ?>" />
|
||||
</td>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<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') {
|
||||
@ -311,7 +314,8 @@ function countwords()
|
||||
<tr>
|
||||
<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>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= i18n('Division') ?>: </td>
|
||||
<td>
|
||||
<?
|
||||
@ -340,9 +344,7 @@ function countwords()
|
||||
if ($config['usedivisionselector'] == 'yes') {
|
||||
?>
|
||||
<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')
|
||||
if (divselwin.opener == null) divselwin.opener = self;
|
||||
return false;
|
||||
@ -363,7 +365,7 @@ function countwords()
|
||||
else
|
||||
$currentlang = $_SESSION['lang'];
|
||||
|
||||
foreach ($config['languages'] AS $key => $val) {
|
||||
foreach ($config['languages'] as $key => $val) {
|
||||
if ($currentlang == $key)
|
||||
$selected = 'selected="selected"';
|
||||
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 />';
|
||||
|
||||
?>
|
||||
</td></tr>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="button" id="project_save" value="<?= i18n('Save Project Information') ?>" />
|
||||
</form>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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>
|
||||
*
|
||||
@ -27,25 +27,34 @@ require ('../tableeditor.class.php');
|
||||
require_once('../user.inc.php');
|
||||
|
||||
user_auth_required('committee', 'admin');
|
||||
send_header('Registration Fee Items Manager',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'registration_fee_items_management');
|
||||
send_header(
|
||||
'Registration Fee Items Manager',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'registration_fee_items_management'
|
||||
);
|
||||
|
||||
$editor = new TableEditor('regfee_items',
|
||||
$editor = new TableEditor(
|
||||
'regfee_items',
|
||||
array(
|
||||
'name' => 'Name (for regfee line)',
|
||||
'description' => 'Description',
|
||||
'cost' => 'Cost',
|
||||
'per' => 'Cost Per',
|
||||
), null,
|
||||
array('year' => $config['FAIRYEAR']));
|
||||
),
|
||||
null,
|
||||
array('year' => $config['FAIRYEAR'])
|
||||
);
|
||||
|
||||
$editor->setPrimaryKey('id');
|
||||
$editor->setDefaultSortField('description');
|
||||
$editor->setRecordType('Registration Fee Item');
|
||||
$editor->setFieldOptions('per', array(array('key' => 'student', 'val' => 'Student'),
|
||||
array('key' => 'project', 'val' => 'Project')));
|
||||
$editor->setFieldOptions('per', array(
|
||||
array('key' => 'student', 'val' => 'Student'),
|
||||
array('key' => 'project', 'val' => 'Project')
|
||||
));
|
||||
$editor->setFieldInputType('per', 'select');
|
||||
$editor->filterList('year', $config['FAIRYEAR']);
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -27,10 +28,14 @@ require ('../common.inc.php');
|
||||
include '../config/signaturepage_or_permissionform.php';
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
send_header('Participant Registration',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'participant_registration');
|
||||
send_header(
|
||||
'Participant Registration',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'participant_registration'
|
||||
);
|
||||
echo '<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 />';
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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 James Grant <james@lightbox.org>
|
||||
@ -95,13 +95,19 @@ switch ($action) {
|
||||
}
|
||||
|
||||
if ($auth_type == 'committee') {
|
||||
send_header('Registration Management',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Registration Management',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Participant Registration' => 'admin/registration.php'));
|
||||
'Participant Registration' => 'admin/registration.php'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
send_header('Student/Project Management',
|
||||
array('Fair Main' => 'fair_main.php'));
|
||||
send_header(
|
||||
'Student/Project Management',
|
||||
array('Fair Main' => 'fair_main.php')
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
@ -124,12 +130,10 @@ if ($auth_type == 'committee') {
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
var registrations_id = 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 h = (document.documentElement.clientHeight * 0.9);
|
||||
|
||||
@ -176,8 +180,7 @@ function popup_editor(id, open_tab)
|
||||
return true;
|
||||
}
|
||||
|
||||
function update_students(numstudents)
|
||||
{
|
||||
function update_students(numstudents) {
|
||||
var id = registrations_id;
|
||||
|
||||
var req = "action=students_load&id=" + id;
|
||||
@ -215,8 +218,7 @@ function update_students(numstudents)
|
||||
return false;
|
||||
}
|
||||
|
||||
function update_project()
|
||||
{
|
||||
function update_project() {
|
||||
var id = registrations_id;
|
||||
$("#editor_tab_project").load("project_editor.php?action=project_load&id=" + id, '',
|
||||
function(responseText, textStatus, XMLHttpRequest) {
|
||||
@ -242,8 +244,7 @@ function update_project()
|
||||
return false;
|
||||
}
|
||||
|
||||
function delete_registration(id)
|
||||
{
|
||||
function delete_registration(id) {
|
||||
registrations_id = id;
|
||||
var conf = confirmClick('<?= i18n('Are you sure you want to completely delete this registration?') ?>');
|
||||
if (conf == false) return false;
|
||||
@ -256,8 +257,7 @@ function delete_registration(id)
|
||||
|
||||
}
|
||||
|
||||
function update_reg()
|
||||
{
|
||||
function update_reg() {
|
||||
var id = registrations_id;
|
||||
$("#editor_tab_reg").load("student_editor.php?action=registration_load&id=" + id, '',
|
||||
function(responseText, textStatus, XMLHttpRequest) {
|
||||
@ -284,8 +284,10 @@ function update_reg()
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#student_editor").dialog({
|
||||
bgiframe: true, autoOpen: false,
|
||||
modal: true, resizable: false,
|
||||
bgiframe: true,
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
buttons: {
|
||||
/* "<?= i18n('Cancel') ?>": function() {
|
||||
@ -349,25 +351,29 @@ $(document).ready(function() {
|
||||
|
||||
$("#newproject").on("click", (function() {
|
||||
popup_editor(-1);
|
||||
}
|
||||
));
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<br />
|
||||
<table width="100%">
|
||||
<tr><td>
|
||||
<tr>
|
||||
<td>
|
||||
<?= i18n('Choose Status') ?>:
|
||||
<form name="statuschangerform" method="get" action="registration_list.php">
|
||||
<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
|
||||
$status_str = array('' => 'Any Status', 'complete' => 'Complete',
|
||||
$status_str = array(
|
||||
'' => 'Any Status',
|
||||
'complete' => 'Complete',
|
||||
'paymentpending' => ($config['regfee'] > 0) ? 'Payment Pending' : '',
|
||||
'completeorpaymentpending' => ($config['regfee'] > 0) ? 'Complete or Payment Pending' : '',
|
||||
'open' => 'Open', 'new' => 'New');
|
||||
'open' => 'Open',
|
||||
'new' => 'New'
|
||||
);
|
||||
|
||||
$showstatus = $_GET['showstatus'];
|
||||
|
||||
@ -378,9 +384,12 @@ foreach ($status_str as $s => $str) {
|
||||
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>
|
||||
</tr></table>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
|
||||
if ($showstatus) {
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -33,10 +34,14 @@ require_once ('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
require('../register_participants.inc.php');
|
||||
|
||||
send_header("Input Received $plural_participationform",
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
"Input Received $plural_participationform",
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Participant Registration' => 'admin/registration.php'));
|
||||
'Participant Registration' => 'admin/registration.php'
|
||||
)
|
||||
);
|
||||
echo '<br />';
|
||||
|
||||
$showformatbottom = true;
|
||||
@ -221,7 +226,7 @@ if (get_value_from_array($_POST, 'action') == 'received' && get_value_from_array
|
||||
// actually set it to 'complete'
|
||||
$stmt = $pdo->prepare("UPDATE registrations SET status='complete' WHERE num='$regnum' AND year='{$config['FAIRYEAR']}'");
|
||||
$stmt->execute();
|
||||
foreach ($recipients AS $recip) {
|
||||
foreach ($recipients as $recip) {
|
||||
$to = $recip['to'];
|
||||
$subsub = array();
|
||||
$subbod = array(
|
||||
@ -241,7 +246,7 @@ if (get_value_from_array($_POST, 'action') == 'received' && get_value_from_array
|
||||
// actually set it to 'paymentpending'
|
||||
$stmt = $pdo->prepare("UPDATE registrations SET status='paymentpending' WHERE num='$regnum' AND year='{$config['FAIRYEAR']}'");
|
||||
$stmt->execute();
|
||||
foreach ($recipients AS $recip) {
|
||||
foreach ($recipients as $recip) {
|
||||
$to = $recip['to'];
|
||||
$subsub = array();
|
||||
$subbod = array(
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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 James Grant <james@lightbox.org>
|
||||
@ -33,10 +33,14 @@ if (get_value_from_array($_GET, 'year'))
|
||||
else
|
||||
$year = $config['FAIRYEAR'];
|
||||
|
||||
send_header('Registration Statistics',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Registration Statistics',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Participant Registration' => 'admin/registration.php'));
|
||||
'Participant Registration' => 'admin/registration.php'
|
||||
)
|
||||
);
|
||||
|
||||
echo '<br />';
|
||||
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 '<table class="tableview" width="100%">';
|
||||
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>' . i18n('Total') . '<br /><nobr>' . i18n('Stud | Proj') . '</th>';
|
||||
echo '</tr></thead>';
|
||||
foreach ($divs AS $d => $dn) {
|
||||
foreach ($divs as $d => $dn) {
|
||||
echo "<tr><td>$dn</td>";
|
||||
$tstud = 0;
|
||||
$tstudcat = array();
|
||||
$tproj = 0;
|
||||
$tprojcat = array();
|
||||
foreach ($cats AS $c => $cn) {
|
||||
foreach ($cats as $c => $cn) {
|
||||
echo '<td align="center">';
|
||||
|
||||
echo ($stats_students_catdiv[$c][$d] ?? 0);
|
||||
@ -250,7 +254,7 @@ foreach ($divs AS $d => $dn) {
|
||||
echo '<tr><td><b>' . i18n('Total') . '</b></td>';
|
||||
$tstud = 0;
|
||||
$tproj = 0;
|
||||
foreach ($cats AS $c => $cn) {
|
||||
foreach ($cats as $c => $cn) {
|
||||
echo '<td align="center"><b>';
|
||||
echo ($tstudcat[$c] ? $tstudcat[$c] : 0);
|
||||
echo ' ';
|
||||
@ -274,18 +278,18 @@ echo "<tr><td colspan=\"2\"><h3>{$status_str[$showstatus]} - " . i18n('Students
|
||||
echo '<tr><td colspan="2">';
|
||||
echo '<table class="tableview" width="100%">';
|
||||
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>' . i18n('Total') . '<br /><nobr>' . i18n('Stud | Proj') . '</nobr></th>';
|
||||
echo '</tr></thead>';
|
||||
|
||||
asort($schools_names);
|
||||
foreach ($schools_names AS $id => $sn) {
|
||||
foreach ($schools_names as $id => $sn) {
|
||||
echo "<tr><td>$sn</td>";
|
||||
$tstud = 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 ' ';
|
||||
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 '<table class="tableview" width="100%">';
|
||||
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) . "'>" . i18n('Total') . '</nobr></th>';
|
||||
echo '</tr><tr>';
|
||||
ksort($languages);
|
||||
$tprojcat = array();
|
||||
foreach ($cats AS $c => $cn) {
|
||||
foreach ($languages AS $l => $ln) {
|
||||
foreach ($cats as $c => $cn) {
|
||||
foreach ($languages as $l => $ln) {
|
||||
echo "<th>$l</th>";
|
||||
}
|
||||
}
|
||||
foreach ($languages AS $l => $ln) {
|
||||
foreach ($languages as $l => $ln) {
|
||||
echo "<th>$l</th>";
|
||||
}
|
||||
echo '</tr></thead>';
|
||||
foreach ($divs AS $d => $dn) {
|
||||
foreach ($divs as $d => $dn) {
|
||||
echo "<tr><td>$dn</td>";
|
||||
$tproj = array();
|
||||
foreach ($cats AS $c => $cn) {
|
||||
foreach ($languages AS $l => $ln) {
|
||||
foreach ($cats as $c => $cn) {
|
||||
foreach ($languages as $l => $ln) {
|
||||
echo '<td align="center">';
|
||||
echo ($stats_projects_lang[$c][$d][$l] ?? 0);
|
||||
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);
|
||||
}
|
||||
}
|
||||
foreach ($tproj AS $l => $ln) {
|
||||
foreach ($tproj as $l => $ln) {
|
||||
echo '<td align="center"><b>';
|
||||
echo ($ln ? $ln : 0);
|
||||
echo '</b></td>';
|
||||
@ -343,15 +347,15 @@ foreach ($divs AS $d => $dn) {
|
||||
}
|
||||
echo '<tr><td><b>' . i18n('Total') . '</b></td>';
|
||||
$tproj = array();
|
||||
foreach ($cats AS $c => $cn) {
|
||||
foreach ($languages AS $l => $ln) {
|
||||
foreach ($cats as $c => $cn) {
|
||||
foreach ($languages as $l => $ln) {
|
||||
echo '<td align="center"><b>';
|
||||
echo ($tprojcat[$c][$l] ? $tprojcat[$c][$l] : 0);
|
||||
echo '</b></td>';
|
||||
$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 ($ln);
|
||||
echo '</b></td>';
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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 James Grant <james@lightbox.org>
|
||||
@ -27,16 +27,20 @@ require ('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
|
||||
send_header('Web Consent',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Web Consent',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Participant Registration' => 'admin/registration.php'));
|
||||
'Participant Registration' => 'admin/registration.php'
|
||||
)
|
||||
);
|
||||
|
||||
echo '<br />';
|
||||
|
||||
if (get_value_from_array($_POST, 'changed')) {
|
||||
$numchanged = 0;
|
||||
foreach ($_POST['changed'] AS $id => $val) {
|
||||
foreach ($_POST['changed'] as $id => $val) {
|
||||
if ($val == 1) {
|
||||
$numchanged++;
|
||||
$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">
|
||||
function changed(id)
|
||||
{
|
||||
function changed(id) {
|
||||
var o = document.getElementById('changed_' + id);
|
||||
o.value = 1;
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -42,7 +43,8 @@
|
||||
require_once('../lcsv.php');
|
||||
require_once('../tcpdf.inc.php');
|
||||
|
||||
$filter_ops = array( 0 => '=',
|
||||
$filter_ops = array(
|
||||
0 => '=',
|
||||
1 => '<=',
|
||||
2 => '>=',
|
||||
3 => '<',
|
||||
@ -55,36 +57,52 @@
|
||||
);
|
||||
|
||||
$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)')
|
||||
);
|
||||
$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')
|
||||
);
|
||||
$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')
|
||||
);
|
||||
$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')
|
||||
);
|
||||
$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')
|
||||
);
|
||||
$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')
|
||||
);
|
||||
$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')
|
||||
);
|
||||
$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')
|
||||
);
|
||||
$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(
|
||||
'10' => '10',
|
||||
'11'=>'11', '12'=>'12',
|
||||
'13'=>'13', '14'=>'14', '15'=>'15', '16'=>'16', '18'=>'18',
|
||||
'20'=>'20', '22'=>'22', '24'=>'24'
|
||||
'11' => '11',
|
||||
'12' => '12',
|
||||
'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 */
|
||||
$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_height' => 11,
|
||||
'label_width' => 7,
|
||||
@ -117,7 +136,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
||||
'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_height' => 8.5,
|
||||
'label_width' => 9.5,
|
||||
@ -130,7 +150,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
||||
'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_height' => 11,
|
||||
'label_width' => 8.5,
|
||||
@ -143,7 +164,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
||||
'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_height' => 8.5,
|
||||
'label_width' => 11,
|
||||
@ -156,7 +178,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
||||
'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_height' => 11,
|
||||
'label_width' => 4,
|
||||
@ -170,7 +193,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
||||
'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_height' => 11,
|
||||
'label_width' => 3.99,
|
||||
@ -183,7 +207,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
||||
'page_format' => 'LETTER',
|
||||
'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_height' => 11,
|
||||
'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_height' => 11,
|
||||
'label_width' => 4,
|
||||
@ -222,7 +248,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
||||
'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_height' => 11,
|
||||
'label_width' => 4,
|
||||
@ -235,7 +262,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
||||
'page_orientation' => 'P',
|
||||
);
|
||||
|
||||
$report_stock['letter_4up'] = array('name' => 'Fullpage, 4up',
|
||||
$report_stock['letter_4up'] = array(
|
||||
'name' => 'Fullpage, 4up',
|
||||
'page_width' => 8.5,
|
||||
'page_height' => 11,
|
||||
'label_width' => 4,
|
||||
@ -248,7 +276,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
||||
'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_height' => 17,
|
||||
'label_width' => 11,
|
||||
@ -261,7 +290,8 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
|
||||
'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_height' => 11,
|
||||
'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",
|
||||
'values' => array() );
|
||||
$report_options['stock'] = array(
|
||||
'desc' => "Paper Type",
|
||||
'values' => array()
|
||||
);
|
||||
|
||||
|
||||
/* Add more types to the report format */
|
||||
@ -291,50 +323,77 @@ foreach($report_stock as $n=>$v) {
|
||||
* format, but with the 'custom_url' attached. */
|
||||
$report_custom = array();
|
||||
$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',
|
||||
'custom_url' => 'admin/reports_mailinglabels.php',
|
||||
'creator' => 'The Grant Brothers');
|
||||
'creator' => 'The Grant Brothers'
|
||||
);
|
||||
$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',
|
||||
'custom_url' => 'admin/reports_projects_details.php?type=pdf',
|
||||
'creator' => 'The Grant Brothers');
|
||||
'creator' => 'The Grant Brothers'
|
||||
);
|
||||
$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',
|
||||
'custom_url' => 'admin/reports_judges.php?type=csv',
|
||||
'creator' => 'The Grant Brothers');
|
||||
'creator' => 'The Grant Brothers'
|
||||
);
|
||||
$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',
|
||||
'custom_url' => 'admin/reports_judges_allyears.php?type=csv',
|
||||
'creator' => 'The Grant Brothers');
|
||||
'creator' => 'The Grant Brothers'
|
||||
);
|
||||
$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',
|
||||
'custom_url' => 'admin/reports_judges_teams_projects.php?type=pdf',
|
||||
'creator' => 'The Grant Brothers');
|
||||
'creator' => 'The Grant Brothers'
|
||||
);
|
||||
$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',
|
||||
'custom_url' => 'admin/reports_judges_teams_projects.php?type=csv',
|
||||
'creator' => 'The Grant Brothers');
|
||||
'creator' => 'The Grant Brothers'
|
||||
);
|
||||
$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',
|
||||
'custom_url' => 'admin/reports_projects_judges_teams.php?type=pdf',
|
||||
'creator' => 'The Grant Brothers');
|
||||
'creator' => 'The Grant Brothers'
|
||||
);
|
||||
$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',
|
||||
'custom_url' => 'admin/reports_projects_judges_teams.php?type=csv',
|
||||
'creator' => 'The Grant Brothers');
|
||||
'creator' => 'The Grant Brothers'
|
||||
);
|
||||
$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',
|
||||
'custom_url' => 'admin/reports_program_awards.php?type=csv',
|
||||
'creator' => 'The Grant Brothers');
|
||||
'creator' => 'The Grant Brothers'
|
||||
);
|
||||
|
||||
function report_save_field($report, $type, $loc)
|
||||
{
|
||||
@ -389,7 +448,6 @@ foreach($report_stock as $n=>$v) {
|
||||
|
||||
$stmt->execute();
|
||||
show_pdo_errors_if_any($pdo);
|
||||
|
||||
}
|
||||
|
||||
function report_load($report_id)
|
||||
@ -482,7 +540,8 @@ foreach($report_stock as $n=>$v) {
|
||||
}
|
||||
|
||||
function report_save($report)
|
||||
{ global $pdo;
|
||||
{
|
||||
global $pdo;
|
||||
if ($report['id'] == 0) {
|
||||
/* New report */
|
||||
$stmt = $pdo->prepare("INSERT INTO reports (`id`) VALUES ('')");
|
||||
@ -530,7 +589,8 @@ foreach($report_stock as $n=>$v) {
|
||||
}
|
||||
|
||||
function report_load_all()
|
||||
{ global $pdo;
|
||||
{
|
||||
global $pdo;
|
||||
$ret = array();
|
||||
$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->execute();
|
||||
$stmt = $pdo->prepare("DELETE FROM reports_items WHERE `reports_id`=$r");
|
||||
$stmt->execute();}
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
|
||||
function report_gen($report)
|
||||
@ -613,28 +674,38 @@ foreach($report['col'] as $v)
|
||||
case 'label':
|
||||
/* Label */
|
||||
$label_stock = $report_stock[$report['option']['stock']];
|
||||
$rep=new lpdf( i18n($config['fairname']),
|
||||
$rep = new lpdf(
|
||||
i18n($config['fairname']),
|
||||
i18n($report['name']),
|
||||
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo.gif");
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . "/data/logo.gif"
|
||||
);
|
||||
$rep->setPageStyle("labels");
|
||||
$rep->newPage($label_stock['page_width'], $label_stock['page_height']);
|
||||
$rep->setFontSize(11);
|
||||
$rep->setLabelDimensions($label_stock['label_width'], $label_stock['label_height'],
|
||||
$label_stock['x_spacing'], $label_stock['y_spacing'],11,$label_stock['y_padding']);
|
||||
$rep->setLabelDimensions(
|
||||
$label_stock['label_width'],
|
||||
$label_stock['label_height'],
|
||||
$label_stock['x_spacing'],
|
||||
$label_stock['y_spacing'],
|
||||
11,
|
||||
$label_stock['y_padding']
|
||||
);
|
||||
$gen_mode = 'label';
|
||||
break;
|
||||
case 'pdf': case '':
|
||||
case 'pdf':
|
||||
case '':
|
||||
/* FIXME: handle landscape pages in here */
|
||||
$label_stock = $report_stock[$report['option']['stock']];
|
||||
$rep=new lpdf( i18n($config['fairname']),
|
||||
$rep = new lpdf(
|
||||
i18n($config['fairname']),
|
||||
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']);
|
||||
if ($report['option']['default_font_size']) {
|
||||
$rep->setDefaultFontSize($report['option']['default_font_size']);
|
||||
$rep->setFontSize($report['option']['default_font_size']);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$rep->setDefaultFontSize(11);
|
||||
$rep->setFontSize(11);
|
||||
}
|
||||
@ -650,10 +721,17 @@ foreach($report['col'] as $v)
|
||||
$show_logo = ($report['option']['label_logo'] == 'yes') ? true : false;
|
||||
|
||||
$rep = new pdf($report['name'], $label_stock['page_format'], $label_stock['page_orientation']);
|
||||
$rep->setup_for_labels($show_box, $show_fair, $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']);
|
||||
$rep->setup_for_labels(
|
||||
$show_box,
|
||||
$show_fair,
|
||||
$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';
|
||||
break;
|
||||
|
||||
@ -723,8 +801,10 @@ foreach($report['col'] as $v)
|
||||
$post_group_by = array_merge($group_by, $fields[$f]['group_by']);
|
||||
|
||||
if (is_array($fields[$f]['components'])) {
|
||||
$components = array_merge($components,
|
||||
$fields[$f]['components']);
|
||||
$components = array_merge(
|
||||
$components,
|
||||
$fields[$f]['components']
|
||||
);
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
@ -743,8 +823,10 @@ foreach($report['col'] as $v)
|
||||
$order[] = $fieldname[$f];
|
||||
|
||||
if (is_array($fields[$f]['components'])) {
|
||||
$components = array_merge($components,
|
||||
$fields[$f]['components']);
|
||||
$components = array_merge(
|
||||
$components,
|
||||
$fields[$f]['components']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -784,8 +866,10 @@ foreach($report['col'] as $v)
|
||||
$t = $filter_ops[$d['x']];
|
||||
$filter[] = "{$fields[$f]['table']} $t '{$d['value']}'";
|
||||
if (is_array($fields[$f]['components'])) {
|
||||
$components = array_merge($components,
|
||||
$fields[$f]['components']);
|
||||
$components = array_merge(
|
||||
$components,
|
||||
$fields[$f]['components']
|
||||
);
|
||||
}
|
||||
}
|
||||
$sel = implode(",", $sel);
|
||||
@ -882,7 +966,6 @@ foreach($report['col'] as $v)
|
||||
$rep->heading($h);
|
||||
$rep->nextLine();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$data = array();
|
||||
@ -919,16 +1002,26 @@ foreach($report['col'] as $v)
|
||||
//the page content is filled
|
||||
/* Special column, draw a box */
|
||||
if ($f == 'static_box') {
|
||||
$rep->addLabelBox($d['x'], $d['y'], $d['w'],
|
||||
$d['h']);
|
||||
$rep->addLabelBox(
|
||||
$d['x'],
|
||||
$d['y'],
|
||||
$d['w'],
|
||||
$d['h']
|
||||
);
|
||||
} else {
|
||||
/* Special column, override result with static text */
|
||||
if ($f == 'static_text') $v = $d['value'];
|
||||
|
||||
$lh = ($d['lines'] == 0) ? 0 : $d['h'] / $d['lines'];
|
||||
$rep->addLabelText2($d['x'], $d['y'], $d['w'],
|
||||
$d['h'], $lh,
|
||||
$v, $opt);
|
||||
$rep->addLabelText2(
|
||||
$d['x'],
|
||||
$d['y'],
|
||||
$d['w'],
|
||||
$d['h'],
|
||||
$lh,
|
||||
$v,
|
||||
$opt
|
||||
);
|
||||
}
|
||||
} else if ($gen_mode == 'tcpdf_label') {
|
||||
/* Setup additional options */
|
||||
@ -962,10 +1055,20 @@ foreach($report['col'] as $v)
|
||||
|
||||
$v = iconv("ISO-8859-1", "UTF-8", $v);
|
||||
|
||||
$rep->label_text($d['x'], $d['y'], $d['w'], $d['h'],
|
||||
$v, $show_box, $d['align'], $d['valign'],
|
||||
$d['fontname'],$d['fontstyle'],$d['fontsize'],
|
||||
$d['on_overflow']);
|
||||
$rep->label_text(
|
||||
$d['x'],
|
||||
$d['y'],
|
||||
$d['w'],
|
||||
$d['h'],
|
||||
$v,
|
||||
$show_box,
|
||||
$d['align'],
|
||||
$d['valign'],
|
||||
$d['fontname'],
|
||||
$d['fontstyle'],
|
||||
$d['fontsize'],
|
||||
$d['on_overflow']
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -1000,7 +1103,6 @@ foreach($report['col'] as $v)
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
@ -1016,5 +1118,3 @@ foreach($report['col'] as $v)
|
||||
|
||||
$rep->output();
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* 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_header('My Reports',
|
||||
send_header(
|
||||
'My Reports',
|
||||
array('Committee Main' => 'committee_main.php'),
|
||||
'print/export_reports');
|
||||
'print/export_reports'
|
||||
);
|
||||
|
||||
/* 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.');
|
||||
@ -145,15 +148,12 @@ echo i18n('Welcome to the new report interface. You can select and save specifi
|
||||
<br /><br />
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function remove_report(id)
|
||||
{
|
||||
function remove_report(id) {
|
||||
$('#debug').load("<? $_SERVER['PHP_SELF'] ?>?action=remove_report&id=" + id);
|
||||
$("#report_tr_" + id).remove();
|
||||
}
|
||||
|
||||
function edit_report(id,reports_id)
|
||||
{
|
||||
function edit_report(id, reports_id) {
|
||||
var r = (id == -1) ? '&reports_id=' + reports_id : '';
|
||||
$.getJSON("<?= $_SERVER['PHP_SELF'] ?>?action=load_report&id=" + id + r,
|
||||
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() {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
|
||||
function add_report()
|
||||
{
|
||||
function add_report() {
|
||||
edit_report(-1, $('#report').val());
|
||||
}
|
||||
|
||||
@ -193,8 +191,8 @@ function gen_report() {
|
||||
}
|
||||
|
||||
var edit = false;
|
||||
function edit_toggle()
|
||||
{
|
||||
|
||||
function edit_toggle() {
|
||||
if (edit == false) {
|
||||
$('#edit_toggle').val("<?= i18n('Done Editing') ?>");
|
||||
$('#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 h = (document.documentElement.clientHeight * 0.4);
|
||||
|
||||
@ -225,8 +222,10 @@ function popup_editor(id)
|
||||
/* Setup the popup window */
|
||||
$(document).ready(function() {
|
||||
$("#popup_editor").dialog({
|
||||
bgiframe: true, autoOpen: false,
|
||||
modal: true, resizable: false,
|
||||
bgiframe: true,
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
buttons: {
|
||||
"<?= i18n('Cancel') ?>": function() {
|
||||
@ -239,7 +238,6 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<?
|
||||
|
||||
|
@ -54,9 +54,11 @@ if (!$scriptformat)
|
||||
$scriptformat = 'default';
|
||||
|
||||
if ($type == 'pdf') {
|
||||
$rep = new lpdf(i18n($config['fairname']),
|
||||
$rep = new lpdf(
|
||||
i18n($config['fairname']),
|
||||
i18n('Awards Ceremony Script'),
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||
);
|
||||
|
||||
$rep->newPage();
|
||||
if ($scriptformat == 'default')
|
||||
@ -307,4 +309,3 @@ foreach ($awards as $r) {
|
||||
}
|
||||
|
||||
$rep->output();
|
||||
?>
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* 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);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -149,7 +150,8 @@ $report_awards_fields = array(
|
||||
'header' => 'Sp. Status',
|
||||
'width' => 0.5,
|
||||
'table' => 'sponsorships.status',
|
||||
'value_map' => array('pending' => 'Pending', 'confirmed' => 'Confirmed'), 'received' => 'Received'
|
||||
'value_map' => array('pending' => 'Pending', 'confirmed' => 'Confirmed'),
|
||||
'received' => 'Received'
|
||||
),
|
||||
'pcontact_salutation' => array(
|
||||
'start_option_group' => 'Sponsor Primary Contact',
|
||||
@ -448,5 +450,3 @@ function report_awards_fromwhere($report, $components)
|
||||
|
||||
return $q;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* 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('reports.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
send_header('Award Ceremony Scripts',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'print_awards_ceremony_scripts');
|
||||
send_header(
|
||||
'Award Ceremony Scripts',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'print_awards_ceremony_scripts'
|
||||
);
|
||||
echo '<br />';
|
||||
echo '<form action="reports_acscript.php" method="get">';
|
||||
echo '<table class="tableedit">';
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -169,5 +170,3 @@ function report_committees_fromwhere($report, $components)
|
||||
|
||||
return $q;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -192,15 +193,18 @@ if ($repaction == 'try') {
|
||||
exit;
|
||||
}
|
||||
|
||||
send_header('Reports Editor',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'report_management');
|
||||
send_header(
|
||||
'Reports Editor',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'report_management'
|
||||
);
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function reportReload()
|
||||
{
|
||||
function reportReload() {
|
||||
document.forms.report.reloadaction.value = 'reload';
|
||||
document.forms.report.submit();
|
||||
}
|
||||
@ -309,7 +313,6 @@ function createDataTCPDF(x,y,w,h,align,valign,fontname,fontstyle,fontsize,value)
|
||||
|
||||
canvasObjectIndex++;
|
||||
}
|
||||
|
||||
</script>
|
||||
<?
|
||||
|
||||
@ -425,13 +428,22 @@ echo "<td><textarea name=\"desc\" rows=\"3\" cols=\"60\">{$report['desc']}</text
|
||||
echo '</tr>';
|
||||
echo '<tr><td>Type: </td>';
|
||||
echo '<td>';
|
||||
selector('type', array('student' => 'Student 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'),
|
||||
selector(
|
||||
'type',
|
||||
array(
|
||||
'student' => 'Student 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'],
|
||||
'onChange="reportReload();"');
|
||||
'onChange="reportReload();"'
|
||||
);
|
||||
echo '<input type="hidden" name="reloadaction" value="">';
|
||||
echo '</td>';
|
||||
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']);
|
||||
}
|
||||
echo 'Align';
|
||||
selector("col[$x][align]", array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'),
|
||||
$d['align']);
|
||||
selector(
|
||||
"col[$x][align]",
|
||||
array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'),
|
||||
$d['align']
|
||||
);
|
||||
echo 'vAlign';
|
||||
if ($report['option']['type'] == 'label') {
|
||||
selector("col[$x][valign]", array('vcenter' => 'Center', 'vtop' => 'Top', 'vbottom' => 'Bottom'),
|
||||
$d['valign']);
|
||||
selector(
|
||||
"col[$x][valign]",
|
||||
array('vcenter' => 'Center', 'vtop' => 'Top', 'vbottom' => 'Bottom'),
|
||||
$d['valign']
|
||||
);
|
||||
} else {
|
||||
selector("col[$x][valign]", array('middle' => 'Middle', 'top' => 'Top', 'bottom' => 'Bottom'),
|
||||
$d['valign']);
|
||||
selector(
|
||||
"col[$x][valign]",
|
||||
array('middle' => 'Middle', 'top' => 'Top', 'bottom' => 'Bottom'),
|
||||
$d['valign']
|
||||
);
|
||||
|
||||
echo 'Font=';
|
||||
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';
|
||||
selector("col[$x][align]", array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'),
|
||||
'center');
|
||||
selector(
|
||||
"col[$x][align]",
|
||||
array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'),
|
||||
'center'
|
||||
);
|
||||
echo 'vAlign';
|
||||
if ($report['option']['type'] == 'label') {
|
||||
selector("col[$x][valign]", array('vcenter' => 'Center', 'vtop' => 'Top', 'vbottom' => 'Bottom'),
|
||||
'top');
|
||||
selector(
|
||||
"col[$x][valign]",
|
||||
array('vcenter' => 'Center', 'vtop' => 'Top', 'vbottom' => 'Bottom'),
|
||||
'top'
|
||||
);
|
||||
} else {
|
||||
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
|
||||
* SFIAB Website: http://www.sfiab.ca
|
||||
* Science-ation Website: https://science-ation.ca/
|
||||
*
|
||||
* Copyright (C) 2005 David Grant <dave@lightbox.org>
|
||||
*
|
||||
@ -470,5 +470,3 @@ function report_fairs_fromwhere($report, $components)
|
||||
|
||||
return $q;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -202,5 +203,3 @@ function report_fundraisings_fromwhere($report, $components)
|
||||
|
||||
return $q;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* 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_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>
|
||||
</ul>
|
||||
<form id="report_dialog_form">
|
||||
<div id="report_gen_tab_info">
|
||||
<input type="hidden" name="id" value="<?= $id ?>" />
|
||||
<table class="editor" style="width:95%"><tr>
|
||||
<td colspan="2"><br /><h3><?= i18n('Report Information') ?></h3><br /></td>
|
||||
</tr><tr>
|
||||
<table class="editor" style="width:95%">
|
||||
<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="input"><?= $report['name'] ?></b></td>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><b><?= i18n('Description') ?></b>:</td>
|
||||
<td class="input"><?= $report['desc'] ?></b></td>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><b><?= i18n('Created By') ?></b>:</td>
|
||||
<td class="input"><?= $report['creator'] ?></td>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<?
|
||||
/* See if the report is in this committee member's list */
|
||||
$q = $pd->prepare("SELECT * FROM reports_committee
|
||||
@ -97,17 +106,26 @@ switch ($_GET['action']) {
|
||||
if ($q->rowCount() > 0) {
|
||||
$i = $q->fetch(PDO::FETCH_ASSOC);
|
||||
?>
|
||||
<td colspan="2"><hr /><h3><?= i18n('My Reports Info') ?></h3></td>
|
||||
</tr><tr>
|
||||
<td colspan="2">
|
||||
<hr />
|
||||
<h3><?= i18n('My Reports Info') ?></h3>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><b><?= i18n('Category') ?></b>:</td>
|
||||
<td class="input"><?= $i['category'] ?></b></td>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><b><?= i18n('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>
|
||||
<?
|
||||
$format = $report['options']['type'];
|
||||
@ -143,21 +161,28 @@ switch ($_GET['action']) {
|
||||
</table>
|
||||
</div>
|
||||
<div id="report_gen_tab_advanced">
|
||||
<table class="editor" style="width:95%"><tr>
|
||||
<td colspan="2"><br /><h4><?= i18n('Advanced Options') ?></h4><br /></td>
|
||||
</tr><tr>
|
||||
<table class="editor" style="width:95%">
|
||||
<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="input"><?= i18n('Include student and project data from incomplete registrations. The registration only needs to have a division and category selected.') ?></td>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$("#report_gen_tabs").tabs();
|
||||
|
||||
$("#report_dialog_gen").dialog({
|
||||
bgiframe: true, autoOpen: true,
|
||||
modal: true, resizable: false,
|
||||
bgiframe: true,
|
||||
autoOpen: true,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
width: 800, //(document.documentElement.clientWidth * 0.8);
|
||||
height: 600, //(document.documentElement.clientHeight * 0.7),
|
||||
@ -165,7 +190,8 @@ switch ($_GET['action']) {
|
||||
$(this).dialog('destroy');
|
||||
$('#report_dialog_gen').remove();
|
||||
},
|
||||
buttons: { "<?= i18n('Cancel') ?>": function() {
|
||||
buttons: {
|
||||
"<?= i18n('Cancel') ?>": function() {
|
||||
$('#report_dialog_gen').dialog("close");
|
||||
return false;
|
||||
},
|
||||
@ -181,7 +207,6 @@ switch ($_GET['action']) {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<?
|
||||
exit;
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* 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)
|
||||
{
|
||||
$prefs = array(-2 => 'Lowest', -1 => 'Low',
|
||||
$prefs = array(
|
||||
-2 => 'Lowest',
|
||||
-1 => 'Low',
|
||||
0 => '--',
|
||||
'1' => 'High', 2 => 'Highest');
|
||||
'1' => 'High',
|
||||
2 => 'Highest'
|
||||
);
|
||||
/* Field is 'div_pref_x', users_id is passed in $text */
|
||||
$cat_id = substr($field, 9);
|
||||
$year = $report['year'];
|
||||
@ -288,9 +293,11 @@ function report_judges_time_availability($report, $field, $text)
|
||||
$q->execute();
|
||||
// echo mysql_error();
|
||||
while (($r = $q->fetch(PDO::FETCH_ASSOC))) {
|
||||
if ($r['start'] <= $round['starttime'] &&
|
||||
if (
|
||||
$r['start'] <= $round['starttime'] &&
|
||||
$r['end'] >= $round['endtime'] &&
|
||||
$r['date'] == $round['date']) {
|
||||
$r['date'] == $round['date']
|
||||
) {
|
||||
return 'Yes';
|
||||
}
|
||||
}
|
||||
@ -1093,5 +1100,3 @@ function report_judges_fromwhere($report, $components)
|
||||
|
||||
return $q;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -36,9 +37,11 @@ else
|
||||
$type = $_GET['type'];
|
||||
|
||||
if ($type == 'pdf') {
|
||||
$rep = new lpdf(i18n($config['fairname']),
|
||||
$rep = new lpdf(
|
||||
i18n($config['fairname']),
|
||||
i18n('Judge List'),
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||
);
|
||||
|
||||
$rep->newPage();
|
||||
$rep->setFontSize(11);
|
||||
@ -115,10 +118,12 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
$times[$x] = array('date' => $r->date,
|
||||
$times[$x] = array(
|
||||
'date' => $r->date,
|
||||
'starttime' => $r->starttime,
|
||||
'endtime' => $r->endtime,
|
||||
'name' => $r->name);
|
||||
'name' => $r->name
|
||||
);
|
||||
$datetimeheadings[] = $r->name;
|
||||
$x++;
|
||||
}
|
||||
@ -160,17 +165,17 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
$catdata = array();
|
||||
$languages = '';
|
||||
|
||||
foreach ($u['cat_prefs'] AS $c) {
|
||||
foreach ($u['cat_prefs'] as $c) {
|
||||
$catdata[] = $c + 2;
|
||||
}
|
||||
|
||||
foreach ($u['div_prefs'] AS $d) {
|
||||
foreach ($u['div_prefs'] as $d) {
|
||||
$divdata[] = $d;
|
||||
// FIXME: 2010-01-22 - James - get the sub divisions for now we use a placeholder
|
||||
$divdata[] = '';
|
||||
}
|
||||
|
||||
foreach ($u['languages'] AS $k => $v) {
|
||||
foreach ($u['languages'] as $k => $v) {
|
||||
$languages .= "$v/";
|
||||
}
|
||||
$languages = substr($languages, 0, -1);
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -36,9 +37,11 @@ else
|
||||
$type = $_GET['type'];
|
||||
|
||||
if ($type == 'pdf') {
|
||||
$rep = new lpdf(i18n($config['fairname']),
|
||||
$rep = new lpdf(
|
||||
i18n($config['fairname']),
|
||||
i18n('Judge List'),
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||
);
|
||||
|
||||
$rep->newPage();
|
||||
$rep->setFontSize(11);
|
||||
@ -132,17 +135,17 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
$catdata = array();
|
||||
$languages = '';
|
||||
|
||||
foreach ($u['cat_prefs'] AS $c) {
|
||||
foreach ($u['cat_prefs'] as $c) {
|
||||
$catdata[] = $c + 2;
|
||||
}
|
||||
|
||||
foreach ($u['div_prefs'] AS $d) {
|
||||
foreach ($u['div_prefs'] as $d) {
|
||||
$divdata[] = $d;
|
||||
// FIXME: 2010-01-22 - James - get the sub divisions for now we use a placeholder
|
||||
$divdata[] = '';
|
||||
}
|
||||
|
||||
foreach ($u['languages'] AS $k => $v) {
|
||||
foreach ($u['languages'] as $k => $v) {
|
||||
$languages .= "$v/";
|
||||
}
|
||||
$languages = substr($languages, 0, -1);
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -33,9 +34,11 @@ require ('judges.inc.php');
|
||||
$type = $_GET['type'];
|
||||
|
||||
if ($type == 'pdf') {
|
||||
$rep = new lpdf(i18n($config['fairname']),
|
||||
$rep = new lpdf(
|
||||
i18n($config['fairname']),
|
||||
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->setFontSize(11);
|
||||
@ -52,7 +55,7 @@ if ($q->rowCount() > 1)
|
||||
else
|
||||
$show_date = false;
|
||||
|
||||
foreach ($teams AS $team) {
|
||||
foreach ($teams as $team) {
|
||||
$table = array();
|
||||
$table['header'] = array(i18n('Timeslot'), i18n('Proj #'), i18n('Project Title'));
|
||||
if ($show_date)
|
||||
@ -66,7 +69,7 @@ foreach ($teams AS $team) {
|
||||
|
||||
$memberlist = '';
|
||||
if (count(get_value_from_array($team, 'members', []))) {
|
||||
foreach ($team['members'] AS $member) {
|
||||
foreach ($team['members'] as $member) {
|
||||
$memberlist .= $member['firstname'] . ' ' . $member['lastname'];
|
||||
if ($member['captain'] == 'yes')
|
||||
$memberlist .= '*';
|
||||
@ -78,7 +81,7 @@ foreach ($teams AS $team) {
|
||||
|
||||
if (count($team['awards'])) {
|
||||
$rep->heading(i18n('Awards that this team judges') . ':');
|
||||
foreach ($team['awards'] AS $award) {
|
||||
foreach ($team['awards'] as $award) {
|
||||
$rep->addText($award['name']);
|
||||
$rep->addText(i18n('Criteria') . ': ' . $award['criteria']);
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -26,16 +27,19 @@
|
||||
require('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
send_header('Mailing Label Generator',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Mailing Label Generator',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Reports' => 'admin/reports.php'));
|
||||
'Reports' => 'admin/reports.php'
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
function stockChange()
|
||||
{
|
||||
function stockChange() {
|
||||
var val = document.forms.mailinglabels.stock.options[document.forms.mailinglabels.stock.selectedIndex].value;
|
||||
var v = val.split(":");
|
||||
|
||||
@ -48,8 +52,7 @@ function stockChange()
|
||||
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 v = val.split(":");
|
||||
document.forms.mailinglabels.report.value = v[0];
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -57,9 +58,11 @@ if ($report) {
|
||||
if ($_GET['toppadding'])
|
||||
$toppadding = $_GET['toppadding'];
|
||||
|
||||
$rep = new lpdf(i18n($config['fairname']),
|
||||
$rep = new lpdf(
|
||||
i18n($config['fairname']),
|
||||
"$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->newPage(8.5, 11);
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* 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('reports.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
send_header('Reports',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'));
|
||||
send_header(
|
||||
'Reports',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
)
|
||||
);
|
||||
echo '<br />';
|
||||
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';
|
||||
|
||||
if ($type == 'pdf') {
|
||||
$rep = new lpdf(i18n($config['fairname']),
|
||||
$rep = new lpdf(
|
||||
i18n($config['fairname']),
|
||||
i18n('Program Awards'),
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||
);
|
||||
|
||||
$rep->newPage();
|
||||
$rep->setFontSize(11);
|
||||
@ -103,4 +105,3 @@ if ($q->rowCount()) {
|
||||
}
|
||||
}
|
||||
$rep->output();
|
||||
?>
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
/*
|
||||
* 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 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -33,9 +34,11 @@ require ('judges.inc.php');
|
||||
$type = $_GET['type'];
|
||||
|
||||
if ($type == 'pdf') {
|
||||
$rep = new lpdf(i18n($config['fairname']),
|
||||
$rep = new lpdf(
|
||||
i18n($config['fairname']),
|
||||
i18n('Project Details'),
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif');
|
||||
$_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'
|
||||
);
|
||||
|
||||
$rep->newPage();
|
||||
$rep->setFontSize(11);
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -37,9 +38,11 @@ require ('judges.inc.php');
|
||||
$type = $_GET['type'];
|
||||
|
||||
if ($type == 'pdf') {
|
||||
$rep = new lpdf(i18n($config['fairname']),
|
||||
$rep = new lpdf(
|
||||
i18n($config['fairname']),
|
||||
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->setFontSize(11);
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -220,5 +221,3 @@ function report_schools_fromwhere($report, $components)
|
||||
|
||||
return $q;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -374,8 +375,14 @@ $report_students_fields = array(
|
||||
'header' => 'T-Shirt',
|
||||
'width' => 0.7,
|
||||
'table' => 'students.tshirt',
|
||||
'value_map' => array('none' => '', 'xsmall' => 'X-Small', 'small' => 'Small', 'medium' => 'Medium',
|
||||
'large' => 'Large', 'xlarge' => 'X-Large')
|
||||
'value_map' => array(
|
||||
'none' => '',
|
||||
'xsmall' => 'X-Small',
|
||||
'small' => 'Small',
|
||||
'medium' => 'Medium',
|
||||
'large' => 'Large',
|
||||
'xlarge' => 'X-Large'
|
||||
)
|
||||
),
|
||||
'medicalalert' => array(
|
||||
'name' => 'Student -- Medical Alert Info',
|
||||
@ -1253,5 +1260,3 @@ function report_students_fromwhere($report, $components)
|
||||
|
||||
return $q;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -98,5 +99,3 @@ function report_tours_fromwhere($report, $components)
|
||||
|
||||
return $q;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -160,5 +161,3 @@ function report_volunteers_fromwhere($report, $components)
|
||||
|
||||
return $q;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* 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 James Grant <james@lightbox.org>
|
||||
* 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
|
||||
* 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') {
|
||||
send_header(get_value_from_array($_GET, 'action') == 'edit' ? 'Edit School' : 'Add New School',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
get_value_from_array($_GET, 'action') == 'edit' ? 'Edit School' : 'Add New School',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'School Management' => 'admin/schools.php'),
|
||||
'schools_management');
|
||||
'School Management' => 'admin/schools.php'
|
||||
),
|
||||
'schools_management'
|
||||
);
|
||||
if (get_value_from_array($_GET, 'action') == 'edit') {
|
||||
$buttontext = 'Save School';
|
||||
$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 '<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 '</select>';
|
||||
|
||||
echo "</td></tr>\n";
|
||||
echo '<tr><td>' . i18n('School Designation') . '</td><td>';
|
||||
$des = array('' => 'Choose', 'public' => 'Public',
|
||||
$des = array(
|
||||
'' => 'Choose',
|
||||
'public' => 'Public',
|
||||
'independent' => 'Independent/Private',
|
||||
'home' => 'Home School');
|
||||
'home' => 'Home School'
|
||||
);
|
||||
echo '<select name="schooldesignate">';
|
||||
foreach ($des as $k => $v) {
|
||||
$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 "</form>\n";
|
||||
} else {
|
||||
send_header('School Management',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'schools_management');
|
||||
send_header(
|
||||
'School Management',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'schools_management'
|
||||
);
|
||||
|
||||
global $notice;
|
||||
switch ($notice) {
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -33,10 +34,14 @@ require ('../csvimport.inc.php');
|
||||
|
||||
user_auth_required('committee', 'admin');
|
||||
|
||||
send_header('Schools Import',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Schools Import',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'School Management' => 'admin/schools.php'));
|
||||
'School Management' => 'admin/schools.php'
|
||||
)
|
||||
);
|
||||
|
||||
$showform = true;
|
||||
|
||||
@ -54,7 +59,7 @@ if (get_value_from_array($_POST, 'action') == 'import') {
|
||||
}
|
||||
|
||||
$loaded = 0;
|
||||
foreach ($CSVP->data AS $row) {
|
||||
foreach ($CSVP->data as $row) {
|
||||
for ($n = 0; $n < count($row); $n++) {
|
||||
$row[$n] = trim($row[$n]);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -31,10 +32,14 @@ require ('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
|
||||
send_header('Science Fair Management',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'sciencefair_management');
|
||||
send_header(
|
||||
'Science Fair Management',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'
|
||||
),
|
||||
'sciencefair_management'
|
||||
);
|
||||
echo '<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 James Grant <james@lightbox.org>
|
||||
* 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
|
||||
* 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 James Grant <james@lightbox.org>
|
||||
* 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -30,7 +31,7 @@
|
||||
include '../common.inc.php';
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
foreach ($config['languages'] AS $l => $ln) {
|
||||
foreach ($config['languages'] as $l => $ln) {
|
||||
if ($l == $config['default_language'])
|
||||
continue;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* 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-2008 James Grant <james@lightbox.org>
|
||||
@ -27,10 +27,14 @@ require ('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
|
||||
send_header('Donor Contacts',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Donor Contacts',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Donor' => 'admin/donors.php'));
|
||||
'Donor' => 'admin/donors.php'
|
||||
)
|
||||
);
|
||||
|
||||
if ($_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 James Grant <james@lightbox.org>
|
||||
* 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -85,4 +86,3 @@ $stats_data = array(
|
||||
'delegate3_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 James Grant <james@lightbox.org>
|
||||
* 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
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -517,10 +518,12 @@ function registration_load()
|
||||
<tr>
|
||||
<td><?= i18n('Registration Number') ?>:</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><input type="text" name="registration_email" value="<?= get_value_from_array($r, 'email') ?>"></td>
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= i18n('Status') ?>:</td>
|
||||
<td><select name="registration_status">
|
||||
<?
|
||||
@ -547,7 +550,8 @@ function registration_load()
|
||||
$sel = ($fid == $r['fairs_id']) ? 'selected="selected"' : '';
|
||||
echo "<option $sel value=\"$fid\">{$f['name']}</option>";
|
||||
}
|
||||
?> </select>
|
||||
?>
|
||||
</select>
|
||||
<?
|
||||
}
|
||||
?> </td>
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -31,10 +32,14 @@ require ('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
|
||||
send_header('Tours',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php'),
|
||||
'tour_management');
|
||||
send_header(
|
||||
'Tours',
|
||||
array(
|
||||
'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_assignments.php">' . i18n('Edit Student-Tour Assignments') . '</a><br />';
|
||||
echo '<hr />';
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -51,8 +52,10 @@ if (get_value_from_array($_GET, 'action') == 'info') {
|
||||
$r->execute();
|
||||
$i = $r->fetch(PDO::FETCH_OBJ);
|
||||
|
||||
send_popup_header(i18n('Student Tour Rank Information - %1 %2',
|
||||
array($i->firstname, $i->lastname)));
|
||||
send_popup_header(i18n(
|
||||
'Student Tour Rank Information - %1 %2',
|
||||
array($i->firstname, $i->lastname)
|
||||
));
|
||||
$query = "SELECT * FROM tours_choice
|
||||
WHERE students_id='$sid'
|
||||
AND year='{$config['FAIRYEAR']}'
|
||||
@ -70,8 +73,10 @@ if (get_value_from_array($_GET, 'action') == 'info') {
|
||||
echo '<br /><br />';
|
||||
$count--;
|
||||
} else {
|
||||
echo '<b>' . i18n('Tour Preference %1',
|
||||
array($i->rank)) . ':</b>';
|
||||
echo '<b>' . i18n(
|
||||
'Tour Preference %1',
|
||||
array($i->rank)
|
||||
) . ':</b>';
|
||||
echo '</td><td>';
|
||||
echo "#{$tours[$i->tour_id]['num']}: {$tours[$i->tour_id]['name']}";
|
||||
echo '</td><td>';
|
||||
@ -88,22 +93,25 @@ if (get_value_from_array($_GET, 'action') == 'info') {
|
||||
exit;
|
||||
}
|
||||
|
||||
send_header('Tour Assignments',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Tour Assignments',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Tours' => 'admin/tours.php'));
|
||||
'Tours' => 'admin/tours.php'
|
||||
)
|
||||
);
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
var infowindow = '';
|
||||
function addbuttonclicked(id)
|
||||
{
|
||||
|
||||
function addbuttonclicked(id) {
|
||||
document.forms.tours.action.value = "add";
|
||||
document.forms.tours.tours_id.value = id;
|
||||
document.forms.tours.submit();
|
||||
}
|
||||
|
||||
function openinfo(id)
|
||||
{
|
||||
function openinfo(id) {
|
||||
if (id)
|
||||
currentid = id;
|
||||
else
|
||||
@ -114,10 +122,8 @@ function openinfo(id)
|
||||
|
||||
}
|
||||
|
||||
function switchinfo()
|
||||
{
|
||||
if(document.forms.tours["studentlist[]"].selectedIndex != -1)
|
||||
{
|
||||
function switchinfo() {
|
||||
if (document.forms.tours["studentlist[]"].selectedIndex != -1) {
|
||||
currentname = document.forms.tours["studentlist[]"].options[document.forms.tours["studentlist[]"].selectedIndex].text;
|
||||
currentid = document.forms.tours["studentlist[]"].options[document.forms.tours["studentlist[]"].selectedIndex].value;
|
||||
|
||||
@ -127,15 +133,12 @@ function switchinfo()
|
||||
if (!infowindow.closed && infowindow.location) {
|
||||
openinfo();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
document.forms.tours.studentinfobutton.disabled = true;
|
||||
document.forms.tours.studentinfobutton.value = "<? echo i18n('Student Tour Rank Info') ?>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?
|
||||
@ -152,7 +155,7 @@ if (get_value_from_array($_POST, 'action') == 'add' && $tours_id != 0 && count($
|
||||
}
|
||||
|
||||
$added = 0;
|
||||
foreach ($student_list AS $sid) {
|
||||
foreach ($student_list as $sid) {
|
||||
/* Make sure the student exists */
|
||||
$sid = intval($sid);
|
||||
|
||||
@ -184,7 +187,10 @@ if (get_value_from_array($_POST, 'action') == 'add' && $tours_id != 0 && count($
|
||||
$j = i18n('students');
|
||||
|
||||
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>';
|
||||
$x = 0;
|
||||
if (is_array($t['students'])) {
|
||||
foreach ($t['students'] AS $sid) {
|
||||
foreach ($t['students'] as $sid) {
|
||||
$s = $student[$sid];
|
||||
if ($x == 0)
|
||||
echo '<tr>';
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@ -33,10 +34,14 @@ user_auth_required('committee', 'admin');
|
||||
require('../tours.class.php');
|
||||
require('../tableeditor.class.php');
|
||||
|
||||
send_header('Tour Management',
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
send_header(
|
||||
'Tour Management',
|
||||
array(
|
||||
'Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.php',
|
||||
'Tours' => 'admin/tours.php'));
|
||||
'Tours' => 'admin/tours.php'
|
||||
)
|
||||
);
|
||||
|
||||
if ($_GET['action'] == 'renumber') {
|
||||
$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">
|
||||
|
||||
function opentoursinfo(id)
|
||||
{
|
||||
function opentoursinfo(id) {
|
||||
if (id)
|
||||
currentid = id;
|
||||
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