missing close-brace while executing "namespace eval request { puts -nonewline "" /* Waveform page generator */ include_once("incs/audio_functions.php"); // function to read each wave's..."

OUTPUT BUFFER:

namespace eval request { puts -nonewline "" /* Waveform page generator */ include_once("incs/audio_functions.php"); // function to read each wave's config file function ride_wave($v) { $config_file = "pages/waves/$v/config.php"; if (file_exists($config_file)) { include($config_file); //if ($w_order) { //$result[order] = $w_order; //} else { //$result[order] = '20'; //} $result[title] = $w_title; $result[wave_dir] = $v; $result[img_raw] = $w_img_raw; $result[img_med] = $w_img_med; $result[img_harm_raw] = $w_img_harm_raw; $result[img_harm_med] = $w_img_harm_med; $result[txt] = $w_txt; $result[txt_harm] = $w_txt_harm; $result[extra] = $w_extra; $result[audio_ogg] = $w_audio_ogg; $result[audio_wav] = $w_audio_wav; if (!empty($result[audio_ogg])) { $result[audio_ogg_size] = format_bytes(filesize("pages/waves/$v/$w_audio_ogg")); } if (!empty($result[audio_wav])) { $result[audio_wav_size] = format_bytes(filesize("pages/waves/$v/$w_audio_wav")); } } return $result; } function sort_array_by_subkey($a,$subkey) { if (is_array($a)) { foreach($a as $k=>$v) { $b[$k] = $v[$subkey]; } asort($b); foreach($b as $key=>$val) { $c[] = $a[$key]; } return $c; } } include('waves/config.php'); // scan our wave dirs and get infos into an array //$waves_dir = array_diff(scandir('pages/waves'), Array(".", "..", ".svn", "template")); //echo "
"; print_r($waves_dir); echo "
"; //echo "
"; print_r($waves_order); echo "
"; foreach ($waves_order as $k => $v) { if (is_dir("pages/waves/$v")) { // AND $v != ".svn" ) { // AND $v != "template") { $waves[$v] = ride_wave("$v"); $waves[$v][prev] = $prev_wave; if (!empty($waves[$prev_wave][wave_dir])) { // tell the last wave this is the next one $waves[$prev_wave][next] = $waves[$v][wave_dir]; } // var to determine previous wave for next time around $prev_wave = $waves[$v][wave_dir]; } } //if (array_key_exists($_GET[wave], $waves_order)) { if (in_array($_GET[wave], $waves_order)) { $wave = $_GET[wave]; $big_wave = $waves[$wave]; $big_wave[anchor] = $wave; $big_wave[wavedir] = $wave; } //echo "
";
//print_r($waves);
//echo "
"; // end of functionality puts -nonewline " " /* BIG WAVE */ puts -nonewline " " if ($big_wave[title]) { puts -nonewline "

" echo $big_wave[title]; puts -nonewline "

" echo $big_wave[txt]; puts -nonewline "

" if (!empty($v[audio_ogg])) { puts -nonewline "
Download: OGG " echo "$big_wave[audio_ogg_size]"; puts -nonewline " - WAV " echo "$big_wave[audio_wav_size]"; puts -nonewline "
" } puts -nonewline "

" echo $big_wave[txt_harm]; puts -nonewline "

" if (!empty($big_wave[extra])) { puts -nonewline "

" echo $big_wave[extra]; puts -nonewline "

" } puts -nonewline "
" if ($big_wave[prev]) { puts -nonewline " Previous " } if ($big_wave[next]) { puts -nonewline " Next " } puts -nonewline "
Go back
" } else { puts -nonewline " " /* ALL WAVES */ puts -nonewline "

Waveforms

" /* template to show all the waves */ puts -nonewline " " foreach ($waves as $k => $v) { puts -nonewline "

" echo "$v[title]:"; puts -nonewline "

" echo $v[txt]; puts -nonewline "

" echo $v[txt_harm]; puts -nonewline "

" if (!empty($v[extra])) { puts -nonewline "

" echo $v[extra]; puts -nonewline "

" } puts -nonewline " " if (!empty($v[audio_ogg])) { puts -nonewline "
Download: OGG " echo "$v[audio_ogg_size]"; puts -nonewline " - WAV " echo "$v[audio_wav_size]"; puts -nonewline "
" } puts -nonewline "
" } puts -nonewline " " } puts -nonewline " " }