summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/access.php4
-rw-r--r--admin/catalog.php4
-rw-r--r--admin/duplicates.php4
-rw-r--r--admin/export.php4
-rw-r--r--admin/flag.php4
-rw-r--r--admin/index.php4
-rw-r--r--admin/mail.php4
-rw-r--r--admin/modules.php4
-rw-r--r--admin/shout.php4
-rw-r--r--admin/system.php4
-rw-r--r--admin/users.php4
-rw-r--r--albums.php2
-rw-r--r--artists.php4
-rw-r--r--browse.php4
-rw-r--r--democratic.php4
-rw-r--r--flag.php2
-rw-r--r--index.php4
-rw-r--r--lib/class/ui.class.php21
-rw-r--r--lib/ui.lib.php24
-rw-r--r--localplay.php4
-rw-r--r--playlist.php4
-rw-r--r--preferences.php4
-rw-r--r--radio.php4
-rw-r--r--random.php4
-rw-r--r--search.php4
-rw-r--r--shout.php4
-rw-r--r--smartplaylist.php4
-rw-r--r--song.php4
-rw-r--r--stats.php4
-rw-r--r--templates/show_login_form.inc.php2
-rw-r--r--templates/show_user_registration.inc.php2
31 files changed, 75 insertions, 78 deletions
diff --git a/admin/access.php b/admin/access.php
index a39d3691..60e86d62 100644
--- a/admin/access.php
+++ b/admin/access.php
@@ -27,7 +27,7 @@ if (!Access::check('interface','100')) {
exit();
}
-show_header();
+UI::show_header();
switch ($_REQUEST['action']) {
case 'delete_record':
@@ -109,5 +109,5 @@ switch ($_REQUEST['action']) {
require_once Config::get('prefix') .'/templates/show_access_list.inc.php';
break;
} // end switch on action
-show_footer();
+UI::show_footer();
?>
diff --git a/admin/catalog.php b/admin/catalog.php
index ba2c63aa..bc67c13f 100644
--- a/admin/catalog.php
+++ b/admin/catalog.php
@@ -27,7 +27,7 @@ if (!Access::check('interface','100')) {
exit;
}
-show_header();
+UI::show_header();
/* Big switch statement to handle various actions */
switch ($_REQUEST['action']) {
@@ -314,6 +314,6 @@ switch ($_REQUEST['action']) {
} // end switch
/* Show the Footer */
-show_footer();
+UI::show_footer();
?>
diff --git a/admin/duplicates.php b/admin/duplicates.php
index f6100240..fe518bd5 100644
--- a/admin/duplicates.php
+++ b/admin/duplicates.php
@@ -27,7 +27,7 @@ if (!Access::check('interface','100')) {
exit;
}
-show_header();
+UI::show_header();
/* Switch on Action */
switch ($_REQUEST['action']) {
@@ -42,5 +42,5 @@ switch ($_REQUEST['action']) {
break;
} // end switch on action
-show_footer();
+UI::show_footer();
?>
diff --git a/admin/export.php b/admin/export.php
index 972d9211..5805a1fe 100644
--- a/admin/export.php
+++ b/admin/export.php
@@ -27,7 +27,7 @@ if (!Access::check('interface','100')) {
exit;
}
-show_header();
+UI::show_header();
/* Switch on Action */
switch ($_REQUEST['action']) {
@@ -73,5 +73,5 @@ switch ($_REQUEST['action']) {
break;
} // end switch on action
-show_footer();
+UI::show_footer();
?>
diff --git a/admin/flag.php b/admin/flag.php
index f7c8adf8..bb3e64aa 100644
--- a/admin/flag.php
+++ b/admin/flag.php
@@ -27,7 +27,7 @@ if (!Access::check('interface','100')) {
exit();
}
-show_header();
+UI::show_header();
switch ($_REQUEST['action']) {
case 'edit_song':
@@ -301,5 +301,5 @@ switch ($_REQUEST['action']) {
break;
} // end switch
-show_footer();
+UI::show_footer();
?>
diff --git a/admin/index.php b/admin/index.php
index 7bd5ea6d..e79e28ac 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -27,7 +27,7 @@ if (!Access::check('interface',100)) {
exit();
}
-show_header();
+UI::show_header();
switch ($_REQUEST['action']) {
default:
@@ -42,5 +42,5 @@ switch ($_REQUEST['action']) {
break;
}
-show_footer();
+UI::show_footer();
?>
diff --git a/admin/mail.php b/admin/mail.php
index 3db8f48c..6ed43fd8 100644
--- a/admin/mail.php
+++ b/admin/mail.php
@@ -27,7 +27,7 @@ if (!Access::check('interface','75')) {
exit();
}
-show_header();
+UI::show_header();
// Action switch
switch ($_REQUEST['action']) {
@@ -74,7 +74,7 @@ switch ($_REQUEST['action']) {
break;
} // end switch
-show_footer();
+UI::show_footer();
?>
diff --git a/admin/modules.php b/admin/modules.php
index e7c56b10..bf55578b 100644
--- a/admin/modules.php
+++ b/admin/modules.php
@@ -29,7 +29,7 @@ if (!$GLOBALS['user']->has_access(100)) {
/* Always show the header */
-show_header();
+UI::show_header();
switch ($_REQUEST['action']) {
case 'install_localplay':
@@ -153,6 +153,6 @@ switch ($_REQUEST['action']) {
break;
} // end switch
-show_footer();
+UI::show_footer();
?>
diff --git a/admin/shout.php b/admin/shout.php
index 2a5bba04..ca6933ac 100644
--- a/admin/shout.php
+++ b/admin/shout.php
@@ -27,7 +27,7 @@ if (!Access::check('interface','100')) {
exit;
}
-show_header();
+UI::show_header();
// Switch on the incomming action
switch ($_REQUEST['action']) {
@@ -58,5 +58,5 @@ switch ($_REQUEST['action']) {
break;
} // end switch on action
-show_footer();
+UI::show_footer();
?>
diff --git a/admin/system.php b/admin/system.php
index 7f7fe9de..e98f592d 100644
--- a/admin/system.php
+++ b/admin/system.php
@@ -27,7 +27,7 @@ if (!Access::check('interface',100) OR Config::get('demo_mode')) {
exit();
}
-show_header();
+UI::show_header();
/* Switch on action boys */
switch ($_REQUEST['action']) {
@@ -56,6 +56,6 @@ switch ($_REQUEST['action']) {
break;
} // end switch
-show_footer();
+UI::show_footer();
?>
diff --git a/admin/users.php b/admin/users.php
index 50d7b20d..84d19938 100644
--- a/admin/users.php
+++ b/admin/users.php
@@ -27,7 +27,7 @@ if (!Access::check('interface','100')) {
exit();
}
-show_header();
+UI::show_header();
// Switch on the actions
switch ($_REQUEST['action']) {
@@ -205,6 +205,6 @@ switch ($_REQUEST['action']) {
} // end switch on action
/* Show the footer */
-show_footer();
+UI::show_footer();
?>
diff --git a/albums.php b/albums.php
index 9b30d17d..f7413ac9 100644
--- a/albums.php
+++ b/albums.php
@@ -176,5 +176,5 @@ switch ($_REQUEST['action']) {
break;
} // switch on view
-show_footer();
+UI::show_footer();
?>
diff --git a/artists.php b/artists.php
index 880dc485..f893328a 100644
--- a/artists.php
+++ b/artists.php
@@ -22,7 +22,7 @@
require_once 'lib/init.php';
-show_header();
+UI::show_header();
/**
* Display Switch
@@ -207,5 +207,5 @@ switch($_REQUEST['action']) {
break;
} // end switch
-show_footer();
+UI::show_footer();
?>
diff --git a/browse.php b/browse.php
index 386c485b..b4fcf559 100644
--- a/browse.php
+++ b/browse.php
@@ -52,7 +52,7 @@ switch ($_REQUEST['action']) {
break;
} // end switch
-show_header();
+UI::show_header();
switch($_REQUEST['action']) {
case 'file':
@@ -117,5 +117,5 @@ switch($_REQUEST['action']) {
$browse->store();
/* Show the Footer */
-show_footer();
+UI::show_footer();
?>
diff --git a/democratic.php b/democratic.php
index d6a061d9..a31aa0e7 100644
--- a/democratic.php
+++ b/democratic.php
@@ -28,7 +28,7 @@ if (!Config::get('allow_democratic_playback')) {
exit;
}
-show_header();
+UI::show_header();
// Switch on their action
switch ($_REQUEST['action']) {
@@ -122,6 +122,6 @@ switch ($_REQUEST['action']) {
break;
} // end switch on action
-show_footer();
+UI::show_footer();
?>
diff --git a/flag.php b/flag.php
index 9ae3eb95..5ae3f143 100644
--- a/flag.php
+++ b/flag.php
@@ -57,5 +57,5 @@ switch ($action) {
break;
} // end action switch
-show_footer();
+UI::show_footer();
?>
diff --git a/index.php b/index.php
index 6545a27b..a1d2d3a4 100644
--- a/index.php
+++ b/index.php
@@ -22,7 +22,7 @@
require_once 'lib/init.php';
-show_header();
+UI::show_header();
$action = isset($_REQUEST['action']) ? scrub_in($_REQUEST['action']) : null;
@@ -42,6 +42,6 @@ if (Config::get('refresh_limit') > 5) {
require_once Config::get('prefix') . '/templates/show_index.inc.php';
-show_footer();
+UI::show_footer();
?>
diff --git a/lib/class/ui.class.php b/lib/class/ui.class.php
index e47fe0d1..c4fd3d47 100644
--- a/lib/class/ui.class.php
+++ b/lib/class/ui.class.php
@@ -89,6 +89,27 @@ class UI {
}
/**
+ * show_header
+ *
+ * For now this just shows the header template
+ */
+ public static function show_header() {
+ require_once Config::get('prefix') . '/templates/header.inc.php';
+ }
+
+ /**
+ * show_footer
+ *
+ * Shows the footer template and possibly profiling info.
+ */
+ public static function show_footer() {
+ require_once Config::get('prefix') . '/templates/footer.inc.php';
+ if (isset($_REQUEST['profiling'])) {
+ Dba::show_profile();
+ }
+ }
+
+ /**
* truncate
*
* Limit text to a certain length; adds an ellipsis if truncation was
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index 72b87f45..00f7eb27 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -75,30 +75,6 @@ function return_referer() {
} // return_referer
/**
- * show_header
- * This shows the header.inc.php, it may do something
- * more in the future
- */
-function show_header() {
-
- require_once Config::get('prefix') . '/templates/header.inc.php';
-
-} // show_header
-
-/**
- * show_footer
- * shows the footer of the page
- */
-function show_footer() {
-
- require_once Config::get('prefix') . '/templates/footer.inc.php';
- if (isset($_REQUEST['profiling'])) {
- Dba::show_profile();
- }
-
-} // show_footer
-
-/**
* get_location
* This function gets the information about a person's current location.
* This is used for A) sidebar highlighting & submenu showing and B) titlebar
diff --git a/localplay.php b/localplay.php
index 18814a46..3e04a87a 100644
--- a/localplay.php
+++ b/localplay.php
@@ -22,7 +22,7 @@
require_once 'lib/init.php';
-show_header();
+UI::show_header();
// Check to see if we've got the rights to be here
if (!Config::get('allow_localplay_playback') || !Access::check('interface','25')) {
@@ -90,5 +90,5 @@ switch ($_REQUEST['action']) {
break;
} // end switch action
-show_footer();
+UI::show_footer();
?>
diff --git a/playlist.php b/playlist.php
index 2b6dba05..b91f0136 100644
--- a/playlist.php
+++ b/playlist.php
@@ -35,7 +35,7 @@ if ($_REQUEST['action'] == 'delete_playlist') {
}
}
-show_header();
+UI::show_header();
/* Switch on the action passed in */
@@ -162,5 +162,5 @@ switch ($_REQUEST['action']) {
break;
} // switch on the action
-show_footer();
+UI::show_footer();
?>
diff --git a/preferences.php b/preferences.php
index ce25e39c..1b7e0f67 100644
--- a/preferences.php
+++ b/preferences.php
@@ -125,7 +125,7 @@ switch($_REQUEST['action']) {
break;
} // End Switch Action
-show_header();
+UI::show_header();
/**
* switch on the view
@@ -140,5 +140,5 @@ switch ($_REQUEST['action']) {
break;
} // end switch on action
-show_footer();
+UI::show_footer();
?>
diff --git a/radio.php b/radio.php
index 6249c35d..360c1ff7 100644
--- a/radio.php
+++ b/radio.php
@@ -22,7 +22,7 @@
require_once 'lib/init.php';
-show_header();
+UI::show_header();
// Switch on Action
switch ($_REQUEST['action']) {
@@ -60,6 +60,6 @@ switch ($_REQUEST['action']) {
break;
} // end data collection
-show_footer();
+UI::show_footer();
?>
diff --git a/random.php b/random.php
index 308e563f..7ec9676b 100644
--- a/random.php
+++ b/random.php
@@ -22,7 +22,7 @@
require_once 'lib/init.php';
-show_header();
+UI::show_header();
switch ($_REQUEST['action']) {
case 'get_advanced':
@@ -38,5 +38,5 @@ switch ($_REQUEST['action']) {
break;
} // end switch
-show_footer();
+UI::show_footer();
?>
diff --git a/search.php b/search.php
index a77824dc..4bbcb756 100644
--- a/search.php
+++ b/search.php
@@ -22,7 +22,7 @@
require_once 'lib/init.php';
-show_header();
+UI::show_header();
/**
* action switch
@@ -58,5 +58,5 @@ switch ($_REQUEST['action']) {
}
/* Show the Footer */
-show_footer();
+UI::show_footer();
?>
diff --git a/shout.php b/shout.php
index 0e3782f2..2acb88ed 100644
--- a/shout.php
+++ b/shout.php
@@ -22,7 +22,7 @@
require_once 'lib/init.php';
-show_header();
+UI::show_header();
// Switch on the incomming action
switch ($_REQUEST['action']) {
@@ -59,5 +59,5 @@ switch ($_REQUEST['action']) {
break;
} // end switch on action
-show_footer();
+UI::show_footer();
?>
diff --git a/smartplaylist.php b/smartplaylist.php
index 9031c33d..ac4d5d46 100644
--- a/smartplaylist.php
+++ b/smartplaylist.php
@@ -33,7 +33,7 @@ if ($_REQUEST['action'] == 'delete_playlist') {
}
}
-show_header();
+UI::show_header();
/* Switch on the action passed in */
switch ($_REQUEST['action']) {
@@ -98,5 +98,5 @@ switch ($_REQUEST['action']) {
break;
} // switch on the action
-show_footer();
+UI::show_footer();
?>
diff --git a/song.php b/song.php
index f611086a..2170616d 100644
--- a/song.php
+++ b/song.php
@@ -22,7 +22,7 @@
require_once 'lib/init.php';
-show_header();
+UI::show_header();
// Switch on Action
switch ($_REQUEST['action']) {
@@ -35,6 +35,6 @@ switch ($_REQUEST['action']) {
break;
} // end data collection
-show_footer();
+UI::show_footer();
?>
diff --git a/stats.php b/stats.php
index d3915715..fd2569ec 100644
--- a/stats.php
+++ b/stats.php
@@ -22,7 +22,7 @@
require_once 'lib/init.php';
-show_header();
+UI::show_header();
/* Switch on the action to be performed */
switch ($_REQUEST['action']) {
@@ -56,6 +56,6 @@ switch ($_REQUEST['action']) {
break;
} // end switch on action
-show_footer();
+UI::show_footer();
?>
diff --git a/templates/show_login_form.inc.php b/templates/show_login_form.inc.php
index ac6ed2b0..3ec408f6 100644
--- a/templates/show_login_form.inc.php
+++ b/templates/show_login_form.inc.php
@@ -95,5 +95,5 @@ if (@is_readable(Config::get('prefix') . '/config/motd.php')) {
?>
<?php
}
-show_footer();
+UI::show_footer();
?>
diff --git a/templates/show_user_registration.inc.php b/templates/show_user_registration.inc.php
index 7bc21083..be9e269e 100644
--- a/templates/show_user_registration.inc.php
+++ b/templates/show_user_registration.inc.php
@@ -110,5 +110,5 @@ if (Config::get('user_agreement')) { ?>
</div>
</form>
<?php
-show_footer();
+UI::show_footer();
?>