From 08f09666f7028463bfd9b69ac5fb9e8e06aa79ad Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 4 Sep 2021 16:09:07 +0200 Subject: Remove obsolete shortcodes. These are no longer in use, and have been replaced by the admin screens. --- includes/public/shortcodes/giglog_bands.php | 118 ---------------------------- 1 file changed, 118 deletions(-) delete mode 100644 includes/public/shortcodes/giglog_bands.php (limited to 'includes/public/shortcodes/giglog_bands.php') diff --git a/includes/public/shortcodes/giglog_bands.php b/includes/public/shortcodes/giglog_bands.php deleted file mode 100644 index e4fe71d..0000000 --- a/includes/public/shortcodes/giglog_bands.php +++ /dev/null @@ -1,118 +0,0 @@ - -// SPDX-FileCopyrightText: 2021 Harald Eilertsen -// -// SPDX-License-Identifier: AGPL-3.0-or-later - -/* - * code used for giglogadmin for the open page where everyone sees the list of - * concerts. First function displays filters by city, venue and the second one - * builds the table with concerts - */ - -function giglogadmin_getfilters(): string -{ - global $wpdb; - - //echo (var_dump($_POST["selectvenue"])); - - $results = $wpdb->get_results('select distinct wpgvenue_city from wpg_venues'); - $select = '
'; - //second drop down for venue - - $vquery = "select id, wpgvenue_name from wpg_venues"; - $vquery .= " where wpgvenue_city='" . $_POST["selectcity"] . "'"; - $resultsv = $wpdb->get_results($vquery); - $select .= '
'; - return $select; -} - - -function giglogadmin_getconcerts(): string -{ - global $wpdb; - // Shortcodes RETURN content, so store in a variable to return - $content = ''; - // $content .= ''; - $content .= ''; - // Use the submitted "city" if any. Otherwise, use the default/static value. - $cty = filter_input(INPUT_POST, 'selectcity'); - $cty = $cty ? $cty : 'ALL'; - - $venue = filter_input(INPUT_POST, 'selectvenue'); - //echo($_POST['selectvenue']); - $venue = $venue ? $venue : '0'; - - - $query = "SELECT wpgc.id, wpgc.wpgconcert_name ,wpgv.wpgvenue_name as venue ,wpgc.wpgconcert_date, wpgc.wpgconcert_tickets, wpgc.wpgconcert_event, wpgv.wpgvenue_city, wpgv.wpgvenue_webpage - FROM wpg_concerts wpgc, wpg_venues wpgv -where wpgc.venue = wpgv.id -and wpgconcert_date >= CURDATE()"; - $query .= ($cty == "ALL") ? "" : " and wpgv.wpgvenue_city='" . $cty . "'"; - $query .= ($venue == "0") ? "" : " and wpgv.id='" . $venue . "'"; - $query .= " order by wpgv.wpgvenue_city, wpgconcert_date, wpgc.id"; - //echo($query); - $results = $wpdb->get_results($query); - - - $lastType = ''; - foreach ($results AS $row) { - $content .= ''; - - if ($lastType != '' && $lastType != $row->wpgvenue_city) { - $content .= ''; - } - - if ($lastType == '') { - $content .= ''; - } - // Modify these to match the database structure - // $content .= ''; - $content .= ''; - $content .= ''; - $content .= ''; - $fdate = strtotime($row->wpgconcert_date); - $newformat = date('d.M.Y', $fdate); - - //$content .= DATE_FORMAT($fdate,'%d.%b.%Y'); - $content .= ''; - $content .= ''; - $content .= ''; - $content .= ''; - $lastType = $row->wpgvenue_city; - } - $content .= '
CITYIDBANDVENUEDATETICKETSEVENT
CITYTITLEVENUEDATETICKETSEVENT
' . $row->wpgvenue_city . '
' . $row->wpgvenue_city . '
' . $row->id. '' . $row->wpgconcert_name . '' . $row->venue . '' . $newformat . 'TicketsEvent link
'; - // return the table - return $content; -} -- cgit v1.2.3