summaryrefslogtreecommitdiffstats
path: root/lib/ui.lib.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-07-12 05:30:30 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-07-12 05:30:30 +0000
commit7be9eb4ea1e868fa0725334697057e1b7b994460 (patch)
tree5d4c634f2d64f2202cad95b4ce74c87838655e3d /lib/ui.lib.php
parent12f679cf51ed9440c44cdc0cb178687f0ad17c3b (diff)
downloadampache-7be9eb4ea1e868fa0725334697057e1b7b994460.tar.gz
ampache-7be9eb4ea1e868fa0725334697057e1b7b994460.tar.bz2
ampache-7be9eb4ea1e868fa0725334697057e1b7b994460.zip
re-added ability to delete catalogs, fixed exception error with id3 library
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r--lib/ui.lib.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index a1283841..aa407adf 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -1424,4 +1424,27 @@ function ajax_include($include) {
} // ajax_include
+/**
+ * ajax_button
+ * This is a generic function that generates the on(whateva) URL for ajaxie hotness
+ * it takes a action url, icon name, alt tag and form_id (option)
+ */
+function ajax_button($action,$icon,$alt,$post_id='') {
+
+ $url = Config::get('ajax_url') . $action;
+ $icon_url = Config::get('web_path') . '/images/icons/' . $icon . '.png';
+
+ if ($post) {
+ $ajax_string = "ajaxPost('$url','$post');";
+ }
+ else {
+ $ajax_string = "ajaxPut('$url');";
+ }
+
+ $string = "<span onclick=\"$ajax_string;return true\">\n\t<img src=\"$icon_url\" border=\"0\" style=\"cursor:pointer;\" alt=\"$alt\" />\n</span>\n";
+
+ return $string;
+
+} // ajax_button
+
?>