Only allow registration for science olympic events

This commit is contained in:
james 2010-06-16 18:14:44 +00:00
parent dad86ce72b
commit 6ea88362e8

View File

@ -129,7 +129,7 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode']){
}
echo "</div>";
$js.="eventdivs[$r->id]={hour:$r->hour,minute:$r->minute,location:$r->locations_id,duration:$r->duration};\n";
$js.="eventdivs[$r->id]={hour:$r->hour,minute:$r->minute,location:$r->locations_id,duration:$r->duration,title:'".rawurlencode($r->title)."',eventtype:'$r->eventtype'};\n";
$x++;
}
echo "<script type=\"text/javascript\">\n";
@ -202,14 +202,22 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode']){
var scheduleId;
function viewEvent(id) {
scheduleId=id;
var eventobj=eventdivs[id];
if(id) {
var eventobj=eventdivs[id];
$("#event_dialog").dialog('option','title','Event Information');
$("#event_dialog").dialog('option','title',unescape(eventobj.title));
$("#event_dialog").dialog('option','width',600);
$("#event_dialog").dialog('option','height',400);
$("#event_dialog").dialog('open');
$("#event_tabs").tabs('select',0);
if(eventobj.eventtype=='scienceolympic')
$("#event_tabs").tabs('option','disabled',[]);
else
$("#event_tabs").tabs('option','disabled',[1]);
update_tab_summary();
}
}