1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-06 03:49:56 +02:00

new rating hotness, has some bugs will continue to hash them out

This commit is contained in:
Karl 'vollmerk' Vollmer 2006-10-12 01:34:18 +00:00
parent 80d226853c
commit 2a8cbedade
9 changed files with 79 additions and 32 deletions

View file

@ -1353,6 +1353,23 @@ function xml_from_array($array) {
} // xml_from_array
/**
* show_ajax_js
* This displays the javascript array definition needed
* For ajax to know what it should be replacing
*/
function show_ajax_js($name,$array) {
$elements = count($array);
echo "<script type=\"text/javascript\" language=\"javascript\">\n";
echo "<!--\n";
echo "var $name = new Array($elements);\n";
foreach ($array as $key=>$value) {
echo $name . "[$key] = \"$value\";\n";
}
echo "-->\n</script>\n";
} // show_ajax_js
?>