mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-06 03:49:56 +02:00
Edit library items in a more generic way
Use real large image on Google gather arts
This commit is contained in:
parent
4454696f29
commit
b5f92aa25c
119 changed files with 1147 additions and 1036 deletions
|
@ -32,7 +32,10 @@ UI::show_header();
|
||||||
switch ($_REQUEST['action']) {
|
switch ($_REQUEST['action']) {
|
||||||
case 'edit':
|
case 'edit':
|
||||||
if (isset($_POST['license_id'])) {
|
if (isset($_POST['license_id'])) {
|
||||||
License::update($_POST);
|
$license = new License($_POST['license_id']);
|
||||||
|
if ($license->id) {
|
||||||
|
$license->update($_POST);
|
||||||
|
}
|
||||||
$text = T_('License Updated');
|
$text = T_('License Updated');
|
||||||
} else {
|
} else {
|
||||||
License::create($_POST);
|
License::create($_POST);
|
||||||
|
|
|
@ -32,8 +32,10 @@ UI::show_header();
|
||||||
// Switch on the incomming action
|
// Switch on the incomming action
|
||||||
switch ($_REQUEST['action']) {
|
switch ($_REQUEST['action']) {
|
||||||
case 'edit_shout':
|
case 'edit_shout':
|
||||||
$shout_id = $_POST['shout_id'];
|
$shout = new Shoutbox($_REQUEST['shout_id']);
|
||||||
$update = Shoutbox::update($_POST);
|
if ($shout->id) {
|
||||||
|
$shout->update($_POST);
|
||||||
|
}
|
||||||
show_confirmation(T_('Shoutbox Post Updated'),'',AmpConfig::get('web_path').'/admin/shout.php');
|
show_confirmation(T_('Shoutbox Post Updated'),'',AmpConfig::get('web_path').'/admin/shout.php');
|
||||||
break;
|
break;
|
||||||
case 'show_edit':
|
case 'show_edit':
|
||||||
|
|
|
@ -49,7 +49,7 @@ switch ($_REQUEST['action']) {
|
||||||
$name = $playlist->name;
|
$name = $playlist->name;
|
||||||
break;
|
break;
|
||||||
case 'smartplaylist':
|
case 'smartplaylist':
|
||||||
$search = new Search('song', $_REQUEST['id']);
|
$search = new Search($_REQUEST['id'], 'song');
|
||||||
$items = $search->get_items();
|
$items = $search->get_items();
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
$media_ids[] = $item['object_id'];
|
$media_ids[] = $item['object_id'];
|
||||||
|
|
|
@ -381,7 +381,7 @@ notify = "true"
|
||||||
; method unless you want it to overwrite what's already in the
|
; method unless you want it to overwrite what's already in the
|
||||||
; database
|
; database
|
||||||
; POSSIBLE VALUES (builtins): db tags folder lastfm musicbrainz google
|
; POSSIBLE VALUES (builtins): db tags folder lastfm musicbrainz google
|
||||||
; POSSIBLE VALUES (plugins): amazon
|
; POSSIBLE VALUES (plugins): amazon,Tmdb,Omdb,Flickr
|
||||||
; DEFAULT: db,tags,folder,musicbrainz,lastfm,google
|
; DEFAULT: db,tags,folder,musicbrainz,lastfm,google
|
||||||
art_order = "db,tags,folder,musicbrainz,lastfm,google"
|
art_order = "db,tags,folder,musicbrainz,lastfm,google"
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,9 @@ if (!isset($_GET['object_type'])) {
|
||||||
$_GET['object_type'] = 'album';
|
$_GET['object_type'] = 'album';
|
||||||
}
|
}
|
||||||
|
|
||||||
$type = Art::validate_type($_GET['object_type']);
|
$type = $_GET['object_type'];
|
||||||
|
if (!Catalog::is_library_item($type))
|
||||||
|
exit;
|
||||||
|
|
||||||
/* Decide what size this image is */
|
/* Decide what size this image is */
|
||||||
$size = Art::get_thumb_size($_GET['thumb']);
|
$size = Art::get_thumb_size($_GET['thumb']);
|
||||||
|
|
|
@ -468,10 +468,10 @@ class Album extends database_object implements library_item
|
||||||
$keywords = array();
|
$keywords = array();
|
||||||
$keywords['artist'] = array('important' => true,
|
$keywords['artist'] = array('important' => true,
|
||||||
'label' => T_('Artist'),
|
'label' => T_('Artist'),
|
||||||
'value' => (($album->artist_count == 1) ? $this->f_artist_name : ''));
|
'value' => (($album->artist_count < 2) ? $this->f_artist_name : ''));
|
||||||
$keywords['album'] = array('important' => true,
|
$keywords['album'] = array('important' => true,
|
||||||
'label' => T_('Album'),
|
'label' => T_('Album'),
|
||||||
'value' => $this->f_full_name);
|
'value' => $this->f_name);
|
||||||
|
|
||||||
return $keywords;
|
return $keywords;
|
||||||
}
|
}
|
||||||
|
@ -495,6 +495,11 @@ class Album extends database_object implements library_item
|
||||||
return array('song' => $this->get_songs());
|
return array('song' => $this->get_songs());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_user_owner()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get_random_songs
|
* get_random_songs
|
||||||
* gets a random number, and a random assortment of songs from this album
|
* gets a random number, and a random assortment of songs from this album
|
||||||
|
|
|
@ -50,7 +50,9 @@ class Art extends database_object
|
||||||
*/
|
*/
|
||||||
public function __construct($uid, $type = 'album')
|
public function __construct($uid, $type = 'album')
|
||||||
{
|
{
|
||||||
$this->type = Art::validate_type($type);
|
if (!Catalog::is_library_item($type))
|
||||||
|
return false;
|
||||||
|
$this->type = $type;
|
||||||
$this->uid = $uid;
|
$this->uid = $uid;
|
||||||
|
|
||||||
} // constructor
|
} // constructor
|
||||||
|
@ -124,26 +126,6 @@ class Art extends database_object
|
||||||
//setcookie('art_enabled', self::$enabled, time() + 31536000, "/");
|
//setcookie('art_enabled', self::$enabled, time() + 31536000, "/");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* validate_type
|
|
||||||
* This validates the type
|
|
||||||
*/
|
|
||||||
public static function validate_type($type)
|
|
||||||
{
|
|
||||||
switch ($type) {
|
|
||||||
case 'album':
|
|
||||||
case 'artist':
|
|
||||||
case 'video':
|
|
||||||
case 'user':
|
|
||||||
case 'tvshow':
|
|
||||||
case 'tvshow_season':
|
|
||||||
return $type;
|
|
||||||
default:
|
|
||||||
return 'album';
|
|
||||||
}
|
|
||||||
|
|
||||||
} // validate_type
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* extension
|
* extension
|
||||||
* This returns the file extension for the currently loaded art
|
* This returns the file extension for the currently loaded art
|
||||||
|
@ -505,8 +487,15 @@ class Art extends database_object
|
||||||
}
|
}
|
||||||
$options['proxy'] = $proxy;
|
$options['proxy'] = $proxy;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
$request = Requests::get($data['url'], array(), $options);
|
$request = Requests::get($data['url'], array(), $options);
|
||||||
return $request->body;
|
$raw = $request->body;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
debug_event('Art', 'Error getting art: ' . $e->getMessage(), '1');
|
||||||
|
$raw = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $raw;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if it's a FILE
|
// Check to see if it's a FILE
|
||||||
|
@ -544,7 +533,8 @@ class Art extends database_object
|
||||||
public static function url($uid,$type,$sid=false)
|
public static function url($uid,$type,$sid=false)
|
||||||
{
|
{
|
||||||
$sid = $sid ? scrub_out($sid) : scrub_out(session_id());
|
$sid = $sid ? scrub_out($sid) : scrub_out(session_id());
|
||||||
$type = self::validate_type($type);
|
if (!Catalog::is_library_item($type))
|
||||||
|
return null;
|
||||||
|
|
||||||
$key = $type . $uid;
|
$key = $type . $uid;
|
||||||
|
|
||||||
|
@ -711,7 +701,7 @@ class Art extends database_object
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the results we got to the current set
|
// Add the results we got to the current set
|
||||||
$results = array_merge((array) $data, $results);
|
$results = array_merge($results, (array) $data);
|
||||||
|
|
||||||
if ($limit && count($results) >= $limit) {
|
if ($limit && count($results) >= $limit) {
|
||||||
return array_slice($results, 0, $limit);
|
return array_slice($results, 0, $limit);
|
||||||
|
@ -803,6 +793,7 @@ class Art extends database_object
|
||||||
$images[] = array(
|
$images[] = array(
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'mime' => 'image/jpeg',
|
'mime' => 'image/jpeg',
|
||||||
|
'title' => 'MusicBrainz'
|
||||||
);
|
);
|
||||||
if ($num_found >= $limit) {
|
if ($num_found >= $limit) {
|
||||||
return $images;
|
return $images;
|
||||||
|
@ -885,6 +876,7 @@ class Art extends database_object
|
||||||
$images[] = array(
|
$images[] = array(
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'mime' => 'image/jpeg',
|
'mime' => 'image/jpeg',
|
||||||
|
'title' => 'MusicBrainz'
|
||||||
);
|
);
|
||||||
if ($num_found >= $limit) {
|
if ($num_found >= $limit) {
|
||||||
return $images;
|
return $images;
|
||||||
|
@ -906,6 +898,10 @@ class Art extends database_object
|
||||||
*/
|
*/
|
||||||
public function gather_folder($limit = 5)
|
public function gather_folder($limit = 5)
|
||||||
{
|
{
|
||||||
|
if (!$limit) {
|
||||||
|
$limit = 5;
|
||||||
|
}
|
||||||
|
|
||||||
$media = new Album($this->uid);
|
$media = new Album($this->uid);
|
||||||
$songs = $media->get_songs();
|
$songs = $media->get_songs();
|
||||||
$results = array();
|
$results = array();
|
||||||
|
@ -980,7 +976,8 @@ class Art extends database_object
|
||||||
debug_event('folder_art', "Found preferred image file: $file", 5);
|
debug_event('folder_art', "Found preferred image file: $file", 5);
|
||||||
$preferred[$index] = array(
|
$preferred[$index] = array(
|
||||||
'file' => $full_filename,
|
'file' => $full_filename,
|
||||||
'mime' => 'image/' . $extension
|
'mime' => 'image/' . $extension,
|
||||||
|
'title' => 'Folder'
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -988,7 +985,8 @@ class Art extends database_object
|
||||||
debug_event('folder_art', "Found image file: $file", 5);
|
debug_event('folder_art', "Found image file: $file", 5);
|
||||||
$results[$index] = array(
|
$results[$index] = array(
|
||||||
'file' => $full_filename,
|
'file' => $full_filename,
|
||||||
'mime' => 'image/' . $extension
|
'mime' => 'image/' . $extension,
|
||||||
|
'title' => 'Folder'
|
||||||
);
|
);
|
||||||
|
|
||||||
} // end while reading dir
|
} // end while reading dir
|
||||||
|
@ -1018,6 +1016,10 @@ class Art extends database_object
|
||||||
*/
|
*/
|
||||||
public function gather_tags($limit = 5)
|
public function gather_tags($limit = 5)
|
||||||
{
|
{
|
||||||
|
if (!$limit) {
|
||||||
|
$limit = 5;
|
||||||
|
}
|
||||||
|
|
||||||
// We need the filenames
|
// We need the filenames
|
||||||
$album = new Album($this->uid);
|
$album = new Album($this->uid);
|
||||||
|
|
||||||
|
@ -1039,7 +1041,8 @@ class Art extends database_object
|
||||||
$data[] = array(
|
$data[] = array(
|
||||||
'song' => $song->file,
|
'song' => $song->file,
|
||||||
'raw' => $image['data'],
|
'raw' => $image['data'],
|
||||||
'mime' => $image['mime']);
|
'mime' => $image['mime'],
|
||||||
|
'title' => 'ID3');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($id3['id3v2']['APIC'])) {
|
if (isset($id3['id3v2']['APIC'])) {
|
||||||
|
@ -1048,7 +1051,8 @@ class Art extends database_object
|
||||||
$data[] = array(
|
$data[] = array(
|
||||||
'song' => $song->file,
|
'song' => $song->file,
|
||||||
'raw' => $image['data'],
|
'raw' => $image['data'],
|
||||||
'mime' => $image['mime']);
|
'mime' => $image['mime'],
|
||||||
|
'title' => 'ID3');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1070,22 +1074,39 @@ class Art extends database_object
|
||||||
*/
|
*/
|
||||||
public function gather_google($limit = 5, $data = array())
|
public function gather_google($limit = 5, $data = array())
|
||||||
{
|
{
|
||||||
|
if (!$limit) {
|
||||||
|
$limit = 5;
|
||||||
|
}
|
||||||
|
|
||||||
$images = array();
|
$images = array();
|
||||||
$search = rawurlencode($data['keyword']);
|
$search = rawurlencode($data['keyword']);
|
||||||
|
|
||||||
$size = '&imgsz=m'; // Medium
|
$size = '&imgsz=m'; // Medium
|
||||||
//$size = '&imgsz=l'; // Large
|
|
||||||
|
|
||||||
$url = "http://images.google.com/images?source=hp&q=" . $search . "&oq=&um=1&ie=UTF-8&sa=N&tab=wi&start=0&tbo=1" . $size;
|
$url = "http://images.google.com/images?source=hp&q=" . $search . "&oq=&um=1&ie=UTF-8&sa=N&tab=wi&start=0&tbo=1" . $size;
|
||||||
$html = file_get_contents($url);
|
debug_event('Art', 'Search url: ' . $url, '5');
|
||||||
|
|
||||||
if(preg_match_all("|\ssrc\=\"(http.+?)\"|", $html, $matches, PREG_PATTERN_ORDER))
|
try {
|
||||||
|
// Need this to not be considered as a bot (are we? ^^)
|
||||||
|
$headers = array(
|
||||||
|
'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',
|
||||||
|
);
|
||||||
|
$query = Requests::get($url, $headers);
|
||||||
|
$html = $query->body;
|
||||||
|
|
||||||
|
if (preg_match_all("|imgres\?imgurl\=(http.+?)&|", $html, $matches, PREG_PATTERN_ORDER)) {
|
||||||
foreach ($matches[1] as $match) {
|
foreach ($matches[1] as $match) {
|
||||||
$extension = "image/jpeg";
|
$match = rawurldecode($match);
|
||||||
|
debug_event('Art', 'Found image at: ' . $match, '5');
|
||||||
|
$results = pathinfo($match);
|
||||||
|
$mime = 'image/' . $results['extension'];
|
||||||
|
|
||||||
if (strrpos($extension, '.') !== false) $extension = substr($extension, strrpos($extension, '.') + 1);
|
$images[] = array('url' => $match, 'mime' => $mime, 'title' => 'Google');
|
||||||
|
if ($limit > 0 && count($images) >= $limit)
|
||||||
$images[] = array('url' => $match, 'mime' => $extension);
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
debug_event('Art', 'Error getting google images: ' . $e->getMessage(), '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $images;
|
return $images;
|
||||||
|
@ -1099,6 +1120,10 @@ class Art extends database_object
|
||||||
*/
|
*/
|
||||||
public function gather_lastfm($limit = 5, $data = array())
|
public function gather_lastfm($limit = 5, $data = array())
|
||||||
{
|
{
|
||||||
|
if (!$limit) {
|
||||||
|
$limit = 5;
|
||||||
|
}
|
||||||
|
|
||||||
$images = array();
|
$images = array();
|
||||||
|
|
||||||
if ($this->type != 'album' || empty($data['artist']) || empty($data['album'])) {
|
if ($this->type != 'album' || empty($data['artist']) || empty($data['album'])) {
|
||||||
|
@ -1123,7 +1148,7 @@ class Art extends database_object
|
||||||
// HACK: we shouldn't rely on the extension to determine file type
|
// HACK: we shouldn't rely on the extension to determine file type
|
||||||
$results = pathinfo($url);
|
$results = pathinfo($url);
|
||||||
$mime = 'image/' . $results['extension'];
|
$mime = 'image/' . $results['extension'];
|
||||||
$images[] = array('url' => $url, 'mime' => $mime);
|
$images[] = array('url' => $url, 'mime' => $mime, 'title' => 'LastFM');
|
||||||
if ($limit && count($images) >= $limit) {
|
if ($limit && count($images) >= $limit) {
|
||||||
return $images;
|
return $images;
|
||||||
}
|
}
|
||||||
|
@ -1162,21 +1187,21 @@ class Art extends database_object
|
||||||
if ($meta['tvshow_art']) {
|
if ($meta['tvshow_art']) {
|
||||||
$url = $meta['tvshow_art'];
|
$url = $meta['tvshow_art'];
|
||||||
$ures = pathinfo($url);
|
$ures = pathinfo($url);
|
||||||
$images[] = array('url' => $url, 'mime' => 'image/' . $ures['extension']);
|
$images[] = array('url' => $url, 'mime' => 'image/' . $ures['extension'], 'title' => $plugin->name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'tvshow_season':
|
case 'tvshow_season':
|
||||||
if ($meta['tvshow_season_art']) {
|
if ($meta['tvshow_season_art']) {
|
||||||
$url = $meta['tvshow_season_art'];
|
$url = $meta['tvshow_season_art'];
|
||||||
$ures = pathinfo($url);
|
$ures = pathinfo($url);
|
||||||
$images[] = array('url' => $url, 'mime' => 'image/' . $ures['extension']);
|
$images[] = array('url' => $url, 'mime' => 'image/' . $ures['extension'], 'title' => $plugin->name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ($meta['art']) {
|
if ($meta['art']) {
|
||||||
$url = $meta['art'];
|
$url = $meta['art'];
|
||||||
$ures = pathinfo($url);
|
$ures = pathinfo($url);
|
||||||
$images[] = array('url' => $url, 'mime' => 'image/' . $ures['extension']);
|
$images[] = array('url' => $url, 'mime' => 'image/' . $ures['extension'], 'title' => $plugin->name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1230,6 +1255,11 @@ class Art extends database_object
|
||||||
return $size;
|
return $size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function display_item($item, $thumb, $link = null)
|
||||||
|
{
|
||||||
|
return self::display($item->type, $item->id, $item->get_fullname(), $thumb, $link);
|
||||||
|
}
|
||||||
|
|
||||||
public static function display($object_type, $object_id, $name, $thumb, $link = null)
|
public static function display($object_type, $object_id, $name, $thumb, $link = null)
|
||||||
{
|
{
|
||||||
$size = self::get_thumb_size($thumb);
|
$size = self::get_thumb_size($thumb);
|
||||||
|
|
|
@ -370,6 +370,11 @@ class Artist extends database_object implements library_item
|
||||||
return array('album' => $this->get_albums());
|
return array('album' => $this->get_albums());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_user_owner()
|
||||||
|
{
|
||||||
|
return $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check
|
* check
|
||||||
*
|
*
|
||||||
|
|
|
@ -28,6 +28,7 @@ class Broadcast extends database_object implements library_item
|
||||||
public $song;
|
public $song;
|
||||||
public $song_position;
|
public $song_position;
|
||||||
public $name;
|
public $name;
|
||||||
|
public $user;
|
||||||
|
|
||||||
public $tags;
|
public $tags;
|
||||||
public $f_name;
|
public $f_name;
|
||||||
|
@ -104,7 +105,9 @@ class Broadcast extends database_object implements library_item
|
||||||
$sql = "UPDATE `broadcast` SET `name` = ?, `description` = ?, `is_private` = ? " .
|
$sql = "UPDATE `broadcast` SET `name` = ?, `description` = ?, `is_private` = ? " .
|
||||||
"WHERE `id` = ?";
|
"WHERE `id` = ?";
|
||||||
$params = array($data['name'], $data['description'], !empty($data['private']), $this->id);
|
$params = array($data['name'], $data['description'], !empty($data['private']), $this->id);
|
||||||
return Dba::write($sql, $params);
|
Dba::write($sql, $params);
|
||||||
|
|
||||||
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function format()
|
public function format()
|
||||||
|
@ -135,6 +138,11 @@ class Broadcast extends database_object implements library_item
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_user_owner()
|
||||||
|
{
|
||||||
|
return $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
public static function get_broadcast_list_sql()
|
public static function get_broadcast_list_sql()
|
||||||
{
|
{
|
||||||
$sql = "SELECT `id` FROM `broadcast` WHERE `started` = '1' ";
|
$sql = "SELECT `id` FROM `broadcast` WHERE `started` = '1' ";
|
||||||
|
@ -177,7 +185,7 @@ class Broadcast extends database_object implements library_item
|
||||||
{
|
{
|
||||||
if ($this->id) {
|
if ($this->id) {
|
||||||
if ($GLOBALS['user']->has_access('75')) {
|
if ($GLOBALS['user']->has_access('75')) {
|
||||||
echo "<a id=\"edit_broadcast_ " . $this->id . "\" onclick=\"showEditDialog('broadcast_row', '" . $this->id . "', 'edit_broadcast_" . $this->id . "', '" . T_('Broadcast edit') . "', 'broadcast_row_', 'refresh_broadcast')\">" . UI::get_icon('edit', T_('Edit')) . "</a>";
|
echo "<a id=\"edit_broadcast_ " . $this->id . "\" onclick=\"showEditDialog('broadcast_row', '" . $this->id . "', 'edit_broadcast_" . $this->id . "', '" . T_('Broadcast edit') . "', 'broadcast_row_')\">" . UI::get_icon('edit', T_('Edit')) . "</a>";
|
||||||
echo " <a href=\"" . AmpConfig::get('web_path') . "/broadcast.php?action=show_delete&id=" . $this->id ."\">" . UI::get_icon('delete', T_('Delete')) . "</a>";
|
echo " <a href=\"" . AmpConfig::get('web_path') . "/broadcast.php?action=show_delete&id=" . $this->id ."\">" . UI::get_icon('delete', T_('Delete')) . "</a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,11 +187,11 @@ class Browse extends Query
|
||||||
break;
|
break;
|
||||||
case 'smartplaylist':
|
case 'smartplaylist':
|
||||||
$box_title = T_('Smart Playlists') . $match;
|
$box_title = T_('Smart Playlists') . $match;
|
||||||
$box_req = AmpConfig::get('prefix') . '/templates/show_smartplaylists.inc.php';
|
$box_req = AmpConfig::get('prefix') . '/templates/show_searches.inc.php';
|
||||||
break;
|
break;
|
||||||
case 'catalog':
|
case 'catalog':
|
||||||
$box_title = T_('Catalogs');
|
$box_title = T_('Catalogs');
|
||||||
$box_req = AmpConfig::get('prefix') . '/templates/show_catalogs.inc.php';
|
$box_req = AmpConfig::get('prefix') . '/templates/show_searches.inc.php';
|
||||||
break;
|
break;
|
||||||
case 'shoutbox':
|
case 'shoutbox':
|
||||||
$box_title = T_('Shoutbox Records');
|
$box_title = T_('Shoutbox Records');
|
||||||
|
|
|
@ -1633,4 +1633,23 @@ abstract class Catalog extends database_object
|
||||||
|
|
||||||
} // export
|
} // export
|
||||||
|
|
||||||
|
private static function is_class_typeof($classname, $typeofname)
|
||||||
|
{
|
||||||
|
if (class_exists($classname)) {
|
||||||
|
return in_array($typeofname, array_map('strtolower', class_implements($classname)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function is_library_item($classname)
|
||||||
|
{
|
||||||
|
return self::is_class_typeof($classname, 'library_item');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function is_media($classname)
|
||||||
|
{
|
||||||
|
return self::is_class_typeof($classname, 'media');
|
||||||
|
}
|
||||||
|
|
||||||
} // end of catalog class
|
} // end of catalog class
|
||||||
|
|
|
@ -149,7 +149,9 @@ class Channel extends database_object implements library_item
|
||||||
$sql = "UPDATE `channel` SET `name` = ?, `description` = ?, `url` = ?, `interface` = ?, `port` = ?, `fixed_endpoint` = ?, `admin_password` = ?, `is_private` = ?, `max_listeners` = ?, `random` = ?, `loop` = ?, `stream_type` = ?, `bitrate` = ?, `object_id` = ? " .
|
$sql = "UPDATE `channel` SET `name` = ?, `description` = ?, `url` = ?, `interface` = ?, `port` = ?, `fixed_endpoint` = ?, `admin_password` = ?, `is_private` = ?, `max_listeners` = ?, `random` = ?, `loop` = ?, `stream_type` = ?, `bitrate` = ?, `object_id` = ? " .
|
||||||
"WHERE `id` = ?";
|
"WHERE `id` = ?";
|
||||||
$params = array($data['name'], $data['description'], $data['url'], $data['interface'], $data['port'], (!empty($data['interface']) && !empty($data['port'])), $data['admin_password'], !empty($data['private']), $data['max_listeners'], $data['random'], $data['loop'], $data['stream_type'], $data['bitrate'], $data['object_id'], $this->id);
|
$params = array($data['name'], $data['description'], $data['url'], $data['interface'], $data['port'], (!empty($data['interface']) && !empty($data['port'])), $data['admin_password'], !empty($data['private']), $data['max_listeners'], $data['random'], $data['loop'], $data['stream_type'], $data['bitrate'], $data['object_id'], $this->id);
|
||||||
return Dba::write($sql, $params);
|
Dba::write($sql, $params);
|
||||||
|
|
||||||
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function format_type($type)
|
public static function format_type($type)
|
||||||
|
@ -204,6 +206,11 @@ class Channel extends database_object implements library_item
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_user_owner()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public function get_target_object()
|
public function get_target_object()
|
||||||
{
|
{
|
||||||
$object = null;
|
$object = null;
|
||||||
|
|
|
@ -77,12 +77,12 @@ class Clip extends Video
|
||||||
* update
|
* update
|
||||||
* This takes a key'd array of data as input and updates a clip entry
|
* This takes a key'd array of data as input and updates a clip entry
|
||||||
*/
|
*/
|
||||||
public static function update($data)
|
public function update($data)
|
||||||
{
|
{
|
||||||
$sql = "UPDATE `clip` SET `artist` = ?, `song` = ? WHERE `id` = ?";
|
$sql = "UPDATE `clip` SET `artist` = ?, `song` = ? WHERE `id` = ?";
|
||||||
Dba::write($sql, array($data['artist'], $data['song'], $data['id']));
|
Dba::write($sql, array($data['artist'], $data['song'], $this->id));
|
||||||
|
|
||||||
return true;
|
return $this->id;
|
||||||
|
|
||||||
} // update
|
} // update
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ class Daap_Api
|
||||||
$l .= self::tlv_playlist($playlist);
|
$l .= self::tlv_playlist($playlist);
|
||||||
}
|
}
|
||||||
foreach ($searches as $search_id) {
|
foreach ($searches as $search_id) {
|
||||||
$playlist = new Search('song', $search_id);
|
$playlist = new Search($search_id, 'song');
|
||||||
$playlist->format();
|
$playlist->format();
|
||||||
$l .= self::tlv_playlist($playlist);
|
$l .= self::tlv_playlist($playlist);
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,7 @@ class Daap_Api
|
||||||
|
|
||||||
if ($id > Daap_Api::AMPACHEID_SMARTPL) {
|
if ($id > Daap_Api::AMPACHEID_SMARTPL) {
|
||||||
$id -= Daap_Api::AMPACHEID_SMARTPL;
|
$id -= Daap_Api::AMPACHEID_SMARTPL;
|
||||||
$playlist = new Search('song', $id);
|
$playlist = new Search($id, 'song');
|
||||||
} else {
|
} else {
|
||||||
$playlist = new Playlist($id);
|
$playlist = new Playlist($id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,4 +43,10 @@ interface library_item
|
||||||
|
|
||||||
public function get_childrens();
|
public function get_childrens();
|
||||||
|
|
||||||
|
public function get_user_owner();
|
||||||
|
|
||||||
|
public function update($data);
|
||||||
|
|
||||||
|
public static function gc();
|
||||||
|
|
||||||
} // end interface
|
} // end interface
|
||||||
|
|
|
@ -81,12 +81,12 @@ class License
|
||||||
* update
|
* update
|
||||||
* This takes a key'd array of data as input and updates a license entry
|
* This takes a key'd array of data as input and updates a license entry
|
||||||
*/
|
*/
|
||||||
public static function update($data)
|
public function update($data)
|
||||||
{
|
{
|
||||||
$sql = "UPDATE `license` SET `name` = ?, `description` = ?, `external_link` = ? WHERE `id` = ?";
|
$sql = "UPDATE `license` SET `name` = ?, `description` = ?, `external_link` = ? WHERE `id` = ?";
|
||||||
Dba::write($sql, array($data['name'], $data['description'], $data['external_link'], $data['license_id']));
|
Dba::write($sql, array($data['name'], $data['description'], $data['external_link'], $this->id));
|
||||||
|
|
||||||
return true;
|
return $this->id;
|
||||||
|
|
||||||
} // create
|
} // create
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
* this can include podcasts or what-have-you
|
* this can include podcasts or what-have-you
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class Radio extends database_object implements media, library_item
|
class Live_Stream extends database_object implements media, library_item
|
||||||
{
|
{
|
||||||
/* DB based variables */
|
/* DB based variables */
|
||||||
public $id;
|
public $id;
|
||||||
|
@ -96,19 +96,19 @@ class Radio extends database_object implements media, library_item
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_user_owner()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* update
|
* update
|
||||||
* This is a static function that takes a key'd array for input
|
* This is a static function that takes a key'd array for input
|
||||||
* it depends on a ID element to determine which radio element it
|
* it depends on a ID element to determine which radio element it
|
||||||
* should be updating
|
* should be updating
|
||||||
*/
|
*/
|
||||||
public static function update($data)
|
public function update($data)
|
||||||
{
|
{
|
||||||
// Verify the incoming data
|
|
||||||
if (!$data['id']) {
|
|
||||||
Error::add('general', T_('Missing ID'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$data['name']) {
|
if (!$data['name']) {
|
||||||
Error::add('general', T_('Name Required'));
|
Error::add('general', T_('Name Required'));
|
||||||
}
|
}
|
||||||
|
@ -126,9 +126,9 @@ class Radio extends database_object implements media, library_item
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE `live_stream` SET `name` = ?,`site_url` = ?,`url` = ?, codec = ? WHERE `id` = ?";
|
$sql = "UPDATE `live_stream` SET `name` = ?,`site_url` = ?,`url` = ?, codec = ? WHERE `id` = ?";
|
||||||
$db_results = Dba::write($sql, array($data['name'], $data['site_url'], $data['url'], $data['codec'], $data['id']));
|
Dba::write($sql, array($data['name'], $data['site_url'], $data['url'], $data['codec'], $this->id));
|
||||||
|
|
||||||
return $db_results;
|
return $this->id;
|
||||||
|
|
||||||
} // update
|
} // update
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ class Radio extends database_object implements media, library_item
|
||||||
*/
|
*/
|
||||||
public static function play_url($oid, $additional_params='',$sid='',$force_http='')
|
public static function play_url($oid, $additional_params='',$sid='',$force_http='')
|
||||||
{
|
{
|
||||||
$radio = new Radio($oid);
|
$radio = new Live_Stream($oid);
|
||||||
|
|
||||||
return $radio->url . $additional_params;
|
return $radio->url . $additional_params;
|
||||||
|
|
|
@ -75,12 +75,14 @@ class Movie extends Video
|
||||||
* update
|
* update
|
||||||
* This takes a key'd array of data as input and updates a movie entry
|
* This takes a key'd array of data as input and updates a movie entry
|
||||||
*/
|
*/
|
||||||
public static function update($data)
|
public function update($data)
|
||||||
{
|
{
|
||||||
$sql = "UPDATE `movie` SET `original_name` = ?, `description` = ?, `year` = ? WHERE `id` = ?";
|
parent::update($data);
|
||||||
Dba::write($sql, array($data['original_name'], $data['description'], $data['year'], $data['id']));
|
|
||||||
|
|
||||||
return true;
|
$sql = "UPDATE `movie` SET `original_name` = ?, `description` = ?, `year` = ? WHERE `id` = ?";
|
||||||
|
Dba::write($sql, array($data['original_name'], $data['description'], $data['year'], $this->id));
|
||||||
|
|
||||||
|
return $this->id;
|
||||||
|
|
||||||
} // update
|
} // update
|
||||||
|
|
||||||
|
|
|
@ -76,12 +76,14 @@ class Personal_Video extends Video
|
||||||
* update
|
* update
|
||||||
* This takes a key'd array of data as input and updates a personal video entry
|
* This takes a key'd array of data as input and updates a personal video entry
|
||||||
*/
|
*/
|
||||||
public static function update($data)
|
public function update($data)
|
||||||
{
|
{
|
||||||
$sql = "UPDATE `personal_video` SET `location` = ?, `description` = ? WHERE `id` = ?";
|
parent::update($data);
|
||||||
Dba::write($sql, array($data['location'], $data['description'], $data['id']));
|
|
||||||
|
|
||||||
return true;
|
$sql = "UPDATE `personal_video` SET `location` = ?, `description` = ? WHERE `id` = ?";
|
||||||
|
Dba::write($sql, array($data['location'], $data['description'], $this->id));
|
||||||
|
|
||||||
|
return $this->id;
|
||||||
|
|
||||||
} // update
|
} // update
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,11 @@ class Playlist extends playlist_object implements library_item
|
||||||
return $childrens;
|
return $childrens;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_user_owner()
|
||||||
|
{
|
||||||
|
return $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get_track
|
* get_track
|
||||||
* Returns the single item on the playlist and all of it's information, restrict
|
* Returns the single item on the playlist and all of it's information, restrict
|
||||||
|
@ -308,6 +313,7 @@ class Playlist extends playlist_object implements library_item
|
||||||
$this->update_type($data['pl_type']);
|
$this->update_type($data['pl_type']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $this->id;
|
||||||
} // update
|
} // update
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -203,7 +203,7 @@ class Random
|
||||||
$search_info = false;
|
$search_info = false;
|
||||||
|
|
||||||
if (count($search_data) > 1) {
|
if (count($search_data) > 1) {
|
||||||
$search = new Search($type);
|
$search = new Search(null, $type);
|
||||||
$search->parse_rules($search_data);
|
$search->parse_rules($search_data);
|
||||||
$search_info = $search->to_sql();
|
$search_info = $search->to_sql();
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ class Search extends playlist_object implements library_item
|
||||||
/**
|
/**
|
||||||
* constructor
|
* constructor
|
||||||
*/
|
*/
|
||||||
public function __construct($searchtype = 'song', $id = '')
|
public function __construct($id = null, $searchtype = 'song')
|
||||||
{
|
{
|
||||||
$this->searchtype = $searchtype;
|
$this->searchtype = $searchtype;
|
||||||
if ($id) {
|
if ($id) {
|
||||||
|
@ -569,7 +569,7 @@ class Search extends playlist_object implements library_item
|
||||||
$limit = intval($data['limit']);
|
$limit = intval($data['limit']);
|
||||||
$data = Search::clean_request($data);
|
$data = Search::clean_request($data);
|
||||||
|
|
||||||
$search = new Search($data['type']);
|
$search = new Search(null, $data['type']);
|
||||||
$search->parse_rules($data);
|
$search->parse_rules($data);
|
||||||
|
|
||||||
// Generate BASE SQL
|
// Generate BASE SQL
|
||||||
|
@ -651,6 +651,11 @@ class Search extends playlist_object implements library_item
|
||||||
return $childrens;
|
return $childrens;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_user_owner()
|
||||||
|
{
|
||||||
|
return $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get_items
|
* get_items
|
||||||
*
|
*
|
||||||
|
@ -808,15 +813,27 @@ class Search extends playlist_object implements library_item
|
||||||
*
|
*
|
||||||
* This function updates the saved version with the current settings.
|
* This function updates the saved version with the current settings.
|
||||||
*/
|
*/
|
||||||
public function update()
|
public function update($data = null)
|
||||||
{
|
{
|
||||||
|
if ($data && is_array($data)) {
|
||||||
|
$this->name = $data['name'];
|
||||||
|
$this->type = $data['pl_type'];
|
||||||
|
$this->random = $data['random'];
|
||||||
|
$this->limit = $data['limit'];
|
||||||
|
}
|
||||||
|
|
||||||
if (!$this->id) {
|
if (!$this->id) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE `search` SET `name` = ?, `type` = ?, `rules` = ?, `logic_operator` = ?, `random` = ?, `limit` = ? WHERE `id` = ?";
|
$sql = "UPDATE `search` SET `name` = ?, `type` = ?, `rules` = ?, `logic_operator` = ?, `random` = ?, `limit` = ? WHERE `id` = ?";
|
||||||
$db_results = Dba::write($sql, array($this->name, $this->type, serialize($this->rules), $this->logic_operator, $this->random, $this->limit, $this->id));
|
Dba::write($sql, array($this->name, $this->type, serialize($this->rules), $this->logic_operator, $this->random, $this->limit, $this->id));
|
||||||
return $db_results;
|
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function gc()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1112,7 +1129,7 @@ class Search extends playlist_object implements library_item
|
||||||
$where[] = "`playlist_data`.`playlist` $sql_match_operator '$input'";
|
$where[] = "`playlist_data`.`playlist` $sql_match_operator '$input'";
|
||||||
break;
|
break;
|
||||||
case 'smartplaylist':
|
case 'smartplaylist':
|
||||||
$subsearch = new Search('song', $input);
|
$subsearch = new Search($input, 'song');
|
||||||
$subsql = $subsearch->to_sql();
|
$subsql = $subsearch->to_sql();
|
||||||
$where[] = "$sql_match_operator (" . $subsql['where_sql'] . ")";
|
$where[] = "$sql_match_operator (" . $subsql['where_sql'] . ")";
|
||||||
// HACK: array_merge would potentially lose tags, since it
|
// HACK: array_merge would potentially lose tags, since it
|
||||||
|
|
|
@ -145,11 +145,8 @@ class Shoutbox
|
||||||
*/
|
*/
|
||||||
public static function get_object($type,$object_id)
|
public static function get_object($type,$object_id)
|
||||||
{
|
{
|
||||||
$allowed_objects = array('song','genre','album','artist','radio');
|
if (!Catalog::is_library_item($type))
|
||||||
|
|
||||||
if (!in_array($type,$allowed_objects)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
$object = new $type($object_id);
|
$object = new $type($object_id);
|
||||||
|
|
||||||
|
@ -164,19 +161,10 @@ class Shoutbox
|
||||||
*/
|
*/
|
||||||
public function get_image()
|
public function get_image()
|
||||||
{
|
{
|
||||||
switch ($this->object_type) {
|
$image_string = '';
|
||||||
case 'album':
|
if (Art::has_db($this->object_id, $this->object_type)) {
|
||||||
$image_string = "<img class=\"shoutboximage\" height=\"75\" width=\"75\" src=\"" . AmpConfig::get('web_path') . "/image.php?object_id=" . $this->object_id . "&object_type=" . $this->object_type . "&thumb=1\" />";
|
$image_string = "<img class=\"shoutboximage\" height=\"75\" width=\"75\" src=\"" . AmpConfig::get('web_path') . "/image.php?object_id=" . $this->object_id . "&object_type=" . $this->object_type . "&thumb=1\" />";
|
||||||
break;
|
}
|
||||||
case 'song':
|
|
||||||
$song = new Song($this->object_id);
|
|
||||||
$image_string = "<img class=\"shoutboximage\" height=\"75\" width=\"75\" src=\"" . AmpConfig::get('web_path') . "/image.php?object_id=" . $song->album . "&object_type=album&thumb=1\" />";
|
|
||||||
break;
|
|
||||||
case 'artist':
|
|
||||||
default:
|
|
||||||
$image_string = "";
|
|
||||||
break;
|
|
||||||
} // end switch
|
|
||||||
|
|
||||||
return $image_string;
|
return $image_string;
|
||||||
|
|
||||||
|
@ -203,16 +191,12 @@ class Shoutbox
|
||||||
* update
|
* update
|
||||||
* This takes a key'd array of data as input and updates a shoutbox entry
|
* This takes a key'd array of data as input and updates a shoutbox entry
|
||||||
*/
|
*/
|
||||||
public static function update($data)
|
public function update($data)
|
||||||
{
|
{
|
||||||
$id = Dba::escape($data['shout_id']);
|
$sql = "UPDATE `user_shout` SET `text` = ?, `sticky` = ? WHERE `id` = ?";
|
||||||
$text = Dba::escape(strip_tags($data['comment']));
|
Dba::write($sql, array($data['comment'], make_bool($data['sticky']), $this->id));
|
||||||
$sticky = make_bool($data['sticky']);
|
|
||||||
|
|
||||||
$sql = "UPDATE `user_shout` SET `text`='$text', `sticky`='$sticky' WHERE `id`='$id'";
|
return $this->id;
|
||||||
Dba::write($sql);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
} // create
|
} // create
|
||||||
|
|
||||||
|
|
|
@ -619,7 +619,7 @@ class Song extends database_object implements media, library_item
|
||||||
} // end whitelist
|
} // end whitelist
|
||||||
} // end foreach
|
} // end foreach
|
||||||
|
|
||||||
return true;
|
return $this->id;
|
||||||
} // update
|
} // update
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -984,6 +984,11 @@ class Song extends database_object implements media, library_item
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_user_owner()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get_fields
|
* get_fields
|
||||||
* This returns all of the 'data' fields for this object, we need to filter out some that we don't
|
* This returns all of the 'data' fields for this object, we need to filter out some that we don't
|
||||||
|
|
|
@ -717,7 +717,7 @@ class Subsonic_Api
|
||||||
|
|
||||||
$r = Subsonic_XML_Data::createSuccessResponse();
|
$r = Subsonic_XML_Data::createSuccessResponse();
|
||||||
if (Subsonic_XML_Data::isSmartPlaylist($playlistid)) {
|
if (Subsonic_XML_Data::isSmartPlaylist($playlistid)) {
|
||||||
$playlist = new Search('song', Subsonic_XML_Data::getAmpacheId($playlistid));
|
$playlist = new Search(Subsonic_XML_Data::getAmpacheId($playlistid), 'song');
|
||||||
Subsonic_XML_Data::addSmartPlaylist($r, $playlist, true);
|
Subsonic_XML_Data::addSmartPlaylist($r, $playlist, true);
|
||||||
} else {
|
} else {
|
||||||
$playlist = new Playlist($playlistid);
|
$playlist = new Playlist($playlistid);
|
||||||
|
@ -819,7 +819,7 @@ class Subsonic_Api
|
||||||
$playlistId = self::check_parameter($input, 'playlistId');
|
$playlistId = self::check_parameter($input, 'playlistId');
|
||||||
|
|
||||||
if (Subsonic_XML_Data::isSmartPlaylist($playlistId)) {
|
if (Subsonic_XML_Data::isSmartPlaylist($playlistId)) {
|
||||||
$playlist = new Search('song', Subsonic_XML_Data::getAmpacheId($playlistId));
|
$playlist = new Search(Subsonic_XML_Data::getAmpacheId($playlistId), 'song');
|
||||||
$playlist->delete();
|
$playlist->delete();
|
||||||
} else {
|
} else {
|
||||||
$playlist = new Playlist($playlistId);
|
$playlist = new Playlist($playlistId);
|
||||||
|
@ -1138,7 +1138,7 @@ class Subsonic_Api
|
||||||
self::check_version($input, "1.9.0");
|
self::check_version($input, "1.9.0");
|
||||||
|
|
||||||
$r = Subsonic_XML_Data::createSuccessResponse();
|
$r = Subsonic_XML_Data::createSuccessResponse();
|
||||||
$radios = Radio::get_all_radios();
|
$radios = Live_Stream::get_all_radios();
|
||||||
Subsonic_XML_Data::addRadios($r, $radios);
|
Subsonic_XML_Data::addRadios($r, $radios);
|
||||||
self::apiOutput($input, $r);
|
self::apiOutput($input, $r);
|
||||||
}
|
}
|
||||||
|
|
|
@ -467,7 +467,7 @@ class Subsonic_XML_Data
|
||||||
self::addPlaylist($xplaylists, $playlist);
|
self::addPlaylist($xplaylists, $playlist);
|
||||||
}
|
}
|
||||||
foreach ($smartplaylists as $id) {
|
foreach ($smartplaylists as $id) {
|
||||||
$smartplaylist = new Search('song', $id);
|
$smartplaylist = new Search($id, 'song');
|
||||||
self::addSmartPlaylist($xplaylists, $smartplaylist);
|
self::addSmartPlaylist($xplaylists, $smartplaylist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -619,7 +619,7 @@ class Subsonic_XML_Data
|
||||||
{
|
{
|
||||||
$xradios = $xml->addChild('internetRadioStations');
|
$xradios = $xml->addChild('internetRadioStations');
|
||||||
foreach ($radios as $id) {
|
foreach ($radios as $id) {
|
||||||
$radio = new Radio($id);
|
$radio = new Live_Stream($id);
|
||||||
self::addRadio($xradios, $radio);
|
self::addRadio($xradios, $radio);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* This class hnadles all of the tag relation operations
|
* This class hnadles all of the tag relation operations
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class Tag extends database_object
|
class Tag extends database_object implements library_item
|
||||||
{
|
{
|
||||||
public $id;
|
public $id;
|
||||||
public $name;
|
public $name;
|
||||||
|
@ -91,7 +91,9 @@ class Tag extends database_object
|
||||||
{
|
{
|
||||||
if (!is_array($ids) OR !count($ids)) { return false; }
|
if (!is_array($ids) OR !count($ids)) { return false; }
|
||||||
|
|
||||||
$type = self::validate_type($type);
|
if (!Catalog::is_library_item($type))
|
||||||
|
return false;
|
||||||
|
|
||||||
$idlist = '(' . implode(',',$ids) . ')';
|
$idlist = '(' . implode(',',$ids) . ')';
|
||||||
|
|
||||||
$sql = "SELECT `tag_map`.`id`,`tag_map`.`tag_id`, `tag`.`name`,`tag_map`.`object_id`,`tag_map`.`user` FROM `tag` " .
|
$sql = "SELECT `tag_map`.`id`,`tag_map`.`tag_id`, `tag`.`name`,`tag_map`.`object_id`,`tag_map`.`user` FROM `tag` " .
|
||||||
|
@ -129,8 +131,8 @@ class Tag extends database_object
|
||||||
*/
|
*/
|
||||||
public static function add($type, $id, $value, $user=false)
|
public static function add($type, $id, $value, $user=false)
|
||||||
{
|
{
|
||||||
// Validate the tag type
|
if (!Catalog::is_library_item($type))
|
||||||
if (!self::validate_type($type)) { return false; }
|
return false;
|
||||||
|
|
||||||
if (!is_numeric($id)) { return false; }
|
if (!is_numeric($id)) { return false; }
|
||||||
|
|
||||||
|
@ -181,13 +183,22 @@ class Tag extends database_object
|
||||||
* update
|
* update
|
||||||
* Update the name of the tag
|
* Update the name of the tag
|
||||||
*/
|
*/
|
||||||
public function update($name)
|
public function update($data)
|
||||||
{
|
{
|
||||||
//debug_event('tag.class', 'Updating tag {'.$this->id.'} with name {'.$name.'}...', '5');
|
//debug_event('tag.class', 'Updating tag {'.$this->id.'} with name {'.$name.'}...', '5');
|
||||||
if (!strlen($name)) { return false; }
|
if (!strlen($data['name'])) { return false; }
|
||||||
|
|
||||||
$sql = 'UPDATE `tag` SET `name` = ? WHERE `id` = ?';
|
$sql = 'UPDATE `tag` SET `name` = ? WHERE `id` = ?';
|
||||||
Dba::write($sql, array($name, $this->id));
|
Dba::write($sql, array($data[name], $this->id));
|
||||||
|
|
||||||
|
if ($data['select_tags']) {
|
||||||
|
$merge_to = Tag::construct_from_name($data['select_tags']);
|
||||||
|
if ($merge_to->id) {
|
||||||
|
$tag->merge($merge_to->id, ($data['merge_persist'] == '1'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->id;
|
||||||
|
|
||||||
} // add_tag
|
} // add_tag
|
||||||
|
|
||||||
|
@ -243,7 +254,8 @@ class Tag extends database_object
|
||||||
{
|
{
|
||||||
$uid = ($user == '') ? intval($GLOBALS['user']->id) : intval($user);
|
$uid = ($user == '') ? intval($GLOBALS['user']->id) : intval($user);
|
||||||
$tag_id = intval($tag_id);
|
$tag_id = intval($tag_id);
|
||||||
if (!self::validate_type($type)) { return false; }
|
if (!Catalog::is_library_item($type))
|
||||||
|
return false;
|
||||||
$id = intval($object_id);
|
$id = intval($object_id);
|
||||||
|
|
||||||
if (!$tag_id || !$id) { return false; }
|
if (!$tag_id || !$id) { return false; }
|
||||||
|
@ -349,7 +361,8 @@ class Tag extends database_object
|
||||||
*/
|
*/
|
||||||
public static function tag_map_exists($type,$object_id,$tag_id,$user)
|
public static function tag_map_exists($type,$object_id,$tag_id,$user)
|
||||||
{
|
{
|
||||||
if (!self::validate_type($type)) { return false; }
|
if (!Catalog::is_library_item($type))
|
||||||
|
return false;
|
||||||
|
|
||||||
$sql = "SELECT * FROM `tag_map` LEFT JOIN `tag` ON `tag`.`id` = `tag_map`.`tag_id` " .
|
$sql = "SELECT * FROM `tag_map` LEFT JOIN `tag` ON `tag`.`id` = `tag_map`.`tag_id` " .
|
||||||
"WHERE (`tag_map`.`tag_id` = ? OR `tag_map`.`tag_id` = `tag`.`merged_to`) AND `tag_map`.`user` = ? AND `tag_map`.`object_id` = ? AND `tag_map`.`object_type` = ?";
|
"WHERE (`tag_map`.`tag_id` = ? OR `tag_map`.`tag_id` = `tag`.`merged_to`) AND `tag_map`.`user` = ? AND `tag_map`.`object_id` = ? AND `tag_map`.`object_type` = ?";
|
||||||
|
@ -367,8 +380,8 @@ class Tag extends database_object
|
||||||
*/
|
*/
|
||||||
public static function get_top_tags($type, $object_id, $limit = 10)
|
public static function get_top_tags($type, $object_id, $limit = 10)
|
||||||
{
|
{
|
||||||
//debug_event('tag.class', 'Getting tags for type {'.$type.'} object_id {'.$object_id.'}...', '5');
|
if (!Catalog::is_library_item($type))
|
||||||
if (!self::validate_type($type)) { return false; }
|
return false;
|
||||||
|
|
||||||
$object_id = intval($object_id);
|
$object_id = intval($object_id);
|
||||||
|
|
||||||
|
@ -397,7 +410,8 @@ class Tag extends database_object
|
||||||
*/
|
*/
|
||||||
public static function get_object_tags($type, $id)
|
public static function get_object_tags($type, $id)
|
||||||
{
|
{
|
||||||
if (!self::validate_type($type)) { return array(); }
|
if (!Catalog::is_library_item($type))
|
||||||
|
return false;
|
||||||
|
|
||||||
$sql = "SELECT `tag_map`.`id`, `tag`.`name`, `tag_map`.`user` FROM `tag` " .
|
$sql = "SELECT `tag_map`.`id`, `tag`.`name`, `tag_map`.`user` FROM `tag` " .
|
||||||
"LEFT JOIN `tag_map` ON `tag_map`.`tag_id`=`tag`.`id` " .
|
"LEFT JOIN `tag_map` ON `tag_map`.`tag_id`=`tag`.`id` " .
|
||||||
|
@ -419,7 +433,8 @@ class Tag extends database_object
|
||||||
*/
|
*/
|
||||||
public static function get_tag_objects($type,$tag_id,$count='',$offset='')
|
public static function get_tag_objects($type,$tag_id,$count='',$offset='')
|
||||||
{
|
{
|
||||||
if (!self::validate_type($type)) { return array(); }
|
if (!Catalog::is_library_item($type))
|
||||||
|
return false;
|
||||||
|
|
||||||
$limit_sql = "";
|
$limit_sql = "";
|
||||||
if ($count) {
|
if ($count) {
|
||||||
|
@ -594,7 +609,8 @@ class Tag extends database_object
|
||||||
*/
|
*/
|
||||||
public function remove_map($type,$object_id)
|
public function remove_map($type,$object_id)
|
||||||
{
|
{
|
||||||
if (!self::validate_type($type)) { return false; }
|
if (!Catalog::is_library_item($type))
|
||||||
|
return false;
|
||||||
|
|
||||||
$sql = "DELETE FROM `tag_map` WHERE `tag_id` = ? AND `object_type` = ? AND `object_id` = ? AND `user` = ?";
|
$sql = "DELETE FROM `tag_map` WHERE `tag_id` = ? AND `object_type` = ? AND `object_id` = ? AND `user` = ?";
|
||||||
Dba::write($sql, array($this->id, $type, $object_id, $GLOBALS['user']->id));
|
Dba::write($sql, array($this->id, $type, $object_id, $GLOBALS['user']->id));
|
||||||
|
@ -603,19 +619,39 @@ class Tag extends database_object
|
||||||
|
|
||||||
} // remove_map
|
} // remove_map
|
||||||
|
|
||||||
/**
|
public function format()
|
||||||
* validate_type
|
|
||||||
* This validates the type of the object the user wants to tag, we limit this to types
|
|
||||||
* we currently support
|
|
||||||
*/
|
|
||||||
public static function validate_type($type)
|
|
||||||
{
|
{
|
||||||
$valid_array = array('song','artist','album','video','tvshow','tvshow_season','playlist','live_stream','channel','broadcast');
|
|
||||||
|
|
||||||
if (in_array($type,$valid_array)) { return $type; }
|
}
|
||||||
|
|
||||||
return false;
|
public function get_keywords()
|
||||||
|
{
|
||||||
|
$keywords = array();
|
||||||
|
$keywords['tag'] = array('important' => true,
|
||||||
|
'label' => T_('Tag'),
|
||||||
|
'value' => $this->name);
|
||||||
|
|
||||||
} // validate_type
|
return $keywords;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_fullname()
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_parent()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_childrens()
|
||||||
|
{
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_user_owner()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
} // end of Tag class
|
} // end of Tag class
|
||||||
|
|
|
@ -209,6 +209,11 @@ class TVShow extends database_object implements library_item
|
||||||
return array('tvshow_season' => $this->get_seasons());
|
return array('tvshow_season' => $this->get_seasons());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_user_owner()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check
|
* check
|
||||||
*
|
*
|
||||||
|
|
|
@ -119,12 +119,14 @@ class TVShow_Episode extends Video
|
||||||
* update
|
* update
|
||||||
* This takes a key'd array of data as input and updates a tv show episode entry
|
* This takes a key'd array of data as input and updates a tv show episode entry
|
||||||
*/
|
*/
|
||||||
public static function update($data)
|
public function update($data)
|
||||||
{
|
{
|
||||||
$sql = "UPDATE `tvshow_episode` SET `original_name` = ?, `season` = ?, `episode_number` = ?, `description` = ? WHERE `id` = ?";
|
parent::update($data);
|
||||||
Dba::write($sql, array($data['original_name'], $data['tvshow_season'], $data['tvshow_episode'], $data['description'], $data['id']));
|
|
||||||
|
|
||||||
return true;
|
$sql = "UPDATE `tvshow_episode` SET `original_name` = ?, `season` = ?, `episode_number` = ?, `description` = ? WHERE `id` = ?";
|
||||||
|
Dba::write($sql, array($data['original_name'], $data['tvshow_season'], $data['tvshow_episode'], $data['description'], $this->id));
|
||||||
|
|
||||||
|
return $this->id;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,6 +171,11 @@ class TVShow_Season extends database_object implements library_item
|
||||||
return array('tvshow_episode' => $this->get_episodes());
|
return array('tvshow_episode' => $this->get_episodes());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_user_owner()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check
|
* check
|
||||||
*
|
*
|
||||||
|
@ -233,7 +238,9 @@ class TVShow_Season extends database_object implements library_item
|
||||||
public function update($data)
|
public function update($data)
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE `tvshow_season` SET `season_number` = ? WHERE `id` = ?';
|
$sql = 'UPDATE `tvshow_season` SET `season_number` = ? WHERE `id` = ?';
|
||||||
return Dba::write($sql, array($data['season_number'], $this->id));
|
Dba::write($sql, array($data['season_number'], $this->id));
|
||||||
|
|
||||||
|
return $this->id;
|
||||||
} // update
|
} // update
|
||||||
|
|
||||||
public static function update_tvshow($tvshow_id, $season_id)
|
public static function update_tvshow($tvshow_id, $season_id)
|
||||||
|
|
|
@ -406,7 +406,7 @@ class Upnp_Api
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
$playlist = new Search('song', $pathreq[1]);
|
$playlist = new Search($pathreq[1], 'song');
|
||||||
if ($playlist->id) {
|
if ($playlist->id) {
|
||||||
$playlist->format();
|
$playlist->format();
|
||||||
$meta = self::_itemSmartPlaylist($playlist, $root . '/smartplaylists');
|
$meta = self::_itemSmartPlaylist($playlist, $root . '/smartplaylists');
|
||||||
|
@ -537,13 +537,13 @@ class Upnp_Api
|
||||||
case 1: // Get playlists list
|
case 1: // Get playlists list
|
||||||
$pl_ids = Search::get_searches();
|
$pl_ids = Search::get_searches();
|
||||||
foreach ($pl_ids as $pl_id) {
|
foreach ($pl_ids as $pl_id) {
|
||||||
$playlist = new Search('song', $pl_id);
|
$playlist = new Search($pl_id, 'song');
|
||||||
$playlist->format();
|
$playlist->format();
|
||||||
$mediaItems[] = self::_itemPlaylist($playlist, $parent);
|
$mediaItems[] = self::_itemPlaylist($playlist, $parent);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: // Get playlist's songs list
|
case 2: // Get playlist's songs list
|
||||||
$playlist = new Search('song', $pathreq[1]);
|
$playlist = new Search($pathreq[1], 'song');
|
||||||
if ($playlist->id) {
|
if ($playlist->id) {
|
||||||
$items = $playlist->get_items();
|
$items = $playlist->get_items();
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
|
|
|
@ -525,7 +525,7 @@ class User extends database_object
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -163,6 +163,11 @@ class Video extends database_object implements media, library_item
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_user_owner()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gc
|
* gc
|
||||||
*
|
*
|
||||||
|
@ -310,4 +315,17 @@ class Video extends database_object implements media, library_item
|
||||||
return $data['id'];
|
return $data['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update
|
||||||
|
* This takes a key'd array of data as input and updates a video entry
|
||||||
|
*/
|
||||||
|
public function update($data)
|
||||||
|
{
|
||||||
|
$sql = "UPDATE `video` SET `title` = ?, `release_date` = ? WHERE `id` = ?";
|
||||||
|
Dba::write($sql, array($data['title'], $data['release_date'], $this->id));
|
||||||
|
|
||||||
|
return $this->id;
|
||||||
|
|
||||||
|
} // update
|
||||||
|
|
||||||
} // end Video class
|
} // end Video class
|
||||||
|
|
|
@ -42,7 +42,7 @@ function arrayToJSON($array)
|
||||||
|
|
||||||
Header('content-type: application/x-javascript');
|
Header('content-type: application/x-javascript');
|
||||||
|
|
||||||
$search = new Search($_REQUEST['type']);
|
$search = new Search(null, $_REQUEST['type']);
|
||||||
|
|
||||||
echo 'var types = ';
|
echo 'var types = ';
|
||||||
echo arrayToJSON($search->types) . ";\n";
|
echo arrayToJSON($search->types) . ";\n";
|
||||||
|
|
|
@ -39,7 +39,7 @@ function showPlaylistDialog(e, item_type, item_ids) {
|
||||||
|
|
||||||
var parent = this;
|
var parent = this;
|
||||||
parent.itemType = item_type;
|
parent.itemType = item_type;
|
||||||
parent.contentUrl = jsAjaxServer + '/show_edit_playlist.server.php?action=show_edit_object&item_type=' + item_type + '&item_id=' + item_ids;
|
parent.contentUrl = jsAjaxServer + '/edit.server.php?action=show_edit_playlist&object_type=' + item_type + '&id=' + item_ids;
|
||||||
parent.editDialogId = '<div id="playlistdialog"></div>';
|
parent.editDialogId = '<div id="playlistdialog"></div>';
|
||||||
|
|
||||||
$(parent.editDialogId).dialog({
|
$(parent.editDialogId).dialog({
|
||||||
|
@ -144,14 +144,14 @@ function handleBroadcastAction(url, id) {
|
||||||
|
|
||||||
var tag_choices = undefined;
|
var tag_choices = undefined;
|
||||||
|
|
||||||
function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_row_prefix, refresh_action) {
|
function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_row_prefix) {
|
||||||
var parent = this;
|
var parent = this;
|
||||||
parent.editFormId = 'form#' + edit_form_id;
|
parent.editFormId = 'form#' + edit_form_id;
|
||||||
parent.contentUrl = jsAjaxServer + '/show_edit.server.php?action=show_edit_object&id=' + edit_id + '&type=' + edit_type;
|
parent.contentUrl = jsAjaxServer + '/edit.server.php?action=show_edit_object&id=' + edit_id + '&type=' + edit_type;
|
||||||
parent.saveUrl = jsAjaxUrl + '?action=edit_object&id=' + edit_id + '&type=' + edit_type;
|
parent.saveUrl = jsAjaxServer + '/edit.server.php?action=edit_object&id=' + edit_id + '&type=' + edit_type;
|
||||||
parent.editDialogId = '<div id="editdialog"></div>';
|
parent.editDialogId = '<div id="editdialog"></div>';
|
||||||
parent.refreshRowPrefix = refresh_row_prefix;
|
parent.refreshRowPrefix = refresh_row_prefix;
|
||||||
parent.refreshAction = refresh_action;
|
parent.editType = edit_type;
|
||||||
parent.editId = edit_id;
|
parent.editId = edit_id;
|
||||||
|
|
||||||
// Convert choices string ("tag0,tag1,tag2,...") to choices array
|
// Convert choices string ("tag0,tag1,tag2,...") to choices array
|
||||||
|
@ -161,7 +161,7 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
|
||||||
$.ajax(jsAjaxServer + '/ajax.server.php?page=tag&action=get_tag_map', { success: function(data) {
|
$.ajax(jsAjaxServer + '/ajax.server.php?page=tag&action=get_tag_map', { success: function(data) {
|
||||||
tag_choices = $(data).find('content').text();
|
tag_choices = $(data).find('content').text();
|
||||||
if (tag_choices != '') {
|
if (tag_choices != '') {
|
||||||
showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_row_prefix, refresh_action);
|
showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_row_prefix);
|
||||||
}
|
}
|
||||||
}, type: 'post', dataType: 'xml' });
|
}, type: 'post', dataType: 'xml' });
|
||||||
return;
|
return;
|
||||||
|
@ -181,7 +181,7 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
|
||||||
success : function(resp){
|
success : function(resp){
|
||||||
$("#editdialog").dialog("close");
|
$("#editdialog").dialog("close");
|
||||||
|
|
||||||
if (parent.refreshAction != '') {
|
if (parent.refreshRowPrefix != '') {
|
||||||
var new_id = $.trim(resp.lastChild.textContent);
|
var new_id = $.trim(resp.lastChild.textContent);
|
||||||
|
|
||||||
// resp should contain the new identifier, otherwise we take the same as the edited item
|
// resp should contain the new identifier, otherwise we take the same as the edited item
|
||||||
|
@ -189,7 +189,7 @@ function showEditDialog(edit_type, edit_id, edit_form_id, edit_title, refresh_ro
|
||||||
new_id = parent.editId;
|
new_id = parent.editId;
|
||||||
}
|
}
|
||||||
|
|
||||||
var url = jsAjaxServer + '/refresh_updated.server.php?action=' + parent.refreshAction + '&id=' + new_id;
|
var url = jsAjaxServer + '/edit.server.php?action=refresh_updated&type=' + parent.editType + '&id=' + new_id;
|
||||||
// Reload only table
|
// Reload only table
|
||||||
$('#' + parent.refreshRowPrefix + parent.editId).load(url, function() {
|
$('#' + parent.refreshRowPrefix + parent.editId).load(url, function() {
|
||||||
// Update the current row identifier with new id
|
// Update the current row identifier with new id
|
||||||
|
|
|
@ -269,6 +269,49 @@ function show_artist_select($name='artist', $artist_id=0, $allow_add=false, $son
|
||||||
|
|
||||||
} // show_artist_select
|
} // show_artist_select
|
||||||
|
|
||||||
|
/**
|
||||||
|
* show_tvshow_select
|
||||||
|
* This is the same as show_album_select except it's *gasp* for tvshows! How
|
||||||
|
* inventive!
|
||||||
|
*/
|
||||||
|
function show_tvshow_select($name='tvshow', $tvshow_id=0, $allow_add=false, $tvshow_id=0, $allow_none=false)
|
||||||
|
{
|
||||||
|
static $tvshow_id_cnt = 0;
|
||||||
|
// Generate key to use for HTML element ID
|
||||||
|
if ($tvshow_id) {
|
||||||
|
$key = $name . "_select_" . $tvshow_id;
|
||||||
|
} else {
|
||||||
|
$key = $name . "_select_c" . ++$tvshow_id_cnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<select name=\"$name\" id=\"$key\">\n";
|
||||||
|
|
||||||
|
if ($allow_none) {
|
||||||
|
echo "\t<option value=\"-2\"></option>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT `id`, `name` FROM `tvshow` ORDER BY `name`";
|
||||||
|
$db_results = Dba::read($sql);
|
||||||
|
|
||||||
|
while ($r = Dba::fetch_assoc($db_results)) {
|
||||||
|
$selected = '';
|
||||||
|
if ($r['id'] == $tvshow_id) {
|
||||||
|
$selected = "selected=\"selected\"";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "\t<option value=\"" . $r['id'] . "\" $selected>" . scrub_out($r['name']) . "</option>\n";
|
||||||
|
|
||||||
|
} // end while
|
||||||
|
|
||||||
|
if ($allow_add) {
|
||||||
|
// Append additional option to the end with value=-1
|
||||||
|
echo "\t<option value=\"-1\">Add New...</option>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "</select>\n";
|
||||||
|
|
||||||
|
} // show_tvshow_select
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* show_catalog_select
|
* show_catalog_select
|
||||||
* Yet another one of these buggers. this shows a drop down of all of your
|
* Yet another one of these buggers. this shows a drop down of all of your
|
||||||
|
|
|
@ -68,14 +68,14 @@ class Ampacheflickr {
|
||||||
return true;
|
return true;
|
||||||
} // upgrade
|
} // upgrade
|
||||||
|
|
||||||
public function get_photos($search) {
|
public function get_photos($search, $category = 'concert') {
|
||||||
$photos = array();
|
$photos = array();
|
||||||
$url = "https://api.flickr.com/services/rest/?&method=flickr.photos.search&api_key=" . $this->api_key . "&per_page=20&content_type=1&text=" . rawurlencode($search . " concert");
|
$url = "https://api.flickr.com/services/rest/?&method=flickr.photos.search&api_key=" . $this->api_key . "&per_page=20&content_type=1&text=" . rawurlencode(trim($search . " " . $category));
|
||||||
debug_event($this->name, 'Calling ' . $url, '5');
|
debug_event($this->name, 'Calling ' . $url, '5');
|
||||||
$request = Requests::get($url);
|
$request = Requests::get($url);
|
||||||
if ($request->status_code == 200) {
|
if ($request->status_code == 200) {
|
||||||
$xml = simplexml_load_string($request->body);
|
$xml = simplexml_load_string($request->body);
|
||||||
if ($xml) {
|
if ($xml && $xml->photos) {
|
||||||
foreach ($xml->photos->photo as $photo) {
|
foreach ($xml->photos->photo as $photo) {
|
||||||
$photos[] = array(
|
$photos[] = array(
|
||||||
'title' => $photo->title,
|
'title' => $photo->title,
|
||||||
|
@ -88,6 +88,32 @@ class Ampacheflickr {
|
||||||
return $photos;
|
return $photos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function gather_arts($type, $options = array(), $limit = 5)
|
||||||
|
{
|
||||||
|
if (!$limit) {
|
||||||
|
$limit = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
$images = $this->get_photos($options['keyword'], '');
|
||||||
|
$results = array();
|
||||||
|
foreach ($images as $image) {
|
||||||
|
$title = $this->name;
|
||||||
|
if (!empty($image['title'])) {
|
||||||
|
$title .= ' - ' . $image['title'];
|
||||||
|
}
|
||||||
|
$results[] = array(
|
||||||
|
'url' => $image['url'],
|
||||||
|
'mime' => 'image/jpeg',
|
||||||
|
'title' => $title
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($limit && count($results) >= $limit)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* load
|
* load
|
||||||
* This loads up the data we need into this object, this stuff comes
|
* This loads up the data we need into this object, this stuff comes
|
||||||
|
|
|
@ -47,7 +47,7 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to create the sucker
|
// Try to create the sucker
|
||||||
$results = Radio::create($_POST);
|
$results = Live_Stream::create($_POST);
|
||||||
|
|
||||||
if (!$results) {
|
if (!$results) {
|
||||||
require_once AmpConfig::get('prefix') . '/templates/show_add_live_stream.inc.php';
|
require_once AmpConfig::get('prefix') . '/templates/show_add_live_stream.inc.php';
|
||||||
|
|
|
@ -30,7 +30,7 @@ UI::show_header();
|
||||||
switch ($_REQUEST['action']) {
|
switch ($_REQUEST['action']) {
|
||||||
case 'search':
|
case 'search':
|
||||||
$browse = new Browse();
|
$browse = new Browse();
|
||||||
require_once AmpConfig::get('prefix') . '/templates/show_search.inc.php';
|
require_once AmpConfig::get('prefix') . '/templates/show_search_form.inc.php';
|
||||||
require_once AmpConfig::get('prefix') . '/templates/show_search_options.inc.php';
|
require_once AmpConfig::get('prefix') . '/templates/show_search_options.inc.php';
|
||||||
$results = Search::run($_REQUEST);
|
$results = Search::run($_REQUEST);
|
||||||
$browse->set_type($_REQUEST['type']);
|
$browse->set_type($_REQUEST['type']);
|
||||||
|
@ -54,7 +54,7 @@ switch ($_REQUEST['action']) {
|
||||||
require_once AmpConfig::get('prefix') . '/templates/show_search_descriptor.inc.php';
|
require_once AmpConfig::get('prefix') . '/templates/show_search_descriptor.inc.php';
|
||||||
exit;
|
exit;
|
||||||
default:
|
default:
|
||||||
require_once AmpConfig::get('prefix') . '/templates/show_search.inc.php';
|
require_once AmpConfig::get('prefix') . '/templates/show_search_form.inc.php';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,132 +83,6 @@ switch ($_REQUEST['action']) {
|
||||||
case 'refresh_rightbar':
|
case 'refresh_rightbar':
|
||||||
$results['rightbar'] = UI::ajax_include('rightbar.inc.php');
|
$results['rightbar'] = UI::ajax_include('rightbar.inc.php');
|
||||||
break;
|
break;
|
||||||
/* Controls the editing of objects */
|
|
||||||
case 'edit_object':
|
|
||||||
debug_event('ajax_server', "Editing object...", '5');
|
|
||||||
|
|
||||||
// Scrub the data
|
|
||||||
foreach ($_POST as $key => $data) {
|
|
||||||
$_POST[$key] = unhtmlentities(scrub_in($data));
|
|
||||||
debug_event('ajax_server', $key.'='.$_POST[$key], '5');
|
|
||||||
}
|
|
||||||
|
|
||||||
$level = '50';
|
|
||||||
$levelok = false;
|
|
||||||
|
|
||||||
if ($_POST['type'] == 'playlist_row' || $_POST['type'] == 'playlist_title') {
|
|
||||||
$playlist = new Playlist($_POST['id']);
|
|
||||||
if ($GLOBALS['user']->id == $playlist->user) {
|
|
||||||
$level = '25';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($_POST['type'] == 'smartplaylist_row' ||
|
|
||||||
$_POST['type'] == 'smartplaylist_title') {
|
|
||||||
$smartpl = new Search('song', $_POST['id']);
|
|
||||||
if ($GLOBALS['user']->id == $smartpl->user) {
|
|
||||||
$level = '25';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_POST['type'] == 'song_row') {
|
|
||||||
$song = new Song($_POST['id']);
|
|
||||||
if ($song->user_upload == $GLOBALS['user']->id && AmpConfig::get('upload_allow_edit') && !Access::check('interface','75')) {
|
|
||||||
if (isset($_POST['artist'])) unset($_POST['artist']);
|
|
||||||
if (isset($_POST['album'])) unset($_POST['album']);
|
|
||||||
$levelok = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure we've got them rights
|
|
||||||
if (!$levelok && (!Access::check('interface', $level) || AmpConfig::get('demo_mode'))) {
|
|
||||||
$results['rfc3514'] = '0x1';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$new_id = '';
|
|
||||||
switch ($_POST['type']) {
|
|
||||||
case 'album_row':
|
|
||||||
$key = 'album_' . $_POST['id'];
|
|
||||||
$album = new Album($_POST['id']);
|
|
||||||
$songs = $album->get_songs();
|
|
||||||
$new_id = $album->update($_POST);
|
|
||||||
if ($new_id != $_POST['id']) {
|
|
||||||
$album = new Album($new_id);
|
|
||||||
}
|
|
||||||
$album->format();
|
|
||||||
break;
|
|
||||||
case 'artist_row':
|
|
||||||
$key = 'artist_' . $_POST['id'];
|
|
||||||
$artist = new Artist($_POST['id']);
|
|
||||||
$songs = $artist->get_songs();
|
|
||||||
$new_id = $artist->update($_POST);
|
|
||||||
if ($new_id != $_POST['id']) {
|
|
||||||
$artist = new Artist($new_id);
|
|
||||||
}
|
|
||||||
$artist->format();
|
|
||||||
break;
|
|
||||||
case 'song_row':
|
|
||||||
$key = 'song_' . $_POST['id'];
|
|
||||||
if (isset($song)) {
|
|
||||||
$song->update($_POST);
|
|
||||||
$song->format();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'playlist_row':
|
|
||||||
case 'playlist_title':
|
|
||||||
$key = 'playlist_row_' . $_POST['id'];
|
|
||||||
if (isset($playlist)) {
|
|
||||||
$playlist->update($_POST);
|
|
||||||
$playlist->format();
|
|
||||||
$count = $playlist->get_song_count();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'smartplaylist_row':
|
|
||||||
case 'smartplaylist_title':
|
|
||||||
$key = 'smartplaylist_row_' . $_POST['id'];
|
|
||||||
if (isset($smartpl)) {
|
|
||||||
$smartpl->name = $_POST['name'];
|
|
||||||
$smartpl->type = $_POST['pl_type'];
|
|
||||||
$smartpl->random = $_POST['random'];
|
|
||||||
$smartpl->limit = $_POST['limit'];
|
|
||||||
$smartpl->update();
|
|
||||||
$smartpl->format();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'live_stream_row':
|
|
||||||
$key = 'live_stream_' . $_POST['id'];
|
|
||||||
Radio::update($_POST);
|
|
||||||
$radio = new Radio($_POST['id']);
|
|
||||||
$radio->format();
|
|
||||||
break;
|
|
||||||
case 'channel_row':
|
|
||||||
$key = 'channel_row_' . $_POST['id'];
|
|
||||||
$channel = new Channel($_POST['id']);
|
|
||||||
$channel->update($_POST);
|
|
||||||
break;
|
|
||||||
case 'broadcast_row':
|
|
||||||
$key = 'broadcast_row_' . $_POST['id'];
|
|
||||||
$broadcast = new Broadcast($_POST['id']);
|
|
||||||
$broadcast->update($_POST);
|
|
||||||
break;
|
|
||||||
case 'tag_row':
|
|
||||||
$tag = new Tag($_POST['id']);
|
|
||||||
$tag->update($_POST['name']);
|
|
||||||
if ($_POST['select_tags']) {
|
|
||||||
$merge_to = Tag::construct_from_name($_POST['select_tags']);
|
|
||||||
if ($merge_to->id) {
|
|
||||||
$tag->merge($merge_to->id, ($_POST['merge_persist'] == '1'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$key = 'rfc3514';
|
|
||||||
echo xoutput_from_array(array($key=>'0x1'));
|
|
||||||
exit;
|
|
||||||
} // end switch on type
|
|
||||||
|
|
||||||
$results['id'] = $new_id;
|
|
||||||
break;
|
|
||||||
case 'current_playlist':
|
case 'current_playlist':
|
||||||
switch ($_REQUEST['type']) {
|
switch ($_REQUEST['type']) {
|
||||||
case 'delete':
|
case 'delete':
|
||||||
|
@ -281,7 +155,7 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'smartplaylist':
|
case 'smartplaylist':
|
||||||
$playlist = new Search('song', $_REQUEST['id']);
|
$playlist = new Search($_REQUEST['id'], 'song');
|
||||||
$items = $playlist->get_items();
|
$items = $playlist->get_items();
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
$GLOBALS['user']->playlist->add_object($item['object_id'],$item['object_type']);
|
$GLOBALS['user']->playlist->add_object($item['object_id'],$item['object_type']);
|
||||||
|
@ -291,7 +165,7 @@ switch ($_REQUEST['action']) {
|
||||||
$GLOBALS['user']->playlist->clear();
|
$GLOBALS['user']->playlist->clear();
|
||||||
break;
|
break;
|
||||||
case 'live_stream':
|
case 'live_stream':
|
||||||
$object = new Radio($_REQUEST['id']);
|
$object = new Live_Stream($_REQUEST['id']);
|
||||||
// Confirm its a valid ID
|
// Confirm its a valid ID
|
||||||
if ($object->name) {
|
if ($object->name) {
|
||||||
$GLOBALS['user']->playlist->add_object($object->id,'radio');
|
$GLOBALS['user']->playlist->add_object($object->id,'radio');
|
||||||
|
|
|
@ -104,14 +104,14 @@ switch ($_REQUEST['action']) {
|
||||||
$key = 'playlist_row_' . $playlist->id;
|
$key = 'playlist_row_' . $playlist->id;
|
||||||
break;
|
break;
|
||||||
case 'smartplaylist':
|
case 'smartplaylist':
|
||||||
$playlist = new Search('song', $_REQUEST['id']);
|
$playlist = new Search($_REQUEST['id'], 'song');
|
||||||
if (!$playlist->has_access()) { exit; }
|
if (!$playlist->has_access()) { exit; }
|
||||||
$playlist->delete();
|
$playlist->delete();
|
||||||
$key = 'smartplaylist_row_' . $playlist->id;
|
$key = 'smartplaylist_row_' . $playlist->id;
|
||||||
break;
|
break;
|
||||||
case 'live_stream':
|
case 'live_stream':
|
||||||
if (!$GLOBALS['user']->has_access('75')) { exit; }
|
if (!$GLOBALS['user']->has_access('75')) { exit; }
|
||||||
$radio = new Radio($_REQUEST['id']);
|
$radio = new Live_Stream($_REQUEST['id']);
|
||||||
$radio->delete();
|
$radio->delete();
|
||||||
$key = 'live_stream_' . $radio->id;
|
$key = 'live_stream_' . $radio->id;
|
||||||
break;
|
break;
|
||||||
|
|
109
server/edit.server.php
Normal file
109
server/edit.server.php
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
<?php
|
||||||
|
/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* LICENSE: GNU General Public License, version 2 (GPLv2)
|
||||||
|
* Copyright 2001 - 2014 Ampache.org
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License v2
|
||||||
|
* as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Because this is accessed via Ajax we are going to allow the session_id
|
||||||
|
* as part of the get request
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Set that this is an ajax include
|
||||||
|
define('AJAX_INCLUDE','1');
|
||||||
|
|
||||||
|
require_once '../lib/init.php';
|
||||||
|
|
||||||
|
$results = '';
|
||||||
|
|
||||||
|
debug_event('edit.server.php', 'Called for action: {'.$_REQUEST['action'].'}', '5');
|
||||||
|
|
||||||
|
$type = $_GET['type'];
|
||||||
|
$object_id = $_GET['id'];
|
||||||
|
|
||||||
|
if (empty($type)) {
|
||||||
|
$object_type = $_GET['object_type'];
|
||||||
|
} else {
|
||||||
|
$object_type = implode('_', explode('_', $type, -1));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Catalog::is_library_item($object_type)) {
|
||||||
|
debug_event('edit.server.php', 'Type `' . $type . '` is not based on an item library.', '3');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$libitem = new $object_type($object_id);
|
||||||
|
$libitem->format();
|
||||||
|
|
||||||
|
$level = '50';
|
||||||
|
if ($libitem->get_user_owner() == $GLOBALS['user']->id) {
|
||||||
|
$level = '25';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure they got them rights
|
||||||
|
if (!Access::check('interface', $level) || AmpConfig::get('demo_mode')) {
|
||||||
|
echo xoutput_from_array(array('rfc3514' => '0x1'));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($_REQUEST['action']) {
|
||||||
|
case 'show_edit_object':
|
||||||
|
ob_start();
|
||||||
|
require AmpConfig::get('prefix') . '/templates/show_edit_' . $type . '.inc.php';
|
||||||
|
$results = ob_get_contents();
|
||||||
|
break;
|
||||||
|
case 'refresh_updated':
|
||||||
|
require AmpConfig::get('prefix') . '/templates/show_' . $type . '.inc.php';
|
||||||
|
$results = ob_get_contents();
|
||||||
|
break;
|
||||||
|
case 'show_edit_playlist':
|
||||||
|
ob_start();
|
||||||
|
require AmpConfig::get('prefix') . '/templates/show_playlists_dialog.inc.php';
|
||||||
|
$results = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
break;
|
||||||
|
case 'edit_object':
|
||||||
|
// Scrub the data
|
||||||
|
foreach ($_POST as $key => $data) {
|
||||||
|
$_POST[$key] = unhtmlentities(scrub_in($data));
|
||||||
|
}
|
||||||
|
|
||||||
|
// this break generic layer, we should move it somewhere else
|
||||||
|
if ($type == 'song_row') {
|
||||||
|
$song = new Song($_POST['id']);
|
||||||
|
if ($song->user_upload == $GLOBALS['user']->id && AmpConfig::get('upload_allow_edit') && !Access::check('interface','75')) {
|
||||||
|
if (isset($_POST['artist'])) unset($_POST['artist']);
|
||||||
|
if (isset($_POST['album'])) unset($_POST['album']);
|
||||||
|
$levelok = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$new_id = $libitem->update($_POST);
|
||||||
|
$libitem = new $object_type($new_id);
|
||||||
|
$libitem->format();
|
||||||
|
|
||||||
|
xoutput_headers();
|
||||||
|
$results['id'] = $new_id;
|
||||||
|
echo xoutput_from_array($results);
|
||||||
|
exit;
|
||||||
|
default:
|
||||||
|
exit;
|
||||||
|
} // end switch action
|
||||||
|
|
||||||
|
ob_end_clean();
|
||||||
|
echo $results;
|
|
@ -76,7 +76,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
switch ($_REQUEST['item_type']) {
|
switch ($_REQUEST['item_type']) {
|
||||||
case 'smartplaylist':
|
case 'smartplaylist':
|
||||||
$smartplaylist = new Search('song', $item_id);
|
$smartplaylist = new Search($item_id, 'song');
|
||||||
$items = $playlist->get_items();
|
$items = $playlist->get_items();
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
$songs[] = $item['object_id'];
|
$songs[] = $item['object_id'];
|
||||||
|
|
|
@ -1,76 +0,0 @@
|
||||||
<?php
|
|
||||||
/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* LICENSE: GNU General Public License, version 2 (GPLv2)
|
|
||||||
* Copyright 2001 - 2014 Ampache.org
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License v2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
define('AJAX_INCLUDE','1');
|
|
||||||
|
|
||||||
require_once '../lib/init.php';
|
|
||||||
|
|
||||||
debug_event('refresh_updated.server.php', 'Called for action: {'.$_REQUEST['action'].'}', '5');
|
|
||||||
|
|
||||||
/* Switch on the action passed in */
|
|
||||||
switch ($_REQUEST['action']) {
|
|
||||||
case 'refresh_song':
|
|
||||||
$song = new Song($_REQUEST['id']);
|
|
||||||
$song->format();
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_song_row.inc.php';
|
|
||||||
break;
|
|
||||||
case 'refresh_album':
|
|
||||||
$album = new Album($_REQUEST['id']);
|
|
||||||
$album->format();
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_album_row.inc.php';
|
|
||||||
break;
|
|
||||||
case 'refresh_artist':
|
|
||||||
$artist = new Artist($_REQUEST['id'], $_SESSION['catalog']);
|
|
||||||
$artist->format();
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_artist_row.inc.php';
|
|
||||||
break;
|
|
||||||
case 'refresh_playlist':
|
|
||||||
$playlist = new Playlist($_REQUEST['id']);
|
|
||||||
$playlist->format();
|
|
||||||
$count = $playlist->get_song_count();
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_playlist_row.inc.php';
|
|
||||||
break;
|
|
||||||
case 'refresh_smartplaylist':
|
|
||||||
$playlist = new Search('song', $_REQUEST['id']);
|
|
||||||
$playlist->format();
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_smartplaylist_row.inc.php';
|
|
||||||
break;
|
|
||||||
case 'refresh_livestream':
|
|
||||||
$radio = new Radio($_REQUEST['id']);
|
|
||||||
$radio->format();
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_live_stream_row.inc.php';
|
|
||||||
break;
|
|
||||||
case 'refresh_channel':
|
|
||||||
$channel = new Channel($_REQUEST['id']);
|
|
||||||
$channel->format();
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_channel_row.inc.php';
|
|
||||||
break;
|
|
||||||
case 'refresh_broadcast':
|
|
||||||
$broadcast = new Broadcast($_REQUEST['id']);
|
|
||||||
$broadcast->format();
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_broadcast_row.inc.php';
|
|
||||||
break;
|
|
||||||
case 'refresh_tag':
|
|
||||||
$tag = new Tag($_REQUEST['id']);
|
|
||||||
echo $tag->name;
|
|
||||||
break;
|
|
||||||
} // switch on the action
|
|
|
@ -1,107 +0,0 @@
|
||||||
<?php
|
|
||||||
/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* LICENSE: GNU General Public License, version 2 (GPLv2)
|
|
||||||
* Copyright 2001 - 2014 Ampache.org
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License v2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Because this is accessed via Ajax we are going to allow the session_id
|
|
||||||
* as part of the get request
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Set that this is an ajax include
|
|
||||||
define('AJAX_INCLUDE','1');
|
|
||||||
|
|
||||||
require_once '../lib/init.php';
|
|
||||||
|
|
||||||
$results = '';
|
|
||||||
|
|
||||||
debug_event('show_edit.server.php', 'Called for action: {'.$_REQUEST['action'].'}', '5');
|
|
||||||
|
|
||||||
switch ($_REQUEST['action']) {
|
|
||||||
case 'show_edit_object':
|
|
||||||
$level = '50';
|
|
||||||
$levelok = false;
|
|
||||||
switch ($_GET['type']) {
|
|
||||||
case 'album_row':
|
|
||||||
$album = new Album($_GET['id']);
|
|
||||||
$album->format();
|
|
||||||
break;
|
|
||||||
case 'artist_row':
|
|
||||||
$artist = new Artist($_GET['id']);
|
|
||||||
$artist->format();
|
|
||||||
break;
|
|
||||||
case 'song_row':
|
|
||||||
$song = new Song($_GET['id']);
|
|
||||||
$song->format();
|
|
||||||
|
|
||||||
if ($song->user_upload == $GLOBALS['user']->id && AmpConfig::get('upload_allow_edit')) {
|
|
||||||
$levelok = true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'live_stream_row':
|
|
||||||
$radio = new Radio($_GET['id']);
|
|
||||||
$radio->format();
|
|
||||||
break;
|
|
||||||
case 'playlist_row':
|
|
||||||
case 'playlist_title':
|
|
||||||
$playlist = new Playlist($_GET['id']);
|
|
||||||
$playlist->format();
|
|
||||||
// If the current user is the owner, only user is required
|
|
||||||
if ($playlist->user == $GLOBALS['user']->id) {
|
|
||||||
$level = '25';
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'smartplaylist_row':
|
|
||||||
case 'smartplaylist_title':
|
|
||||||
$playlist = new Search('song', $_GET['id']);
|
|
||||||
$playlist->format();
|
|
||||||
if ($playlist->user == $GLOBALS['user']->id) {
|
|
||||||
$level = '25';
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'channel_row':
|
|
||||||
$channel = new Channel($_GET['id']);
|
|
||||||
$channel->format();
|
|
||||||
break;
|
|
||||||
case 'broadcast_row':
|
|
||||||
$broadcast = new Broadcast($_GET['id']);
|
|
||||||
$broadcast->format();
|
|
||||||
break;
|
|
||||||
case 'tag_row':
|
|
||||||
$tag = new Tag($_GET['id']);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
exit();
|
|
||||||
} // end switch on type
|
|
||||||
|
|
||||||
// Make sure they got them rights
|
|
||||||
if (!$levelok && !Access::check('interface', $level)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_edit_' . $_GET['type'] . '.inc.php';
|
|
||||||
$results = ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
exit();
|
|
||||||
} // end switch action
|
|
||||||
|
|
||||||
echo $results;
|
|
|
@ -1,46 +0,0 @@
|
||||||
<?php
|
|
||||||
/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* LICENSE: GNU General Public License, version 2 (GPLv2)
|
|
||||||
* Copyright 2001 - 2014 Ampache.org
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License v2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Because this is accessed via Ajax we are going to allow the session_id
|
|
||||||
* as part of the get request
|
|
||||||
*/
|
|
||||||
|
|
||||||
define('AJAX_INCLUDE','1');
|
|
||||||
|
|
||||||
require_once '../lib/init.php';
|
|
||||||
|
|
||||||
$results = '';
|
|
||||||
|
|
||||||
debug_event('show_edit_playlist.server.php', 'Called.', '5');
|
|
||||||
|
|
||||||
switch ($_REQUEST['action']) {
|
|
||||||
case 'show_edit_object':
|
|
||||||
ob_start();
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_playlists_dialog.inc.php';
|
|
||||||
$results = ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
echo $results;
|
|
|
@ -25,7 +25,7 @@ require_once 'lib/init.php';
|
||||||
// We special-case this so we can send a 302 if the delete succeeded
|
// We special-case this so we can send a 302 if the delete succeeded
|
||||||
if ($_REQUEST['action'] == 'delete_playlist') {
|
if ($_REQUEST['action'] == 'delete_playlist') {
|
||||||
// Check rights
|
// Check rights
|
||||||
$playlist = new Search('song', $_REQUEST['playlist_id']);
|
$playlist = new Search($_REQUEST['playlist_id'], 'song');
|
||||||
if ($playlist->has_access()) {
|
if ($playlist->has_access()) {
|
||||||
$playlist->delete();
|
$playlist->delete();
|
||||||
// Go elsewhere
|
// Go elsewhere
|
||||||
|
@ -65,7 +65,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
$playlist_name = scrub_in($_REQUEST['playlist_name']);
|
$playlist_name = scrub_in($_REQUEST['playlist_name']);
|
||||||
|
|
||||||
$playlist = new Search('song');
|
$playlist = new Search(null, 'song');
|
||||||
$playlist->parse_rules($data);
|
$playlist->parse_rules($data);
|
||||||
$playlist->logic_operator = $operator;
|
$playlist->logic_operator = $operator;
|
||||||
$playlist->name = $playlist_name;
|
$playlist->name = $playlist_name;
|
||||||
|
@ -77,12 +77,12 @@ switch ($_REQUEST['action']) {
|
||||||
UI::access_denied();
|
UI::access_denied();
|
||||||
break;
|
break;
|
||||||
case 'show_playlist':
|
case 'show_playlist':
|
||||||
$playlist = new Search('song', $_REQUEST['playlist_id']);
|
$playlist = new Search($_REQUEST['playlist_id'], 'song');
|
||||||
$playlist->format();
|
$playlist->format();
|
||||||
require_once AmpConfig::get('prefix') . '/templates/show_smartplaylist.inc.php';
|
require_once AmpConfig::get('prefix') . '/templates/show_search.inc.php';
|
||||||
break;
|
break;
|
||||||
case 'update_playlist':
|
case 'update_playlist':
|
||||||
$playlist = new Search('song', $_REQUEST['playlist_id']);
|
$playlist = new Search($_REQUEST['playlist_id'], 'song');
|
||||||
if ($playlist->has_access()) {
|
if ($playlist->has_access()) {
|
||||||
$playlist->parse_rules(Search::clean_request($_REQUEST));
|
$playlist->parse_rules(Search::clean_request($_REQUEST));
|
||||||
$playlist->update();
|
$playlist->update();
|
||||||
|
@ -91,10 +91,10 @@ switch ($_REQUEST['action']) {
|
||||||
UI::access_denied();
|
UI::access_denied();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
require_once AmpConfig::get('prefix') . '/templates/show_smartplaylist.inc.php';
|
require_once AmpConfig::get('prefix') . '/templates/show_search.inc.php';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
require_once AmpConfig::get('prefix') . '/templates/show_smartplaylist.inc.php';
|
require_once AmpConfig::get('prefix') . '/templates/show_search.inc.php';
|
||||||
break;
|
break;
|
||||||
} // switch on the action
|
} // switch on the action
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'smartplaylist':
|
case 'smartplaylist':
|
||||||
$playlist = new Search('song', $_REQUEST['playlist_id']);
|
$playlist = new Search($_REQUEST['playlist_id'], 'song');
|
||||||
$items = $playlist->get_items();
|
$items = $playlist->get_items();
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
$media_ids[] = array(
|
$media_ids[] = array(
|
||||||
|
@ -172,10 +172,10 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'live_stream':
|
case 'live_stream':
|
||||||
$object = new Radio($_REQUEST['stream_id']);
|
$object = new Live_Stream($_REQUEST['stream_id']);
|
||||||
if ($object->name) {
|
if ($object->name) {
|
||||||
$media_ids[] = array(
|
$media_ids[] = array(
|
||||||
'object_type' => 'radio',
|
'object_type' => 'live_stream',
|
||||||
'object_id' => scrub_in($_REQUEST['stream_id'])
|
'object_id' => scrub_in($_REQUEST['stream_id'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,10 +107,10 @@ if (AmpConfig::get('show_played_times')) {
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (Access::check('interface','50')) { ?>
|
<?php if (Access::check('interface','50')) { ?>
|
||||||
<li>
|
<li>
|
||||||
<a id="<?php echo 'edit_album_'.$album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_'.$album->id ?>', '<?php echo T_('Album edit') ?>', '', '')">
|
<a id="<?php echo 'edit_album_'.$album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_'.$album->id ?>', '<?php echo T_('Album edit') ?>', '')">
|
||||||
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
||||||
</a>
|
</a>
|
||||||
<a id="<?php echo 'edit_album_'.$album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_'.$album->id ?>', '<?php echo T_('Album edit') ?>', '', '')">
|
<a id="<?php echo 'edit_album_'.$album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_'.$album->id ?>', '<?php echo T_('Album edit') ?>', '')">
|
||||||
<?php echo T_('Edit Album'); ?>
|
<?php echo T_('Edit Album'); ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -108,7 +108,7 @@ $title = scrub_out($album->name) . ' (' . $album->year . ') - ' .
|
||||||
<a href="<?php echo $web_path; ?>/batch.php?action=album&<?php echo $c_album->get_http_album_query_ids('id'); ?>"><?php echo UI::get_icon('batch_download', T_('Download')); ?></a>
|
<a href="<?php echo $web_path; ?>/batch.php?action=album&<?php echo $c_album->get_http_album_query_ids('id'); ?>"><?php echo UI::get_icon('batch_download', T_('Download')); ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (Access::check('interface','50')) { ?>
|
<?php if (Access::check('interface','50')) { ?>
|
||||||
<a id="<?php echo 'edit_album_'.$c_album->id ?>" onclick="showEditDialog('album_row', '<?php echo $c_album->id ?>', '<?php echo 'edit_album_'.$c_album->id ?>', '<?php echo T_('Album edit') ?>', '', '')">
|
<a id="<?php echo 'edit_album_'.$c_album->id ?>" onclick="showEditDialog('album_row', '<?php echo $c_album->id ?>', '<?php echo 'edit_album_'.$c_album->id ?>', '<?php echo T_('Album edit') ?>', '')">
|
||||||
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -24,59 +24,59 @@
|
||||||
<span class="cel_play_content"> </span>
|
<span class="cel_play_content"> </span>
|
||||||
<div class="cel_play_hover">
|
<div class="cel_play_hover">
|
||||||
<?php if (AmpConfig::get('directplay')) { ?>
|
<?php if (AmpConfig::get('directplay')) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=album&' . $album->get_http_album_query_ids('album_id'), 'play', T_('Play'), 'play_album_' . $album->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=album&' . $libitem->get_http_album_query_ids('album_id'), 'play', T_('Play'), 'play_album_' . $libitem->id); ?>
|
||||||
<?php if (Stream_Playlist::check_autoplay_append()) { ?>
|
<?php if (Stream_Playlist::check_autoplay_append()) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=album&' . $album->get_http_album_query_ids('album_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $album->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=album&' . $libitem->get_http_album_query_ids('album_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $libitem->id); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
if (Art::is_enabled()) {
|
if (Art::is_enabled()) {
|
||||||
$name = '[' . $album->f_artist . '] ' . scrub_out($album->full_name);
|
$name = '[' . $libitem->f_artist . '] ' . scrub_out($libitem->full_name);
|
||||||
?>
|
?>
|
||||||
<td class="cel_cover">
|
<td class="cel_cover">
|
||||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/albums.php?action=show&album=<?php echo $album->id; ?>">
|
<a href="<?php echo AmpConfig::get('web_path'); ?>/albums.php?action=show&album=<?php echo $libitem->id; ?>">
|
||||||
<img height="75" width="75" alt="<?php echo($name) ?>" title="<?php echo($name) ?>" src="<?php echo AmpConfig::get('web_path'); ?>/image.php?object_type=album&object_id=<?php echo $album->id; ?>&thumb=1" />
|
<img height="75" width="75" alt="<?php echo($name) ?>" title="<?php echo($name) ?>" src="<?php echo AmpConfig::get('web_path'); ?>/image.php?object_type=album&object_id=<?php echo $libitem->id; ?>&thumb=1" />
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<td class="cel_album"><?php echo $album->f_name_link; ?></td>
|
<td class="cel_album"><?php echo $libitem->f_name_link; ?></td>
|
||||||
<td class="cel_add">
|
<td class="cel_add">
|
||||||
<span class="cel_item_add">
|
<span class="cel_item_add">
|
||||||
<?php echo Ajax::button('?action=basket&type=album&' . $album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'add_album_' . $album->id); ?>
|
<?php echo Ajax::button('?action=basket&type=album&' . $libitem->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'add_album_' . $libitem->id); ?>
|
||||||
<?php echo Ajax::button('?action=basket&type=album_random&' . $album->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'random_album_' . $album->id); ?>
|
<?php echo Ajax::button('?action=basket&type=album_random&' . $libitem->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'random_album_' . $libitem->id); ?>
|
||||||
<a id="<?php echo 'add_playlist_'.$album->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php if (!count($album->album_suite)) { echo $album->id; } else { echo implode(',', $album->album_suite); } ?>')">
|
<a id="<?php echo 'add_playlist_'.$libitem->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php if (!count($libitem->album_suite)) { echo $libitem->id; } else { echo implode(',', $libitem->album_suite); } ?>')">
|
||||||
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
|
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_artist"><?php echo (!empty($album->f_album_artist_link) ? $album->f_album_artist_link : $album->f_artist_link); ?></td>
|
<td class="cel_artist"><?php echo (!empty($libitem->f_album_artist_link) ? $libitem->f_album_artist_link : $libitem->f_artist_link); ?></td>
|
||||||
<td class="cel_songs"><?php echo $album->song_count; ?></td>
|
<td class="cel_songs"><?php echo $libitem->song_count; ?></td>
|
||||||
<td class="cel_year"><?php echo $album->year; ?></td>
|
<td class="cel_year"><?php echo $libitem->year; ?></td>
|
||||||
<td class="cel_tags"><?php echo $album->f_tags; ?></td>
|
<td class="cel_tags"><?php echo $libitem->f_tags; ?></td>
|
||||||
<?php if (AmpConfig::get('ratings')) { ?>
|
<?php if (AmpConfig::get('ratings')) { ?>
|
||||||
<td class="cel_rating" id="rating_<?php echo $album->id; ?>_album"><?php Rating::show($album->id, 'album'); ?></td>
|
<td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_album"><?php Rating::show($libitem->id, 'album'); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (AmpConfig::get('userflags')) { ?>
|
<?php if (AmpConfig::get('userflags')) { ?>
|
||||||
<td class="cel_userflag" id="userflag_<?php echo $album->id; ?>_album"><?php Userflag::show($album->id, 'album'); ?></td>
|
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_album"><?php Userflag::show($libitem->id, 'album'); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<td class="cel_action">
|
<td class="cel_action">
|
||||||
<?php if (AmpConfig::get('sociable') && (!$album->allow_group_disks || ($album->allow_group_disks && !count($album->album_suite)))) { ?>
|
<?php if (AmpConfig::get('sociable') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) { ?>
|
||||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=album&id=<?php echo $album->id; ?>">
|
<a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=album&id=<?php echo $libitem->id; ?>">
|
||||||
<?php echo UI::get_icon('comment', T_('Post Shout')); ?>
|
<?php echo UI::get_icon('comment', T_('Post Shout')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (AmpConfig::get('share') && (!$album->allow_group_disks || ($album->allow_group_disks && !count($album->album_suite)))) { ?>
|
<?php if (AmpConfig::get('share') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) { ?>
|
||||||
<a href="<?php echo $web_path; ?>/share.php?action=show_create&type=album&<?php echo $album->get_http_album_query_ids('id'); ?>"><?php echo UI::get_icon('share', T_('Share')); ?></a>
|
<a href="<?php echo $web_path; ?>/share.php?action=show_create&type=album&<?php echo $libitem->get_http_album_query_ids('id'); ?>"><?php echo UI::get_icon('share', T_('Share')); ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (Access::check_function('batch_download')) { ?>
|
<?php if (Access::check_function('batch_download')) { ?>
|
||||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=album&<?php echo $album->get_http_album_query_ids('id'); ?>">
|
<a href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=album&<?php echo $libitem->get_http_album_query_ids('id'); ?>">
|
||||||
<?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
|
<?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (Access::check('interface','50') && (!$album->allow_group_disks || ($album->allow_group_disks && !count($album->album_suite)))) { ?>
|
<?php if (Access::check('interface','50') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) { ?>
|
||||||
<a id="<?php echo 'edit_album_'.$album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_'.$album->id ?>', '<?php echo T_('Album edit') ?>', 'album_', 'refresh_album')">
|
<a id="<?php echo 'edit_album_'.$libitem->id ?>" onclick="showEditDialog('album_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_album_'.$libitem->id ?>', '<?php echo T_('Album edit') ?>', 'album_')">
|
||||||
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -53,11 +53,11 @@ $thcount = 8;
|
||||||
|
|
||||||
/* Foreach through the albums */
|
/* Foreach through the albums */
|
||||||
foreach ($object_ids as $album_id) {
|
foreach ($object_ids as $album_id) {
|
||||||
$album = new Album($album_id);
|
$libitem = new Album($album_id);
|
||||||
$album->allow_group_disks = $allow_group_disks;
|
$libitem->allow_group_disks = $allow_group_disks;
|
||||||
$album->format();
|
$libitem->format();
|
||||||
?>
|
?>
|
||||||
<tr id="album_<?php echo $album->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
<tr id="album_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_album_row.inc.php'; ?>
|
<?php require AmpConfig::get('prefix') . '/templates/show_album_row.inc.php'; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } //end foreach ($albums as $album) ?>
|
<?php } //end foreach ($albums as $album) ?>
|
||||||
|
|
|
@ -116,10 +116,10 @@ if (AmpConfig::get('show_played_times')) {
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (Access::check('interface','50')) { ?>
|
<?php if (Access::check('interface','50')) { ?>
|
||||||
<a id="<?php echo 'edit_artist_'.$artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_'.$artist->id ?>', '<?php echo T_('Artist edit') ?>', '', '')">
|
<a id="<?php echo 'edit_artist_'.$artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_'.$artist->id ?>', '<?php echo T_('Artist edit') ?>', '')">
|
||||||
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
||||||
</a>
|
</a>
|
||||||
<a id="<?php echo 'edit_artist_'.$artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_'.$artist->id ?>', '<?php echo T_('Artist edit') ?>', '', '')">
|
<a id="<?php echo 'edit_artist_'.$artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_'.$artist->id ?>', '<?php echo T_('Artist edit') ?>', '')">
|
||||||
<?php echo T_('Edit Artist'); ?>
|
<?php echo T_('Edit Artist'); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -24,41 +24,41 @@
|
||||||
<span class="cel_play_content"> </span>
|
<span class="cel_play_content"> </span>
|
||||||
<div class="cel_play_hover">
|
<div class="cel_play_hover">
|
||||||
<?php if (AmpConfig::get('directplay')) { ?>
|
<?php if (AmpConfig::get('directplay')) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=artist&artist_id=' . $artist->id,'play', T_('Play'),'play_artist_' . $artist->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=artist&artist_id=' . $libitem->id,'play', T_('Play'),'play_artist_' . $libitem->id); ?>
|
||||||
<?php if (Stream_Playlist::check_autoplay_append()) { ?>
|
<?php if (Stream_Playlist::check_autoplay_append()) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=artist&artist_id=' . $artist->id . '&append=true','play_add', T_('Play last'),'addplay_artist_' . $artist->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=artist&artist_id=' . $libitem->id . '&append=true','play_add', T_('Play last'),'addplay_artist_' . $libitem->id); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_artist"><?php echo $artist->f_name_link; ?></td>
|
<td class="cel_artist"><?php echo $libitem->f_name_link; ?></td>
|
||||||
<td class="cel_add">
|
<td class="cel_add">
|
||||||
<span class="cel_item_add">
|
<span class="cel_item_add">
|
||||||
<?php echo Ajax::button('?action=basket&type=artist&id=' . $artist->id,'add', T_('Add to temporary playlist'),'add_artist_' . $artist->id); ?>
|
<?php echo Ajax::button('?action=basket&type=artist&id=' . $libitem->id,'add', T_('Add to temporary playlist'),'add_artist_' . $libitem->id); ?>
|
||||||
<?php echo Ajax::button('?action=basket&type=artist_random&id=' . $artist->id,'random', T_('Random to temporary playlist'),'random_artist_' . $artist->id); ?>
|
<?php echo Ajax::button('?action=basket&type=artist_random&id=' . $libitem->id,'random', T_('Random to temporary playlist'),'random_artist_' . $libitem->id); ?>
|
||||||
<a id="<?php echo 'add_playlist_'.$artist->id ?>" onclick="showPlaylistDialog(event, 'artist', '<?php echo $artist->id ?>')">
|
<a id="<?php echo 'add_playlist_'.$libitem->id ?>" onclick="showPlaylistDialog(event, 'artist', '<?php echo $libitem->id ?>')">
|
||||||
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
|
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_songs"><?php echo $artist->songs; ?></td>
|
<td class="cel_songs"><?php echo $libitem->songs; ?></td>
|
||||||
<td class="cel_albums"><?php echo $artist->albums; ?></td>
|
<td class="cel_albums"><?php echo $libitem->albums; ?></td>
|
||||||
<td class="cel_time"><?php echo $artist->f_time; ?></td>
|
<td class="cel_time"><?php echo $libitem->f_time; ?></td>
|
||||||
<td class="cel_tags"><?php echo $artist->f_tags; ?></td>
|
<td class="cel_tags"><?php echo $libitem->f_tags; ?></td>
|
||||||
<?php if (AmpConfig::get('ratings')) { ?>
|
<?php if (AmpConfig::get('ratings')) { ?>
|
||||||
<td class="cel_rating" id="rating_<?php echo $artist->id; ?>_artist"><?php Rating::show($artist->id,'artist'); ?></td>
|
<td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_artist"><?php Rating::show($libitem->id,'artist'); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (AmpConfig::get('userflags')) { ?>
|
<?php if (AmpConfig::get('userflags')) { ?>
|
||||||
<td class="cel_userflag" id="userflag_<?php echo $artist->id; ?>_artist"><?php Userflag::show($artist->id,'artist'); ?></td>
|
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_artist"><?php Userflag::show($libitem->id,'artist'); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<td class="cel_action">
|
<td class="cel_action">
|
||||||
<?php if (Access::check_function('batch_download')) { ?>
|
<?php if (Access::check_function('batch_download')) { ?>
|
||||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=artist&id=<?php echo $artist->id; ?>">
|
<a href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=artist&id=<?php echo $libitem->id; ?>">
|
||||||
<?php echo UI::get_icon('batch_download','', T_('Batch Download')); ?>
|
<?php echo UI::get_icon('batch_download','', T_('Batch Download')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (Access::check('interface','50')) { ?>
|
<?php if (Access::check('interface','50')) { ?>
|
||||||
<a id="<?php echo 'edit_artist_'.$artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_'.$artist->id ?>', '<?php echo T_('Artist edit') ?>', 'artist_', 'refresh_artist')">
|
<a id="<?php echo 'edit_artist_'.$libitem->id ?>" onclick="showEditDialog('artist_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_artist_'.$libitem->id ?>', '<?php echo T_('Artist edit') ?>', 'artist_')">
|
||||||
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -53,10 +53,10 @@ $thcount = 8;
|
||||||
|
|
||||||
/* Foreach through every artist that has been passed to us */
|
/* Foreach through every artist that has been passed to us */
|
||||||
foreach ($object_ids as $artist_id) {
|
foreach ($object_ids as $artist_id) {
|
||||||
$artist = new Artist($artist_id, $_SESSION['catalog']);
|
$libitem = new Artist($artist_id, $_SESSION['catalog']);
|
||||||
$artist->format();
|
$libitem->format();
|
||||||
?>
|
?>
|
||||||
<tr id="artist_<?php echo $artist->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
<tr id="artist_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_artist_row.inc.php'; ?>
|
<?php require AmpConfig::get('prefix') . '/templates/show_artist_row.inc.php'; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } //end foreach ($artists as $artist) ?>
|
<?php } //end foreach ($artists as $artist) ?>
|
||||||
|
|
|
@ -38,7 +38,7 @@ while ($i <= $rows) {
|
||||||
if (!isset($images[$key])) { echo "<td> </td>\n"; } else {
|
if (!isset($images[$key])) { echo "<td> </td>\n"; } else {
|
||||||
?>
|
?>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="<?php echo $image_url; ?>" rel="prettyPhoto" target="_blank"><img src="<?php echo $image_url; ?>" alt="<?php echo T_('Art'); ?>" border="0" height="175" width="175" /></a>
|
<a href="<?php echo $image_url; ?>" title="<?php echo $_SESSION['form']['images'][$key]['title']; ?>" rel="prettyPhoto" target="_blank"><img src="<?php echo $image_url; ?>" alt="<?php echo T_('Art'); ?>" border="0" height="175" width="175" /></a>
|
||||||
<br />
|
<br />
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<?php if (is_array($dimensions)) { ?>
|
<?php if (is_array($dimensions)) { ?>
|
||||||
|
|
|
@ -24,12 +24,12 @@
|
||||||
<span class="cel_play_content"> </span>
|
<span class="cel_play_content"> </span>
|
||||||
<div class="cel_play_hover">
|
<div class="cel_play_hover">
|
||||||
<?php if (AmpConfig::get('directplay')) { ?>
|
<?php if (AmpConfig::get('directplay')) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=broadcast&broadcast_id=' . $broadcast->id,'play', T_('Play'),'play_broadcast_' . $broadcast->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=broadcast&broadcast_id=' . $libitem->id,'play', T_('Play'),'play_broadcast_' . $libitem->id); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_name"><?php echo $broadcast->name; ?></td>
|
<td class="cel_name"><?php echo $libitem->name; ?></td>
|
||||||
<td class="cel_genre"><?php echo $broadcast->f_tags; ?></td>
|
<td class="cel_genre"><?php echo $libitem->f_tags; ?></td>
|
||||||
<td class="cel_started"><?php echo ($broadcast->started ? T_('Yes') : T_('No')); ?></td>
|
<td class="cel_started"><?php echo ($libitem->started ? T_('Yes') : T_('No')); ?></td>
|
||||||
<td class="cel_listeners"><?php echo $broadcast->listeners; ?></td>
|
<td class="cel_listeners"><?php echo $libitem->listeners; ?></td>
|
||||||
<td class="cel_action"><?php $broadcast->show_action_buttons(); ?></td>
|
<td class="cel_action"><?php $libitem->show_action_buttons(); ?></td>
|
||||||
|
|
|
@ -36,10 +36,10 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($object_ids as $broadcast_id) {
|
foreach ($object_ids as $broadcast_id) {
|
||||||
$broadcast = new Broadcast($broadcast_id);
|
$libitem = new Broadcast($broadcast_id);
|
||||||
$broadcast->format();
|
$libitem->format();
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo UI::flip_class(); ?>" id="broadcast_row_<?php echo $broadcast->id; ?>">
|
<tr class="<?php echo UI::flip_class(); ?>" id="broadcast_row_<?php echo $libitem->id; ?>">
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_broadcast_row.inc.php'; ?>
|
<?php require AmpConfig::get('prefix') . '/templates/show_broadcast_row.inc.php'; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -22,24 +22,24 @@
|
||||||
|
|
||||||
$web_path = AmpConfig::get('web_path');
|
$web_path = AmpConfig::get('web_path');
|
||||||
|
|
||||||
$icon = $catalog->enabled ? 'disable' : 'enable';
|
$icon = $libitem->enabled ? 'disable' : 'enable';
|
||||||
$button_flip_state_id = 'button_flip_state_' . $catalog->id;
|
$button_flip_state_id = 'button_flip_state_' . $libitem->id;
|
||||||
?>
|
?>
|
||||||
<td class="cel_catalog"><?php echo $catalog->f_name_link; ?></td>
|
<td class="cel_catalog"><?php echo $libitem->f_name_link; ?></td>
|
||||||
<td class="cel_info"><?php echo scrub_out($catalog->f_info); ?></td>
|
<td class="cel_info"><?php echo scrub_out($libitem->f_info); ?></td>
|
||||||
<td class="cel_lastverify"><?php echo scrub_out($catalog->f_update); ?></td>
|
<td class="cel_lastverify"><?php echo scrub_out($libitem->f_update); ?></td>
|
||||||
<td class="cel_lastadd"><?php echo scrub_out($catalog->f_add); ?></td>
|
<td class="cel_lastadd"><?php echo scrub_out($libitem->f_add); ?></td>
|
||||||
<td class="cel_lastclean"><?php echo scrub_out($catalog->f_clean); ?></td>
|
<td class="cel_lastclean"><?php echo scrub_out($libitem->f_clean); ?></td>
|
||||||
<td class="cel_action cel_action_text">
|
<td class="cel_action cel_action_text">
|
||||||
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=add_to_catalog&catalogs[]=<?php echo $catalog->id; ?>"><?php echo T_('Add'); ?></a>
|
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=add_to_catalog&catalogs[]=<?php echo $libitem->id; ?>"><?php echo T_('Add'); ?></a>
|
||||||
| <a href="<?php echo $web_path; ?>/admin/catalog.php?action=update_catalog&catalogs[]=<?php echo $catalog->id; ?>"><?php echo T_('Verify'); ?></a>
|
| <a href="<?php echo $web_path; ?>/admin/catalog.php?action=update_catalog&catalogs[]=<?php echo $libitem->id; ?>"><?php echo T_('Verify'); ?></a>
|
||||||
| <a href="<?php echo $web_path; ?>/admin/catalog.php?action=clean_catalog&catalogs[]=<?php echo $catalog->id; ?>"><?php echo T_('Clean'); ?></a>
|
| <a href="<?php echo $web_path; ?>/admin/catalog.php?action=clean_catalog&catalogs[]=<?php echo $libitem->id; ?>"><?php echo T_('Clean'); ?></a>
|
||||||
| <a href="<?php echo $web_path; ?>/admin/catalog.php?action=full_service&catalogs[]=<?php echo $catalog->id; ?>"><?php echo T_('Update'); ?></a>
|
| <a href="<?php echo $web_path; ?>/admin/catalog.php?action=full_service&catalogs[]=<?php echo $libitem->id; ?>"><?php echo T_('Update'); ?></a>
|
||||||
| <a href="<?php echo $web_path; ?>/admin/catalog.php?action=gather_media_art&catalogs[]=<?php echo $catalog->id; ?>"><?php echo T_('Gather Art'); ?></a>
|
| <a href="<?php echo $web_path; ?>/admin/catalog.php?action=gather_media_art&catalogs[]=<?php echo $libitem->id; ?>"><?php echo T_('Gather Art'); ?></a>
|
||||||
| <a href="<?php echo $web_path; ?>/admin/catalog.php?action=show_delete_catalog&catalog_id=<?php echo $catalog->id; ?>"><?php echo T_('Delete'); ?></a>
|
| <a href="<?php echo $web_path; ?>/admin/catalog.php?action=show_delete_catalog&catalog_id=<?php echo $libitem->id; ?>"><?php echo T_('Delete'); ?></a>
|
||||||
<?php if (AmpConfig::get('catalog_disable')) { ?>
|
<?php if (AmpConfig::get('catalog_disable')) { ?>
|
||||||
| <span id="<?php echo($button_flip_state_id); ?>">
|
| <span id="<?php echo($button_flip_state_id); ?>">
|
||||||
<?php echo Ajax::button('?page=catalog&action=flip_state&catalog_id=' . $catalog->id, $icon, T_(ucfirst($icon)),'flip_state_' . $catalog->id); ?>
|
<?php echo Ajax::button('?page=catalog&action=flip_state&catalog_id=' . $libitem->id, $icon, T_(ucfirst($icon)),'flip_state_' . $libitem->id); ?>
|
||||||
</span>
|
</span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -35,10 +35,10 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($object_ids as $catalog_id) {
|
foreach ($object_ids as $catalog_id) {
|
||||||
$catalog = Catalog::create_from_id($catalog_id);
|
$libitem = Catalog::create_from_id($catalog_id);
|
||||||
$catalog->format();
|
$libitem->format();
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo UI::flip_class(); ?>" id="catalog_<?php echo $catalog->id; ?>">
|
<tr class="<?php echo UI::flip_class(); ?>" id="catalog_<?php echo $libitem->id; ?>">
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_catalog_row.inc.php'; ?>
|
<?php require AmpConfig::get('prefix') . '/templates/show_catalog_row.inc.php'; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -24,25 +24,25 @@
|
||||||
<span class="cel_play_content"> </span>
|
<span class="cel_play_content"> </span>
|
||||||
<div class="cel_play_hover">
|
<div class="cel_play_hover">
|
||||||
<?php if (AmpConfig::get('directplay')) { ?>
|
<?php if (AmpConfig::get('directplay')) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=channel&channel_id=' . $channel->id,'play', T_('Play'),'play_channel_' . $channel->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=channel&channel_id=' . $libitem->id,'play', T_('Play'),'play_channel_' . $libitem->id); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_id"><?php echo $channel->id; ?></td>
|
<td class="cel_id"><?php echo $libitem->id; ?></td>
|
||||||
<td class="cel_name"><?php echo $channel->name; ?></td>
|
<td class="cel_name"><?php echo $libitem->name; ?></td>
|
||||||
<td class="cel_interface"><?php echo $channel->interface; ?></td>
|
<td class="cel_interface"><?php echo $libitem->interface; ?></td>
|
||||||
<td class="cel_port"><?php echo $channel->port; ?></td>
|
<td class="cel_port"><?php echo $libitem->port; ?></td>
|
||||||
<td class="cel_data"><?php echo $channel->get_target_object()->f_name_link; ?></td>
|
<td class="cel_data"><?php echo $libitem->get_target_object()->f_name_link; ?></td>
|
||||||
<!--<td class="cel_random"><?php echo ($channel->random ? T_('Yes') : T_('No')); ?></td>
|
<!--<td class="cel_random"><?php echo ($libitem->random ? T_('Yes') : T_('No')); ?></td>
|
||||||
<td class="cel_loop"><?php echo ($channel->loop ? T_('Yes') : T_('No')); ?></td>-->
|
<td class="cel_loop"><?php echo ($libitem->loop ? T_('Yes') : T_('No')); ?></td>-->
|
||||||
<td class="cel_streamtype"><?php echo $channel->stream_type; ?></td>
|
<td class="cel_streamtype"><?php echo $libitem->stream_type; ?></td>
|
||||||
<td class="cel_bitrate"><?php echo $channel->bitrate; ?></td>
|
<td class="cel_bitrate"><?php echo $libitem->bitrate; ?></td>
|
||||||
<td class="cel_startdate"><?php echo date("c", $channel->start_date); ?></td>
|
<td class="cel_startdate"><?php echo date("c", $libitem->start_date); ?></td>
|
||||||
<td class="cel_listeners"><?php echo $channel->listeners; ?></td>
|
<td class="cel_listeners"><?php echo $libitem->listeners; ?></td>
|
||||||
<td class="cel_streamurl">
|
<td class="cel_streamurl">
|
||||||
<?php echo $channel->get_stream_url(); ?><br />
|
<?php echo $libitem->get_stream_url(); ?><br />
|
||||||
<?php if ($channel->is_private) { echo UI::get_icon('lock', T_('Authentication Required')); } ?>
|
<?php if ($libitem->is_private) { echo UI::get_icon('lock', T_('Authentication Required')); } ?>
|
||||||
<?php echo $channel->get_stream_proxy_url(); ?>
|
<?php echo $libitem->get_stream_proxy_url(); ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_state"><div id="channel_state_<?php echo $channel->id; ?>"><?php echo $channel->get_channel_state(); ?></div></td>
|
<td class="cel_state"><div id="channel_state_<?php echo $libitem->id; ?>"><?php echo $libitem->get_channel_state(); ?></div></td>
|
||||||
<td class="cel_action"><?php $channel->show_action_buttons(); ?></td>
|
<td class="cel_action"><?php $libitem->show_action_buttons(); ?></td>
|
||||||
|
|
|
@ -45,10 +45,10 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($object_ids as $channel_id) {
|
foreach ($object_ids as $channel_id) {
|
||||||
$channel = new Channel($channel_id);
|
$libitem = new Channel($channel_id);
|
||||||
$channel->format();
|
$libitem->format();
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo UI::flip_class(); ?>" id="channel_row_<?php echo $channel->id; ?>">
|
<tr class="<?php echo UI::flip_class(); ?>" id="channel_row_<?php echo $libitem->id; ?>">
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_channel_row.inc.php'; ?>
|
<?php require AmpConfig::get('prefix') . '/templates/show_channel_row.inc.php'; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -21,6 +21,6 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<td class="cel_date"><a href="<?php echo $concert->url; ?>" target="_blank"><?php echo $concert->startDate; ?></a></td>
|
<td class="cel_date"><a href="<?php echo $libitem->url; ?>" target="_blank"><?php echo $libitem->startDate; ?></a></td>
|
||||||
<td class="cel_place"><a href="<?php echo $concert->venue->url ?>" target="_blank"><?php echo (count($concert->venue->image) >= 1 && !empty($concert->venue->image[1])) ? '<img src="' . $concert->venue->image[1] . '" border="0" />' : ''; ?> <?php echo $concert->venue->name; ?></a></td>
|
<td class="cel_place"><a href="<?php echo $libitem->venue->url ?>" target="_blank"><?php echo (count($libitem->venue->image) >= 1 && !empty($libitem->venue->image[1])) ? '<img src="' . $libitem->venue->image[1] . '" border="0" />' : ''; ?> <?php echo $libitem->venue->name; ?></a></td>
|
||||||
<td class="cel_location"><?php echo $concert->venue->location->city; ?>, <?php echo $concert->venue->location->country; ?></td>
|
<td class="cel_location"><?php echo $libitem->venue->location->city; ?>, <?php echo $libitem->venue->location->country; ?></td>
|
||||||
|
|
|
@ -31,9 +31,9 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($coming_concerts as $concert) {
|
foreach ($coming_concerts as $libitem) {
|
||||||
?>
|
?>
|
||||||
<tr id="concert_<?php echo $concert->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
<tr id="concert_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_concert_row.inc.php'; ?>
|
<?php require AmpConfig::get('prefix') . '/templates/show_concert_row.inc.php'; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -21,18 +21,18 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<form method="post" id="edit_album_<?php echo $album->id; ?>" class="edit_dialog_content">
|
<form method="post" id="edit_album_<?php echo $libitem->id; ?>" class="edit_dialog_content">
|
||||||
<table class="tabledata" cellspacing="0" cellpadding="0">
|
<table class="tabledata" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
||||||
<td><input type="text" name="name" value="<?php echo scrub_out($album->full_name); ?>" /></td>
|
<td><input type="text" name="name" value="<?php echo scrub_out($libitem->full_name); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Artist') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Artist') ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if ($album->artist_count == '1') {
|
if ($libitem->artist_count == '1') {
|
||||||
show_artist_select('artist', $album->artist_id);
|
show_artist_select('artist', $libitem->artist_id);
|
||||||
} else {
|
} else {
|
||||||
echo T_('Various');
|
echo T_('Various');
|
||||||
}
|
}
|
||||||
|
@ -42,25 +42,25 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Album Artist') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Album Artist') ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php show_artist_select('album_artist', $album->album_artist, false, 0, true); ?>
|
<?php show_artist_select('album_artist', $libitem->album_artist, false, 0, true); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Year') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Year') ?></td>
|
||||||
<td><input type="text" name="year" value="<?php echo scrub_out($album->year); ?>" /></td>
|
<td><input type="text" name="year" value="<?php echo scrub_out($libitem->year); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Disk') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Disk') ?></td>
|
||||||
<td><input type="text" name="disk" value="<?php echo scrub_out($album->disk); ?>" /></td>
|
<td><input type="text" name="disk" value="<?php echo scrub_out($libitem->disk); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('MusicBrainz ID') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('MusicBrainz ID') ?></td>
|
||||||
<td><input type="text" name="mbid" value="<?php echo $album->mbid; ?>" /></td>
|
<td><input type="text" name="mbid" value="<?php echo $libitem->mbid; ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Tags') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Tags') ?></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="edit_tags" id="edit_tags" value="<?php echo Tag::get_display($album->tags); ?>" />
|
<input type="text" name="edit_tags" id="edit_tags" value="<?php echo Tag::get_display($libitem->tags); ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
<td><input type="checkbox" name="apply_childs" value="checked" /><?php echo T_(' Apply tags to all childs (override tags for songs)') ?></td>
|
<td><input type="checkbox" name="apply_childs" value="checked" /><?php echo T_(' Apply tags to all childs (override tags for songs)') ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="id" value="<?php echo $album->id; ?>" />
|
<input type="hidden" name="id" value="<?php echo $libitem->id; ?>" />
|
||||||
<input type="hidden" name="type" value="album_row" />
|
<input type="hidden" name="type" value="album_row" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,26 +21,26 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<form method="post" id="edit_artist_<?php echo $artist->id; ?>" class="edit_dialog_content">
|
<form method="post" id="edit_artist_<?php echo $libitem->id; ?>" class="edit_dialog_content">
|
||||||
<table class="tabledata" cellspacing="0" cellpadding="0">
|
<table class="tabledata" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
||||||
<td><input type="text" name="name" value="<?php echo scrub_out($artist->f_full_name); ?>" /></td>
|
<td><input type="text" name="name" value="<?php echo scrub_out($libitem->f_full_name); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('MusicBrainz ID') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('MusicBrainz ID') ?></td>
|
||||||
<td><input type="text" name="mbid" value="<?php echo $artist->mbid; ?>" /></td>
|
<td><input type="text" name="mbid" value="<?php echo $libitem->mbid; ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Tags') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Tags') ?></td>
|
||||||
<td><input type="text" name="edit_tags" id="edit_tags" value="<?php echo Tag::get_display($artist->tags); ?>" /></td>
|
<td><input type="text" name="edit_tags" id="edit_tags" value="<?php echo Tag::get_display($libitem->tags); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"></td>
|
<td class="edit_dialog_content_header"></td>
|
||||||
<td><input type="checkbox" name="apply_childs" value="checked" /><?php echo T_(' Apply tags to all childs (override tags for albums and songs)') ?></td>
|
<td><input type="checkbox" name="apply_childs" value="checked" /><?php echo T_(' Apply tags to all childs (override tags for albums and songs)') ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="id" value="<?php echo $artist->id; ?>" />
|
<input type="hidden" name="id" value="<?php echo $libitem->id; ?>" />
|
||||||
<input type="hidden" name="type" value="artist_row" />
|
<input type="hidden" name="type" value="artist_row" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,26 +21,26 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<form method="post" id="edit_broadcast_<?php echo $broadcast->id; ?>" class="edit_dialog_content">
|
<form method="post" id="edit_broadcast_<?php echo $libitem->id; ?>" class="edit_dialog_content">
|
||||||
<table class="tabledata" cellspacing="0" cellpadding="0">
|
<table class="tabledata" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
||||||
<td><input type="text" name="name" value="<?php echo scrub_out($broadcast->name); ?>" /></td>
|
<td><input type="text" name="name" value="<?php echo scrub_out($libitem->name); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Description') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Description') ?></td>
|
||||||
<td><input type="text" name="description" value="<?php echo scrub_out($broadcast->description); ?>" /></td>
|
<td><input type="text" name="description" value="<?php echo scrub_out($libitem->description); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"></td>
|
<td class="edit_dialog_content_header"></td>
|
||||||
<td><input type="checkbox" name="private" value="1" <?php echo ($broadcast->is_private) ? 'checked' : ''; ?> /> <?php echo T_('Authentication Required') ?></td>
|
<td><input type="checkbox" name="private" value="1" <?php echo ($libitem->is_private) ? 'checked' : ''; ?> /> <?php echo T_('Authentication Required') ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Genre') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Genre') ?></td>
|
||||||
<td><input type="text" name="edit_tags" id="edit_tags" value="<?php echo Tag::get_display($broadcast->tags); ?>" /></td>
|
<td><input type="text" name="edit_tags" id="edit_tags" value="<?php echo Tag::get_display($libitem->tags); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="id" value="<?php echo $broadcast->id; ?>" />
|
<input type="hidden" name="id" value="<?php echo $libitem->id; ?>" />
|
||||||
<input type="hidden" name="type" value="broadcast_row" />
|
<input type="hidden" name="type" value="broadcast_row" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<form method="post" id="edit_channel_<?php echo $channel->id; ?>" class="edit_dialog_content">
|
<form method="post" id="edit_channel_<?php echo $libitem->id; ?>" class="edit_dialog_content">
|
||||||
<table class="tabledata" cellspacing="0" cellpadding="0">
|
<table class="tabledata" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Stream Source') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Stream Source') ?></td>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
$playlist = new Playlist($playlist_id);
|
$playlist = new Playlist($playlist_id);
|
||||||
$playlist->format();
|
$playlist->format();
|
||||||
echo "<option value='" . $playlist->id . "'";
|
echo "<option value='" . $playlist->id . "'";
|
||||||
if ($playlist->id == $channel->object_id) {
|
if ($playlist->id == $libitem->object_id) {
|
||||||
echo " selected";
|
echo " selected";
|
||||||
}
|
}
|
||||||
echo ">" . $playlist->f_name . "</option>";
|
echo ">" . $playlist->f_name . "</option>";
|
||||||
|
@ -42,54 +42,54 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
||||||
<td><input type="text" name="name" value="<?php echo scrub_out($channel->name); ?>" /></td>
|
<td><input type="text" name="name" value="<?php echo scrub_out($libitem->name); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Description') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Description') ?></td>
|
||||||
<td><input type="text" name="description" value="<?php echo scrub_out($channel->description); ?>" /></td>
|
<td><input type="text" name="description" value="<?php echo scrub_out($libitem->description); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Url') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Url') ?></td>
|
||||||
<td><input type="text" name="url" value="<?php echo scrub_out($channel->url); ?>" /></td>
|
<td><input type="text" name="url" value="<?php echo scrub_out($libitem->url); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Interface') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Interface') ?></td>
|
||||||
<td><input type="text" name="interface" value="<?php echo scrub_out($channel->interface); ?>" /></td>
|
<td><input type="text" name="interface" value="<?php echo scrub_out($libitem->interface); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Port') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Port') ?></td>
|
||||||
<td><input type="text" name="port" value="<?php echo scrub_out($channel->port); ?>" /></td>
|
<td><input type="text" name="port" value="<?php echo scrub_out($libitem->port); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"></td>
|
<td class="edit_dialog_content_header"></td>
|
||||||
<td><input type="checkbox" name="private" value="1" <?php echo ($channel->is_private) ? 'checked' : ''; ?> /> <?php echo T_('Authentication Required') ?></td>
|
<td><input type="checkbox" name="private" value="1" <?php echo ($libitem->is_private) ? 'checked' : ''; ?> /> <?php echo T_('Authentication Required') ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"></td>
|
<td class="edit_dialog_content_header"></td>
|
||||||
<td><input type="checkbox" name="random" value="1" <?php echo ($channel->random) ? 'checked' : ''; ?> /> <?php echo T_('Random') ?></td>
|
<td><input type="checkbox" name="random" value="1" <?php echo ($libitem->random) ? 'checked' : ''; ?> /> <?php echo T_('Random') ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"></td>
|
<td class="edit_dialog_content_header"></td>
|
||||||
<td><input type="checkbox" name="loop" value="1" <?php echo ($channel->loop) ? 'checked' : ''; ?> /> <?php echo T_('Loop') ?></td>
|
<td><input type="checkbox" name="loop" value="1" <?php echo ($libitem->loop) ? 'checked' : ''; ?> /> <?php echo T_('Loop') ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Max Listeners') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Max Listeners') ?></td>
|
||||||
<td><input type="text" name="max_listeners" value="<?php echo scrub_out($channel->max_listeners); ?>" /></td>
|
<td><input type="text" name="max_listeners" value="<?php echo scrub_out($libitem->max_listeners); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Stream Type') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Stream Type') ?></td>
|
||||||
<td><input type="text" name="stream_type" value="<?php echo scrub_out($channel->stream_type); ?>" /></td>
|
<td><input type="text" name="stream_type" value="<?php echo scrub_out($libitem->stream_type); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Bitrate') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Bitrate') ?></td>
|
||||||
<td><input type="text" name="bitrate" value="<?php echo scrub_out($channel->bitrate); ?>" /></td>
|
<td><input type="text" name="bitrate" value="<?php echo scrub_out($libitem->bitrate); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Genre') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Genre') ?></td>
|
||||||
<td><input type="text" name="edit_tags" id="edit_tags" value="<?php echo Tag::get_display($channel->tags); ?>" /></td>
|
<td><input type="text" name="edit_tags" id="edit_tags" value="<?php echo Tag::get_display($libitem->tags); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="id" value="<?php echo $channel->id; ?>" />
|
<input type="hidden" name="id" value="<?php echo $libitem->id; ?>" />
|
||||||
<input type="hidden" name="type" value="channel_row" />
|
<input type="hidden" name="type" value="channel_row" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,26 +21,26 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<form method="post" id="edit_live_stream_<?php echo $radio->id; ?>" class="edit_dialog_content">
|
<form method="post" id="edit_radio_<?php echo $libitem->id; ?>" class="edit_dialog_content">
|
||||||
<table class="tabledata" cellspacing="0" cellpadding="0">
|
<table class="tabledata" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
||||||
<td><input type="text" name="name" value="<?php echo scrub_out($radio->name); ?>" /></td>
|
<td><input type="text" name="name" value="<?php echo scrub_out($libitem->name); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Stream URL') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Stream URL') ?></td>
|
||||||
<td><input type="text" name="url" value="<?php echo scrub_out($radio->url); ?>" /></td>
|
<td><input type="text" name="url" value="<?php echo scrub_out($libitem->url); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Homepage') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Homepage') ?></td>
|
||||||
<td><input type="text" name="site_url" value="<?php echo scrub_out($radio->site_url); ?>" /></td>
|
<td><input type="text" name="site_url" value="<?php echo scrub_out($libitem->site_url); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Codec') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Codec') ?></td>
|
||||||
<td><input type="text" name="codec" value="<?php echo scrub_out($radio->codec); ?>" /></td>
|
<td><input type="text" name="codec" value="<?php echo scrub_out($libitem->codec); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="id" value="<?php echo $radio->id; ?>" />
|
<input type="hidden" name="id" value="<?php echo $libitem->id; ?>" />
|
||||||
<input type="hidden" name="type" value="live_stream_row" />
|
<input type="hidden" name="type" value="radio_row" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,16 +21,16 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<form method="post" id="edit_playlist_<?php echo $playlist->id; ?>" class="edit_dialog_content">
|
<form method="post" id="edit_playlist_<?php echo $libitem->id; ?>" class="edit_dialog_content">
|
||||||
<table class="tabledata" cellspacing="0" cellpadding="0">
|
<table class="tabledata" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
||||||
<td><input type="text" name="name" value="<?php echo scrub_out($playlist->name); ?>" /></td>
|
<td><input type="text" name="name" value="<?php echo scrub_out($libitem->name); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Type') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Type') ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php $name = 'select_' . $playlist->type; ?>
|
<?php $name = 'select_' . $libitem->type; ?>
|
||||||
<?php ${$name} = ' selected="selected"'; ?>
|
<?php ${$name} = ' selected="selected"'; ?>
|
||||||
<select name="pl_type">
|
<select name="pl_type">
|
||||||
<option value="public"<?php echo $select_public; ?>><?php echo T_('Public'); ?></option>
|
<option value="public"<?php echo $select_public; ?>><?php echo T_('Public'); ?></option>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="id" value="<?php echo $playlist->id; ?>" />
|
<input type="hidden" name="id" value="<?php echo $libitem->id; ?>" />
|
||||||
<input type="hidden" name="type" value="playlist_row" />
|
<input type="hidden" name="type" value="playlist_row" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,16 +21,16 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<form method="post" id="edit_playlist_<?php echo $playlist->id; ?>" class="edit_dialog_content">
|
<form method="post" id="edit_playlist_<?php echo $libitem->id; ?>" class="edit_dialog_content">
|
||||||
<table class="tabledata" cellspacing="0" cellpadding="0">
|
<table class="tabledata" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
||||||
<td><input type="text" name="name" value="<?php echo scrub_out($playlist->name); ?>" /></td>
|
<td><input type="text" name="name" value="<?php echo scrub_out($libitem->name); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Type') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Type') ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php $name = 'select_' . $playlist->type; ?>
|
<?php $name = 'select_' . $libitem->type; ?>
|
||||||
<?php ${$name} = ' selected="selected"'; ?>
|
<?php ${$name} = ' selected="selected"'; ?>
|
||||||
<select name="pl_type">
|
<select name="pl_type">
|
||||||
<option value="public"<?php echo $select_public; ?>><?php echo T_('Public'); ?></option>
|
<option value="public"<?php echo $select_public; ?>><?php echo T_('Public'); ?></option>
|
||||||
|
@ -40,14 +40,14 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Random') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Random') ?></td>
|
||||||
<td><input type="checkbox" name="random" value="1" <?php if ($playlist->random) echo "checked"; ?> /></td>
|
<td><input type="checkbox" name="random" value="1" <?php if ($libitem->random) echo "checked"; ?> /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Item Limit (0 = unlimited)') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Item Limit (0 = unlimited)') ?></td>
|
||||||
<td><input type="text" name="limit" value="<?php echo scrub_out($playlist->limit); ?>" /></td>
|
<td><input type="text" name="limit" value="<?php echo scrub_out($libitem->limit); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="id" value="<?php echo $playlist->id; ?>" />
|
<input type="hidden" name="id" value="<?php echo $libitem->id; ?>" />
|
||||||
<input type="hidden" name="type" value="smartplaylist_row" />
|
<input type="hidden" name="type" value="smartplaylist_row" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
|
@ -21,68 +21,68 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<form method="post" id="edit_song_<?php echo $song->id; ?>" class="edit_dialog_content">
|
<form method="post" id="edit_song_<?php echo $libitem->id; ?>" class="edit_dialog_content">
|
||||||
<table class="tabledata" cellspacing="0" cellpadding="0">
|
<table class="tabledata" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Title') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Title') ?></td>
|
||||||
<td><input type="text" name="title" value="<?php echo scrub_out($song->title); ?>" /></td>
|
<td><input type="text" name="title" value="<?php echo scrub_out($libitem->title); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if (Access::check('interface','75')) { ?>
|
<?php if (Access::check('interface','75')) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Artist') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Artist') ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php show_artist_select('artist', $song->artist, true, $song->id); ?>
|
<?php show_artist_select('artist', $libitem->artist, true, $libitem->id); ?>
|
||||||
<div id="artist_select_song_<?php echo $song->id ?>">
|
<div id="artist_select_song_<?php echo $libitem->id ?>">
|
||||||
<?php echo Ajax::observe('artist_select_'.$song->id, 'change', 'check_inline_song_edit("artist", '.$song->id.')'); ?>
|
<?php echo Ajax::observe('artist_select_'.$libitem->id, 'change', 'check_inline_song_edit("artist", '.$libitem->id.')'); ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Album Artist') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Album Artist') ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php show_artist_select('album_artist', $song->album_artist, true, $song->id, true); ?>
|
<?php show_artist_select('album_artist', $libitem->album_artist, true, $libitem->id, true); ?>
|
||||||
<div id="album_artist_select_song_<?php echo $song->id ?>">
|
<div id="album_artist_select_song_<?php echo $libitem->id ?>">
|
||||||
<?php echo Ajax::observe('album_artist_select_'.$song->id, 'change', 'check_inline_song_edit("album_artist", '.$song->id.')'); ?>
|
<?php echo Ajax::observe('album_artist_select_'.$libitem->id, 'change', 'check_inline_song_edit("album_artist", '.$libitem->id.')'); ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Album') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Album') ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php show_album_select('album', $song->album, true, $song->id); ?>
|
<?php show_album_select('album', $libitem->album, true, $libitem->id); ?>
|
||||||
<div id="album_select_song_<?php echo $song->id ?>">
|
<div id="album_select_song_<?php echo $libitem->id ?>">
|
||||||
<?php echo Ajax::observe('album_select_'.$song->id, 'change', 'check_inline_song_edit("album", '.$song->id.')'); ?>
|
<?php echo Ajax::observe('album_select_'.$libitem->id, 'change', 'check_inline_song_edit("album", '.$libitem->id.')'); ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Track') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Track') ?></td>
|
||||||
<td><input type="text" name="track" value="<?php echo scrub_out($song->track); ?>" /></td>
|
<td><input type="text" name="track" value="<?php echo scrub_out($libitem->track); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('MusicBrainz ID') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('MusicBrainz ID') ?></td>
|
||||||
<td><input type="text" name="mbid" value="<?php echo $song->mbid; ?>" /></td>
|
<td><input type="text" name="mbid" value="<?php echo $libitem->mbid; ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Tags') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Tags') ?></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="edit_tags" id="edit_tags" value="<?php echo Tag::get_display($song->tags); ?>" />
|
<input type="text" name="edit_tags" id="edit_tags" value="<?php echo Tag::get_display($libitem->tags); ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if (AmpConfig::get('licensing')) { ?>
|
<?php if (AmpConfig::get('licensing')) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Music License') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Music License') ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php show_license_select('license', $song->license, $song->id); ?>
|
<?php show_license_select('license', $libitem->license, $libitem->id); ?>
|
||||||
<div id="album_select_license_<?php echo $song->license ?>">
|
<div id="album_select_license_<?php echo $libitem->license ?>">
|
||||||
<?php echo Ajax::observe('license_select_'.$song->license, 'change', 'check_inline_song_edit("license", '.$song->id.')'); ?>
|
<?php echo Ajax::observe('license_select_'.$libitem->license, 'change', 'check_inline_song_edit("license", '.$libitem->id.')'); ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="id" value="<?php echo $song->id; ?>" />
|
<input type="hidden" name="id" value="<?php echo $libitem->id; ?>" />
|
||||||
<input type="hidden" name="type" value="song_row" />
|
<input type="hidden" name="type" value="song_row" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,11 +21,11 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<form method="post" id="edit_tag_<?php echo $tag->id; ?>" class="edit_dialog_content">
|
<form method="post" id="edit_tag_<?php echo $libitem->id; ?>" class="edit_dialog_content">
|
||||||
<table class="tabledata" cellspacing="0" cellpadding="0">
|
<table class="tabledata" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
||||||
<td><input type="text" name="name" value="<?php echo scrub_out($tag->name); ?>" /></td>
|
<td><input type="text" name="name" value="<?php echo scrub_out($libitem->name); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td> </td></tr>
|
<tr><td> </td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
<select name="select_tags" id="select_tags">
|
<select name="select_tags" id="select_tags">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<?php
|
<?php
|
||||||
if ($tag->merged_to) {
|
if ($libitem->merged_to) {
|
||||||
echo "<option value='" . $tag->merged_to . "'>" . $tag->merged_to . "</option>";
|
echo "<option value='" . $libitem->merged_to . "'>" . $libitem->merged_to . "</option>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
<td><input type="checkbox" name="merge_persist" value="1" /></td>
|
<td><input type="checkbox" name="merge_persist" value="1" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="id" value="<?php echo $tag->id; ?>" />
|
<input type="hidden" name="id" value="<?php echo $libitem->id; ?>" />
|
||||||
<input type="hidden" name="type" value="tag_row" />
|
<input type="hidden" name="type" value="tag_row" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
50
templates/show_edit_tvshow_row.inc.php
Normal file
50
templates/show_edit_tvshow_row.inc.php
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* LICENSE: GNU General Public License, version 2 (GPLv2)
|
||||||
|
* Copyright 2001 - 2014 Ampache.org
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License v2
|
||||||
|
* as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<div>
|
||||||
|
<form method="post" id="edit_tvshow_<?php echo $libitem->id; ?>" class="edit_dialog_content">
|
||||||
|
<table class="tabledata" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td class="edit_dialog_content_header"><?php echo T_('Name') ?></td>
|
||||||
|
<td><input type="text" name="name" value="<?php echo scrub_out($libitem->name); ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="edit_dialog_content_header"><?php echo T_('Description') ?></td>
|
||||||
|
<td><textarea name="description" cols="44" rows="4" value="<?php echo scrub_out($libitem->description); ?>"></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="edit_dialog_content_header"><?php echo T_('Year') ?></td>
|
||||||
|
<td><input type="number" name="year" value="<?php echo scrub_out($libitem->year); ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="edit_dialog_content_header"><?php echo T_('Tags') ?></td>
|
||||||
|
<td><input type="text" name="edit_tags" id="edit_tags" value="<?php echo Tag::get_display($libitem->tags); ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="edit_dialog_content_header"></td>
|
||||||
|
<td><input type="checkbox" name="apply_childs" value="checked" /><?php echo T_(' Apply tags to all childs (override tags for episodes)') ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<input type="hidden" name="id" value="<?php echo $libitem->id; ?>" />
|
||||||
|
<input type="hidden" name="type" value="tvshow_row" />
|
||||||
|
</form>
|
||||||
|
</div>
|
40
templates/show_edit_tvshow_season_row.inc.php
Normal file
40
templates/show_edit_tvshow_season_row.inc.php
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* LICENSE: GNU General Public License, version 2 (GPLv2)
|
||||||
|
* Copyright 2001 - 2014 Ampache.org
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License v2
|
||||||
|
* as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<div>
|
||||||
|
<form method="post" id="edit_tvshow_season_<?php echo $libitem->id; ?>" class="edit_dialog_content">
|
||||||
|
<table class="tabledata" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td class="edit_dialog_content_header"><?php echo T_('Season') ?></td>
|
||||||
|
<td><input type="number" name="season_number" value="<?php echo scrub_out($libitem->season_number); ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="edit_dialog_content_header"><?php echo T_('TV Show') ?></td>
|
||||||
|
<td>
|
||||||
|
<?php show_tvshow_select('tvshow', $libitem->tvshow); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<input type="hidden" name="id" value="<?php echo $libitem->id; ?>" />
|
||||||
|
<input type="hidden" name="type" value="tvshow_season_row" />
|
||||||
|
</form>
|
||||||
|
</div>
|
|
@ -20,14 +20,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<tr id="license_<?php echo $license->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
<tr id="license_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
||||||
<td class="cel_name"><?php echo $license->f_link; ?></td>
|
<td class="cel_name"><?php echo $libitem->f_link; ?></td>
|
||||||
<td class="cel_description"><?php echo $license->description; ?></td>
|
<td class="cel_description"><?php echo $libitem->description; ?></td>
|
||||||
<td class="cel_action">
|
<td class="cel_action">
|
||||||
<a href="<?php echo $web_path; ?>/admin/license.php?action=show_edit&license_id=<?php echo $license->id; ?>">
|
<a href="<?php echo $web_path; ?>/admin/license.php?action=show_edit&license_id=<?php echo $libitem->id; ?>">
|
||||||
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="<?php echo $web_path; ?>/admin/license.php?action=delete&license_id=<?php echo $license->id; ?>">
|
<a href="<?php echo $web_path; ?>/admin/license.php?action=delete&license_id=<?php echo $libitem->id; ?>">
|
||||||
<?php echo UI::get_icon('delete', T_('Delete')); ?>
|
<?php echo UI::get_icon('delete', T_('Delete')); ?>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -24,25 +24,25 @@
|
||||||
<span class="cel_play_content"> </span>
|
<span class="cel_play_content"> </span>
|
||||||
<div class="cel_play_hover">
|
<div class="cel_play_hover">
|
||||||
<?php if (AmpConfig::get('directplay')) { ?>
|
<?php if (AmpConfig::get('directplay')) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=live_stream&stream_id=' . $radio->id, 'play', T_('Play live stream'),'play_live_stream_' . $radio->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=live_stream&stream_id=' . $libitem->id, 'play', T_('Play live stream'),'play_live_stream_' . $libitem->id); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_streamname"><?php echo $radio->f_name_link; ?></td>
|
<td class="cel_streamname"><?php echo $libitem->f_name_link; ?></td>
|
||||||
<td class="cel_add">
|
<td class="cel_add">
|
||||||
<span class="cel_item_add">
|
<span class="cel_item_add">
|
||||||
<?php echo Ajax::button('?action=basket&type=live_stream&id=' . $radio->id,'add', T_('Add to temporary playlist'),'add_radio_' . $radio->id); ?>
|
<?php echo Ajax::button('?action=basket&type=live_stream&id=' . $libitem->id,'add', T_('Add to temporary playlist'),'add_radio_' . $libitem->id); ?>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_streamurl"><?php echo $radio->f_url_link; ?></td>
|
<td class="cel_streamurl"><?php echo $libitem->f_url_link; ?></td>
|
||||||
<td class="cel_codec"><?php echo $radio->codec; ?></td>
|
<td class="cel_codec"><?php echo $libitem->codec; ?></td>
|
||||||
<td class="cel_action">
|
<td class="cel_action">
|
||||||
<?php if (Access::check('interface','50')) { ?>
|
<?php if (Access::check('interface','50')) { ?>
|
||||||
<a id="<?php echo 'edit_live_stream_'.$radio->id ?>" onclick="showEditDialog('live_stream_row', '<?php echo $radio->id ?>', '<?php echo 'edit_live_stream_'.$radio->id ?>', '<?php echo T_('Live Stream edit') ?>', 'live_stream_', 'refresh_livestream')">
|
<a id="<?php echo 'edit_live_stream_'.$libitem->id ?>" onclick="showEditDialog('radio_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_live_stream_'.$libitem->id ?>', '<?php echo T_('Live Stream edit') ?>', 'live_stream_')">
|
||||||
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (Access::check('interface','75')) { ?>
|
<?php if (Access::check('interface','75')) { ?>
|
||||||
<?php echo Ajax::button('?page=browse&action=delete_object&type=live_stream&id=' . $radio->id,'delete', T_('Delete'),'delete_live_stream_' . $radio->id); ?>
|
<?php echo Ajax::button('?page=browse&action=delete_object&type=live_stream&id=' . $libitem->id,'delete', T_('Delete'),'delete_live_stream_' . $libitem->id); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -37,11 +37,11 @@ $web_path = AmpConfig::get('web_path');
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($object_ids as $radio_id) {
|
foreach ($object_ids as $radio_id) {
|
||||||
$radio = new Radio($radio_id);
|
$libitem = new Live_Stream($radio_id);
|
||||||
$radio->format();
|
$libitem->format();
|
||||||
?>
|
?>
|
||||||
<tr id="live_stream_<?php echo $radio->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
<tr id="live_stream_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_live_stream_row.inc.php'; ?>
|
<?php require AmpConfig::get('prefix') . '/templates/show_radio_row.inc.php'; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } //end foreach ($artists as $artist) ?>
|
<?php } //end foreach ($artists as $artist) ?>
|
||||||
<?php if (!count($object_ids)) { ?>
|
<?php if (!count($object_ids)) { ?>
|
||||||
|
|
|
@ -40,8 +40,8 @@ $web_path = AmpConfig::get('web_path');
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($object_ids as $license_id) {
|
foreach ($object_ids as $license_id) {
|
||||||
$license = new License($license_id);
|
$libitem = new License($license_id);
|
||||||
$license->format();
|
$libitem->format();
|
||||||
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_license_row.inc.php';
|
require AmpConfig::get('prefix') . '/templates/show_license_row.inc.php';
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -36,11 +36,12 @@ $web_path = AmpConfig::get('web_path');
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($object_ids as $shout_id) {
|
foreach ($object_ids as $shout_id) {
|
||||||
$shout = new Shoutbox($shout_id);
|
$libitem = new Shoutbox($shout_id);
|
||||||
$shout->format();
|
$libitem->format();
|
||||||
$object = Shoutbox::get_object($shout->object_type,$shout->object_id);
|
|
||||||
|
$object = Shoutbox::get_object($libitem->object_type, $libitem->object_id);
|
||||||
$object->format();
|
$object->format();
|
||||||
$client = new User($shout->user);
|
$client = new User($libitem->user);
|
||||||
$client->format();
|
$client->format();
|
||||||
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_shout_row.inc.php';
|
require AmpConfig::get('prefix') . '/templates/show_shout_row.inc.php';
|
||||||
|
|
|
@ -33,9 +33,9 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($walbums as $walbum) {
|
foreach ($walbums as $libitem) {
|
||||||
?>
|
?>
|
||||||
<tr id="walbum_<?php echo $walbum->mbid; ?>" class="<?php echo UI::flip_class(); ?>">
|
<tr id="walbum_<?php echo $libitem->mbid; ?>" class="<?php echo UI::flip_class(); ?>">
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_wanted_album_row.inc.php'; ?>
|
<?php require AmpConfig::get('prefix') . '/templates/show_wanted_album_row.inc.php'; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -20,4 +20,4 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<td class="cel_artist"><?php echo $video->f_artist; ?></td>
|
<td class="cel_artist"><?php echo $libitem->f_artist; ?></td>
|
||||||
|
|
|
@ -20,4 +20,4 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<td class="cel_location"><?php echo $video->f_location; ?></td>
|
<td class="cel_location"><?php echo $libitem->f_location; ?></td>
|
||||||
|
|
|
@ -20,6 +20,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<td class="cel_episode"><?php echo $video->episode_number; ?></td>
|
<td class="cel_episode"><?php echo $libitem->episode_number; ?></td>
|
||||||
<td class="cel_season"><?php echo $video->f_season_link; ?></td>
|
<td class="cel_season"><?php echo $libitem->f_season_link; ?></td>
|
||||||
<td class="cel_tvshow"><?php echo $video->f_tvshow_link; ?></td>
|
<td class="cel_tvshow"><?php echo $libitem->f_tvshow_link; ?></td>
|
||||||
|
|
|
@ -24,39 +24,39 @@
|
||||||
<span class="cel_play_content"> </span>
|
<span class="cel_play_content"> </span>
|
||||||
<div class="cel_play_hover">
|
<div class="cel_play_hover">
|
||||||
<?php if (AmpConfig::get('directplay')) { ?>
|
<?php if (AmpConfig::get('directplay')) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=playlist&playlist_id=' . $playlist->id,'play', T_('Play'),'play_playlist_' . $playlist->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=playlist&playlist_id=' . $libitem->id,'play', T_('Play'),'play_playlist_' . $libitem->id); ?>
|
||||||
<?php if (Stream_Playlist::check_autoplay_append()) { ?>
|
<?php if (Stream_Playlist::check_autoplay_append()) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=playlist&playlist_id=' . $playlist->id . '&append=true','play_add', T_('Play last'),'addplay_playlist_' . $playlist->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=playlist&playlist_id=' . $libitem->id . '&append=true','play_add', T_('Play last'),'addplay_playlist_' . $libitem->id); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_playlist"><?php echo $playlist->f_name_link; ?></td>
|
<td class="cel_playlist"><?php echo $libitem->f_name_link; ?></td>
|
||||||
<td class="cel_add">
|
<td class="cel_add">
|
||||||
<span class="cel_item_add">
|
<span class="cel_item_add">
|
||||||
<?php echo Ajax::button('?action=basket&type=playlist&id=' . $playlist->id,'add', T_('Add to temporary playlist'),'add_playlist_' . $playlist->id); ?>
|
<?php echo Ajax::button('?action=basket&type=playlist&id=' . $libitem->id,'add', T_('Add to temporary playlist'),'add_playlist_' . $libitem->id); ?>
|
||||||
<?php echo Ajax::button('?action=basket&type=playlist_random&id=' . $playlist->id,'random', T_('Random to temporary playlist'),'random_playlist_' . $playlist->id); ?>
|
<?php echo Ajax::button('?action=basket&type=playlist_random&id=' . $libitem->id,'random', T_('Random to temporary playlist'),'random_playlist_' . $libitem->id); ?>
|
||||||
<a id="<?php echo 'add_playlist_'.$playlist->id ?>" onclick="showPlaylistDialog(event, 'playlist', '<?php echo $playlist->id ?>')">
|
<a id="<?php echo 'add_playlist_'.$libitem->id ?>" onclick="showPlaylistDialog(event, 'playlist', '<?php echo $libitem->id ?>')">
|
||||||
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
|
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_type"><?php echo $playlist->f_type; ?></td>
|
<td class="cel_type"><?php echo $libitem->f_type; ?></td>
|
||||||
<td class="cel_songs"><?php echo $count; ?></td>
|
<td class="cel_songs"><?php echo $libitem->get_song_count(); ?></td>
|
||||||
<td class="cel_owner"><?php echo scrub_out($playlist->f_user); ?></td>
|
<td class="cel_owner"><?php echo scrub_out($libitem->f_user); ?></td>
|
||||||
<td class="cel_action">
|
<td class="cel_action">
|
||||||
<?php if (Access::check_function('batch_download')) { ?>
|
<?php if (Access::check_function('batch_download')) { ?>
|
||||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=playlist&id=<?php echo $playlist->id; ?>">
|
<a href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=playlist&id=<?php echo $libitem->id; ?>">
|
||||||
<?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
|
<?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (AmpConfig::get('share')) { ?>
|
<?php if (AmpConfig::get('share')) { ?>
|
||||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/share.php?action=show_create&type=playlist&id=<?php echo $playlist->id; ?>"><?php echo UI::get_icon('share', T_('Share')); ?></a>
|
<a href="<?php echo AmpConfig::get('web_path'); ?>/share.php?action=show_create&type=playlist&id=<?php echo $libitem->id; ?>"><?php echo UI::get_icon('share', T_('Share')); ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($playlist->has_access()) { ?>
|
<?php if ($libitem->has_access()) { ?>
|
||||||
<a id="<?php echo 'edit_playlist_'.$playlist->id ?>" onclick="showEditDialog('playlist_row', '<?php echo $playlist->id ?>', '<?php echo 'edit_playlist_'.$playlist->id ?>', '<?php echo T_('Playlist edit') ?>', 'playlist_row_', 'refresh_playlist')">
|
<a id="<?php echo 'edit_playlist_'.$libitem->id ?>" onclick="showEditDialog('playlist_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_playlist_'.$libitem->id ?>', '<?php echo T_('Playlist edit') ?>', 'playlist_row_')">
|
||||||
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php echo Ajax::button('?page=browse&action=delete_object&type=playlist&id='.$playlist->id, 'delete', T_('Delete'), 'delete_playlist_'.$playlist->id, '', '', T_('Do you really want to delete the playlist?')); ?>
|
<?php echo Ajax::button('?page=browse&action=delete_object&type=playlist&id='.$libitem->id, 'delete', T_('Delete'), 'delete_playlist_'.$libitem->id, '', '', T_('Do you really want to delete the playlist?')); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -24,40 +24,40 @@
|
||||||
<span class="cel_play_content"><?php echo '<b>'.$playlist_track.'</b>'; ?></span>
|
<span class="cel_play_content"><?php echo '<b>'.$playlist_track.'</b>'; ?></span>
|
||||||
<div class="cel_play_hover">
|
<div class="cel_play_hover">
|
||||||
<?php if (AmpConfig::get('directplay')) { ?>
|
<?php if (AmpConfig::get('directplay')) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=song&song_id=' . $song->id, 'play', T_('Play'),'play_playlist_song_' . $song->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=song&song_id=' . $libitem->id, 'play', T_('Play'),'play_playlist_song_' . $libitem->id); ?>
|
||||||
<?php if (Stream_Playlist::check_autoplay_append()) { ?>
|
<?php if (Stream_Playlist::check_autoplay_append()) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=song&song_id=' . $song->id . '&append=true','play_add', T_('Play last'),'addplay_song_' . $song->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=song&song_id=' . $libitem->id . '&append=true','play_add', T_('Play last'),'addplay_song_' . $libitem->id); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_song"><?php echo $song->f_link; ?></td>
|
<td class="cel_song"><?php echo $libitem->f_link; ?></td>
|
||||||
<td class="cel_add">
|
<td class="cel_add">
|
||||||
<span class="cel_item_add">
|
<span class="cel_item_add">
|
||||||
<?php echo Ajax::button('?action=basket&type=song&id=' . $song->id,'add', T_('Add to temporary playlist'),'playlist_add_' . $song->id); ?>
|
<?php echo Ajax::button('?action=basket&type=song&id=' . $libitem->id,'add', T_('Add to temporary playlist'),'playlist_add_' . $libitem->id); ?>
|
||||||
<a id="<?php echo 'add_playlist_'.$song->id ?>" onclick="showPlaylistDialog(event, 'song', '<?php echo $song->id ?>')">
|
<a id="<?php echo 'add_playlist_'.$libitem->id ?>" onclick="showPlaylistDialog(event, 'song', '<?php echo $libitem->id ?>')">
|
||||||
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
|
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_artist"><?php echo $song->f_artist_link; ?></td>
|
<td class="cel_artist"><?php echo $libitem->f_artist_link; ?></td>
|
||||||
<td class="cel_album"><?php echo $song->f_album_link; ?></td>
|
<td class="cel_album"><?php echo $libitem->f_album_link; ?></td>
|
||||||
<td class="cel_tags" title="<?php echo $song->f_tags; ?>"><?php echo $song->f_tags; ?></td>
|
<td class="cel_tags" title="<?php echo $libitem->f_tags; ?>"><?php echo $libitem->f_tags; ?></td>
|
||||||
<td class="cel_time"><?php echo $song->f_time; ?></td>
|
<td class="cel_time"><?php echo $libitem->f_time; ?></td>
|
||||||
<?php if (AmpConfig::get('ratings')) { ?>
|
<?php if (AmpConfig::get('ratings')) { ?>
|
||||||
<td class="cel_rating" id="rating_<?php echo $song->id; ?>_song"><?php Rating::show($song->id,'song'); ?></td>
|
<td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_song"><?php Rating::show($libitem->id,'song'); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (AmpConfig::get('userflags')) { ?>
|
<?php if (AmpConfig::get('userflags')) { ?>
|
||||||
<td class="cel_userflag" id="userflag_<?php echo $song->id; ?>_song"><?php Userflag::show($song->id,'song'); ?></td>
|
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_song"><?php Userflag::show($libitem->id,'song'); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<td class="cel_action">
|
<td class="cel_action">
|
||||||
<?php if (AmpConfig::get('download')) { ?>
|
<?php if (AmpConfig::get('download')) { ?>
|
||||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/stream.php?action=download&song_id=<?php echo $song->id; ?>">
|
<a href="<?php echo AmpConfig::get('web_path'); ?>/stream.php?action=download&song_id=<?php echo $libitem->id; ?>">
|
||||||
<?php echo UI::get_icon('download', T_('Download')); ?>
|
<?php echo UI::get_icon('download', T_('Download')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (AmpConfig::get('share')) { ?>
|
<?php if (AmpConfig::get('share')) { ?>
|
||||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/share.php?action=show_create&type=song&id=<?php echo $song->id; ?>"><?php echo UI::get_icon('share', T_('Share')); ?></a>
|
<a href="<?php echo AmpConfig::get('web_path'); ?>/share.php?action=show_create&type=song&id=<?php echo $libitem->id; ?>"><?php echo UI::get_icon('share', T_('Share')); ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($playlist->has_access()) { ?>
|
<?php if ($playlist->has_access()) { ?>
|
||||||
<?php echo Ajax::button('?page=playlist&action=delete_track&playlist_id=' . $playlist->id . '&track_id=' . $object['track_id'],'delete', T_('Delete'),'track_del_' . $object['track_id']); ?>
|
<?php echo Ajax::button('?page=playlist&action=delete_track&playlist_id=' . $playlist->id . '&track_id=' . $object['track_id'],'delete', T_('Delete'),'track_del_' . $object['track_id']); ?>
|
||||||
|
|
|
@ -53,8 +53,8 @@ $web_path = AmpConfig::get('web_path');
|
||||||
if (!is_array($object)) {
|
if (!is_array($object)) {
|
||||||
$object = (array) $object;
|
$object = (array) $object;
|
||||||
}
|
}
|
||||||
$song = new Song($object['object_id']);
|
$libitem = new Song($object['object_id']);
|
||||||
$song->format();
|
$libitem->format();
|
||||||
$playlist_track = $object['track'];
|
$playlist_track = $object['track'];
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo UI::flip_class(); ?>" id="track_<?php echo $object['track_id']; ?>">
|
<tr class="<?php echo UI::flip_class(); ?>" id="track_<?php echo $object['track_id']; ?>">
|
||||||
|
|
|
@ -36,11 +36,10 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($object_ids as $playlist_id) {
|
foreach ($object_ids as $playlist_id) {
|
||||||
$playlist = new Playlist($playlist_id);
|
$libitem = new Playlist($playlist_id);
|
||||||
$playlist->format();
|
$libitem->format();
|
||||||
$count = $playlist->get_song_count();
|
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo UI::flip_class(); ?>" id="playlist_row_<?php echo $playlist->id; ?>">
|
<tr class="<?php echo UI::flip_class(); ?>" id="playlist_row_<?php echo $libitem->id; ?>">
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_playlist_row.inc.php'; ?>
|
<?php require AmpConfig::get('prefix') . '/templates/show_playlist_row.inc.php'; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } // end foreach ($playlists as $playlist) ?>
|
<?php } // end foreach ($playlists as $playlist) ?>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="javascript:void(0);" id="rb_append_dplaylist_new" onclick="handlePlaylistAction('<?php echo AmpConfig::get('ajax_url').'?page=playlist&action=append_item&item_type='.$_REQUEST['item_type'].'&item_id='.$_REQUEST['item_id']; ?>', 'rb_append_dplaylist_new');">
|
<a href="javascript:void(0);" id="rb_append_dplaylist_new" onclick="handlePlaylistAction('<?php echo AmpConfig::get('ajax_url').'?page=playlist&action=append_item&item_type='.$object_type.'&item_id='.$object_id; ?>', 'rb_append_dplaylist_new');">
|
||||||
<?php echo T_('Add to New Playlist'); ?>
|
<?php echo T_('Add to New Playlist'); ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
$playlist->format();
|
$playlist->format();
|
||||||
?>
|
?>
|
||||||
<li>
|
<li>
|
||||||
<a href="javascript:void(0);" id="rb_append_dplaylist_<?php echo $playlist->id; ?>" onclick="handlePlaylistAction('<?php echo AmpConfig::get('ajax_url').'?page=playlist&action=append_item&playlist_id='.$playlist->id.'&item_type='.$_REQUEST['item_type'].'&item_id='.$_REQUEST['item_id']; ?>', 'rb_append_dplaylist_<?php echo $playlist->id; ?>');">
|
<a href="javascript:void(0);" id="rb_append_dplaylist_<?php echo $playlist->id; ?>" onclick="handlePlaylistAction('<?php echo AmpConfig::get('ajax_url').'?page=playlist&action=append_item&playlist_id='.$playlist->id.'&item_type='.$object_type.'&item_id='.$object_id; ?>', 'rb_append_dplaylist_<?php echo $playlist->id; ?>');">
|
||||||
<?php echo $playlist->f_name; ?>
|
<?php echo $playlist->f_name; ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -51,10 +51,10 @@ $thcount = 8;
|
||||||
|
|
||||||
/* Foreach through every artist that has been passed to us */
|
/* Foreach through every artist that has been passed to us */
|
||||||
foreach ($object_ids as $artist_id) {
|
foreach ($object_ids as $artist_id) {
|
||||||
$artist = new Artist($artist_id);
|
$libitem = new Artist($artist_id);
|
||||||
$artist->format();
|
$libitem->format();
|
||||||
?>
|
?>
|
||||||
<tr id="artist_<?php echo $artist->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
<tr id="artist_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_artist_row.inc.php'; ?>
|
<?php require AmpConfig::get('prefix') . '/templates/show_artist_row.inc.php'; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -59,7 +59,7 @@ $logic_operator = strtolower($logic_operator);
|
||||||
if ($playlist) {
|
if ($playlist) {
|
||||||
$out = $playlist->to_js();
|
$out = $playlist->to_js();
|
||||||
} else {
|
} else {
|
||||||
$mysearch = new Search($_REQUEST['type']);
|
$mysearch = new Search(null, $_REQUEST['type']);
|
||||||
$mysearch->parse_rules(Search::clean_request($_REQUEST));
|
$mysearch->parse_rules(Search::clean_request($_REQUEST));
|
||||||
$out = $mysearch->to_js();
|
$out = $mysearch->to_js();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,42 +19,42 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
UI::show_box_top(T_('Search Ampache') . "...", 'box box_advanced_search');
|
|
||||||
?>
|
?>
|
||||||
<form id="search" name="search" method="post" action="<?php echo AmpConfig::get('web_path'); ?>/search.php?type=<?php echo $_REQUEST['type'] ? scrub_out($_REQUEST['type']) : 'song'; ?>" enctype="multipart/form-data" style="Display:inline">
|
<?php
|
||||||
<table class="tabledata" cellpadding="3" cellspacing="0">
|
ob_start();
|
||||||
<tr id="search_location">
|
require AmpConfig::get('prefix') . '/templates/show_search_title.inc.php';
|
||||||
<td><?php if ($_REQUEST['type'] != 'song') { ?><a href="<?php echo AmpConfig::get('web_path'); ?>/search.php?type=song"><?php echo T_('Songs'); ?></a><?php } else { echo T_('Songs'); } ?></td>
|
$title = ob_get_contents();
|
||||||
<td><?php if ($_REQUEST['type'] != 'album') { ?><a href="<?php echo AmpConfig::get('web_path'); ?>/search.php?type=album"><?php echo T_('Albums'); ?></a><?php } else { echo T_('Albums'); } ?></td>
|
ob_end_clean();
|
||||||
<td><?php if ($_REQUEST['type'] != 'artist') { ?><a href="<?php echo AmpConfig::get('web_path'); ?>/search.php?type=artist"><?php echo T_('Artists'); ?></a><?php } else { echo T_('Artists'); } ?></td>
|
UI::show_box_top('<div id="smartplaylist_row_' . $playlist->id . '">' . $title . '</div>' , 'box box_smartplaylist');
|
||||||
<td><?php if ($_REQUEST['type'] != 'video') { ?><a href="<?php echo AmpConfig::get('web_path'); ?>/search.php?type=video"><?php echo T_('Videos'); ?></a><?php } else { echo T_('Videos'); } ?></td>
|
?>
|
||||||
</tr>
|
<div id="information_actions">
|
||||||
<tr id="search_blank_line"><td> </td></tr>
|
<ul>
|
||||||
</table>
|
<?php if (Access::check_function('batch_download')) { ?>
|
||||||
<table class="tabledata" cellpadding="3" cellspacing="0">
|
<li>
|
||||||
<tr id="search_max_results">
|
<a href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=smartplaylist&id=<?php echo $playlist->id; ?>"><?php echo UI::get_icon('batch_download', T_('Batch Download')); ?></a>
|
||||||
<td><?php echo T_('Maximum Results'); ?></td>
|
<?php echo T_('Batch Download'); ?>
|
||||||
<td>
|
</li>
|
||||||
<select name="limit">
|
<?php } ?>
|
||||||
<option value="0"><?php echo T_('Unlimited'); ?></option>
|
<li>
|
||||||
<option value="25" <?php if($_REQUEST['limit']=="25") echo "selected=\"selected\""?>>25</option>
|
<?php echo Ajax::button('?action=basket&type=smartplaylist&id=' . $playlist->id,'add', T_('Add All'),'play_playlist'); ?>
|
||||||
<option value="50" <?php if($_REQUEST['limit']=="50") echo "selected=\"selected\""?>>50</option>
|
<?php echo T_('Add All'); ?>
|
||||||
<option value="100" <?php if($_REQUEST['limit']=="100") echo "selected=\"selected\""?>>100</option>
|
</li>
|
||||||
<option value="500" <?php if($_REQUEST['limit']=="500") echo "selected=\"selected\""?>>500</option>
|
<?php if ($playlist->has_access()) { ?>
|
||||||
</select>
|
<li>
|
||||||
</td>
|
<a href="<?php echo AmpConfig::get('web_path'); ?>/smartplaylist.php?action=delete_playlist&playlist_id=<?php echo $playlist->id; ?>">
|
||||||
</tr>
|
<?php echo UI::get_icon('delete'); ?>
|
||||||
</table>
|
</a>
|
||||||
|
<?php echo T_('Delete'); ?>
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_rules.inc.php'; ?>
|
</li>
|
||||||
|
<?php } ?>
|
||||||
<div class="formValidation">
|
</ul>
|
||||||
<input class="button" type="submit" value="<?php echo T_('Search'); ?>" />
|
|
||||||
<?php if ($_REQUEST['type'] == 'song' || ! $_REQUEST['type']) { ?>
|
|
||||||
<input id="savesearchbutton" class="button" type="submit" value="<?php echo T_('Save as Smart Playlist'); ?>" onClick="$('#hiddenaction').val('save_as_smartplaylist');" />
|
|
||||||
<?php } ?>
|
|
||||||
<input type="hidden" id="hiddenaction" name="action" value="search" />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<form id="editplaylist" name="editplaylist" method="post" action="<?php echo AmpConfig::get('web_path'); ?>/smartplaylist.php?action=update_playlist&playlist_id=<?php echo $playlist->id; ?>" enctype="multipart/form-data" style="Display:inline">
|
||||||
|
<?php require AmpConfig::get('prefix') . '/templates/show_rules.inc.php'; ?>
|
||||||
|
<div class="formValidation">
|
||||||
|
<input class="button" type="submit" value="<?php echo T_('Save Changes'); ?>" />
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php UI::show_box_bottom(); ?>
|
<?php UI::show_box_bottom(); ?>
|
||||||
|
|
60
templates/show_search_form.inc.php
Normal file
60
templates/show_search_form.inc.php
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
<?php
|
||||||
|
/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* LICENSE: GNU General Public License, version 2 (GPLv2)
|
||||||
|
* Copyright 2001 - 2014 Ampache.org
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License v2
|
||||||
|
* as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
UI::show_box_top(T_('Search Ampache') . "...", 'box box_advanced_search');
|
||||||
|
?>
|
||||||
|
<form id="search" name="search" method="post" action="<?php echo AmpConfig::get('web_path'); ?>/search.php?type=<?php echo $_REQUEST['type'] ? scrub_out($_REQUEST['type']) : 'song'; ?>" enctype="multipart/form-data" style="Display:inline">
|
||||||
|
<table class="tabledata" cellpadding="3" cellspacing="0">
|
||||||
|
<tr id="search_location">
|
||||||
|
<td><?php if ($_REQUEST['type'] != 'song') { ?><a href="<?php echo AmpConfig::get('web_path'); ?>/search.php?type=song"><?php echo T_('Songs'); ?></a><?php } else { echo T_('Songs'); } ?></td>
|
||||||
|
<td><?php if ($_REQUEST['type'] != 'album') { ?><a href="<?php echo AmpConfig::get('web_path'); ?>/search.php?type=album"><?php echo T_('Albums'); ?></a><?php } else { echo T_('Albums'); } ?></td>
|
||||||
|
<td><?php if ($_REQUEST['type'] != 'artist') { ?><a href="<?php echo AmpConfig::get('web_path'); ?>/search.php?type=artist"><?php echo T_('Artists'); ?></a><?php } else { echo T_('Artists'); } ?></td>
|
||||||
|
<td><?php if ($_REQUEST['type'] != 'video') { ?><a href="<?php echo AmpConfig::get('web_path'); ?>/search.php?type=video"><?php echo T_('Videos'); ?></a><?php } else { echo T_('Videos'); } ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr id="search_blank_line"><td> </td></tr>
|
||||||
|
</table>
|
||||||
|
<table class="tabledata" cellpadding="3" cellspacing="0">
|
||||||
|
<tr id="search_max_results">
|
||||||
|
<td><?php echo T_('Maximum Results'); ?></td>
|
||||||
|
<td>
|
||||||
|
<select name="limit">
|
||||||
|
<option value="0"><?php echo T_('Unlimited'); ?></option>
|
||||||
|
<option value="25" <?php if($_REQUEST['limit']=="25") echo "selected=\"selected\""?>>25</option>
|
||||||
|
<option value="50" <?php if($_REQUEST['limit']=="50") echo "selected=\"selected\""?>>50</option>
|
||||||
|
<option value="100" <?php if($_REQUEST['limit']=="100") echo "selected=\"selected\""?>>100</option>
|
||||||
|
<option value="500" <?php if($_REQUEST['limit']=="500") echo "selected=\"selected\""?>>500</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php require AmpConfig::get('prefix') . '/templates/show_rules.inc.php'; ?>
|
||||||
|
|
||||||
|
<div class="formValidation">
|
||||||
|
<input class="button" type="submit" value="<?php echo T_('Search'); ?>" />
|
||||||
|
<?php if ($_REQUEST['type'] == 'song' || ! $_REQUEST['type']) { ?>
|
||||||
|
<input id="savesearchbutton" class="button" type="submit" value="<?php echo T_('Save as Smart Playlist'); ?>" onClick="$('#hiddenaction').val('save_as_smartplaylist');" />
|
||||||
|
<?php } ?>
|
||||||
|
<input type="hidden" id="hiddenaction" name="action" value="search" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<?php UI::show_box_bottom(); ?>
|
|
@ -24,36 +24,36 @@
|
||||||
<span class="cel_play_content"> </span>
|
<span class="cel_play_content"> </span>
|
||||||
<div class="cel_play_hover">
|
<div class="cel_play_hover">
|
||||||
<?php if (AmpConfig::get('directplay')) { ?>
|
<?php if (AmpConfig::get('directplay')) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=smartplaylist&playlist_id=' . $playlist->id,'play', T_('Play'),'play_playlist_' . $playlist->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=smartplaylist&playlist_id=' . $libitem->id,'play', T_('Play'),'play_playlist_' . $libitem->id); ?>
|
||||||
<?php if (Stream_Playlist::check_autoplay_append()) { ?>
|
<?php if (Stream_Playlist::check_autoplay_append()) { ?>
|
||||||
<?php echo Ajax::button('?page=stream&action=directplay&playtype=smartplaylist&playlist_id=' . $playlist->id . '&append=true','play_add', T_('Play last'),'addplay_playlist_' . $playlist->id); ?>
|
<?php echo Ajax::button('?page=stream&action=directplay&playtype=smartplaylist&playlist_id=' . $libitem->id . '&append=true','play_add', T_('Play last'),'addplay_playlist_' . $libitem->id); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_playlist"><?php echo $playlist->f_name_link; ?></td>
|
<td class="cel_playlist"><?php echo $libitem->f_name_link; ?></td>
|
||||||
<td class="cel_add">
|
<td class="cel_add">
|
||||||
<span class="cel_item_add">
|
<span class="cel_item_add">
|
||||||
<?php echo Ajax::button('?action=basket&type=smartplaylist&id=' . $playlist->id,'add', T_('Add to temporary playlist'),'add_playlist_' . $playlist->id); ?>
|
<?php echo Ajax::button('?action=basket&type=smartplaylist&id=' . $libitem->id,'add', T_('Add to temporary playlist'),'add_playlist_' . $libitem->id); ?>
|
||||||
<a id="<?php echo 'add_playlist_'.$playlist->id ?>" onclick="showPlaylistDialog(event, 'smartplaylist', '<?php echo $playlist->id ?>')">
|
<a id="<?php echo 'add_playlist_'.$libitem->id ?>" onclick="showPlaylistDialog(event, 'smartplaylist', '<?php echo $libitem->id ?>')">
|
||||||
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
|
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_type"><?php echo $playlist->f_type; ?></td>
|
<td class="cel_type"><?php echo $libitem->f_type; ?></td>
|
||||||
<td class="cel_random"><?php echo ($playlist->random ? T_('Yes') : T_('No')); ?></td>
|
<td class="cel_random"><?php echo ($libitem->random ? T_('Yes') : T_('No')); ?></td>
|
||||||
<td class="cel_limit"><?php echo (($playlist->limit > 0) ? $playlist->limit : T_('None')); ?></td>
|
<td class="cel_limit"><?php echo (($libitem->limit > 0) ? $libitem->limit : T_('None')); ?></td>
|
||||||
<td class="cel_owner"><?php echo scrub_out($playlist->f_user); ?></td>
|
<td class="cel_owner"><?php echo scrub_out($libitem->f_user); ?></td>
|
||||||
<td class="cel_action">
|
<td class="cel_action">
|
||||||
<?php if (Access::check_function('batch_download')) { ?>
|
<?php if (Access::check_function('batch_download')) { ?>
|
||||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=smartplaylist&id=<?php echo $playlist->id; ?>">
|
<a href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=smartplaylist&id=<?php echo $libitem->id; ?>">
|
||||||
<?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
|
<?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($playlist->has_access()) { ?>
|
<?php if ($libitem->has_access()) { ?>
|
||||||
<a id="<?php echo 'edit_playlist_'.$playlist->id ?>" onclick="showEditDialog('smartplaylist_row', '<?php echo $playlist->id ?>', '<?php echo 'edit_playlist_'.$playlist->id ?>', '<?php echo T_('Smart Playlist edit') ?>', 'smartplaylist_row_', 'refresh_smartplaylist')">
|
<a id="<?php echo 'edit_playlist_'.$libitem->id ?>" onclick="showEditDialog('search_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_playlist_'.$libitem->id ?>', '<?php echo T_('Smart Playlist edit') ?>', 'smartplaylist_row_')">
|
||||||
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php echo Ajax::button('?page=browse&action=delete_object&type=smartplaylist&id=' . $playlist->id,'delete', T_('Delete'),'delete_playlist_' . $playlist->id); ?>
|
<?php echo Ajax::button('?page=browse&action=delete_object&type=smartplaylist&id=' . $libitem->id,'delete', T_('Delete'),'delete_playlist_' . $libitem->id); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
|
@ -38,11 +38,11 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($object_ids as $playlist_id) {
|
foreach ($object_ids as $playlist_id) {
|
||||||
$playlist = new Search('song', $playlist_id);
|
$libitem = new Search($playlist_id, 'song');
|
||||||
$playlist->format();
|
$libitem->format();
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo UI::flip_class(); ?>" id="smartplaylist_row_<?php echo $playlist->id; ?>">
|
<tr class="<?php echo UI::flip_class(); ?>" id="smartplaylist_row_<?php echo $libitem->id; ?>">
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_smartplaylist_row.inc.php'; ?>
|
<?php require AmpConfig::get('prefix') . '/templates/show_search_row.inc.php'; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } // end foreach ($playlists as $playlist) ?>
|
<?php } // end foreach ($playlists as $playlist) ?>
|
||||||
<?php if (!count($object_ids)) { ?>
|
<?php if (!count($object_ids)) { ?>
|
|
@ -21,21 +21,21 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<td class="cel_object"><?php echo $share->f_object_link; ?></td>
|
<td class="cel_object"><?php echo $libitem->f_object_link; ?></td>
|
||||||
<td class="cel_object_type"><?php echo $share->object_type; ?></td>
|
<td class="cel_object_type"><?php echo $libitem->object_type; ?></td>
|
||||||
<td class="cel_user"><?php echo $share->f_user; ?></td>
|
<td class="cel_user"><?php echo $libitem->f_user; ?></td>
|
||||||
<td class="cel_creation_date"><?php echo $share->f_creation_date; ?></td>
|
<td class="cel_creation_date"><?php echo $libitem->f_creation_date; ?></td>
|
||||||
<td class="cel_lastvisit_date"><?php echo $share->f_lastvisit_date; ?></td>
|
<td class="cel_lastvisit_date"><?php echo $libitem->f_lastvisit_date; ?></td>
|
||||||
<td class="cel_counter"><?php echo $share->counter; ?></td>
|
<td class="cel_counter"><?php echo $libitem->counter; ?></td>
|
||||||
<td class="cel_max_counter"><?php echo $share->max_counter; ?></td>
|
<td class="cel_max_counter"><?php echo $libitem->max_counter; ?></td>
|
||||||
<td class="cel_allow_stream"><?php echo $share->f_allow_stream; ?></td>
|
<td class="cel_allow_stream"><?php echo $libitem->f_allow_stream; ?></td>
|
||||||
<td class="cel_allow_download"><?php echo $share->f_allow_download; ?></td>
|
<td class="cel_allow_download"><?php echo $libitem->f_allow_download; ?></td>
|
||||||
<td class="cel_expire"><?php echo $share->expire_days; ?></td>
|
<td class="cel_expire"><?php echo $libitem->expire_days; ?></td>
|
||||||
<td class="cel_public_url"><?php echo $share->public_url; ?></td>
|
<td class="cel_public_url"><?php echo $libitem->public_url; ?></td>
|
||||||
<td class="cel_action">
|
<td class="cel_action">
|
||||||
<div id="share_action_<?php echo $share->id; ?>">
|
<div id="share_action_<?php echo $libitem->id; ?>">
|
||||||
<?php
|
<?php
|
||||||
$share->show_action_buttons();
|
$libitem->show_action_buttons();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -40,10 +40,10 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ($object_ids as $share_id) {
|
foreach ($object_ids as $share_id) {
|
||||||
$share = new Share($share_id);
|
$libitem = new Share($share_id);
|
||||||
$share->format();
|
$libitem->format();
|
||||||
?>
|
?>
|
||||||
<tr id="share_<?php echo $share->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
<tr id="share_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_shared_object_row.inc.php'; ?>
|
<?php require AmpConfig::get('prefix') . '/templates/show_shared_object_row.inc.php'; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -20,17 +20,17 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<tr id="flagged_<?php echo $shout->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
<tr id="flagged_<?php echo $libitem->id; ?>" class="<?php echo UI::flip_class(); ?>">
|
||||||
<td class="cel_object"><?php echo $object->f_link; ?></td>
|
<td class="cel_object"><?php echo $object->f_link; ?></td>
|
||||||
<td class="cel_username"><?php echo $client->f_link; ?></td>
|
<td class="cel_username"><?php echo $client->f_link; ?></td>
|
||||||
<td class="cel_sticky"><?php echo $shout->sticky; ?></td>
|
<td class="cel_sticky"><?php echo $libitem->sticky; ?></td>
|
||||||
<td class="cel_comment"><?php echo scrub_out($shout->text); ?></td>
|
<td class="cel_comment"><?php echo scrub_out($libitem->text); ?></td>
|
||||||
<td class="cel_date"><?php echo $shout->date; ?></td>
|
<td class="cel_date"><?php echo $libitem->date; ?></td>
|
||||||
<td class="cel_action">
|
<td class="cel_action">
|
||||||
<a href="<?php echo $web_path; ?>/admin/shout.php?action=show_edit&shout_id=<?php echo $shout->id; ?>">
|
<a href="<?php echo $web_path; ?>/admin/shout.php?action=show_edit&shout_id=<?php echo $libitem->id; ?>">
|
||||||
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="<?php echo $web_path; ?>/admin/shout.php?action=delete&shout_id=<?php echo $shout->id; ?>">
|
<a href="<?php echo $web_path; ?>/admin/shout.php?action=delete&shout_id=<?php echo $libitem->id; ?>">
|
||||||
<?php echo UI::get_icon('delete', T_('Delete')); ?>
|
<?php echo UI::get_icon('delete', T_('Delete')); ?>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -1,60 +0,0 @@
|
||||||
<?php
|
|
||||||
/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* LICENSE: GNU General Public License, version 2 (GPLv2)
|
|
||||||
* Copyright 2001 - 2014 Ampache.org
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License v2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
ob_start();
|
|
||||||
require AmpConfig::get('prefix') . '/templates/show_smartplaylist_title.inc.php';
|
|
||||||
$title = ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
UI::show_box_top('<div id="smartplaylist_row_' . $playlist->id . '">' . $title . '</div>' , 'box box_smartplaylist');
|
|
||||||
?>
|
|
||||||
<div id="information_actions">
|
|
||||||
<ul>
|
|
||||||
<?php if (Access::check_function('batch_download')) { ?>
|
|
||||||
<li>
|
|
||||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/batch.php?action=smartplaylist&id=<?php echo $playlist->id; ?>"><?php echo UI::get_icon('batch_download', T_('Batch Download')); ?></a>
|
|
||||||
<?php echo T_('Batch Download'); ?>
|
|
||||||
</li>
|
|
||||||
<?php } ?>
|
|
||||||
<li>
|
|
||||||
<?php echo Ajax::button('?action=basket&type=smartplaylist&id=' . $playlist->id,'add', T_('Add All'),'play_playlist'); ?>
|
|
||||||
<?php echo T_('Add All'); ?>
|
|
||||||
</li>
|
|
||||||
<?php if ($playlist->has_access()) { ?>
|
|
||||||
<li>
|
|
||||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/smartplaylist.php?action=delete_playlist&playlist_id=<?php echo $playlist->id; ?>">
|
|
||||||
<?php echo UI::get_icon('delete'); ?>
|
|
||||||
</a>
|
|
||||||
<?php echo T_('Delete'); ?>
|
|
||||||
</li>
|
|
||||||
<?php } ?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form id="editplaylist" name="editplaylist" method="post" action="<?php echo AmpConfig::get('web_path'); ?>/smartplaylist.php?action=update_playlist&playlist_id=<?php echo $playlist->id; ?>" enctype="multipart/form-data" style="Display:inline">
|
|
||||||
<?php require AmpConfig::get('prefix') . '/templates/show_rules.inc.php'; ?>
|
|
||||||
<div class="formValidation">
|
|
||||||
<input class="button" type="submit" value="<?php echo T_('Save Changes'); ?>" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php UI::show_box_bottom(); ?>
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue