From 0c437c746a8f964bf59ae9808a2b990d144bc39e Mon Sep 17 00:00:00 2001 From: AndreaChirulescu Date: Tue, 13 Apr 2021 19:23:59 +0200 Subject: Fixes of LF and extra spaces done by ATOM --- includes/admin/views/giglog_admin_page.php | 64 ++++++++++++++--------------- includes/admin/views/giglog_import_gigs.php | 10 ++--- 2 files changed, 37 insertions(+), 37 deletions(-) (limited to 'includes/admin/views') diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index 8deba81..3f43873 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -41,8 +41,8 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {

- - + '; return($select); } - + static function get_filters() { $cities = array_merge(["ALL"], GiglogAdmin_Venue::all_cities()); @@ -133,12 +133,12 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { return $select; } - + static function editforms() { global $wpdb; - $cid = filter_input(INPUT_POST, "cid"); - $c = GiglogAdmin_Concert::find_or_create($cid,'','','','',''); - + $cid = filter_input(INPUT_POST, "cid"); + $c = GiglogAdmin_Concert::find_or_create($cid,'','','','',''); + $content='
Form to create/edit concerts, bands, venues
' .'' .''.GiglogAdmin_AdminPage::get_allbands($c->band()).'
' @@ -148,21 +148,21 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { .'
'; if ($c->band()=='') //actions differ if we update or create a concert, hence two buttons needed $content.='

'; - else + else $content.='

'; $content.='
'; - + $content.='

' .'
' .''.GiglogAdmin_AdminPage::get_countries().'
' .'

' .'
'; - + $content.='

' .'
' .'
' .'

' - .'
'; + .''; return $content; } @@ -290,7 +290,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { // return the table return $content; } - + static function update() { @@ -330,49 +330,49 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { //$url2=$_SERVER['REQUEST_URI']; //doesn't seem to be needed actually, leaving here just in case //header("Refresh: 1; URL=$url2"); //reload page } - + if(isset($_POST['newconcert'])) { IF (empty($_POST['selectband']) || empty($_POST['selectvenueadmin']) || empty($_POST['cdate']) || empty($_POST['ticket']) || empty($_POST['eventurl'])) echo ''; - else - { + else + { GiglogAdmin_Concert::create($_POST['selectband'], $_POST['selectvenueadmin'], $_POST['cdate'], $_POST['ticket'], $_POST['eventurl']); echo ''; - } + } } if(isset($_POST['editconcert'])) { IF (empty($_POST['selectband']) || empty($_POST['selectvenueadmin']) || empty($_POST['cdate']) || empty($_POST['ticket']) || empty($_POST['eventurl'])) echo ''; - else - { + else + { GiglogAdmin_Concert::updatec($_POST['pid'],$_POST['selectband'], $_POST['selectvenueadmin'], $_POST['cdate'], $_POST['ticket'], $_POST['eventurl']); echo ''; - } - } - + } + } + if(isset($_POST['newband'])) { - IF (empty($_POST['bandname'])) //country is not checked as it is set to Norway by default + IF (empty($_POST['bandname'])) //country is not checked as it is set to Norway by default echo ''; - else - { - GiglogAdmin_Band::create($_POST['bandname'],$_POST['selectcountry']); + else + { + GiglogAdmin_Band::create($_POST['bandname'],$_POST['selectcountry']); echo ''; - } + } } - + if(isset($_POST['newvenue'])) { IF (empty($_POST['venuename']) || empty($_POST['venuecity'])) echo ''; - else - { - GiglogAdmin_Venue::create($_POST['venuename'],$_POST['venuecity']); + else + { + GiglogAdmin_Venue::create($_POST['venuename'],$_POST['venuecity']); echo ''; - } - } + } + } } static function assignconcert($p1, $c) diff --git a/includes/admin/views/giglog_import_gigs.php b/includes/admin/views/giglog_import_gigs.php index d0520e7..ae34c2d 100644 --- a/includes/admin/views/giglog_import_gigs.php +++ b/includes/admin/views/giglog_import_gigs.php @@ -104,8 +104,8 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) { $newconcert[1], $condate, $ticketlink, - $eventlink); - + $eventlink); + error_log( 'NEW CONCERT ADDED: ' . ' ID: ' . $id->id() . ' BAND ' . $band . ' with band ID ' . $newconcert[0] @@ -115,14 +115,14 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) { . ', Event LINK ' . $eventlink); GiglogAdmin_Concertlogs::add($id->id()); - - /*the last line can be replaced by a trigger + + /*the last line can be replaced by a trigger CREATE TRIGGER `insertIntoPhotoLogs` AFTER INSERT ON `wpg_concerts` FOR EACH ROW INSERT INTO wpg_concertlogs ( wpg_concertlogs.id, wpg_concertlogs.wpgcl_concertid, wpg_concertlogs.wpgcl_status) - + VALUES (null, new.id, 1) */ -- cgit v1.2.3