global $wpdb;
$table = $wpdb->prefix . ‘posts’;
$values = array(‘all’ => __(‘All Locations’, ‘wcs3’));
$query = “SELECT ID, post_type, post_title FROM $table WHERE
post_type = ‘wcs3_location’ or post_type = ‘wcs3_instructor'”;
$results = $wpdb->get_results($query);
if ($results) {
foreach ($results as $loc) {
if ($loc->post_type==’wcs3_location’)
$location_values[$loc->ID]=$loc->post_title;
else
$instructor_values[$loc->ID]=$loc->post_title;
}
}
sort($location_values);
sort($instructor_values);
echo ”
“;
$ruang = (empty($location)||$location==”All”)?””:”location=\”$location\””;
$dosen = (empty($instructor)||$instructor==”All”)?””:”instructor=\”$instructor\””;
echo “
Ruang: $location Dosen: $instructor
Mon | Tue | Wed | Thu | Fri | Sat | Sun | |
---|---|---|---|---|---|---|---|
7:30 | |||||||
9:20 | |||||||
11:10 | |||||||
13:30 | |||||||
15:20 |
[/insert_php]