summaryrefslogtreecommitdiffstats
path: root/includes/public
diff options
context:
space:
mode:
Diffstat (limited to 'includes/public')
-rw-r--r--includes/public/shortcodes/giglog_bands.php11
-rw-r--r--includes/public/shortcodes/giglog_display_unprocessed.php25
-rw-r--r--includes/public/shortcodes/giglog_photographers.php11
3 files changed, 16 insertions, 31 deletions
diff --git a/includes/public/shortcodes/giglog_bands.php b/includes/public/shortcodes/giglog_bands.php
index 5533142..78fd72b 100644
--- a/includes/public/shortcodes/giglog_bands.php
+++ b/includes/public/shortcodes/giglog_bands.php
@@ -65,7 +65,7 @@ function giglogadmin_getconcerts()
// Shortcodes RETURN content, so store in a variable to return
$content = '<table class="concertstb">';
// $content .= '</tr><th>CITY</th><th>ID</th><th>BAND</th><th>VENUE</th><th>DATE</th><th>TICKETS</th><th>EVENT</th></tr>';
- $content .= '<tr class="concertshrow"><th>CITY</th><th>BAND</th><th>VENUE</th><th>DATE</th><th>TICKETS</th><th>EVENT</th></tr>';
+ $content .= '<tr class="concertshrow"><th>CITY</th><th>TITLE</th><th>VENUE</th><th>DATE</th><th>TICKETS</th><th>EVENT</th></tr>';
// Use the submitted "city" if any. Otherwise, use the default/static value.
$cty = filter_input(INPUT_POST, 'selectcity');
$cty = $cty ? $cty : 'ALL';
@@ -75,10 +75,9 @@ function giglogadmin_getconcerts()
$venue = $venue ? $venue : '0';
- $query = "SELECT wpgc.id, wpgb.wpgband_name as band ,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_bands wpgb, wpg_venues wpgv
-where wpgc.band=wpgb.id
-and wpgc.venue = wpgv.id
+ $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 . "'";
@@ -101,7 +100,7 @@ and wpgconcert_date >= CURDATE()";
// Modify these to match the database structure
// $content .= '<td>' . $row->id. '</td>';
$content .= '<td></td>';
- $content .= '<td>' . $row->band . '</td>';
+ $content .= '<td>' . $row->wpgconcert_name . '</td>';
$content .= '<td>' . $row->venue . '</td>';
$fdate = strtotime($row->wpgconcert_date);
$newformat = date('d.M.Y', $fdate);
diff --git a/includes/public/shortcodes/giglog_display_unprocessed.php b/includes/public/shortcodes/giglog_display_unprocessed.php
index 21382fd..aa3596c 100644
--- a/includes/public/shortcodes/giglog_display_unprocessed.php
+++ b/includes/public/shortcodes/giglog_display_unprocessed.php
@@ -52,7 +52,7 @@ function giglogadmin_insertconcerts()
foreach ($cresults AS $row) {
$rowfileid = $row->id;
$resultArray = explode("\t", $row->rowcontent);
- $band = $resultArray[0];
+ $cname = $resultArray[0];
$venue = $resultArray[1];
$condate = date('Y-m-d', strtotime($resultArray[2]));
$ticketlink = $resultArray[3];
@@ -60,20 +60,7 @@ function giglogadmin_insertconcerts()
//first item in the row should be band $resultArray[0]; second should be venue $resultArray[1]; third should be concert date $resultArray[2];
//fourth item is ticketlink $resultArray[3]; fifth item is eventlink $resultArray[4];
- //processing band
- $bandsql = 'SELECT id FROM wpg_bands WHERE upper(wpgband_name)="' . $band . '"';
- $results = $wpdb->get_results($bandsql);
- if ($results)
- $newconcert[0] = $results[0]->id;
- else {
- $wpdb->insert('wpg_bands', array(
- 'id' => '',
- 'wpgband_name' => $band
- ));
- echo ($wpdb->last_error);
- $newconcert[0] = $wpdb->insert_id;
- }
- //done processing band
+
//processing venue
if (is_numeric($venue))
@@ -97,21 +84,21 @@ function giglogadmin_insertconcerts()
//not sure how to check dates, hopefully manual verification of files will take care of it
//check if concert already exists and return ID if it does. Not checking by date, to be considered
- $csql = 'SELECT id from wpg_concerts where band = ' . $newconcert[0] . ' and venue = ' . $newconcert[1] . ' and wpgconcert_date ="' . $condate . '"';
+ $csql = 'SELECT id from wpg_concerts where wpgconcert_name = ' . $cname . ' and venue = ' . $newconcert[1] . ' and wpgconcert_date ="' . $condate . '"';
$cresults = $wpdb->get_results($csql);
if ($cresults) {
$usql = 'UPDATE wpg_files SET processed="D", wpgc_id = ' . $cresults[0]->id . ' WHERE id = ' . $rowfileid;
$uresults = $wpdb->get_results($usql);
- $concertlist .= 'DUPLICATE ROW detected BAND ' . $band . ' with band ID ' . $newconcert[0];
+ $concertlist .= 'DUPLICATE ROW detected Title ' . $cname . ' with band ID ' . $newconcert[0];
$concertlist .= ', VENUE ' . $venue . ' with venue ID ' . $newconcert[1];
$concertlist .= ', CONCERTDATE ' . $condate;
$concertlist .= ' <br />';
} else {
$wpdb->insert('wpg_concerts', array(
'id' => '',
- 'band' => $newconcert[0],
+ 'wpgconcert_name' => cname,
'venue' => $newconcert[1],
'wpgconcert_date' => $condate,
'wpgconcert_tickets' => $ticketlink,
@@ -123,7 +110,7 @@ function giglogadmin_insertconcerts()
$usql = 'UPDATE wpg_files SET processed="Y", wpgc_id = ' . $newconcertid . ' WHERE id = ' . $rowfileid;
$uresults = $wpdb->get_results($usql);
- $concertlist .= 'BAND ' . $band . ' with band ID ' . $newconcert[0];
+ $concertlist .= 'name ' . $cname ;
$concertlist .= ', VENUE ' . $venue . ' with venue ID ' . $newconcert[1];
$concertlist .= ', CONCERTDATE ' . $condate . ', Ticket LINK ' . $ticketlink . ', event LINK' . $eventlink;
$concertlist .= ' <br />';
diff --git a/includes/public/shortcodes/giglog_photographers.php b/includes/public/shortcodes/giglog_photographers.php
index cb79375..500445a 100644
--- a/includes/public/shortcodes/giglog_photographers.php
+++ b/includes/public/shortcodes/giglog_photographers.php
@@ -236,7 +236,7 @@ function giglogadmin_getconcertsphotog ( ) {
// $content .= '</tr><th>CITY</th><th>ID</th><th>BAND</th><th>VENUE</th><th>DATE</th></tr>';
$content .= '<tr class="assignithrow">
- <th>CITY</th><th>BAND</th><th>VENUE</th><th>DATE</th><th> </th>
+ <th>CITY</th><th>TITLE</th><th>VENUE</th><th>DATE</th><th> </th>
<th>PHOTO1</th><th>PHOTO2</th><th>TEXT1</th><th>TEXT2</th>
<th>STATUS</th>';
if (current_user_can('administrator')) //($hf_username == 'etadmin')
@@ -252,10 +252,9 @@ function giglogadmin_getconcertsphotog ( ) {
$venue= $venue? $venue: '0';
- $query = "SELECT wpgc.id, wpgb.wpgband_name as band, wpgv.wpgvenue_name as venue, wpgc.wpgconcert_date, wpgc.wpgconcert_tickets, wpgc.wpgconcert_event, wpgv.wpgvenue_city, wpgv.wpgvenue_webpage, wpgps.wpgs_name
- FROM wpg_concerts wpgc, wpg_bands wpgb, wpg_venues wpgv, wpg_pressstatus wpgps, wpg_concertlogs wpgcl
- where wpgc.band=wpgb.id
- and wpgc.venue = wpgv.id
+ $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, wpgps.wpgs_name
+ FROM wpg_concerts wpgc, wpg_venues wpgv, wpg_pressstatus wpgps, wpg_concertlogs wpgcl
+ where wpgc.venue = wpgv.id
and wpgconcert_date >= CURDATE()
and wpgps.id = wpgcl.wpgcl_status
and wpgcl.wpgcl_concertid=wpgc.id";
@@ -281,7 +280,7 @@ function giglogadmin_getconcertsphotog ( ) {
// Modify these to match the database structure
// $content .= '<td>' . $row->id. '</td>';
$content .= '<td></td>';
- $content .= '<td>' . $row->band. '</td>';
+ $content .= '<td>' . $row->wpgconcert_name. '</td>';
$content .= '<td>' . $row->venue. '</td>';
$fdate = strtotime($row->wpgconcert_date);
$newformat = date('d.M.Y',$fdate);