Ejemplo n.º 1
0
 private function printSongs($songs, $artistName = false, $albumName = false)
 {
     header('Content-Type:  text/xml');
     $tmpl = new \OC_Template('media', 'ampache/songs');
     foreach ($songs as $song) {
         $songData = array();
         if ($artistName) {
             $songData['artist_name'] = xmlentities($artistName);
         } else {
             $songData['artist_name'] = xmlentities($this->collection->getArtistName($song['song_artist']));
         }
         if ($albumName) {
             $songData['album_name'] = xmlentities($albumName);
         } else {
             $songData['album_name'] = xmlentities($this->collection->getAlbumName($song['song_album']));
         }
         $songData['id'] = $song['song_id'];
         $songData['name'] = xmlentities($song['song_name']);
         $songData['artist'] = $song['song_artist'];
         $songData['album'] = $song['song_album'];
         $songData['length'] = $song['song_length'];
         $songData['track'] = $song['song_track'];
         $songData['size'] = $song['song_size'];
         $url = \OCP\Util::linkToRemote('ampache') . 'server/xml.server.php/?action=play&song=' . $songData['id'] . '&auth=' . $_GET['auth'];
         $songData['url'] = xmlentities($url);
         $tmpl->append('songs', $songData);
     }
     $tmpl->printPage();
 }
Ejemplo n.º 2
0
			</a>
		</li>
		<?php 
}
?>
	</ul>
	<div id="app-settings">
		<div id="app-settings-header">
			<button class="settings-button" data-apps-slide-toggle="#app-settings-content">
				<?php 
p($l->t('Settings'));
?>
			</button>
		</div>
		<div id="app-settings-content">
				<label for="webdavurl"><?php 
p($l->t('WebDAV'));
?>
</label>
				<input id="webdavurl" type="text" readonly="readonly" value="<?php 
p(\OCP\Util::linkToRemote('webdav'));
?>
" />
				<em><?php 
print_unescaped($l->t('Use this address to <a href="%s" target="_blank">access your Files via WebDAV</a>', array(link_to_docs('user-webdav'))));
?>
</em>
		</div>
	</div>
</div>
Ejemplo n.º 3
0
 /**
  * @brief Returns server address for Mozilla Sync Service
  *
  * @return string
  */
 public static function getServerAddress()
 {
     return \OCP\Util::linkToRemote('mozilla_sync');
 }