Bunch of fixes

This commit is contained in:
james 2011-01-26 23:15:58 +00:00
parent 97076cbe32
commit a5bd01f621
5 changed files with 13 additions and 7 deletions

View File

@ -1047,6 +1047,7 @@ send_footer();
function draw_awards_table(){ function draw_awards_table(){
global $config; global $config;
global $conference;
$award_types_id=$_SESSION['award_types_id']; $award_types_id=$_SESSION['award_types_id'];
$sponsors_id=$_SESSION['sponsors_id']; $sponsors_id=$_SESSION['sponsors_id'];

View File

@ -29,14 +29,14 @@ $auth_type = user_auth_required(array(), array('fair', 'admin'));
//require_once('../register_participants.inc.php'); //require_once('../register_participants.inc.php');
if($_GET['conference_id']) $conference_id=$_GET['conference_id']; if($_GET['conference_id']) $conference_id=intval($_GET['conference_id']);
else $conference_id=$conference['id'] else $conference_id=$conference['id'];
$q=mysql_query("SELECT * FROM projectcategories WHERE conferences_id='{$conference['id']} ORDER BY id"); $q=mysql_query("SELECT * FROM projectcategories WHERE conferences_id='{$conference['id']}' ORDER BY id");
while($r=mysql_fetch_object($q)) while($r=mysql_fetch_object($q))
$cats[$r->id]=$r->category; $cats[$r->id]=$r->category;
$q=mysql_query("SELECT * FROM projectdivisions WHERE conferences_id='{$conference['id']} ORDER BY id"); $q=mysql_query("SELECT * FROM projectdivisions WHERE conferences_id='{$conference['id']}' ORDER BY id");
while($r=mysql_fetch_object($q)) while($r=mysql_fetch_object($q))
$divs[$r->id]=$r->division; $divs[$r->id]=$r->division;

View File

@ -29,7 +29,7 @@ header("Content-Type: text/html; charset=UTF-8");
//set error reporting to not show notices, for some reason some people's installation dont set this by default //set error reporting to not show notices, for some reason some people's installation dont set this by default
//so we will set it in the code instead just to make sure //so we will set it in the code instead just to make sure
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE); //error_reporting(E_ALL & ~E_DEPRECATED );
define('REQUIREDFIELD','<span class="requiredfield">*</span>'); define('REQUIREDFIELD','<span class="requiredfield">*</span>');

View File

@ -44,7 +44,12 @@ function user_load($users_id, $accounts_id = false)
if($accounts_id != false) { if($accounts_id != false) {
$accounts_id = intval($accounts_id); $accounts_id = intval($accounts_id);
//get the user record for the current conference, if they have one //get the user record for the current conference, if they have one
$users_id = mysql_result(mysql_query("SELECT users.id FROM users WHERE accounts_id = $accounts_id AND conferences_id='{$conference['id']}' LIMIT 1"), 0);
//hmm this should be conference specific, but what if we cant find them?
//$q = mysql_query("SELECT users.id FROM users WHERE accounts_id = $accounts_id AND conferences_id='{$conference['id']}' LIMIT 1");
$q = mysql_query("SELECT users.id FROM users WHERE accounts_id = $accounts_id ORDER BY conferences_id DESC LIMIT 1");
$r=mysql_fetch_object($q);
$users_id=$r->id;
//if we don't find a users id, then return false, means they dont have a record for this conference yet //if we don't find a users id, then return false, means they dont have a record for this conference yet
if(!$users_id) if(!$users_id)
return false; return false;

View File

@ -1 +1 @@
2.2.9 2.9.9