// SPDX-FileCopyrightText: 2021 Harald Eilertsen ';
// $content .= '
';
// return the table
return $content;
}
private function render_filters() : string
{
$cty = filter_input(INPUT_POST, 'selectcity', FILTER_SANITIZE_SPECIAL_CHARS);
$select = 'CITY ID BAND VENUE DATE ';
$content .= ' ';
$filter = [];
// Use the submitted "city" if any. Otherwise, use the default/static value.
$cty = filter_input( INPUT_POST, 'selectcity', FILTER_SANITIZE_SPECIAL_CHARS );
if ($cty) {
$filter['city'] = $cty;
}
$venue = filter_input( INPUT_POST, 'selectvenue', FILTER_SANITIZE_SPECIAL_CHARS );
if ($venue) {
$filter['venue_id'] = $venue;
}
if(isset($_POST['ownconcerts']) && $_POST['ownconcerts'] == '1') {
$filter['currentuser'] = wp_get_current_user()->user_login;
}
$concerts = GiglogAdmin_Concert::find_concerts($filter);
$lastType = '';
foreach ( $concerts AS $concert ) {
$content .= 'CITY NAME VENUE DATE ';
if (!is_admin()) {
$content .= 'EVENT TICKETS ';
}
else {
$content .= ' PHOTO1 PHOTO2 TEXT1 TEXT2 STATUS ';
if (current_user_can('administrator')) {
$content .= 'AdminOptions ';
}
}
$content .= '';
if ($lastType != '' && $lastType != $concert->venue()->city()) {
$content .= ' ';
$lastType = $concert->venue()->city();
}
$content .= '' . $concert->venue()->city() . ' ';
}
if ($lastType == '' ) {
$content .= '' . $concert->venue()->city() . ' ';
}
if ($lastType != '' && $lastType == $concert->venue()->city()) {
$content .= '';
}
$content .= ' '. $concert->cname() . ' ';
$content .= '' . $concert->venue()->name() . ' ';
$fdate = strtotime($concert->cdate());
$newformat = date('d.M.Y',$fdate);
//$content .= DATE_FORMAT($fdate,'%d.%b.%Y');
$content .= '' . $newformat . ' ';
if(!is_admin()){
$content .= 'Link ';
$content .= 'Tickets ';
}
else {
$content .= '' . $this->mark_new_concert($concert) . ' ';
$content .= '' . $this->assign_role_for_user_form('photo1', $concert) . ' ';
$content .= '' . $this->assign_role_for_user_form('photo2', $concert) . ' ';
$content .= '' . $this->assign_role_for_user_form('rev1', $concert) . ' ';
$content .= '' . $this->assign_role_for_user_form('rev2', $concert) . ' ';
$content .= '' . self::STATUS_LABELS[$concert->status()] . ' ';
if (current_user_can('administrator')) {
$content .= ''
. $this->adminactions($concert)
. ' ';
}
}
$content .= '