$linkfile = nglink($path . "\\" . $bw_list['files'][$j]); $curpath = nglink($bw_path); echo "<A CLASS=\"bold italic link\" HREF=\"?host={$host}&action=browse&bw_op=add&bw_addfile={$linkfile}&bw_path={$curpath}\">{$bw_list['files'][$j]}</A><BR>\n"; $count++; } echo "<BR>\n"; $bw_list['files'] = array(); } echo "<BR>\n"; return $count; } $showauth = FALSE; // connect to NGWinamp server if possible if ($ngwc->connect($host)) { // authenticate with server if ($ngwc->authenticate("") == NGWINAMP_AUTH_SUCCESS) { // OK : success echo "<P CLASS=\"info\">Connected... sending requests...</P>\n"; // Get stats $sn_volume = sprintf("%.01f", $ngwc->sn_getvolume()); $sn_pan = sprintf("%.01f", $ngwc->sn_getpan()); $tmp = $ngwc->sn_getpos(); $sn_pos = sprintf("%.01f", $tmp['pos']); $sn_postime = sprintf("%.01f", $tmp['posms'] / 1000.0); $sn_length = sprintf("%.01f", $tmp['lengthms'] / 1000.0); // retrieve playlist infos $tmp = $ngwc->pl_getpos(); $pl_pos = $tmp['index']; $pl_length = $tmp['length']; if ($ngwc->pl_getshuffle()) { $pl_shuffle = "enabled";
<STYLE TYPE="text/css"> BODY {font-family:courier new;font-size:12px;color:black;} .title {font-size:20px;font-weight:bold;} .info {font-style:italic;} .error {font-style:italic;font-weight:bold;color:red;} .link {text-decoration:none;color:black;} .link:hover {text-decoration:underline;font-weight:bold;color:blue;} </STYLE> </HEAD> <BODY> <?php // connect to NGWinamp server if possible if ($ngwc->connect($host)) { // authenticate with server if ($ngwc->authenticate($passwd) == NGWINAMP_AUTH_SUCCESS) { // OK : success echo "<P CLASS=\"info\">Connected... sending requests...</P>\n"; // sound requests if (strcmp($action, "sound") == 0) { if (strcmp($sn_op, "prev") == 0) { $ngwc->sn_prev(); } if (strcmp($sn_op, "play") == 0) { $ngwc->sn_play(); } if (strcmp($sn_op, "pause") == 0) { $ngwc->sn_pause(); } if (strcmp($sn_op, "stop") == 0) { $ngwc->sn_stop();