mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 02:39:47 +02:00
Switch from _() to T_()
Even if we move away from php-gettext in the future, it's easy to write a quick T_() as a simple wrapper; it's not so easy to rewrite PHP to allow redeclaration of a function.
This commit is contained in:
parent
15457b16f1
commit
f65076b93d
220 changed files with 1782 additions and 1782 deletions
|
@ -43,12 +43,12 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
Access::delete($_REQUEST['access_id']);
|
Access::delete($_REQUEST['access_id']);
|
||||||
$url = Config::get('web_path') . '/admin/access.php';
|
$url = Config::get('web_path') . '/admin/access.php';
|
||||||
show_confirmation(_('Deleted'),_('Your Access List Entry has been removed'),$url);
|
show_confirmation(T_('Deleted'), T_('Your Access List Entry has been removed'),$url);
|
||||||
break;
|
break;
|
||||||
case 'show_delete_record':
|
case 'show_delete_record':
|
||||||
if (Config::get('demo_mode')) { break; }
|
if (Config::get('demo_mode')) { break; }
|
||||||
$access = new Access($_GET['access_id']);
|
$access = new Access($_GET['access_id']);
|
||||||
show_confirmation(_('Deletion Request'),_('Are you sure you want to permanently delete') . ' ' . $access->name,
|
show_confirmation(T_('Deletion Request'), T_('Are you sure you want to permanently delete') . ' ' . $access->name,
|
||||||
'admin/access.php?action=delete_record&access_id=' . $access->id,1,'delete_access');
|
'admin/access.php?action=delete_record&access_id=' . $access->id,1,'delete_access');
|
||||||
break;
|
break;
|
||||||
case 'add_host':
|
case 'add_host':
|
||||||
|
@ -107,7 +107,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
if (!Error::occurred()) {
|
if (!Error::occurred()) {
|
||||||
$url = Config::get('web_path') . '/admin/access.php';
|
$url = Config::get('web_path') . '/admin/access.php';
|
||||||
show_confirmation(_('Added'),_('Your new Access Control List(s) have been created'),$url);
|
show_confirmation(T_('Added'), T_('Your new Access Control List(s) have been created'),$url);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch ($_GET['method']) {
|
switch ($_GET['method']) {
|
||||||
|
@ -127,7 +127,7 @@ switch ($_REQUEST['action']) {
|
||||||
$access = new Access($_REQUEST['access_id']);
|
$access = new Access($_REQUEST['access_id']);
|
||||||
$access->update($_POST);
|
$access->update($_POST);
|
||||||
if (!Error::occurred()) {
|
if (!Error::occurred()) {
|
||||||
show_confirmation(_('Updated'),_('Access List Entry updated'), Config::get('web_path').'/admin/access.php');
|
show_confirmation(T_('Updated'), T_('Access List Entry updated'), Config::get('web_path').'/admin/access.php');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$access->format();
|
$access->format();
|
||||||
|
|
|
@ -57,7 +57,7 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$url = Config::get('web_path') . '/admin/catalog.php';
|
$url = Config::get('web_path') . '/admin/catalog.php';
|
||||||
$title = _('Catalog Updated');
|
$title = T_('Catalog Updated');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
toggle_visible('ajax-loading');
|
toggle_visible('ajax-loading');
|
||||||
|
@ -77,7 +77,7 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$url = Config::get('web_path') . '/admin/catalog.php';
|
$url = Config::get('web_path') . '/admin/catalog.php';
|
||||||
$title = _('Catalog Updated');
|
$title = T_('Catalog Updated');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
toggle_visible('ajax-loading');
|
toggle_visible('ajax-loading');
|
||||||
|
@ -103,7 +103,7 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
Catalog::optimize_tables();
|
Catalog::optimize_tables();
|
||||||
$url = Config::get('web_path') . '/admin/catalog.php';
|
$url = Config::get('web_path') . '/admin/catalog.php';
|
||||||
$title = _('Catalog Updated');
|
$title = T_('Catalog Updated');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
toggle_visible('ajax-loading');
|
toggle_visible('ajax-loading');
|
||||||
|
@ -120,13 +120,13 @@ switch ($_REQUEST['action']) {
|
||||||
/* Delete the sucker, we don't need to check perms as thats done above */
|
/* Delete the sucker, we don't need to check perms as thats done above */
|
||||||
Catalog::delete($_GET['catalog_id']);
|
Catalog::delete($_GET['catalog_id']);
|
||||||
$next_url = Config::get('web_path') . '/admin/catalog.php';
|
$next_url = Config::get('web_path') . '/admin/catalog.php';
|
||||||
show_confirmation(_('Catalog Deleted'),_('The Catalog and all associated records have been deleted'),$next_url);
|
show_confirmation(T_('Catalog Deleted'), T_('The Catalog and all associated records have been deleted'),$next_url);
|
||||||
break;
|
break;
|
||||||
case 'show_delete_catalog':
|
case 'show_delete_catalog':
|
||||||
$catalog_id = scrub_in($_GET['catalog_id']);
|
$catalog_id = scrub_in($_GET['catalog_id']);
|
||||||
|
|
||||||
$next_url = Config::get('web_path') . '/admin/catalog.php?action=delete_catalog&catalog_id=' . scrub_out($catalog_id);
|
$next_url = Config::get('web_path') . '/admin/catalog.php?action=delete_catalog&catalog_id=' . scrub_out($catalog_id);
|
||||||
show_confirmation(_('Catalog Delete'),_('Confirm Deletion Request'),$next_url,1,'delete_catalog');
|
show_confirmation(T_('Catalog Delete'), T_('Confirm Deletion Request'),$next_url,1,'delete_catalog');
|
||||||
break;
|
break;
|
||||||
case 'remove_disabled':
|
case 'remove_disabled':
|
||||||
if (conf('demo_mode')) { break; }
|
if (conf('demo_mode')) { break; }
|
||||||
|
@ -138,7 +138,7 @@ switch ($_REQUEST['action']) {
|
||||||
$body = ngettext('Song Removed', 'Songs Removed', count($song));
|
$body = ngettext('Song Removed', 'Songs Removed', count($song));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$body = _('No Songs Removed');
|
$body = T_('No Songs Removed');
|
||||||
}
|
}
|
||||||
$url = Config::get('web_path') . '/admin/catalog.php';
|
$url = Config::get('web_path') . '/admin/catalog.php';
|
||||||
$title = ngettext('Disabled Song Processed','Disabled Songs Processed',count($song));
|
$title = ngettext('Disabled Song Processed','Disabled Songs Processed',count($song));
|
||||||
|
@ -163,7 +163,7 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = Config::get('web_path') . '/admin/catalog.php';
|
$url = Config::get('web_path') . '/admin/catalog.php';
|
||||||
$title = _('Catalog Cleaned');
|
$title = T_('Catalog Cleaned');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
toggle_visible('ajax-loading');
|
toggle_visible('ajax-loading');
|
||||||
|
@ -176,7 +176,7 @@ switch ($_REQUEST['action']) {
|
||||||
Catalog::update_settings($_POST);
|
Catalog::update_settings($_POST);
|
||||||
|
|
||||||
$url = Config::get('web_path') . '/admin/catalog.php';
|
$url = Config::get('web_path') . '/admin/catalog.php';
|
||||||
$title = _('Catalog Updated');
|
$title = T_('Catalog Updated');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
break;
|
break;
|
||||||
|
@ -207,14 +207,14 @@ switch ($_REQUEST['action']) {
|
||||||
ob_end_flush();
|
ob_end_flush();
|
||||||
|
|
||||||
if (!strlen($_POST['path']) || !strlen($_POST['name'])) {
|
if (!strlen($_POST['path']) || !strlen($_POST['name'])) {
|
||||||
Error::add('general',_('Error: Name and path not specified'));
|
Error::add('general', T_('Error: Name and path not specified'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (substr($_POST['path'],0,7) != 'http://' && $_POST['type'] == 'remote') {
|
if (substr($_POST['path'],0,7) != 'http://' && $_POST['type'] == 'remote') {
|
||||||
Error::add('general',_('Error: Remote selected, but path is not a URL'));
|
Error::add('general', T_('Error: Remote selected, but path is not a URL'));
|
||||||
}
|
}
|
||||||
if ($POST['type'] == 'remote' AND (!strlen($POST['remote_username']) OR !strlen($POST['remote_password']))) {
|
if ($POST['type'] == 'remote' AND (!strlen($POST['remote_username']) OR !strlen($POST['remote_password']))) {
|
||||||
Error::add('general',_('Error: Username and Password Required for Remote Catalogs'));
|
Error::add('general', T_('Error: Username and Password Required for Remote Catalogs'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Core::form_verify('add_catalog','post')) {
|
if (!Core::form_verify('add_catalog','post')) {
|
||||||
|
@ -224,7 +224,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
// Make sure that there isn't a catalog with a directory above this one
|
// Make sure that there isn't a catalog with a directory above this one
|
||||||
if (Catalog::get_from_path($_POST['path'])) {
|
if (Catalog::get_from_path($_POST['path'])) {
|
||||||
Error::add('general',_('Error: Defined Path is inside an existing catalog'));
|
Error::add('general', T_('Error: Defined Path is inside an existing catalog'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If an error hasn't occured
|
// If an error hasn't occured
|
||||||
|
@ -242,8 +242,8 @@ switch ($_REQUEST['action']) {
|
||||||
// Run our initial add
|
// Run our initial add
|
||||||
$catalog->run_add($_POST);
|
$catalog->run_add($_POST);
|
||||||
|
|
||||||
show_box_top(_('Catalog Created'), 'box box_catalog_created');
|
show_box_top(T_('Catalog Created'), 'box box_catalog_created');
|
||||||
echo "<h2>" . _('Catalog Created') . "</h2>";
|
echo "<h2>" . T_('Catalog Created') . "</h2>";
|
||||||
Error::display('general');
|
Error::display('general');
|
||||||
Error::display('catalog_add');
|
Error::display('catalog_add');
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
|
@ -260,7 +260,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
Catalog::clear_stats();
|
Catalog::clear_stats();
|
||||||
$url = Config::get('web_path') . '/admin/catalog.php';
|
$url = Config::get('web_path') . '/admin/catalog.php';
|
||||||
$title = _('Catalog statistics cleared');
|
$title = T_('Catalog statistics cleared');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
break;
|
break;
|
||||||
|
@ -274,7 +274,7 @@ switch ($_REQUEST['action']) {
|
||||||
case 'clear_now_playing':
|
case 'clear_now_playing':
|
||||||
if (Config::get('demo_mode')) { access_denied(); break; }
|
if (Config::get('demo_mode')) { access_denied(); break; }
|
||||||
Stream::clear_now_playing();
|
Stream::clear_now_playing();
|
||||||
show_confirmation(_('Now Playing Cleared'),_('All now playing data has been cleared'),Config::get('web_path') . '/admin/catalog.php');
|
show_confirmation(T_('Now Playing Cleared'), T_('All now playing data has been cleared'),Config::get('web_path') . '/admin/catalog.php');
|
||||||
break;
|
break;
|
||||||
case 'show_disabled':
|
case 'show_disabled':
|
||||||
/* Stop the demo hippies */
|
/* Stop the demo hippies */
|
||||||
|
@ -285,7 +285,7 @@ switch ($_REQUEST['action']) {
|
||||||
require (conf('prefix') . '/templates/show_disabled_songs.inc.php');
|
require (conf('prefix') . '/templates/show_disabled_songs.inc.php');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<div class=\"error\" align=\"center\">" . _('No Disabled songs found') . "</div>";
|
echo "<div class=\"error\" align=\"center\">" . T_('No Disabled songs found') . "</div>";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'show_delete_catalog':
|
case 'show_delete_catalog':
|
||||||
|
@ -294,7 +294,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
$catalog = new Catalog($_REQUEST['catalog_id']);
|
$catalog = new Catalog($_REQUEST['catalog_id']);
|
||||||
$nexturl = Config::get('web_path') . '/admin/catalog.php?action=delete_catalog&catalog_id=' . scrub_out($_REQUEST['catalog_id']);
|
$nexturl = Config::get('web_path') . '/admin/catalog.php?action=delete_catalog&catalog_id=' . scrub_out($_REQUEST['catalog_id']);
|
||||||
show_confirmation(_('Delete Catalog'),_('Do you really want to delete this catalog?') . " -- $catalog->name ($catalog->path)",$nexturl,1);
|
show_confirmation(T_('Delete Catalog'), T_('Do you really want to delete this catalog?') . " -- $catalog->name ($catalog->path)",$nexturl,1);
|
||||||
break;
|
break;
|
||||||
case 'show_customize_catalog':
|
case 'show_customize_catalog':
|
||||||
$catalog = new Catalog($_REQUEST['catalog_id']);
|
$catalog = new Catalog($_REQUEST['catalog_id']);
|
||||||
|
@ -314,7 +314,7 @@ switch ($_REQUEST['action']) {
|
||||||
$catalog->get_art('',1);
|
$catalog->get_art('',1);
|
||||||
}
|
}
|
||||||
$url = Config::get('web_path') . '/admin/catalog.php';
|
$url = Config::get('web_path') . '/admin/catalog.php';
|
||||||
$title = _('Album Art Search Finished');
|
$title = T_('Album Art Search Finished');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -84,7 +84,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
if (isset($cleaned['artist']) || isset($cleaned['album'])) { $_SESSION['source'] = Config::get('web_path') . '/index.php'; }
|
if (isset($cleaned['artist']) || isset($cleaned['album'])) { $_SESSION['source'] = Config::get('web_path') . '/index.php'; }
|
||||||
|
|
||||||
show_confirmation(_('Song Updated'),_('The requested song has been updated'),$_SESSION['source']);
|
show_confirmation(T_('Song Updated'), T_('The requested song has been updated'),$_SESSION['source']);
|
||||||
break;
|
break;
|
||||||
// Show the page for editing a full album
|
// Show the page for editing a full album
|
||||||
case 'show_edit_album':
|
case 'show_edit_album':
|
||||||
|
@ -126,7 +126,7 @@ switch ($_REQUEST['action']) {
|
||||||
// Clean out the old album
|
// Clean out the old album
|
||||||
$catalog->clean_albums();
|
$catalog->clean_albums();
|
||||||
|
|
||||||
show_confirmation(_('Album Updated'),'',Config::get('web_path') . '/admin/index.php');
|
show_confirmation(T_('Album Updated'),'',Config::get('web_path') . '/admin/index.php');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
// Show the page for editing a full artist
|
// Show the page for editing a full artist
|
||||||
|
@ -168,7 +168,7 @@ switch ($_REQUEST['action']) {
|
||||||
// Clean out the old artist(s)
|
// Clean out the old artist(s)
|
||||||
$catalog->clean_artists();
|
$catalog->clean_artists();
|
||||||
|
|
||||||
show_confirmation(_('Artist Updated'),'',Config::get('web_path') . '/admin/index.php');
|
show_confirmation(T_('Artist Updated'),'',Config::get('web_path') . '/admin/index.php');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
/* Done by 'Select' code passes array of song ids */
|
/* Done by 'Select' code passes array of song ids */
|
||||||
|
@ -229,7 +229,7 @@ switch ($_REQUEST['action']) {
|
||||||
} // end foreach songs
|
} // end foreach songs
|
||||||
|
|
||||||
// Show a confirmation that this worked
|
// Show a confirmation that this worked
|
||||||
show_confirmation(_('Songs Updated'),'',return_referer());
|
show_confirmation(T_('Songs Updated'),'',return_referer());
|
||||||
break;
|
break;
|
||||||
case 'reject_flag':
|
case 'reject_flag':
|
||||||
$flag_id = scrub_in($_REQUEST['flag_id']);
|
$flag_id = scrub_in($_REQUEST['flag_id']);
|
||||||
|
@ -237,8 +237,8 @@ switch ($_REQUEST['action']) {
|
||||||
$flag->delete_flag();
|
$flag->delete_flag();
|
||||||
$flag->format_name();
|
$flag->format_name();
|
||||||
$url = return_referer();
|
$url = return_referer();
|
||||||
$title = _('Flag Removed');
|
$title = T_('Flag Removed');
|
||||||
$body = _('Flag Removed from') . " " . $flag->name;
|
$body = T_('Flag Removed from') . " " . $flag->name;
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
break;
|
break;
|
||||||
case 'reject_flags':
|
case 'reject_flags':
|
||||||
|
@ -253,7 +253,7 @@ switch ($_REQUEST['action']) {
|
||||||
$flag->approve();
|
$flag->approve();
|
||||||
}
|
}
|
||||||
} // end foreach flags
|
} // end foreach flags
|
||||||
$title = _('Flags Updated');
|
$title = T_('Flags Updated');
|
||||||
show_confirmation($title,'',return_referer());
|
show_confirmation($title,'',return_referer());
|
||||||
break;
|
break;
|
||||||
case 'show_edit_song':
|
case 'show_edit_song':
|
||||||
|
@ -272,7 +272,7 @@ switch ($_REQUEST['action']) {
|
||||||
$song_obj->update_enabled(0,$song_id);
|
$song_obj->update_enabled(0,$song_id);
|
||||||
} // end foreach
|
} // end foreach
|
||||||
} // end else
|
} // end else
|
||||||
show_confirmation(_('Songs Disabled'),_('The requested song(s) have been disabled'),return_referer());
|
show_confirmation(T_('Songs Disabled'), T_('The requested song(s) have been disabled'),return_referer());
|
||||||
break;
|
break;
|
||||||
case 'enabled':
|
case 'enabled':
|
||||||
$song_obj = new Song();
|
$song_obj = new Song();
|
||||||
|
@ -283,7 +283,7 @@ switch ($_REQUEST['action']) {
|
||||||
$song_obj->update_enabled(1,$song_id);
|
$song_obj->update_enabled(1,$song_id);
|
||||||
} // end foreach
|
} // end foreach
|
||||||
} // end else
|
} // end else
|
||||||
show_confirmation(_('Songs Enabled'),_('The requested song(s) have been enabled'),return_referer());
|
show_confirmation(T_('Songs Enabled'), T_('The requested song(s) have been enabled'),return_referer());
|
||||||
break;
|
break;
|
||||||
case 'show_disabled':
|
case 'show_disabled':
|
||||||
$disabled = Flag::get_disabled();
|
$disabled = Flag::get_disabled();
|
||||||
|
|
|
@ -64,12 +64,12 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($mailer->send_to_group($_REQUEST['to'])) {
|
if($mailer->send_to_group($_REQUEST['to'])) {
|
||||||
$title = _('E-mail Sent');
|
$title = T_('E-mail Sent');
|
||||||
$body = _('Your E-mail was successfully sent.');
|
$body = T_('Your E-mail was successfully sent.');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$title = _('E-mail Not Sent');
|
$title = T_('E-mail Not Sent');
|
||||||
$body = _('Your E-mail was not sent.');
|
$body = T_('Your E-mail was not sent.');
|
||||||
}
|
}
|
||||||
$url = Config::get('web_path') . '/admin/mail.php';
|
$url = Config::get('web_path') . '/admin/mail.php';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
|
|
|
@ -41,7 +41,7 @@ switch ($_REQUEST['action']) {
|
||||||
case 'install_localplay':
|
case 'install_localplay':
|
||||||
$localplay = new Localplay($_REQUEST['type']);
|
$localplay = new Localplay($_REQUEST['type']);
|
||||||
if (!$localplay->player_loaded()) {
|
if (!$localplay->player_loaded()) {
|
||||||
Error::add('general',_('Install Failed, Controller Error'));
|
Error::add('general', T_('Install Failed, Controller Error'));
|
||||||
Error::display('general');
|
Error::display('general');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ switch ($_REQUEST['action']) {
|
||||||
case 'confirm_uninstall_localplay':
|
case 'confirm_uninstall_localplay':
|
||||||
$type = scrub_in($_REQUEST['type']);
|
$type = scrub_in($_REQUEST['type']);
|
||||||
$url = Config::get('web_path') . '/admin/modules.php?action=uninstall_localplay&type=' . $type;
|
$url = Config::get('web_path') . '/admin/modules.php?action=uninstall_localplay&type=' . $type;
|
||||||
$title = _('Are you sure you want to remove this plugin?');
|
$title = T_('Are you sure you want to remove this plugin?');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url,1);
|
show_confirmation($title,$body,$url,1);
|
||||||
break;
|
break;
|
||||||
|
@ -71,7 +71,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
/* Show Confirmation */
|
/* Show Confirmation */
|
||||||
$url = Config::get('web_path') . '/admin/modules.php?action=show_localplay';
|
$url = Config::get('web_path') . '/admin/modules.php?action=show_localplay';
|
||||||
$title = _('Plugin Deactivated');
|
$title = T_('Plugin Deactivated');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
break;
|
break;
|
||||||
|
@ -86,7 +86,7 @@ switch ($_REQUEST['action']) {
|
||||||
if (!$plugin->install()) {
|
if (!$plugin->install()) {
|
||||||
debug_event('plugins','Error: Plugin Install Failed, ' . $_REQUEST['plugin'],'1');
|
debug_event('plugins','Error: Plugin Install Failed, ' . $_REQUEST['plugin'],'1');
|
||||||
$url = Config::get('web_path') . '/admin/modules.php?action=show_plugins';
|
$url = Config::get('web_path') . '/admin/modules.php?action=show_plugins';
|
||||||
$title = _('Unable to Install Plugin');
|
$title = T_('Unable to Install Plugin');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
break;
|
break;
|
||||||
|
@ -97,14 +97,14 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
/* Show Confirmation */
|
/* Show Confirmation */
|
||||||
$url = Config::get('web_path') . '/admin/modules.php?action=show_plugins';
|
$url = Config::get('web_path') . '/admin/modules.php?action=show_plugins';
|
||||||
$title = _('Plugin Activated');
|
$title = T_('Plugin Activated');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
break;
|
break;
|
||||||
case 'confirm_uninstall_plugin':
|
case 'confirm_uninstall_plugin':
|
||||||
$plugin = scrub_in($_REQUEST['plugin']);
|
$plugin = scrub_in($_REQUEST['plugin']);
|
||||||
$url = Config::get('web_path') . '/admin/modules.php?action=uninstall_plugin&plugin=' . $plugin;
|
$url = Config::get('web_path') . '/admin/modules.php?action=uninstall_plugin&plugin=' . $plugin;
|
||||||
$title = _('Are you sure you want to remove this plugin?');
|
$title = T_('Are you sure you want to remove this plugin?');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url,1);
|
show_confirmation($title,$body,$url,1);
|
||||||
break;
|
break;
|
||||||
|
@ -123,7 +123,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
/* Show Confirmation */
|
/* Show Confirmation */
|
||||||
$url = Config::get('web_path') . '/admin/modules.php?action=show_plugins';
|
$url = Config::get('web_path') . '/admin/modules.php?action=show_plugins';
|
||||||
$title = _('Plugin Deactivated');
|
$title = T_('Plugin Deactivated');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
break;
|
break;
|
||||||
|
@ -138,19 +138,19 @@ switch ($_REQUEST['action']) {
|
||||||
$plugin->upgrade();
|
$plugin->upgrade();
|
||||||
User::rebuild_all_preferences();
|
User::rebuild_all_preferences();
|
||||||
$url = Config::get('web_path') . '/admin/modules.php?action=show_plugins';
|
$url = Config::get('web_path') . '/admin/modules.php?action=show_plugins';
|
||||||
$title = _('Plugin Upgraded');
|
$title = T_('Plugin Upgraded');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title, $body, $url);
|
show_confirmation($title, $body, $url);
|
||||||
break;
|
break;
|
||||||
case 'show_plugins':
|
case 'show_plugins':
|
||||||
$plugins = Plugin::get_plugins();
|
$plugins = Plugin::get_plugins();
|
||||||
show_box_top(_('Plugins'), 'box box_localplay_plugins');
|
show_box_top(T_('Plugins'), 'box box_localplay_plugins');
|
||||||
require_once Config::get('prefix') . '/templates/show_plugins.inc.php';
|
require_once Config::get('prefix') . '/templates/show_plugins.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'show_localplay':
|
case 'show_localplay':
|
||||||
$controllers = Localplay::get_controllers();
|
$controllers = Localplay::get_controllers();
|
||||||
show_box_top(_('Localplay Controllers'), 'box box_localplay_controllers');
|
show_box_top(T_('Localplay Controllers'), 'box box_localplay_controllers');
|
||||||
require_once Config::get('prefix') . '/templates/show_localplay_controllers.inc.php';
|
require_once Config::get('prefix') . '/templates/show_localplay_controllers.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -40,7 +40,7 @@ switch ($_REQUEST['action']) {
|
||||||
case 'edit_shout':
|
case 'edit_shout':
|
||||||
$shout_id = $_POST['shout_id'];
|
$shout_id = $_POST['shout_id'];
|
||||||
$update = shoutBox::update($_POST);
|
$update = shoutBox::update($_POST);
|
||||||
show_confirmation(_('Shoutbox Post Updated'),'',Config::get('web_path').'/admin/shout.php');
|
show_confirmation(T_('Shoutbox Post Updated'),'',Config::get('web_path').'/admin/shout.php');
|
||||||
break;
|
break;
|
||||||
case 'show_edit':
|
case 'show_edit':
|
||||||
$shout = new shoutBox($_REQUEST['shout_id']);
|
$shout = new shoutBox($_REQUEST['shout_id']);
|
||||||
|
@ -52,7 +52,7 @@ switch ($_REQUEST['action']) {
|
||||||
break;
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
$shout_id = shoutBox::delete($_REQUEST['shout_id']);
|
$shout_id = shoutBox::delete($_REQUEST['shout_id']);
|
||||||
show_confirmation(_('Shoutbox Post Deleted'),'',Config::get('web_path').'/admin/shout.php');
|
show_confirmation(T_('Shoutbox Post Deleted'),'',Config::get('web_path').'/admin/shout.php');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$browse = new Browse();
|
$browse = new Browse();
|
||||||
|
|
|
@ -51,7 +51,7 @@ switch ($_REQUEST['action']) {
|
||||||
break;
|
break;
|
||||||
case 'reset_db_charset':
|
case 'reset_db_charset':
|
||||||
Dba::reset_db_charset();
|
Dba::reset_db_charset();
|
||||||
show_confirmation(_('Database Charset Updated'),_('Your Database and associated tables have been updated to match your currently configured charset'), Config::get('web_path').'/admin/system.php?action=show_debug');
|
show_confirmation(T_('Database Charset Updated'), T_('Your Database and associated tables have been updated to match your currently configured charset'), Config::get('web_path').'/admin/system.php?action=show_debug');
|
||||||
break;
|
break;
|
||||||
case 'show_debug':
|
case 'show_debug':
|
||||||
$configuration = Config::get_all();
|
$configuration = Config::get_all();
|
||||||
|
|
|
@ -59,10 +59,10 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
/* Verify Input */
|
/* Verify Input */
|
||||||
if (empty($username)) {
|
if (empty($username)) {
|
||||||
Error::add('username',_("Error Username Required"));
|
Error::add('username', T_("Error Username Required"));
|
||||||
}
|
}
|
||||||
if ($pass1 !== $pass2 && !empty($pass1)) {
|
if ($pass1 !== $pass2 && !empty($pass1)) {
|
||||||
Error::add('password',_("Error Passwords don't match"));
|
Error::add('password', T_("Error Passwords don't match"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we've got an error then break! */
|
/* If we've got an error then break! */
|
||||||
|
@ -87,7 +87,7 @@ switch ($_REQUEST['action']) {
|
||||||
$client->update_password($pass1);
|
$client->update_password($pass1);
|
||||||
}
|
}
|
||||||
|
|
||||||
show_confirmation(_('User Updated'), $client->fullname . "(" . $client->username . ")" . _('updated'), Config::get('web_path'). '/admin/users.php');
|
show_confirmation(T_('User Updated'), $client->fullname . "(" . $client->username . ")" . T_('updated'), Config::get('web_path'). '/admin/users.php');
|
||||||
break;
|
break;
|
||||||
case 'add_user':
|
case 'add_user':
|
||||||
if (Config::get('demo_mode')) { break; }
|
if (Config::get('demo_mode')) { break; }
|
||||||
|
@ -105,23 +105,23 @@ switch ($_REQUEST['action']) {
|
||||||
$pass2 = $_POST['password_2'];
|
$pass2 = $_POST['password_2'];
|
||||||
|
|
||||||
if ($pass1 !== $pass2 || !strlen($pass1)) {
|
if ($pass1 !== $pass2 || !strlen($pass1)) {
|
||||||
Error::add('password',_("Error Passwords don't match"));
|
Error::add('password', T_("Error Passwords don't match"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($username)) {
|
if (empty($username)) {
|
||||||
Error::add('username',_('Error Username Required'));
|
Error::add('username', T_('Error Username Required'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make sure the username doesn't already exist */
|
/* make sure the username doesn't already exist */
|
||||||
if (!User::check_username($username)) {
|
if (!User::check_username($username)) {
|
||||||
Error::add('username',_('Error Username already exists'));
|
Error::add('username', T_('Error Username already exists'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Error::occurred()) {
|
if (!Error::occurred()) {
|
||||||
/* Attempt to create the user */
|
/* Attempt to create the user */
|
||||||
$user_id = User::create($username, $fullname, $email, $pass1, $access);
|
$user_id = User::create($username, $fullname, $email, $pass1, $access);
|
||||||
if (!$user_id) {
|
if (!$user_id) {
|
||||||
Error::add('general',_("Error: Insert Failed"));
|
Error::add('general', T_("Error: Insert Failed"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // if no errors
|
} // if no errors
|
||||||
|
@ -129,25 +129,25 @@ switch ($_REQUEST['action']) {
|
||||||
$_REQUEST['action'] = 'show_add_user';
|
$_REQUEST['action'] = 'show_add_user';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ($access == 5){ $access = _('Guest');}
|
if ($access == 5){ $access = T_('Guest');}
|
||||||
elseif ($access == 25){ $access = _('User');}
|
elseif ($access == 25){ $access = T_('User');}
|
||||||
elseif ($access == 100){ $access = _('Admin');}
|
elseif ($access == 100){ $access = T_('Admin');}
|
||||||
|
|
||||||
/* HINT: %1 Username, %2 Access num */
|
/* HINT: %1 Username, %2 Access num */
|
||||||
show_confirmation(_('New User Added'),sprintf(_('%1$s has been created with an access level of %2$s'), $username, $access), Config::get('web_path').'/admin/users.php');
|
show_confirmation(T_('New User Added'),sprintf(T_('%1$s has been created with an access level of %2$s'), $username, $access), Config::get('web_path').'/admin/users.php');
|
||||||
break;
|
break;
|
||||||
case 'enable':
|
case 'enable':
|
||||||
$client = new User($_REQUEST['user_id']);
|
$client = new User($_REQUEST['user_id']);
|
||||||
$client->enable();
|
$client->enable();
|
||||||
show_confirmation(_('User Enabled'),$client->fullname . ' (' . $client->username . ')', Config::get('web_path'). '/admin/users.php');
|
show_confirmation(T_('User Enabled'),$client->fullname . ' (' . $client->username . ')', Config::get('web_path'). '/admin/users.php');
|
||||||
break;
|
break;
|
||||||
case 'disable':
|
case 'disable':
|
||||||
$client = new User($_REQUEST['user_id']);
|
$client = new User($_REQUEST['user_id']);
|
||||||
if ($client->disable()) {
|
if ($client->disable()) {
|
||||||
show_confirmation(_('User Disabled'),$client->fullname . ' (' . $client->username . ')', Config::get('web_path'). '/admin/users.php');
|
show_confirmation(T_('User Disabled'),$client->fullname . ' (' . $client->username . ')', Config::get('web_path'). '/admin/users.php');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
show_confirmation(_('Error'),_('Unable to Disabled last Administrator'), Config::get('web_path').'/admin/users.php');
|
show_confirmation(T_('Error'), T_('Unable to Disabled last Administrator'), Config::get('web_path').'/admin/users.php');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'show_edit':
|
case 'show_edit':
|
||||||
|
@ -163,17 +163,17 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
$client = new User($_REQUEST['user_id']);
|
$client = new User($_REQUEST['user_id']);
|
||||||
if ($client->delete()) {
|
if ($client->delete()) {
|
||||||
show_confirmation(_('User Deleted'), sprintf(_('%s has been Deleted'), $client->username), Config::get('web_path'). "/admin/users.php");
|
show_confirmation(T_('User Deleted'), sprintf(T_('%s has been Deleted'), $client->username), Config::get('web_path'). "/admin/users.php");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
show_confirmation(_('Delete Error'), _("Unable to delete last Admin User"), Config::get('web_path')."/admin/users.php");
|
show_confirmation(T_('Delete Error'), T_("Unable to delete last Admin User"), Config::get('web_path')."/admin/users.php");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
if (Config::get('demo_mode')) { break; }
|
if (Config::get('demo_mode')) { break; }
|
||||||
$client = new User($_REQUEST['user_id']);
|
$client = new User($_REQUEST['user_id']);
|
||||||
show_confirmation(_('Deletion Request'),
|
show_confirmation(T_('Deletion Request'),
|
||||||
sprintf(_('Are you sure you want to permanently delete %s?'), $client->fullname),
|
sprintf(T_('Are you sure you want to permanently delete %s?'), $client->fullname),
|
||||||
Config::get('web_path')."/admin/users.php?action=confirm_delete&user_id=" . $_REQUEST['user_id'],1,'delete_user');
|
Config::get('web_path')."/admin/users.php?action=confirm_delete&user_id=" . $_REQUEST['user_id'],1,'delete_user');
|
||||||
break;
|
break;
|
||||||
/* Show IP History for the Specified User */
|
/* Show IP History for the Specified User */
|
||||||
|
|
12
albums.php
12
albums.php
|
@ -36,14 +36,14 @@ switch ($_REQUEST['action']) {
|
||||||
if (!$GLOBALS['user']->has_access('75')) { access_denied(); }
|
if (!$GLOBALS['user']->has_access('75')) { access_denied(); }
|
||||||
$art = new Art($_GET['album_id'],'album');
|
$art = new Art($_GET['album_id'],'album');
|
||||||
$art->reset();
|
$art->reset();
|
||||||
show_confirmation(_('Album Art Cleared'),_('Album Art information has been removed from the database'),"/albums.php?action=show&album=" . $art->uid);
|
show_confirmation(T_('Album Art Cleared'), T_('Album Art information has been removed from the database'),"/albums.php?action=show&album=" . $art->uid);
|
||||||
break;
|
break;
|
||||||
// Upload album art
|
// Upload album art
|
||||||
case 'upload_art':
|
case 'upload_art':
|
||||||
|
|
||||||
// we didn't find anything
|
// we didn't find anything
|
||||||
if (empty($_FILES['file']['tmp_name'])) {
|
if (empty($_FILES['file']['tmp_name'])) {
|
||||||
show_confirmation(_('Album Art Not Located'),_('Album Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'),"/albums.php?action=show&album=" . $album->id);
|
show_confirmation(T_('Album Art Not Located'), T_('Album Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'),"/albums.php?action=show&album=" . $album->id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,11 +56,11 @@ switch ($_REQUEST['action']) {
|
||||||
if ($image_data) {
|
if ($image_data) {
|
||||||
$art = new Art($album->id,'album');
|
$art = new Art($album->id,'album');
|
||||||
$art->insert($image_data,$_FILES['file']['type']);
|
$art->insert($image_data,$_FILES['file']['type']);
|
||||||
show_confirmation(_('Album Art Inserted'),'',"/albums.php?action=show&album=" . $album->id);
|
show_confirmation(T_('Album Art Inserted'),'',"/albums.php?action=show&album=" . $album->id);
|
||||||
}
|
}
|
||||||
// Else it failed
|
// Else it failed
|
||||||
else {
|
else {
|
||||||
show_confirmation(_('Album Art Not Located'),_('Album Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'),"/albums.php?action=show&album=" . $album->id);
|
show_confirmation(T_('Album Art Not Located'), T_('Album Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'),"/albums.php?action=show&album=" . $album->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -84,7 +84,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
if ($image_data) {
|
if ($image_data) {
|
||||||
$art->insert($image_data,$upload['0']['mime']);
|
$art->insert($image_data,$upload['0']['mime']);
|
||||||
show_confirmation(_('Album Art Inserted'),'',"/albums.php?action=show&album=" . $_REQUEST['album_id']);
|
show_confirmation(T_('Album Art Inserted'),'',"/albums.php?action=show&album=" . $_REQUEST['album_id']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
} // if image data
|
} // if image data
|
||||||
|
@ -133,7 +133,7 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
// Else nothing
|
// Else nothing
|
||||||
else {
|
else {
|
||||||
show_confirmation(_('Album Art Not Located'),_('Album Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'),"/albums.php?action=show&album=" . $album->id);
|
show_confirmation(T_('Album Art Not Located'), T_('Album Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'),"/albums.php?action=show&album=" . $album->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$albumname = $album->name;
|
$albumname = $album->name;
|
||||||
|
|
18
artists.php
18
artists.php
|
@ -75,20 +75,20 @@ switch($_REQUEST['action']) {
|
||||||
$that_artist->merge($artist->id);
|
$that_artist->merge($artist->id);
|
||||||
$count++;
|
$count++;
|
||||||
} else
|
} else
|
||||||
$GLOBALS['error']->add_error('general', sprintf(_('Error: No such artist \'%s\''), $artist_id));
|
$GLOBALS['error']->add_error('general', sprintf(T_('Error: No such artist \'%s\''), $artist_id));
|
||||||
} else {
|
} else {
|
||||||
$GLOBALS['error']->add_error('general', sprintf(_('Error: \'%s\' is not a valid ID'), $artist_id));
|
$GLOBALS['error']->add_error('general', sprintf(T_('Error: \'%s\' is not a valid ID'), $artist_id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$GLOBALS['error']->add_error('general', sprintf(_('Error: No such artist \'%s\''), $_REQUEST['artist']));
|
$GLOBALS['error']->add_error('general', sprintf(T_('Error: No such artist \'%s\''), $_REQUEST['artist']));
|
||||||
} else {
|
} else {
|
||||||
$GLOBALS['error']->add_error('general',_("Error: Errenous request"));
|
$GLOBALS['error']->add_error('general', T_("Error: Errenous request"));
|
||||||
}
|
}
|
||||||
if ($count > 0) {
|
if ($count > 0) {
|
||||||
show_confirmation (
|
show_confirmation (
|
||||||
_('Renamed artist(s)'),
|
T_('Renamed artist(s)'),
|
||||||
sprintf(_('%1$s artists have been merged with %2$s'), $count, $artist->name),
|
sprintf(T_('%1$s artists have been merged with %2$s'), $count, $artist->name),
|
||||||
conf('web_path') . "/artists.php?action=show&artist=" . $artist->id
|
conf('web_path') . "/artists.php?action=show&artist=" . $artist->id
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -167,8 +167,8 @@ switch($_REQUEST['action']) {
|
||||||
// show something other than a blank screen after this
|
// show something other than a blank screen after this
|
||||||
if ($ret) {
|
if ($ret) {
|
||||||
show_confirmation (
|
show_confirmation (
|
||||||
_('Renamed artist'),
|
T_('Renamed artist'),
|
||||||
sprintf(_('%1$s is now known as %2$s'), $artist->name, $newname),
|
sprintf(T_('%1$s is now known as %2$s'), $artist->name, $newname),
|
||||||
conf('web_path') . "/artists.php?action=show&artist=" . $newid
|
conf('web_path') . "/artists.php?action=show&artist=" . $newid
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ switch($_REQUEST['action']) {
|
||||||
/* Enclose this in the purty box! */
|
/* Enclose this in the purty box! */
|
||||||
require (conf('prefix') . '/templates/show_box_top.inc.php');
|
require (conf('prefix') . '/templates/show_box_top.inc.php');
|
||||||
show_alphabet_list('artists','artists.php',$match);
|
show_alphabet_list('artists','artists.php',$match);
|
||||||
show_alphabet_form($chr,_('Show Artists starting with'),"artists.php?action=match");
|
show_alphabet_form($chr, T_('Show Artists starting with'),"artists.php?action=match");
|
||||||
require (conf('prefix') . '/templates/show_box_bottom.inc.php');
|
require (conf('prefix') . '/templates/show_box_bottom.inc.php');
|
||||||
|
|
||||||
if ($match === "Browse") {
|
if ($match === "Browse") {
|
||||||
|
|
|
@ -42,30 +42,30 @@ $thumbadd =0;
|
||||||
$artadd = 0;
|
$artadd = 0;
|
||||||
|
|
||||||
if (count($_SERVER['argv']) == 1) {
|
if (count($_SERVER['argv']) == 1) {
|
||||||
$operations_string = "\n\t". _('- All Catalog Operations');
|
$operations_string = "\n\t". T_('- All Catalog Operations');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($_SERVER['argv']) > 1) {
|
if (count($_SERVER['argv']) > 1) {
|
||||||
for ($x = 1; $x < count($_SERVER['argv']); $x++) {
|
for ($x = 1; $x < count($_SERVER['argv']); $x++) {
|
||||||
|
|
||||||
if ($_SERVER['argv'][$x] == "-c") {
|
if ($_SERVER['argv'][$x] == "-c") {
|
||||||
$operations_string .= "\n\t"._('- Catalog Clean');
|
$operations_string .= "\n\t" . T_('- Catalog Clean');
|
||||||
$catclean = 1;
|
$catclean = 1;
|
||||||
}
|
}
|
||||||
elseif ($_SERVER['argv'][$x] == "-v") {
|
elseif ($_SERVER['argv'][$x] == "-v") {
|
||||||
$operations_string .= "\n\t"._('- Catalog Verify');
|
$operations_string .= "\n\t" . T_('- Catalog Verify');
|
||||||
$catverify = 1;
|
$catverify = 1;
|
||||||
}
|
}
|
||||||
elseif ($_SERVER['argv'][$x] == "-a") {
|
elseif ($_SERVER['argv'][$x] == "-a") {
|
||||||
$operations_string .= "\n\t"._('- Catalog Add');
|
$operations_string .= "\n\t" . T_('- Catalog Add');
|
||||||
$catadd = 1;
|
$catadd = 1;
|
||||||
}
|
}
|
||||||
elseif ($_SERVER['argv'][$x] == "-g") {
|
elseif ($_SERVER['argv'][$x] == "-g") {
|
||||||
$operations_string .= "\n\t"._('- Catalog Art Gather');
|
$operations_string .= "\n\t" . T_('- Catalog Art Gather');
|
||||||
$artadd = 1;
|
$artadd = 1;
|
||||||
}
|
}
|
||||||
elseif ($_SERVER['argv'][$x] == '-t') {
|
elseif ($_SERVER['argv'][$x] == '-t') {
|
||||||
$operations_string .= "\n\t"._('- Generate Thumbnails');
|
$operations_string .= "\n\t" . T_('- Generate Thumbnails');
|
||||||
$thumbadd = 1;
|
$thumbadd = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -88,7 +88,7 @@ if ($thumbadd == 0 && $artadd == 0 && $catclean == 0 && $catverify == 0 && $cata
|
||||||
$thumbadd = 1;
|
$thumbadd = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo _("Starting Catalog Operations...") . $operations_string . "\n";
|
echo T_("Starting Catalog Operations...") . $operations_string . "\n";
|
||||||
|
|
||||||
if ($where) $where = "($where) AND catalog_type='local'";
|
if ($where) $where = "($where) AND catalog_type='local'";
|
||||||
else $where = "catalog_type='local'";
|
else $where = "catalog_type='local'";
|
||||||
|
@ -101,12 +101,12 @@ ob_start("ob_html_strip",'1024',true);
|
||||||
while ($row = Dba::fetch_row($db_results)) {
|
while ($row = Dba::fetch_row($db_results)) {
|
||||||
|
|
||||||
$catalog = new Catalog($row['0']);
|
$catalog = new Catalog($row['0']);
|
||||||
printf(_('Reading: %s'), $catalog->name);
|
printf(T_('Reading: %s'), $catalog->name);
|
||||||
ob_flush();
|
ob_flush();
|
||||||
echo "\n";
|
echo "\n";
|
||||||
if ($catclean == 1) {
|
if ($catclean == 1) {
|
||||||
// Clean out dead files
|
// Clean out dead files
|
||||||
echo _("- Starting Clean - ");
|
echo T_("- Starting Clean - ");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
$catalog->clean_catalog();
|
$catalog->clean_catalog();
|
||||||
echo "------------------\n\n";
|
echo "------------------\n\n";
|
||||||
|
@ -114,7 +114,7 @@ while ($row = Dba::fetch_row($db_results)) {
|
||||||
|
|
||||||
if ($catverify == 1) {
|
if ($catverify == 1) {
|
||||||
// Verify Existing
|
// Verify Existing
|
||||||
echo _("- Starting Verify - ");
|
echo T_("- Starting Verify - ");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
$catalog->verify_catalog($row['0']);
|
$catalog->verify_catalog($row['0']);
|
||||||
echo "-------------------\n\n";
|
echo "-------------------\n\n";
|
||||||
|
@ -122,7 +122,7 @@ while ($row = Dba::fetch_row($db_results)) {
|
||||||
|
|
||||||
if ($catadd == 1) {
|
if ($catadd == 1) {
|
||||||
// Look for new files
|
// Look for new files
|
||||||
echo _("- Starting Add - ");
|
echo T_("- Starting Add - ");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
$catalog->add_to_catalog();
|
$catalog->add_to_catalog();
|
||||||
echo "----------------\n\n";
|
echo "----------------\n\n";
|
||||||
|
@ -130,7 +130,7 @@ while ($row = Dba::fetch_row($db_results)) {
|
||||||
|
|
||||||
if ($artadd == 1) {
|
if ($artadd == 1) {
|
||||||
// Look for album art
|
// Look for album art
|
||||||
echo _('Starting Album Art Search');
|
echo T_('Starting Album Art Search');
|
||||||
echo "\n";
|
echo "\n";
|
||||||
$catalog->get_art('',1);
|
$catalog->get_art('',1);
|
||||||
echo "----------------\n\n";
|
echo "----------------\n\n";
|
||||||
|
@ -138,7 +138,7 @@ while ($row = Dba::fetch_row($db_results)) {
|
||||||
|
|
||||||
if ($thumbadd == 1) {
|
if ($thumbadd == 1) {
|
||||||
// Generate the thumbnails
|
// Generate the thumbnails
|
||||||
echo _('Generating Thumbnails');
|
echo T_('Generating Thumbnails');
|
||||||
echo "\n";
|
echo "\n";
|
||||||
$catalog->generate_thumbnails();
|
$catalog->generate_thumbnails();
|
||||||
echo "----------------\n\n";
|
echo "----------------\n\n";
|
||||||
|
@ -165,21 +165,21 @@ function ob_html_strip($string) {
|
||||||
} // ob_html_strip
|
} // ob_html_strip
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
echo _("- Catalog Update -");
|
echo T_("- Catalog Update -");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo _("Usage: catalog_update.inc [CATALOG NAME] [-c|-v|-a|-g|-t]");
|
echo T_("Usage: catalog_update.inc [CATALOG NAME] [-c|-v|-a|-g|-t]");
|
||||||
echo "\n\t";
|
echo "\n\t";
|
||||||
echo _("Default behavior is to do all");
|
echo T_("Default behavior is to do all");
|
||||||
echo "\n-c\t";
|
echo "\n-c\t";
|
||||||
echo _('Clean Catalogs');
|
echo T_('Clean Catalogs');
|
||||||
echo "\n-v\t";
|
echo "\n-v\t";
|
||||||
echo _('Verify Catalogs');
|
echo T_('Verify Catalogs');
|
||||||
echo "\n-a\t";
|
echo "\n-a\t";
|
||||||
echo _('Add to Catalogs');
|
echo T_('Add to Catalogs');
|
||||||
echo "\n-g\t";
|
echo "\n-g\t";
|
||||||
echo _('Gather Art');
|
echo T_('Gather Art');
|
||||||
echo "\n-t\t";
|
echo "\n-t\t";
|
||||||
echo _('Generate Thumbnails');
|
echo T_('Generate Thumbnails');
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "----------------------------------------------------------";
|
echo "----------------------------------------------------------";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
|
@ -40,7 +40,7 @@ $path = dirname(__FILE__);
|
||||||
$prefix = realpath($path . '/../');
|
$prefix = realpath($path . '/../');
|
||||||
require_once $prefix . '/lib/init.php';
|
require_once $prefix . '/lib/init.php';
|
||||||
|
|
||||||
if ($debug) { echo _("DEBUG ENABLED WILL NOT DELETE FILES!"); echo "\n"; }
|
if ($debug) { echo T_("DEBUG ENABLED WILL NOT DELETE FILES!"); echo "\n"; }
|
||||||
|
|
||||||
/* Get a list of filenames */
|
/* Get a list of filenames */
|
||||||
$sql = "SELECT `id`,`file` FROM song WHERE enabled='0'";
|
$sql = "SELECT `id`,`file` FROM song WHERE enabled='0'";
|
||||||
|
@ -48,11 +48,11 @@ $db_results = Dba::read($sql);
|
||||||
|
|
||||||
while ($row = Dba::fetch_assoc($db_results)) {
|
while ($row = Dba::fetch_assoc($db_results)) {
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
printf (_('Would Delete: %s'), $row['file']);
|
printf (T_('Would Delete: %s'), $row['file']);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf (_('Deleting: %s'), $row['file']);
|
printf (T_('Deleting: %s'), $row['file']);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
unlink($row['file']);
|
unlink($row['file']);
|
||||||
$sql = "DELETE FROM `song` WHERE `id`='" . Dba::escape($row['id']) . "'";
|
$sql = "DELETE FROM `song` WHERE `id`='" . Dba::escape($row['id']) . "'";
|
||||||
|
|
|
@ -45,7 +45,7 @@ ob_end_clean();
|
||||||
//$GLOBALS['i_am_crazy'] = true;
|
//$GLOBALS['i_am_crazy'] = true;
|
||||||
|
|
||||||
if (!function_exists('iconv')) {
|
if (!function_exists('iconv')) {
|
||||||
echo _("ERROR: Iconv required for this functionality, quiting");
|
echo T_("ERROR: Iconv required for this functionality, quiting");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -54,19 +54,19 @@ if (!function_exists('iconv')) {
|
||||||
$source_encoding = iconv_get_encoding('output_encoding');
|
$source_encoding = iconv_get_encoding('output_encoding');
|
||||||
|
|
||||||
// Attempt a simple translation
|
// Attempt a simple translation
|
||||||
$string = sprintf(_('%s For the Love of Music'), iconv(Config::get('site_charset'),Config::get('site_charset')));
|
$string = sprintf(T_('%s For the Love of Music'), iconv(Config::get('site_charset'),Config::get('site_charset')));
|
||||||
echo _('Testing Basic Translation, the two strings below should look the same');
|
echo T_('Testing Basic Translation, the two strings below should look the same');
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo _('Original: For the Love of Music');
|
echo T_('Original: For the Love of Music');
|
||||||
echo "\n";
|
echo "\n";
|
||||||
printf (_('Translated: %s'), $string);
|
printf (T_('Translated: %s'), $string);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "---------------------------------------------------------------------\n";
|
echo "---------------------------------------------------------------------\n";
|
||||||
printf (_('Input Charset (%s):'), $source_encoding);
|
printf (T_('Input Charset (%s):'), $source_encoding);
|
||||||
$input = trim(fgets(STDIN));
|
$input = trim(fgets(STDIN));
|
||||||
|
|
||||||
if (strlen($input) > 0) { $source_encoding = trim($input); }
|
if (strlen($input) > 0) { $source_encoding = trim($input); }
|
||||||
printf (_('Using %s as source character set'), $source_encoding);
|
printf (T_('Using %s as source character set'), $source_encoding);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
$sql = "SELECT * FROM `catalog` WHERE `catalog_type`='local'";
|
$sql = "SELECT * FROM `catalog` WHERE `catalog_type`='local'";
|
||||||
|
@ -74,13 +74,13 @@ $db_results = Dba::read($sql);
|
||||||
|
|
||||||
while ($row = Dba::fetch_assoc($db_results)) {
|
while ($row = Dba::fetch_assoc($db_results)) {
|
||||||
|
|
||||||
printf(_('Checking %s (%s)'), $row['name'], $row['path']);
|
printf(T_('Checking %s (%s)'), $row['name'], $row['path']);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
charset_directory_correct($row['path']);
|
charset_directory_correct($row['path']);
|
||||||
|
|
||||||
} // end of the catalogs
|
} // end of the catalogs
|
||||||
|
|
||||||
echo _('Finished checking filenames for valid chacters');
|
echo T_('Finished checking filenames for valid chacters');
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
/**************************************************
|
/**************************************************
|
||||||
|
@ -106,13 +106,13 @@ function charset_directory_correct($path) {
|
||||||
$handle = opendir($path);
|
$handle = opendir($path);
|
||||||
|
|
||||||
if (!is_resource($handle)) {
|
if (!is_resource($handle)) {
|
||||||
printf (_('ERROR: Unable to open %s'), $path);
|
printf (T_('ERROR: Unable to open %s'), $path);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!chdir($path)) {
|
if (!chdir($path)) {
|
||||||
printf (_('ERROR: Unable to chdir to %s'), $path);
|
printf (T_('ERROR: Unable to chdir to %s'), $path);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -135,24 +135,24 @@ function charset_directory_correct($path) {
|
||||||
|
|
||||||
// Make sure the extension stayed the same
|
// Make sure the extension stayed the same
|
||||||
if (substr($translated_filename,strlen($translated_filename)-3,3) != substr($full_file,strlen($full_file)-3,3)) {
|
if (substr($translated_filename,strlen($translated_filename)-3,3) != substr($full_file,strlen($full_file)-3,3)) {
|
||||||
echo _("Translation failure, stripping non-valid characters");
|
echo T_("Translation failure, stripping non-valid characters");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
$translated_filename = iconv($source_encoding,Config::get('site_charset') . '//IGNORE',$full_file);
|
$translated_filename = iconv($source_encoding,Config::get('site_charset') . '//IGNORE',$full_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf (_('Attempting to Transcode to %s'), Config::get('site_charset'));
|
printf (T_('Attempting to Transcode to %s'), Config::get('site_charset'));
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "--------------------------------------------------------------------------------------------\n";
|
echo "--------------------------------------------------------------------------------------------\n";
|
||||||
printf (_('OLD: %s has invalid chars'), $full_file);
|
printf (T_('OLD: %s has invalid chars'), $full_file);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
printf (_('NEW: %s'), $translated_filename);
|
printf (T_('NEW: %s'), $translated_filename);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "--------------------------------------------------------------------------------------------\n";
|
echo "--------------------------------------------------------------------------------------------\n";
|
||||||
if (!$GLOBALS['i_am_crazy']) {
|
if (!$GLOBALS['i_am_crazy']) {
|
||||||
echo _("Rename File (Y/N):");
|
echo T_("Rename File (Y/N):");
|
||||||
$input = trim(fgets(STDIN));
|
$input = trim(fgets(STDIN));
|
||||||
if (strcasecmp($input,'Y') == 0) { charset_rename_file($full_file,$translated_filename); }
|
if (strcasecmp($input,'Y') == 0) { charset_rename_file($full_file,$translated_filename); }
|
||||||
else { echo "\n\t"; echo _('Not Renaming...'); echo "\n\n"; }
|
else { echo "\n\t"; echo T_('Not Renaming...'); echo "\n\n"; }
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
charset_rename_file($full_file,$translated_filename);
|
charset_rename_file($full_file,$translated_filename);
|
||||||
|
@ -184,7 +184,7 @@ function charset_rename_file($full_file,$translated_filename) {
|
||||||
echo "\tMaking $path directory\n";
|
echo "\tMaking $path directory\n";
|
||||||
$results = mkdir($path);
|
$results = mkdir($path);
|
||||||
if (!$results) {
|
if (!$results) {
|
||||||
printf (_('Error: Unable to create %s move failed, stopping'), $path);
|
printf (T_('Error: Unable to create %s move failed, stopping'), $path);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -196,7 +196,7 @@ function charset_rename_file($full_file,$translated_filename) {
|
||||||
$results = copy($full_file,$translated_filename);
|
$results = copy($full_file,$translated_filename);
|
||||||
|
|
||||||
if (!$results) {
|
if (!$results) {
|
||||||
echo _('Error: Copy Failed, not deleteing old file');
|
echo T_('Error: Copy Failed, not deleteing old file');
|
||||||
echo "\n";
|
echo "\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -205,16 +205,16 @@ function charset_rename_file($full_file,$translated_filename) {
|
||||||
$new_sum = filesize($translated_filename);
|
$new_sum = filesize($translated_filename);
|
||||||
|
|
||||||
if ($old_sum != $new_sum OR !$new_sum) {
|
if ($old_sum != $new_sum OR !$new_sum) {
|
||||||
printf (_('Error: Size Inconsistency, not deleting %s'), $full_file);
|
printf (T_('Error: Size Inconsistency, not deleting %s'), $full_file);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$results = unlink($full_file);
|
$results = unlink($full_file);
|
||||||
|
|
||||||
if (!$results) { printf (_('Error: Unable to delete %s'), $full_file); echo "\n"; return false; }
|
if (!$results) { printf (T_('Error: Unable to delete %s'), $full_file); echo "\n"; return false; }
|
||||||
|
|
||||||
echo _("File Moved...");
|
echo T_("File Moved...");
|
||||||
echo "\n\n";
|
echo "\n\n";
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -50,11 +50,11 @@ $email = isset($options['e']) ? $options['e'] : '';
|
||||||
$name = isset($options['n']) ? $options['n'] : '';
|
$name = isset($options['n']) ? $options['n'] : '';
|
||||||
|
|
||||||
if (User::create($username, $name, $email, $password, $access)) {
|
if (User::create($username, $name, $email, $password, $access)) {
|
||||||
printf(_('Created %s user %s with password %s'), _($access), $username, $password);
|
printf(T_('Created %s user %s with password %s'), T_($access), $username, $password);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo _('User creation failed'), "\n";
|
echo T_('User creation failed'), "\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,26 +67,26 @@ if (!$db_user || !$db_pass || !$db_host || !$db_name || !$new_db_user || !$new_d
|
||||||
|
|
||||||
// Now let's make sure its not already installed
|
// Now let's make sure its not already installed
|
||||||
if (!install_check_status($configfile)) {
|
if (!install_check_status($configfile)) {
|
||||||
echo "\n", _('Existing Ampache installation found.'), "\n";
|
echo "\n", T_('Existing Ampache installation found.'), "\n";
|
||||||
if ($force) {
|
if ($force) {
|
||||||
echo _('Force specified, proceeding anyway.'), "\n";
|
echo T_('Force specified, proceeding anyway.'), "\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo _('Exiting.'), "\n";
|
echo T_('Exiting.'), "\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install the database
|
// Install the database
|
||||||
if (!install_insert_db($db_user, $db_pass, $db_host, $db_name, $new_db_user, $new_db_pass)) {
|
if (!install_insert_db($db_user, $db_pass, $db_host, $db_name, $new_db_user, $new_db_pass)) {
|
||||||
echo _('Database creation failed'), "\n";
|
echo T_('Database creation failed'), "\n";
|
||||||
echo Error::get('general'), "\n\n";
|
echo Error::get('general'), "\n\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the config file
|
// Write the config file
|
||||||
if (!install_create_config($webpath, $new_db_user, $new_db_pass, $db_host, $db_name)) {
|
if (!install_create_config($webpath, $new_db_user, $new_db_pass, $db_host, $db_name)) {
|
||||||
echo _('Config file creation failed'), "\n";
|
echo T_('Config file creation failed'), "\n";
|
||||||
echo Error::get('general') . "\n\n";
|
echo Error::get('general') . "\n\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ if (Update::need_update() && $run_update) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Update::need_update()) {
|
if (Update::need_update()) {
|
||||||
echo _('The following updates need to be performed:'), "\n";
|
echo T_('The following updates need to be performed:'), "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
Update::display_update();
|
Update::display_update();
|
||||||
|
|
|
@ -53,7 +53,7 @@ $old_config = file_get_contents($prefix . '/config/ampache.cfg.php');
|
||||||
|
|
||||||
$data = explode("\n",$old_config);
|
$data = explode("\n",$old_config);
|
||||||
|
|
||||||
echo _("Parsing old config file...");
|
echo T_("Parsing old config file...");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
foreach ($data as $line) {
|
foreach ($data as $line) {
|
||||||
|
@ -83,7 +83,7 @@ foreach ($data as $line) {
|
||||||
|
|
||||||
} // end foreach lines
|
} // end foreach lines
|
||||||
|
|
||||||
echo _("Parse complete, writing");
|
echo T_("Parse complete, writing");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
$handle = fopen($prefix . '/config/ampache.cfg.php','w');
|
$handle = fopen($prefix . '/config/ampache.cfg.php','w');
|
||||||
|
@ -91,11 +91,11 @@ $handle = fopen($prefix . '/config/ampache.cfg.php','w');
|
||||||
$worked = fwrite($handle,$new_config);
|
$worked = fwrite($handle,$new_config);
|
||||||
|
|
||||||
if ($worked) {
|
if ($worked) {
|
||||||
echo _("Write success, config migrated");
|
echo T_("Write success, config migrated");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo _("Access Denied, config migration failed");
|
echo T_("Access Denied, config migration failed");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,13 +41,13 @@ if (count($GLOBALS['argv']) == '1') {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!file_exists($filename)) {
|
if(!file_exists($filename)) {
|
||||||
print _("File not found.");
|
print T_("File not found.");
|
||||||
print "\n";
|
print "\n";
|
||||||
usage();
|
usage();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf(_('Reading: %s'), $filename);
|
printf(T_('Reading: %s'), $filename);
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
/* Attempt to figure out what catalog it comes from */
|
/* Attempt to figure out what catalog it comes from */
|
||||||
|
@ -62,7 +62,7 @@ $file_pattern = $catalog->rename_pattern;
|
||||||
|
|
||||||
$info = new vainfo($filename, '', '', '', $dir_pattern, $file_pattern);
|
$info = new vainfo($filename, '', '', '', $dir_pattern, $file_pattern);
|
||||||
if(isset($dir_pattern) || isset($file_pattern)) {
|
if(isset($dir_pattern) || isset($file_pattern)) {
|
||||||
printf(_('Using: %s AND %s for file pattern matching'), $dir_pattern, $file_pattern);
|
printf(T_('Using: %s AND %s for file pattern matching'), $dir_pattern, $file_pattern);
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
$info->get_info();
|
$info->get_info();
|
||||||
|
@ -79,22 +79,22 @@ if ($send_mail) {
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo _('Raw results:');
|
echo T_('Raw results:');
|
||||||
echo "\n\n";
|
echo "\n\n";
|
||||||
print_r($info);
|
print_r($info);
|
||||||
echo "\n------------------------------------------------------------------\n";
|
echo "\n------------------------------------------------------------------\n";
|
||||||
printf(_('Final results seen by Ampache using %s:'), implode(' + ', $keys));
|
printf(T_('Final results seen by Ampache using %s:'), implode(' + ', $keys));
|
||||||
echo "\n\n";
|
echo "\n\n";
|
||||||
print_r($ampache_results);
|
print_r($ampache_results);
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
global $version;
|
global $version;
|
||||||
|
|
||||||
$text = sprintf(_('%s Version %s'), 'print_tags.inc', $version);
|
$text = sprintf(T_('%s Version %s'), 'print_tags.inc', $version);
|
||||||
$text .= "\n\n";
|
$text .= "\n\n";
|
||||||
$text .= _('Usage:');
|
$text .= T_('Usage:');
|
||||||
$text .= "\n";
|
$text .= "\n";
|
||||||
$text .= _('php print_tags.inc <Filename>');
|
$text .= T_('php print_tags.inc <Filename>');
|
||||||
$text .= "\n\n";
|
$text .= "\n\n";
|
||||||
|
|
||||||
return print $text;
|
return print $text;
|
||||||
|
|
|
@ -64,7 +64,7 @@ while ($r = Dba::fetch_row($db_results)) {
|
||||||
$catalog = new Catalog($r['0']);
|
$catalog = new Catalog($r['0']);
|
||||||
$songs = $catalog->get_catalog_files();
|
$songs = $catalog->get_catalog_files();
|
||||||
|
|
||||||
printf (_('Starting Catalog: %s'), stripslashes($catalog->name));
|
printf (T_('Starting Catalog: %s'), stripslashes($catalog->name));
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
/* Foreach through each file and find it a home! */
|
/* Foreach through each file and find it a home! */
|
||||||
|
@ -79,11 +79,11 @@ while ($r = Dba::fetch_row($db_results)) {
|
||||||
/* Check for Demo Mode */
|
/* Check for Demo Mode */
|
||||||
if ($test_mode) {
|
if ($test_mode) {
|
||||||
/* We're just talking here... no work */
|
/* We're just talking here... no work */
|
||||||
echo _("Moving File...");
|
echo T_("Moving File...");
|
||||||
echo "\n\t";
|
echo "\n\t";
|
||||||
printf (_('Source: %s'), $song->file);
|
printf (T_('Source: %s'), $song->file);
|
||||||
echo "\n\t";
|
echo "\n\t";
|
||||||
printf (_('Dest: %s'), $fullpath);
|
printf (T_('Dest: %s'), $fullpath);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
|
@ -233,14 +233,14 @@ function sort_move_file($song,$fullname) {
|
||||||
if (!is_dir($path)) {
|
if (!is_dir($path)) {
|
||||||
if ($GLOBALS['test_mode']) {
|
if ($GLOBALS['test_mode']) {
|
||||||
echo "\t";
|
echo "\t";
|
||||||
printf (_('Making %s Directory'), $path);
|
printf (T_('Making %s Directory'), $path);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
debug_event('mkdir',"Creating $path directory",'5');
|
debug_event('mkdir',"Creating $path directory",'5');
|
||||||
$results = mkdir($path);
|
$results = mkdir($path);
|
||||||
if (!$results) {
|
if (!$results) {
|
||||||
printf (_('Error: Unable to create %s move failed'), $path);
|
printf (T_('Error: Unable to create %s move failed'), $path);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,7 @@ function sort_move_file($song,$fullname) {
|
||||||
if ($GLOBALS['test_mode']) {
|
if ($GLOBALS['test_mode']) {
|
||||||
echo "\t";
|
echo "\t";
|
||||||
// HINT: %1$s: file, %2$s: directory
|
// HINT: %1$s: file, %2$s: directory
|
||||||
printf (_('Copying %1$s to %2$s'), $file, $directory);
|
printf (T_('Copying %1$s to %2$s'), $file, $directory);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
$sql = "UPDATE song SET file='" . Dba::escape($fullname) . "' WHERE id='" . Dba::escape($song->id) . "'";
|
$sql = "UPDATE song SET file='" . Dba::escape($fullname) . "' WHERE id='" . Dba::escape($song->id) . "'";
|
||||||
echo "\tSQL: $sql\n";
|
echo "\tSQL: $sql\n";
|
||||||
|
@ -264,7 +264,7 @@ function sort_move_file($song,$fullname) {
|
||||||
/* Check for file existance */
|
/* Check for file existance */
|
||||||
if (file_exists($fullname)) {
|
if (file_exists($fullname)) {
|
||||||
debug_event('file exists','Error: $fullname already exists','1');
|
debug_event('file exists','Error: $fullname already exists','1');
|
||||||
printf (_('Error: %s already exists'), $filename);
|
printf (T_('Error: %s already exists'), $filename);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -285,21 +285,21 @@ function sort_move_file($song,$fullname) {
|
||||||
debug_event('copy_art','Copied ' . $old_art . ' to ' . $folder_art,'5');
|
debug_event('copy_art','Copied ' . $old_art . ' to ' . $folder_art,'5');
|
||||||
@copy($old_art,$folder_art);
|
@copy($old_art,$folder_art);
|
||||||
|
|
||||||
if (!$results) { printf (_('Error: Unable to copy file to %s'), $fullname); echo "\n"; return false; }
|
if (!$results) { printf (T_('Error: Unable to copy file to %s'), $fullname); echo "\n"; return false; }
|
||||||
|
|
||||||
/* Check the filesize */
|
/* Check the filesize */
|
||||||
$new_sum = filesize($fullname);
|
$new_sum = filesize($fullname);
|
||||||
$old_sum = filesize($song->file);
|
$old_sum = filesize($song->file);
|
||||||
|
|
||||||
if ($new_sum != $old_sum OR !$new_sum) {
|
if ($new_sum != $old_sum OR !$new_sum) {
|
||||||
printf (_('Error: Size Inconsistency, not deleting %s'), $song->file);
|
printf (T_('Error: Size Inconsistency, not deleting %s'), $song->file);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
return false;
|
return false;
|
||||||
} // end if sum's don't match
|
} // end if sum's don't match
|
||||||
|
|
||||||
/* If we've made it this far it should be safe */
|
/* If we've made it this far it should be safe */
|
||||||
$results = unlink($song->file);
|
$results = unlink($song->file);
|
||||||
if (!$results) { printf (_('Error: Unable to delete %s'), $song->file); echo "\n"; }
|
if (!$results) { printf (T_('Error: Unable to delete %s'), $song->file); echo "\n"; }
|
||||||
|
|
||||||
/* Update the catalog */
|
/* Update the catalog */
|
||||||
$sql = "UPDATE song SET file='" . Dba::escape($fullname) . "' WHERE id='" . Dba::escape($song->id) . "'";
|
$sql = "UPDATE song SET file='" . Dba::escape($fullname) . "' WHERE id='" . Dba::escape($song->id) . "'";
|
||||||
|
|
|
@ -45,7 +45,7 @@ else {
|
||||||
|
|
||||||
// Make sure the output dir is valid and writeable
|
// Make sure the output dir is valid and writeable
|
||||||
if (!is_writeable($dirname)) {
|
if (!is_writeable($dirname)) {
|
||||||
printf (_('Error: Directory %s not writeable'), $dirname);
|
printf (T_('Error: Directory %s not writeable'), $dirname);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,11 +66,11 @@ switch ($type) {
|
||||||
/* FUNCTIONS */
|
/* FUNCTIONS */
|
||||||
function usage() {
|
function usage() {
|
||||||
|
|
||||||
$desc1 = _("This will dump a collection of m3u playlists based on type");
|
$desc1 = T_("This will dump a collection of m3u playlists based on type");
|
||||||
$desc2 = _("Types:");
|
$desc2 = T_("Types:");
|
||||||
$desc3 = _("Dumps all Albums as individual playlists");
|
$desc3 = T_("Dumps all Albums as individual playlists");
|
||||||
$desc4 = _("Dumps all of your Playlists as m3u's");
|
$desc4 = T_("Dumps all of your Playlists as m3u's");
|
||||||
$desc5 = _("Dumps all Artists as individual playlists");
|
$desc5 = T_("Dumps all Artists as individual playlists");
|
||||||
|
|
||||||
$string = "write_playlists.php.inc [-h] <DIRNAME> <TYPE>
|
$string = "write_playlists.php.inc [-h] <DIRNAME> <TYPE>
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ $prefix = realpath($path . '/../');
|
||||||
require_once $prefix . '/lib/init.php';
|
require_once $prefix . '/lib/init.php';
|
||||||
|
|
||||||
// This is all broken currently so just jump ship
|
// This is all broken currently so just jump ship
|
||||||
echo _("Writting of Tags to files is not currently supported by Getid3() use at your own risk.");
|
echo T_("Writting of Tags to files is not currently supported by Getid3() use at your own risk.");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
flush();
|
flush();
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ $flag = new Flag();
|
||||||
$flagged_ids = Flag::get_approved();
|
$flagged_ids = Flag::get_approved();
|
||||||
|
|
||||||
if (!count($flagged_ids)) {
|
if (!count($flagged_ids)) {
|
||||||
echo _("No Flagged Songs Found, exiting...");
|
echo T_("No Flagged Songs Found, exiting...");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ foreach($flagged_ids as $flagged) {
|
||||||
Flag::fill_tags( &$tagWriter, &$song, 'comment' );
|
Flag::fill_tags( &$tagWriter, &$song, 'comment' );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
echo _('No Tag');
|
echo T_('No Tag');
|
||||||
} // end switch
|
} // end switch
|
||||||
|
|
||||||
if ( isset($tagWriter) ) {
|
if ( isset($tagWriter) ) {
|
||||||
|
@ -88,7 +88,7 @@ foreach($flagged_ids as $flagged) {
|
||||||
try {
|
try {
|
||||||
$tagWriter->write();
|
$tagWriter->write();
|
||||||
// HINT: %1$s: title, %2$s: artist_name
|
// HINT: %1$s: title, %2$s: artist_name
|
||||||
printf (_('Updated song %1$s by %2$s'), $song->title, $song->get_artist_name());
|
printf (T_('Updated song %1$s by %2$s'), $song->title, $song->get_artist_name());
|
||||||
echo "\n";
|
echo "\n";
|
||||||
flush();
|
flush();
|
||||||
$flag->delete();
|
$flag->delete();
|
||||||
|
|
|
@ -76,7 +76,7 @@ switch($_REQUEST['action']) {
|
||||||
$object_ids = $browse->get_saved();
|
$object_ids = $browse->get_saved();
|
||||||
$keys = array_keys($object_ids);
|
$keys = array_keys($object_ids);
|
||||||
Tag::build_cache($keys);
|
Tag::build_cache($keys);
|
||||||
show_box_top(_('Tag Cloud'), 'box box_tag_cloud');
|
show_box_top(T_('Tag Cloud'), 'box box_tag_cloud');
|
||||||
$browse2 = new Browse();
|
$browse2 = new Browse();
|
||||||
$browse2->set_type('song');
|
$browse2->set_type('song');
|
||||||
$browse2->store();
|
$browse2->store();
|
||||||
|
|
|
@ -60,7 +60,7 @@ switch ($_REQUEST['action']) {
|
||||||
Democratic::delete($_REQUEST['democratic_id']);
|
Democratic::delete($_REQUEST['democratic_id']);
|
||||||
|
|
||||||
$title = '';
|
$title = '';
|
||||||
$text = _('The Requested Playlist has been deleted.');
|
$text = T_('The Requested Playlist has been deleted.');
|
||||||
$url = Config::get('web_path') . '/democratic.php?action=manage_playlists';
|
$url = Config::get('web_path') . '/democratic.php?action=manage_playlists';
|
||||||
show_confirmation($title,$text,$url);
|
show_confirmation($title,$text,$url);
|
||||||
break;
|
break;
|
||||||
|
|
2
flag.php
2
flag.php
|
@ -48,7 +48,7 @@ switch ($action) {
|
||||||
$flag_type = scrub_in($_REQUEST['flag_type']);
|
$flag_type = scrub_in($_REQUEST['flag_type']);
|
||||||
$comment = scrub_in($_REQUEST['comment']);
|
$comment = scrub_in($_REQUEST['comment']);
|
||||||
$flag->add($id,$type,$flag_type,$comment);
|
$flag->add($id,$type,$flag_type,$comment);
|
||||||
show_confirmation(_('Item Flagged'),_('The specified item has been flagged'),$_SESSION['source_page']);
|
show_confirmation(T_('Item Flagged'), T_('The specified item has been flagged'),$_SESSION['source_page']);
|
||||||
break;
|
break;
|
||||||
case 'show_flag':
|
case 'show_flag':
|
||||||
/* Store where they came from */
|
/* Store where they came from */
|
||||||
|
|
|
@ -87,7 +87,7 @@ switch ($_REQUEST['action']) {
|
||||||
$charset = $_REQUEST['charset'];
|
$charset = $_REQUEST['charset'];
|
||||||
// Test and make sure that the values they give us actually work
|
// Test and make sure that the values they give us actually work
|
||||||
if (!check_database($hostname,$username,$password)) {
|
if (!check_database($hostname,$username,$password)) {
|
||||||
Error::add('config',_('Error: Unable to make Database Connection') . mysql_error());
|
Error::add('config', T_('Error: Unable to make Database Connection') . mysql_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Was download pressed?
|
// Was download pressed?
|
||||||
|
@ -175,7 +175,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
/* Make sure we've got a valid config file */
|
/* Make sure we've got a valid config file */
|
||||||
if (!check_config_values($results)) {
|
if (!check_config_values($results)) {
|
||||||
Error::add('general',_('Error: Config file not found or Unreadable'));
|
Error::add('general', T_('Error: Config file not found or Unreadable'));
|
||||||
require_once Config::get('prefix') . '/templates/show_install_config.inc.php';
|
require_once Config::get('prefix') . '/templates/show_install_config.inc.php';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,17 +160,17 @@ class Access {
|
||||||
$end = @inet_pton($data['end']);
|
$end = @inet_pton($data['end']);
|
||||||
|
|
||||||
if (!$start AND $data['start'] != '0.0.0.0' AND $data['start'] != '::') {
|
if (!$start AND $data['start'] != '0.0.0.0' AND $data['start'] != '::') {
|
||||||
Error::add('start',_('Invalid IPv4 / IPv6 Address Entered'));
|
Error::add('start', T_('Invalid IPv4 / IPv6 Address Entered'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!$end) {
|
if (!$end) {
|
||||||
Error::add('end',_('Invalid IPv4 / IPv6 Address Entered'));
|
Error::add('end', T_('Invalid IPv4 / IPv6 Address Entered'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen(bin2hex($start)) != strlen(bin2hex($end))) {
|
if (strlen(bin2hex($start)) != strlen(bin2hex($end))) {
|
||||||
Error::add('start',_('IP Address Version Mismatch'));
|
Error::add('start', T_('IP Address Version Mismatch'));
|
||||||
Error::add('end',_('IP Address Version Mismatch'));
|
Error::add('end', T_('IP Address Version Mismatch'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,24 +207,24 @@ class Access {
|
||||||
$end = @inet_pton($data['end']);
|
$end = @inet_pton($data['end']);
|
||||||
|
|
||||||
if (!$start AND $data['start'] != '0.0.0.0' AND $data['start'] != '::') {
|
if (!$start AND $data['start'] != '0.0.0.0' AND $data['start'] != '::') {
|
||||||
Error::add('start',_('Invalid IPv4 / IPv6 Address Entered'));
|
Error::add('start', T_('Invalid IPv4 / IPv6 Address Entered'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!$end) {
|
if (!$end) {
|
||||||
Error::add('end',_('Invalid IPv4 / IPv6 Address Entered'));
|
Error::add('end', T_('Invalid IPv4 / IPv6 Address Entered'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen(bin2hex($start)) != strlen(bin2hex($end))) {
|
if (strlen(bin2hex($start)) != strlen(bin2hex($end))) {
|
||||||
Error::add('start',_('IP Address Version Mismatch'));
|
Error::add('start', T_('IP Address Version Mismatch'));
|
||||||
Error::add('end',_('IP Address Version Mismatch'));
|
Error::add('end', T_('IP Address Version Mismatch'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check existing ACL's to make sure we're not duplicating values here
|
// Check existing ACL's to make sure we're not duplicating values here
|
||||||
if (self::exists($data)) {
|
if (self::exists($data)) {
|
||||||
debug_event('ACL Create','Error: An ACL equal to the created one does already exist. Not adding another one: ' . $data['start'] . ' - ' . $data['end'],'1');
|
debug_event('ACL Create','Error: An ACL equal to the created one does already exist. Not adding another one: ' . $data['start'] . ' - ' . $data['end'],'1');
|
||||||
Error::add('general',_('Duplicate ACL defined'));
|
Error::add('general', T_('Duplicate ACL defined'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -482,16 +482,16 @@ class Access {
|
||||||
public function get_level_name() {
|
public function get_level_name() {
|
||||||
|
|
||||||
if ($this->level >= '75') {
|
if ($this->level >= '75') {
|
||||||
return _('All');
|
return T_('All');
|
||||||
}
|
}
|
||||||
if ($this->level == '5') {
|
if ($this->level == '5') {
|
||||||
return _('View');
|
return T_('View');
|
||||||
}
|
}
|
||||||
if ($this->level == '25') {
|
if ($this->level == '25') {
|
||||||
return _('Read');
|
return T_('Read');
|
||||||
}
|
}
|
||||||
if ($this->level == '50') {
|
if ($this->level == '50') {
|
||||||
return _('Read/Write');
|
return T_('Read/Write');
|
||||||
}
|
}
|
||||||
|
|
||||||
} // get_level_name
|
} // get_level_name
|
||||||
|
@ -502,7 +502,7 @@ class Access {
|
||||||
*/
|
*/
|
||||||
public function get_user_name() {
|
public function get_user_name() {
|
||||||
|
|
||||||
if ($this->user == '-1') { return _('All'); }
|
if ($this->user == '-1') { return T_('All'); }
|
||||||
|
|
||||||
$user = new User($this->user);
|
$user = new User($this->user);
|
||||||
return $user->fullname . " (" . $user->username . ")";
|
return $user->fullname . " (" . $user->username . ")";
|
||||||
|
@ -518,17 +518,17 @@ class Access {
|
||||||
switch ($this->type) {
|
switch ($this->type) {
|
||||||
case 'xml-rpc':
|
case 'xml-rpc':
|
||||||
case 'rpc':
|
case 'rpc':
|
||||||
return _('API/RPC');
|
return T_('API/RPC');
|
||||||
break;
|
break;
|
||||||
case 'network':
|
case 'network':
|
||||||
return _('Local Network Definition');
|
return T_('Local Network Definition');
|
||||||
break;
|
break;
|
||||||
case 'interface':
|
case 'interface':
|
||||||
return _('Web Interface');
|
return T_('Web Interface');
|
||||||
break;
|
break;
|
||||||
case 'stream':
|
case 'stream':
|
||||||
default:
|
default:
|
||||||
return _('Stream Access');
|
return T_('Stream Access');
|
||||||
break;
|
break;
|
||||||
} // end switch
|
} // end switch
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,7 @@ class Album extends database_object {
|
||||||
$this->f_name_link = "<a href=\"$web_path/albums.php?action=show&album=" . scrub_out($this->id) . "\" title=\"" . scrub_out($this->full_name) . "\">" . scrub_out($this->f_name);
|
$this->f_name_link = "<a href=\"$web_path/albums.php?action=show&album=" . scrub_out($this->id) . "\" title=\"" . scrub_out($this->full_name) . "\">" . scrub_out($this->f_name);
|
||||||
// If we've got a disk append it
|
// If we've got a disk append it
|
||||||
if ($this->disk) {
|
if ($this->disk) {
|
||||||
$this->f_name_link .= " <span class=\"discnb disc" .$this->disk. "\">[" . _('Disk') . " " . $this->disk . "]</span>";
|
$this->f_name_link .= " <span class=\"discnb disc" .$this->disk. "\">[" . T_('Disk') . " " . $this->disk . "]</span>";
|
||||||
}
|
}
|
||||||
$this->f_name_link .="</a>";
|
$this->f_name_link .="</a>";
|
||||||
|
|
||||||
|
@ -260,8 +260,8 @@ class Album extends database_object {
|
||||||
$this->f_artist = $artist;
|
$this->f_artist = $artist;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->f_artist_link = "<span title=\"$this->artist_count " . _('Artists') . "\">" . _('Various') . "</span>";
|
$this->f_artist_link = "<span title=\"$this->artist_count " . T_('Artists') . "\">" . T_('Various') . "</span>";
|
||||||
$this->f_artist = _('Various');
|
$this->f_artist = T_('Various');
|
||||||
$this->f_artist_name = $this->f_artist;
|
$this->f_artist_name = $this->f_artist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,10 +80,10 @@ class AmpacheRSS {
|
||||||
*/
|
*/
|
||||||
public function get_title() {
|
public function get_title() {
|
||||||
|
|
||||||
$titles = array('now_playing'=>_('Now Playing'),
|
$titles = array('now_playing' => T_('Now Playing'),
|
||||||
'recently_played'=>_('Recently Played'),
|
'recently_played' => T_('Recently Played'),
|
||||||
'latest_album'=>_('Newest Albums'),
|
'latest_album' => T_('Newest Albums'),
|
||||||
'latest_artist'=>_('Newest Artists'));
|
'latest_artist' => T_('Newest Artists'));
|
||||||
|
|
||||||
return scrub_out(Config::get('site_title')) . ' - ' . $titles[$this->type];
|
return scrub_out(Config::get('site_title')) . ' - ' . $titles[$this->type];
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ class AmpacheRSS {
|
||||||
// Default to now playing
|
// Default to now playing
|
||||||
$type = self::validate_type($type);
|
$type = self::validate_type($type);
|
||||||
|
|
||||||
$string = '<a href="' . Config::get('web_path') . '/rss.php?type=' . $type . '">' . get_user_icon('feed',_('RSS Feed')) . '</a>';
|
$string = '<a href="' . Config::get('web_path') . '/rss.php?type=' . $type . '">' . get_user_icon('feed', T_('RSS Feed')) . '</a>';
|
||||||
|
|
||||||
return $string;
|
return $string;
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ class AmpacheRSS {
|
||||||
|
|
||||||
//FIXME: The time stuff should be centralized, it's currently in two places, lame
|
//FIXME: The time stuff should be centralized, it's currently in two places, lame
|
||||||
|
|
||||||
$time_unit = array('',_('seconds ago'),_('minutes ago'),_('hours ago'),_('days ago'),_('weeks ago'),_('months ago'),_('years ago'));
|
$time_unit = array('', T_('seconds ago'), T_('minutes ago'), T_('hours ago'), T_('days ago'), T_('weeks ago'), T_('months ago'), T_('years ago'));
|
||||||
$data = Song::get_recently_played();
|
$data = Song::get_recently_played();
|
||||||
|
|
||||||
$results = array();
|
$results = array();
|
||||||
|
|
|
@ -132,7 +132,7 @@ class Api {
|
||||||
|
|
||||||
if (intval($version) < self::$version) {
|
if (intval($version) < self::$version) {
|
||||||
debug_event('API', 'Login Failed: version too old', 1);
|
debug_event('API', 'Login Failed: version too old', 1);
|
||||||
Error::add('api', _('Login Failed: version too old'));
|
Error::add('api', T_('Login Failed: version too old'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ class Api {
|
||||||
if (($timestamp < (time() - 1800)) ||
|
if (($timestamp < (time() - 1800)) ||
|
||||||
($timestamp > (time() + 1800))) {
|
($timestamp > (time() + 1800))) {
|
||||||
debug_event('API', 'Login Failed: timestamp out of range', 1);
|
debug_event('API', 'Login Failed: timestamp out of range', 1);
|
||||||
Error::add('api', _('Login Failed: timestamp out of range'));
|
Error::add('api', T_('Login Failed: timestamp out of range'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ class Api {
|
||||||
|
|
||||||
if (!$row['password']) {
|
if (!$row['password']) {
|
||||||
debug_event('API', 'Unable to find user with userid of ' . $user_id, 1);
|
debug_event('API', 'Unable to find user with userid of ' . $user_id, 1);
|
||||||
Error::add('api', _('Invalid Username/Password'));
|
Error::add('api', T_('Invalid Username/Password'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ class Api {
|
||||||
} // end while
|
} // end while
|
||||||
|
|
||||||
debug_event('API','Login Failed, unable to match passphrase','1');
|
debug_event('API','Login Failed, unable to match passphrase','1');
|
||||||
xmlData::error('401',_('Error Invalid Handshake - ') . _('Invalid Username/Password'));
|
xmlData::error('401', T_('Error Invalid Handshake - ') . T_('Invalid Username/Password'));
|
||||||
|
|
||||||
} // handshake
|
} // handshake
|
||||||
|
|
||||||
|
@ -659,7 +659,7 @@ class Api {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// They are doing it wrong
|
// They are doing it wrong
|
||||||
echo xmlData::error('405',_('Invalid Request'));
|
echo xmlData::error('405', T_('Invalid Request'));
|
||||||
break;
|
break;
|
||||||
} // end switch on command
|
} // end switch on command
|
||||||
|
|
||||||
|
@ -680,7 +680,7 @@ class Api {
|
||||||
$type = 'song';
|
$type = 'song';
|
||||||
$media = new $type($input['oid']);
|
$media = new $type($input['oid']);
|
||||||
if (!$media->id) {
|
if (!$media->id) {
|
||||||
echo xmlData::error('400',_('Media Object Invalid or Not Specified'));
|
echo xmlData::error('400', T_('Media Object Invalid or Not Specified'));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$democratic->vote(array(array('song',$media->id)));
|
$democratic->vote(array(array('song',$media->id)));
|
||||||
|
@ -693,7 +693,7 @@ class Api {
|
||||||
$type = 'song';
|
$type = 'song';
|
||||||
$media = new $type($input['oid']);
|
$media = new $type($input['oid']);
|
||||||
if (!$media->id) {
|
if (!$media->id) {
|
||||||
echo xmlData::error('400',_('Media Object Invalid or Not Specified'));
|
echo xmlData::error('400', T_('Media Object Invalid or Not Specified'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$uid = $democratic->get_uid_from_object_id($media->id,$type);
|
$uid = $democratic->get_uid_from_object_id($media->id,$type);
|
||||||
|
@ -715,7 +715,7 @@ class Api {
|
||||||
echo xmlData::keyed_array($xml_array);
|
echo xmlData::keyed_array($xml_array);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
echo xmlData::error('405',_('Invalid Request'));
|
echo xmlData::error('405', T_('Invalid Request'));
|
||||||
break;
|
break;
|
||||||
} // switch on method
|
} // switch on method
|
||||||
|
|
||||||
|
|
|
@ -1000,7 +1000,7 @@ class Art extends database_object {
|
||||||
$handle = opendir($dir);
|
$handle = opendir($dir);
|
||||||
|
|
||||||
if (!$handle) {
|
if (!$handle) {
|
||||||
Error::add('general',_('Error: Unable to open') . ' ' . $dir);
|
Error::add('general', T_('Error: Unable to open') . ' ' . $dir);
|
||||||
debug_event('folder_art', "Error: Unable to open $dir for album art read", 2);
|
debug_event('folder_art', "Error: Unable to open $dir for album art read", 2);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -376,7 +376,7 @@ class Artist extends database_object {
|
||||||
// check for fault
|
// check for fault
|
||||||
if ($client->fault) {
|
if ($client->fault) {
|
||||||
debug_event("lyrics", "Can't get lyrics", "1");
|
debug_event("lyrics", "Can't get lyrics", "1");
|
||||||
return $results = "<h2>" . _('Fault') . "</h2>" . print_r($result);
|
return $results = "<h2>" . T_('Fault') . "</h2>" . print_r($result);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// check for errors
|
// check for errors
|
||||||
|
@ -384,12 +384,12 @@ class Artist extends database_object {
|
||||||
|
|
||||||
if ($err) {
|
if ($err) {
|
||||||
debug_event("lyrics", "Getting error: $err", "1");
|
debug_event("lyrics", "Getting error: $err", "1");
|
||||||
return $results = "<h2>" . _('Error') . "</h2>" . $err;
|
return $results = "<h2>" . T_('Error') . "</h2>" . $err;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// if returned "Not found" do not add
|
// if returned "Not found" do not add
|
||||||
if($result['lyrics'] == "Not found") {
|
if($result['lyrics'] == "Not found") {
|
||||||
$sorry = _('Sorry Lyrics Not Found.');
|
$sorry = T_('Sorry Lyrics Not Found.');
|
||||||
return $sorry;
|
return $sorry;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -137,84 +137,84 @@ class Browse extends Query {
|
||||||
// Switch on the type of browsing we're doing
|
// Switch on the type of browsing we're doing
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'song':
|
case 'song':
|
||||||
show_box_top(_('Songs') . $match, $class);
|
show_box_top(T_('Songs') . $match, $class);
|
||||||
Song::build_cache($object_ids);
|
Song::build_cache($object_ids);
|
||||||
require_once Config::get('prefix') . '/templates/show_songs.inc.php';
|
require_once Config::get('prefix') . '/templates/show_songs.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'album':
|
case 'album':
|
||||||
show_box_top(_('Albums') . $match, $class);
|
show_box_top(T_('Albums') . $match, $class);
|
||||||
Album::build_cache($object_ids,'extra');
|
Album::build_cache($object_ids,'extra');
|
||||||
require_once Config::get('prefix') . '/templates/show_albums.inc.php';
|
require_once Config::get('prefix') . '/templates/show_albums.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'user':
|
case 'user':
|
||||||
show_box_top(_('Manage Users') . $match, $class);
|
show_box_top(T_('Manage Users') . $match, $class);
|
||||||
require_once Config::get('prefix') . '/templates/show_users.inc.php';
|
require_once Config::get('prefix') . '/templates/show_users.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'artist':
|
case 'artist':
|
||||||
show_box_top(_('Artists') . $match, $class);
|
show_box_top(T_('Artists') . $match, $class);
|
||||||
Artist::build_cache($object_ids,'extra');
|
Artist::build_cache($object_ids,'extra');
|
||||||
require_once Config::get('prefix') . '/templates/show_artists.inc.php';
|
require_once Config::get('prefix') . '/templates/show_artists.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'live_stream':
|
case 'live_stream':
|
||||||
require_once Config::get('prefix') . '/templates/show_live_stream.inc.php';
|
require_once Config::get('prefix') . '/templates/show_live_stream.inc.php';
|
||||||
show_box_top(_('Radio Stations') . $match, $class);
|
show_box_top(T_('Radio Stations') . $match, $class);
|
||||||
require_once Config::get('prefix') . '/templates/show_live_streams.inc.php';
|
require_once Config::get('prefix') . '/templates/show_live_streams.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'playlist':
|
case 'playlist':
|
||||||
Playlist::build_cache($object_ids);
|
Playlist::build_cache($object_ids);
|
||||||
show_box_top(_('Playlists') . $match, $class);
|
show_box_top(T_('Playlists') . $match, $class);
|
||||||
require_once Config::get('prefix') . '/templates/show_playlists.inc.php';
|
require_once Config::get('prefix') . '/templates/show_playlists.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'playlist_song':
|
case 'playlist_song':
|
||||||
show_box_top(_('Playlist Songs') . $match,$class);
|
show_box_top(T_('Playlist Songs') . $match,$class);
|
||||||
require_once Config::get('prefix') . '/templates/show_playlist_songs.inc.php';
|
require_once Config::get('prefix') . '/templates/show_playlist_songs.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'playlist_localplay':
|
case 'playlist_localplay':
|
||||||
show_box_top(_('Current Playlist'));
|
show_box_top(T_('Current Playlist'));
|
||||||
require_once Config::get('prefix') . '/templates/show_localplay_playlist.inc.php';
|
require_once Config::get('prefix') . '/templates/show_localplay_playlist.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'smartplaylist':
|
case 'smartplaylist':
|
||||||
show_box_top(_('Smart Playlists') . $match, $class);
|
show_box_top(T_('Smart Playlists') . $match, $class);
|
||||||
require_once Config::get('prefix') . '/templates/show_smartplaylists.inc.php';
|
require_once Config::get('prefix') . '/templates/show_smartplaylists.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'catalog':
|
case 'catalog':
|
||||||
show_box_top(_('Catalogs'), $class);
|
show_box_top(T_('Catalogs'), $class);
|
||||||
require_once Config::get('prefix') . '/templates/show_catalogs.inc.php';
|
require_once Config::get('prefix') . '/templates/show_catalogs.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'shoutbox':
|
case 'shoutbox':
|
||||||
show_box_top(_('Shoutbox Records'),$class);
|
show_box_top(T_('Shoutbox Records'),$class);
|
||||||
require_once Config::get('prefix') . '/templates/show_manage_shoutbox.inc.php';
|
require_once Config::get('prefix') . '/templates/show_manage_shoutbox.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'flagged':
|
case 'flagged':
|
||||||
show_box_top(_('Flagged Records'),$class);
|
show_box_top(T_('Flagged Records'),$class);
|
||||||
require_once Config::get('prefix') . '/templates/show_flagged.inc.php';
|
require_once Config::get('prefix') . '/templates/show_flagged.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'tag':
|
case 'tag':
|
||||||
Tag::build_cache($tags);
|
Tag::build_cache($tags);
|
||||||
show_box_top(_('Tag Cloud'),$class);
|
show_box_top(T_('Tag Cloud'),$class);
|
||||||
require_once Config::get('prefix') . '/templates/show_tagcloud.inc.php';
|
require_once Config::get('prefix') . '/templates/show_tagcloud.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'video':
|
case 'video':
|
||||||
Video::build_cache($object_ids);
|
Video::build_cache($object_ids);
|
||||||
show_box_top(_('Videos'),$class);
|
show_box_top(T_('Videos'),$class);
|
||||||
require_once Config::get('prefix') . '/templates/show_videos.inc.php';
|
require_once Config::get('prefix') . '/templates/show_videos.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
break;
|
break;
|
||||||
case 'democratic':
|
case 'democratic':
|
||||||
show_box_top(_('Democratic Playlist'),$class);
|
show_box_top(T_('Democratic Playlist'),$class);
|
||||||
require_once Config::get('prefix') . '/templates/show_democratic_playlist.inc.php';
|
require_once Config::get('prefix') . '/templates/show_democratic_playlist.inc.php';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -170,9 +170,9 @@ class Catalog extends database_object {
|
||||||
$this->f_name = truncate_with_ellipsis($this->name,Config::get('ellipse_threshold_title'));
|
$this->f_name = truncate_with_ellipsis($this->name,Config::get('ellipse_threshold_title'));
|
||||||
$this->f_name_link = '<a href="' . Config::get('web_path') . '/admin/catalog.php?action=show_customize_catalog&catalog_id=' . $this->id . '" title="' . scrub_out($this->name) . '">' . scrub_out($this->f_name) . '</a>';
|
$this->f_name_link = '<a href="' . Config::get('web_path') . '/admin/catalog.php?action=show_customize_catalog&catalog_id=' . $this->id . '" title="' . scrub_out($this->name) . '">' . scrub_out($this->f_name) . '</a>';
|
||||||
$this->f_path = truncate_with_ellipsis($this->path,Config::get('ellipse_threshold_title'));
|
$this->f_path = truncate_with_ellipsis($this->path,Config::get('ellipse_threshold_title'));
|
||||||
$this->f_update = $this->last_update ? date('d/m/Y h:i',$this->last_update) : _('Never');
|
$this->f_update = $this->last_update ? date('d/m/Y h:i',$this->last_update) : T_('Never');
|
||||||
$this->f_add = $this->last_add ? date('d/m/Y h:i',$this->last_add) : _('Never');
|
$this->f_add = $this->last_add ? date('d/m/Y h:i',$this->last_add) : T_('Never');
|
||||||
$this->f_clean = $this->last_clean ? date('d/m/Y h:i',$this->last_clean) : _('Never');
|
$this->f_clean = $this->last_clean ? date('d/m/Y h:i',$this->last_clean) : T_('Never');
|
||||||
|
|
||||||
} // format
|
} // format
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ class Catalog extends database_object {
|
||||||
|
|
||||||
// Make sure the path is readable/exists
|
// Make sure the path is readable/exists
|
||||||
if (!is_readable($data['path']) AND $data['type'] == 'local') {
|
if (!is_readable($data['path']) AND $data['type'] == 'local') {
|
||||||
Error::add('general', sprintf(_('Error: %s is not readable or does not exist'), scrub_out($data['path'])));
|
Error::add('general', sprintf(T_('Error: %s is not readable or does not exist'), scrub_out($data['path'])));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ class Catalog extends database_object {
|
||||||
$db_results = Dba::read($sql);
|
$db_results = Dba::read($sql);
|
||||||
|
|
||||||
if (Dba::num_rows($db_results)) {
|
if (Dba::num_rows($db_results)) {
|
||||||
Error::add('general', sprintf(_('Error: Catalog with %s already exists'), $path));
|
Error::add('general', sprintf(T_('Error: Catalog with %s already exists'), $path));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ class Catalog extends database_object {
|
||||||
$insert_id = Dba::insert_id();
|
$insert_id = Dba::insert_id();
|
||||||
|
|
||||||
if (!$insert_id) {
|
if (!$insert_id) {
|
||||||
Error::add('general', _('Catalog Insert Failed check debug logs'));
|
Error::add('general', T_('Catalog Insert Failed check debug logs'));
|
||||||
debug_event('catalog','SQL Failed:' . $sql,'3');
|
debug_event('catalog','SQL Failed:' . $sql,'3');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ class Catalog extends database_object {
|
||||||
public function run_add($options) {
|
public function run_add($options) {
|
||||||
|
|
||||||
if ($this->catalog_type == 'remote') {
|
if ($this->catalog_type == 'remote') {
|
||||||
show_box_top(_('Running Remote Sync') . '. . .');
|
show_box_top(T_('Running Remote Sync') . '. . .');
|
||||||
$this->get_remote_catalog($type=0);
|
$this->get_remote_catalog($type=0);
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
return true;
|
return true;
|
||||||
|
@ -496,14 +496,14 @@ class Catalog extends database_object {
|
||||||
|
|
||||||
if (!is_resource($handle)) {
|
if (!is_resource($handle)) {
|
||||||
debug_event('read', "Unable to open $path", 5,'ampache-catalog');
|
debug_event('read', "Unable to open $path", 5,'ampache-catalog');
|
||||||
Error::add('catalog_add', sprintf(_('Error: Unable to open %s'), $path));
|
Error::add('catalog_add', sprintf(T_('Error: Unable to open %s'), $path));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change the dir so is_dir works correctly */
|
/* Change the dir so is_dir works correctly */
|
||||||
if (!chdir($path)) {
|
if (!chdir($path)) {
|
||||||
debug_event('read', "Unable to chdir $path", 2,'ampache-catalog');
|
debug_event('read', "Unable to chdir $path", 2,'ampache-catalog');
|
||||||
Error::add('catalog_add', sprintf(_('Error: Unable to change to directory %s'), $path));
|
Error::add('catalog_add', sprintf(T_('Error: Unable to change to directory %s'), $path));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -549,7 +549,7 @@ class Catalog extends database_object {
|
||||||
/* Change the dir so is_dir works correctly */
|
/* Change the dir so is_dir works correctly */
|
||||||
if (!chdir($path)) {
|
if (!chdir($path)) {
|
||||||
debug_event('read',"Unable to chdir $path",'2','ampache-catalog');
|
debug_event('read',"Unable to chdir $path",'2','ampache-catalog');
|
||||||
Error::add('catalog_add', sprintf(_('Error: Unable to change to directory %s'), $path));
|
Error::add('catalog_add', sprintf(T_('Error: Unable to change to directory %s'), $path));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Skip to the next file */
|
/* Skip to the next file */
|
||||||
|
@ -586,14 +586,14 @@ class Catalog extends database_object {
|
||||||
if (!$file_size) {
|
if (!$file_size) {
|
||||||
debug_event('read',"Unable to get filesize for $full_file",'2','ampache-catalog');
|
debug_event('read',"Unable to get filesize for $full_file",'2','ampache-catalog');
|
||||||
/* HINT: FullFile */
|
/* HINT: FullFile */
|
||||||
Error::add('catalog_add', sprintf(_('Error: Unable to get filesize for %s'), $full_file));
|
Error::add('catalog_add', sprintf(T_('Error: Unable to get filesize for %s'), $full_file));
|
||||||
} // file_size check
|
} // file_size check
|
||||||
|
|
||||||
if (!is_readable($full_file)) {
|
if (!is_readable($full_file)) {
|
||||||
// not readable, warn user
|
// not readable, warn user
|
||||||
debug_event('read',"$full_file is not readable by ampache",'2','ampache-catalog');
|
debug_event('read',"$full_file is not readable by ampache",'2','ampache-catalog');
|
||||||
/* HINT: FullFile */
|
/* HINT: FullFile */
|
||||||
Error::add('catalog_add', sprintf(_('%s is not readable by ampache'), $full_file));
|
Error::add('catalog_add', sprintf(T_('%s is not readable by ampache'), $full_file));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -602,7 +602,7 @@ class Catalog extends database_object {
|
||||||
if (strcmp($full_file,iconv(Config::get('site_charset'),Config::get('site_charset'),$full_file)) != '0') {
|
if (strcmp($full_file,iconv(Config::get('site_charset'),Config::get('site_charset'),$full_file)) != '0') {
|
||||||
debug_event('read',$full_file . ' has non-' . Config::get('site_charset') . ' characters and can not be indexed, converted filename:' . iconv(Config::get('site_charset'),Config::get('site_charset'),$full_file),'1');
|
debug_event('read',$full_file . ' has non-' . Config::get('site_charset') . ' characters and can not be indexed, converted filename:' . iconv(Config::get('site_charset'),Config::get('site_charset'),$full_file),'1');
|
||||||
/* HINT: FullFile */
|
/* HINT: FullFile */
|
||||||
Error::add('catalog_add', sprintf(_('%s does not match site charset'), $full_file));
|
Error::add('catalog_add', sprintf(T_('%s does not match site charset'), $full_file));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} // end if iconv
|
} // end if iconv
|
||||||
|
@ -1079,14 +1079,14 @@ class Catalog extends database_object {
|
||||||
if ($info['change']) {
|
if ($info['change']) {
|
||||||
$file = scrub_out($song->file);
|
$file = scrub_out($song->file);
|
||||||
echo "<dl>\n\t<dd>";
|
echo "<dl>\n\t<dd>";
|
||||||
echo "<strong>$file " . _('Updated') . "</strong>\n";
|
echo "<strong>$file " . T_('Updated') . "</strong>\n";
|
||||||
echo $info['text'];
|
echo $info['text'];
|
||||||
echo "\t</dd>\n</dl><hr align=\"left\" width=\"50%\" />";
|
echo "\t</dd>\n</dl><hr align=\"left\" width=\"50%\" />";
|
||||||
flush();
|
flush();
|
||||||
} // if change
|
} // if change
|
||||||
else {
|
else {
|
||||||
echo"<dl>\n\t<dd>";
|
echo"<dl>\n\t<dd>";
|
||||||
echo "<strong>" . scrub_out($song->file) . "</strong><br />" . _('No Update Needed') . "\n";
|
echo "<strong>" . scrub_out($song->file) . "</strong><br />" . T_('No Update Needed') . "\n";
|
||||||
echo "\t</dd>\n</dl><hr align=\"left\" width=\"50%\" />";
|
echo "\t</dd>\n</dl><hr align=\"left\" width=\"50%\" />";
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
|
@ -1221,7 +1221,7 @@ class Catalog extends database_object {
|
||||||
public function add_to_catalog() {
|
public function add_to_catalog() {
|
||||||
|
|
||||||
if ($this->catalog_type == 'remote') {
|
if ($this->catalog_type == 'remote') {
|
||||||
show_box_top(_('Running Remote Update') . '. . .');
|
show_box_top(T_('Running Remote Update') . '. . .');
|
||||||
$this->get_remote_catalog($type=0);
|
$this->get_remote_catalog($type=0);
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
return true;
|
return true;
|
||||||
|
@ -1248,7 +1248,7 @@ class Catalog extends database_object {
|
||||||
if ($this->import_m3u($full_file)) {
|
if ($this->import_m3u($full_file)) {
|
||||||
$file = basename($full_file);
|
$file = basename($full_file);
|
||||||
if ($verbose) {
|
if ($verbose) {
|
||||||
echo " " . _('Added Playlist From') . " $file . . . .<br />\n";
|
echo " " . T_('Added Playlist From') . " $file . . . .<br />\n";
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
} // end if import worked
|
} // end if import worked
|
||||||
|
@ -1277,8 +1277,8 @@ class Catalog extends database_object {
|
||||||
}
|
}
|
||||||
|
|
||||||
show_box_top();
|
show_box_top();
|
||||||
echo "\n<br />" . _('Catalog Update Finished') . "... " . _('Total Time') . " [" . date("i:s",$time_diff) . "] " .
|
echo "\n<br />" . T_('Catalog Update Finished') . "... " . T_('Total Time') . " [" . date("i:s",$time_diff) . "] " .
|
||||||
_('Total Songs') . " [" . $this->count . "] " . _('Songs Per Seconds') . " [" . $song_per_sec . "]<br /><br />";
|
T_('Total Songs') . " [" . $this->count . "] " . T_('Songs Per Seconds') . " [" . $song_per_sec . "]<br /><br />";
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
|
|
||||||
} // add_to_catalog
|
} // add_to_catalog
|
||||||
|
@ -1301,7 +1301,7 @@ class Catalog extends database_object {
|
||||||
|
|
||||||
if ($remote_handle->state() != 'CONNECTED') {
|
if ($remote_handle->state() != 'CONNECTED') {
|
||||||
debug_event('APICLIENT','Error Unable to make API client ready','1');
|
debug_event('APICLIENT','Error Unable to make API client ready','1');
|
||||||
Error::add('general',_('Error Connecting to Remote Server'));
|
Error::add('general', T_('Error Connecting to Remote Server'));
|
||||||
Error::display('general');
|
Error::display('general');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1310,7 +1310,7 @@ class Catalog extends database_object {
|
||||||
$remote_catalog_info = $remote_handle->info();
|
$remote_catalog_info = $remote_handle->info();
|
||||||
|
|
||||||
// Tell em what we've found johnny!
|
// Tell em what we've found johnny!
|
||||||
printf(_('%u remote catalog(s) found (%u songs)'),$remote_catalog_info['catalogs'],$remote_catalog_info['songs']);
|
printf(T_('%u remote catalog(s) found (%u songs)'),$remote_catalog_info['catalogs'],$remote_catalog_info['songs']);
|
||||||
flush();
|
flush();
|
||||||
|
|
||||||
// Hardcoded for now
|
// Hardcoded for now
|
||||||
|
@ -1334,14 +1334,14 @@ class Catalog extends database_object {
|
||||||
foreach ($songs as $data) {
|
foreach ($songs as $data) {
|
||||||
if (!$this->insert_remote_song($data['song'])) {
|
if (!$this->insert_remote_song($data['song'])) {
|
||||||
debug_event('REMOTE_INSERT','Remote Insert failed, see previous log messages -' . $data['song']['self']['id'],'1');
|
debug_event('REMOTE_INSERT','Remote Insert failed, see previous log messages -' . $data['song']['self']['id'],'1');
|
||||||
Error::add('general',_('Unable to Insert Song - %s'),$data['song']['title']);
|
Error::add('general', T_('Unable to Insert Song - %s'),$data['song']['title']);
|
||||||
Error::display('general');
|
Error::display('general');
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
} // end foreach
|
} // end foreach
|
||||||
} // end while
|
} // end while
|
||||||
|
|
||||||
echo "<p>" . _('Completed updating remote catalog(s)') . ".</p><hr />\n";
|
echo "<p>" . T_('Completed updating remote catalog(s)') . ".</p><hr />\n";
|
||||||
flush();
|
flush();
|
||||||
|
|
||||||
// Update the last update value
|
// Update the last update value
|
||||||
|
@ -1384,7 +1384,7 @@ class Catalog extends database_object {
|
||||||
// mount points fail
|
// mount points fail
|
||||||
if ($this->catalog_type == 'local' && !is_readable($this->path)) {
|
if ($this->catalog_type == 'local' && !is_readable($this->path)) {
|
||||||
debug_event('catalog', 'Catalog path:' . $this->path . ' unreadable, clean failed', 1);
|
debug_event('catalog', 'Catalog path:' . $this->path . ' unreadable, clean failed', 1);
|
||||||
Error::add('general',_('Catalog Root unreadable, stopping clean'));
|
Error::add('general', T_('Catalog Root unreadable, stopping clean'));
|
||||||
Error::display('general');
|
Error::display('general');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1408,7 +1408,7 @@ class Catalog extends database_object {
|
||||||
// Never remove everything; it might be a dead mount
|
// Never remove everything; it might be a dead mount
|
||||||
if ($dead_count >= $total) {
|
if ($dead_count >= $total) {
|
||||||
debug_event('catalog', 'All files would be removed. Doing nothing.', 1);
|
debug_event('catalog', 'All files would be removed. Doing nothing.', 1);
|
||||||
Error::add('general', _('All files would be removed. Doing nothing'));
|
Error::add('general', T_('All files would be removed. Doing nothing'));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($dead_count) {
|
if ($dead_count) {
|
||||||
|
@ -1462,7 +1462,7 @@ class Catalog extends database_object {
|
||||||
$file_info = filesize($results['file']);
|
$file_info = filesize($results['file']);
|
||||||
if (!file_exists($results['file']) || $file_info < 1) {
|
if (!file_exists($results['file']) || $file_info < 1) {
|
||||||
debug_event('clean', 'File not found or empty: ' . $results['file'], 5, 'ampache-catalog');
|
debug_event('clean', 'File not found or empty: ' . $results['file'], 5, 'ampache-catalog');
|
||||||
Error::add('general', sprintf(_('Error File Not Found or 0 Bytes: %s'), $results['file']));
|
Error::add('general', sprintf(T_('Error File Not Found or 0 Bytes: %s'), $results['file']));
|
||||||
|
|
||||||
|
|
||||||
// Store it in an array we'll delete it later...
|
// Store it in an array we'll delete it later...
|
||||||
|
@ -1479,7 +1479,7 @@ class Catalog extends database_object {
|
||||||
|
|
||||||
if ($file_info == false) {
|
if ($file_info == false) {
|
||||||
/* Add Error */
|
/* Add Error */
|
||||||
Error::add('general', sprintf(_('Error Remote File Not Found or 0 Bytes: %s'), $results['file']));
|
Error::add('general', sprintf(T_('Error Remote File Not Found or 0 Bytes: %s'), $results['file']));
|
||||||
|
|
||||||
|
|
||||||
// Store it in an array we'll delete it later...
|
// Store it in an array we'll delete it later...
|
||||||
|
@ -1696,7 +1696,7 @@ class Catalog extends database_object {
|
||||||
|
|
||||||
show_box_top();
|
show_box_top();
|
||||||
echo '<strong>';
|
echo '<strong>';
|
||||||
printf(_('Catalog Verify Done. %d of %d files updated.'), $total_updated, $number);
|
printf(T_('Catalog Verify Done. %d of %d files updated.'), $total_updated, $number);
|
||||||
echo "</strong><br />\n";
|
echo "</strong><br />\n";
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
ob_flush();
|
ob_flush();
|
||||||
|
@ -1737,7 +1737,7 @@ class Catalog extends database_object {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_readable($row['file'])) {
|
if (!is_readable($row['file'])) {
|
||||||
Error::add('general', sprintf(_('%s does not exist or is not readable'), $row['file']));
|
Error::add('general', sprintf(T_('%s does not exist or is not readable'), $row['file']));
|
||||||
debug_event('read', $row['file'] . ' does not exist or is not readable', 5,'ampache-catalog');
|
debug_event('read', $row['file'] . ' does not exist or is not readable', 5,'ampache-catalog');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1835,7 +1835,7 @@ class Catalog extends database_object {
|
||||||
|
|
||||||
/* Ohh no the artist has lost it's mojo! */
|
/* Ohh no the artist has lost it's mojo! */
|
||||||
if (!$artist) {
|
if (!$artist) {
|
||||||
$artist = _('Unknown (Orphaned)');
|
$artist = T_('Unknown (Orphaned)');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the prefix so we can sort it correctly
|
// Remove the prefix so we can sort it correctly
|
||||||
|
@ -1890,7 +1890,7 @@ class Catalog extends database_object {
|
||||||
$sql = "UPDATE `artist` SET `mbid`='$mbid' WHERE `id`='$artist_id'";
|
$sql = "UPDATE `artist` SET `mbid`='$mbid' WHERE `id`='$artist_id'";
|
||||||
$db_results = Dba::write($sql);
|
$db_results = Dba::write($sql);
|
||||||
if (!$db_results) {
|
if (!$db_results) {
|
||||||
Error::add('general', sprintf(_('Updating Artist: %s'), $artist));
|
Error::add('general', sprintf(T_('Updating Artist: %s'), $artist));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1911,7 +1911,7 @@ class Catalog extends database_object {
|
||||||
$artist_id = Dba::insert_id();
|
$artist_id = Dba::insert_id();
|
||||||
|
|
||||||
if (!$db_results) {
|
if (!$db_results) {
|
||||||
Error::add('general', sprintf(_('Inserting Artist: %s'), $artist));
|
Error::add('general', sprintf(T_('Inserting Artist: %s'), $artist));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // not found
|
} // not found
|
||||||
|
@ -1943,7 +1943,7 @@ class Catalog extends database_object {
|
||||||
|
|
||||||
/* Ohh no the album has lost its mojo */
|
/* Ohh no the album has lost its mojo */
|
||||||
if (!$album) {
|
if (!$album) {
|
||||||
$album = _('Unknown (Orphaned)');
|
$album = T_('Unknown (Orphaned)');
|
||||||
unset($album_year, $album_disk);
|
unset($album_year, $album_disk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2091,7 +2091,7 @@ class Catalog extends database_object {
|
||||||
|
|
||||||
if (!$db_results) {
|
if (!$db_results) {
|
||||||
debug_event('insert',"Unable to insert $file -- $sql" . Dba::error(),'5','ampache-catalog');
|
debug_event('insert',"Unable to insert $file -- $sql" . Dba::error(),'5','ampache-catalog');
|
||||||
Error::add('catalog_add', sprintf(_('SQL Error Adding %s'), $file));
|
Error::add('catalog_add', sprintf(T_('SQL Error Adding %s'), $file));
|
||||||
}
|
}
|
||||||
|
|
||||||
$song_id = Dba::insert_id();
|
$song_id = Dba::insert_id();
|
||||||
|
@ -2314,7 +2314,7 @@ class Catalog extends database_object {
|
||||||
$playlist_id = Playlist::create($name,'public');
|
$playlist_id = Playlist::create($name,'public');
|
||||||
|
|
||||||
if (!$playlist_id) {
|
if (!$playlist_id) {
|
||||||
$reason = _('Playlist creation error.');
|
$reason = T_('Playlist creation error.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ class Config {
|
||||||
|
|
||||||
if (isset(self::$_global[$name]) && !$clobber) {
|
if (isset(self::$_global[$name]) && !$clobber) {
|
||||||
debug_event('Config', "Tried to overwrite existing key $name without setting clobber", 5);
|
debug_event('Config', "Tried to overwrite existing key $name without setting clobber", 5);
|
||||||
Error::add('Config Global', sprintf(_('Trying to clobber \'%s\' without setting clobber'), $name));
|
Error::add('Config Global', sprintf(T_('Trying to clobber \'%s\' without setting clobber'), $name));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,24 +150,24 @@ class Democratic extends tmpPlaylist {
|
||||||
*/
|
*/
|
||||||
public function format() {
|
public function format() {
|
||||||
|
|
||||||
$this->f_cooldown = $this->cooldown . ' ' . _('minutes');
|
$this->f_cooldown = $this->cooldown . ' ' . T_('minutes');
|
||||||
$this->f_primary = $this->primary ? _('Primary') : '';
|
$this->f_primary = $this->primary ? T_('Primary') : '';
|
||||||
|
|
||||||
switch ($this->level) {
|
switch ($this->level) {
|
||||||
case '5':
|
case '5':
|
||||||
$this->f_level = _('Guest');
|
$this->f_level = T_('Guest');
|
||||||
break;
|
break;
|
||||||
case '25':
|
case '25':
|
||||||
$this->f_level = _('User');
|
$this->f_level = T_('User');
|
||||||
break;
|
break;
|
||||||
case '50':
|
case '50':
|
||||||
$this->f_level = _('Content Manager');
|
$this->f_level = T_('Content Manager');
|
||||||
break;
|
break;
|
||||||
case '75':
|
case '75':
|
||||||
$this->f_level = _('Catalog Manager');
|
$this->f_level = T_('Catalog Manager');
|
||||||
break;
|
break;
|
||||||
case '100':
|
case '100':
|
||||||
$this->f_level = _('Admin');
|
$this->f_level = T_('Admin');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -322,8 +322,8 @@ class Flag extends database_object {
|
||||||
*/
|
*/
|
||||||
public function print_status() {
|
public function print_status() {
|
||||||
|
|
||||||
if ($this->approved) { echo _('Approved'); }
|
if ($this->approved) { echo T_('Approved'); }
|
||||||
else { echo _('Pending'); }
|
else { echo T_('Pending'); }
|
||||||
|
|
||||||
} // print_status
|
} // print_status
|
||||||
|
|
||||||
|
@ -335,19 +335,19 @@ class Flag extends database_object {
|
||||||
|
|
||||||
switch ($this->flag) {
|
switch ($this->flag) {
|
||||||
case 'delete':
|
case 'delete':
|
||||||
$name = _('Delete');
|
$name = T_('Delete');
|
||||||
break;
|
break;
|
||||||
case 'retag':
|
case 'retag':
|
||||||
$name = _('Re-Tag');
|
$name = T_('Re-Tag');
|
||||||
break;
|
break;
|
||||||
case 'reencode':
|
case 'reencode':
|
||||||
$name = _('Re-encode');
|
$name = T_('Re-encode');
|
||||||
break;
|
break;
|
||||||
case 'other':
|
case 'other':
|
||||||
$name = _('Other');
|
$name = T_('Other');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$name = _('Unknown');
|
$name = T_('Unknown');
|
||||||
break;
|
break;
|
||||||
} // end switch
|
} // end switch
|
||||||
|
|
||||||
|
|
|
@ -653,16 +653,16 @@ class Localplay {
|
||||||
|
|
||||||
switch ($state) {
|
switch ($state) {
|
||||||
case 'play':
|
case 'play':
|
||||||
return _('Now Playing');
|
return T_('Now Playing');
|
||||||
break;
|
break;
|
||||||
case 'stop':
|
case 'stop':
|
||||||
return _('Stopped');
|
return T_('Stopped');
|
||||||
break;
|
break;
|
||||||
case 'pause':
|
case 'pause':
|
||||||
return _('Paused');
|
return T_('Paused');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return _('Unknown');
|
return T_('Unknown');
|
||||||
break;
|
break;
|
||||||
} // switch on state
|
} // switch on state
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ abstract class playlist_object extends database_object {
|
||||||
public function format() {
|
public function format() {
|
||||||
|
|
||||||
$this->f_name = truncate_with_ellipsis($this->name,Config::get('ellipse_threshold_title'));
|
$this->f_name = truncate_with_ellipsis($this->name,Config::get('ellipse_threshold_title'));
|
||||||
$this->f_type = ($this->type == 'private') ? get_user_icon('lock',_('Private')) : '';
|
$this->f_type = ($this->type == 'private') ? get_user_icon('lock', T_('Private')) : '';
|
||||||
|
|
||||||
$client = new User($this->user);
|
$client = new User($this->user);
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ class Query {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Error::add('browse', _('Browse not found or expired, try reloading the page'));
|
Error::add('browse', T_('Browse not found or expired, try reloading the page'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,11 +92,11 @@ class Radio extends database_object implements media {
|
||||||
|
|
||||||
// Verify the incoming data
|
// Verify the incoming data
|
||||||
if (!$data['id']) {
|
if (!$data['id']) {
|
||||||
Error::add('general', _('Missing ID'));
|
Error::add('general', T_('Missing ID'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$data['name']) {
|
if (!$data['name']) {
|
||||||
Error::add('general', _('Name Required'));
|
Error::add('general', T_('Name Required'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$allowed_array = array('https','http','mms','mmsh','mmsu','mmst','rtsp');
|
$allowed_array = array('https','http','mms','mmsh','mmsu','mmst','rtsp');
|
||||||
|
@ -104,7 +104,7 @@ class Radio extends database_object implements media {
|
||||||
$elements = explode(":",$data['url']);
|
$elements = explode(":",$data['url']);
|
||||||
|
|
||||||
if (!in_array($elements['0'],$allowed_array)) {
|
if (!in_array($elements['0'],$allowed_array)) {
|
||||||
Error::add('general', _('Invalid URL must be mms:// , https:// or http://'));
|
Error::add('general', T_('Invalid URL must be mms:// , https:// or http://'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Error::occurred()) {
|
if (Error::occurred()) {
|
||||||
|
@ -136,7 +136,7 @@ class Radio extends database_object implements media {
|
||||||
|
|
||||||
// Make sure we've got a name
|
// Make sure we've got a name
|
||||||
if (!strlen($data['name'])) {
|
if (!strlen($data['name'])) {
|
||||||
Error::add('name', _('Name Required'));
|
Error::add('name', T_('Name Required'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$allowed_array = array('https','http','mms','mmsh','mmsu','mmst','rtsp');
|
$allowed_array = array('https','http','mms','mmsh','mmsu','mmst','rtsp');
|
||||||
|
@ -144,13 +144,13 @@ class Radio extends database_object implements media {
|
||||||
$elements = explode(":",$data['url']);
|
$elements = explode(":",$data['url']);
|
||||||
|
|
||||||
if (!in_array($elements['0'],$allowed_array)) {
|
if (!in_array($elements['0'],$allowed_array)) {
|
||||||
Error::add('url', _('Invalid URL must be http:// or https://'));
|
Error::add('url', T_('Invalid URL must be http:// or https://'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure it's a real catalog
|
// Make sure it's a real catalog
|
||||||
$catalog = new Catalog($data['catalog']);
|
$catalog = new Catalog($data['catalog']);
|
||||||
if (!$catalog->name) {
|
if (!$catalog->name) {
|
||||||
Error::add('catalog', _('Invalid Catalog'));
|
Error::add('catalog', T_('Invalid Catalog'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Error::occurred()) { return false; }
|
if (Error::occurred()) { return false; }
|
||||||
|
|
|
@ -368,16 +368,16 @@ class Random implements media {
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'album':
|
case 'album':
|
||||||
return _('Related Album');
|
return T_('Related Album');
|
||||||
break;
|
break;
|
||||||
case 'genre':
|
case 'genre':
|
||||||
return _('Related Genre');
|
return T_('Related Genre');
|
||||||
break;
|
break;
|
||||||
case 'artist':
|
case 'artist':
|
||||||
return _('Related Artist');
|
return T_('Related Artist');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return _('Pure Random');
|
return T_('Pure Random');
|
||||||
break;
|
break;
|
||||||
} // end switch
|
} // end switch
|
||||||
|
|
||||||
|
|
|
@ -59,9 +59,9 @@ class Registration {
|
||||||
// We are the system
|
// We are the system
|
||||||
$mailer->set_default_sender();
|
$mailer->set_default_sender();
|
||||||
|
|
||||||
$mailer->subject = sprintf(_("New User Registration at %s"), Config::get('site_title'));
|
$mailer->subject = sprintf(T_("New User Registration at %s"), Config::get('site_title'));
|
||||||
|
|
||||||
$mailer->message = sprintf(_("Thank you for registering\n\n
|
$mailer->message = sprintf(T_("Thank you for registering\n\n
|
||||||
Please keep this e-mail for your records. Your account information is as follows:
|
Please keep this e-mail for your records. Your account information is as follows:
|
||||||
----------------------
|
----------------------
|
||||||
Username: %s
|
Username: %s
|
||||||
|
@ -82,7 +82,7 @@ Thank you for registering
|
||||||
|
|
||||||
// Check to see if the admin should be notified
|
// Check to see if the admin should be notified
|
||||||
if (Config::get('admin_notify_reg')) {
|
if (Config::get('admin_notify_reg')) {
|
||||||
$mailer->message = sprintf(_("A new user has registered
|
$mailer->message = sprintf(T_("A new user has registered
|
||||||
The following values were entered.
|
The following values were entered.
|
||||||
|
|
||||||
Username: %s
|
Username: %s
|
||||||
|
|
|
@ -53,55 +53,55 @@ class Search extends playlist_object {
|
||||||
|
|
||||||
$this->basetypes['numeric'][] = array(
|
$this->basetypes['numeric'][] = array(
|
||||||
'name' => 'gte',
|
'name' => 'gte',
|
||||||
'description' => _('is greater than or equal to'),
|
'description' => T_('is greater than or equal to'),
|
||||||
'sql' => '>='
|
'sql' => '>='
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->basetypes['numeric'][] = array(
|
$this->basetypes['numeric'][] = array(
|
||||||
'name' => 'lte',
|
'name' => 'lte',
|
||||||
'description' => _('is less than or equal to'),
|
'description' => T_('is less than or equal to'),
|
||||||
'sql' => '<='
|
'sql' => '<='
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->basetypes['numeric'][] = array(
|
$this->basetypes['numeric'][] = array(
|
||||||
'name' => 'equal',
|
'name' => 'equal',
|
||||||
'description' => _('is'),
|
'description' => T_('is'),
|
||||||
'sql' => '<=>'
|
'sql' => '<=>'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->basetypes['numeric'][] = array(
|
$this->basetypes['numeric'][] = array(
|
||||||
'name' => 'ne',
|
'name' => 'ne',
|
||||||
'description' => _('is not'),
|
'description' => T_('is not'),
|
||||||
'sql' => '<>'
|
'sql' => '<>'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->basetypes['numeric'][] = array(
|
$this->basetypes['numeric'][] = array(
|
||||||
'name' => 'gt',
|
'name' => 'gt',
|
||||||
'description' => _('is greater than'),
|
'description' => T_('is greater than'),
|
||||||
'sql' => '>'
|
'sql' => '>'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->basetypes['numeric'][] = array(
|
$this->basetypes['numeric'][] = array(
|
||||||
'name' => 'lt',
|
'name' => 'lt',
|
||||||
'description' => _('is less than'),
|
'description' => T_('is less than'),
|
||||||
'sql' => '<'
|
'sql' => '<'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$this->basetypes['boolean'][] = array(
|
$this->basetypes['boolean'][] = array(
|
||||||
'name' => 'true',
|
'name' => 'true',
|
||||||
'description' => _('is true')
|
'description' => T_('is true')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->basetypes['boolean'][] = array(
|
$this->basetypes['boolean'][] = array(
|
||||||
'name' => 'false',
|
'name' => 'false',
|
||||||
'description' => _('is false')
|
'description' => T_('is false')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$this->basetypes['text'][] = array(
|
$this->basetypes['text'][] = array(
|
||||||
'name' => 'contain',
|
'name' => 'contain',
|
||||||
'description' => _('contains'),
|
'description' => T_('contains'),
|
||||||
'sql' => 'LIKE',
|
'sql' => 'LIKE',
|
||||||
'preg_match' => array('/^/','/$/'),
|
'preg_match' => array('/^/','/$/'),
|
||||||
'preg_replace' => array('%', '%')
|
'preg_replace' => array('%', '%')
|
||||||
|
@ -109,7 +109,7 @@ class Search extends playlist_object {
|
||||||
|
|
||||||
$this->basetypes['text'][] = array(
|
$this->basetypes['text'][] = array(
|
||||||
'name' => 'notcontain',
|
'name' => 'notcontain',
|
||||||
'description' => _('does not contain'),
|
'description' => T_('does not contain'),
|
||||||
'sql' => 'NOT LIKE',
|
'sql' => 'NOT LIKE',
|
||||||
'preg_match' => array('/^/','/$/'),
|
'preg_match' => array('/^/','/$/'),
|
||||||
'preg_replace' => array('%', '%')
|
'preg_replace' => array('%', '%')
|
||||||
|
@ -117,7 +117,7 @@ class Search extends playlist_object {
|
||||||
|
|
||||||
$this->basetypes['text'][] = array(
|
$this->basetypes['text'][] = array(
|
||||||
'name' => 'start',
|
'name' => 'start',
|
||||||
'description' => _('starts with'),
|
'description' => T_('starts with'),
|
||||||
'sql' => 'LIKE',
|
'sql' => 'LIKE',
|
||||||
'preg_match' => '/$/',
|
'preg_match' => '/$/',
|
||||||
'preg_replace' => '%'
|
'preg_replace' => '%'
|
||||||
|
@ -125,7 +125,7 @@ class Search extends playlist_object {
|
||||||
|
|
||||||
$this->basetypes['text'][] = array(
|
$this->basetypes['text'][] = array(
|
||||||
'name' => 'end',
|
'name' => 'end',
|
||||||
'description' => _('ends with'),
|
'description' => T_('ends with'),
|
||||||
'sql' => 'LIKE',
|
'sql' => 'LIKE',
|
||||||
'preg_match' => '/^/',
|
'preg_match' => '/^/',
|
||||||
'preg_replace' => '%'
|
'preg_replace' => '%'
|
||||||
|
@ -133,58 +133,58 @@ class Search extends playlist_object {
|
||||||
|
|
||||||
$this->basetypes['text'][] = array(
|
$this->basetypes['text'][] = array(
|
||||||
'name' => 'equal',
|
'name' => 'equal',
|
||||||
'description' => _('is'),
|
'description' => T_('is'),
|
||||||
'sql' => '='
|
'sql' => '='
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->basetypes['text'][] = array(
|
$this->basetypes['text'][] = array(
|
||||||
'name' => 'sounds',
|
'name' => 'sounds',
|
||||||
'description' => _('sounds like'),
|
'description' => T_('sounds like'),
|
||||||
'sql' => 'SOUNDS LIKE'
|
'sql' => 'SOUNDS LIKE'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->basetypes['text'][] = array(
|
$this->basetypes['text'][] = array(
|
||||||
'name' => 'notsounds',
|
'name' => 'notsounds',
|
||||||
'description' => _('does not sound like'),
|
'description' => T_('does not sound like'),
|
||||||
'sql' => 'NOT SOUNDS LIKE'
|
'sql' => 'NOT SOUNDS LIKE'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$this->basetypes['boolean_numeric'][] = array(
|
$this->basetypes['boolean_numeric'][] = array(
|
||||||
'name' => 'equal',
|
'name' => 'equal',
|
||||||
'description' => _('is'),
|
'description' => T_('is'),
|
||||||
'sql' => '<=>'
|
'sql' => '<=>'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->basetypes['boolean_numeric'][] = array(
|
$this->basetypes['boolean_numeric'][] = array(
|
||||||
'name' => 'ne',
|
'name' => 'ne',
|
||||||
'description' => _('is not'),
|
'description' => T_('is not'),
|
||||||
'sql' => '<>'
|
'sql' => '<>'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$this->basetypes['boolean_subsearch'][] = array(
|
$this->basetypes['boolean_subsearch'][] = array(
|
||||||
'name' => 'equal',
|
'name' => 'equal',
|
||||||
'description' => _('is'),
|
'description' => T_('is'),
|
||||||
'sql' => ''
|
'sql' => ''
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->basetypes['boolean_subsearch'][] = array(
|
$this->basetypes['boolean_subsearch'][] = array(
|
||||||
'name' => 'ne',
|
'name' => 'ne',
|
||||||
'description' => _('is not'),
|
'description' => T_('is not'),
|
||||||
'sql' => 'NOT'
|
'sql' => 'NOT'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$this->basetypes['date'][] = array(
|
$this->basetypes['date'][] = array(
|
||||||
'name' => 'lt',
|
'name' => 'lt',
|
||||||
'description' => _('before'),
|
'description' => T_('before'),
|
||||||
'sql' => '>'
|
'sql' => '>'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->basetypes['date'][] = array(
|
$this->basetypes['date'][] = array(
|
||||||
'name' => 'gt',
|
'name' => 'gt',
|
||||||
'description' => _('after'),
|
'description' => T_('after'),
|
||||||
'sql' => '>'
|
'sql' => '>'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -192,35 +192,35 @@ class Search extends playlist_object {
|
||||||
case 'song':
|
case 'song':
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'anywhere',
|
'name' => 'anywhere',
|
||||||
'label' => _('Any searchable text'),
|
'label' => T_('Any searchable text'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'title',
|
'name' => 'title',
|
||||||
'label' => _('Title'),
|
'label' => T_('Title'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'album',
|
'name' => 'album',
|
||||||
'label' => _('Album'),
|
'label' => T_('Album'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'artist',
|
'name' => 'artist',
|
||||||
'label' => _('Artist'),
|
'label' => T_('Artist'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'comment',
|
'name' => 'comment',
|
||||||
'label' => _('Comment'),
|
'label' => T_('Comment'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
@ -228,28 +228,28 @@ class Search extends playlist_object {
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'tag',
|
'name' => 'tag',
|
||||||
'label' => _('Tag'),
|
'label' => T_('Tag'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'file',
|
'name' => 'file',
|
||||||
'label' => _('Filename'),
|
'label' => T_('Filename'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'year',
|
'name' => 'year',
|
||||||
'label' => _('Year'),
|
'label' => T_('Year'),
|
||||||
'type' => 'numeric',
|
'type' => 'numeric',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'time',
|
'name' => 'time',
|
||||||
'label' => _('Length (in minutes)'),
|
'label' => T_('Length (in minutes)'),
|
||||||
'type' => 'numeric',
|
'type' => 'numeric',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
@ -257,7 +257,7 @@ class Search extends playlist_object {
|
||||||
if (Config::get('ratings')) {
|
if (Config::get('ratings')) {
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'rating',
|
'name' => 'rating',
|
||||||
'label' => _('Rating'),
|
'label' => T_('Rating'),
|
||||||
'type' => 'numeric',
|
'type' => 'numeric',
|
||||||
'widget' => array(
|
'widget' => array(
|
||||||
'select',
|
'select',
|
||||||
|
@ -274,7 +274,7 @@ class Search extends playlist_object {
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'bitrate',
|
'name' => 'bitrate',
|
||||||
'label' => _('Bitrate'),
|
'label' => T_('Bitrate'),
|
||||||
'type' => 'numeric',
|
'type' => 'numeric',
|
||||||
'widget' => array(
|
'widget' => array(
|
||||||
'select',
|
'select',
|
||||||
|
@ -299,21 +299,21 @@ class Search extends playlist_object {
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'played',
|
'name' => 'played',
|
||||||
'label' => _('Played'),
|
'label' => T_('Played'),
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'widget' => array('input', 'hidden')
|
'widget' => array('input', 'hidden')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'added',
|
'name' => 'added',
|
||||||
'label' => _('Added'),
|
'label' => T_('Added'),
|
||||||
'type' => 'date',
|
'type' => 'date',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'updated',
|
'name' => 'updated',
|
||||||
'label' => _('Updated'),
|
'label' => T_('Updated'),
|
||||||
'type' => 'date',
|
'type' => 'date',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
@ -326,7 +326,7 @@ class Search extends playlist_object {
|
||||||
}
|
}
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'catalog',
|
'name' => 'catalog',
|
||||||
'label' => _('Catalog'),
|
'label' => T_('Catalog'),
|
||||||
'type' => 'boolean_numeric',
|
'type' => 'boolean_numeric',
|
||||||
'widget' => array('select', $catalogs)
|
'widget' => array('select', $catalogs)
|
||||||
);
|
);
|
||||||
|
@ -339,7 +339,7 @@ class Search extends playlist_object {
|
||||||
}
|
}
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'playlist',
|
'name' => 'playlist',
|
||||||
'label' => _('Playlist'),
|
'label' => T_('Playlist'),
|
||||||
'type' => 'boolean_numeric',
|
'type' => 'boolean_numeric',
|
||||||
'widget' => array('select', $playlists)
|
'widget' => array('select', $playlists)
|
||||||
);
|
);
|
||||||
|
@ -352,7 +352,7 @@ class Search extends playlist_object {
|
||||||
}
|
}
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'smartplaylist',
|
'name' => 'smartplaylist',
|
||||||
'label' => _('Smart Playlist'),
|
'label' => T_('Smart Playlist'),
|
||||||
'type' => 'boolean_subsearch',
|
'type' => 'boolean_subsearch',
|
||||||
'widget' => array('select', $playlists)
|
'widget' => array('select', $playlists)
|
||||||
);
|
);
|
||||||
|
@ -360,14 +360,14 @@ class Search extends playlist_object {
|
||||||
case 'album':
|
case 'album':
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'title',
|
'name' => 'title',
|
||||||
'label' => _('Title'),
|
'label' => T_('Title'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'year',
|
'name' => 'year',
|
||||||
'label' => _('Year'),
|
'label' => T_('Year'),
|
||||||
'type' => 'numeric',
|
'type' => 'numeric',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
@ -375,7 +375,7 @@ class Search extends playlist_object {
|
||||||
if (Config::get('ratings')) {
|
if (Config::get('ratings')) {
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'rating',
|
'name' => 'rating',
|
||||||
'label' => _('Rating'),
|
'label' => T_('Rating'),
|
||||||
'type' => 'numeric',
|
'type' => 'numeric',
|
||||||
'widget' => array(
|
'widget' => array(
|
||||||
'select',
|
'select',
|
||||||
|
@ -398,7 +398,7 @@ class Search extends playlist_object {
|
||||||
}
|
}
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'catalog',
|
'name' => 'catalog',
|
||||||
'label' => _('Catalog'),
|
'label' => T_('Catalog'),
|
||||||
'type' => 'boolean_numeric',
|
'type' => 'boolean_numeric',
|
||||||
'widget' => array('select', $catalogs)
|
'widget' => array('select', $catalogs)
|
||||||
);
|
);
|
||||||
|
@ -406,7 +406,7 @@ class Search extends playlist_object {
|
||||||
|
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'tag',
|
'name' => 'tag',
|
||||||
'label' => _('Tag'),
|
'label' => T_('Tag'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
@ -414,7 +414,7 @@ class Search extends playlist_object {
|
||||||
case 'video':
|
case 'video':
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'filename',
|
'name' => 'filename',
|
||||||
'label' => _('Filename'),
|
'label' => T_('Filename'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
@ -422,13 +422,13 @@ class Search extends playlist_object {
|
||||||
case 'artist':
|
case 'artist':
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
'label' => _('Name'),
|
'label' => T_('Name'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
$this->types[] = array(
|
$this->types[] = array(
|
||||||
'name' => 'tag',
|
'name' => 'tag',
|
||||||
'label' => _('Tag'),
|
'label' => T_('Tag'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'widget' => array('input', 'text')
|
'widget' => array('input', 'text')
|
||||||
);
|
);
|
||||||
|
|
|
@ -417,7 +417,7 @@ class Update {
|
||||||
|
|
||||||
if (!$update_needed) {
|
if (!$update_needed) {
|
||||||
if (!defined('CLI')) { echo '<p align="center">'; }
|
if (!defined('CLI')) { echo '<p align="center">'; }
|
||||||
echo _('No updates needed.');
|
echo T_('No updates needed.');
|
||||||
if (!defined('CLI')) {
|
if (!defined('CLI')) {
|
||||||
echo '[<a href="', Config::get('web_path'), '">Return</a>]</p>';
|
echo '[<a href="', Config::get('web_path'), '">Return</a>]</p>';
|
||||||
}
|
}
|
||||||
|
@ -446,7 +446,7 @@ class Update {
|
||||||
/* Verify that there are no plugins installed
|
/* Verify that there are no plugins installed
|
||||||
//FIXME: provide a link to remove all plugins, otherwise this could turn into a catch 22
|
//FIXME: provide a link to remove all plugins, otherwise this could turn into a catch 22
|
||||||
if (!$self::plugins_installed()) {
|
if (!$self::plugins_installed()) {
|
||||||
$GLOBALS['error']->add_error('general',_('Plugins detected, please remove all Plugins and try again'));
|
$GLOBALS['error']->add_error('general', T_('Plugins detected, please remove all Plugins and try again'));
|
||||||
return false;
|
return false;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
|
|
|
@ -408,11 +408,11 @@ class User extends database_object {
|
||||||
public function update($data) {
|
public function update($data) {
|
||||||
|
|
||||||
if (empty($data['username'])) {
|
if (empty($data['username'])) {
|
||||||
Error::add('username',_('Error Username Required'));
|
Error::add('username', T_('Error Username Required'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($data['password1'] != $data['password2'] AND !empty($data['password1'])) {
|
if ($data['password1'] != $data['password2'] AND !empty($data['password1'])) {
|
||||||
Error::add('password',_("Error Passwords don't match"));
|
Error::add('password', T_("Error Passwords don't match"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Error::occurred()) {
|
if (Error::occurred()) {
|
||||||
|
@ -696,11 +696,11 @@ class User extends database_object {
|
||||||
public function format() {
|
public function format() {
|
||||||
|
|
||||||
/* If they have a last seen date */
|
/* If they have a last seen date */
|
||||||
if (!$this->last_seen) { $this->f_last_seen = _('Never'); }
|
if (!$this->last_seen) { $this->f_last_seen = T_('Never'); }
|
||||||
else { $this->f_last_seen = date("m\/d\/Y - H:i",$this->last_seen); }
|
else { $this->f_last_seen = date("m\/d\/Y - H:i",$this->last_seen); }
|
||||||
|
|
||||||
/* If they have a create date */
|
/* If they have a create date */
|
||||||
if (!$this->create_date) { $this->f_create_date = _('Unknown'); }
|
if (!$this->create_date) { $this->f_create_date = T_('Unknown'); }
|
||||||
else { $this->f_create_date = date("m\/d\/Y - H:i",$this->create_date); }
|
else { $this->f_create_date = date("m\/d\/Y - H:i",$this->create_date); }
|
||||||
|
|
||||||
// Base link
|
// Base link
|
||||||
|
@ -722,7 +722,7 @@ class User extends database_object {
|
||||||
$this->ip_history = inet_ntop($data['0']['ip']);
|
$this->ip_history = inet_ntop($data['0']['ip']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->ip_history = _('Not Enough Data');
|
$this->ip_history = T_('Not Enough Data');
|
||||||
}
|
}
|
||||||
|
|
||||||
} // format_user
|
} // format_user
|
||||||
|
|
|
@ -91,7 +91,7 @@ class Video extends database_object implements media {
|
||||||
$this->f_codec = $this->video_codec . ' / ' . $this->audio_codec;
|
$this->f_codec = $this->video_codec . ' / ' . $this->audio_codec;
|
||||||
$this->f_resolution = $this->resolution_x . 'x' . $this->resolution_y;
|
$this->f_resolution = $this->resolution_x . 'x' . $this->resolution_y;
|
||||||
$this->f_tags = '';
|
$this->f_tags = '';
|
||||||
$this->f_length = floor($this->time/60) . ' ' . _('minutes');
|
$this->f_length = floor($this->time/60) . ' ' . T_('minutes');
|
||||||
|
|
||||||
} // format
|
} // format
|
||||||
|
|
||||||
|
|
|
@ -238,7 +238,7 @@ function get_languages() {
|
||||||
case 'ar_SA'; $name = 'العربية'; break; /* Arabic */
|
case 'ar_SA'; $name = 'العربية'; break; /* Arabic */
|
||||||
case 'he_IL'; $name = 'עברית'; break; /* Hebrew */
|
case 'he_IL'; $name = 'עברית'; break; /* Hebrew */
|
||||||
case 'fa_IR'; $name = 'فارسي'; break; /* Farsi */
|
case 'fa_IR'; $name = 'فارسي'; break; /* Farsi */
|
||||||
default: $name = _('Unknown'); break;
|
default: $name = T_('Unknown'); break;
|
||||||
} // end switch
|
} // end switch
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ function install_check_status($configfile) {
|
||||||
if (!file_exists($configfile)) {
|
if (!file_exists($configfile)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
Error::add('general',_('Config file already exists, install is probably completed'));
|
Error::add('general', T_('Config file already exists, install is probably completed'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -86,14 +86,14 @@ function install_check_status($configfile) {
|
||||||
$dbh = check_database($results['database_hostname'],$results['database_username'],$results['database_password']);
|
$dbh = check_database($results['database_hostname'],$results['database_username'],$results['database_password']);
|
||||||
|
|
||||||
if (!is_resource($dbh)) {
|
if (!is_resource($dbh)) {
|
||||||
Error::add('general',_('Unable to connect to database, check your ampache config'));
|
Error::add('general', T_('Unable to connect to database, check your ampache config'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$select_db = mysql_select_db($results['database_name'],$dbh);
|
$select_db = mysql_select_db($results['database_name'],$dbh);
|
||||||
|
|
||||||
if (!$select_db) {
|
if (!$select_db) {
|
||||||
Error::add('general',_('Unable to select database, check your ampache config'));
|
Error::add('general', T_('Unable to select database, check your ampache config'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ function install_check_status($configfile) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Error::add('general',_('Existing Database detected, unable to continue installation'));
|
Error::add('general', T_('Existing Database detected, unable to continue installation'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false
|
||||||
$is_valid = preg_match("/([^\d\w\_\-])/",$database,$matches);
|
$is_valid = preg_match("/([^\d\w\_\-])/",$database,$matches);
|
||||||
|
|
||||||
if (count($matches)) {
|
if (count($matches)) {
|
||||||
Error::add('general',_('Error: Database name invalid must not be a reserved word, and must be Alphanumeric'));
|
Error::add('general', T_('Error: Database name invalid must not be a reserved word, and must be Alphanumeric'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false
|
||||||
$dbh = Dba::dbh();
|
$dbh = Dba::dbh();
|
||||||
|
|
||||||
if (!is_resource($dbh)) {
|
if (!is_resource($dbh)) {
|
||||||
Error::add('general', sprintf(_('Error: Unable to make Database Connection %s'), mysql_error()));
|
Error::add('general', sprintf(T_('Error: Unable to make Database Connection %s'), mysql_error()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,13 +151,13 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false
|
||||||
// Rien a faire, we've got the db just blow through
|
// Rien a faire, we've got the db just blow through
|
||||||
}
|
}
|
||||||
elseif ($db_selected && !$_POST['overwrite_db']) {
|
elseif ($db_selected && !$_POST['overwrite_db']) {
|
||||||
Error::add('general',_('Error: Database Already exists and Overwrite not checked'));
|
Error::add('general', T_('Error: Database Already exists and Overwrite not checked'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
elseif (!$db_selected) {
|
elseif (!$db_selected) {
|
||||||
$sql = "CREATE DATABASE `" . Dba::escape($database) . "`";
|
$sql = "CREATE DATABASE `" . Dba::escape($database) . "`";
|
||||||
if (!$db_results = @mysql_query($sql, $dbh)) {
|
if (!$db_results = @mysql_query($sql, $dbh)) {
|
||||||
Error::add('general',sprintf(_('Error: Unable to Create Database %s'), mysql_error()));
|
Error::add('general',sprintf(T_('Error: Unable to Create Database %s'), mysql_error()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@mysql_select_db($database, $dbh);
|
@mysql_select_db($database, $dbh);
|
||||||
|
@ -167,7 +167,7 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false
|
||||||
$db_results = @mysql_query($sql,$dbh);
|
$db_results = @mysql_query($sql,$dbh);
|
||||||
$sql = "CREATE DATABASE `" . Dba::escape($database) . "`";
|
$sql = "CREATE DATABASE `" . Dba::escape($database) . "`";
|
||||||
if (!$db_results = @mysql_query($sql, $dbh)) {
|
if (!$db_results = @mysql_query($sql, $dbh)) {
|
||||||
Error::add('general', sprintf(_('Error: Unable to Create Database %s'), mysql_error()));
|
Error::add('general', sprintf(T_('Error: Unable to Create Database %s'), mysql_error()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@mysql_select_db($database, $dbh);
|
@mysql_select_db($database, $dbh);
|
||||||
|
@ -180,7 +180,7 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false
|
||||||
$db_pass = $_POST['db_password'] ? $_POST['db_password'] : $dbpass;
|
$db_pass = $_POST['db_password'] ? $_POST['db_password'] : $dbpass;
|
||||||
|
|
||||||
if (!strlen($db_user) || !strlen($db_pass)) {
|
if (!strlen($db_user) || !strlen($db_pass)) {
|
||||||
Error::add('general',_('Error: Ampache SQL Username or Password missing'));
|
Error::add('general', T_('Error: Ampache SQL Username or Password missing'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ function install_insert_db($username,$password,$hostname,$database,$dbuser=false
|
||||||
|
|
||||||
if (!$db_results = @mysql_query($sql, $dbh)) {
|
if (!$db_results = @mysql_query($sql, $dbh)) {
|
||||||
// HINT: 1: db_user, 2: database, 3: hostname, 4: mysql_error()
|
// HINT: 1: db_user, 2: database, 3: hostname, 4: mysql_error()
|
||||||
Error::add('general', sprintf(_('Error: Unable to Insert %1$s with permissions to %2$s on %3$s %4$s'), $db_user, $database, $hostname, mysql_error()));
|
Error::add('general', sprintf(T_('Error: Unable to Insert %1$s with permissions to %2$s on %3$s %4$s'), $db_user, $database, $hostname, mysql_error()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} // end if we are creating a user
|
} // end if we are creating a user
|
||||||
|
@ -258,11 +258,11 @@ function install_create_config($web_path,$username,$password,$hostname,$database
|
||||||
*/
|
*/
|
||||||
// Connect to the DB
|
// Connect to the DB
|
||||||
if(!is_resource($dbh)) {
|
if(!is_resource($dbh)) {
|
||||||
Error::add('general', _("Database Connection Failed Check Hostname, Username and Password"));
|
Error::add('general', T_("Database Connection Failed Check Hostname, Username and Password"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!@mysql_select_db($database, $dbh)) {
|
if (!@mysql_select_db($database, $dbh)) {
|
||||||
Error::add('general', sprintf(_('Database Selection Failure Check Existance of %s'), $database));
|
Error::add('general', sprintf(T_('Database Selection Failure Check Existance of %s'), $database));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,13 +271,13 @@ function install_create_config($web_path,$username,$password,$hostname,$database
|
||||||
// Make sure the directory is writable OR the empty config file is
|
// Make sure the directory is writable OR the empty config file is
|
||||||
if (!$download) {
|
if (!$download) {
|
||||||
if (!check_config_writable()) {
|
if (!check_config_writable()) {
|
||||||
Error::add('general', _("Config file is not writable"));
|
Error::add('general', T_("Config file is not writable"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Given that $final is > 0, we can ignore lazy comparison problems
|
// Given that $final is > 0, we can ignore lazy comparison problems
|
||||||
if (!file_put_contents($config_file,$final)) {
|
if (!file_put_contents($config_file,$final)) {
|
||||||
Error::add('general', _("Error Writing config file"));
|
Error::add('general', T_("Error Writing config file"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -300,26 +300,26 @@ function install_create_config($web_path,$username,$password,$hostname,$database
|
||||||
function install_create_account($username,$password,$password2) {
|
function install_create_account($username,$password,$password2) {
|
||||||
|
|
||||||
if (!strlen($username) OR !strlen($password)) {
|
if (!strlen($username) OR !strlen($password)) {
|
||||||
Error::add('general',_('No Username/Password specified'));
|
Error::add('general', T_('No Username/Password specified'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($password !== $password2) {
|
if ($password !== $password2) {
|
||||||
Error::add('general',_('Passwords do not match'));
|
Error::add('general', T_('Passwords do not match'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$dbh = Dba::dbh();
|
$dbh = Dba::dbh();
|
||||||
|
|
||||||
if (!is_resource($dbh)) {
|
if (!is_resource($dbh)) {
|
||||||
Error::add('general', sprintf(_('Database Connection Failed: %s'), mysql_error()));
|
Error::add('general', sprintf(T_('Database Connection Failed: %s'), mysql_error()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db_select = @mysql_select_db(Config::get('database_name'),$dbh);
|
$db_select = @mysql_select_db(Config::get('database_name'),$dbh);
|
||||||
|
|
||||||
if (!$db_select) {
|
if (!$db_select) {
|
||||||
Error::add('general', sprintf(_('Database Select Failed: %s'), mysql_error()));
|
Error::add('general', sprintf(T_('Database Select Failed: %s'), mysql_error()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ function install_create_account($username,$password,$password2) {
|
||||||
$insert_id = User::create($username,'Administrator','',$password,'100');
|
$insert_id = User::create($username,'Administrator','',$password,'100');
|
||||||
|
|
||||||
if (!$insert_id) {
|
if (!$insert_id) {
|
||||||
Error::add('general', sprintf(_('Insert of Base User Failed %s'), mysql_error()));
|
Error::add('general', sprintf(T_('Insert of Base User Failed %s'), mysql_error()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,5 +47,5 @@ echo 'var types = $H(\'';
|
||||||
echo arrayToJSON($search->types) . "'.evalJSON());\n";
|
echo arrayToJSON($search->types) . "'.evalJSON());\n";
|
||||||
echo 'var basetypes = $H(\'';
|
echo 'var basetypes = $H(\'';
|
||||||
echo arrayToJSON($search->basetypes) . "'.evalJSON());\n";
|
echo arrayToJSON($search->basetypes) . "'.evalJSON());\n";
|
||||||
echo 'removeIcon = \'<a href="javascript: void(0)">' . get_user_icon('disable', _('Remove')) . '</a>\';';
|
echo 'removeIcon = \'<a href="javascript: void(0)">' . get_user_icon('disable', T_('Remove')) . '</a>\';';
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -171,8 +171,8 @@ function create_preference_input($name,$value) {
|
||||||
if ($value == '1') { $is_true = "selected=\"selected\""; }
|
if ($value == '1') { $is_true = "selected=\"selected\""; }
|
||||||
else { $is_false = "selected=\"selected\""; }
|
else { $is_false = "selected=\"selected\""; }
|
||||||
echo "<select name=\"$name\">\n";
|
echo "<select name=\"$name\">\n";
|
||||||
echo "\t<option value=\"1\" $is_true>" . _("Enable") . "</option>\n";
|
echo "\t<option value=\"1\" $is_true>" . T_("Enable") . "</option>\n";
|
||||||
echo "\t<option value=\"0\" $is_false>" . _("Disable") . "</option>\n";
|
echo "\t<option value=\"0\" $is_false>" . T_("Disable") . "</option>\n";
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
break;
|
break;
|
||||||
case 'play_type':
|
case 'play_type':
|
||||||
|
@ -181,29 +181,29 @@ function create_preference_input($name,$value) {
|
||||||
elseif ($value == 'xspf_player') { $is_xspf_player = 'selected="selected"'; }
|
elseif ($value == 'xspf_player') { $is_xspf_player = 'selected="selected"'; }
|
||||||
else { $is_stream = "selected=\"selected\""; }
|
else { $is_stream = "selected=\"selected\""; }
|
||||||
echo "<select name=\"$name\">\n";
|
echo "<select name=\"$name\">\n";
|
||||||
echo "\t<option value=\"\">" . _('None') . "</option>\n";
|
echo "\t<option value=\"\">" . T_('None') . "</option>\n";
|
||||||
if (Config::get('allow_stream_playback')) {
|
if (Config::get('allow_stream_playback')) {
|
||||||
echo "\t<option value=\"stream\" $is_stream>" . _('Stream') . "</option>\n";
|
echo "\t<option value=\"stream\" $is_stream>" . T_('Stream') . "</option>\n";
|
||||||
}
|
}
|
||||||
if (Config::get('allow_democratic_playback')) {
|
if (Config::get('allow_democratic_playback')) {
|
||||||
echo "\t<option value=\"democratic\" $is_vote>" . _('Democratic') . "</option>\n";
|
echo "\t<option value=\"democratic\" $is_vote>" . T_('Democratic') . "</option>\n";
|
||||||
}
|
}
|
||||||
if (Config::get('allow_localplay_playback')) {
|
if (Config::get('allow_localplay_playback')) {
|
||||||
echo "\t<option value=\"localplay\" $is_local>" . _('Localplay') . "</option>\n";
|
echo "\t<option value=\"localplay\" $is_local>" . T_('Localplay') . "</option>\n";
|
||||||
}
|
}
|
||||||
echo "\t<option value=\"xspf_player\" $is_xspf_player>" . _('Flash Player') . "</option>\n";
|
echo "\t<option value=\"xspf_player\" $is_xspf_player>" . T_('Flash Player') . "</option>\n";
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
break;
|
break;
|
||||||
case 'playlist_type':
|
case 'playlist_type':
|
||||||
$var_name = $value . "_type";
|
$var_name = $value . "_type";
|
||||||
${$var_name} = "selected=\"selected\"";
|
${$var_name} = "selected=\"selected\"";
|
||||||
echo "<select name=\"$name\">\n";
|
echo "<select name=\"$name\">\n";
|
||||||
echo "\t<option value=\"m3u\" $m3u_type>" . _('M3U') . "</option>\n";
|
echo "\t<option value=\"m3u\" $m3u_type>" . T_('M3U') . "</option>\n";
|
||||||
echo "\t<option value=\"simple_m3u\" $simple_m3u_type>" . _('Simple M3U') . "</option>\n";
|
echo "\t<option value=\"simple_m3u\" $simple_m3u_type>" . T_('Simple M3U') . "</option>\n";
|
||||||
echo "\t<option value=\"pls\" $pls_type>" . _('PLS') . "</option>\n";
|
echo "\t<option value=\"pls\" $pls_type>" . T_('PLS') . "</option>\n";
|
||||||
echo "\t<option value=\"asx\" $asx_type>" . _('Asx') . "</option>\n";
|
echo "\t<option value=\"asx\" $asx_type>" . T_('Asx') . "</option>\n";
|
||||||
echo "\t<option value=\"ram\" $ram_type>" . _('RAM') . "</option>\n";
|
echo "\t<option value=\"ram\" $ram_type>" . T_('RAM') . "</option>\n";
|
||||||
echo "\t<option value=\"xspf\" $xspf_type>" . _('XSPF') . "</option>\n";
|
echo "\t<option value=\"xspf\" $xspf_type>" . T_('XSPF') . "</option>\n";
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
break;
|
break;
|
||||||
case 'lang':
|
case 'lang':
|
||||||
|
@ -219,7 +219,7 @@ function create_preference_input($name,$value) {
|
||||||
case 'localplay_controller':
|
case 'localplay_controller':
|
||||||
$controllers = Localplay::get_controllers();
|
$controllers = Localplay::get_controllers();
|
||||||
echo "<select name=\"$name\">\n";
|
echo "<select name=\"$name\">\n";
|
||||||
echo "\t<option value=\"\">" . _('None') . "</option>\n";
|
echo "\t<option value=\"\">" . T_('None') . "</option>\n";
|
||||||
foreach ($controllers as $controller) {
|
foreach ($controllers as $controller) {
|
||||||
if (!Localplay::is_enabled($controller)) { continue; }
|
if (!Localplay::is_enabled($controller)) { continue; }
|
||||||
$is_selected = '';
|
$is_selected = '';
|
||||||
|
@ -233,10 +233,10 @@ function create_preference_input($name,$value) {
|
||||||
elseif ($value == '100') { $is_admin = 'selected="selected"'; }
|
elseif ($value == '100') { $is_admin = 'selected="selected"'; }
|
||||||
elseif ($value == '50') { $is_manager = 'selected="selected"'; }
|
elseif ($value == '50') { $is_manager = 'selected="selected"'; }
|
||||||
echo "<select name=\"$name\">\n";
|
echo "<select name=\"$name\">\n";
|
||||||
echo "<option value=\"0\">" . _('Disabled') . "</option>\n";
|
echo "<option value=\"0\">" . T_('Disabled') . "</option>\n";
|
||||||
echo "<option value=\"25\" $is_user>" . _('User') . "</option>\n";
|
echo "<option value=\"25\" $is_user>" . T_('User') . "</option>\n";
|
||||||
echo "<option value=\"50\" $is_manager>" . _('Manager') . "</option>\n";
|
echo "<option value=\"50\" $is_manager>" . T_('Manager') . "</option>\n";
|
||||||
echo "<option value=\"100\" $is_admin>" . _('Admin') . "</option>\n";
|
echo "<option value=\"100\" $is_admin>" . T_('Admin') . "</option>\n";
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
break;
|
break;
|
||||||
case 'theme_name':
|
case 'theme_name':
|
||||||
|
@ -252,42 +252,42 @@ function create_preference_input($name,$value) {
|
||||||
case 'playlist_method':
|
case 'playlist_method':
|
||||||
${$value} = ' selected="selected"';
|
${$value} = ' selected="selected"';
|
||||||
echo "<select name=\"$name\">\n";
|
echo "<select name=\"$name\">\n";
|
||||||
echo "\t<option value=\"send\"$send>" . _('Send on Add') . "</option>\n";
|
echo "\t<option value=\"send\"$send>" . T_('Send on Add') . "</option>\n";
|
||||||
echo "\t<option value=\"send_clear\"$send_clear>" . _('Send and Clear on Add') . "</option>\n";
|
echo "\t<option value=\"send_clear\"$send_clear>" . T_('Send and Clear on Add') . "</option>\n";
|
||||||
echo "\t<option value=\"clear\"$clear>" . _('Clear on Send') . "</option>\n";
|
echo "\t<option value=\"clear\"$clear>" . T_('Clear on Send') . "</option>\n";
|
||||||
echo "\t<option value=\"default\"$default>" . _('Default') . "</option>\n";
|
echo "\t<option value=\"default\"$default>" . T_('Default') . "</option>\n";
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
break;
|
break;
|
||||||
case 'bandwidth':
|
case 'bandwidth':
|
||||||
${"bandwidth_$value"} = ' selected="selected"';
|
${"bandwidth_$value"} = ' selected="selected"';
|
||||||
echo "<select name=\"$name\">\n";
|
echo "<select name=\"$name\">\n";
|
||||||
echo "\t<option value=\"25\"$bandwidth_25>" . _('Low') . "</option>\n";
|
echo "\t<option value=\"25\"$bandwidth_25>" . T_('Low') . "</option>\n";
|
||||||
echo "\t<option value=\"50\"$bandwidth_50>" . _('Medium') . "</option>\n";
|
echo "\t<option value=\"50\"$bandwidth_50>" . T_('Medium') . "</option>\n";
|
||||||
echo "\t<option value=\"75\"$bandwidth_75>" . _('High') . "</option>\n";
|
echo "\t<option value=\"75\"$bandwidth_75>" . T_('High') . "</option>\n";
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
break;
|
break;
|
||||||
case 'features':
|
case 'features':
|
||||||
${"features_$value"} = ' selected="selected"';
|
${"features_$value"} = ' selected="selected"';
|
||||||
echo "<select name=\"$name\">\n";
|
echo "<select name=\"$name\">\n";
|
||||||
echo "\t<option value=\"25\"$features_25>" . _('Low') . "</option>\n";
|
echo "\t<option value=\"25\"$features_25>" . T_('Low') . "</option>\n";
|
||||||
echo "\t<option value=\"50\"$features_50>" . _('Medium') . "</option>\n";
|
echo "\t<option value=\"50\"$features_50>" . T_('Medium') . "</option>\n";
|
||||||
echo "\t<option value=\"75\"$features_75>" . _('High') . "</option>\n";
|
echo "\t<option value=\"75\"$features_75>" . T_('High') . "</option>\n";
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
break;
|
break;
|
||||||
case 'transcode':
|
case 'transcode':
|
||||||
${$value} = ' selected="selected"';
|
${$value} = ' selected="selected"';
|
||||||
echo "<select name=\"$name\">\n";
|
echo "<select name=\"$name\">\n";
|
||||||
echo "\t<option value=\"never\"$never>" . _('Never') . "</option>\n";
|
echo "\t<option value=\"never\"$never>" . T_('Never') . "</option>\n";
|
||||||
echo "\t<option value=\"default\"$default>" . _('Default') . "</option>\n";
|
echo "\t<option value=\"default\"$default>" . T_('Default') . "</option>\n";
|
||||||
echo "\t<option value=\"always\"$always>" . _('Always') . "</option>\n";
|
echo "\t<option value=\"always\"$always>" . T_('Always') . "</option>\n";
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
break;
|
break;
|
||||||
case 'show_lyrics':
|
case 'show_lyrics':
|
||||||
if ($value == '1') { $is_true = "selected=\"selected\""; }
|
if ($value == '1') { $is_true = "selected=\"selected\""; }
|
||||||
else { $is_false = "selected=\"selected\""; }
|
else { $is_false = "selected=\"selected\""; }
|
||||||
echo "<select name=\"$name\">\n";
|
echo "<select name=\"$name\">\n";
|
||||||
echo "\t<option value=\"1\" $is_true>" . _("Enable") . "</option>\n";
|
echo "\t<option value=\"1\" $is_true>" . T_("Enable") . "</option>\n";
|
||||||
echo "\t<option value=\"0\" $is_false>" . _("Disable") . "</option>\n";
|
echo "\t<option value=\"0\" $is_false>" . T_("Disable") . "</option>\n";
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -55,26 +55,26 @@ function get_rating_name($score) {
|
||||||
|
|
||||||
switch ($score) {
|
switch ($score) {
|
||||||
case '0':
|
case '0':
|
||||||
return _("Don't Play");
|
return T_("Don't Play");
|
||||||
break;
|
break;
|
||||||
case '1':
|
case '1':
|
||||||
return _("It's Pretty Bad");
|
return T_("It's Pretty Bad");
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
return _("It's Ok");
|
return T_("It's Ok");
|
||||||
break;
|
break;
|
||||||
case '3':
|
case '3':
|
||||||
return _("It's Pretty Good");
|
return T_("It's Pretty Good");
|
||||||
break;
|
break;
|
||||||
case '4':
|
case '4':
|
||||||
return _("I Love It!");
|
return T_("I Love It!");
|
||||||
break;
|
break;
|
||||||
case '5':
|
case '5':
|
||||||
return _("It's Insane");
|
return T_("It's Insane");
|
||||||
break;
|
break;
|
||||||
// I'm fired
|
// I'm fired
|
||||||
default:
|
default:
|
||||||
return _("Off the Charts!");
|
return T_("Off the Charts!");
|
||||||
break;
|
break;
|
||||||
} // end switch
|
} // end switch
|
||||||
|
|
||||||
|
|
|
@ -202,68 +202,68 @@ function get_location() {
|
||||||
|
|
||||||
switch ($location['page']) {
|
switch ($location['page']) {
|
||||||
case 'index.php':
|
case 'index.php':
|
||||||
$location['title'] = _('Home');
|
$location['title'] = T_('Home');
|
||||||
break;
|
break;
|
||||||
case 'upload.php':
|
case 'upload.php':
|
||||||
$location['title'] = _('Upload');
|
$location['title'] = T_('Upload');
|
||||||
break;
|
break;
|
||||||
case 'localplay.php':
|
case 'localplay.php':
|
||||||
$location['title'] = _('Local Play');
|
$location['title'] = T_('Local Play');
|
||||||
break;
|
break;
|
||||||
case 'randomplay.php':
|
case 'randomplay.php':
|
||||||
$location['title'] = _('Random Play');
|
$location['title'] = T_('Random Play');
|
||||||
break;
|
break;
|
||||||
case 'playlist.php':
|
case 'playlist.php':
|
||||||
$location['title'] = _('Playlist');
|
$location['title'] = T_('Playlist');
|
||||||
break;
|
break;
|
||||||
case 'search.php':
|
case 'search.php':
|
||||||
$location['title'] = _('Search');
|
$location['title'] = T_('Search');
|
||||||
break;
|
break;
|
||||||
case 'preferences.php':
|
case 'preferences.php':
|
||||||
$location['title'] = _('Preferences');
|
$location['title'] = T_('Preferences');
|
||||||
break;
|
break;
|
||||||
case 'admin/index.php':
|
case 'admin/index.php':
|
||||||
$location['title'] = _('Admin-Catalog');
|
$location['title'] = T_('Admin-Catalog');
|
||||||
$location['section'] = 'admin';
|
$location['section'] = 'admin';
|
||||||
break;
|
break;
|
||||||
case 'admin/catalog.php':
|
case 'admin/catalog.php':
|
||||||
$location['title'] = _('Admin-Catalog');
|
$location['title'] = T_('Admin-Catalog');
|
||||||
$location['section'] = 'admin';
|
$location['section'] = 'admin';
|
||||||
break;
|
break;
|
||||||
case 'admin/users.php':
|
case 'admin/users.php':
|
||||||
$location['title'] = _('Admin-User Management');
|
$location['title'] = T_('Admin-User Management');
|
||||||
$location['section'] = 'admin';
|
$location['section'] = 'admin';
|
||||||
break;
|
break;
|
||||||
case 'admin/mail.php':
|
case 'admin/mail.php':
|
||||||
$location['title'] = _('Admin-Mail Users');
|
$location['title'] = T_('Admin-Mail Users');
|
||||||
$location['section'] = 'admin';
|
$location['section'] = 'admin';
|
||||||
break;
|
break;
|
||||||
case 'admin/access.php':
|
case 'admin/access.php':
|
||||||
$location['title'] = _('Admin-Manage Access Lists');
|
$location['title'] = T_('Admin-Manage Access Lists');
|
||||||
$location['section'] = 'admin';
|
$location['section'] = 'admin';
|
||||||
break;
|
break;
|
||||||
case 'admin/preferences.php':
|
case 'admin/preferences.php':
|
||||||
$location['title'] = _('Admin-Site Preferences');
|
$location['title'] = T_('Admin-Site Preferences');
|
||||||
$location['section'] = 'admin';
|
$location['section'] = 'admin';
|
||||||
break;
|
break;
|
||||||
case 'admin/modules.php':
|
case 'admin/modules.php':
|
||||||
$location['title'] = _('Admin-Manage Modules');
|
$location['title'] = T_('Admin-Manage Modules');
|
||||||
$location['section'] = 'admin';
|
$location['section'] = 'admin';
|
||||||
break;
|
break;
|
||||||
case 'browse.php':
|
case 'browse.php':
|
||||||
$location['title'] = _('Browse Music');
|
$location['title'] = T_('Browse Music');
|
||||||
$location['section'] = 'browse';
|
$location['section'] = 'browse';
|
||||||
break;
|
break;
|
||||||
case 'albums.php':
|
case 'albums.php':
|
||||||
$location['title'] = _('Albums');
|
$location['title'] = T_('Albums');
|
||||||
$location['section'] = 'browse';
|
$location['section'] = 'browse';
|
||||||
break;
|
break;
|
||||||
case 'artists.php':
|
case 'artists.php':
|
||||||
$location['title'] = _('Artists');
|
$location['title'] = T_('Artists');
|
||||||
$location['section'] = 'browse';
|
$location['section'] = 'browse';
|
||||||
break;
|
break;
|
||||||
case 'stats.php':
|
case 'stats.php':
|
||||||
$location['title'] = _('Statistics');
|
$location['title'] = T_('Statistics');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$location['title'] = '';
|
$location['title'] = '';
|
||||||
|
@ -317,7 +317,7 @@ function show_album_select($name='album',$album_id=0,$allow_add=0,$song_id=0) {
|
||||||
|
|
||||||
if ($allow_add) {
|
if ($allow_add) {
|
||||||
// Append additional option to the end with value=-1
|
// Append additional option to the end with value=-1
|
||||||
echo "\t<option value=\"-1\">" . _('Add New') . "...</option>\n";
|
echo "\t<option value=\"-1\">" . T_('Add New') . "...</option>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
|
@ -397,7 +397,7 @@ function show_catalog_select($name='catalog',$catalog_id=0,$style='') {
|
||||||
function show_user_select($name,$selected='',$style='') {
|
function show_user_select($name,$selected='',$style='') {
|
||||||
|
|
||||||
echo "<select name=\"$name\" style=\"$style\">\n";
|
echo "<select name=\"$name\" style=\"$style\">\n";
|
||||||
echo "\t<option value=\"\">" . _('All') . "</option>\n";
|
echo "\t<option value=\"\">" . T_('All') . "</option>\n";
|
||||||
|
|
||||||
$sql = "SELECT `id`,`username`,`fullname` FROM `user` ORDER BY `fullname`";
|
$sql = "SELECT `id`,`username`,`fullname` FROM `user` ORDER BY `fullname`";
|
||||||
$db_results = Dba::read($sql);
|
$db_results = Dba::read($sql);
|
||||||
|
@ -424,7 +424,7 @@ function show_user_select($name,$selected='',$style='') {
|
||||||
function show_playlist_select($name,$selected='',$style='') {
|
function show_playlist_select($name,$selected='',$style='') {
|
||||||
|
|
||||||
echo "<select name=\"$name\" style=\"$style\">\n";
|
echo "<select name=\"$name\" style=\"$style\">\n";
|
||||||
echo "\t<option value=\"\">" . _('None') . "</option>\n";
|
echo "\t<option value=\"\">" . T_('None') . "</option>\n";
|
||||||
|
|
||||||
$sql = "SELECT `id`,`name` FROM `playlist` ORDER BY `name`";
|
$sql = "SELECT `id`,`name` FROM `playlist` ORDER BY `name`";
|
||||||
$db_results = Dba::read($sql);
|
$db_results = Dba::read($sql);
|
||||||
|
@ -480,7 +480,7 @@ function get_user_icon($name,$title='',$id='') {
|
||||||
$name = $name['0'];
|
$name = $name['0'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$title) { $title = _(ucfirst($name)); }
|
if (!$title) { $title = T_(ucfirst($name)); }
|
||||||
|
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$id = ' id="' . $id . '" ';
|
$id = ' id="' . $id . '" ';
|
||||||
|
@ -747,10 +747,10 @@ function update_text($field, $value) {
|
||||||
function print_bool($value) {
|
function print_bool($value) {
|
||||||
|
|
||||||
if ($value) {
|
if ($value) {
|
||||||
$string = '<span class="item_on">' . _('On') . '</span>';
|
$string = '<span class="item_on">' . T_('On') . '</span>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$string = '<span class="item_off">' . _('Off') . '</span>';
|
$string = '<span class="item_off">' . T_('Off') . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $string;
|
return $string;
|
||||||
|
|
|
@ -89,7 +89,7 @@ Creating a New Translation:
|
||||||
the "create_preference_input" function and add a line for your own
|
the "create_preference_input" function and add a line for your own
|
||||||
language. For example to add en_US support add the following line
|
language. For example to add en_US support add the following line
|
||||||
|
|
||||||
echo "\t<option value=\"en_US\" $en_US_lang>" . _("English") . "</option>\n";
|
echo "\t<option value=\"en_US\" $en_US_lang>" . T_("English") . "</option>\n";
|
||||||
|
|
||||||
Make sure that it comes after the <select> statement. This will be fixed
|
Make sure that it comes after the <select> statement. This will be fixed
|
||||||
for future releases... Sorry :S
|
for future releases... Sorry :S
|
||||||
|
|
|
@ -90,14 +90,14 @@ if (($_POST['username'] && $_POST['password']) ||
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
debug_event('Login', scrub_out($username) . ' attempted to login and failed', '1');
|
debug_event('Login', scrub_out($username) . ' attempted to login and failed', '1');
|
||||||
Error::add('general', _('Error Username or Password incorrect, please try again'));
|
Error::add('general', T_('Error Username or Password incorrect, please try again'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::get_from_username($username);
|
$user = User::get_from_username($username);
|
||||||
|
|
||||||
if ($user->disabled) {
|
if ($user->disabled) {
|
||||||
$auth['success'] = false;
|
$auth['success'] = false;
|
||||||
Error::add('general', _('User Disabled please contact Admin'));
|
Error::add('general', T_('User Disabled please contact Admin'));
|
||||||
debug_event('Login', scrub_out($username) . ' is disabled and attempted to login', '1');
|
debug_event('Login', scrub_out($username) . ' is disabled and attempted to login', '1');
|
||||||
} // if user disabled
|
} // if user disabled
|
||||||
elseif (Config::get('prevent_multiple_logins')) {
|
elseif (Config::get('prevent_multiple_logins')) {
|
||||||
|
@ -105,7 +105,7 @@ if (($_POST['username'] && $_POST['password']) ||
|
||||||
$current_ip = inet_pton($_SERVER['REMOTE_ADDR']);
|
$current_ip = inet_pton($_SERVER['REMOTE_ADDR']);
|
||||||
if ($current_ip && ($current_ip != $session_ip)) {
|
if ($current_ip && ($current_ip != $session_ip)) {
|
||||||
$auth['success'] = false;
|
$auth['success'] = false;
|
||||||
Error::add('general',_('User Already Logged in'));
|
Error::add('general', T_('User Already Logged in'));
|
||||||
debug_event('Login', scrub_out($username) . ' is already logged in from ' . $session_ip . ' and attempted to login from ' . $current_ip, '1');
|
debug_event('Login', scrub_out($username) . ' is already logged in from ' . $session_ip . ' and attempted to login from ' . $current_ip, '1');
|
||||||
} // if logged in multiple times
|
} // if logged in multiple times
|
||||||
} // if prevent multiple logins
|
} // if prevent multiple logins
|
||||||
|
@ -126,7 +126,7 @@ if (($_POST['username'] && $_POST['password']) ||
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$auth['success'] = false;
|
$auth['success'] = false;
|
||||||
Error::add('general', _('Unable to create local account'));
|
Error::add('general', T_('Unable to create local account'));
|
||||||
}
|
}
|
||||||
} // End if auto_create
|
} // End if auto_create
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,9 @@ switch ($action) {
|
||||||
$result = send_newpassword($email, $current_ip);
|
$result = send_newpassword($email, $current_ip);
|
||||||
}
|
}
|
||||||
if ($result) {
|
if ($result) {
|
||||||
Error::add('general', _('Password has been sent'));
|
Error::add('general', T_('Password has been sent'));
|
||||||
} else {
|
} else {
|
||||||
Error::add('general', _('Password has not been sent'));
|
Error::add('general', T_('Password has not been sent'));
|
||||||
}
|
}
|
||||||
|
|
||||||
require Config::get('prefix') . '/templates/show_login_form.inc.php';
|
require Config::get('prefix') . '/templates/show_login_form.inc.php';
|
||||||
|
@ -62,13 +62,13 @@ function send_newpassword($email,$current_ip){
|
||||||
|
|
||||||
$mailer = new AmpacheMail();
|
$mailer = new AmpacheMail();
|
||||||
$mailer->set_default_sender();
|
$mailer->set_default_sender();
|
||||||
$mailer->subject = _("Lost Password");
|
$mailer->subject = T_("Lost Password");
|
||||||
$mailer->recipient_name = $client->fullname;
|
$mailer->recipient_name = $client->fullname;
|
||||||
$mailer->recipient = $client->email;
|
$mailer->recipient = $client->email;
|
||||||
|
|
||||||
$message = sprintf(_("A user from %s has requested a password reset for '%s'."), $current_ip, $client->username);
|
$message = sprintf(T_("A user from %s has requested a password reset for '%s'."), $current_ip, $client->username);
|
||||||
$message .= "\n";
|
$message .= "\n";
|
||||||
$message .= sprintf(_("The password has been set to: %s"), $newpassword);
|
$message .= sprintf(T_("The password has been set to: %s"), $newpassword);
|
||||||
$mailer->message = $message;
|
$mailer->message = $message;
|
||||||
|
|
||||||
return $mailer->send();
|
return $mailer->send();
|
||||||
|
|
|
@ -228,10 +228,10 @@ class AmpacheHttpq extends localplay_controller {
|
||||||
*/
|
*/
|
||||||
public function instance_fields() {
|
public function instance_fields() {
|
||||||
|
|
||||||
$fields['name'] = array('description'=>_('Instance Name'),'type'=>'textbox');
|
$fields['name'] = array('description' => T_('Instance Name'),'type'=>'textbox');
|
||||||
$fields['host'] = array('description'=>_('Hostname'),'type'=>'textbox');
|
$fields['host'] = array('description' => T_('Hostname'),'type'=>'textbox');
|
||||||
$fields['port'] = array('description'=>_('Port'),'type'=>'textbox');
|
$fields['port'] = array('description' => T_('Port'),'type'=>'textbox');
|
||||||
$fields['password'] = array('description'=>_('Password'),'type'=>'textbox');
|
$fields['password'] = array('description' => T_('Password'),'type'=>'textbox');
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
|
|
||||||
|
@ -500,11 +500,11 @@ class AmpacheHttpq extends localplay_controller {
|
||||||
break;
|
break;
|
||||||
case 'demo_id':
|
case 'demo_id':
|
||||||
$democratic = new Democratic($url_data['demo_id']);
|
$democratic = new Democratic($url_data['demo_id']);
|
||||||
$data['name'] = _('Democratic') . ' - ' . $democratic->name;
|
$data['name'] = T_('Democratic') . ' - ' . $democratic->name;
|
||||||
$data['link'] = '';
|
$data['link'] = '';
|
||||||
break;
|
break;
|
||||||
case 'random':
|
case 'random':
|
||||||
$data['name'] = _('Random') . ' - ' . scrub_out(ucfirst($url_data['type']));
|
$data['name'] = T_('Random') . ' - ' . scrub_out(ucfirst($url_data['type']));
|
||||||
$data['link'] = '';
|
$data['link'] = '';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -246,10 +246,10 @@ class AmpacheMpd extends localplay_controller {
|
||||||
*/
|
*/
|
||||||
public function instance_fields() {
|
public function instance_fields() {
|
||||||
|
|
||||||
$fields['name'] = array('description'=>_('Instance Name'),'type'=>'textbox');
|
$fields['name'] = array('description' => T_('Instance Name'),'type'=>'textbox');
|
||||||
$fields['host'] = array('description'=>_('Hostname'),'type'=>'textbox');
|
$fields['host'] = array('description' => T_('Hostname'),'type'=>'textbox');
|
||||||
$fields['port'] = array('description'=>_('Port'),'type'=>'textbox');
|
$fields['port'] = array('description' => T_('Port'),'type'=>'textbox');
|
||||||
$fields['password'] = array('description'=>_('Password'),'type'=>'textbox');
|
$fields['password'] = array('description' => T_('Password'),'type'=>'textbox');
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
|
|
||||||
|
@ -469,11 +469,11 @@ class AmpacheMpd extends localplay_controller {
|
||||||
break;
|
break;
|
||||||
case 'demo_id':
|
case 'demo_id':
|
||||||
$democratic = new Democratic($url_data['demo_id']);
|
$democratic = new Democratic($url_data['demo_id']);
|
||||||
$data['name'] = _('Democratic') . ' - ' . $democratic->name;
|
$data['name'] = T_('Democratic') . ' - ' . $democratic->name;
|
||||||
$data['link'] = '';
|
$data['link'] = '';
|
||||||
break;
|
break;
|
||||||
case 'random':
|
case 'random':
|
||||||
$data['name'] = _('Random') . ' - ' . scrub_out(ucfirst($url_data['type']));
|
$data['name'] = T_('Random') . ' - ' . scrub_out(ucfirst($url_data['type']));
|
||||||
$data['link'] = '';
|
$data['link'] = '';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -503,7 +503,7 @@ class AmpacheMpd extends localplay_controller {
|
||||||
} // end if results
|
} // end if results
|
||||||
|
|
||||||
else {
|
else {
|
||||||
$data['name'] = _('Unknown');
|
$data['name'] = T_('Unknown');
|
||||||
$data['link'] = '';
|
$data['link'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,10 +249,10 @@ class AmpacheShoutCast extends localplay_controller {
|
||||||
*/
|
*/
|
||||||
public function instance_fields() {
|
public function instance_fields() {
|
||||||
|
|
||||||
$fields['name'] = array('description'=>_('Instance Name'),'type'=>'textbox');
|
$fields['name'] = array('description' => T_('Instance Name'),'type'=>'textbox');
|
||||||
$fields['pid'] = array('description'=>_('PID File'),'type'=>'textbox');
|
$fields['pid'] = array('description' => T_('PID File'),'type'=>'textbox');
|
||||||
$fields['playlist'] = array('description'=>_('Playlist File'),'type'=>'textbox');
|
$fields['playlist'] = array('description' => T_('Playlist File'),'type'=>'textbox');
|
||||||
$fields['local_root'] = array('description'=>_('Local Path to Files'),'type'=>'textbox');
|
$fields['local_root'] = array('description' => T_('Local Path to Files'),'type'=>'textbox');
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
|
|
||||||
|
|
|
@ -228,10 +228,10 @@ class AmpacheVlc extends localplay_controller {
|
||||||
*/
|
*/
|
||||||
public function instance_fields() {
|
public function instance_fields() {
|
||||||
|
|
||||||
$fields['name'] = array('description'=>_('Instance Name'),'type'=>'textbox');
|
$fields['name'] = array('description' => T_('Instance Name'),'type'=>'textbox');
|
||||||
$fields['host'] = array('description'=>_('Hostname'),'type'=>'textbox');
|
$fields['host'] = array('description' => T_('Hostname'),'type'=>'textbox');
|
||||||
$fields['port'] = array('description'=>_('Port'),'type'=>'textbox');
|
$fields['port'] = array('description' => T_('Port'),'type'=>'textbox');
|
||||||
$fields['password'] = array('description'=>_('Password'),'type'=>'textbox');
|
$fields['password'] = array('description' => T_('Password'),'type'=>'textbox');
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
|
|
||||||
|
@ -532,11 +532,11 @@ class AmpacheVlc extends localplay_controller {
|
||||||
break;
|
break;
|
||||||
case 'demo_id':
|
case 'demo_id':
|
||||||
$democratic = new Democratic($url_data['demo_id']);
|
$democratic = new Democratic($url_data['demo_id']);
|
||||||
$data['name'] = _('Democratic') . ' - ' . $democratic->name;
|
$data['name'] = T_('Democratic') . ' - ' . $democratic->name;
|
||||||
$data['link'] = '';
|
$data['link'] = '';
|
||||||
break;
|
break;
|
||||||
case 'random':
|
case 'random':
|
||||||
$data['name'] = _('Random') . ' - ' . scrub_out(ucfirst($url_data['type']));
|
$data['name'] = T_('Random') . ' - ' . scrub_out(ucfirst($url_data['type']));
|
||||||
$data['link'] = '';
|
$data['link'] = '';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -69,7 +69,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
$playlist->create($playlist_name,$playlist_type);
|
$playlist->create($playlist_name,$playlist_type);
|
||||||
$_SESSION['data']['playlist_id'] = $playlist->id;
|
$_SESSION['data']['playlist_id'] = $playlist->id;
|
||||||
show_confirmation(_('Playlist Created'), sprintf(_('%1$s (%2$s) has been created'), $playlist_name, $playlist_type),'playlist.php');
|
show_confirmation(T_('Playlist Created'), sprintf(T_('%1$s (%2$s) has been created'), $playlist_name, $playlist_type),'playlist.php');
|
||||||
break;
|
break;
|
||||||
case 'delete_playlist':
|
case 'delete_playlist':
|
||||||
// If we made it here, we didn't have sufficient rights.
|
// If we made it here, we didn't have sufficient rights.
|
||||||
|
@ -105,11 +105,11 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
if($result == false) {
|
if($result == false) {
|
||||||
$url = Config::get('web_path') . '/playlist.php?action=show_import_playlist';
|
$url = Config::get('web_path') . '/playlist.php?action=show_import_playlist';
|
||||||
$title = _('Playlist Not Imported');
|
$title = T_('Playlist Not Imported');
|
||||||
$body = $reason;
|
$body = $reason;
|
||||||
} else {
|
} else {
|
||||||
$url = Config::get('web_path') . '/playlist.php?action=show_playlist&playlist_id='.$playlist_id;
|
$url = Config::get('web_path') . '/playlist.php?action=show_playlist&playlist_id='.$playlist_id;
|
||||||
$title = _('Playlist Imported');
|
$title = T_('Playlist Imported');
|
||||||
$body = basename($_FILES['filename']['name']);
|
$body = basename($_FILES['filename']['name']);
|
||||||
$body .= "<br />";
|
$body .= "<br />";
|
||||||
$body .= $reason;
|
$body .= $reason;
|
||||||
|
@ -141,7 +141,7 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
prune_empty_playlists();
|
prune_empty_playlists();
|
||||||
$url = Config::get('web_path') . '/playlist.php';
|
$url = Config::get('web_path') . '/playlist.php';
|
||||||
$title = _('Empty Playlists Deleted');
|
$title = T_('Empty Playlists Deleted');
|
||||||
$body = '';
|
$body = '';
|
||||||
show_confirmation($title,$body,$url);
|
show_confirmation($title,$body,$url);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -45,7 +45,7 @@ switch($_REQUEST['action']) {
|
||||||
if ($_POST['method'] == 'admin') {
|
if ($_POST['method'] == 'admin') {
|
||||||
$user_id = '-1';
|
$user_id = '-1';
|
||||||
$system = true;
|
$system = true;
|
||||||
$fullname = _('Server');
|
$fullname = T_('Server');
|
||||||
$_REQUEST['action'] = 'admin';
|
$_REQUEST['action'] = 'admin';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -80,7 +80,7 @@ switch($_REQUEST['action']) {
|
||||||
access_denied();
|
access_denied();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$fullname= _('Server');
|
$fullname= T_('Server');
|
||||||
$preferences = $GLOBALS['user']->get_preferences($_REQUEST['tab'], true);
|
$preferences = $GLOBALS['user']->get_preferences($_REQUEST['tab'], true);
|
||||||
break;
|
break;
|
||||||
case 'user':
|
case 'user':
|
||||||
|
@ -112,12 +112,12 @@ switch($_REQUEST['action']) {
|
||||||
$_POST['username'] = $GLOBALS['user']->username;
|
$_POST['username'] = $GLOBALS['user']->username;
|
||||||
|
|
||||||
if (!$GLOBALS['user']->update($_POST)) {
|
if (!$GLOBALS['user']->update($_POST)) {
|
||||||
Error::add('general',_('Error Update Failed'));
|
Error::add('general', T_('Error Update Failed'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_REQUEST['action'] = 'confirm';
|
$_REQUEST['action'] = 'confirm';
|
||||||
$title = _('Updated');
|
$title = T_('Updated');
|
||||||
$text = _('Your Account has been updated');
|
$text = T_('Your Account has been updated');
|
||||||
$next_url = Config::get('web_path') . '/preferences.php?tab=account';
|
$next_url = Config::get('web_path') . '/preferences.php?tab=account';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -59,7 +59,7 @@ switch ($_REQUEST['action']) {
|
||||||
require_once Config::get('prefix') . '/templates/show_add_live_stream.inc.php';
|
require_once Config::get('prefix') . '/templates/show_add_live_stream.inc.php';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$body = _('Radio Station Added');
|
$body = T_('Radio Station Added');
|
||||||
$title = '';
|
$title = '';
|
||||||
show_confirmation($title,$body,Config::get('web_path') . '/index.php');
|
show_confirmation($title,$body,Config::get('web_path') . '/index.php');
|
||||||
}
|
}
|
||||||
|
|
20
register.php
20
register.php
|
@ -77,30 +77,30 @@ switch ($_REQUEST['action']) {
|
||||||
if (Config::get('captcha_public_reg')) {
|
if (Config::get('captcha_public_reg')) {
|
||||||
$captcha = captcha::solved();
|
$captcha = captcha::solved();
|
||||||
if(!isset ($captcha)) {
|
if(!isset ($captcha)) {
|
||||||
Error::add('captcha',_('Error Captcha Required'));
|
Error::add('captcha', T_('Error Captcha Required'));
|
||||||
}
|
}
|
||||||
if (isset ($captcha)) {
|
if (isset ($captcha)) {
|
||||||
if ($captcha) {
|
if ($captcha) {
|
||||||
$msg="SUCCESS";
|
$msg="SUCCESS";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Error::add('captcha',_('Error Captcha Failed'));
|
Error::add('captcha', T_('Error Captcha Failed'));
|
||||||
}
|
}
|
||||||
} // end if we've got captcha
|
} // end if we've got captcha
|
||||||
} // end if it's enabled
|
} // end if it's enabled
|
||||||
|
|
||||||
if (Config::get('user_agreement')) {
|
if (Config::get('user_agreement')) {
|
||||||
if (!$_POST['accept_agreement']) {
|
if (!$_POST['accept_agreement']) {
|
||||||
Error::add('user_agreement',_("You <U>must</U> accept the user agreement"));
|
Error::add('user_agreement', T_("You <U>must</U> accept the user agreement"));
|
||||||
}
|
}
|
||||||
} // if they have to agree to something
|
} // if they have to agree to something
|
||||||
|
|
||||||
if (!$_POST['username']) {
|
if (!$_POST['username']) {
|
||||||
Error::add('username',_("You did not enter a username"));
|
Error::add('username', T_("You did not enter a username"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$fullname) {
|
if(!$fullname) {
|
||||||
Error::add('fullname',_("Please fill in your full name (Firstname Lastname)"));
|
Error::add('fullname', T_("Please fill in your full name (Firstname Lastname)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check the mail for correct address formation. */
|
/* Check the mail for correct address formation. */
|
||||||
|
@ -121,21 +121,21 @@ switch ($_REQUEST['action']) {
|
||||||
$mmsg = "MAILOK";
|
$mmsg = "MAILOK";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Error::add('email',_("Error Email address not confirmed")
|
Error::add('email', T_("Error Email address not confirmed")
|
||||||
. "<br />$validate_results[1]");
|
. "<br />$validate_results[1]");
|
||||||
}
|
}
|
||||||
/* End of mailcheck */
|
/* End of mailcheck */
|
||||||
|
|
||||||
if (!$pass1) {
|
if (!$pass1) {
|
||||||
Error::add('password',_("You must enter a password"));
|
Error::add('password', T_("You must enter a password"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $pass1 != $pass2 ) {
|
if ( $pass1 != $pass2 ) {
|
||||||
Error::add('password',_("Your passwords do not match"));
|
Error::add('password', T_("Your passwords do not match"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!User::check_username($username)) {
|
if (!User::check_username($username)) {
|
||||||
Error::add('duplicate_user',_("Error Username already exists"));
|
Error::add('duplicate_user', T_("Error Username already exists"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we've hit an error anywhere up there break!
|
// If we've hit an error anywhere up there break!
|
||||||
|
@ -164,7 +164,7 @@ switch ($_REQUEST['action']) {
|
||||||
$access, Config::get('admin_enable_required'));
|
$access, Config::get('admin_enable_required'));
|
||||||
|
|
||||||
if (!$new_user) {
|
if (!$new_user) {
|
||||||
Error::add('duplicate_user',_("Error: Insert Failed"));
|
Error::add('duplicate_user', T_("Error: Insert Failed"));
|
||||||
require_once Config::get('prefix') . '/templates/show_user_registration.inc.php';
|
require_once Config::get('prefix') . '/templates/show_user_registration.inc.php';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ switch ($_REQUEST['action']) {
|
||||||
case 'save_as_track':
|
case 'save_as_track':
|
||||||
$playlist_id = save_search($_REQUEST);
|
$playlist_id = save_search($_REQUEST);
|
||||||
$playlist = new Playlist($playlist_id);
|
$playlist = new Playlist($playlist_id);
|
||||||
show_confirmation(_('Search Saved'),sprintf(_('Your Search has been saved as a track in %s'), $playlist->name),conf('web_path') . "/search.php");
|
show_confirmation(T_('Search Saved'),sprintf(T_('Your Search has been saved as a track in %s'), $playlist->name),conf('web_path') . "/search.php");
|
||||||
break;
|
break;
|
||||||
case 'save_as_smartplaylist':
|
case 'save_as_smartplaylist':
|
||||||
$playlist = new Search();
|
$playlist = new Search();
|
||||||
|
|
|
@ -47,7 +47,7 @@ switch ($_REQUEST['action']) {
|
||||||
//Return the new Ajax::button
|
//Return the new Ajax::button
|
||||||
$id = 'button_flip_state_' . $song->id;
|
$id = 'button_flip_state_' . $song->id;
|
||||||
$button = $song->enabled ? 'disable' : 'enable';
|
$button = $song->enabled ? 'disable' : 'enable';
|
||||||
$results[$id] = Ajax::button('?page=song&action=flip_state&song_id=' . $song->id,$button,_(ucfirst($button)),'flip_state_' . $song->id);
|
$results[$id] = Ajax::button('?page=song&action=flip_state&song_id=' . $song->id,$button, T_(ucfirst($button)),'flip_state_' . $song->id);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -46,7 +46,7 @@ header("Content-Disposition: attachment; filename=information.xml");
|
||||||
if (!Config::get('access_control')) {
|
if (!Config::get('access_control')) {
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
debug_event('Access Control','Error Attempted to use XML API with Access Control turned off','3');
|
debug_event('Access Control','Error Attempted to use XML API with Access Control turned off','3');
|
||||||
echo xmlData::error('501',_('Access Control not Enabled'));
|
echo xmlData::error('501', T_('Access Control not Enabled'));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ if (!Config::get('access_control')) {
|
||||||
if (!vauth::session_exists('api', $_REQUEST['auth']) AND $_REQUEST['action'] != 'handshake' AND $_REQUEST['action'] != 'ping') {
|
if (!vauth::session_exists('api', $_REQUEST['auth']) AND $_REQUEST['action'] != 'handshake' AND $_REQUEST['action'] != 'ping') {
|
||||||
debug_event('Access Denied','Invalid Session attempt to API [' . $_REQUEST['action'] . ']','3');
|
debug_event('Access Denied','Invalid Session attempt to API [' . $_REQUEST['action'] . ']','3');
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
echo xmlData::error('401',_('Session Expired'));
|
echo xmlData::error('401', T_('Session Expired'));
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ $username = ($_REQUEST['action'] == 'handshake' || $_REQUEST['action'] == 'ping'
|
||||||
if (!Access::check_network('init-api',$username,'5')) {
|
if (!Access::check_network('init-api',$username,'5')) {
|
||||||
debug_event('Access Denied','Unauthorized access attempt to API [' . $_SERVER['REMOTE_ADDR'] . ']', '3');
|
debug_event('Access Denied','Unauthorized access attempt to API [' . $_SERVER['REMOTE_ADDR'] . ']', '3');
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
echo xmlData::error('403',_('Unauthorized access attempt to API - ACL Error'));
|
echo xmlData::error('403', T_('Unauthorized access attempt to API - ACL Error'));
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,4 +99,4 @@ foreach ($methods as $method) {
|
||||||
|
|
||||||
// If we manage to get here, we still need to hand out an XML document
|
// If we manage to get here, we still need to hand out an XML document
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
echo xmlData::error('405',_('Invalid Request'));
|
echo xmlData::error('405', T_('Invalid Request'));
|
||||||
|
|
|
@ -52,7 +52,7 @@ switch ($_REQUEST['action']) {
|
||||||
$object = shoutBox::get_object($_REQUEST['type'],$_REQUEST['id']);
|
$object = shoutBox::get_object($_REQUEST['type'],$_REQUEST['id']);
|
||||||
|
|
||||||
if (!$object->id) {
|
if (!$object->id) {
|
||||||
Error::add('general',_('Invalid Object Selected'));
|
Error::add('general', T_('Invalid Object Selected'));
|
||||||
Error::display('general');
|
Error::display('general');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
4
song.php
4
song.php
|
@ -46,7 +46,7 @@ switch ($_REQUEST['action']) {
|
||||||
$return = $lyric->get_song_lyrics($song->id, ucwords($song->f_artist), ucwords($song->title));
|
$return = $lyric->get_song_lyrics($song->id, ucwords($song->f_artist), ucwords($song->title));
|
||||||
$link = '<a href="http://lyricwiki.org/' . rawurlencode(ucwords($song->f_artist)) . ':' . rawurlencode(ucwords($song->title)) . '" target="_blank">';
|
$link = '<a href="http://lyricwiki.org/' . rawurlencode(ucwords($song->f_artist)) . ':' . rawurlencode(ucwords($song->title)) . '" target="_blank">';
|
||||||
/* HINT: Artist, Song Title */
|
/* HINT: Artist, Song Title */
|
||||||
$link .= sprintf(_('%1$s - %2$s Lyrics Detail'), ucwords($song->f_artist), ucwords($song->title));
|
$link .= sprintf(T_('%1$s - %2$s Lyrics Detail'), ucwords($song->f_artist), ucwords($song->title));
|
||||||
$link .= "</a><br /><br />";
|
$link .= "</a><br /><br />";
|
||||||
require_once Config::get('prefix') . '/templates/show_lyrics.inc.php';
|
require_once Config::get('prefix') . '/templates/show_lyrics.inc.php';
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ switch ($_REQUEST['action']) {
|
||||||
$return = $lyric->get_song_lyrics($song->id, ucwords($song->f_artist), ucwords($song->title));
|
$return = $lyric->get_song_lyrics($song->id, ucwords($song->f_artist), ucwords($song->title));
|
||||||
$link = '<a href="http://lyricwiki.org/' . rawurlencode(ucwords($song->f_artist)) . ':' . rawurlencode(ucwords($song->title)) . '" target="_blank">';
|
$link = '<a href="http://lyricwiki.org/' . rawurlencode(ucwords($song->f_artist)) . ':' . rawurlencode(ucwords($song->title)) . '" target="_blank">';
|
||||||
/* HINT: Artist, Song Title */
|
/* HINT: Artist, Song Title */
|
||||||
$link .= sprintf(_('%1$s - %2$s Lyrics Detail'), ucwords($song->f_artist), ucwords($song->title));
|
$link .= sprintf(T_('%1$s - %2$s Lyrics Detail'), ucwords($song->f_artist), ucwords($song->title));
|
||||||
$link .= "</a><br /><br />";
|
$link .= "</a><br /><br />";
|
||||||
require_once Config::get('prefix') . '/templates/show_lyrics.inc.php';
|
require_once Config::get('prefix') . '/templates/show_lyrics.inc.php';
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,49 +29,49 @@ session_start();
|
||||||
$ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path');
|
$ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path');
|
||||||
?>
|
?>
|
||||||
<?php $allowed_filters = Browse::get_allowed_filters($browse->get_type()); ?>
|
<?php $allowed_filters = Browse::get_allowed_filters($browse->get_type()); ?>
|
||||||
<li><h4><?php echo _('Filters'); ?></h4>
|
<li><h4><?php echo T_('Filters'); ?></h4>
|
||||||
<div class="sb3">
|
<div class="sb3">
|
||||||
<?php if (in_array('starts_with',$allowed_filters)) { ?>
|
<?php if (in_array('starts_with',$allowed_filters)) { ?>
|
||||||
<form id="multi_alpha_filter_form" method="post" action="javascript:void(0);">
|
<form id="multi_alpha_filter_form" method="post" action="javascript:void(0);">
|
||||||
<label id="multi_alpha_filterLabel" for="multi_alpha_filter"><?php echo _('Starts With'); ?></label>
|
<label id="multi_alpha_filterLabel" for="multi_alpha_filter"><?php echo T_('Starts With'); ?></label>
|
||||||
<input type="text" id="multi_alpha_filter" name="multi_alpha_filter" value="<?php $browse->set_catalog($_SESSION['catalog']); echo scrub_out($browse->get_filter('starts_with'));?>" onKeyUp="delayRun(this, '400', 'ajaxState', '<?php echo $ajax_info; ?>?page=browse&action=browse&browse_id=<?php echo $browse->id; ?>&key=starts_with', 'multi_alpha_filter');">
|
<input type="text" id="multi_alpha_filter" name="multi_alpha_filter" value="<?php $browse->set_catalog($_SESSION['catalog']); echo scrub_out($browse->get_filter('starts_with'));?>" onKeyUp="delayRun(this, '400', 'ajaxState', '<?php echo $ajax_info; ?>?page=browse&action=browse&browse_id=<?php echo $browse->id; ?>&key=starts_with', 'multi_alpha_filter');">
|
||||||
</form>
|
</form>
|
||||||
<?php } // end if alpha_match ?>
|
<?php } // end if alpha_match ?>
|
||||||
<?php if (in_array('minimum_count',$allowed_filters)) { ?>
|
<?php if (in_array('minimum_count',$allowed_filters)) { ?>
|
||||||
<input id="mincountCB" type="checkbox" value="1" />
|
<input id="mincountCB" type="checkbox" value="1" />
|
||||||
<label id="mincountLabel" for="mincountCB"><?php echo _('Minimum Count'); ?></label><br />
|
<label id="mincountLabel" for="mincountCB"><?php echo T_('Minimum Count'); ?></label><br />
|
||||||
<?php echo Ajax::observe('mincountCB', 'click', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id . '&key=min_count&value=1', '')); ?>
|
<?php echo Ajax::observe('mincountCB', 'click', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id . '&key=min_count&value=1', '')); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (in_array('rated',$allowed_filters)) { ?>
|
<?php if (in_array('rated',$allowed_filters)) { ?>
|
||||||
<input id="ratedCB" type="checkbox" value="1" />
|
<input id="ratedCB" type="checkbox" value="1" />
|
||||||
<label id="ratedLabel" for="ratedCB"><?php echo _('Rated'); ?></label><br />
|
<label id="ratedLabel" for="ratedCB"><?php echo T_('Rated'); ?></label><br />
|
||||||
<?php echo Ajax::observe('ratedCB', 'click', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id . '&key=rated&value=1', '')); ?>
|
<?php echo Ajax::observe('ratedCB', 'click', Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id . '&key=rated&value=1', '')); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (in_array('unplayed',$allowed_filters)) { ?>
|
<?php if (in_array('unplayed',$allowed_filters)) { ?>
|
||||||
<input id="unplayedCB" type="checkbox" <?php echo $string = $browse->get_filter('unplayed') ? 'checked="checked"' : ''; ?>/>
|
<input id="unplayedCB" type="checkbox" <?php echo $string = $browse->get_filter('unplayed') ? 'checked="checked"' : ''; ?>/>
|
||||||
<label id="unplayedLabel" for="unplayedCB"><?php echo _('Unplayed'); ?></label><br />
|
<label id="unplayedLabel" for="unplayedCB"><?php echo T_('Unplayed'); ?></label><br />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (in_array('playlist_type',$allowed_filters)) { ?>
|
<?php if (in_array('playlist_type',$allowed_filters)) { ?>
|
||||||
<input id="show_allplCB" type="checkbox" <?php echo $string = $browse->get_filter('playlist_type') ? 'checked="checked"' : ''; ?>/>
|
<input id="show_allplCB" type="checkbox" <?php echo $string = $browse->get_filter('playlist_type') ? 'checked="checked"' : ''; ?>/>
|
||||||
<label id="show_allplLabel" for="showallplCB"><?php echo _('All Playlists'); ?></label><br />
|
<label id="show_allplLabel" for="showallplCB"><?php echo T_('All Playlists'); ?></label><br />
|
||||||
<?php echo Ajax::observe('show_allplCB','click',Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id . '&key=playlist_type&value=1','')); ?>
|
<?php echo Ajax::observe('show_allplCB','click',Ajax::action('?page=browse&action=browse&browse_id=' . $browse->id . '&key=playlist_type&value=1','')); ?>
|
||||||
<?php } // if playlist_type ?>
|
<?php } // if playlist_type ?>
|
||||||
<?php if (in_array('object_type',$allowed_filters)) { ?>
|
<?php if (in_array('object_type',$allowed_filters)) { ?>
|
||||||
<?php $string = 'otype_' . $browse->get_filter('object_type'); ${$string} = 'selected="selected"'; ?>
|
<?php $string = 'otype_' . $browse->get_filter('object_type'); ${$string} = 'selected="selected"'; ?>
|
||||||
<input id="typeSongRadio" type="radio" name="object_type" value="1" <?php echo $otype_song; ?>/>
|
<input id="typeSongRadio" type="radio" name="object_type" value="1" <?php echo $otype_song; ?>/>
|
||||||
<label id="typeSongLabel" for="typeSongRadio"><?php echo _('Song Title'); ?></label><br />
|
<label id="typeSongLabel" for="typeSongRadio"><?php echo T_('Song Title'); ?></label><br />
|
||||||
<?php echo Ajax::observe('typeSongRadio','click',Ajax::action('?page=tag&action=browse_type&browse_id=' . $browse->id . '&type=song','')); ?>
|
<?php echo Ajax::observe('typeSongRadio','click',Ajax::action('?page=tag&action=browse_type&browse_id=' . $browse->id . '&type=song','')); ?>
|
||||||
<input id="typeAlbumRadio" type="radio" name="object_type" value="1" />
|
<input id="typeAlbumRadio" type="radio" name="object_type" value="1" />
|
||||||
<label id="typeAlbumLabel" for="typeAlbumRadio"><?php echo _('Albums'); ?></label><br />
|
<label id="typeAlbumLabel" for="typeAlbumRadio"><?php echo T_('Albums'); ?></label><br />
|
||||||
<?php echo Ajax::observe('typeAlbumRadio','click',Ajax::action('?page=tag&action=browse_type&browse_id=' . $browse->id . '&type=album','')); ?>
|
<?php echo Ajax::observe('typeAlbumRadio','click',Ajax::action('?page=tag&action=browse_type&browse_id=' . $browse->id . '&type=album','')); ?>
|
||||||
<input id="typeArtistRadio" type="radio" name="object_type" value="1" />
|
<input id="typeArtistRadio" type="radio" name="object_type" value="1" />
|
||||||
<label id="typeArtistLabel" for="typeArtistRadio"><?php echo _('Artist'); ?></label><br />
|
<label id="typeArtistLabel" for="typeArtistRadio"><?php echo T_('Artist'); ?></label><br />
|
||||||
<?php echo Ajax::observe('typeArtistRadio','click',Ajax::action('?page=tag&action=browse_type&browse_id=' . $browse->id . '&type=artist','')); ?>
|
<?php echo Ajax::observe('typeArtistRadio','click',Ajax::action('?page=tag&action=browse_type&browse_id=' . $browse->id . '&type=artist','')); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if(in_array('catalog',$allowed_filters)) { ?>
|
<?php if(in_array('catalog',$allowed_filters)) { ?>
|
||||||
<form method="post" id="catalog_choice" action="javascript.void(0);">
|
<form method="post" id="catalog_choice" action="javascript.void(0);">
|
||||||
<label id="catalogLabel" for="catalog_select"><?php echo _('Catalog'); ?></label><br />
|
<label id="catalogLabel" for="catalog_select"><?php echo T_('Catalog'); ?></label><br />
|
||||||
<select id="catalog_select" name="catalog_key">
|
<select id="catalog_select" name="catalog_key">
|
||||||
<option value="0">All</option>
|
<option value="0">All</option>
|
||||||
<?php
|
<?php
|
||||||
|
@ -95,7 +95,7 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path');
|
||||||
</form>
|
</form>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (in_array('show_art',$allowed_filters)) { ?>
|
<?php if (in_array('show_art',$allowed_filters)) { ?>
|
||||||
<?php echo _('Toggle Artwork'); ?> <input id="show_artCB" type="checkbox" <?php echo Art::is_enabled() ? 'checked="checked"' : ''; ?>/>
|
<?php echo T_('Toggle Artwork'); ?> <input id="show_artCB" type="checkbox" <?php echo Art::is_enabled() ? 'checked="checked"' : ''; ?>/>
|
||||||
<?php echo Ajax::observe('show_artCB','click',Ajax::action('?page=browse&action=show_art&browse_id=' . $browse->id, '')); ?>
|
<?php echo Ajax::observe('show_artCB','click',Ajax::action('?page=browse&action=show_art&browse_id=' . $browse->id, '')); ?>
|
||||||
<?php } // if show_art ?>
|
<?php } // if show_art ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="refresh" content="10;URL=<?php echo($redirect_url);?>" />
|
<meta http-equiv="refresh" content="10;URL=<?php echo($redirect_url);?>" />
|
||||||
<link rel="shortcut icon" href="<?php echo $web_path; ?>/favicon.ico" />
|
<link rel="shortcut icon" href="<?php echo $web_path; ?>/favicon.ico" />
|
||||||
<title><?php echo( _("Ampache error page"));?></title>
|
<title><?php echo( T_("Ampache error page"));?></title>
|
||||||
<link rel="stylesheet" href="<?php echo $web_path; ?>/templates/base.css" type="text/css" media="screen" />
|
<link rel="stylesheet" href="<?php echo $web_path; ?>/templates/base.css" type="text/css" media="screen" />
|
||||||
<link rel="stylesheet" href="<?php echo $web_path; ?><?php echo Config::get('theme_path'); ?>/templates/default.css" type="text/css" media="screen" />
|
<link rel="stylesheet" href="<?php echo $web_path; ?><?php echo Config::get('theme_path'); ?>/templates/default.css" type="text/css" media="screen" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -51,9 +51,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div> </div>
|
<div> </div>
|
||||||
<div id="errormsg">
|
<div id="errormsg">
|
||||||
<?php echo (_("The folowing error has occured, you will automaticly be redirected after 10 seconds.") ); ?>
|
<?php echo (T_("The folowing error has occured, you will automaticly be redirected after 10 seconds.") ); ?>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<?php echo(_("Error messages"));?>:<br />
|
<?php echo(T_("Error messages"));?>:<br />
|
||||||
<?php Error::display('general'); ?>
|
<?php Error::display('general'); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,14 +28,14 @@
|
||||||
?>
|
?>
|
||||||
<div style="clear:both;"></div>
|
<div style="clear:both;"></div>
|
||||||
<?php if (isset($_SESSION['userdata']['password'])) {?>
|
<?php if (isset($_SESSION['userdata']['password'])) {?>
|
||||||
<span class="fatalerror"><?php echo _('Using Old Password Encryption, Please Reset your Password'); ?></span>
|
<span class="fatalerror"><?php echo T_('Using Old Password Encryption, Please Reset your Password'); ?></span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div> <!-- end id="content"-->
|
</div> <!-- end id="content"-->
|
||||||
</div> <!-- end id="maincontainer"-->
|
</div> <!-- end id="maincontainer"-->
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<a href="http://www.ampache.org/index.php">Ampache v.<?php echo Config::get('version'); ?></a><br />
|
<a href="http://www.ampache.org/index.php">Ampache v.<?php echo Config::get('version'); ?></a><br />
|
||||||
Copyright (c) 2001 - 2011 Ampache.org
|
Copyright (c) 2001 - 2011 Ampache.org
|
||||||
<?php echo _('Queries:'); ?><?php echo Dba::$stats['query']; ?> <?php echo _('Cache Hits:'); ?><?php echo database_object::$cache_hit; ?>
|
<?php echo T_('Queries:'); ?><?php echo Dba::$stats['query']; ?> <?php echo T_('Cache Hits:'); ?><?php echo database_object::$cache_hit; ?>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -47,8 +47,8 @@ if(!is_file($cssdir.'default-rtl.css')) {
|
||||||
<link rel="search" type="application/opensearchdescription+xml" title="<?php echo scrub_out(Config::get('site_title')); ?>" href="<?php echo $web_path; ?>/search.php?action=descriptor" />
|
<link rel="search" type="application/opensearchdescription+xml" title="<?php echo scrub_out(Config::get('site_title')); ?>" href="<?php echo $web_path; ?>/search.php?action=descriptor" />
|
||||||
<?php
|
<?php
|
||||||
if (Config::get('use_rss')) { ?>
|
if (Config::get('use_rss')) { ?>
|
||||||
<link rel="alternate" type="application/rss+xml" title="<?php echo _('Now Playing'); ?>" href="<?php echo $web_path; ?>/rss.php" />
|
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Now Playing'); ?>" href="<?php echo $web_path; ?>/rss.php" />
|
||||||
<link rel="alternate" type="application/rss+xml" title="<?php echo _('Recently Played'); ?>" href="<?php echo $web_path; ?>/rss.php?type=recently_played" />
|
<link rel="alternate" type="application/rss+xml" title="<?php echo T_('Recently Played'); ?>" href="<?php echo $web_path; ?>/rss.php?type=recently_played" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<?php echo Config::get('site_charset'); ?>" />
|
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<?php echo Config::get('site_charset'); ?>" />
|
||||||
<title><?php echo scrub_out(Config::get('site_title')); ?> - <?php echo $location['title']; ?></title>
|
<title><?php echo scrub_out(Config::get('site_title')); ?> - <?php echo $location['title']; ?></title>
|
||||||
|
@ -73,7 +73,7 @@ if (Config::get('use_rss')) { ?>
|
||||||
<?php show_box_top('','box box_headerbox'); ?>
|
<?php show_box_top('','box box_headerbox'); ?>
|
||||||
<?php require_once Config::get('prefix') . '/templates/show_search_bar.inc.php'; ?>
|
<?php require_once Config::get('prefix') . '/templates/show_search_bar.inc.php'; ?>
|
||||||
<?php require_once Config::get('prefix') . '/templates/show_playtype_switch.inc.php'; ?>
|
<?php require_once Config::get('prefix') . '/templates/show_playtype_switch.inc.php'; ?>
|
||||||
<span id="loginInfo"><a href="<?php echo Config::get('web_path'); ?>/preferences.php?tab=account"><?php echo $GLOBALS['user']->fullname; ?></a> <a href="<?php echo Config::get('web_path'); ?>/logout.php">[<?php echo _('Log out'); ?>]</a></span>
|
<span id="loginInfo"><a href="<?php echo Config::get('web_path'); ?>/preferences.php?tab=account"><?php echo $GLOBALS['user']->fullname; ?></a> <a href="<?php echo Config::get('web_path'); ?>/logout.php">[<?php echo T_('Log out'); ?>]</a></span>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
</div> <!-- End headerbox -->
|
</div> <!-- End headerbox -->
|
||||||
</div><!-- End header -->
|
</div><!-- End header -->
|
||||||
|
@ -89,7 +89,7 @@ if (Config::get('use_rss')) { ?>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<?php if (Config::get('int_config_version') != Config::get('config_version') AND $GLOBALS['user']->has_access(100)) { ?>
|
<?php if (Config::get('int_config_version') != Config::get('config_version') AND $GLOBALS['user']->has_access(100)) { ?>
|
||||||
<div class="fatalerror">
|
<div class="fatalerror">
|
||||||
<?php echo _('Error Config File Out of Date'); ?>
|
<?php echo T_('Error Config File Out of Date'); ?>
|
||||||
<a href="<?php echo Config::get('web_path'); ?>/admin/system.php?action=generate_config"><?php echo _('Generate New Config'); ?></a>
|
<a href="<?php echo Config::get('web_path'); ?>/admin/system.php?action=generate_config"><?php echo T_('Generate New Config'); ?></a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -41,20 +41,20 @@ $prefix = realpath(dirname(__FILE__). "/../");
|
||||||
<script src="modules/prototype/prototype.js" language="javascript" type="text/javascript"></script>
|
<script src="modules/prototype/prototype.js" language="javascript" type="text/javascript"></script>
|
||||||
<script src="lib/javascript/base.js" language="javascript" type="text/javascript"></script>
|
<script src="lib/javascript/base.js" language="javascript" type="text/javascript"></script>
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<h1><?php echo _('Ampache Installation'); ?></h1>
|
<h1><?php echo T_('Ampache Installation'); ?></h1>
|
||||||
<p>For the love of Music</p>
|
<p>For the love of Music</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="text-box">
|
<div id="text-box">
|
||||||
<div class="notify">
|
<div class="notify">
|
||||||
<h3><?php echo _('Requirements'); ?></h3>
|
<h3><?php echo T_('Requirements'); ?></h3>
|
||||||
<p>
|
<p>
|
||||||
<?php echo _('This page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following prerequisites:'); ?>
|
<?php echo T_('This page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following prerequisites:'); ?>
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><?php echo _('A MySQL server with a username and password that can create/modify databases'); ?></li>
|
<li><?php echo T_('A MySQL server with a username and password that can create/modify databases'); ?></li>
|
||||||
<li><?php echo sprintf(_('Your webserver has read access to the files %s and %s'),$prefix . '/sql/ampache.sql',$prefix . '/config/ampache.cfg.php.dist'); ?></li>
|
<li><?php echo sprintf(T_('Your webserver has read access to the files %s and %s'),$prefix . '/sql/ampache.sql',$prefix . '/config/ampache.cfg.php.dist'); ?></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
<?php echo sprintf(_("Once you have ensured that the above requirements are met please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your Ampache install at a later date simply edit %s"), $prefix . '/config/ampache.cfg.php'); ?>
|
<?php echo sprintf(T_("Once you have ensured that the above requirements are met please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your Ampache install at a later date simply edit %s"), $prefix . '/config/ampache.cfg.php'); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -106,8 +106,8 @@ if ($pages > 1) {
|
||||||
?>
|
?>
|
||||||
<div class="list-header">
|
<div class="list-header">
|
||||||
|
|
||||||
<?php echo Ajax::text('?page=browse&action=page&browse_id=' . $browse->id . '&start=' . $prev_offset,_('Prev'),'browse_' . $uid . 'prev','','prev'); ?>
|
<?php echo Ajax::text('?page=browse&action=page&browse_id=' . $browse->id . '&start=' . $prev_offset, T_('Prev'),'browse_' . $uid . 'prev','','prev'); ?>
|
||||||
<?php echo Ajax::text('?page=browse&action=page&browse_id=' . $browse->id . '&start=' . $next_offset,_('Next'),'browse_' . $uid . 'next','','next'); ?>
|
<?php echo Ajax::text('?page=browse&action=page&browse_id=' . $browse->id . '&start=' . $next_offset, T_('Next'),'browse_' . $uid . 'next','','next'); ?>
|
||||||
<?php
|
<?php
|
||||||
/* Echo everything below us */
|
/* Echo everything below us */
|
||||||
foreach ($page_data['down'] as $page => $offset) {
|
foreach ($page_data['down'] as $page => $offset) {
|
||||||
|
|
|
@ -29,13 +29,13 @@
|
||||||
?>
|
?>
|
||||||
<ul id="rb_action">
|
<ul id="rb_action">
|
||||||
<li>
|
<li>
|
||||||
<?php echo Ajax::button('?page=stream&action=basket','all',_('Play'),'rightbar_play'); ?>
|
<?php echo Ajax::button('?page=stream&action=basket','all', T_('Play'),'rightbar_play'); ?>
|
||||||
</li>
|
</li>
|
||||||
<li id="pl_add">
|
<li id="pl_add">
|
||||||
<?php echo get_user_icon('playlist_add',_('Add to Playlist')); ?>
|
<?php echo get_user_icon('playlist_add', T_('Add to Playlist')); ?>
|
||||||
<ul id="pl_action_additems" class="submenu">
|
<ul id="pl_action_additems" class="submenu">
|
||||||
<li>
|
<li>
|
||||||
<?php echo Ajax::text('?page=playlist&action=create',_('Add to New Playlist'),'rb_create_playlist'); ?>
|
<?php echo Ajax::text('?page=playlist&action=create', T_('Add to New Playlist'),'rb_create_playlist'); ?>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
$playlists = Playlist::get_users($GLOBALS['user']->id);
|
$playlists = Playlist::get_users($GLOBALS['user']->id);
|
||||||
|
@ -53,27 +53,27 @@
|
||||||
<?php if (Access::check_function('batch_download')) { ?>
|
<?php if (Access::check_function('batch_download')) { ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo Config::get('web_path'); ?>/batch.php?action=tmp_playlist&id=<?php echo $GLOBALS['user']->playlist->id; ?>">
|
<a href="<?php echo Config::get('web_path'); ?>/batch.php?action=tmp_playlist&id=<?php echo $GLOBALS['user']->playlist->id; ?>">
|
||||||
<?php echo get_user_icon('batch_download',_('Batch Download')); ?>
|
<?php echo get_user_icon('batch_download', T_('Batch Download')); ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<li>
|
<li>
|
||||||
<?php echo Ajax::button('?action=basket&type=clear_all','delete',_('Clear Playlist'),'rb_clear_playlist'); ?>
|
<?php echo Ajax::button('?action=basket&type=clear_all','delete', T_('Clear Playlist'),'rb_clear_playlist'); ?>
|
||||||
</li>
|
</li>
|
||||||
<li id="rb_add">
|
<li id="rb_add">
|
||||||
<?php echo get_user_icon('add',_('Add Dynamic Items')); ?>
|
<?php echo get_user_icon('add', T_('Add Dynamic Items')); ?>
|
||||||
<ul id="rb_action_additems" class="submenu">
|
<ul id="rb_action_additems" class="submenu">
|
||||||
<li>
|
<li>
|
||||||
<?php echo Ajax::text('?action=basket&type=dynamic&random_type=default',_('Pure Random'),'rb_add_pure_random'); ?>
|
<?php echo Ajax::text('?action=basket&type=dynamic&random_type=default', T_('Pure Random'),'rb_add_pure_random'); ?>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<?php echo Ajax::text('?action=basket&type=dynamic&random_type=artist',_('Related Artist'),'rb_add_related_artist'); ?>
|
<?php echo Ajax::text('?action=basket&type=dynamic&random_type=artist', T_('Related Artist'),'rb_add_related_artist'); ?>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<?php echo Ajax::text('?action=basket&type=dynamic&random_type=album',_('Related Album'),'rb_add_related_album'); ?>
|
<?php echo Ajax::text('?action=basket&type=dynamic&random_type=album', T_('Related Album'),'rb_add_related_album'); ?>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<?php echo Ajax::text('?action=basket&type=dynamic&random_type=tag',_('Related Tag'),'rb_add_related_tag'); ?>
|
<?php echo Ajax::text('?action=basket&type=dynamic&random_type=tag', T_('Related Tag'),'rb_add_related_tag'); ?>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
@ -109,14 +109,14 @@
|
||||||
?>
|
?>
|
||||||
<li class="<?php echo flip_class(); ?>" >
|
<li class="<?php echo flip_class(); ?>" >
|
||||||
<?php echo $object->f_link; ?>
|
<?php echo $object->f_link; ?>
|
||||||
<?php echo Ajax::button('?action=current_playlist&type=delete&id=' . $uid,'delete',_('Delete'),'rightbar_delete_' . $uid,'','delitem'); ?>
|
<?php echo Ajax::button('?action=current_playlist&type=delete&id=' . $uid,'delete', T_('Delete'),'rightbar_delete_' . $uid,'','delitem'); ?>
|
||||||
</li>
|
</li>
|
||||||
<?php } if (!count($objects)) { ?>
|
<?php } if (!count($objects)) { ?>
|
||||||
<li class="error"><?php echo _('Not Enough Data'); ?></li>
|
<li class="error"><?php echo T_('Not Enough Data'); ?></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (isset($truncated)) { ?>
|
<?php if (isset($truncated)) { ?>
|
||||||
<li class="<?php echo flip_class(); ?>">
|
<li class="<?php echo flip_class(); ?>">
|
||||||
<?php echo $truncated . ' ' . _('More'); ?>...
|
<?php echo $truncated . ' ' . T_('More'); ?>...
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -32,40 +32,40 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<?php show_box_top(_('Access Control'), 'box box_access_control'); ?>
|
<?php show_box_top(T_('Access Control'), 'box box_access_control'); ?>
|
||||||
<div id="information_actions" class="left-column">
|
<div id="information_actions" class="left-column">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo Config::get('web_path'); ?>/admin/access.php?action=show_add_current"><?php echo get_user_icon('add_user',_('Add Current Host')); ?></a>
|
<a href="<?php echo Config::get('web_path'); ?>/admin/access.php?action=show_add_current"><?php echo get_user_icon('add_user', T_('Add Current Host')); ?></a>
|
||||||
<?php echo _('Add Current Host'); ?>
|
<?php echo T_('Add Current Host'); ?>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo Config::get('web_path'); ?>/admin/access.php?action=show_add_rpc"><?php echo get_user_icon('cog',_('Add API / RPC Host')); ?></a>
|
<a href="<?php echo Config::get('web_path'); ?>/admin/access.php?action=show_add_rpc"><?php echo get_user_icon('cog', T_('Add API / RPC Host')); ?></a>
|
||||||
<?php echo _('Add API / RPC Host'); ?>
|
<?php echo T_('Add API / RPC Host'); ?>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo Config::get('web_path'); ?>/admin/access.php?action=show_add_local"><?php echo get_user_icon('home',_('Add Local Network Definition')); ?></a>
|
<a href="<?php echo Config::get('web_path'); ?>/admin/access.php?action=show_add_local"><?php echo get_user_icon('home', T_('Add Local Network Definition')); ?></a>
|
||||||
<?php echo _('Add Local Network Definition'); ?>
|
<?php echo T_('Add Local Network Definition'); ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo Config::get('web_path'); ?>/admin/access.php?action=show_add_advanced"><?php echo get_user_icon('add_key',_('Advanced Add')); ?></a>
|
<a href="<?php echo Config::get('web_path'); ?>/admin/access.php?action=show_add_advanced"><?php echo get_user_icon('add_key', T_('Advanced Add')); ?></a>
|
||||||
<?php echo _('Advanced Add'); ?>
|
<?php echo T_('Advanced Add'); ?>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
<?php show_box_top(_('Access Control Entries'), 'box box_access_entries'); ?>
|
<?php show_box_top(T_('Access Control Entries'), 'box box_access_entries'); ?>
|
||||||
<?php Ajax::start_container('browse_content'); ?>
|
<?php Ajax::start_container('browse_content'); ?>
|
||||||
<?php if (count($list)) { ?>
|
<?php if (count($list)) { ?>
|
||||||
<table cellspacing="1" cellpadding="3" class="tabledata">
|
<table cellspacing="1" cellpadding="3" class="tabledata">
|
||||||
<tr class="table-data">
|
<tr class="table-data">
|
||||||
<th><?php echo _('Name'); ?></th>
|
<th><?php echo T_('Name'); ?></th>
|
||||||
<th><?php echo _('Start Address'); ?></th>
|
<th><?php echo T_('Start Address'); ?></th>
|
||||||
<th><?php echo _('End Address'); ?></th>
|
<th><?php echo T_('End Address'); ?></th>
|
||||||
<th><?php echo _('Level'); ?></th>
|
<th><?php echo T_('Level'); ?></th>
|
||||||
<th><?php echo _('User'); ?></th>
|
<th><?php echo T_('User'); ?></th>
|
||||||
<th><?php echo _('Type'); ?></th>
|
<th><?php echo T_('Type'); ?></th>
|
||||||
<th><?php echo _('Action'); ?></th>
|
<th><?php echo T_('Action'); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
/* Start foreach List Item */
|
/* Start foreach List Item */
|
||||||
|
@ -81,8 +81,8 @@
|
||||||
<td><?php echo $access->f_user; ?></td>
|
<td><?php echo $access->f_user; ?></td>
|
||||||
<td><?php echo $access->f_type; ?></td>
|
<td><?php echo $access->f_type; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="<?php echo Config::get('web_path'); ?>/admin/access.php?action=show_edit_record&access_id=<?php echo scrub_out($access->id); ?>"><?php echo get_user_icon('edit', _('Edit')); ?></a>
|
<a href="<?php echo Config::get('web_path'); ?>/admin/access.php?action=show_edit_record&access_id=<?php echo scrub_out($access->id); ?>"><?php echo get_user_icon('edit', T_('Edit')); ?></a>
|
||||||
<a href="<?php echo Config::get('web_path'); ?>/admin/access.php?action=show_delete_record&access_id=<?php echo scrub_out($access->id); ?>"><?php echo get_user_icon('delete', _('Delete')); ?></a>
|
<a href="<?php echo Config::get('web_path'); ?>/admin/access.php?action=show_delete_record&access_id=<?php echo scrub_out($access->id); ?>"><?php echo get_user_icon('delete', T_('Delete')); ?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } // end foreach ?>
|
<?php } // end foreach ?>
|
||||||
|
|
|
@ -32,32 +32,32 @@
|
||||||
<form method="post" name="preferences" action="<?php echo Config::get('web_path'); ?>/preferences.php?action=update_user" enctype="multipart/form-data">
|
<form method="post" name="preferences" action="<?php echo Config::get('web_path'); ?>/preferences.php?action=update_user" enctype="multipart/form-data">
|
||||||
<table class="tabledata">
|
<table class="tabledata">
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Name'); ?>:</td>
|
<td><?php echo T_('Name'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="fullname" size="27" value="<?php echo scrub_out($client->fullname); ?>" />
|
<input type="text" name="fullname" size="27" value="<?php echo scrub_out($client->fullname); ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('E-mail'); ?>:</td>
|
<td><?php echo T_('E-mail'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="email" size="27" value="<?php echo scrub_out($client->email); ?>" />
|
<input type="text" name="email" size="27" value="<?php echo scrub_out($client->email); ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('New Password'); ?>:</td>
|
<td><?php echo T_('New Password'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php Error::display('password'); ?>
|
<?php Error::display('password'); ?>
|
||||||
<input type="password" name="password1" size="27" />
|
<input type="password" name="password1" size="27" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Confirm Password'); ?>:</td>
|
<td><?php echo T_('Confirm Password'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="password" name="password2" size="27" />
|
<input type="password" name="password2" size="27" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Clear Stats'); ?>:</td>
|
<td><?php echo T_('Clear Stats'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" name="clear_stats" value="1" />
|
<input type="checkbox" name="clear_stats" value="1" />
|
||||||
</td>
|
</td>
|
||||||
|
@ -67,5 +67,5 @@
|
||||||
<input type="hidden" name="user_id" value="<?php echo scrub_out($client->id); ?>" />
|
<input type="hidden" name="user_id" value="<?php echo scrub_out($client->id); ?>" />
|
||||||
<?php echo Core::form_register('update_user'); ?>
|
<?php echo Core::form_register('update_user'); ?>
|
||||||
<input type="hidden" name="tab" value="<?php echo scrub_out($_REQUEST['tab']); ?>" />
|
<input type="hidden" name="tab" value="<?php echo scrub_out($_REQUEST['tab']); ?>" />
|
||||||
<input class="button" type="submit" value="<?php echo _('Update Account'); ?>" />
|
<input class="button" type="submit" value="<?php echo T_('Update Account'); ?>" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,65 +27,65 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php show_box_top(_('Advanced Add'), 'box box_add_access'); ?>
|
<?php show_box_top(T_('Advanced Add'), 'box box_add_access'); ?>
|
||||||
<?php Error::display('general'); ?>
|
<?php Error::display('general'); ?>
|
||||||
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host&method=advanced">
|
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host&method=advanced">
|
||||||
<table class="tabledata" cellpadding="5" cellspacing="0">
|
<table class="tabledata" cellpadding="5" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Name'); ?>:</td>
|
<td><?php echo T_('Name'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
|
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Level'); ?>:</td>
|
<td><?php echo T_('Level'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input name="level" type="radio" checked="checked" value="5" /> <?php echo _('View'); ?>
|
<input name="level" type="radio" checked="checked" value="5" /> <?php echo T_('View'); ?>
|
||||||
<input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
|
<input name="level" type="radio" value="25" /> <?php echo T_('Read'); ?>
|
||||||
<input name="level" type="radio" value="50" /> <?php echo _('Read/Write'); ?>
|
<input name="level" type="radio" value="50" /> <?php echo T_('Read/Write'); ?>
|
||||||
<input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
|
<input name="level" type="radio" value="75" /> <?php echo T_('All'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('User'); ?>:</td>
|
<td><?php echo T_('User'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<?php show_user_select('user'); ?>
|
<?php show_user_select('user'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('ACL Type'); ?>:</td>
|
<td><?php echo T_('ACL Type'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<select name="type">
|
<select name="type">
|
||||||
<option selected="selected" value="stream"><?php echo _('Stream Access'); ?></option>
|
<option selected="selected" value="stream"><?php echo T_('Stream Access'); ?></option>
|
||||||
<option value="interface"><?php echo _('Web Interface'); ?></option>
|
<option value="interface"><?php echo T_('Web Interface'); ?></option>
|
||||||
<option value="network"><?php echo _('Local Network Definition'); ?></option>
|
<option value="network"><?php echo T_('Local Network Definition'); ?></option>
|
||||||
<option value="rpc"><?php echo _('RPC'); ?></option>
|
<option value="rpc"><?php echo T_('RPC'); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4"><h4><?php echo _('RPC Options'); ?></h4></td>
|
<td colspan="4"><h4><?php echo T_('RPC Options'); ?></h4></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Remote Key'); ?>:</td>
|
<td><?php echo T_('Remote Key'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['key']); ?>" maxlength="32" />
|
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['key']); ?>" maxlength="32" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4"><h3><?php echo _('IPv4 or IPv6 Addresses'); ?></h3>
|
<td colspan="4"><h3><?php echo T_('IPv4 or IPv6 Addresses'); ?></h3>
|
||||||
<span class="information">(255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)</span>
|
<span class="information">(255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Start'); ?>:</td>
|
<td><?php echo T_('Start'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php Error::display('start'); ?>
|
<?php Error::display('start'); ?>
|
||||||
<input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" />
|
<input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" />
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo _('End'); ?>:</td>
|
<td><?php echo T_('End'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php Error::display('end'); ?>
|
<?php Error::display('end'); ?>
|
||||||
<input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" maxlength="15" />
|
<input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" maxlength="15" />
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
</table>
|
</table>
|
||||||
<div class="formValidation">
|
<div class="formValidation">
|
||||||
<?php echo Core::form_register('add_acl'); ?>
|
<?php echo Core::form_register('add_acl'); ?>
|
||||||
<input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
|
<input class="button" type="submit" value="<?php echo T_('Create ACL'); ?>" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
|
|
|
@ -27,39 +27,39 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php show_box_top(_('Add Current Host'), 'box box_add_access_current'); ?>
|
<?php show_box_top(T_('Add Current Host'), 'box box_add_access_current'); ?>
|
||||||
<?php Error::display('general'); ?>
|
<?php Error::display('general'); ?>
|
||||||
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host&method=current">
|
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host&method=current">
|
||||||
<table class="tabledata" cellpadding="5" cellspacing="0">
|
<table class="tabledata" cellpadding="5" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Name'); ?>:</td>
|
<td><?php echo T_('Name'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
|
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('IPv4 or IPv6 Addresses'); ?>:</td>
|
<td><?php echo T_('IPv4 or IPv6 Addresses'); ?>:</td>
|
||||||
<td><?php echo scrub_out($_SERVER['REMOTE_ADDR']); ?></td>
|
<td><?php echo scrub_out($_SERVER['REMOTE_ADDR']); ?></td>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Level'); ?>:</td>
|
<td><?php echo T_('Level'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<input name="level" type="radio" value="5" /> <?php echo _('View'); ?>
|
<input name="level" type="radio" value="5" /> <?php echo T_('View'); ?>
|
||||||
<input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
|
<input name="level" type="radio" value="25" /> <?php echo T_('Read'); ?>
|
||||||
<input name="level" type="radio" checked="checked" value="50" /> <?php echo _('Read/Write'); ?>
|
<input name="level" type="radio" checked="checked" value="50" /> <?php echo T_('Read/Write'); ?>
|
||||||
<input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
|
<input name="level" type="radio" value="75" /> <?php echo T_('All'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('User'); ?>:</td>
|
<td><?php echo T_('User'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php show_user_select('user'); ?>
|
<?php show_user_select('user'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><h4><?php echo _('RPC Options'); ?></h4></td>
|
<td colspan="2"><h4><?php echo T_('RPC Options'); ?></h4></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Remote Key'); ?>:</td>
|
<td><?php echo T_('Remote Key'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" maxlength="32" />
|
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" maxlength="32" />
|
||||||
</td>
|
</td>
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
</table>
|
</table>
|
||||||
<div class="formValidation">
|
<div class="formValidation">
|
||||||
<?php echo Core::form_register('add_acl'); ?>
|
<?php echo Core::form_register('add_acl'); ?>
|
||||||
<input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
|
<input class="button" type="submit" value="<?php echo T_('Create ACL'); ?>" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
|
|
|
@ -27,62 +27,62 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php show_box_top(_('Add Local Network Definition'), 'box box_add_access_local'); ?>
|
<?php show_box_top(T_('Add Local Network Definition'), 'box box_add_access_local'); ?>
|
||||||
<?php Error::display('general'); ?>
|
<?php Error::display('general'); ?>
|
||||||
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host&method=local">
|
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host&method=local">
|
||||||
<table class="tabledata" cellpadding="5" cellspacing="0">
|
<table class="tabledata" cellpadding="5" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Name'); ?>:</td>
|
<td><?php echo T_('Name'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
|
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Level'); ?>:</td>
|
<td><?php echo T_('Level'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input name="level" type="radio" value="5" /> <?php echo _('View'); ?>
|
<input name="level" type="radio" value="5" /> <?php echo T_('View'); ?>
|
||||||
<input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
|
<input name="level" type="radio" value="25" /> <?php echo T_('Read'); ?>
|
||||||
<input name="level" type="radio" checked="checked" value="50" /> <?php echo _('Read/Write'); ?>
|
<input name="level" type="radio" checked="checked" value="50" /> <?php echo T_('Read/Write'); ?>
|
||||||
<input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
|
<input name="level" type="radio" value="75" /> <?php echo T_('All'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('User'); ?>:</td>
|
<td><?php echo T_('User'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<?php show_user_select('user'); ?>
|
<?php show_user_select('user'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top"><?php echo _('Type'); ?>:</td>
|
<td valign="top"><?php echo T_('Type'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="radio" name="addtype" value="network" /><?php echo _('Local Network Definition'); ?><br />
|
<input type="radio" name="addtype" value="network" /><?php echo T_('Local Network Definition'); ?><br />
|
||||||
<input type="radio" name="addtype" value="streamnetwork" /><?php echo _('Local Network Definition'); ?> + <?php echo _('Stream Access'); ?> + <?php echo _('Web Interface'); ?><br />
|
<input type="radio" name="addtype" value="streamnetwork" /><?php echo T_('Local Network Definition'); ?> + <?php echo T_('Stream Access'); ?> + <?php echo T_('Web Interface'); ?><br />
|
||||||
<input type="radio" name="addtype" value="allnetwork" checked="checked" /><?php echo _('Local Network Definition'); ?> + <?php echo _('All'); ?><br />
|
<input type="radio" name="addtype" value="allnetwork" checked="checked" /><?php echo T_('Local Network Definition'); ?> + <?php echo T_('All'); ?><br />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4"><h4><?php echo _('RPC Options'); ?></h4></td>
|
<td colspan="4"><h4><?php echo T_('RPC Options'); ?></h4></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Remote Key'); ?>:</td>
|
<td><?php echo T_('Remote Key'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" maxlength="32" />
|
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" maxlength="32" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4"><h3><?php echo _('IPv4 or IPv6 Addresses'); ?></h3>
|
<td colspan="4"><h3><?php echo T_('IPv4 or IPv6 Addresses'); ?></h3>
|
||||||
<span class="information">(255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)</span>
|
<span class="information">(255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Start'); ?>:</td>
|
<td><?php echo T_('Start'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php Error::display('start'); ?>
|
<?php Error::display('start'); ?>
|
||||||
<input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" />
|
<input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" />
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo _('End'); ?>:</td>
|
<td><?php echo T_('End'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php Error::display('end'); ?>
|
<?php Error::display('end'); ?>
|
||||||
<input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" />
|
<input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" />
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
</table>
|
</table>
|
||||||
<div class="formValidation">
|
<div class="formValidation">
|
||||||
<?php echo Core::form_register('add_acl'); ?>
|
<?php echo Core::form_register('add_acl'); ?>
|
||||||
<input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
|
<input class="button" type="submit" value="<?php echo T_('Create ACL'); ?>" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
|
|
|
@ -27,62 +27,62 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php show_box_top(_('Add API / RPC Host'), 'box box_add_access_rpc'); ?>
|
<?php show_box_top(T_('Add API / RPC Host'), 'box box_add_access_rpc'); ?>
|
||||||
<?php Error::display('general'); ?>
|
<?php Error::display('general'); ?>
|
||||||
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host&method=rpc">
|
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host&method=rpc">
|
||||||
<table class="tabledata" cellpadding="5" cellspacing="0">
|
<table class="tabledata" cellpadding="5" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Name'); ?>:</td>
|
<td><?php echo T_('Name'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
|
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Level'); ?>:</td>
|
<td><?php echo T_('Level'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input name="level" type="radio" value="5" /> <?php echo _('View'); ?>
|
<input name="level" type="radio" value="5" /> <?php echo T_('View'); ?>
|
||||||
<input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
|
<input name="level" type="radio" value="25" /> <?php echo T_('Read'); ?>
|
||||||
<input name="level" type="radio" checked="checked" value="50" /> <?php echo _('Read/Write'); ?>
|
<input name="level" type="radio" checked="checked" value="50" /> <?php echo T_('Read/Write'); ?>
|
||||||
<input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
|
<input name="level" type="radio" value="75" /> <?php echo T_('All'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('User'); ?>:</td>
|
<td><?php echo T_('User'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<?php show_user_select('user'); ?>
|
<?php show_user_select('user'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top"><?php echo _('Type'); ?>:</td>
|
<td valign="top"><?php echo T_('Type'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="radio" name="addtype" value="rpc" /><?php echo _('RPC'); ?><br />
|
<input type="radio" name="addtype" value="rpc" /><?php echo T_('RPC'); ?><br />
|
||||||
<input type="radio" name="addtype" value="streamrpc" checked="checked" /><?php echo _('RPC'); ?> + <?php echo _('Stream Access'); ?><br />
|
<input type="radio" name="addtype" value="streamrpc" checked="checked" /><?php echo T_('RPC'); ?> + <?php echo T_('Stream Access'); ?><br />
|
||||||
<input type="radio" name="addtype" value="allrpc" /><?php echo _('RPC'); ?> + <?php echo _('All'); ?>
|
<input type="radio" name="addtype" value="allrpc" /><?php echo T_('RPC'); ?> + <?php echo T_('All'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4"><h4><?php echo _('RPC Options'); ?></h4></td>
|
<td colspan="4"><h4><?php echo T_('RPC Options'); ?></h4></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Remote Key'); ?>:</td>
|
<td><?php echo T_('Remote Key'); ?>:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['key']); ?>" maxlength="32" />
|
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['key']); ?>" maxlength="32" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4"><h3><?php echo _('IPv4 or IPv6 Addresses'); ?></h3>
|
<td colspan="4"><h3><?php echo T_('IPv4 or IPv6 Addresses'); ?></h3>
|
||||||
<span class="information">(255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)</span>
|
<span class="information">(255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Start'); ?>:</td>
|
<td><?php echo T_('Start'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php Error::display('start'); ?>
|
<?php Error::display('start'); ?>
|
||||||
<input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" />
|
<input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" />
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo _('End'); ?>:</td>
|
<td><?php echo T_('End'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php Error::display('end'); ?>
|
<?php Error::display('end'); ?>
|
||||||
<input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" />
|
<input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" />
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
</table>
|
</table>
|
||||||
<div class="formValidation">
|
<div class="formValidation">
|
||||||
<?php echo Core::form_register('add_acl'); ?>
|
<?php echo Core::form_register('add_acl'); ?>
|
||||||
<input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
|
<input class="button" type="submit" value="<?php echo T_('Create ACL'); ?>" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
|
|
|
@ -29,70 +29,70 @@
|
||||||
$default_rename = "%a - %T - %t";
|
$default_rename = "%a - %T - %t";
|
||||||
$default_sort = "%a/%A";
|
$default_sort = "%a/%A";
|
||||||
?>
|
?>
|
||||||
<?php show_box_top(_('Add a Catalog'), 'box box_add_catalog'); ?>
|
<?php show_box_top(T_('Add a Catalog'), 'box box_add_catalog'); ?>
|
||||||
<p><?php echo _("In the form below enter either a local path (i.e. /data/music) or the URL to a remote Ampache installation (i.e http://theotherampache.com)"); ?></p>
|
<p><?php echo T_("In the form below enter either a local path (i.e. /data/music) or the URL to a remote Ampache installation (i.e http://theotherampache.com)"); ?></p>
|
||||||
<?php Error::display('general'); ?>
|
<?php Error::display('general'); ?>
|
||||||
<form name="update_catalog" method="post" action="<?php echo Config::get('web_path'); ?>/admin/catalog.php" enctype="multipart/form-data">
|
<form name="update_catalog" method="post" action="<?php echo Config::get('web_path'); ?>/admin/catalog.php" enctype="multipart/form-data">
|
||||||
<table class="tabledata" cellpadding="0" cellspacing="0">
|
<table class="tabledata" cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Catalog Name'); ?>: </td>
|
<td><?php echo T_('Catalog Name'); ?>: </td>
|
||||||
<td><input size="60" type="text" name="name" value="<?php echo scrub_out($_POST['name']); ?>" /></td>
|
<td><input size="60" type="text" name="name" value="<?php echo scrub_out($_POST['name']); ?>" /></td>
|
||||||
<td style="vertical-align:top; font-family: monospace;" rowspan="6" id="patterns_example">
|
<td style="vertical-align:top; font-family: monospace;" rowspan="6" id="patterns_example">
|
||||||
<strong><?php echo _('Auto-inserted Fields'); ?>:</strong><br />
|
<strong><?php echo T_('Auto-inserted Fields'); ?>:</strong><br />
|
||||||
%A = <?php echo _('album name'); ?><br />
|
%A = <?php echo T_('album name'); ?><br />
|
||||||
%a = <?php echo _('artist name'); ?><br />
|
%a = <?php echo T_('artist name'); ?><br />
|
||||||
%c = <?php echo _('id3 comment'); ?><br />
|
%c = <?php echo T_('id3 comment'); ?><br />
|
||||||
%T = <?php echo _('track number (padded with leading 0)'); ?><br />
|
%T = <?php echo T_('track number (padded with leading 0)'); ?><br />
|
||||||
%t = <?php echo _('song title'); ?><br />
|
%t = <?php echo T_('song title'); ?><br />
|
||||||
%y = <?php echo _('year'); ?><br />
|
%y = <?php echo T_('year'); ?><br />
|
||||||
%o = <?php echo _('other'); ?><br />
|
%o = <?php echo T_('other'); ?><br />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Path'); ?>: </td>
|
<td><?php echo T_('Path'); ?>: </td>
|
||||||
<td><input size="60" type="text" name="path" value="<?php echo scrub_out($_POST['path']); ?>" /></td>
|
<td><input size="60" type="text" name="path" value="<?php echo scrub_out($_POST['path']); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Catalog Type'); ?>: </td>
|
<td><?php echo T_('Catalog Type'); ?>: </td>
|
||||||
<td>
|
<td>
|
||||||
<select name="type">
|
<select name="type">
|
||||||
<option value="local"><?php echo _('Local'); ?></option>
|
<option value="local"><?php echo T_('Local'); ?></option>
|
||||||
<option value="remote"><?php echo _('Remote'); ?></option>
|
<option value="remote"><?php echo T_('Remote'); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Remote Catalog Username'); ?>: </td>
|
<td><?php echo T_('Remote Catalog Username'); ?>: </td>
|
||||||
<td><input size="30" type="text" name="remote_username" value="<?php echo scrub_out($_POST['remote_username']); ?>" /><span class="error">*<?php echo _('Required for Remote Catalogs'); ?></span></td>
|
<td><input size="30" type="text" name="remote_username" value="<?php echo scrub_out($_POST['remote_username']); ?>" /><span class="error">*<?php echo T_('Required for Remote Catalogs'); ?></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Remote Catalog Password'); ?>: </td>
|
<td><?php echo T_('Remote Catalog Password'); ?>: </td>
|
||||||
<td><input size="30" type="password" name="remote_password" value="" /><span class="error">*<?php echo _('Required for Remote Catalogs'); ?></span></td>
|
<td><input size="30" type="password" name="remote_password" value="" /><span class="error">*<?php echo T_('Required for Remote Catalogs'); ?></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Filename Pattern'); ?>: </td>
|
<td><?php echo T_('Filename Pattern'); ?>: </td>
|
||||||
<td><input size="60" type="text" name="rename_pattern" value="<?php echo $default_rename; ?>" /></td>
|
<td><input size="60" type="text" name="rename_pattern" value="<?php echo $default_rename; ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Folder Pattern'); ?>:<br /><?php echo _("(no leading or ending '/')"); ?></td>
|
<td><?php echo T_('Folder Pattern'); ?>:<br /><?php echo T_("(no leading or ending '/')"); ?></td>
|
||||||
<td valign="top"><input size="60" type="text" name="sort_pattern" value="<?php echo $default_sort; ?>" /></td>
|
<td valign="top"><input size="60" type="text" name="sort_pattern" value="<?php echo $default_sort; ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top"><?php echo _('Gather Album Art'); ?>:</td>
|
<td valign="top"><?php echo T_('Gather Album Art'); ?>:</td>
|
||||||
<td><input type="checkbox" name="gather_art" value="1" /></td>
|
<td><input type="checkbox" name="gather_art" value="1" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top"><?php echo _('Build Playlists from m3u Files'); ?>:</td>
|
<td valign="top"><?php echo T_('Build Playlists from m3u Files'); ?>:</td>
|
||||||
<td><input type="checkbox" name="parse_m3u" value="1" /></td>
|
<td><input type="checkbox" name="parse_m3u" value="1" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="formValidation">
|
<div class="formValidation">
|
||||||
<input type="hidden" name="action" value="add_catalog" />
|
<input type="hidden" name="action" value="add_catalog" />
|
||||||
<?php echo Core::form_register('add_catalog'); ?>
|
<?php echo Core::form_register('add_catalog'); ?>
|
||||||
<input class="button" type="submit" value="<?php echo _('Add Catalog'); ?>" />
|
<input class="button" type="submit" value="<?php echo T_('Add Catalog'); ?>" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
|
|
|
@ -27,44 +27,44 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php show_box_top(_('Add Radio Station'), 'box box_add_live_stream'); ?>
|
<?php show_box_top(T_('Add Radio Station'), 'box box_add_live_stream'); ?>
|
||||||
<form name="radio" method="post" action="<?php echo Config::get('web_path'); ?>/radio.php?action=create">
|
<form name="radio" method="post" action="<?php echo Config::get('web_path'); ?>/radio.php?action=create">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Name'); ?></td>
|
<td><?php echo T_('Name'); ?></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="name" size="20" value="<?php echo scrub_out($_REQUEST['name']); ?>" />
|
<input type="text" name="name" size="20" value="<?php echo scrub_out($_REQUEST['name']); ?>" />
|
||||||
<?php Error::display('name'); ?>
|
<?php Error::display('name'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Homepage'); ?></td>
|
<td><?php echo T_('Homepage'); ?></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="site_url" value="<?php echo scrub_out($_REQUEST['site_url']); ?>" />
|
<input type="text" name="site_url" value="<?php echo scrub_out($_REQUEST['site_url']); ?>" />
|
||||||
<?php Error::display('site_url'); ?>
|
<?php Error::display('site_url'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Stream URL'); ?></td>
|
<td><?php echo T_('Stream URL'); ?></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="url" value="<?php echo scrub_out($_REQUEST['url']); ?>" />
|
<input type="text" name="url" value="<?php echo scrub_out($_REQUEST['url']); ?>" />
|
||||||
<?php Error::display('url'); ?>
|
<?php Error::display('url'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Frequency'); ?></td>
|
<td><?php echo T_('Frequency'); ?></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="frequency" value="<?php echo scrub_out($_REQUEST['frequency']); ?>" />
|
<input type="text" name="frequency" value="<?php echo scrub_out($_REQUEST['frequency']); ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Callsign'); ?></td>
|
<td><?php echo T_('Callsign'); ?></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="call_sign" value="<?php echo scrub_out($_REQUEST['call_sign']); ?>" />
|
<input type="text" name="call_sign" value="<?php echo scrub_out($_REQUEST['call_sign']); ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Catalog'); ?></td>
|
<td><?php echo T_('Catalog'); ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php echo show_catalog_select('catalog',intval($_REQUEST['catalog'])); ?>
|
<?php echo show_catalog_select('catalog',intval($_REQUEST['catalog'])); ?>
|
||||||
</td>
|
</td>
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
</table>
|
</table>
|
||||||
<div class="formValidation">
|
<div class="formValidation">
|
||||||
<?php echo Core::form_register('add_radio'); ?>
|
<?php echo Core::form_register('add_radio'); ?>
|
||||||
<input class="button" type="submit" value="<?php echo _('Add'); ?>" />
|
<input class="button" type="submit" value="<?php echo T_('Add'); ?>" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
|
|
|
@ -27,15 +27,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php show_box_top(_('Create a new playlist')); ?>
|
<?php show_box_top(T_('Create a new playlist')); ?>
|
||||||
<form name="songs" method="post" action="<?php echo conf('web_path'); ?>/playlist.php">
|
<form name="songs" method="post" action="<?php echo conf('web_path'); ?>/playlist.php">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Name'); ?>:</td>
|
<td><?php echo T_('Name'); ?>:</td>
|
||||||
<td><input type="text" name="playlist_name" size="20" /></td>
|
<td><input type="text" name="playlist_name" size="20" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Type'); ?>:</td>
|
<td><?php echo T_('Type'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="type">
|
<select name="type">
|
||||||
<option value="private"> Private </option>
|
<option value="private"> Private </option>
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="formValidation">
|
<div class="formValidation">
|
||||||
<input class="button" type="submit" value="<?php echo _('Create'); ?>" />
|
<input class="button" type="submit" value="<?php echo T_('Create'); ?>" />
|
||||||
<input type="hidden" name="action" value="Create" />
|
<input type="hidden" name="action" value="Create" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -27,18 +27,18 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php show_box_top(_('Post to Shoutbox'), 'box box_add_shout'); ?>
|
<?php show_box_top(T_('Post to Shoutbox'), 'box box_add_shout'); ?>
|
||||||
<form method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/shout.php?action=add_shout">
|
<form method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/shout.php?action=add_shout">
|
||||||
<table class="tabledata" cellpadding="0" cellspacing="0">
|
<table class="tabledata" cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong><?php echo _('Comment:'); ?></strong>
|
<td><strong><?php echo T_('Comment:'); ?></strong>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><textarea rows="5" cols="70" name="comment"></textarea></td>
|
<td><textarea rows="5" cols="70" name="comment"></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if (Access::check('interface','50')) { ?>
|
<?php if (Access::check('interface','50')) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" name="sticky" /> <strong><?php echo _('Make Sticky'); ?></strong></td>
|
<td><input type="checkbox" name="sticky" /> <strong><?php echo T_('Make Sticky'); ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
<?php echo Core::form_register('add_shout'); ?>
|
<?php echo Core::form_register('add_shout'); ?>
|
||||||
<input type="hidden" name="object_id" value="<?php echo $object->id; ?>" />
|
<input type="hidden" name="object_id" value="<?php echo $object->id; ?>" />
|
||||||
<input type="hidden" name="object_type" value="<?php echo strtolower(get_class($object)); ?>" />
|
<input type="hidden" name="object_type" value="<?php echo strtolower(get_class($object)); ?>" />
|
||||||
<input type="submit" value="<?php echo _('Create'); ?>" />
|
<input type="submit" value="<?php echo T_('Create'); ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -27,13 +27,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php show_box_top(_('Adding a New User'), 'box box_add_user'); ?>
|
<?php show_box_top(T_('Adding a New User'), 'box box_add_user'); ?>
|
||||||
<?php Error::display('general'); ?>
|
<?php Error::display('general'); ?>
|
||||||
<form name="add_user" enctype="multpart/form-data" method="post" action="<?php echo Config::get('web_path') . "/admin/users.php?action=add_user"; ?>">
|
<form name="add_user" enctype="multpart/form-data" method="post" action="<?php echo Config::get('web_path') . "/admin/users.php?action=add_user"; ?>">
|
||||||
<table class="tabledata" cellspacing="0" cellpadding="0">
|
<table class="tabledata" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php echo _('Username'); ?>:
|
<?php echo T_('Username'); ?>:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="username" size="30" maxlength="128" value="<?php echo scrub_out($_POST['username']); ?>" />
|
<input type="text" name="username" size="30" maxlength="128" value="<?php echo scrub_out($_POST['username']); ?>" />
|
||||||
|
@ -41,14 +41,14 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo _('Full Name'); ?>:</td>
|
<td><?php echo T_('Full Name'); ?>:</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="fullname" size="30" value="<?php echo scrub_out($_POST['fullname']); ?>" />
|
<input type="text" name="fullname" size="30" value="<?php echo scrub_out($_POST['fullname']); ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php echo _('E-mail'); ?>:
|
<?php echo T_('E-mail'); ?>:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="email" size="30" value="<?php echo scrub_out($_POST['email']); ?>" />
|
<input type="text" name="email" size="30" value="<?php echo scrub_out($_POST['email']); ?>" />
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php echo _('Password'); ?> :
|
<?php echo T_('Password'); ?> :
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="password" name="password_1" size="30" value="" />
|
<input type="password" name="password_1" size="30" value="" />
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php echo _('Confirm Password'); ?>:
|
<?php echo T_('Confirm Password'); ?>:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="password" name="password_2" size="30" value="" />
|
<input type="password" name="password_2" size="30" value="" />
|
||||||
|
@ -73,23 +73,23 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php echo _('User Access Level'); ?>:
|
<?php echo T_('User Access Level'); ?>:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php $var_name = "on_" . $client->access; ${$var_name} = 'selected="selected"'; ?>
|
<?php $var_name = "on_" . $client->access; ${$var_name} = 'selected="selected"'; ?>
|
||||||
<select name="access">
|
<select name="access">
|
||||||
<option value="5" <?php echo $on_5; ?>><?php echo _('Guest'); ?></option>
|
<option value="5" <?php echo $on_5; ?>><?php echo T_('Guest'); ?></option>
|
||||||
<option value="25" <?php echo $on_25; ?>><?php echo _('User'); ?></option>
|
<option value="25" <?php echo $on_25; ?>><?php echo T_('User'); ?></option>
|
||||||
<option value="50" <?php echo $on_50; ?>><?php echo _('Content Manager'); ?></option>
|
<option value="50" <?php echo $on_50; ?>><?php echo T_('Content Manager'); ?></option>
|
||||||
<option value="75" <?php echo $on_75; ?>><?php echo _('Catalog Manager'); ?></option>
|
<option value="75" <?php echo $on_75; ?>><?php echo T_('Catalog Manager'); ?></option>
|
||||||
<option value="100" <?php echo $on_100; ?>><?php echo _('Admin'); ?></option>
|
<option value="100" <?php echo $on_100; ?>><?php echo T_('Admin'); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="formValidation">
|
<div class="formValidation">
|
||||||
<?php echo Core::form_register('add_user'); ?>
|
<?php echo Core::form_register('add_user'); ?>
|
||||||
<input type="submit" value="<?php echo _('Add User'); ?>" />
|
<input type="submit" value="<?php echo T_('Add User'); ?>" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
|
|
|
@ -26,11 +26,11 @@
|
||||||
* @link http://www.ampache.org/
|
* @link http://www.ampache.org/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
show_box_top(_('Starting New Song Search'), 'box box_adds_catalog');
|
show_box_top(T_('Starting New Song Search'), 'box box_adds_catalog');
|
||||||
/* HINT: Catalog Name */
|
/* HINT: Catalog Name */
|
||||||
printf(_('Starting New Song Search on %s catalog'), "<strong>[ $this->name ]</strong>");
|
printf(T_('Starting New Song Search on %s catalog'), "<strong>[ $this->name ]</strong>");
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo _('Found') . ': <span id="add_count_' . $this->id . '">' . _('None') . '</span><br />';
|
echo T_('Found') . ': <span id="add_count_' . $this->id . '">' . T_('None') . '</span><br />';
|
||||||
echo _('Reading') . ':<span id="add_dir_' . $this->id . '"></span><br />';
|
echo T_('Reading') . ':<span id="add_dir_' . $this->id . '"></span><br />';
|
||||||
show_box_bottom();
|
show_box_bottom();
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -35,14 +35,14 @@ $flagged = Flag::get_recent(10);
|
||||||
$songs = Catalog::get_disabled(10);
|
$songs = Catalog::get_disabled(10);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php show_box_top(_('Last Ten Flagged Records')); ?>
|
<?php show_box_top(T_('Last Ten Flagged Records')); ?>
|
||||||
<?php require Config::get('prefix') . '/templates/show_flagged.inc.php'; ?>
|
<?php require Config::get('prefix') . '/templates/show_flagged.inc.php'; ?>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
|
|
||||||
<?php show_box_top(_('Disabled Songs')); ?>
|
<?php show_box_top(T_('Disabled Songs')); ?>
|
||||||
<!-- Show Last 10 Disabled Songs -->
|
<!-- Show Last 10 Disabled Songs -->
|
||||||
<?php require Config::get('prefix') . '/templates/show_disabled_songs.inc.php'; ?>
|
<?php require Config::get('prefix') . '/templates/show_disabled_songs.inc.php'; ?>
|
||||||
<div>
|
<div>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=show_disabled"><?php echo _('Show All'); ?>...</a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=show_disabled"><?php echo T_('Show All'); ?>...</a>
|
||||||
</div>
|
</div>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
|
|
|
@ -30,15 +30,15 @@ $web_path = Config::get('web_path');
|
||||||
$catalogs = Catalog::get_catalogs();
|
$catalogs = Catalog::get_catalogs();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php show_box_top(_('Catalogs')); ?>
|
<?php show_box_top(T_('Catalogs')); ?>
|
||||||
<table class="tabledata" cellpadding="0" cellspacing="0">
|
<table class="tabledata" cellpadding="0" cellspacing="0">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col id="col_name" />
|
<col id="col_name" />
|
||||||
<col id="col_action" />
|
<col id="col_action" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr class="th-top">
|
<tr class="th-top">
|
||||||
<th class="cel_name"><?php echo _('Name'); ?></th>
|
<th class="cel_name"><?php echo T_('Name'); ?></th>
|
||||||
<th class="cel_action"><?php echo _('Action'); ?></th>
|
<th class="cel_action"><?php echo T_('Action'); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php foreach ($catalogs as $catalog) { ?>
|
<?php foreach ($catalogs as $catalog) { ?>
|
||||||
<tr class="<?php echo flip_class(); ?>">
|
<tr class="<?php echo flip_class(); ?>">
|
||||||
|
@ -49,22 +49,22 @@ $catalogs = Catalog::get_catalogs();
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_action">
|
<td class="cel_action">
|
||||||
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=add_to_catalog&catalogs[]=<?php echo $catalog->id; ?>">
|
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=add_to_catalog&catalogs[]=<?php echo $catalog->id; ?>">
|
||||||
<?php echo _('Add'); ?></a> |
|
<?php echo T_('Add'); ?></a> |
|
||||||
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=update_catalog&catalogs[]=<?php echo $catalog->id; ?>">
|
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=update_catalog&catalogs[]=<?php echo $catalog->id; ?>">
|
||||||
<?php echo _('Verify'); ?></a> |
|
<?php echo T_('Verify'); ?></a> |
|
||||||
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=clean_catalog&catalogs[]=<?php echo $catalog->id; ?>">
|
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=clean_catalog&catalogs[]=<?php echo $catalog->id; ?>">
|
||||||
<?php echo _('Clean'); ?></a> |
|
<?php echo T_('Clean'); ?></a> |
|
||||||
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=full_service&catalogs[]=<?php echo $catalog->id; ?>">
|
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=full_service&catalogs[]=<?php echo $catalog->id; ?>">
|
||||||
<?php echo _('All'); ?></a> |
|
<?php echo T_('All'); ?></a> |
|
||||||
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=show_delete_catalog&catalog_id=<?php echo $catalog->id; ?>">
|
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=show_delete_catalog&catalog_id=<?php echo $catalog->id; ?>">
|
||||||
<?php echo _('Delete'); ?></a>
|
<?php echo T_('Delete'); ?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--
|
<!--
|
||||||
<tr class="<?php echo flip_class(); ?>">
|
<tr class="<?php echo flip_class(); ?>">
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<?php echo _('Fast'); ?><input type="checkbox" name="fast" value="1" />
|
<?php echo T_('Fast'); ?><input type="checkbox" name="fast" value="1" />
|
||||||
<?php echo _('Gather Art'); ?><input type="checkbox" name="gather_art" value="1" />
|
<?php echo T_('Gather Art'); ?><input type="checkbox" name="gather_art" value="1" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
-->
|
-->
|
||||||
|
@ -72,34 +72,34 @@ $catalogs = Catalog::get_catalogs();
|
||||||
<?php if (!count($catalogs)) { ?>
|
<?php if (!count($catalogs)) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<?php echo _('No Catalogs Found'); ?>
|
<?php echo T_('No Catalogs Found'); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } // end if no catalogs ?>
|
<?php } // end if no catalogs ?>
|
||||||
<tr class="th-bottom">
|
<tr class="th-bottom">
|
||||||
<th class="cel_name"><?php echo _('Name'); ?></th>
|
<th class="cel_name"><?php echo T_('Name'); ?></th>
|
||||||
<th class="cel_action"><?php echo _('Action'); ?></th>
|
<th class="cel_action"><?php echo T_('Action'); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div>
|
<div>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=clean_all_catalogs"><?php echo _('Clean All'); ?></a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=clean_all_catalogs"><?php echo T_('Clean All'); ?></a>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=update_all_catalogs"><?php echo _('Verify All'); ?></a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=update_all_catalogs"><?php echo T_('Verify All'); ?></a>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=add_to_all_catalogs"><?php echo _('Add to All'); ?></a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=add_to_all_catalogs"><?php echo T_('Add to All'); ?></a>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=full_service"><?php echo _('Update All'); ?></a><hr noshade="noshade" size="3" />
|
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=full_service"><?php echo T_('Update All'); ?></a><hr noshade="noshade" size="3" />
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=show_add_catalog"><?php echo _('Add a Catalog'); ?></a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=show_add_catalog"><?php echo T_('Add a Catalog'); ?></a>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=show_clear_stats"><?php echo _('Clear Catalog Stats'); ?></a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=show_clear_stats"><?php echo T_('Clear Catalog Stats'); ?></a>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=gather_album_art"><?php echo _('Gather Album Art'); ?></a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=gather_album_art"><?php echo T_('Gather Album Art'); ?></a>
|
||||||
</div>
|
</div>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
|
|
||||||
<?php show_box_top(_('Other Tools')); ?>
|
<?php show_box_top(T_('Other Tools')); ?>
|
||||||
<div>
|
<div>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/duplicates.php"><?php echo _('Show Duplicate Songs'); ?></a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/duplicates.php"><?php echo T_('Show Duplicate Songs'); ?></a>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=clear_now_playing"><?php echo _('Clear Now Playing'); ?></a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/catalog.php?action=clear_now_playing"><?php echo T_('Clear Now Playing'); ?></a>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/system.php?action=generate_config"><?php echo _('Generate New Config'); ?></a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/system.php?action=generate_config"><?php echo T_('Generate New Config'); ?></a>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/preferences.php?action=show_set_preferences"><?php echo _('Preferences Permissions'); ?></a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/preferences.php?action=show_set_preferences"><?php echo T_('Preferences Permissions'); ?></a>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/system.php?action=export&export=itunes"><?php echo _('Export To Itunes DB'); ?></a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/system.php?action=export&export=itunes"><?php echo T_('Export To Itunes DB'); ?></a>
|
||||||
<a class="button" href="<?php echo $web_path; ?>/admin/users.php?action=show_inactive&days=30"><?php echo _('Show Inactive Users'); ?></a>
|
<a class="button" href="<?php echo $web_path; ?>/admin/users.php?action=show_inactive&days=30"><?php echo T_('Show Inactive Users'); ?></a>
|
||||||
<!-- <a class="button" href="<?php echo $web_path; ?>/admin/system.php?action=check_version"><?php echo _('Check for New Version'); ?></a>-->
|
<!-- <a class="button" href="<?php echo $web_path; ?>/admin/system.php?action=check_version"><?php echo T_('Check for New Version'); ?></a>-->
|
||||||
</div>
|
</div>
|
||||||
<?php show_box_bottom(); ?>
|
<?php show_box_bottom(); ?>
|
||||||
|
|
|
@ -32,14 +32,14 @@ $ajax_url = Config::get('ajax_url');
|
||||||
// Title for this album
|
// Title for this album
|
||||||
$title = scrub_out($album->name) . ' (' . $album->year . ')';
|
$title = scrub_out($album->name) . ' (' . $album->year . ')';
|
||||||
if ($album->disk) {
|
if ($album->disk) {
|
||||||
$title .= "<span class=\"discnb disc" . $album->disk . "\">, " . _('Disk') . " " . $album->disk . "</span>";
|
$title .= "<span class=\"discnb disc" . $album->disk . "\">, " . T_('Disk') . " " . $album->disk . "</span>";
|
||||||
}
|
}
|
||||||
$title .= ' - ' . $album->f_artist_link;
|
$title .= ' - ' . $album->f_artist_link;
|
||||||
?>
|
?>
|
||||||
<?php show_box_top($title,'info-box'); ?>
|
<?php show_box_top($title,'info-box'); ?>
|
||||||
<div class="album_art">
|
<div class="album_art">
|
||||||
<?php
|
<?php
|
||||||
if ($album->name != _('Unknown (Orphaned)')) {
|
if ($album->name != T_('Unknown (Orphaned)')) {
|
||||||
$name = '[' . $album->f_artist . '] ' . scrub_out($album->full_name);
|
$name = '[' . $album->f_artist . '] ' . scrub_out($album->full_name);
|
||||||
|
|
||||||
$aa_url = $web_path . "/image.php?id=" . $album->id . "&type=popup&sid=" . session_id();
|
$aa_url = $web_path . "/image.php?id=" . $album->id . "&type=popup&sid=" . session_id();
|
||||||
|
@ -53,36 +53,36 @@ $title .= ' - ' . $album->f_artist_link;
|
||||||
<div style="display:table-cell;" id="rating_<?php echo $album->id; ?>_album">
|
<div style="display:table-cell;" id="rating_<?php echo $album->id; ?>_album">
|
||||||
<?php Rating::show($album->id,'album'); ?>
|
<?php Rating::show($album->id,'album'); ?>
|
||||||
</div>
|
</div>
|
||||||
<h3><?php echo _('Actions'); ?>:</h3>
|
<h3><?php echo T_('Actions'); ?>:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<?php echo Ajax::button('?action=basket&type=album&id=' . $album->id,'add',_('Add'),'play_full_' . $album->id); ?>
|
<?php echo Ajax::button('?action=basket&type=album&id=' . $album->id,'add', T_('Add'),'play_full_' . $album->id); ?>
|
||||||
<?php echo Ajax::text('?action=basket&type=album&id=' . $album->id,_('Add Album'), 'play_full_text_' . $album->id); ?>
|
<?php echo Ajax::text('?action=basket&type=album&id=' . $album->id, T_('Add Album'), 'play_full_text_' . $album->id); ?>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<?php echo Ajax::button('?action=basket&type=album_random&id=' . $album->id,'random',_('Random'),'play_random_' . $album->id); ?>
|
<?php echo Ajax::button('?action=basket&type=album_random&id=' . $album->id,'random', T_('Random'),'play_random_' . $album->id); ?>
|
||||||
<?php echo Ajax::text('?action=basket&type=album_random&id=' . $album->id,_('Add Random from Album'), 'play_random_text_' . $album->id); ?>
|
<?php echo Ajax::text('?action=basket&type=album_random&id=' . $album->id, T_('Add Random from Album'), 'play_random_text_' . $album->id); ?>
|
||||||
</li>
|
</li>
|
||||||
<?php if (Access::check('interface','75')) { ?>
|
<?php if (Access::check('interface','75')) { ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo $web_path; ?>/albums.php?action=clear_art&album_id=<?php echo $album->id; ?>"><?php echo get_user_icon('delete',_('Reset Album Art')); ?></a>
|
<a href="<?php echo $web_path; ?>/albums.php?action=clear_art&album_id=<?php echo $album->id; ?>"><?php echo get_user_icon('delete', T_('Reset Album Art')); ?></a>
|
||||||
<a href="<?php echo $web_path; ?>/albums.php?action=clear_art&album_id=<?php echo $album->id; ?>"><?php echo _('Reset Album Art'); ?></a>
|
<a href="<?php echo $web_path; ?>/albums.php?action=clear_art&album_id=<?php echo $album->id; ?>"><?php echo T_('Reset Album Art'); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo $web_path; ?>/albums.php?action=find_art&album_id=<?php echo $album->id; ?>"><?php echo get_user_icon('view',_('Find Album Art')); ?></a>
|
<a href="<?php echo $web_path; ?>/albums.php?action=find_art&album_id=<?php echo $album->id; ?>"><?php echo get_user_icon('view', T_('Find Album Art')); ?></a>
|
||||||
<a href="<?php echo $web_path; ?>/albums.php?action=find_art&album_id=<?php echo $album->id; ?>"><?php echo _('Find Album Art'); ?></a>
|
<a href="<?php echo $web_path; ?>/albums.php?action=find_art&album_id=<?php echo $album->id; ?>"><?php echo T_('Find Album Art'); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php if ((Access::check('interface','50'))) { ?>
|
<?php if ((Access::check('interface','50'))) { ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo $web_path; ?>/albums.php?action=update_from_tags&album_id=<?php echo $album->id; ?>"><?php echo get_user_icon('cog', _('Update from tags')); ?></a>
|
<a href="<?php echo $web_path; ?>/albums.php?action=update_from_tags&album_id=<?php echo $album->id; ?>"><?php echo get_user_icon('cog', T_('Update from tags')); ?></a>
|
||||||
<a href="<?php echo $web_path; ?>/albums.php?action=update_from_tags&album_id=<?php echo $album->id; ?>"><?php echo _('Update from tags'); ?></a>
|
<a href="<?php echo $web_path; ?>/albums.php?action=update_from_tags&album_id=<?php echo $album->id; ?>"><?php echo T_('Update from tags'); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (Access::check_function('batch_download')) { ?>
|
<?php if (Access::check_function('batch_download')) { ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo $web_path; ?>/batch.php?action=album&id=<?php echo $album->id; ?>"><?php echo get_user_icon('batch_download', _('Download')); ?></a>
|
<a href="<?php echo $web_path; ?>/batch.php?action=album&id=<?php echo $album->id; ?>"><?php echo get_user_icon('batch_download', T_('Download')); ?></a>
|
||||||
<a href="<?php echo $web_path; ?>/batch.php?action=album&id=<?php echo $album->id; ?>"><?php echo _('Download'); ?></a>
|
<a href="<?php echo $web_path; ?>/batch.php?action=album&id=<?php echo $album->id; ?>"><?php echo T_('Download'); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -31,7 +31,7 @@ $total_images = count($images);
|
||||||
$rows = floor($total_images/4);
|
$rows = floor($total_images/4);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
?>
|
?>
|
||||||
<?php show_box_top(_('Select New Album Art'), 'box box_album_art'); ?>
|
<?php show_box_top(T_('Select New Album Art'), 'box box_album_art'); ?>
|
||||||
<table class="table-data">
|
<table class="table-data">
|
||||||
<tr>
|
<tr>
|
||||||
<?php
|
<?php
|
||||||
|
@ -45,15 +45,15 @@ while ($i <= $rows) {
|
||||||
else {
|
else {
|
||||||
?>
|
?>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="<?php echo $image_url; ?>" target="_blank"><img src="<?php echo $image_url; ?>" alt="<?php echo _('Album Art'); ?>" border="0" height="175" width="175" /></a>
|
<a href="<?php echo $image_url; ?>" target="_blank"><img src="<?php echo $image_url; ?>" alt="<?php echo T_('Album 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)) { ?>
|
||||||
[<?php echo intval($dimensions['width']); ?>x<?php echo intval($dimensions['height']); ?>]
|
[<?php echo intval($dimensions['width']); ?>x<?php echo intval($dimensions['height']); ?>]
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<span class="error"><?php echo _('Invalid'); ?></span>
|
<span class="error"><?php echo T_('Invalid'); ?></span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
[<a href="<?php echo Config::get('web_path'); ?>/albums.php?action=select_art&image=<?php echo $key; ?>&album_id=<?php echo intval($_REQUEST['album_id']); ?>"><?php echo _('Select'); ?></a>]
|
[<a href="<?php echo Config::get('web_path'); ?>/albums.php?action=select_art&image=<?php echo $key; ?>&album_id=<?php echo intval($_REQUEST['album_id']); ?>"><?php echo T_('Select'); ?></a>]
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<td class="cel_add">
|
<td class="cel_add">
|
||||||
<?php echo Ajax::button('?action=basket&type=album&id=' . $album->id,'add',_('Add'),'add_album_' . $album->id); ?>
|
<?php echo Ajax::button('?action=basket&type=album&id=' . $album->id,'add', T_('Add'),'add_album_' . $album->id); ?>
|
||||||
<?php echo Ajax::button('?action=basket&type=album_random&id=' . $album->id,'random',_('Random'),'random_album_' . $album->id); ?>
|
<?php echo Ajax::button('?action=basket&type=album_random&id=' . $album->id,'random', T_('Random'),'random_album_' . $album->id); ?>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
if (Art::is_enabled()) {
|
if (Art::is_enabled()) {
|
||||||
|
@ -50,15 +50,15 @@ if (Art::is_enabled()) {
|
||||||
<td class="cel_action">
|
<td class="cel_action">
|
||||||
<?php if (Config::get('sociable')) { ?>
|
<?php if (Config::get('sociable')) { ?>
|
||||||
<a href="<?php echo Config::get('web_path'); ?>/shout.php?action=show_add_shout&type=album&id=<?php echo $album->id; ?>">
|
<a href="<?php echo Config::get('web_path'); ?>/shout.php?action=show_add_shout&type=album&id=<?php echo $album->id; ?>">
|
||||||
<?php echo get_user_icon('comment',_('Post Shout')); ?>
|
<?php echo get_user_icon('comment', T_('Post Shout')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (Access::check_function('batch_download')) { ?>
|
<?php if (Access::check_function('batch_download')) { ?>
|
||||||
<a href="<?php echo Config::get('web_path'); ?>/batch.php?action=album&id=<?php echo $album->id; ?>">
|
<a href="<?php echo Config::get('web_path'); ?>/batch.php?action=album&id=<?php echo $album->id; ?>">
|
||||||
<?php echo get_user_icon('batch_download',_('Batch Download')); ?>
|
<?php echo get_user_icon('batch_download', T_('Batch Download')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (Access::check('interface','50')) { ?>
|
<?php if (Access::check('interface','50')) { ?>
|
||||||
<?php echo Ajax::button('?action=show_edit_object&type=album_row&id=' . $album->id,'edit',_('Edit'),'edit_album_' . $album->id); ?>
|
<?php echo Ajax::button('?action=show_edit_object&type=album_row&id=' . $album->id,'edit', T_('Edit'),'edit_album_' . $album->id); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -45,17 +45,17 @@ $ajax_url = Config::get('ajax_url');
|
||||||
<col id="col_action" />
|
<col id="col_action" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr class="th-top">
|
<tr class="th-top">
|
||||||
<th class="cel_add"><?php echo _('Add'); ?></th>
|
<th class="cel_add"><?php echo T_('Add'); ?></th>
|
||||||
<?php if (Art::is_enabled()) { ?>
|
<?php if (Art::is_enabled()) { ?>
|
||||||
<th class="cel_cover"><?php echo _('Cover'); ?></th>
|
<th class="cel_cover"><?php echo T_('Cover'); ?></th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<th class="cel_album"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name',_('Album'),'album_sort_name'); ?></th>
|
<th class="cel_album"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name', T_('Album'),'album_sort_name'); ?></th>
|
||||||
<th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=artist',_('Artist'),'album_sort_artist'); ?></th>
|
<th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=artist', T_('Artist'),'album_sort_artist'); ?></th>
|
||||||
<th class="cel_songs"><?php echo _('Songs'); ?></th>
|
<th class="cel_songs"><?php echo T_('Songs'); ?></th>
|
||||||
<th class="cel_year"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=year',_('Year'),'album_sort_year'); ?></th>
|
<th class="cel_year"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=year', T_('Year'),'album_sort_year'); ?></th>
|
||||||
<th class="cel_tags"><?php echo _('Tags'); ?></th>
|
<th class="cel_tags"><?php echo T_('Tags'); ?></th>
|
||||||
<th class="col_rating"><?php echo _('Rating'); ?></th>
|
<th class="col_rating"><?php echo T_('Rating'); ?></th>
|
||||||
<th class="cel_action"><?php echo _('Actions'); ?></th>
|
<th class="cel_action"><?php echo T_('Actions'); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if (Config::get('ratings')) {
|
if (Config::get('ratings')) {
|
||||||
|
@ -72,21 +72,21 @@ $ajax_url = Config::get('ajax_url');
|
||||||
<?php } //end foreach ($albums as $album) ?>
|
<?php } //end foreach ($albums as $album) ?>
|
||||||
<?php if (!count($object_ids)) { ?>
|
<?php if (!count($object_ids)) { ?>
|
||||||
<tr class="<?php echo flip_class(); ?>">
|
<tr class="<?php echo flip_class(); ?>">
|
||||||
<td colspan="7"><span class="fatalerror"><?php echo _('Not Enough Data'); ?></span></td>
|
<td colspan="7"><span class="fatalerror"><?php echo T_('Not Enough Data'); ?></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<tr class="th-bottom">
|
<tr class="th-bottom">
|
||||||
<th class="cel_add"><?php echo _('Add'); ?></th>
|
<th class="cel_add"><?php echo T_('Add'); ?></th>
|
||||||
<?php if (Art::is_enabled()) { ?>
|
<?php if (Art::is_enabled()) { ?>
|
||||||
<th class="cel_cover"><?php echo _('Cover'); ?></th>
|
<th class="cel_cover"><?php echo T_('Cover'); ?></th>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<th class="cel_album"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name',_('Album'),'album_sort_name_bottom'); ?></th>
|
<th class="cel_album"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name', T_('Album'),'album_sort_name_bottom'); ?></th>
|
||||||
<th class="cel_artist"><?php echo _('Artist'); ?></th>
|
<th class="cel_artist"><?php echo T_('Artist'); ?></th>
|
||||||
<th class="cel_songs"><?php echo _('Songs'); ?></th>
|
<th class="cel_songs"><?php echo T_('Songs'); ?></th>
|
||||||
<th class="cel_year"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=year',_('Year'),'album_sort_year_bottom'); ?></th>
|
<th class="cel_year"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=year', T_('Year'),'album_sort_year_bottom'); ?></th>
|
||||||
<th class="cel_tags"><?php echo _('Tags'); ?></th>
|
<th class="cel_tags"><?php echo T_('Tags'); ?></th>
|
||||||
<th class="col_rating"><?php echo _('Rating'); ?></th>
|
<th class="col_rating"><?php echo T_('Rating'); ?></th>
|
||||||
<th class="cel_action"><?php echo _('Actions'); ?></th>
|
<th class="cel_action"><?php echo T_('Actions'); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?>
|
<?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?>
|
||||||
|
|
|
@ -30,25 +30,25 @@
|
||||||
<table class="tabledata">
|
<table class="tabledata">
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" >
|
<td valign="top" >
|
||||||
<?php show_info_box(_('Most Popular Artists'), 'artist', $artists); ?>
|
<?php show_info_box(T_('Most Popular Artists'), 'artist', $artists); ?>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
<?php show_info_box(_('Most Popular Albums'), '', $albums); ?>
|
<?php show_info_box(T_('Most Popular Albums'), '', $albums); ?>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
<?php show_info_box(_('Most Popular Genres'), '', $genres); ?>
|
<?php show_info_box(T_('Most Popular Genres'), '', $genres); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td colspan="2"> </td></tr>
|
<tr><td colspan="2"> </td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
<?php show_info_box(_('Most Popular Songs'), 'song', $songs); ?>
|
<?php show_info_box(T_('Most Popular Songs'), 'song', $songs); ?>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
<?php show_info_box(_('Most Popular Live Streams'),'live_stream',$live_streams); ?>
|
<?php show_info_box(T_('Most Popular Live Streams'),'live_stream',$live_streams); ?>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
<?php show_info_box(_('Most Popular Tags'),'tags',$tags); ?>
|
<?php show_info_box(T_('Most Popular Tags'),'tags',$tags); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td colspan="2"> </td></tr>
|
<tr><td colspan="2"> </td></tr>
|
||||||
|
|
|
@ -39,43 +39,43 @@ if (Config::get('ratings')) {
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<div id="information_actions">
|
<div id="information_actions">
|
||||||
<h3><?php echo _('Actions'); ?>:</h3>
|
<h3><?php echo T_('Actions'); ?>:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<?php if ($object_type == 'album') { ?>
|
<?php if ($object_type == 'album') { ?>
|
||||||
<a href="<?php echo $web_path; ?>/artists.php?action=show_all_songs&artist=<?php echo $artist->id; ?>">
|
<a href="<?php echo $web_path; ?>/artists.php?action=show_all_songs&artist=<?php echo $artist->id; ?>">
|
||||||
<?php echo get_user_icon('view', _("Show All Songs By %s")); ?>
|
<?php echo get_user_icon('view', T_("Show All Songs By %s")); ?>
|
||||||
<?php printf(_("Show All Songs By %s"), $artist->f_name); ?></a>
|
<?php printf(T_("Show All Songs By %s"), $artist->f_name); ?></a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<a href="<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo $artist->id; ?>">
|
<a href="<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo $artist->id; ?>">
|
||||||
<?php echo get_user_icon('view', _("Show Albums By %s")); ?>
|
<?php echo get_user_icon('view', T_("Show Albums By %s")); ?>
|
||||||
<?php printf(_("Show Albums By %s"), $artist->f_name); ?></a>
|
<?php printf(T_("Show Albums By %s"), $artist->f_name); ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<?php /* HINT: Artist Fullname */ ?>
|
<?php /* HINT: Artist Fullname */ ?>
|
||||||
<?php echo Ajax::button('?action=basket&type=artist&id=' . $artist->id,'add',_('Add'),'add_' . $artist->id); ?>
|
<?php echo Ajax::button('?action=basket&type=artist&id=' . $artist->id,'add', T_('Add'),'add_' . $artist->id); ?>
|
||||||
<?php echo Ajax::text('?action=basket&type=artist&id=' . $artist->id,sprintf(_('Add All Songs By %s'), $artist->f_name),'add_text_' . $artist->id); ?>
|
<?php echo Ajax::text('?action=basket&type=artist&id=' . $artist->id,sprintf(T_('Add All Songs By %s'), $artist->f_name),'add_text_' . $artist->id); ?>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<?php /* HINT: Artist Fullname */ ?>
|
<?php /* HINT: Artist Fullname */ ?>
|
||||||
<?php echo Ajax::button('?action=basket&type=artist_random&id=' . $artist->id,'random',_('Random'),'random_' . $artist->id); ?>
|
<?php echo Ajax::button('?action=basket&type=artist_random&id=' . $artist->id,'random', T_('Random'),'random_' . $artist->id); ?>
|
||||||
<?php echo Ajax::text('?action=basket&type=artist_random&id=' . $artist->id, sprintf(_('Add Random Songs By %s'), $artist->f_name),'random_text_' . $artist->id); ?>
|
<?php echo Ajax::text('?action=basket&type=artist_random&id=' . $artist->id, sprintf(T_('Add Random Songs By %s'), $artist->f_name),'random_text_' . $artist->id); ?>
|
||||||
</li>
|
</li>
|
||||||
<?php if (Access::check('interface','50')) { ?>
|
<?php if (Access::check('interface','50')) { ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo $web_path; ?>/artists.php?action=update_from_tags&artist=<?php echo $artist->id; ?>"><?php echo get_user_icon('cog', _('Update from tags')); ?></a>
|
<a href="<?php echo $web_path; ?>/artists.php?action=update_from_tags&artist=<?php echo $artist->id; ?>"><?php echo get_user_icon('cog', T_('Update from tags')); ?></a>
|
||||||
<a href="<?php echo $web_path; ?>/artists.php?action=update_from_tags&artist=<?php echo $artist->id; ?>"><?php echo _('Update from tags'); ?></a>
|
<a href="<?php echo $web_path; ?>/artists.php?action=update_from_tags&artist=<?php echo $artist->id; ?>"><?php echo T_('Update from tags'); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (Access::check_function('batch_download')) { ?>
|
<?php if (Access::check_function('batch_download')) { ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo $web_path; ?>/batch.php?action=artist&id=<?php echo $artist->id; ?>"><?php echo get_user_icon('batch_download', _('Download')); ?></a>
|
<a href="<?php echo $web_path; ?>/batch.php?action=artist&id=<?php echo $artist->id; ?>"><?php echo get_user_icon('batch_download', T_('Download')); ?></a>
|
||||||
<a href="<?php echo $web_path; ?>/batch.php?action=artist&id=<?php echo $artist->id; ?>"><?php echo _('Download'); ?></a>
|
<a href="<?php echo $web_path; ?>/batch.php?action=artist&id=<?php echo $artist->id; ?>"><?php echo T_('Download'); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" id="show_artist_artCB" <?php echo $string = Art::is_enabled() ? 'checked="checked"' : ''; ?>/> <?php echo _('Show Art'); ?>
|
<input type="checkbox" id="show_artist_artCB" <?php echo $string = Art::is_enabled() ? 'checked="checked"' : ''; ?>/> <?php echo T_('Show Art'); ?>
|
||||||
<?php echo Ajax::observe('show_artist_artCB', 'click', Ajax::action('?page=browse&action=show_art&browse_id=' . $browse->id,'')); ?>
|
<?php echo Ajax::observe('show_artist_artCB', 'click', Ajax::action('?page=browse&action=show_art&browse_id=' . $browse->id,'')); ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<td class="cel_add">
|
<td class="cel_add">
|
||||||
<?php echo Ajax::button('?action=basket&type=artist&id=' . $artist->id,'add',_('Add'),'add_artist_' . $artist->id); ?>
|
<?php echo Ajax::button('?action=basket&type=artist&id=' . $artist->id,'add', T_('Add'),'add_artist_' . $artist->id); ?>
|
||||||
<?php echo Ajax::button('?action=basket&type=artist_random&id=' . $artist->id,'random',_('Random'),'random_artist_' . $artist->id); ?>
|
<?php echo Ajax::button('?action=basket&type=artist_random&id=' . $artist->id,'random', T_('Random'),'random_artist_' . $artist->id); ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="cel_artist"><?php echo $artist->f_name_link; ?></td>
|
<td class="cel_artist"><?php echo $artist->f_name_link; ?></td>
|
||||||
<td class="cel_songs"><?php echo $artist->songs; ?></td>
|
<td class="cel_songs"><?php echo $artist->songs; ?></td>
|
||||||
|
@ -40,10 +40,10 @@
|
||||||
<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 Config::get('web_path'); ?>/batch.php?action=artist&id=<?php echo $artist->id; ?>">
|
<a href="<?php echo Config::get('web_path'); ?>/batch.php?action=artist&id=<?php echo $artist->id; ?>">
|
||||||
<?php echo get_user_icon('batch_download','',_('Batch Download')); ?>
|
<?php echo get_user_icon('batch_download','', T_('Batch Download')); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (Access::check('interface','50')) { ?>
|
<?php if (Access::check('interface','50')) { ?>
|
||||||
<?php echo Ajax::button('?action=show_edit_object&type=artist_row&id=' . $artist->id,'edit',_('Edit'),'edit_artist_' . $artist->id); ?>
|
<?php echo Ajax::button('?action=show_edit_object&type=artist_row&id=' . $artist->id,'edit', T_('Edit'),'edit_artist_' . $artist->id); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -43,14 +43,14 @@ $web_path = Config::get('web_path');
|
||||||
<col id="col_action" />
|
<col id="col_action" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr class="th-top">
|
<tr class="th-top">
|
||||||
<th class="cel_add"><?php echo _('Add'); ?></th>
|
<th class="cel_add"><?php echo T_('Add'); ?></th>
|
||||||
<th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&type=artist&sort=name',_('Artist'),'artist_sort_name'); ?></th>
|
<th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&type=artist&sort=name', T_('Artist'),'artist_sort_name'); ?></th>
|
||||||
<th class="cel_songs"><?php echo _('Songs'); ?></th>
|
<th class="cel_songs"><?php echo T_('Songs'); ?></th>
|
||||||
<th class="cel_albums"><?php echo _('Albums'); ?></th>
|
<th class="cel_albums"><?php echo T_('Albums'); ?></th>
|
||||||
<th class="cel_time"><?php echo _('Time'); ?></th>
|
<th class="cel_time"><?php echo T_('Time'); ?></th>
|
||||||
<th class="cel_tags"><?php echo _('Tags'); ?></th>
|
<th class="cel_tags"><?php echo T_('Tags'); ?></th>
|
||||||
<th class="cel_rating"> <?php echo _('Rating'); ?> </th>
|
<th class="cel_rating"> <?php echo T_('Rating'); ?> </th>
|
||||||
<th class="cel_action"> <?php echo _('Action'); ?> </th>
|
<th class="cel_action"> <?php echo T_('Action'); ?> </th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
// Cache the ratings we are going to use
|
// Cache the ratings we are going to use
|
||||||
|
@ -67,18 +67,18 @@ foreach ($object_ids as $artist_id) {
|
||||||
<?php } //end foreach ($artists as $artist) ?>
|
<?php } //end foreach ($artists as $artist) ?>
|
||||||
<?php if (!count($object_ids)) { ?>
|
<?php if (!count($object_ids)) { ?>
|
||||||
<tr class="<?php echo flip_class(); ?>">
|
<tr class="<?php echo flip_class(); ?>">
|
||||||
<td colspan="5"><span class="fatalerror"><?php echo _('Not Enough Data'); ?></span></td>
|
<td colspan="5"><span class="fatalerror"><?php echo T_('Not Enough Data'); ?></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<tr class="th-bottom">
|
<tr class="th-bottom">
|
||||||
<th class="cel_add"><?php echo _('Add'); ?></th>
|
<th class="cel_add"><?php echo T_('Add'); ?></th>
|
||||||
<th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&type=artist&sort=name',_('Artist'),'artist_sort_name_bottom'); ?></th>
|
<th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&type=artist&sort=name', T_('Artist'),'artist_sort_name_bottom'); ?></th>
|
||||||
<th class="cel_songs"> <?php echo _('Songs'); ?> </th>
|
<th class="cel_songs"> <?php echo T_('Songs'); ?> </th>
|
||||||
<th class="cel_albums"> <?php echo _('Albums'); ?> </th>
|
<th class="cel_albums"> <?php echo T_('Albums'); ?> </th>
|
||||||
<th class="cel_time"> <?php echo _('Time'); ?> </th>
|
<th class="cel_time"> <?php echo T_('Time'); ?> </th>
|
||||||
<th class="cel_tags"><?php echo _('Tags'); ?></th>
|
<th class="cel_tags"><?php echo T_('Tags'); ?></th>
|
||||||
<th class="cel_rating"> <?php echo _('Rating'); ?> </th>
|
<th class="cel_rating"> <?php echo T_('Rating'); ?> </th>
|
||||||
<th class="cel_action"> <?php echo _('Action'); ?> </th>
|
<th class="cel_action"> <?php echo T_('Action'); ?> </th>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?>
|
<?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?>
|
||||||
|
|
|
@ -33,11 +33,11 @@ $htmllang = str_replace("_","-",Config::get('lang'));
|
||||||
<head>
|
<head>
|
||||||
<link rel="shortcut icon" href="<?php echo Config::get('web_path'); ?>/favicon.ico" />
|
<link rel="shortcut icon" href="<?php echo Config::get('web_path'); ?>/favicon.ico" />
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo Config::get('site_charset'); ?>" />
|
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo Config::get('site_charset'); ?>" />
|
||||||
<title><?php echo Config::get('site_title'); ?> - <?php echo _("Album Art"); ?></title>
|
<title><?php echo Config::get('site_title'); ?> - <?php echo T_("Album Art"); ?></title>
|
||||||
</head>
|
</head>
|
||||||
<body onload="self.resizeTo(document.images[0].width+30, document.images[0].height+70)">
|
<body onload="self.resizeTo(document.images[0].width+30, document.images[0].height+70)">
|
||||||
<?php
|
<?php
|
||||||
echo "<a href=\"javascript:window.close()\" title=\"" . _('Click to close window') . "\">";
|
echo "<a href=\"javascript:window.close()\" title=\"" . T_('Click to close window') . "\">";
|
||||||
echo "<img src=\"" . Config::get('web_path') . "/image.php?id=" . scrub_out($_GET['id']) . "&sid=" . session_id() . "\" border=\"0\" alt=\"\" />";
|
echo "<img src=\"" . Config::get('web_path') . "/image.php?id=" . scrub_out($_GET['id']) . "&sid=" . session_id() . "\" border=\"0\" alt=\"\" />";
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -34,10 +34,10 @@ $web_path = Config::get('web_path');
|
||||||
<td class="cel_lastadd"><?php echo scrub_out($catalog->f_add); ?></td>
|
<td class="cel_lastadd"><?php echo scrub_out($catalog->f_add); ?></td>
|
||||||
<td class="cel_lastclean"><?php echo scrub_out($catalog->f_clean); ?></td>
|
<td class="cel_lastclean"><?php echo scrub_out($catalog->f_clean); ?></td>
|
||||||
<td class="cel_action">
|
<td class="cel_action">
|
||||||
<a href="<?php echo $web_path; ?>/admin/catalog.php?action=add_to_catalog&catalogs[]=<?php echo $catalog->id; ?>"><?php echo _('Add'); ?></a>
|
<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=update_catalog&catalogs[]=<?php echo $catalog->id; ?>"><?php echo _('Verify'); ?></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=clean_catalog&catalogs[]=<?php echo $catalog->id; ?>"><?php echo _('Clean'); ?></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=full_service&catalogs[]=<?php echo $catalog->id; ?>"><?php echo _('Update'); ?></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=gather_album_art&catalogs[]=<?php echo $catalog->id; ?>"><?php echo _('Gather Art'); ?></a>
|
| <a href="<?php echo $web_path; ?>/admin/catalog.php?action=gather_album_art&catalogs[]=<?php echo $catalog->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 _('Delete'); ?></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>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -38,12 +38,12 @@
|
||||||
<col id="col_action" />
|
<col id="col_action" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr class="th-top">
|
<tr class="th-top">
|
||||||
<th class="cel_catalog"><?php echo _('Name'); ?></th>
|
<th class="cel_catalog"><?php echo T_('Name'); ?></th>
|
||||||
<th class="cel_path"><?php echo _('Path'); ?></th>
|
<th class="cel_path"><?php echo T_('Path'); ?></th>
|
||||||
<th class="cel_lastverify"><?php echo _('Last Verify'); ?></th>
|
<th class="cel_lastverify"><?php echo T_('Last Verify'); ?></th>
|
||||||
<th class="cel_lastadd"><?php echo _('Last Add'); ?></th>
|
<th class="cel_lastadd"><?php echo T_('Last Add'); ?></th>
|
||||||
<th class="cel_lastclean"><?php echo _('Last Clean'); ?></th>
|
<th class="cel_lastclean"><?php echo T_('Last Clean'); ?></th>
|
||||||
<th class="cel_action"><?php echo _('Actions'); ?></th>
|
<th class="cel_action"><?php echo T_('Actions'); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
foreach ($object_ids as $catalog_id) {
|
foreach ($object_ids as $catalog_id) {
|
||||||
|
@ -57,17 +57,17 @@
|
||||||
<tr class="<?php echo flip_class(); ?>">
|
<tr class="<?php echo flip_class(); ?>">
|
||||||
<td colspan="6">
|
<td colspan="6">
|
||||||
<?php if (!count($object_ids)) { ?>
|
<?php if (!count($object_ids)) { ?>
|
||||||
<span class="fatalerror"><?php echo _('Not Enough Data'); ?></span>
|
<span class="fatalerror"><?php echo T_('Not Enough Data'); ?></span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="th-bottom">
|
<tr class="th-bottom">
|
||||||
<th class="cel_catalog"><?php echo _('Name'); ?></th>
|
<th class="cel_catalog"><?php echo T_('Name'); ?></th>
|
||||||
<th class="cel_path"><?php echo _('Path'); ?></th>
|
<th class="cel_path"><?php echo T_('Path'); ?></th>
|
||||||
<th class="cel_lastverify"><?php echo _('Last Verify'); ?></th>
|
<th class="cel_lastverify"><?php echo T_('Last Verify'); ?></th>
|
||||||
<th class="cel_lastadd"><?php echo _('Last Add'); ?></th>
|
<th class="cel_lastadd"><?php echo T_('Last Add'); ?></th>
|
||||||
<th class="cel_lastclean"><?php echo _('Last Clean'); ?></th>
|
<th class="cel_lastclean"><?php echo T_('Last Clean'); ?></th>
|
||||||
<th class="cel_action"><?php echo _('Actions'); ?></th>
|
<th class="cel_action"><?php echo T_('Actions'); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?>
|
<?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?>
|
||||||
|
|
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