diff options
author | AndreaChirulescu <andrea.chirulescu@gmail.com> | 2021-04-07 23:28:10 +0200 |
---|---|---|
committer | AndreaChirulescu <andrea.chirulescu@gmail.com> | 2021-04-07 23:28:10 +0200 |
commit | 95ec7617246120556a4f3dcb5178d9a158c31456 (patch) | |
tree | 0a0831062701fde66bd8aa7109975d8414374535 | |
parent | 1961ab720d8fcf7f13634b5beef88d5dd46bfb42 (diff) | |
download | gigologadmin-95ec7617246120556a4f3dcb5178d9a158c31456.tar.gz gigologadmin-95ec7617246120556a4f3dcb5178d9a158c31456.tar.bz2 gigologadmin-95ec7617246120556a4f3dcb5178d9a158c31456.zip |
Checkbox for own concerts added
-rw-r--r-- | includes/admin/views/giglog_admin_page.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index cb8a4a5..637820f 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -52,7 +52,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { filter_input(INPUT_POST, "selectcity", FILTER_SANITIZE_SPECIAL_CHARS) || $cities[0]; - $select = '<form method="POST" action=""><select name="selectcity">'; + $select = '<form method="POST" action="">FILTER DATA: <select name="selectcity">'; foreach ( $cities AS $city ) { $select .= '<option value="' . $city . '"' . selected($city, $selected_city) . '>'; @@ -78,8 +78,12 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { $select .= '</select>'; } + //option to select own concerts only + $select .= '<input class="ownconc" type="checkbox" value="1"'; + if(isset($_POST['my_checkbox'])) $select .=' checked="checked" '; + $select.=' name="my_checkbox">Show own concerts only</input>'; - $select .= '<input type="submit" value="Filter"></form>'; + $select .= '<input type="submit" value="APPLY"></form>'; return $select; } @@ -143,10 +147,11 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { $query .= ($cty == "ALL") ? "" : " and wpgv.wpgvenue_city='" .$cty ."'"; $query .= ($venue == "0") ? "" : " and wpgv.id='" .$venue ."'"; + $query.= (empty($_POST['my_checkbox'])) ? "": " and (wpgcl_photo1 ='".$hf_username."' or wpgcl_photo2 ='".$hf_username."' or wpgcl_rev1 ='".$hf_username."' or wpgcl_rev2 ='".$hf_username."')"; $query .=" order by wpgv.wpgvenue_city, wpgconcert_date, wpgc.id" ; $results = $wpdb->get_results($query); - $lastType = ''; + foreach ( $results AS $row ) { $content .= '<tr class="assignitr">'; |