forked from science-ation/science-ation
Convert to new user_auth_required. Some report edits too that I don't
feel like filtering out
This commit is contained in:
parent
8d1c6e1cd4
commit
ad0468e4e1
@ -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',
|
||||
|
@ -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']) {
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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',
|
||||
|
@ -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"))
|
||||
|
@ -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']);
|
||||
|
@ -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")) {
|
||||
|
@ -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");
|
||||
|
@ -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)
|
||||
|
@ -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'),
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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'),
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
echo "<br />\n";
|
||||
|
||||
//$q=mysql_query("SELECT * FROM award_sponsors WHERE year='".$config['FAIRYEAR']."' ORDER BY organization");
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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']."'");
|
||||
|
@ -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');
|
||||
|
@ -37,7 +37,7 @@
|
||||
'delegates' => 'Delegate information/jacket size for CWSF',
|
||||
);
|
||||
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
|
||||
|
||||
switch($_GET['action']) {
|
||||
|
@ -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)) {
|
||||
|
@ -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") {
|
||||
?>
|
||||
|
@ -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']){
|
||||
|
@ -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();
|
||||
|
@ -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",
|
||||
|
@ -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");
|
||||
|
@ -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']."'");
|
||||
|
@ -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']);
|
||||
|
@ -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']);
|
||||
|
@ -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;
|
||||
|
@ -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'),
|
||||
|
@ -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',
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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'];
|
||||
|
@ -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",
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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'];
|
||||
|
@ -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',
|
||||
|
@ -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'];
|
||||
|
@ -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'),
|
||||
|
@ -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'),
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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'];
|
||||
|
@ -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',
|
||||
|
@ -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) {
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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');
|
||||
|
@ -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'),
|
||||
|
@ -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;
|
||||
|
@ -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');
|
||||
|
@ -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;
|
||||
|
@ -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";
|
||||
}
|
||||
|
@ -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 '<tr><td colspan="2"><hr /></td></tr>';
|
||||
/* 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']}'");
|
||||
echo "<tr><td colspan=\"2\"><h3>".i18n('My Reports Info')."</h3></td></tr>";
|
||||
if(mysql_num_rows($q) > 0) {
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
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 */
|
||||
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);
|
||||
$long = (strlen($field) == 13) ? false : true;
|
||||
|
||||
/* Text is users_judge.div_prefs */
|
||||
/* Text is users.div_prefs */
|
||||
$year = $report['year'];
|
||||
$divprefs = unserialize($text);
|
||||
if(!is_array($divprefs)) return '';
|
||||
@ -98,7 +98,7 @@ function report_judges_cats_at_pref(&$report, $field, $text)
|
||||
$pref = $prefs[substr($field, 13,1)];
|
||||
$long = (strlen($field) == 14) ? false : true;
|
||||
|
||||
/* Text is users_judge.cat_prefs */
|
||||
/* Text is users.cat_prefs */
|
||||
$year = $report['year'];
|
||||
$catprefs = unserialize($text);
|
||||
if(!is_array($catprefs)) return '';
|
||||
@ -345,9 +345,8 @@ $report_judges_fields = array(
|
||||
'name' => 'Judge -- Languages',
|
||||
'header' => 'Lang',
|
||||
'width' => 19.05 /*mm*/,
|
||||
'table' => 'users_judge.languages',
|
||||
'exec_function' => 'report_judges_languages',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.languages',
|
||||
'exec_function' => 'report_judges_languages'),
|
||||
|
||||
'captain' => array(
|
||||
'name' => 'Judge Team -- Team Captain? (Is the judge the captain? Yes/No)',
|
||||
@ -361,52 +360,45 @@ $report_judges_fields = array(
|
||||
'name' => 'Judge -- Willing Chair',
|
||||
'header' => 'Will Chair?',
|
||||
'width' => 25.4 /*mm*/,
|
||||
'table' => 'users_judge.willing_chair',
|
||||
'value_map' => array ('no' => 'No', 'yes' => 'Yes'),
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.willing_chair',
|
||||
'value_map' => array ('no' => 'No', 'yes' => 'Yes')),
|
||||
|
||||
'special_award_only' => array(
|
||||
'name' => 'Judge -- Special Award Only Requested',
|
||||
'header' => 'SA Only',
|
||||
'width' => 20.32 /*mm*/,
|
||||
'table' => 'users_judge.special_award_only',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.special_award_only'),
|
||||
|
||||
'years_school' => array(
|
||||
'start_option_group' => 'Judge Experience',
|
||||
'name' => 'Judge -- Years of Experience at School level',
|
||||
'header' => 'Sch',
|
||||
'width' => 12.7 /*mm*/,
|
||||
'table' => 'users_judge.years_school',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.years_school'),
|
||||
|
||||
'years_regional' => array(
|
||||
'name' => 'Judge -- Years of Experience at Regional level',
|
||||
'header' => 'Rgn',
|
||||
'width' => 12.7 /*mm*/,
|
||||
'table' => 'users_judge.years_regional',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.years_regional'),
|
||||
|
||||
'years_national' => array(
|
||||
'name' => 'Judge -- Years of Experience at National level',
|
||||
'header' => 'Ntl',
|
||||
'width' => 12.7 /*mm*/,
|
||||
'table' => 'users_judge.years_national',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.years_national'),
|
||||
|
||||
'highest_psd' => array(
|
||||
'name' => 'Judge -- Highest Post-Secondary Degree',
|
||||
'header' => 'Highest PSD',
|
||||
'width' => 31.75 /*mm*/,
|
||||
'table' => 'users_judge.highest_psd',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.highest_psd'),
|
||||
|
||||
'expertise_other' => array(
|
||||
'name' => 'Judge -- Other Expertise',
|
||||
'header' => 'Other Expertise',
|
||||
'width' => 30 /*mm*/,
|
||||
'table' => 'users_judge.expertise_other',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.expertise_other'),
|
||||
|
||||
/* Headers for Division Expertise/Preference Selection */
|
||||
|
||||
@ -414,49 +406,43 @@ $report_judges_fields = array(
|
||||
'name' => 'Judge -- Divisions Selected as Expertise 5-Expert (Shortform)',
|
||||
'header' => 'Expert Div',
|
||||
'width' => 25.4 /*mm*/,
|
||||
'table' => 'users_judge.div_prefs',
|
||||
'exec_function' => 'report_judges_divs_at_exp',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.div_prefs',
|
||||
'exec_function' => 'report_judges_divs_at_exp'),
|
||||
|
||||
'divs_at_exp_5_long' => array(
|
||||
'name' => 'Judge -- Divisions Selected as Expertise 5-Expert (Full division names)',
|
||||
'header' => 'Expert Div',
|
||||
'width' => 38.1 /*mm*/,
|
||||
'table' => 'users_judge.div_prefs',
|
||||
'exec_function' => 'report_judges_divs_at_exp', /* Yes, the same function as divs_at_exp_5 */
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.div_prefs',
|
||||
'exec_function' => 'report_judges_divs_at_exp'), /* Yes, the same function as divs_at_exp_5 */
|
||||
|
||||
'divs_at_exp_4' => array(
|
||||
'name' => 'Judge -- Divisions Selected as Expertise 4 (Shortform)',
|
||||
'header' => '4 Div',
|
||||
'width' => 25.4 /*mm*/,
|
||||
'table' => 'users_judge.div_prefs',
|
||||
'exec_function' => 'report_judges_divs_at_exp',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.div_prefs',
|
||||
'exec_function' => 'report_judges_divs_at_exp'),
|
||||
|
||||
'divs_at_exp_4_long' => array(
|
||||
'name' => 'Judge -- Divisions Selected as Expertise 4 (Full division names)',
|
||||
'header' => '4 Div',
|
||||
'width' => 38.1 /*mm*/,
|
||||
'table' => 'users_judge.div_prefs',
|
||||
'exec_function' => 'report_judges_divs_at_exp', /* Yes, the same function as divs_at_exp_5 */
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.div_prefs',
|
||||
'exec_function' => 'report_judges_divs_at_exp'), /* Yes, the same function as divs_at_exp_5 */
|
||||
|
||||
'divs_at_exp_3' => array(
|
||||
'name' => 'Judge -- Divisions Selected as Expertise 3 (Shortform)',
|
||||
'header' => '3 Div',
|
||||
'width' => 25.4 /*mm*/,
|
||||
'table' => 'users_judge.div_prefs',
|
||||
'exec_function' => 'report_judges_divs_at_exp',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.div_prefs',
|
||||
'exec_function' => 'report_judges_divs_at_exp'),
|
||||
|
||||
'divs_at_exp_3_long' => array(
|
||||
'name' => 'Judge -- Divisions Selected as Expertise 3 (Full division names)',
|
||||
'header' => '3 Div',
|
||||
'width' => 38.1 /*mm*/,
|
||||
'table' => 'users_judge.div_prefs',
|
||||
'exec_function' => 'report_judges_divs_at_exp', /* Yes, the same function as divs_at_exp_5 */
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.div_prefs',
|
||||
'exec_function' => 'report_judges_divs_at_exp'), /* Yes, the same function as divs_at_exp_5 */
|
||||
|
||||
/* 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(),
|
||||
@ -477,130 +463,114 @@ $report_judges_fields = array(
|
||||
'name' => 'Judge -- Age Categories Selected as Preference: Highest (Shortform)',
|
||||
'header' => 'Highest',
|
||||
'width' => 20.32 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'exec_function' => 'report_judges_cats_at_pref',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.cat_prefs',
|
||||
'exec_function' => 'report_judges_cats_at_pref'),
|
||||
|
||||
'cats_at_pref_H_long' => array(
|
||||
'name' => 'Judge -- Age Categories Selected as Preference: Highest (Full category names)',
|
||||
'header' => 'Highest',
|
||||
'width' => 30.48 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'exec_function' => 'report_judges_cats_at_pref',/* Yes, the same function as cats_at_pref_H */
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.cat_prefs',
|
||||
'exec_function' => 'report_judges_cats_at_pref'),/* Yes, the same function as cats_at_pref_H */
|
||||
|
||||
'cats_at_pref_h' => array(
|
||||
'name' => 'Judge -- Age Categories Selected as Preference: High (Shortform)',
|
||||
'header' => 'High',
|
||||
'width' => 20.32 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'exec_function' => 'report_judges_cats_at_pref',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.cat_prefs',
|
||||
'exec_function' => 'report_judges_cats_at_pref'),
|
||||
|
||||
'cats_at_pref_h_long' => array(
|
||||
'name' => 'Judge -- Age Categories Selected as Preference: High (Full category names)',
|
||||
'header' => 'High',
|
||||
'width' => 30.48 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'exec_function' => 'report_judges_cats_at_pref',/* Yes, the same function as cats_at_pref_H */
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.cat_prefs',
|
||||
'exec_function' => 'report_judges_cats_at_pref'),/* Yes, the same function as cats_at_pref_H */
|
||||
|
||||
'cats_at_pref_i' => array(
|
||||
'name' => 'Judge -- Age Categories Selected as Preference: Indifferent (Shortform)',
|
||||
'header' => 'Indifferent',
|
||||
'width' => 20.32 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'exec_function' => 'report_judges_cats_at_pref',
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.cat_prefs',
|
||||
'exec_function' => 'report_judges_cats_at_pref'),
|
||||
|
||||
'cats_at_pref_i_long' => array(
|
||||
'name' => 'Judge -- Age Categories Selected as Preference: Indifferent (Full category names)',
|
||||
'header' => 'Indifferent',
|
||||
'width' => 30.48 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'exec_function' => 'report_judges_cats_at_pref',/* Yes, the same function as cats_at_pref_H */
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'users.cat_prefs',
|
||||
'exec_function' => 'report_judges_cats_at_pref'),/* Yes, the same function as cats_at_pref_H */
|
||||
|
||||
'cat_pref_1' => array(
|
||||
'name' => 'Judge -- Age Category Preference for Category ID 1',
|
||||
'header' => 'cat1',
|
||||
'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 */
|
||||
'exec_function' => 'report_judges_cat_pref',
|
||||
'components' => array('users_judge')),
|
||||
'exec_function' => 'report_judges_cat_pref'),
|
||||
'cat_pref_2' => array(
|
||||
'name' => 'Judge -- Age Category Preference for Category ID 2',
|
||||
'header' => 'cat2',
|
||||
'width' => 12.7 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'table' => 'users.cat_prefs',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_cat_pref',
|
||||
'components' => array('users_judge')),
|
||||
'exec_function' => 'report_judges_cat_pref'),
|
||||
'cat_pref_3' => array(
|
||||
'name' => 'Judge -- Age Category Preference for Category ID 3',
|
||||
'header' => 'cat3',
|
||||
'width' => 12.7 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'table' => 'users.cat_prefs',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_cat_pref',
|
||||
'components' => array('users_judge')),
|
||||
'exec_function' => 'report_judges_cat_pref'),
|
||||
'cat_pref_4' => array(
|
||||
'name' => 'Judge -- Age Category Preference for Category ID 4',
|
||||
'header' => 'cat4',
|
||||
'width' => 12.7 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'table' => 'users.cat_prefs',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_cat_pref',
|
||||
'components' => array('users_judge')),
|
||||
'exec_function' => 'report_judges_cat_pref'),
|
||||
'cat_pref_5' => array(
|
||||
'name' => 'Judge -- Age Category Preference for Category ID 5',
|
||||
'header' => 'cat5',
|
||||
'width' => 12.7 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'table' => 'users.cat_prefs',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_cat_pref',
|
||||
'components' => array('users_judge')),
|
||||
'exec_function' => 'report_judges_cat_pref'),
|
||||
'cat_pref_6' => array(
|
||||
'name' => 'Judge -- Age Category Preference for Category ID 6',
|
||||
'header' => 'cat6',
|
||||
'width' => 12.7 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'table' => 'users.cat_prefs',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_cat_pref',
|
||||
'components' => array('users_judge')),
|
||||
'exec_function' => 'report_judges_cat_pref'),
|
||||
'cat_pref_7' => array(
|
||||
'name' => 'Judge -- Age Category Preference for Category ID 7',
|
||||
'header' => 'cat7',
|
||||
'width' => 12.7 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'table' => 'users.cat_prefs',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_cat_pref',
|
||||
'components' => array('users_judge')),
|
||||
'exec_function' => 'report_judges_cat_pref'),
|
||||
'cat_pref_8' => array(
|
||||
'name' => 'Judge -- Age Category Preference for Category ID 8',
|
||||
'header' => 'cat8',
|
||||
'width' => 12.7 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'table' => 'users.cat_prefs',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_cat_pref',
|
||||
'components' => array('users_judge')),
|
||||
'exec_function' => 'report_judges_cat_pref'),
|
||||
'cat_pref_9' => array(
|
||||
'name' => 'Judge -- Age Category Preference for Category ID 9',
|
||||
'header' => 'cat9',
|
||||
'width' => 12.7 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'table' => 'users.cat_prefs',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_cat_pref',
|
||||
'components' => array('users_judge')),
|
||||
'exec_function' => 'report_judges_cat_pref'),
|
||||
'cat_pref_10' => array(
|
||||
'name' => 'Judge -- Age Category Preference for Category ID 10',
|
||||
'header' => 'cat10',
|
||||
'width' => 12.7 /*mm*/,
|
||||
'table' => 'users_judge.cat_prefs',
|
||||
'table' => 'users.cat_prefs',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_cat_pref',
|
||||
'components' => array('users_judge')),
|
||||
'exec_function' => 'report_judges_cat_pref'),
|
||||
|
||||
/* Time Availability */
|
||||
'available_in_divisional1' => array(
|
||||
@ -624,17 +594,15 @@ $report_judges_fields = array(
|
||||
'name' => 'Judge -- Registration Complete',
|
||||
'header' => 'Cmpl',
|
||||
'width' => 10.16 /*mm*/,
|
||||
'table' => 'users_judge.judge_complete',
|
||||
'value_map' => array ('no' => 'No', 'yes' => 'Yes'),
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'ROLE_JUDGE.complete',
|
||||
'value_map' => array ('no' => 'No', 'yes' => 'Yes')),
|
||||
|
||||
'active' => array(
|
||||
'name' => 'Judge -- Registration Active for this year',
|
||||
'header' => 'Act',
|
||||
'width' => 10.16 /*mm*/,
|
||||
'table' => 'users_judge.judge_active',
|
||||
'value_map' => array ('no' => 'No', 'yes' => 'Yes'),
|
||||
'components' => array('users_judge')),
|
||||
'table' => 'ROLE_JUDGE.active',
|
||||
'value_map' => array ('no' => 'No', 'yes' => 'Yes')),
|
||||
|
||||
'year' => array(
|
||||
'name' => 'Judge -- Year',
|
||||
@ -648,11 +616,11 @@ $report_judges_fields = array(
|
||||
'width' => 10 /*mm*/,
|
||||
'table' => 'users.id'),
|
||||
|
||||
'users_uid' => array(
|
||||
'name' => 'Judge -- User Unique ID',
|
||||
'users_account_id' => array(
|
||||
'name' => 'Judge -- User Account ID (unique for a login)',
|
||||
'header' => 'UID',
|
||||
'width' => 10 /*mm*/,
|
||||
'table' => 'users.uid'),
|
||||
'table' => 'users.accounts_id'),
|
||||
|
||||
|
||||
'team' => array(
|
||||
@ -891,10 +859,9 @@ for($x=1;$x<=50;$x++) {
|
||||
'name' => "Judge -- Expertise for Division ID $x",
|
||||
'header' => "div$x",
|
||||
'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 */
|
||||
'exec_function' => 'report_judges_div_exp',
|
||||
'components' => array('users_judge'));
|
||||
'exec_function' => 'report_judges_div_exp');
|
||||
}
|
||||
|
||||
/* Overwrite the question_1 .. question_10 fields with the
|
||||
@ -973,10 +940,6 @@ function report_judges_fromwhere($report, $components)
|
||||
$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_where = '';
|
||||
if(in_array('teams', $components)) {
|
||||
@ -1014,10 +977,11 @@ function report_judges_fromwhere($report, $components)
|
||||
}
|
||||
|
||||
$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
|
||||
$projects_from
|
||||
$students_from
|
||||
$uj_from
|
||||
WHERE
|
||||
users.types LIKE '%judge%'
|
||||
$year_where
|
||||
|
@ -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");
|
||||
require("../lcsv.php");
|
||||
require("../questions.inc.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");
|
||||
require("../lcsv.php");
|
||||
require("judges.inc.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("Mailing Label Generator",
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.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");
|
||||
require("../lcsv.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("Reports",
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'Administration' => 'admin/index.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");
|
||||
|
||||
|
@ -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");
|
||||
require("../lcsv.php");
|
||||
require("judges.inc.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");
|
||||
require("../lcsv.php");
|
||||
require("judges.inc.php");
|
||||
|
@ -55,7 +55,7 @@ $report_volunteers_fields = array(
|
||||
'name' => 'Volunteer -- Email',
|
||||
'header' => 'Email',
|
||||
'width' => 44.45 /*mm*/,
|
||||
'table' => 'users.email'),
|
||||
'table' => 'accounts.email'),
|
||||
|
||||
'phone' => array(
|
||||
'name' => 'Volunteer -- Phone',
|
||||
@ -94,9 +94,8 @@ $report_volunteers_fields = array(
|
||||
'name' => 'Volunteer -- Registration Complete',
|
||||
'header' => 'Cmpl',
|
||||
'width' => 10.16 /*mm*/,
|
||||
'table' => 'users_volunteer.volunteer_complete',
|
||||
'value_map' => array ('no' => 'No', 'yes' => 'Yes'),
|
||||
'components' => array('users_volunteer')),
|
||||
'table' => 'user_roles.complete',
|
||||
'value_map' => array ('no' => 'No', 'yes' => 'Yes'));
|
||||
|
||||
'position_name' => array (
|
||||
'name' => 'Volunteer Position -- Name',
|
||||
@ -136,15 +135,10 @@ $report_volunteers_fields = array(
|
||||
|
||||
function report_volunteers_fromwhere($report, $components)
|
||||
{
|
||||
global $config, $report_volutneers_fields;
|
||||
global $config;
|
||||
|
||||
$fields = $report_volutneers_fields;
|
||||
$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_where = '';
|
||||
|
||||
@ -156,12 +150,13 @@ $report_volunteers_fields = array(
|
||||
$signup_where = "AND (volunteer_positions_signup.year = '$year' OR volunteer_positions_signup.year IS NULL)";
|
||||
}
|
||||
|
||||
$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
|
||||
$signup_join
|
||||
$uv_from
|
||||
WHERE
|
||||
users.types LIKE '%volunteer%'
|
||||
WHEE
|
||||
user_roles.type='volunteer'
|
||||
AND users.year='$year'
|
||||
$signup_where
|
||||
";
|
||||
|
@ -26,7 +26,7 @@
|
||||
require_once("../user.inc.php");
|
||||
require_once("../schedule.inc.php");
|
||||
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
|
||||
if($_GET['action']=="loadschedule") {
|
||||
$date=$_POST['date'];
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
|
||||
|
||||
if($_POST['save']=="edit" || $_POST['save']=="add")
|
||||
|
@ -26,7 +26,7 @@
|
||||
require_once("../user.inc.php");
|
||||
require("../csvimport.inc.php");
|
||||
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
|
||||
send_header("Schools Import",
|
||||
array('Committee Main' => 'committee_main.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("Science Fair Management",
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
include "../common.inc.php";
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
foreach($config['languages'] AS $l=>$ln) {
|
||||
if($l==$config['default_language']) continue;
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
|
||||
send_header("Donor Contacts",
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
|
@ -24,7 +24,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'));
|
||||
|
||||
$registrations_id = intval($_GET['id']);
|
||||
$action = $_GET['action'];
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
|
||||
send_header("Tours",
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
|
@ -25,7 +25,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
|
||||
/* Load Tours */
|
||||
$query = "SELECT * FROM tours WHERE
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
require("../tours.class.php");
|
||||
require("../tableeditor.class.php");
|
||||
|
||||
|
@ -26,7 +26,7 @@ ogram; see the file COPYING. If not, write to
|
||||
require_once("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
require_once("../config_editor.inc.php");
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
|
||||
if($_GET['action']=="launch") {
|
||||
exec("nice php tours_sa.php >/dev/null 2>&1 &");
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
|
||||
send_header("Translations",
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require_once('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
|
||||
|
||||
$tabs = array( 'fairinfo' => array(
|
||||
|
@ -25,7 +25,7 @@
|
||||
require_once('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
require_once('../judge.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
|
||||
require_once('judges.inc.php');
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
require_once("../user.inc.php");
|
||||
require("../tableeditor.class.php");
|
||||
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
send_header("Volunteer Positions Manager",
|
||||
array("Committee Main" => 'committee_main.php',
|
||||
"Administration" => "admin/",
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'admin');
|
||||
user_auth_required('admin');
|
||||
|
||||
send_header("Volunteer Management",
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
|
@ -27,7 +27,7 @@ require_once('../user.inc.php');
|
||||
require_once('../projects.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']);
|
||||
$action = $_GET['action'];
|
||||
|
Loading…
Reference in New Issue
Block a user