Interspeech 2006
$value) { $parts[$key] = trim($value); } return implode(", ", $parts); } function add_clause($clausestr, $newclause, $infix) { $retval = $clausestr; if($newclause != "") { if($clausestr != "") $retval = $clausestr . $infix . $newclause; else $retval = $newclause; } return $retval; } function process_qstring() { global $CONN; $papers = array(); if(isset($_POST["paper"]) && is_array($_POST["paper"])) { foreach($_POST["paper"] as $key => $value) { $papers[] = $value; } } if(count($papers) > 0) { foreach($papers as $paper) { $search_clause = add_clause($search_clause, "p.paperid = '$paper'", " OR "); } $q = "SELECT p.*, s.*, r.*, to_char(s.ses_date, 'Day, Month DD, YYYY') AS date, to_char(s.ses_date, 'Dy, Mon DD') AS abbr_date, to_char(s.ses_time, 'HH24:MI') AS time, r.name AS room FROM papers p JOIN sessions s ON p.ses_id = s.ses_id JOIN rooms r ON r.room_id = ses_room WHERE p.status = 'Accepted' AND ($search_clause) ORDER BY s.ses_date, s.ses_time, p.ses_order "; if($search_clause == "") { ?> There was an error building your schedule, please try submitting again. "; } list($start_hour, $start_mins) = explode(":", $result["time"]); $end_hour = $start_hour + 2; $item_time = $result["time"]; $qy = "SELECT COUNT(paperid) AS paper_count FROM papers WHERE ses_id = '$result[ses_id]'"; $srec = dbQueryGetSingle($qy, $CONN); $paper_count = $srec["paper_count"]; if((strtolower($result["ses_type"]) == "oral") || ((strtolower($result["ses_type"]) == "special") && ($paper_count == 6))) { $ses_order = $result["ses_order"]; $min_inc = 20; $hour_add = 0; $min_add = $min_inc * ($ses_order-1); if (($start_mins+$min_add) >= 60) { $hour_add = (int)(($start_mins+$min_add) / 60); $min_add = -$start_mins + ($start_mins+$min_add) % 60; } $item_time = sprintf("%02d:%02d", $start_hour + $hour_add, $start_mins + $min_add); } else { $item_time = sprintf("%02d:%02d - %02d:%02d", $start_hour, $start_mins, $end_hour, $start_mins); } echo ""; } } ?>
$fixed_date
$result[title]
"; echo "[$result[ses_no]] $item_time, $result[room]
"; echo ucfirst($result[ses_type]); if(strtolower($result["ses_type"]) == "poster") echo " #${result[ses_order]}"; echo "
There were no papers selected to build your schedule.

Return to search