summaryrefslogtreecommitdiffstats
path: root/includes/admin/views/giglog_admin_page.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/admin/views/giglog_admin_page.php')
-rw-r--r--includes/admin/views/giglog_admin_page.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php
index 7da93de..f3eaa87 100644
--- a/includes/admin/views/giglog_admin_page.php
+++ b/includes/admin/views/giglog_admin_page.php
@@ -5,31 +5,29 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
-if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
+if ( ! class_exists( 'GiglogAdmin_AdminPage' ) ) {
require_once __DIR__ . '/../../venue.php';
require_once __DIR__ . '/_concerts_table.php';
require_once __DIR__ . '/_edit_concert_form.php';
require_once __DIR__ . '/_new_venue_form.php';
- class GiglogAdmin_AdminPage
- {
- const STATUS_LABELS = [
+ class GiglogAdmin_AdminPage {
+
+ const STATUS_LABELS = array(
'',
'Accred Requested',
'Photo Approved',
'Text Approved',
'Photo and Text Approved',
- 'Rejected'
- ];
+ 'Rejected',
+ );
- public static function render_html() : void
- {
+ public static function render_html() : void {
$page = new self();
$page->render_page();
}
- private function render_page() : void
- {
+ private function render_page() : void {
$concerts = new GiglogAdmin_ConcertsTable();
?>
<div class="wrap">
@@ -49,40 +47,42 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
what the accreditation status is. You will get personal message if this
is really close to the concert date.</p>
- <p><?php echo $concerts->render() ?></p>
+ <p><?php echo $concerts->render(); ?></p>
</div>
<?php
- if (current_user_can('administrator')) {
+ if ( current_user_can( 'administrator' ) ) {
$edit_form = new GiglogAdmin_EditConcertForm();
- $venue_form = new GiglogAdmin_NewVenueForm(); ?>
+ $venue_form = new GiglogAdmin_NewVenueForm();
+ ?>
<div>
<h3>Form to create/edit concerts and venues</h3>
</div>
<div class="editform">
<?php echo $edit_form->render() . $venue_form->render(); ?>
- </div><?php
+ </div>
+ <?php
}
}
/**
* @return void
*/
- static function update() : void
- {
- if ('POST' !== $_SERVER['REQUEST_METHOD'])
+ static function update() : void {
+ if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
return;
+ }
- if (isset($_POST['assignitem']) || isset($_POST['unassignitem']) || isset($_POST['selectstatus'])) {
+ if ( isset( $_POST['assignitem'] ) || isset( $_POST['unassignitem'] ) || isset( $_POST['selectstatus'] ) ) {
GiglogAdmin_ConcertsTable::update();
return;
}
- if (isset($_POST['newconcert']) || isset($_POST['editconcert'])) {
+ if ( isset( $_POST['newconcert'] ) || isset( $_POST['editconcert'] ) ) {
GiglogAdmin_EditConcertForm::update();
return;
}
- if (isset($_POST['newvenue'])) {
+ if ( isset( $_POST['newvenue'] ) ) {
GiglogAdmin_NewVenueForm::update();
return;
}