informasi seminar

JADWAL 2017

get_var( “SELECT COUNT(*) FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND posts.post_status=’publish’ and posts.post_date < NOW()) ORDER BY meta.meta_value" ); //echo $eventCount; $paglink=""; if($pg>1) $paglink = ” << “;
for($pl=1; $pl<=$plmax; $pl++) { $url=$baseurl."?pg=".$pg; $css=""; if($gpg == $pg) $css="background-color: #FFBFBF;"; $paglink .= " $pg “;
if(($pg*$rw)>=$eventCount) { break; }
$pg++;
}

if($pl>$plmax) {
$paglink .= ” >> “;
}

$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND posts.post_status=’publish’ and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT $pgi, $rw"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;

$output .= “

“;
$output .= $paglink;
$output .= ” dari “.($pgi+1).”-“.($pgi+$rw).’ dari Total:’.$eventCount.’ Event’;
$output .= “

“;
}
return $output;
}

add_shortcode(‘events_list’, ’emw_events_list’);

/*
Bulan January
*/

function emw_events_list_january($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-01-01’ AND meta.meta_value <= '2017-01-31' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 5000"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_january’, ’emw_events_list_january’);

/*
Bulan February
*/

function emw_events_list_february($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-02-01’ AND meta.meta_value <= '2017-02-28' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 5000"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_february’, ’emw_events_list_february’);

/*
Bulan March
*/

function emw_events_list_march($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-03-01’ AND meta.meta_value <= '2017-03-31' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 5000"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_march’, ’emw_events_list_march’);

/*
Bulan April
*/

function emw_events_list_april($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-04-01’ AND meta.meta_value <= '2017-04-30' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 5000"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_april’, ’emw_events_list_april’);

/*
Bulan May
*/

function emw_events_list_may($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-05-01’ AND meta.meta_value <= '2017-05-31' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 5000"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_may’, ’emw_events_list_may’);

/*
Bulan June
*/

function emw_events_list_june($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-06-01’ AND meta.meta_value <= '2017-06-30' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 5000"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_june’, ’emw_events_list_june’);

/*
Bulan July
*/

function emw_events_list_july($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-07-01’ AND meta.meta_value <= '2017-07-31' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 5000"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_july’, ’emw_events_list_july’);

/*
Bulan August
*/

function emw_events_list_august($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-08-01’ AND meta.meta_value <= '2017-08-31' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 5000"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_august’, ’emw_events_list_august’);

/*
Bulan September
*/

function emw_events_list_september($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-09-01’ AND meta.meta_value <= '2017-09-30' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 4750"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_september’, ’emw_events_list_september’);

/*
Bulan October
*/

function emw_events_list_october($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-10-01’ AND meta.meta_value <= '2017-10-31' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 5000"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_october’, ’emw_events_list_october’);

/*
Bulan November
*/

function emw_events_list_november($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-11-01’ AND meta.meta_value <= '2017-11-30' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 5000"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_november’, ’emw_events_list_november’);

/*
Bulan December
*/

function emw_events_list_december($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-12-01’ AND meta.meta_value <= '2017-12-31' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 4750"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_december’, ’emw_events_list_december’);

/*
2017
*/

function emw_events_list_2017($atts, $content=NULL) {
global $wpdb;
$today = date(‘Y-m-d’, strtotime(‘now’));
$events = $wpdb->get_results(“SELECT posts.id, posts.post_title, meta.meta_value FROM {$wpdb->prefix}postmeta as meta INNER JOIN {$wpdb->prefix}posts as posts ON (meta.post_id = posts.id) WHERE (meta.meta_key = ‘event_date’ AND meta.meta_value >= ‘{$today}’ AND meta.meta_value >= ‘2017-01-01’ AND meta.meta_value <= '2017-12-31' AND posts.post_status='publish' and posts.post_date < NOW()) ORDER BY meta.meta_value LIMIT 5000"); if(is_array($events)) { $output = "\t

    \n”;
    foreach ($events as $event) {
    $event_link = get_permalink($event->id);
    $event_date = date(get_option(‘date_format’), strtotime($event->meta_value));
    $output .= “\t\t

  • {$event_date} | {$event->post_title}
  • \n”;
    }
    $output .= “\t

\n”;
}
return $output;
}

add_shortcode(‘events_list_2017′, ’emw_events_list_2017′);
?>