Convert to new user_auth_required. Some report edits too that I don't

feel like filtering out
This commit is contained in:
dave 2010-07-13 03:30:17 +00:00
parent 8d1c6e1cd4
commit ad0468e4e1
88 changed files with 174 additions and 215 deletions

View File

@ -25,7 +25,7 @@
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
require_once("awards.inc.php"); require_once("awards.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header('Create All Divisional Awards', send_header('Create All Divisional Awards',
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -24,7 +24,7 @@
<? <?
require_once('../common.inc.php'); require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
require_once('awards.inc.php'); require_once('awards.inc.php');
switch($_GET['action']) { switch($_GET['action']) {

View File

@ -23,7 +23,7 @@
<? <?
require_once('../common.inc.php'); require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
require_once('curl.inc.php'); require_once('curl.inc.php');
require_once('awards.inc.php'); require_once('awards.inc.php');

View File

@ -24,7 +24,7 @@ require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
require_once('../projects.inc.php'); require_once('../projects.inc.php');
require_once('curl.inc.php'); require_once('curl.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
//function get_cwsf_award_winners() //function get_cwsf_award_winners()
function get_winners($awardid, $fairs_id) function get_winners($awardid, $fairs_id)

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Awards", send_header("Awards",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -23,7 +23,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
//make sure storage folder exists //make sure storage folder exists
if(!file_exists("../data/userfiles")) if(!file_exists("../data/userfiles"))

View File

@ -26,7 +26,7 @@
require_once("../user.inc.php"); require_once("../user.inc.php");
require_once("../committee.inc.php"); require_once("../committee.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
if($_POST['users_uid']) if($_POST['users_uid'])
$uid = intval($_POST['users_uid']); $uid = intval($_POST['users_uid']);

View File

@ -24,7 +24,7 @@
<? <?
require_once("../common.inc.php"); require_once("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
function launchQueue() { function launchQueue() {
if(!file_exists("../data/logs")) { if(!file_exists("../data/logs")) {

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
if($_GET['action']=="status") { if($_GET['action']=="status") {
$q=mysql_query("SELECT * FROM emailqueue WHERE finished IS NULL"); $q=mysql_query("SELECT * FROM emailqueue WHERE finished IS NULL");

View File

@ -24,7 +24,7 @@
<? <?
require_once('../common.inc.php'); require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
require_once('xml.inc.php'); require_once('xml.inc.php');
function xml_dearray(&$array) function xml_dearray(&$array)

View File

@ -122,7 +122,7 @@ include "xml.inc.php";
<? <?
require("../common.inc.php"); require("../common.inc.php");
require("../projects.inc.php"); require("../projects.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("One-Click CWSF Registration", send_header("One-Click CWSF Registration",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php'), 'Administration' => 'admin/index.php'),

View File

@ -23,7 +23,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
$q=mysql_query("SELECT * FROM documents WHERE id='".$_GET['id']."'"); $q=mysql_query("SELECT * FROM documents WHERE id='".$_GET['id']."'");
if($r=mysql_fetch_object($q)) if($r=mysql_fetch_object($q))
{ {

View File

@ -31,7 +31,7 @@
if(!file_exists("../data/documents/.htaccess")) if(!file_exists("../data/documents/.htaccess"))
file_put_contents("../data/documents/.htaccess","Order Deny,Allow\r\nDeny From All\r\n"); file_put_contents("../data/documents/.htaccess","Order Deny,Allow\r\nDeny From All\r\n");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Internal Document Manager", send_header("Internal Document Manager",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php'), 'Administration' => 'admin/index.php'),

View File

@ -25,7 +25,7 @@
require("../tableeditor.class.php"); require("../tableeditor.class.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
include ("fundraising_sponsorship_handler.inc.php"); include ("fundraising_sponsorship_handler.inc.php");
include ("fundraising_goals_handler.inc.php"); include ("fundraising_goals_handler.inc.php");

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require_once("fundraising_common.inc.php"); require_once("fundraising_common.inc.php");

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
echo "<br />\n"; echo "<br />\n";
//$q=mysql_query("SELECT * FROM award_sponsors WHERE year='".$config['FAIRYEAR']."' ORDER BY organization"); //$q=mysql_query("SELECT * FROM award_sponsors WHERE year='".$config['FAIRYEAR']."' ORDER BY organization");

View File

@ -25,7 +25,7 @@
require("../common.inc.php"); require("../common.inc.php");
require("../tableeditor.class.php"); require("../tableeditor.class.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Events Management", send_header("Events Management",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Events &amp; Scheduling", send_header("Events &amp; Scheduling",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("../lpdf.php"); require("../lpdf.php");
$catq=mysql_query("SELECT * FROM projectcategories WHERE year='".$config['FAIRYEAR']."' AND id='".$_GET['cat']."'"); $catq=mysql_query("SELECT * FROM projectcategories WHERE year='".$config['FAIRYEAR']."' AND id='".$_GET['cat']."'");

View File

@ -24,7 +24,7 @@
<? <?
require_once('../common.inc.php'); require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
require_once('xml.inc.php'); require_once('xml.inc.php');
require_once('stats.inc.php'); require_once('stats.inc.php');
require_once('curl.inc.php'); require_once('curl.inc.php');

View File

@ -37,7 +37,7 @@
'delegates' => 'Delegate information/jacket size for CWSF', 'delegates' => 'Delegate information/jacket size for CWSF',
); );
user_auth_required('committee', 'admin'); user_auth_required('admin');
switch($_GET['action']) { switch($_GET['action']) {

View File

@ -3,7 +3,7 @@
require_once("../common.inc.php"); require_once("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
$q = mysql_query("SELECT * FROM judges WHERE passwordexpiry IS NULL"); $q = mysql_query("SELECT * FROM judges WHERE passwordexpiry IS NULL");
while($i = mysql_fetch_object($q)) { while($i = mysql_fetch_object($q)) {

View File

@ -24,7 +24,7 @@
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
if($_GET['action']=="refresh") { if($_GET['action']=="refresh") {
?> ?>

View File

@ -23,7 +23,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("fundraising_common.inc.php"); require("fundraising_common.inc.php");
switch($_GET['action']){ switch($_GET['action']){

View File

@ -23,7 +23,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("fundraising_common.inc.php"); require("fundraising_common.inc.php");
$userslist=array(); $userslist=array();

View File

@ -23,7 +23,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("fundraising_common.inc.php"); require("fundraising_common.inc.php");
send_header("Fundraising Reports", send_header("Fundraising Reports",

View File

@ -23,7 +23,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("fundraising_common.inc.php"); require("fundraising_common.inc.php");
require_once("../lpdf.php"); require_once("../lpdf.php");
require_once("../lcsv.php"); require_once("../lcsv.php");

View File

@ -24,7 +24,7 @@
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
//first, insert any default fundraising donor levels //first, insert any default fundraising donor levels
$q=mysql_query("SELECT * FROM fundraising_donor_levels WHERE fiscalyear='".$config['FISCALYEAR']."'"); $q=mysql_query("SELECT * FROM fundraising_donor_levels WHERE fiscalyear='".$config['FISCALYEAR']."'");

View File

@ -24,7 +24,7 @@
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
if($_GET['id']) { if($_GET['id']) {
$id=intval($_GET['id']); $id=intval($_GET['id']);

View File

@ -24,7 +24,7 @@
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
if($_GET['id']) { if($_GET['id']) {
$id=intval($_GET['id']); $id=intval($_GET['id']);

View File

@ -24,7 +24,7 @@
<? <?
include "../common.inc.php"; include "../common.inc.php";
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
$ret=array(); $ret=array();
foreach($config['languages'] AS $l=>$ln) { foreach($config['languages'] AS $l=>$ln) {
if($l==$config['default_language']) continue; if($l==$config['default_language']) continue;

View File

@ -26,7 +26,7 @@
require_once("../user.inc.php"); require_once("../user.inc.php");
require_once("../committee.inc.php"); require_once("../committee.inc.php");
user_auth_required('committee','admin'); user_auth_required('admin');
send_header("Administration", send_header("Administration",
array('Committee Main' => 'committee_main.php'), array('Committee Main' => 'committee_main.php'),

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Judges", send_header("Judges",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -29,7 +29,7 @@
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
$preferencechoices=array( $preferencechoices=array(
-2=>"Very Low", -2=>"Very Low",

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
include "judges.inc.php"; include "judges.inc.php";
send_header("Invite Judges", send_header("Invite Judges",

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
include "judges.inc.php"; include "judges.inc.php";
send_header("Judging Division Groupings", send_header("Judging Division Groupings",

View File

@ -26,7 +26,7 @@ ogram; see the file COPYING. If not, write to
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
require("../config_editor.inc.php"); require("../config_editor.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("judges.inc.php"); require("judges.inc.php");
require("judges_schedulerconfig_check.inc.php"); require("judges_schedulerconfig_check.inc.php");

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
include "judges.inc.php"; include "judges.inc.php";
if($_GET['edit']) $edit=$_GET['edit']; if($_GET['edit']) $edit=$_GET['edit'];

View File

@ -24,7 +24,7 @@
<? <?
require_once('../common.inc.php'); require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
require_once('judges.inc.php'); require_once('judges.inc.php');
send_header("Judging Team Members", send_header("Judging Team Members",

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("judges.inc.php"); require("judges.inc.php");
require("../projects.inc.php"); require("../projects.inc.php");

View File

@ -24,7 +24,7 @@
<? <?
require_once('../common.inc.php'); require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
require_once('judges.inc.php'); require_once('judges.inc.php');
$round_str = array('timeslot' => 'Judging Timeslot', $round_str = array('timeslot' => 'Judging Timeslot',

View File

@ -24,7 +24,7 @@
<? <?
require_once('../common.inc.php'); require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
$round_str = array('timeslot' => 'Judging Timeslot', $round_str = array('timeslot' => 'Judging Timeslot',
'divisional1' => 'Divisional Round 1', 'divisional1' => 'Divisional Round 1',

View File

@ -25,7 +25,7 @@
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
require_once("judges.inc.php"); require_once("judges.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Judging Score Entry - Update", send_header("Judging Score Entry - Update",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php', 'Administration' => 'admin/index.php',

View File

@ -25,7 +25,7 @@
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
require_once("judges.inc.php"); require_once("judges.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
if($_GET['year']) $year=$_GET['year']; if($_GET['year']) $year=$_GET['year'];
else $year=$config['FAIRYEAR']; else $year=$config['FAIRYEAR'];

View File

@ -25,7 +25,7 @@
require("../common.inc.php"); require("../common.inc.php");
require("../tableeditor.class.php"); require("../tableeditor.class.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Event Locations", send_header("Event Locations",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -26,8 +26,7 @@ require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
require_once('../register_participants.inc.php'); require_once('../register_participants.inc.php');
$auth_type = user_auth_required(array('fair','committee'), 'admin'); $auth_type = user_auth_required(array(), array('fair','admin'));
$registrations_id=intval($_GET['id']); $registrations_id=intval($_GET['id']);
$action = $_GET['action']; $action = $_GET['action'];

View File

@ -25,7 +25,7 @@
require("../tableeditor.class.php"); require("../tableeditor.class.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Registration Fee Items Manager", send_header("Registration Fee Items Manager",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php'), 'Administration' => 'admin/index.php'),

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Participant Registration", send_header("Participant Registration",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php'), 'Administration' => 'admin/index.php'),

View File

@ -25,7 +25,7 @@
require_once('../common.inc.php'); require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
$auth_type = user_auth_required(array('fair','committee'), 'admin'); $auth_type = user_auth_required(array(), array('fair', 'admin');
//require_once('../register_participants.inc.php'); //require_once('../register_participants.inc.php');

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("../register_participants.inc.php"); require("../register_participants.inc.php");
send_header("Input Received Signature Forms", send_header("Input Received Signature Forms",

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("../register_participants.inc.php"); require("../register_participants.inc.php");
if($_GET['year']) $year=$_GET['year']; if($_GET['year']) $year=$_GET['year'];

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Web Consent", send_header("Web Consent",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -36,7 +36,7 @@ switch($_GET['action']) {
case 'remove_report': case 'remove_report':
$id = intval($_GET['id']); $id = intval($_GET['id']);
mysql_query("DELETE FROM reports_committee WHERE mysql_query("DELETE FROM reports_committee WHERE
users_id='{$_SESSION['users_uid']}' AND id='$id'"); users_id='{$_SESSION['accounts_id']}' AND id='$id'");
happy_('Report successfully removed'); happy_('Report successfully removed');
exit; exit;
case 'reload': case 'reload':
@ -67,7 +67,7 @@ case 'load_report':
/* Load available categories */ /* Load available categories */
$q = mysql_query("SELECT DISTINCT category FROM reports_committee $q = mysql_query("SELECT DISTINCT category FROM reports_committee
WHERE users_id='{$_SESSION['users_uid']}' WHERE users_id='{$_SESSION['accounts_id']}'
ORDER BY category"); ORDER BY category");
while($i = mysql_fetch_object($q)) while($i = mysql_fetch_object($q))
$ret['cat'][] = $i->category; $ret['cat'][] = $i->category;
@ -82,7 +82,7 @@ case 'save':
if($id == -1) { if($id == -1) {
/* New entry */ /* New entry */
mysql_query("INSERT INTO `reports_committee` (`users_id`,`reports_id`) mysql_query("INSERT INTO `reports_committee` (`users_id`,`reports_id`)
VALUES('{$_SESSION['users_uid']}','$reports_id');"); VALUES('{$_SESSION['accounts_id']}','$reports_id');");
echo mysql_error(); echo mysql_error();
$id = mysql_insert_id(); $id = mysql_insert_id();
} }
@ -240,7 +240,7 @@ $(document).ready(function() {
$q = mysql_query("SELECT reports_committee.*,reports.name $q = mysql_query("SELECT reports_committee.*,reports.name
FROM reports_committee FROM reports_committee
LEFT JOIN reports ON reports.id=reports_committee.reports_id LEFT JOIN reports ON reports.id=reports_committee.reports_id
WHERE users_id='{$_SESSION['users_uid']}' WHERE users_id='{$_SESSION['accounts_id']}'
ORDER BY category,id"); ORDER BY category,id");
echo mysql_error(); echo mysql_error();
if(mysql_num_rows($q) == 0) { if(mysql_num_rows($q) == 0) {

View File

@ -1,7 +1,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("../lpdf.php"); require("../lpdf.php");
require("../lcsv.php"); require("../lcsv.php");

View File

@ -24,7 +24,7 @@
<? <?
require_once('../common.inc.php'); require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
require_once('../tcpdf/tcpdf_sfiab_config.php'); require_once('../tcpdf/tcpdf_sfiab_config.php');
require_once('../tcpdf/tcpdf.php'); require_once('../tcpdf/tcpdf.php');

View File

@ -25,7 +25,7 @@
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
require_once('reports.inc.php'); require_once('reports.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Award Ceremony Scripts", send_header("Award Ceremony Scripts",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php'), 'Administration' => 'admin/index.php'),

View File

@ -47,7 +47,7 @@ $report_committees_fields = array(
'name' => 'Committee Member -- Email', 'name' => 'Committee Member -- Email',
'header' => 'Email', 'header' => 'Email',
'width' => 50.8 /*mm*/, 'width' => 50.8 /*mm*/,
'table' => 'users.email'), 'table' => 'accounts.email'),
'phone_home' => array( 'phone_home' => array(
'name' => 'Committee Member -- Phone (Home)', 'name' => 'Committee Member -- Phone (Home)',
@ -160,10 +160,11 @@ $report_committees_fields = array(
AND committees_teams.year='$year'"; AND committees_teams.year='$year'";
} }
*/ */
$q = " FROM $q = " FROM users
users LEFT JOIN user_roles on user_roles.users_id=users.id
LEFT JOIN accounts ON accounts.id=users.accounts_id
WHERE WHERE
users.types LIKE '%committee%' user_role.type='committee'
"; ";
return $q; return $q;

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require_once('reports_students.inc.php'); require_once('reports_students.inc.php');
require_once('reports_judges.inc.php'); require_once('reports_judges.inc.php');

View File

@ -427,15 +427,15 @@ $report_fairs_fields = array(
if(in_array('fairs_stats', $components)) { if(in_array('fairs_stats', $components)) {
$fs_from = 'LEFT JOIN fairs_stats ON fairs_stats.fairs_id=fairs.id'; $fs_from = 'LEFT JOIN fairs_stats ON fairs_stats.fairs_id=fairs.id';
$fs_where = "fairs_stats.year='$year'"; $fs_where = "fairs_stats.year='$year' AND";
} }
$q = " FROM fairs $q = " FROM fairs
$fs_from $fs_from
WHERE WHERE
1 AND
$fs_where $fs_where
1
"; ";
return $q; return $q;

View File

@ -143,7 +143,7 @@ $report_fundraisings_fields = array(
'header' => '', 'header' => '',
'width' => 2.54 /*mm*/, 'width' => 2.54 /*mm*/,
'table' => 'MAX(users.year)', 'table' => 'MAX(users.year)',
'group_by' => array('users.uid'), 'group_by' => array('users.accounts_id'),
'components' => array('users') ), 'components' => array('users') ),
'static_text' => array( 'static_text' => array(
@ -183,7 +183,7 @@ $report_fundraisings_fields = array(
if(in_array('users', $components)) { if(in_array('users', $components)) {
$users_from = 'LEFT JOIN fundraising_campaigns_users_link ON fundraising_campaigns.id=fundraising_campaigns_users_link.fundraising_campaigns_id $users_from = 'LEFT JOIN fundraising_campaigns_users_link ON fundraising_campaigns.id=fundraising_campaigns_users_link.fundraising_campaigns_id
LEFT JOIN users ON users.uid=fundraising_campaigns_users_link.users_uid LEFT JOIN users ON users.accounts_id=fundraising_campaigns_users_link.users_uid
LEFT JOIN users_sponsor ON users_sponsor.users_id=users.id'; LEFT JOIN users_sponsor ON users_sponsor.users_id=users.id';
$users_where = "users.deleted!='yes' AND"; $users_where = "users.deleted!='yes' AND";
} }

View File

@ -24,7 +24,7 @@
<? <?
require_once("../common.inc.php"); require_once("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require_once('reports.inc.php'); require_once('reports.inc.php');
@ -89,7 +89,7 @@ case 'dialog_gen':
<? <?
/* See if the report is in this committee member's list */ /* See if the report is in this committee member's list */
$q = mysql_query("SELECT * FROM reports_committee $q = mysql_query("SELECT * FROM reports_committee
WHERE users_id='{$_SESSION['users_uid']}' WHERE users_id='{$_SESSION['accounts_id']}'
AND reports_id='{$report['id']}'"); AND reports_id='{$report['id']}'");
if(mysql_num_rows($q) > 0) { if(mysql_num_rows($q) > 0) {
$i = mysql_fetch_assoc($q); $i = mysql_fetch_assoc($q);
@ -216,7 +216,7 @@ case 'dialog_gen':
echo '<tr><td colspan="2"><hr /></td></tr>'; echo '<tr><td colspan="2"><hr /></td></tr>';
/* See if the report is in this committee member's list */ /* See if the report is in this committee member's list */
$q = mysql_query("SELECT * FROM reports_committee $q = mysql_query("SELECT * FROM reports_committee
WHERE users_id='{$_SESSION['users_uid']}' WHERE users_id='{$_SESSION['accounts_id']}'
AND reports_id='{$report['id']}'"); AND reports_id='{$report['id']}'");
echo "<tr><td colspan=\"2\"><h3>".i18n('My Reports Info')."</h3></td></tr>"; echo "<tr><td colspan=\"2\"><h3>".i18n('My Reports Info')."</h3></td></tr>";
if(mysql_num_rows($q) > 0) { if(mysql_num_rows($q) > 0) {

View File

@ -23,7 +23,7 @@
require_once('../questions.inc.php'); require_once('../questions.inc.php');
/* Take the language array in users_judge, unserialize it, and join it /* Take the language array in users, unserialize it, and join it
* with a space */ * with a space */
function report_judges_languages(&$report, $field, $text) function report_judges_languages(&$report, $field, $text)
{ {
@ -69,7 +69,7 @@ function report_judges_divs_at_exp(&$report, $field, $text)
$exp = substr($field, 12,1); $exp = substr($field, 12,1);
$long = (strlen($field) == 13) ? false : true; $long = (strlen($field) == 13) ? false : true;
/* Text is users_judge.div_prefs */ /* Text is users.div_prefs */
$year = $report['year']; $year = $report['year'];
$divprefs = unserialize($text); $divprefs = unserialize($text);
if(!is_array($divprefs)) return ''; if(!is_array($divprefs)) return '';
@ -98,7 +98,7 @@ function report_judges_cats_at_pref(&$report, $field, $text)
$pref = $prefs[substr($field, 13,1)]; $pref = $prefs[substr($field, 13,1)];
$long = (strlen($field) == 14) ? false : true; $long = (strlen($field) == 14) ? false : true;
/* Text is users_judge.cat_prefs */ /* Text is users.cat_prefs */
$year = $report['year']; $year = $report['year'];
$catprefs = unserialize($text); $catprefs = unserialize($text);
if(!is_array($catprefs)) return ''; if(!is_array($catprefs)) return '';
@ -345,9 +345,8 @@ $report_judges_fields = array(
'name' => 'Judge -- Languages', 'name' => 'Judge -- Languages',
'header' => 'Lang', 'header' => 'Lang',
'width' => 19.05 /*mm*/, 'width' => 19.05 /*mm*/,
'table' => 'users_judge.languages', 'table' => 'users.languages',
'exec_function' => 'report_judges_languages', 'exec_function' => 'report_judges_languages'),
'components' => array('users_judge')),
'captain' => array( 'captain' => array(
'name' => 'Judge Team -- Team Captain? (Is the judge the captain? Yes/No)', 'name' => 'Judge Team -- Team Captain? (Is the judge the captain? Yes/No)',
@ -361,52 +360,45 @@ $report_judges_fields = array(
'name' => 'Judge -- Willing Chair', 'name' => 'Judge -- Willing Chair',
'header' => 'Will Chair?', 'header' => 'Will Chair?',
'width' => 25.4 /*mm*/, 'width' => 25.4 /*mm*/,
'table' => 'users_judge.willing_chair', 'table' => 'users.willing_chair',
'value_map' => array ('no' => 'No', 'yes' => 'Yes'), 'value_map' => array ('no' => 'No', 'yes' => 'Yes')),
'components' => array('users_judge')),
'special_award_only' => array( 'special_award_only' => array(
'name' => 'Judge -- Special Award Only Requested', 'name' => 'Judge -- Special Award Only Requested',
'header' => 'SA Only', 'header' => 'SA Only',
'width' => 20.32 /*mm*/, 'width' => 20.32 /*mm*/,
'table' => 'users_judge.special_award_only', 'table' => 'users.special_award_only'),
'components' => array('users_judge')),
'years_school' => array( 'years_school' => array(
'start_option_group' => 'Judge Experience', 'start_option_group' => 'Judge Experience',
'name' => 'Judge -- Years of Experience at School level', 'name' => 'Judge -- Years of Experience at School level',
'header' => 'Sch', 'header' => 'Sch',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.years_school', 'table' => 'users.years_school'),
'components' => array('users_judge')),
'years_regional' => array( 'years_regional' => array(
'name' => 'Judge -- Years of Experience at Regional level', 'name' => 'Judge -- Years of Experience at Regional level',
'header' => 'Rgn', 'header' => 'Rgn',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.years_regional', 'table' => 'users.years_regional'),
'components' => array('users_judge')),
'years_national' => array( 'years_national' => array(
'name' => 'Judge -- Years of Experience at National level', 'name' => 'Judge -- Years of Experience at National level',
'header' => 'Ntl', 'header' => 'Ntl',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.years_national', 'table' => 'users.years_national'),
'components' => array('users_judge')),
'highest_psd' => array( 'highest_psd' => array(
'name' => 'Judge -- Highest Post-Secondary Degree', 'name' => 'Judge -- Highest Post-Secondary Degree',
'header' => 'Highest PSD', 'header' => 'Highest PSD',
'width' => 31.75 /*mm*/, 'width' => 31.75 /*mm*/,
'table' => 'users_judge.highest_psd', 'table' => 'users.highest_psd'),
'components' => array('users_judge')),
'expertise_other' => array( 'expertise_other' => array(
'name' => 'Judge -- Other Expertise', 'name' => 'Judge -- Other Expertise',
'header' => 'Other Expertise', 'header' => 'Other Expertise',
'width' => 30 /*mm*/, 'width' => 30 /*mm*/,
'table' => 'users_judge.expertise_other', 'table' => 'users.expertise_other'),
'components' => array('users_judge')),
/* Headers for Division Expertise/Preference Selection */ /* Headers for Division Expertise/Preference Selection */
@ -414,49 +406,43 @@ $report_judges_fields = array(
'name' => 'Judge -- Divisions Selected as Expertise 5-Expert (Shortform)', 'name' => 'Judge -- Divisions Selected as Expertise 5-Expert (Shortform)',
'header' => 'Expert Div', 'header' => 'Expert Div',
'width' => 25.4 /*mm*/, 'width' => 25.4 /*mm*/,
'table' => 'users_judge.div_prefs', 'table' => 'users.div_prefs',
'exec_function' => 'report_judges_divs_at_exp', 'exec_function' => 'report_judges_divs_at_exp'),
'components' => array('users_judge')),
'divs_at_exp_5_long' => array( 'divs_at_exp_5_long' => array(
'name' => 'Judge -- Divisions Selected as Expertise 5-Expert (Full division names)', 'name' => 'Judge -- Divisions Selected as Expertise 5-Expert (Full division names)',
'header' => 'Expert Div', 'header' => 'Expert Div',
'width' => 38.1 /*mm*/, 'width' => 38.1 /*mm*/,
'table' => 'users_judge.div_prefs', 'table' => 'users.div_prefs',
'exec_function' => 'report_judges_divs_at_exp', /* Yes, the same function as divs_at_exp_5 */ 'exec_function' => 'report_judges_divs_at_exp'), /* Yes, the same function as divs_at_exp_5 */
'components' => array('users_judge')),
'divs_at_exp_4' => array( 'divs_at_exp_4' => array(
'name' => 'Judge -- Divisions Selected as Expertise 4 (Shortform)', 'name' => 'Judge -- Divisions Selected as Expertise 4 (Shortform)',
'header' => '4 Div', 'header' => '4 Div',
'width' => 25.4 /*mm*/, 'width' => 25.4 /*mm*/,
'table' => 'users_judge.div_prefs', 'table' => 'users.div_prefs',
'exec_function' => 'report_judges_divs_at_exp', 'exec_function' => 'report_judges_divs_at_exp'),
'components' => array('users_judge')),
'divs_at_exp_4_long' => array( 'divs_at_exp_4_long' => array(
'name' => 'Judge -- Divisions Selected as Expertise 4 (Full division names)', 'name' => 'Judge -- Divisions Selected as Expertise 4 (Full division names)',
'header' => '4 Div', 'header' => '4 Div',
'width' => 38.1 /*mm*/, 'width' => 38.1 /*mm*/,
'table' => 'users_judge.div_prefs', 'table' => 'users.div_prefs',
'exec_function' => 'report_judges_divs_at_exp', /* Yes, the same function as divs_at_exp_5 */ 'exec_function' => 'report_judges_divs_at_exp'), /* Yes, the same function as divs_at_exp_5 */
'components' => array('users_judge')),
'divs_at_exp_3' => array( 'divs_at_exp_3' => array(
'name' => 'Judge -- Divisions Selected as Expertise 3 (Shortform)', 'name' => 'Judge -- Divisions Selected as Expertise 3 (Shortform)',
'header' => '3 Div', 'header' => '3 Div',
'width' => 25.4 /*mm*/, 'width' => 25.4 /*mm*/,
'table' => 'users_judge.div_prefs', 'table' => 'users.div_prefs',
'exec_function' => 'report_judges_divs_at_exp', 'exec_function' => 'report_judges_divs_at_exp'),
'components' => array('users_judge')),
'divs_at_exp_3_long' => array( 'divs_at_exp_3_long' => array(
'name' => 'Judge -- Divisions Selected as Expertise 3 (Full division names)', 'name' => 'Judge -- Divisions Selected as Expertise 3 (Full division names)',
'header' => '3 Div', 'header' => '3 Div',
'width' => 38.1 /*mm*/, 'width' => 38.1 /*mm*/,
'table' => 'users_judge.div_prefs', 'table' => 'users.div_prefs',
'exec_function' => 'report_judges_divs_at_exp', /* Yes, the same function as divs_at_exp_5 */ 'exec_function' => 'report_judges_divs_at_exp'), /* Yes, the same function as divs_at_exp_5 */
'components' => array('users_judge')),
/* Fill these in below, they're all the same */ /* Fill these in below, they're all the same */
'div_exp_1' => array(), 'div_exp_2' => array(), 'div_exp_3' => array(), 'div_exp_4' => array(), 'div_exp_5' => array(), 'div_exp_1' => array(), 'div_exp_2' => array(), 'div_exp_3' => array(), 'div_exp_4' => array(), 'div_exp_5' => array(),
@ -477,130 +463,114 @@ $report_judges_fields = array(
'name' => 'Judge -- Age Categories Selected as Preference: Highest (Shortform)', 'name' => 'Judge -- Age Categories Selected as Preference: Highest (Shortform)',
'header' => 'Highest', 'header' => 'Highest',
'width' => 20.32 /*mm*/, 'width' => 20.32 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'exec_function' => 'report_judges_cats_at_pref', 'exec_function' => 'report_judges_cats_at_pref'),
'components' => array('users_judge')),
'cats_at_pref_H_long' => array( 'cats_at_pref_H_long' => array(
'name' => 'Judge -- Age Categories Selected as Preference: Highest (Full category names)', 'name' => 'Judge -- Age Categories Selected as Preference: Highest (Full category names)',
'header' => 'Highest', 'header' => 'Highest',
'width' => 30.48 /*mm*/, 'width' => 30.48 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'exec_function' => 'report_judges_cats_at_pref',/* Yes, the same function as cats_at_pref_H */ 'exec_function' => 'report_judges_cats_at_pref'),/* Yes, the same function as cats_at_pref_H */
'components' => array('users_judge')),
'cats_at_pref_h' => array( 'cats_at_pref_h' => array(
'name' => 'Judge -- Age Categories Selected as Preference: High (Shortform)', 'name' => 'Judge -- Age Categories Selected as Preference: High (Shortform)',
'header' => 'High', 'header' => 'High',
'width' => 20.32 /*mm*/, 'width' => 20.32 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'exec_function' => 'report_judges_cats_at_pref', 'exec_function' => 'report_judges_cats_at_pref'),
'components' => array('users_judge')),
'cats_at_pref_h_long' => array( 'cats_at_pref_h_long' => array(
'name' => 'Judge -- Age Categories Selected as Preference: High (Full category names)', 'name' => 'Judge -- Age Categories Selected as Preference: High (Full category names)',
'header' => 'High', 'header' => 'High',
'width' => 30.48 /*mm*/, 'width' => 30.48 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'exec_function' => 'report_judges_cats_at_pref',/* Yes, the same function as cats_at_pref_H */ 'exec_function' => 'report_judges_cats_at_pref'),/* Yes, the same function as cats_at_pref_H */
'components' => array('users_judge')),
'cats_at_pref_i' => array( 'cats_at_pref_i' => array(
'name' => 'Judge -- Age Categories Selected as Preference: Indifferent (Shortform)', 'name' => 'Judge -- Age Categories Selected as Preference: Indifferent (Shortform)',
'header' => 'Indifferent', 'header' => 'Indifferent',
'width' => 20.32 /*mm*/, 'width' => 20.32 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'exec_function' => 'report_judges_cats_at_pref', 'exec_function' => 'report_judges_cats_at_pref'),
'components' => array('users_judge')),
'cats_at_pref_i_long' => array( 'cats_at_pref_i_long' => array(
'name' => 'Judge -- Age Categories Selected as Preference: Indifferent (Full category names)', 'name' => 'Judge -- Age Categories Selected as Preference: Indifferent (Full category names)',
'header' => 'Indifferent', 'header' => 'Indifferent',
'width' => 30.48 /*mm*/, 'width' => 30.48 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'exec_function' => 'report_judges_cats_at_pref',/* Yes, the same function as cats_at_pref_H */ 'exec_function' => 'report_judges_cats_at_pref'),/* Yes, the same function as cats_at_pref_H */
'components' => array('users_judge')),
'cat_pref_1' => array( 'cat_pref_1' => array(
'name' => 'Judge -- Age Category Preference for Category ID 1', 'name' => 'Judge -- Age Category Preference for Category ID 1',
'header' => 'cat1', 'header' => 'cat1',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'editor_disabled' => true, /* Only disables in the report editor, a report can still use it */ 'editor_disabled' => true, /* Only disables in the report editor, a report can still use it */
'exec_function' => 'report_judges_cat_pref', 'exec_function' => 'report_judges_cat_pref'),
'components' => array('users_judge')),
'cat_pref_2' => array( 'cat_pref_2' => array(
'name' => 'Judge -- Age Category Preference for Category ID 2', 'name' => 'Judge -- Age Category Preference for Category ID 2',
'header' => 'cat2', 'header' => 'cat2',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'editor_disabled' => true, 'editor_disabled' => true,
'exec_function' => 'report_judges_cat_pref', 'exec_function' => 'report_judges_cat_pref'),
'components' => array('users_judge')),
'cat_pref_3' => array( 'cat_pref_3' => array(
'name' => 'Judge -- Age Category Preference for Category ID 3', 'name' => 'Judge -- Age Category Preference for Category ID 3',
'header' => 'cat3', 'header' => 'cat3',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'editor_disabled' => true, 'editor_disabled' => true,
'exec_function' => 'report_judges_cat_pref', 'exec_function' => 'report_judges_cat_pref'),
'components' => array('users_judge')),
'cat_pref_4' => array( 'cat_pref_4' => array(
'name' => 'Judge -- Age Category Preference for Category ID 4', 'name' => 'Judge -- Age Category Preference for Category ID 4',
'header' => 'cat4', 'header' => 'cat4',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'editor_disabled' => true, 'editor_disabled' => true,
'exec_function' => 'report_judges_cat_pref', 'exec_function' => 'report_judges_cat_pref'),
'components' => array('users_judge')),
'cat_pref_5' => array( 'cat_pref_5' => array(
'name' => 'Judge -- Age Category Preference for Category ID 5', 'name' => 'Judge -- Age Category Preference for Category ID 5',
'header' => 'cat5', 'header' => 'cat5',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'editor_disabled' => true, 'editor_disabled' => true,
'exec_function' => 'report_judges_cat_pref', 'exec_function' => 'report_judges_cat_pref'),
'components' => array('users_judge')),
'cat_pref_6' => array( 'cat_pref_6' => array(
'name' => 'Judge -- Age Category Preference for Category ID 6', 'name' => 'Judge -- Age Category Preference for Category ID 6',
'header' => 'cat6', 'header' => 'cat6',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'editor_disabled' => true, 'editor_disabled' => true,
'exec_function' => 'report_judges_cat_pref', 'exec_function' => 'report_judges_cat_pref'),
'components' => array('users_judge')),
'cat_pref_7' => array( 'cat_pref_7' => array(
'name' => 'Judge -- Age Category Preference for Category ID 7', 'name' => 'Judge -- Age Category Preference for Category ID 7',
'header' => 'cat7', 'header' => 'cat7',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'editor_disabled' => true, 'editor_disabled' => true,
'exec_function' => 'report_judges_cat_pref', 'exec_function' => 'report_judges_cat_pref'),
'components' => array('users_judge')),
'cat_pref_8' => array( 'cat_pref_8' => array(
'name' => 'Judge -- Age Category Preference for Category ID 8', 'name' => 'Judge -- Age Category Preference for Category ID 8',
'header' => 'cat8', 'header' => 'cat8',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'editor_disabled' => true, 'editor_disabled' => true,
'exec_function' => 'report_judges_cat_pref', 'exec_function' => 'report_judges_cat_pref'),
'components' => array('users_judge')),
'cat_pref_9' => array( 'cat_pref_9' => array(
'name' => 'Judge -- Age Category Preference for Category ID 9', 'name' => 'Judge -- Age Category Preference for Category ID 9',
'header' => 'cat9', 'header' => 'cat9',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'editor_disabled' => true, 'editor_disabled' => true,
'exec_function' => 'report_judges_cat_pref', 'exec_function' => 'report_judges_cat_pref'),
'components' => array('users_judge')),
'cat_pref_10' => array( 'cat_pref_10' => array(
'name' => 'Judge -- Age Category Preference for Category ID 10', 'name' => 'Judge -- Age Category Preference for Category ID 10',
'header' => 'cat10', 'header' => 'cat10',
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.cat_prefs', 'table' => 'users.cat_prefs',
'editor_disabled' => true, 'editor_disabled' => true,
'exec_function' => 'report_judges_cat_pref', 'exec_function' => 'report_judges_cat_pref'),
'components' => array('users_judge')),
/* Time Availability */ /* Time Availability */
'available_in_divisional1' => array( 'available_in_divisional1' => array(
@ -624,17 +594,15 @@ $report_judges_fields = array(
'name' => 'Judge -- Registration Complete', 'name' => 'Judge -- Registration Complete',
'header' => 'Cmpl', 'header' => 'Cmpl',
'width' => 10.16 /*mm*/, 'width' => 10.16 /*mm*/,
'table' => 'users_judge.judge_complete', 'table' => 'ROLE_JUDGE.complete',
'value_map' => array ('no' => 'No', 'yes' => 'Yes'), 'value_map' => array ('no' => 'No', 'yes' => 'Yes')),
'components' => array('users_judge')),
'active' => array( 'active' => array(
'name' => 'Judge -- Registration Active for this year', 'name' => 'Judge -- Registration Active for this year',
'header' => 'Act', 'header' => 'Act',
'width' => 10.16 /*mm*/, 'width' => 10.16 /*mm*/,
'table' => 'users_judge.judge_active', 'table' => 'ROLE_JUDGE.active',
'value_map' => array ('no' => 'No', 'yes' => 'Yes'), 'value_map' => array ('no' => 'No', 'yes' => 'Yes')),
'components' => array('users_judge')),
'year' => array( 'year' => array(
'name' => 'Judge -- Year', 'name' => 'Judge -- Year',
@ -648,11 +616,11 @@ $report_judges_fields = array(
'width' => 10 /*mm*/, 'width' => 10 /*mm*/,
'table' => 'users.id'), 'table' => 'users.id'),
'users_uid' => array( 'users_account_id' => array(
'name' => 'Judge -- User Unique ID', 'name' => 'Judge -- User Account ID (unique for a login)',
'header' => 'UID', 'header' => 'UID',
'width' => 10 /*mm*/, 'width' => 10 /*mm*/,
'table' => 'users.uid'), 'table' => 'users.accounts_id'),
'team' => array( 'team' => array(
@ -891,10 +859,9 @@ for($x=1;$x<=50;$x++) {
'name' => "Judge -- Expertise for Division ID $x", 'name' => "Judge -- Expertise for Division ID $x",
'header' => "div$x", 'header' => "div$x",
'width' => 12.7 /*mm*/, 'width' => 12.7 /*mm*/,
'table' => 'users_judge.div_prefs', 'table' => 'users.div_prefs',
'editor_disabled' => true, /* Only disables in the report editor, a report can still use it */ 'editor_disabled' => true, /* Only disables in the report editor, a report can still use it */
'exec_function' => 'report_judges_div_exp', 'exec_function' => 'report_judges_div_exp');
'components' => array('users_judge'));
} }
/* Overwrite the question_1 .. question_10 fields with the /* Overwrite the question_1 .. question_10 fields with the
@ -973,10 +940,6 @@ function report_judges_fromwhere($report, $components)
$report_judges_questions_updated = true; $report_judges_questions_updated = true;
} }
if(in_array('users_judge', $components)) {
$uj_from = 'LEFT JOIN users_judge ON users_judge.users_id=users.id';
}
$teams_from = ''; $teams_from = '';
$teams_where = ''; $teams_where = '';
if(in_array('teams', $components)) { if(in_array('teams', $components)) {
@ -1014,10 +977,11 @@ function report_judges_fromwhere($report, $components)
} }
$q = " FROM users $q = " FROM users
LEFT JOIN accounts ON accounts.id=users.accounts_id
LEFT JOIN user_roles as ROLE_JUDGE ON (ROLE_JUDGE.users_id=users.id AND ROLE_JUDGE.type='judge')
$teams_from $teams_from
$projects_from $projects_from
$students_from $students_from
$uj_from
WHERE WHERE
users.types LIKE '%judge%' users.types LIKE '%judge%'
$year_where $year_where

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("../lpdf.php"); require("../lpdf.php");
require("../lcsv.php"); require("../lcsv.php");
require("../questions.inc.php"); require("../questions.inc.php");

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("../lpdf.php"); require("../lpdf.php");
require("../lcsv.php"); require("../lcsv.php");
require("judges.inc.php"); require("judges.inc.php");

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Mailing Label Generator", send_header("Mailing Label Generator",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php', 'Administration' => 'admin/index.php',

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("../lpdf.php"); require("../lpdf.php");
require("../lcsv.php"); require("../lcsv.php");

View File

@ -25,7 +25,7 @@
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
require_once('reports.inc.php'); require_once('reports.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Reports", send_header("Reports",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php') 'Administration' => 'admin/index.php')

View File

@ -1,7 +1,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("../lpdf.php"); require("../lpdf.php");
require("../lcsv.php"); require("../lcsv.php");

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("../lpdf.php"); require("../lpdf.php");
require("../lcsv.php"); require("../lcsv.php");
require("judges.inc.php"); require("judges.inc.php");

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("../lpdf.php"); require("../lpdf.php");
require("../lcsv.php"); require("../lcsv.php");
require("judges.inc.php"); require("judges.inc.php");

View File

@ -55,7 +55,7 @@ $report_volunteers_fields = array(
'name' => 'Volunteer -- Email', 'name' => 'Volunteer -- Email',
'header' => 'Email', 'header' => 'Email',
'width' => 44.45 /*mm*/, 'width' => 44.45 /*mm*/,
'table' => 'users.email'), 'table' => 'accounts.email'),
'phone' => array( 'phone' => array(
'name' => 'Volunteer -- Phone', 'name' => 'Volunteer -- Phone',
@ -94,9 +94,8 @@ $report_volunteers_fields = array(
'name' => 'Volunteer -- Registration Complete', 'name' => 'Volunteer -- Registration Complete',
'header' => 'Cmpl', 'header' => 'Cmpl',
'width' => 10.16 /*mm*/, 'width' => 10.16 /*mm*/,
'table' => 'users_volunteer.volunteer_complete', 'table' => 'user_roles.complete',
'value_map' => array ('no' => 'No', 'yes' => 'Yes'), 'value_map' => array ('no' => 'No', 'yes' => 'Yes'));
'components' => array('users_volunteer')),
'position_name' => array ( 'position_name' => array (
'name' => 'Volunteer Position -- Name', 'name' => 'Volunteer Position -- Name',
@ -136,15 +135,10 @@ $report_volunteers_fields = array(
function report_volunteers_fromwhere($report, $components) function report_volunteers_fromwhere($report, $components)
{ {
global $config, $report_volutneers_fields; global $config;
$fields = $report_volutneers_fields;
$year = $report['year']; $year = $report['year'];
if(in_array('users_volunteer', $components)) {
$uv_from = 'LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id';
}
$signup_join = ''; $signup_join = '';
$signup_where = ''; $signup_where = '';
@ -156,12 +150,13 @@ $report_volunteers_fields = array(
$signup_where = "AND (volunteer_positions_signup.year = '$year' OR volunteer_positions_signup.year IS NULL)"; $signup_where = "AND (volunteer_positions_signup.year = '$year' OR volunteer_positions_signup.year IS NULL)";
} }
$q = " FROM $q = " FROM users
users LEFT JOIN user_roles on user_roles.users_id=users.id
LEFT JOIN accounts ON accounts.id=users.accounts_id
$signup_join $signup_join
$uv_from $uv_from
WHERE WHEE
users.types LIKE '%volunteer%' user_roles.type='volunteer'
AND users.year='$year' AND users.year='$year'
$signup_where $signup_where
"; ";

View File

@ -26,7 +26,7 @@
require_once("../user.inc.php"); require_once("../user.inc.php");
require_once("../schedule.inc.php"); require_once("../schedule.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
if($_GET['action']=="loadschedule") { if($_GET['action']=="loadschedule") {
$date=$_POST['date']; $date=$_POST['date'];

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
if($_POST['save']=="edit" || $_POST['save']=="add") if($_POST['save']=="edit" || $_POST['save']=="add")

View File

@ -26,7 +26,7 @@
require_once("../user.inc.php"); require_once("../user.inc.php");
require("../csvimport.inc.php"); require("../csvimport.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Schools Import", send_header("Schools Import",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Science Fair Management", send_header("Science Fair Management",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -24,7 +24,7 @@
<? <?
include "../common.inc.php"; include "../common.inc.php";
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
foreach($config['languages'] AS $l=>$ln) { foreach($config['languages'] AS $l=>$ln) {
if($l==$config['default_language']) continue; if($l==$config['default_language']) continue;

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Donor Contacts", send_header("Donor Contacts",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -24,7 +24,7 @@
<? <?
require_once('../common.inc.php'); require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
$auth_type = user_auth_required(array('fair','committee'), 'admin'); $auth_type = user_auth_required(array(), array('fair','admin'));
$registrations_id = intval($_GET['id']); $registrations_id = intval($_GET['id']);
$action = $_GET['action']; $action = $_GET['action'];

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Tours", send_header("Tours",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -25,7 +25,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
/* Load Tours */ /* Load Tours */
$query = "SELECT * FROM tours WHERE $query = "SELECT * FROM tours WHERE

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
require("../tours.class.php"); require("../tours.class.php");
require("../tableeditor.class.php"); require("../tableeditor.class.php");

View File

@ -26,7 +26,7 @@ ogram; see the file COPYING. If not, write to
require_once("../common.inc.php"); require_once("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
require_once("../config_editor.inc.php"); require_once("../config_editor.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
if($_GET['action']=="launch") { if($_GET['action']=="launch") {
exec("nice php tours_sa.php >/dev/null 2>&1 &"); exec("nice php tours_sa.php >/dev/null 2>&1 &");

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Translations", send_header("Translations",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -24,7 +24,7 @@
<? <?
require_once('../common.inc.php'); require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
$tabs = array( 'fairinfo' => array( $tabs = array( 'fairinfo' => array(

View File

@ -25,7 +25,7 @@
require_once('../common.inc.php'); require_once('../common.inc.php');
require_once('../user.inc.php'); require_once('../user.inc.php');
require_once('../judge.inc.php'); require_once('../judge.inc.php');
user_auth_required('committee', 'admin'); user_auth_required('admin');
require_once('judges.inc.php'); require_once('judges.inc.php');

View File

@ -26,7 +26,7 @@
require_once("../user.inc.php"); require_once("../user.inc.php");
require("../tableeditor.class.php"); require("../tableeditor.class.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Volunteer Positions Manager", send_header("Volunteer Positions Manager",
array("Committee Main" => 'committee_main.php', array("Committee Main" => 'committee_main.php',
"Administration" => "admin/", "Administration" => "admin/",

View File

@ -24,7 +24,7 @@
<? <?
require("../common.inc.php"); require("../common.inc.php");
require_once("../user.inc.php"); require_once("../user.inc.php");
user_auth_required('committee', 'admin'); user_auth_required('admin');
send_header("Volunteer Management", send_header("Volunteer Management",
array('Committee Main' => 'committee_main.php', array('Committee Main' => 'committee_main.php',

View File

@ -27,7 +27,7 @@ require_once('../user.inc.php');
require_once('../projects.inc.php'); require_once('../projects.inc.php');
require_once('../fair_additional_materials.inc.php'); require_once('../fair_additional_materials.inc.php');
$auth_type = user_auth_required(array('fair','committee'), 'admin'); $auth_type = user_auth_required(array(), array('fair','admin');
$award_awards_id = intval($_GET['award_awards_id']); $award_awards_id = intval($_GET['award_awards_id']);
$action = $_GET['action']; $action = $_GET['action'];