\n"; echo ""; echo ""; // NS $ns[0]['name']='Home'; $ns[0]['url']=$server_path.'/index.php'; $ns[1]['name']='DB Seminars'; $ns[1]['url']=$server_path.'/seminars.php'; ns($ns,$server_path); // Schedule in form of calendar title_line("Schedule","schedule",$server_path,"left"); //================================================== START OF CALENDAR ============================================ //This gets today's date if ($date=='') $date =time () ; //This puts the day, month, and year in seperate variables $day = date('d', $date) ; if ($month=='') $month = date('n') ; if ($year=='') $year = date('Y') ; // Select events $query = "select a.seminar_type, a.color, a.b_year, a.b_month, a.b_day, a.seminar_id seminar_id, b.people_id people_id, c.name name, a.title title from `db_seminar` a, `db_seminar_asoc_people` b, `people` c where a.b_year=".$year." and a.b_month=".$month." and a.seminar_id=b.seminar_id and b.people_id=c.people_id order by a.b_year desc, a.b_month desc, a.b_day desc "; $color_flag=0; $result = mysql_query($query,$db_link) or die("Query failed : Failed to select the seminar list from database"); while ($line=mysql_fetch_array($result, MYSQL_ASSOC)){ $event[$line["b_year"]][$line["b_month"]][$line["b_day"]].=""; if ($line['seminar_type']=='Students') $event[$line["b_year"]][$line["b_month"]][$line["b_day"]].="DB Seminar
"; else if ($line['seminar_type']=='Probation Talk') $event[$line["b_year"]][$line["b_month"]][$line["b_day"]].="Probation Talk
"; else $event[$line["b_year"]][$line["b_month"]][$line["b_day"]].="".$line['seminar_type']."
"; $event[$line["b_year"]][$line["b_month"]][$line["b_day"]].=$line["name"]."
Details of the Seminar."; // $db_seminars[count($db_seminars)]=$line; } mysql_free_result($result); // Select Conference $query = "select * from `conferences` "; $color_flag=0; $result = mysql_query($query,$db_link) or die("Query failed : Failed to select the conference list from database"); while ($line=mysql_fetch_array($result, MYSQL_ASSOC)){ $event[$line["a_year"]][$line["a_month"]][$line["a_day"]].="".$line['name_short']."
Abstract deadline
"; if ($line['url']!='') $event[$line["a_year"]][$line["a_month"]][$line["a_day"]].="Click to open a new window of the conference web site."; $event[$line["a_year"]][$line["a_month"]][$line["a_day"]].=""; $event[$line["f_year"]][$line["f_month"]][$line["f_day"]].="".$line['name_short']."
Paper submission deadline
"; if ($line['url']!='') $event[$line["f_year"]][$line["f_month"]][$line["f_day"]].="Click to open a new window of the conference web site."; $event[$line["f_year"]][$line["f_month"]][$line["f_day"]].=""; // $db_seminars[count($db_seminars)]=$line; } mysql_free_result($result); //Here we generate the first day of the month $first_day = mktime(0,0,0,$month, 1, $year) ; //This gets us the month name $title = date('F', $first_day) ; //Here we find out what day of the week the first day of the month falls on $day_of_week = date('D', $first_day) ; //Once we know what day of the week it falls on, we know how many blank days occure before it. If the first day of the week is a Sunday then it would be zero switch($day_of_week){ case "Sun": $blank = 0; break; case "Mon": $blank = 1; break; case "Tue": $blank = 2; break; case "Wed": $blank = 3; break; case "Thu": $blank = 4; break; case "Fri": $blank = 5; break; case "Sat": $blank = 6; break; } //We then determine how many days are in the current month $days_in_month = cal_days_in_month(0, $month, $year) ; //Here we start building the table heads echo ""; echo ""; echo ""; //This counts the days in the week, up to 7 $day_count = 1; echo ""; //first we take care of those blank days while ( $blank > 0 ) { echo ""; $blank = $blank-1; $day_count++; } //sets the first day of the month to 1 $day_num = 1; //count up the days, untill we've done all of them in the month while ( $day_num <= $days_in_month ) { echo ""; $day_num++; $day_count++; //Make sure we start a new row every week if ($day_count > 7) { echo ""; $day_count = 1; } } //Finaly we finish out the table with some blank details if needed while ( $day_count >1 && $day_count <=7 ) { echo ""; $day_count++; } echo "
"; echo ""; echo "
"; //Left button if ($month>1) echo "Previous month "; else echo "Previous month "; echo "".$title.""; //Right button if ($month<12) echo "Next month "; else echo "Next month "; echo " "; echo "Previous year "; echo "".$year.""; echo "Next year "; echo "
"; echo "
SundayMondayTuesdayWednesdayThrusdayFridaySaturday
"; // ========================================================Do things here ========================================== if ($year==date("Y") && $month==date("n") && $day_num==date("j")) echo "
"; echo ""; echo ""; if ($event[$year][$month][$day_num]!='') echo $event[$year][$month][$day_num]; echo "
$day_num
"; if ($year==date("Y") && $month==date("n") && $day_num==date("j")) echo "
"; echo "
"; //================================================== END OF CALENDAR ============================================ echo "\n";include 'connect_db.php'; $color_flag=0; for ($i=0; $i"; $color_flag=0; }else if ($color_flag==0){ echo ""; $color_flag=1; } echo ""; echo ""; echo ""; echo ""; if ($_TUTORIAL[$i]['material']!='') echo ""; else echo ""; echo ""; } echo "
".($i+1)."".$_TUTORIAL[$i]['topic']."".$_TUTORIAL[$i]['date']."".$_TUTORIAL[$i]['venue']."Download/".$_TUTORIAL[$i]['remarks']."
"; // List of DB Seminars title_line("List of Past DB Seminars","list of db seminars",$server_path,"left"); echo "\n";include 'connect_db.php'; echo ""; $color_flag=0; $query = "select a.private,a.file, c.name_short, a.color, a.b_year, a.b_month, a.b_day, a.seminar_id seminar_id, b.people_id people_id, c.name name, a.title title from `db_seminar` a, `db_seminar_asoc_people` b, `people` c where !((a.b_year=".date('Y')." and a.b_month>=".(date('n')+1).") or (a.b_year=".date('Y')." and a.b_month=".date('n')." and a.b_day>=".date('d').") or a.b_year>=".(date('Y')+1).") and a.seminar_id=b.seminar_id and b.people_id=c.people_id order by a.b_year desc, a.b_month desc, a.b_day desc "; $color_flag=0; $result = mysql_query($query,$db_link) or die("Query failed : Failed to select the seminar list from database"); while ($line=mysql_fetch_array($result, MYSQL_ASSOC)){ if ($color_flag==1){ echo ""; $color_flag=0; }else if ($color_flag==0){ echo ""; $color_flag=1; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } mysql_free_result($result); echo "
DateTitleSpeakerDownloadDetails
".$line['b_day']."-".$line['b_month']."-".$line['b_year']."  ".$line['time']."".$line['title']."".$line['name']; if ($line['name_short']!='') echo " (".$line['name_short'].")"; echo ""; if ($line['private']=='N'){ //Public if ($line['file']!='') echo "Download the presentation materials."; else echo "TBA"; }else echo "TBA"; echo "Details of this seminar
"; echo "\n"; echo ""; echo "
        Please click here for a complete list of past DB Seminars.

"; include 'default_close.inc'; ?>