diff --git a/admin/award_awardcreatedivisional.php b/admin/award_awardcreatedivisional.php
index f69ef4e..cd3f37b 100644
--- a/admin/award_awardcreatedivisional.php
+++ b/admin/award_awardcreatedivisional.php
@@ -25,7 +25,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
require_once("awards.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
send_header('Create All Divisional Awards',
array('Committee Main' => 'committee_main.php',
diff --git a/admin/award_awards.php b/admin/award_awards.php
index 427ffcd..efdb7fd 100644
--- a/admin/award_awards.php
+++ b/admin/award_awards.php
@@ -24,7 +24,7 @@
require_once('../common.inc.php');
require_once('../user.inc.php');
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require_once('awards.inc.php');
switch($_GET['action']) {
diff --git a/admin/award_download.php b/admin/award_download.php
index 1483674..cfc187d 100644
--- a/admin/award_download.php
+++ b/admin/award_download.php
@@ -23,7 +23,7 @@
require_once('../common.inc.php');
require_once('../user.inc.php');
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require_once('curl.inc.php');
require_once('awards.inc.php');
diff --git a/admin/award_upload.php b/admin/award_upload.php
index 647d485..1119cc6 100644
--- a/admin/award_upload.php
+++ b/admin/award_upload.php
@@ -24,7 +24,7 @@ require_once('../common.inc.php');
require_once('../user.inc.php');
require_once('../projects.inc.php');
require_once('curl.inc.php');
-user_auth_required('committee', 'admin');
+user_auth_required('admin');
//function get_cwsf_award_winners()
function get_winners($awardid, $fairs_id)
diff --git a/admin/awards.php b/admin/awards.php
index a908ccc..0eb065f 100644
--- a/admin/awards.php
+++ b/admin/awards.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
send_header("Awards",
array('Committee Main' => 'committee_main.php',
diff --git a/admin/cms.php b/admin/cms.php
index 06103f4..a993bb5 100644
--- a/admin/cms.php
+++ b/admin/cms.php
@@ -23,7 +23,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
//make sure storage folder exists
if(!file_exists("../data/userfiles"))
diff --git a/admin/committees.php b/admin/committees.php
index 389fb5c..e64a7d3 100644
--- a/admin/committees.php
+++ b/admin/committees.php
@@ -26,7 +26,7 @@
require_once("../user.inc.php");
require_once("../committee.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
if($_POST['users_uid'])
$uid = intval($_POST['users_uid']);
diff --git a/admin/communication.php b/admin/communication.php
index 8fc1c25..9e7dddd 100644
--- a/admin/communication.php
+++ b/admin/communication.php
@@ -24,7 +24,7 @@
require_once("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
function launchQueue() {
if(!file_exists("../data/logs")) {
diff --git a/admin/communication_send_status.php b/admin/communication_send_status.php
index a1a874e..889556a 100644
--- a/admin/communication_send_status.php
+++ b/admin/communication_send_status.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
if($_GET['action']=="status") {
$q=mysql_query("SELECT * FROM emailqueue WHERE finished IS NULL");
diff --git a/admin/curl.inc.php b/admin/curl.inc.php
index 4903242..d1eb9a6 100644
--- a/admin/curl.inc.php
+++ b/admin/curl.inc.php
@@ -24,7 +24,7 @@
require_once('../common.inc.php');
require_once('../user.inc.php');
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require_once('xml.inc.php');
function xml_dearray(&$array)
diff --git a/admin/cwsfregister.php b/admin/cwsfregister.php
index 4a0f9a1..3bb698c 100644
--- a/admin/cwsfregister.php
+++ b/admin/cwsfregister.php
@@ -122,7 +122,7 @@ include "xml.inc.php";
require("../common.inc.php");
require("../projects.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
send_header("One-Click CWSF Registration",
array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php'),
diff --git a/admin/documentdownloader.php b/admin/documentdownloader.php
index 0efec64..1f77cfc 100644
--- a/admin/documentdownloader.php
+++ b/admin/documentdownloader.php
@@ -23,7 +23,7 @@
require("../common.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']."'");
if($r=mysql_fetch_object($q))
{
diff --git a/admin/documents.php b/admin/documents.php
index 3ae9f8c..64d3129 100644
--- a/admin/documents.php
+++ b/admin/documents.php
@@ -31,7 +31,7 @@
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');
+ user_auth_required('admin');
send_header("Internal Document Manager",
array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php'),
diff --git a/admin/donations.php b/admin/donations.php
index 9921e8a..9521aaa 100644
--- a/admin/donations.php
+++ b/admin/donations.php
@@ -25,7 +25,7 @@
require("../tableeditor.class.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
include ("fundraising_sponsorship_handler.inc.php");
include ("fundraising_goals_handler.inc.php");
diff --git a/admin/donors.php b/admin/donors.php
index ae5cb74..7eb752e 100644
--- a/admin/donors.php
+++ b/admin/donors.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
-user_auth_required('committee', 'admin');
+user_auth_required('admin');
require_once("fundraising_common.inc.php");
diff --git a/admin/donors_search.php b/admin/donors_search.php
index 3ad0fe7..0ff959f 100644
--- a/admin/donors_search.php
+++ b/admin/donors_search.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
echo "
\n";
//$q=mysql_query("SELECT * FROM award_sponsors WHERE year='".$config['FAIRYEAR']."' ORDER BY organization");
diff --git a/admin/events.php b/admin/events.php
index 6ba4c83..80ab229 100644
--- a/admin/events.php
+++ b/admin/events.php
@@ -25,7 +25,7 @@
require("../common.inc.php");
require("../tableeditor.class.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
send_header("Events Management",
array('Committee Main' => 'committee_main.php',
diff --git a/admin/eventsscheduling.php b/admin/eventsscheduling.php
index 8a388b2..30e7a2b 100644
--- a/admin/eventsscheduling.php
+++ b/admin/eventsscheduling.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
send_header("Events & Scheduling",
array('Committee Main' => 'committee_main.php',
diff --git a/admin/export_checkin.php b/admin/export_checkin.php
index 456b1d2..d972f16 100644
--- a/admin/export_checkin.php
+++ b/admin/export_checkin.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require("../lpdf.php");
$catq=mysql_query("SELECT * FROM projectcategories WHERE year='".$config['FAIRYEAR']."' AND id='".$_GET['cat']."'");
diff --git a/admin/fair_stats.php b/admin/fair_stats.php
index c55f62f..ca5b988 100644
--- a/admin/fair_stats.php
+++ b/admin/fair_stats.php
@@ -24,7 +24,7 @@
require_once('../common.inc.php');
require_once('../user.inc.php');
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require_once('xml.inc.php');
require_once('stats.inc.php');
require_once('curl.inc.php');
diff --git a/admin/fair_stats_select.php b/admin/fair_stats_select.php
index 3d9050a..94ef632 100644
--- a/admin/fair_stats_select.php
+++ b/admin/fair_stats_select.php
@@ -37,7 +37,7 @@
'delegates' => 'Delegate information/jacket size for CWSF',
);
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
switch($_GET['action']) {
diff --git a/admin/fix_judges_autocomplete.php b/admin/fix_judges_autocomplete.php
index dec1036..22c96a4 100644
--- a/admin/fix_judges_autocomplete.php
+++ b/admin/fix_judges_autocomplete.php
@@ -3,7 +3,7 @@
require_once("../common.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");
while($i = mysql_fetch_object($q)) {
diff --git a/admin/fundraising.php b/admin/fundraising.php
index b122085..746390e 100644
--- a/admin/fundraising.php
+++ b/admin/fundraising.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
if($_GET['action']=="refresh") {
?>
diff --git a/admin/fundraising_campaigns.php b/admin/fundraising_campaigns.php
index e1823da..a44dc36 100644
--- a/admin/fundraising_campaigns.php
+++ b/admin/fundraising_campaigns.php
@@ -23,7 +23,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require("fundraising_common.inc.php");
switch($_GET['action']){
diff --git a/admin/fundraising_campaigns_prospecting.php b/admin/fundraising_campaigns_prospecting.php
index fabf027..dec8229 100644
--- a/admin/fundraising_campaigns_prospecting.php
+++ b/admin/fundraising_campaigns_prospecting.php
@@ -23,7 +23,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require("fundraising_common.inc.php");
$userslist=array();
diff --git a/admin/fundraising_reports.php b/admin/fundraising_reports.php
index 0210e76..a4aa9c4 100644
--- a/admin/fundraising_reports.php
+++ b/admin/fundraising_reports.php
@@ -23,7 +23,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require("fundraising_common.inc.php");
send_header("Fundraising Reports",
diff --git a/admin/fundraising_reports_std.php b/admin/fundraising_reports_std.php
index ff993a7..7556449 100644
--- a/admin/fundraising_reports_std.php
+++ b/admin/fundraising_reports_std.php
@@ -23,7 +23,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require("fundraising_common.inc.php");
require_once("../lpdf.php");
require_once("../lcsv.php");
diff --git a/admin/fundraising_setup.php b/admin/fundraising_setup.php
index 716ce42..95e8c19 100644
--- a/admin/fundraising_setup.php
+++ b/admin/fundraising_setup.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
//first, insert any default fundraising donor levels
$q=mysql_query("SELECT * FROM fundraising_donor_levels WHERE fiscalyear='".$config['FISCALYEAR']."'");
diff --git a/admin/fundraising_sponsorship.php b/admin/fundraising_sponsorship.php
index d0fb039..0cb6a43 100644
--- a/admin/fundraising_sponsorship.php
+++ b/admin/fundraising_sponsorship.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
if($_GET['id']) {
$id=intval($_GET['id']);
diff --git a/admin/fundraising_types.php b/admin/fundraising_types.php
index b4793cd..5441fe0 100644
--- a/admin/fundraising_types.php
+++ b/admin/fundraising_types.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
if($_GET['id']) {
$id=intval($_GET['id']);
diff --git a/admin/gettranslation.php b/admin/gettranslation.php
index 063e2af..3b62a18 100644
--- a/admin/gettranslation.php
+++ b/admin/gettranslation.php
@@ -24,7 +24,7 @@
include "../common.inc.php";
require_once("../user.inc.php");
-user_auth_required('committee', 'admin');
+user_auth_required('admin');
$ret=array();
foreach($config['languages'] AS $l=>$ln) {
if($l==$config['default_language']) continue;
diff --git a/admin/index.php b/admin/index.php
index fab6a3c..559a1b7 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -26,7 +26,7 @@
require_once("../user.inc.php");
require_once("../committee.inc.php");
- user_auth_required('committee','admin');
+ user_auth_required('admin');
send_header("Administration",
array('Committee Main' => 'committee_main.php'),
diff --git a/admin/judges.php b/admin/judges.php
index 1aa7320..0563b5e 100644
--- a/admin/judges.php
+++ b/admin/judges.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
send_header("Judges",
array('Committee Main' => 'committee_main.php',
diff --git a/admin/judges_info.php b/admin/judges_info.php
index 3b6b6ae..ca22dbc 100644
--- a/admin/judges_info.php
+++ b/admin/judges_info.php
@@ -29,7 +29,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
$preferencechoices=array(
-2=>"Very Low",
diff --git a/admin/judges_invite.php b/admin/judges_invite.php
index 488fa33..52e2713 100644
--- a/admin/judges_invite.php
+++ b/admin/judges_invite.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
include "judges.inc.php";
send_header("Invite Judges",
diff --git a/admin/judges_jdiv.php b/admin/judges_jdiv.php
index e5983b7..537e530 100644
--- a/admin/judges_jdiv.php
+++ b/admin/judges_jdiv.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
include "judges.inc.php";
send_header("Judging Division Groupings",
diff --git a/admin/judges_schedulerconfig.php b/admin/judges_schedulerconfig.php
index a73aff4..9f3f1d3 100644
--- a/admin/judges_schedulerconfig.php
+++ b/admin/judges_schedulerconfig.php
@@ -26,7 +26,7 @@ ogram; see the file COPYING. If not, write to
require("../common.inc.php");
require_once("../user.inc.php");
require("../config_editor.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require("judges.inc.php");
require("judges_schedulerconfig_check.inc.php");
diff --git a/admin/judges_teams.php b/admin/judges_teams.php
index 753f4fc..2d1112a 100644
--- a/admin/judges_teams.php
+++ b/admin/judges_teams.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
include "judges.inc.php";
if($_GET['edit']) $edit=$_GET['edit'];
diff --git a/admin/judges_teams_members.php b/admin/judges_teams_members.php
index 143528e..0099470 100644
--- a/admin/judges_teams_members.php
+++ b/admin/judges_teams_members.php
@@ -24,7 +24,7 @@
require_once('../common.inc.php');
require_once('../user.inc.php');
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require_once('judges.inc.php');
send_header("Judging Team Members",
diff --git a/admin/judges_teams_projects.php b/admin/judges_teams_projects.php
index 7b4f9c8..108ecfc 100644
--- a/admin/judges_teams_projects.php
+++ b/admin/judges_teams_projects.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require("judges.inc.php");
require("../projects.inc.php");
diff --git a/admin/judges_teams_timeslots.php b/admin/judges_teams_timeslots.php
index f98219e..fa3f5b7 100644
--- a/admin/judges_teams_timeslots.php
+++ b/admin/judges_teams_timeslots.php
@@ -24,7 +24,7 @@
require_once('../common.inc.php');
require_once('../user.inc.php');
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require_once('judges.inc.php');
$round_str = array('timeslot' => 'Judging Timeslot',
diff --git a/admin/judges_timeslots.php b/admin/judges_timeslots.php
index 28de931..877f453 100644
--- a/admin/judges_timeslots.php
+++ b/admin/judges_timeslots.php
@@ -24,7 +24,7 @@
require_once('../common.inc.php');
require_once('../user.inc.php');
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
$round_str = array('timeslot' => 'Judging Timeslot',
'divisional1' => 'Divisional Round 1',
diff --git a/admin/judging_score_edit.php b/admin/judging_score_edit.php
index 3013f89..8bceaf2 100644
--- a/admin/judging_score_edit.php
+++ b/admin/judging_score_edit.php
@@ -25,7 +25,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
require_once("judges.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
send_header("Judging Score Entry - Update",
array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php',
diff --git a/admin/judging_score_entry.php b/admin/judging_score_entry.php
index 9bc7224..9547408 100644
--- a/admin/judging_score_entry.php
+++ b/admin/judging_score_entry.php
@@ -25,7 +25,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
require_once("judges.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
if($_GET['year']) $year=$_GET['year'];
else $year=$config['FAIRYEAR'];
diff --git a/admin/locations.php b/admin/locations.php
index 43e7fe9..86a0fd7 100644
--- a/admin/locations.php
+++ b/admin/locations.php
@@ -25,7 +25,7 @@
require("../common.inc.php");
require("../tableeditor.class.php");
require_once("../user.inc.php");
-user_auth_required('committee', 'admin');
+user_auth_required('admin');
send_header("Event Locations",
array('Committee Main' => 'committee_main.php',
diff --git a/admin/project_editor.php b/admin/project_editor.php
index 4a0cb8a..ac1716f 100644
--- a/admin/project_editor.php
+++ b/admin/project_editor.php
@@ -26,8 +26,7 @@ require_once('../common.inc.php');
require_once('../user.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']);
$action = $_GET['action'];
diff --git a/admin/regfee_items_manager.php b/admin/regfee_items_manager.php
index 40fc984..5232fbd 100644
--- a/admin/regfee_items_manager.php
+++ b/admin/regfee_items_manager.php
@@ -25,7 +25,7 @@
require("../tableeditor.class.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
send_header("Registration Fee Items Manager",
array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php'),
diff --git a/admin/registration.php b/admin/registration.php
index 0a632c1..6dc03df 100644
--- a/admin/registration.php
+++ b/admin/registration.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
send_header("Participant Registration",
array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php'),
diff --git a/admin/registration_list.php b/admin/registration_list.php
index 9857c4d..7bfdc3e 100644
--- a/admin/registration_list.php
+++ b/admin/registration_list.php
@@ -25,7 +25,7 @@
require_once('../common.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');
diff --git a/admin/registration_receivedforms.php b/admin/registration_receivedforms.php
index 53b58ff..0669cad 100644
--- a/admin/registration_receivedforms.php
+++ b/admin/registration_receivedforms.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require("../register_participants.inc.php");
send_header("Input Received Signature Forms",
diff --git a/admin/registration_stats.php b/admin/registration_stats.php
index 2f20fa7..f4074c5 100644
--- a/admin/registration_stats.php
+++ b/admin/registration_stats.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require("../register_participants.inc.php");
if($_GET['year']) $year=$_GET['year'];
diff --git a/admin/registration_webconsent.php b/admin/registration_webconsent.php
index 075c7c8..de069cc 100644
--- a/admin/registration_webconsent.php
+++ b/admin/registration_webconsent.php
@@ -24,7 +24,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
send_header("Web Consent",
array('Committee Main' => 'committee_main.php',
diff --git a/admin/reports.php b/admin/reports.php
index 617e3e2..30db59c 100644
--- a/admin/reports.php
+++ b/admin/reports.php
@@ -36,7 +36,7 @@ switch($_GET['action']) {
case 'remove_report':
$id = intval($_GET['id']);
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');
exit;
case 'reload':
@@ -67,7 +67,7 @@ case 'load_report':
/* Load available categories */
$q = mysql_query("SELECT DISTINCT category FROM reports_committee
- WHERE users_id='{$_SESSION['users_uid']}'
+ WHERE users_id='{$_SESSION['accounts_id']}'
ORDER BY category");
while($i = mysql_fetch_object($q))
$ret['cat'][] = $i->category;
@@ -82,7 +82,7 @@ case 'save':
if($id == -1) {
/* New entry */
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();
$id = mysql_insert_id();
}
@@ -240,7 +240,7 @@ $(document).ready(function() {
$q = mysql_query("SELECT reports_committee.*,reports.name
FROM reports_committee
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");
echo mysql_error();
if(mysql_num_rows($q) == 0) {
diff --git a/admin/reports_acscript.php b/admin/reports_acscript.php
index f6dad03..254f1b6 100644
--- a/admin/reports_acscript.php
+++ b/admin/reports_acscript.php
@@ -1,7 +1,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require("../lpdf.php");
require("../lcsv.php");
diff --git a/admin/reports_appeal_letters.php b/admin/reports_appeal_letters.php
index 5c181a9..ddfffeb 100644
--- a/admin/reports_appeal_letters.php
+++ b/admin/reports_appeal_letters.php
@@ -24,7 +24,7 @@
require_once('../common.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.php');
diff --git a/admin/reports_ceremony.php b/admin/reports_ceremony.php
index 573f455..9589e0c 100644
--- a/admin/reports_ceremony.php
+++ b/admin/reports_ceremony.php
@@ -25,7 +25,7 @@
require("../common.inc.php");
require_once("../user.inc.php");
require_once('reports.inc.php');
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
send_header("Award Ceremony Scripts",
array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php'),
diff --git a/admin/reports_committees.inc.php b/admin/reports_committees.inc.php
index 03f7d77..2f95cf4 100644
--- a/admin/reports_committees.inc.php
+++ b/admin/reports_committees.inc.php
@@ -47,7 +47,7 @@ $report_committees_fields = array(
'name' => 'Committee Member -- Email',
'header' => 'Email',
'width' => 50.8 /*mm*/,
- 'table' => 'users.email'),
+ 'table' => 'accounts.email'),
'phone_home' => array(
'name' => 'Committee Member -- Phone (Home)',
@@ -160,10 +160,11 @@ $report_committees_fields = array(
AND committees_teams.year='$year'";
}
*/
- $q = " FROM
- users
+ $q = " FROM users
+ LEFT JOIN user_roles on user_roles.users_id=users.id
+ LEFT JOIN accounts ON accounts.id=users.accounts_id
WHERE
- users.types LIKE '%committee%'
+ user_role.type='committee'
";
return $q;
diff --git a/admin/reports_editor.php b/admin/reports_editor.php
index bf5529e..45641b6 100644
--- a/admin/reports_editor.php
+++ b/admin/reports_editor.php
@@ -24,7 +24,7 @@
require("../common.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_judges.inc.php');
diff --git a/admin/reports_fairs.inc.php b/admin/reports_fairs.inc.php
index 69073c1..dcf8ca2 100644
--- a/admin/reports_fairs.inc.php
+++ b/admin/reports_fairs.inc.php
@@ -427,15 +427,15 @@ $report_fairs_fields = array(
if(in_array('fairs_stats', $components)) {
$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
$fs_from
WHERE
- 1 AND
$fs_where
+ 1
";
return $q;
diff --git a/admin/reports_fundraising.inc.php b/admin/reports_fundraising.inc.php
index cca5a18..ce0b892 100644
--- a/admin/reports_fundraising.inc.php
+++ b/admin/reports_fundraising.inc.php
@@ -143,7 +143,7 @@ $report_fundraisings_fields = array(
'header' => '',
'width' => 2.54 /*mm*/,
'table' => 'MAX(users.year)',
- 'group_by' => array('users.uid'),
+ 'group_by' => array('users.accounts_id'),
'components' => array('users') ),
'static_text' => array(
@@ -183,7 +183,7 @@ $report_fundraisings_fields = array(
if(in_array('users', $components)) {
$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';
$users_where = "users.deleted!='yes' AND";
}
diff --git a/admin/reports_gen.php b/admin/reports_gen.php
index 48857cb..8e26f76 100644
--- a/admin/reports_gen.php
+++ b/admin/reports_gen.php
@@ -24,7 +24,7 @@
require_once("../common.inc.php");
require_once("../user.inc.php");
- user_auth_required('committee', 'admin');
+ user_auth_required('admin');
require_once('reports.inc.php');
@@ -89,7 +89,7 @@ case 'dialog_gen':
/* See if the report is in this committee member's list */
$q = mysql_query("SELECT * FROM reports_committee
- WHERE users_id='{$_SESSION['users_uid']}'
+ WHERE users_id='{$_SESSION['accounts_id']}'
AND reports_id='{$report['id']}'");
if(mysql_num_rows($q) > 0) {
$i = mysql_fetch_assoc($q);
@@ -216,7 +216,7 @@ case 'dialog_gen':
echo '