diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2021-04-06 09:58:57 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2021-04-06 09:58:57 +0200 |
commit | 870b37653ccc4f03edb4821f246a2b32333ae99e (patch) | |
tree | 16d63a76f3b3322a0ce5705a8ebf7eb59bed5f27 /includes/admin/views/giglog_admin_page.php | |
parent | 29f46a973ce7ccc37e24d2700ad8bfdac98ec16d (diff) | |
download | gigologadmin-870b37653ccc4f03edb4821f246a2b32333ae99e.tar.gz gigologadmin-870b37653ccc4f03edb4821f246a2b32333ae99e.tar.bz2 gigologadmin-870b37653ccc4f03edb4821f246a2b32333ae99e.zip |
Merge changes to concert table update code.
Code is now located in the GiglogAdmin_AdminPage::update method.
Diffstat (limited to 'includes/admin/views/giglog_admin_page.php')
-rw-r--r-- | includes/admin/views/giglog_admin_page.php | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index 47075fb..bd91299 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -309,10 +309,10 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { $vquery0 = "select wpgcl_photo1 from wpg_concertlogs where wpgcl_concertid=".$c ; $results = $wpdb->get_results($vquery0); foreach ( $results AS $row ) $x= $row -> wpgcl_photo1; - if ($x !='' and $x!=$hf_username) { return ('Taken by '.$x); } + if ($x !='' and $x!=$hf_username) { return ('<span class="takenby">Taken</span><div class="takenby">Taken by '.$x.'</div>'); } else if ($x==$hf_username) //if current user - return ('<form class="unassignit" method="POST" action=""> <input type="hidden" name="cid" value="' . $c. '" /><input type="hidden" name="pid" value="' . $p1. '" /><input type="submit" name="unassignitem" value="X"/> + return ('<form class="unassignit" method="POST" action=""> <input type="hidden" name="cid" value="' . $c. '" /><input type="hidden" name="pid" value="' . $p1. '" /><input type="submit" name="unassignitem" value=""/> </form>'); else //not taken by anyone return ('<form method="POST" action=""> <input type="hidden" name="cid" value="' . $c. '" /><input type="hidden" name="pid" value="' . $p1. '" /><input type="submit" name="assignitem" value=""/> @@ -324,10 +324,10 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { $vquery0 = "select wpgcl_photo2 from wpg_concertlogs where wpgcl_concertid=".$c ; $results = $wpdb->get_results($vquery0); foreach ( $results AS $row ) $x= $row -> wpgcl_photo2; - if ($x !='' and $x!=$hf_username) { return ('Taken by '.$x); } + if ($x !='' and $x!=$hf_username) { return ('<span class="takenby">Taken</span><div class="takenby">Taken by '.$x.'</div>'); } else if ($x==$hf_username) //if current user - return ('<form class="unassignit" method="POST" action=""> <input type="hidden" name="cid" value="' . $c. '" /><input type="hidden" name="pid" value="' . $p1. '" /><input type="submit" name="unassignitem" value="X"/> + return ('<form class="unassignit" method="POST" action=""> <input type="hidden" name="cid" value="' . $c. '" /><input type="hidden" name="pid" value="' . $p1. '" /><input type="submit" name="unassignitem" value=""/> </form>'); else //not taken by anyone @@ -341,10 +341,10 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { $vquery0 = "select wpgcl_rev1 from wpg_concertlogs where wpgcl_concertid=".$c ; $results = $wpdb->get_results($vquery0); foreach ( $results AS $row ) $x= $row -> wpgcl_rev1; - if ($x !='' and $x!=$hf_username) { return ('Taken by '.$x); } + if ($x !='' and $x!=$hf_username) { ('<span class="takenby">Taken</span><div class="takenby">Taken by '.$x.'</div>'); } else if ($x==$hf_username) //if current user - return ('<form class="unassignit" method="POST" action=""> <input type="hidden" name="cid" value="' . $c. '" /><input type="hidden" name="pid" value="' . $p1. '" /><input type="submit" name="unassignitem" value="X"/> + return ('<form class="unassignit" method="POST" action=""> <input type="hidden" name="cid" value="' . $c. '" /><input type="hidden" name="pid" value="' . $p1. '" /><input type="submit" name="unassignitem" value=""/> </form>'); else //not taken by anyone return ('<form method="POST" action=""> <input type="hidden" name="cid" value="' . $c. '" /><input type="hidden" name="pid" value="' . $p1. '" /><input type="submit" name="assignitem" value=""/> @@ -357,18 +357,16 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { $vquery0 = "select wpgcl_rev2 from wpg_concertlogs where wpgcl_concertid=".$c ; $results = $wpdb->get_results($vquery0); foreach ( $results AS $row ) $x= $row -> wpgcl_rev2; - if ($x !='' and $x!=$hf_username) { return ('Taken by '.$x); } + if ($x !='' and $x!=$hf_username) { ('<span class="takenby">Taken</span><div class="takenby">Taken by '.$x.'</div>'); } else if ($x==$hf_username) //if current user - return ('<form class="unassignit" method="POST" action=""> <input type="hidden" name="cid" value="' . $c. '" /><input type="hidden" name="pid" value="' . $p1. '" /><input type="submit" name="unassignitem" value="X"/> + return ('<form class="unassignit" method="POST" action=""> <input type="hidden" name="cid" value="' . $c. '" /><input type="hidden" name="pid" value="' . $p1. '" /><input type="submit" name="unassignitem" value=""/> </form>'); else //not taken by anyone return ('<form method="POST" action=""> <input type="hidden" name="cid" value="' . $c. '" /><input type="hidden" name="pid" value="' . $p1. '" /><input type="submit" name="assignitem" value=""/> </form>'); } - - } } } |