diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-06-19 18:05:40 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-06-19 18:05:40 +0000 |
commit | 0c0262b8a7326d1e2effbce5d422fd672300d114 (patch) | |
tree | e84c501cccbb2e7d3d9655685020fd7a266a7170 /templates | |
parent | 49f48af532c2d3196d94b444c3514bdb1a499436 (diff) | |
download | ampache-0c0262b8a7326d1e2effbce5d422fd672300d114.tar.gz ampache-0c0262b8a7326d1e2effbce5d422fd672300d114.tar.bz2 ampache-0c0262b8a7326d1e2effbce5d422fd672300d114.zip |
mother of all commits...
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin_menu.inc | 1 | ||||
-rw-r--r-- | templates/header.inc | 2 | ||||
-rw-r--r-- | templates/list_duplicates.inc | 10 | ||||
-rw-r--r-- | templates/list_flagged.inc | 2 | ||||
-rw-r--r-- | templates/menu.inc | 4 | ||||
-rw-r--r-- | templates/show_add_access.inc | 14 | ||||
-rw-r--r-- | templates/show_admin_index.inc | 4 | ||||
-rw-r--r-- | templates/show_album.inc | 18 | ||||
-rw-r--r-- | templates/show_albums.inc | 14 | ||||
-rw-r--r-- | templates/show_artist.inc | 8 | ||||
-rw-r--r-- | templates/show_artists.inc | 6 | ||||
-rw-r--r-- | templates/show_box.inc | 4 | ||||
-rw-r--r-- | templates/show_import_playlist.inc.php | 4 | ||||
-rw-r--r-- | templates/show_mpdplay.inc | 18 | ||||
-rw-r--r-- | templates/show_now_playing.inc | 9 | ||||
-rw-r--r-- | templates/show_play_selected.inc.php | 2 | ||||
-rw-r--r-- | templates/show_preferences.inc | 6 | ||||
-rw-r--r-- | templates/show_search.inc | 22 | ||||
-rw-r--r-- | templates/show_songs.inc | 26 | ||||
-rw-r--r-- | templates/show_users.inc | 5 | ||||
-rw-r--r-- | templates/song_edit.inc | 48 | ||||
-rw-r--r-- | templates/tool_box.inc | 4 |
22 files changed, 116 insertions, 115 deletions
diff --git a/templates/admin_menu.inc b/templates/admin_menu.inc index 0d875e70..9b14f238 100644 --- a/templates/admin_menu.inc +++ b/templates/admin_menu.inc @@ -52,3 +52,4 @@ $items = array( ?> </ul> +<br />
\ No newline at end of file diff --git a/templates/header.inc b/templates/header.inc index a6610532..04efb4fc 100644 --- a/templates/header.inc +++ b/templates/header.inc @@ -27,7 +27,7 @@ $htmllang = str_replace("_","-",conf('lang')); <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html lang="<?php echo $htmllang; ?>"> <head> -<link rel="shortcut icon" href="<?php echo conf('web_path'); ?>/favicon.ico"> +<link rel="shortcut icon" href="<?php echo conf('web_path'); ?>/favicon.ico" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo conf('site_charset'); ?>" /> <?php show_template('style'); ?> <title><?php echo conf('site_title'); ?></title> diff --git a/templates/list_duplicates.inc b/templates/list_duplicates.inc index ec1a8632..d86df351 100644 --- a/templates/list_duplicates.inc +++ b/templates/list_duplicates.inc @@ -30,10 +30,10 @@ <?php show_duplicate_searchbox($search_type) ?> <?php if ( $flags ) { ?> -</form> + <form method="post" enctype="multipart/form-data" action="<?php echo conf('web_path') . "/admin/song.php?action=disable"; ?>"> <p style="font-size: 10pt; font-weight: bold;">Duplicate Songs</p> -<table class="tabledata" cellspacing="0" cellpadding="0" border="1"> +<table class="tabledata" cellspacing="0" cellpadding="0" > <tr class="table-header"> <td>Disable</td> <td>Song</td> @@ -60,8 +60,8 @@ foreach ($dinfolist as $dinfo) { echo "<tr class=\"".$class."\">". - "<td><input type=\"checkbox\" name=\"song_ids[]\" value=\"" . $dinfo['songid'] . "\">". - "<td><a href=\"".conf('web_path')."/song.php?action=m3u&song=$song->id\">$formated_title</td>". + "<td><input type=\"checkbox\" name=\"song_ids[]\" value=\"" . $dinfo['songid'] . "\" />". + "<td><a href=\"".conf('web_path')."/song.php?action=m3u&song=$song->id\">$formated_title</td>". "<td><a href=\"".conf('web_path')."/artists.php?action=show&artist=".$dinfo['artistid']."\" title=\"".$dinfo['artist']."\">".$dinfo['artist']."</a> </td>". "<td><a href=\"".conf('web_path')."/albums.php?action=show&album=".$dinfo['albumid']."\" title=\"".$dinfo['album']."\">".$dinfo['album']."</a> </td>". "<td>".floor($dinfo['time']/60).":".sprintf("%02d", ($dinfo['time']%60) )."</td>". @@ -82,6 +82,6 @@ <?php } else { ?> <p> You don't have any duplicate songs. </p> - +</form> <?php } ?> diff --git a/templates/list_flagged.inc b/templates/list_flagged.inc index 607206b5..2a09e7e1 100644 --- a/templates/list_flagged.inc +++ b/templates/list_flagged.inc @@ -33,7 +33,7 @@ this list to determine what songs you need to re-rip or tags you need to update.</p> <?php if ( $flags ) { ?> -<form name="songs" action="<?php echo $_SERVER['PHP_SELF'];; ?>" method="post"> +<form name="songs" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <table class="tabledata" cellspacing="0" cellpadding="0" border="1"> <tr class="table-header"> diff --git a/templates/menu.inc b/templates/menu.inc index 5ca40c9e..ce5608f9 100644 --- a/templates/menu.inc +++ b/templates/menu.inc @@ -81,9 +81,9 @@ if ($GLOBALS['user']->prefs['upload']) { } // else } // if use_auth elseif ( $GLOBALS['user']->id != '0') { - print("\t\t<li bgcolor=\"" . conf('primary_color') . "\" align=\"center\">". - "<a href=\"".conf('web_path')."/logout.php\">" . _("Logout") . "</a> </li>\n"); + print("\t\t<li><a href=\"".conf('web_path')."/logout.php\">" . _("Logout") . "</a> </li>\n"); } // else no user ?> </ul> +<br />
\ No newline at end of file diff --git a/templates/show_add_access.inc b/templates/show_add_access.inc index 89ea79e5..2d9f1074 100644 --- a/templates/show_add_access.inc +++ b/templates/show_add_access.inc @@ -32,33 +32,33 @@ <p><?php print _("Use the form below to add a host that you want to have access to your Ampache catalog."); ?></p> -<p> + <form name="update_catalog" method="post" enctype="multipart/form-data" action="<?= conf('web_path'); ?>/admin/access.php"> <table cellpadding="5" cellspacing="0" border="0"> <tr> <td><?php print _("Name"); ?>: </td> <td> - <input type="text" name="name" value="<?= $_REQUEST['name']; ?>" size="30"> + <input type="text" name="name" value="<?= $_REQUEST['name']; ?>" size="30" /> </td> </tr> <tr> <td><?php print _("Start IP Address"); ?>:</td> <td> - <input type="text" name="start" value="<?= $_REQUEST['start']; ?>" size="20" maxlength="15"> + <input type="text" name="start" value="<?= $_REQUEST['start']; ?>" size="20" maxlength="15" /> </td> </tr> <tr> <td><?php print _("End IP Address"); ?>:</td> <td> - <input type="text" name="end" value="<?= $_REQUEST['end']; ?>" size="20" maxlength="15"> + <input type="text" name="end" value="<?= $_REQUEST['end']; ?>" size="20" maxlength="15" /> </td> </tr> <tr> <td><?php print _("Level"); ?>:</td> <td> <select name="level"> - <option value="5" SELECTED>Demo</option> + <option selected="selected" value="5" >Demo</option> <option value="25">Stream</option> <option value="50">Stream/Download</option> <option value="75">XML-RPC</option> @@ -68,8 +68,8 @@ <tr> <td> </td> <td> - <input type="hidden" name="action" value="add_host"> - <input type="submit" value="<?php print _("Add Host"); ?>"> + <input type="hidden" name="action" value="add_host" /> + <input type="submit" value="<?php print _("Add Host"); ?>" /> </td> </tr> </table> diff --git a/templates/show_admin_index.inc b/templates/show_admin_index.inc index edf39b5b..e5fa6a9c 100644 --- a/templates/show_admin_index.inc +++ b/templates/show_admin_index.inc @@ -25,11 +25,11 @@ */ ?> <p><font size="+1"><?php print _("Admin Section"); ?>:</font></p> -<dl> +<ul> <li><a href="<?php echo conf('web_path'); ?>/admin/users.php"><?php print _("Users"); ?></a> - <?php print _("Create/Modify User Accounts for Ampache"); ?></li> <li><a href="<?php echo conf('web_path'); ?>/admin/mail.php"><?php print _("Mail"); ?></a> - <?php print _("Mail your users to notfiy them of changes"); ?></li> <li><a href="<?php echo conf('web_path'); ?>/admin/catalog.php"><?php print _("Catalog"); ?></a> - <?php print _("Create/Update/Clean your catalog here"); ?></li> <li><a href="<?php echo conf('web_path'); ?>/admin/preferences.php"><?php print _("Admin Preferences"); ?></a> - <?php print _("Modify Site-wide preferences"); ?></li> <li><a href="<?php echo conf('web_path'); ?>/admin/access.php"><?php print _("Access Lists"); ?></a> - <?php print _("Modify Access List Permissions"); ?> (<?php print _("Must have access_control=true in ampache.cfg") ?>)</li> -</dl> +</ul> diff --git a/templates/show_album.inc b/templates/show_album.inc index e5934c05..425aacff 100644 --- a/templates/show_album.inc +++ b/templates/show_album.inc @@ -34,8 +34,8 @@ $user = new User($_SESSION['userdata']['username']); <table class="border" cellspacing="1" cellpadding="3" border="0"> <tr class="table-header"> <td colspan="2"> - <font size="+1"><?php echo $album->name; ; ?> -- - <?php echo $album->f_artist; ; ?></font> + <font size="+1"><?php echo htmlspecialchars($album->name); ?> -- + <?php echo $album->f_artist; ?></font> </td> </tr> <tr class="even"> @@ -43,22 +43,22 @@ $user = new User($_SESSION['userdata']['username']); <?php if ($album_name != "Unknown (Orphaned)") { echo "<a target=\"_blank\" href=\"" . conf('web_path') . "/albumart.php?id=" . $album->id . "\">"; - echo "<img border=\"0\" src=\"" . conf('web_path') . "/albumart.php?id=" . $album->id . "\" alt=\"Album Art\" height=\"128\">"; + echo "<img border=\"0\" src=\"" . conf('web_path') . "/albumart.php?id=" . $album->id . "\" alt=\"Album Art\" height=\"128\" />"; echo "</a>\n"; } ?> </td> <td valign="top"> <b>Actions:</b><br /> - <a href="<?php echo conf('web_path'); ; ?>/song.php?action=m3u&album=<?php echo $album->id; ; ?>"><?php echo _("Play Album"); ; ?></a><br /> - <a href="<?php echo conf('web_path'); ; ?>/song.php?action=m3u&album_random=<?php echo $album->id; ; ?>"><?php echo _("Play Random from Album"); ; ?></a><br /> - <a href="<?php echo conf('web_path'); ; ?>/albums.php?action=clear_art&album_id=<?php echo $album->id; ; ?>"><?php echo _("Reset Album Art"); ; ?></a><br /> - <a href="<?php echo conf('web_path'); ; ?>/albums.php?action=find_art&album_id=<?php echo $album->id; ; ?>"><?php echo _("Find Album Art"); ; ?></a><br /> + <a href="<?php echo conf('web_path'); ; ?>/song.php?action=m3u&album=<?php echo $album->id; ; ?>"><?php echo _("Play Album"); ; ?></a><br /> + <a href="<?php echo conf('web_path'); ; ?>/song.php?action=m3u&album_random=<?php echo $album->id; ; ?>"><?php echo _("Play Random from Album"); ; ?></a><br /> + <a href="<?php echo conf('web_path'); ; ?>/albums.php?action=clear_art&album_id=<?php echo $album->id; ; ?>"><?php echo _("Reset Album Art"); ; ?></a><br /> + <a href="<?php echo conf('web_path'); ; ?>/albums.php?action=find_art&album_id=<?php echo $album->id; ; ?>"><?php echo _("Find Album Art"); ; ?></a><br /> <?php if ($user->has_access('100') || !conf('use_auth')) { ?> - <a href="<?php echo conf('web_path'); ; ?>/albums.php?action=update_from_tags&album_id=<?php echo $album->id; ; ?>"><?php echo _("Update from tags"); ; ?></a><br /> + <a href="<?php echo conf('web_path'); ; ?>/albums.php?action=update_from_tags&album_id=<?php echo $album->id; ; ?>"><?php echo _("Update from tags"); ; ?></a><br /> <?php } ?> <?php if( batch_ok() ) { ?> - <a href="<?php echo conf('web_path'); ; ?>/batch.php?action=alb&id=<?php echo $album->id; ; ?>"><?php echo _("Download"); ?></a><br /> + <a href="<?php echo conf('web_path'); ; ?>/batch.php?action=alb&id=<?php echo $album->id; ; ?>"><?php echo _("Download"); ?></a><br /> <?php } ?> </td> diff --git a/templates/show_albums.inc b/templates/show_albums.inc index 24cc4497..9a259e3d 100644 --- a/templates/show_albums.inc +++ b/templates/show_albums.inc @@ -40,7 +40,7 @@ $total_items = $view->total_items; <td> <?php echo _("Artist"); ?> </td> <td> <?php echo _("Songs"); ?> </td> <td> - <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&keep_view=true&sort_type=album.year&sort_order=0"><?php echo _("Year"); ?></> + <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&keep_view=true&sort_type=album.year&sort_order=0"><?php echo _("Year"); ?></a> </td> <td> <?php echo _("Action"); ?> </td> @@ -54,11 +54,11 @@ foreach ($albums as $album) { <td><?php echo $album->f_artist; ?></td> <td><?php echo $album->songs; ?></td> <td><?php echo $album->year; ?></td> - <td nowrap> <?php echo _("Play"); ?> : - <a href="<?php echo conf('web_path'); ?>/song.php?action=m3u&album=<?php echo $album->id; ?>"><?php echo _("All"); ?></a> | - <a href="<?php echo conf('web_path'); ?>/song.php?action=m3u&album_random=<?php echo $album->id; ?>"><?php echo _("Random"); ?></a> + <td nowrap="nowrap"> <?php echo _("Play"); ?> : + <a href="<?php echo conf('web_path'); ?>/song.php?action=m3u&album=<?php echo $album->id; ?>"><?php echo _("All"); ?></a> | + <a href="<?php echo conf('web_path'); ?>/song.php?action=m3u&album_random=<?php echo $album->id; ?>"><?php echo _("Random"); ?></a> <?php if( batch_ok() ) { ?> - | <a href="<?php echo conf('web_path'); ?>/batch.php?action=alb&id=<?php echo $album->id; ?>"><?php echo _("Download"); ?></a> + | <a href="<?php echo conf('web_path'); ?>/batch.php?action=alb&id=<?php echo $album->id; ?>"><?php echo _("Download"); ?></a> <?php } ?> </td> </tr> @@ -69,7 +69,9 @@ foreach ($albums as $album) { </td> <td> <?php echo _("Artist"); ?> </td> <td> <?php echo _("Songs"); ?> </td> - <td> <?php echo _("Year"); ?> </td> + <td> + <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&keep_view=true&sort_type=album.year&sort_order=0"><?php echo _("Year"); ?></a> + </td> <td> <?php echo _("Action"); ?> </td> </tr> diff --git a/templates/show_artist.inc b/templates/show_artist.inc index aab2f48b..6d8570c8 100644 --- a/templates/show_artist.inc +++ b/templates/show_artist.inc @@ -30,11 +30,11 @@ $artist_id = $artist->id; <td> <span class="header1"><?php print _("Albums by") . " " . $artist->full_name; ?></span> <ul> - <li><a href="<?php print $web_path; ?>/artists.php?action=show_all_songs&artist=<?php print $artist_id; ?>"><?php print _("Show All Songs By") . " " . $artist->full_name; ?></a></li> - <li><a href="<?php print $web_path; ?>/song.php?action=m3u&artist=<?php print $artist_id; ?>"><?php print _("Play All Songs By") . " " . $artist->full_name; ?></a></li> - <li><a href="<?php print $web_path; ?>/song.php?action=m3u&artist_random=<?php print $artist_id; ?>"><?php print _("Play Random Songs By") . " " . $artist->full_name; ?></a></li> + <li><a href="<?php print $web_path; ?>/artists.php?action=show_all_songs&artist=<?php print $artist_id; ?>"><?php print _("Show All Songs By") . " " . $artist->full_name; ?></a></li> + <li><a href="<?php print $web_path; ?>/song.php?action=m3u&artist=<?php print $artist_id; ?>"><?php print _("Play All Songs By") . " " . $artist->full_name; ?></a></li> + <li><a href="<?php print $web_path; ?>/song.php?action=m3u&artist_random=<?php print $artist_id; ?>"><?php print _("Play Random Songs By") . " " . $artist->full_name; ?></a></li> <?php if ($user->has_access('100')) { ?> - <li><a href="<?php print $web_path; ?>/artists.php?action=update_from_tags&artist=<?php print $artist_id; ?>"><?php print _("Update from tags"); ?></a></li> + <li><a href="<?php print $web_path; ?>/artists.php?action=update_from_tags&artist=<?php print $artist_id; ?>"><?php print _("Update from tags"); ?></a></li> <?php } ?> </ul> </td> diff --git a/templates/show_artists.inc b/templates/show_artists.inc index 068f1655..5641c101 100644 --- a/templates/show_artists.inc +++ b/templates/show_artists.inc @@ -51,9 +51,9 @@ foreach ($artists as $artist) { <td><?php print $artist['name']; ?></td> <td><?php print $artist['songs']; ?></td> <td><?php print $artist['albums']; ?></td> - <td nowrap> <?php print _("Play"); ?> : - <a href="<?php print conf('web_path'); ?>/song.php?action=m3u&artist=<?php print $artist['id']; ?>"><?php print _("All"); ?></a> | - <a href="<?php print conf('web_path'); ?>/song.php?action=m3u&artist_random=<?php print $artist['id']; ?>"><?php print _("Random"); ?></a> + <td nowrap="nowrap"> <?php print _("Play"); ?> : + <a href="<?php print conf('web_path'); ?>/song.php?action=m3u&artist=<?php print $artist['id']; ?>"><?php print _("All"); ?></a> | + <a href="<?php print conf('web_path'); ?>/song.php?action=m3u&artist_random=<?php print $artist['id']; ?>"><?php print _("Random"); ?></a> </td> </tr> <?php } ?> diff --git a/templates/show_box.inc b/templates/show_box.inc index c3c1dfa3..ea071e93 100644 --- a/templates/show_box.inc +++ b/templates/show_box.inc @@ -27,8 +27,8 @@ ?> -<table class="border" cellspacing=1 cellpadding=3> - <tr align=center> +<table class="border" cellspacing="1" cellpadding="3"> + <tr align="center"> <td background="<?= conf('web_path'); ?>/images/ampache-light-bg.gif" bgcolor="#c0c0c0"><?= $title ?></td> </tr> <tr> diff --git a/templates/show_import_playlist.inc.php b/templates/show_import_playlist.inc.php index b8ea3a94..3ea6c8fb 100644 --- a/templates/show_import_playlist.inc.php +++ b/templates/show_import_playlist.inc.php @@ -29,7 +29,7 @@ <?php echo _("Filename"); ?>: <?php $GLOBALS['error']->print_error('filename'); ?> </td> - <td><input type="textbox" name="filename" value="<?php echo $_REQUEST['filename']; ?>" size="45" /></td> + <td><input type="text" name="filename" value="<?php echo $_REQUEST['filename']; ?>" size="45" /></td> </tr> <tr class="<?php echo flip_class(); ?>"> <td> @@ -37,7 +37,7 @@ </td> <td> <select name="playlist_type"> - <option name="m3u">M3U</option> + <option value="m3u">M3U</option> <!-- <option name="pls">PLS</option> --> </select> </td> diff --git a/templates/show_mpdplay.inc b/templates/show_mpdplay.inc index a6e90b1f..aa390067 100644 --- a/templates/show_mpdplay.inc +++ b/templates/show_mpdplay.inc @@ -32,7 +32,7 @@ $web_path = conf('web_path'); <tr class="table-header"> <td colspan="2"><?php echo _("MPD Play Control"); ?></td> </tr> -<tr class="even"><td> +<tr class="even"> <td> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td> @@ -81,8 +81,8 @@ $web_path = conf('web_path'); </td> </tr> </table> -</tr> - </td> +</td> + </tr> <?php if ( $myMpd->state == MPD_STATE_PLAYING or $myMpd->state == MPD_STATE_PAUSED ) { ?> <tr><td> <table border="0" cellpadding="0" cellspacing="0" width="100%"> @@ -100,14 +100,14 @@ $web_path = conf('web_path'); <td> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> - <td align="center">[ <a title="<?php echo _("Refresh the Playlist Window"); ?>" href="<?php echo conf('web_path'); ?>"><?php echo _("refresh now"); ?></a> ]</td> + <td align="center">[ <a title="<?php echo _("Refresh the Playlist Window"); ?>" href="<?php echo conf('web_path'); if ($GLOBALS['user']->prefs['play_type'] == 'mpd' && conf('localplay_menu')) {echo "/mpd.php";} ?>"><?php echo _("refresh now"); ?></a> ]</td> </tr> </table> </td> </tr> </table> <br /> -<table border="0" cellpadding="0" cellspacing="0" WIDTH=<?php echo $PG_WIDTH ?>> +<table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td align="center"><b><?php echo _("Server Playlist"); ?></b></td></tr> <tr><td> <?php @@ -130,8 +130,8 @@ $web_path = conf('web_path'); $song_name = truncate_with_ellipse($entry['Artist'],conf('ellipse_threshold_artist')-3) . " - " . truncate_with_ellipse($entry['Title'],conf('ellipse_threshold_title')-3); echo "\t"; - echo "<a title=\"Click to remove'".$entry['Title']." '\" href=\"".conf('web_path')."/amp-mpd.php?action=rem&id=".$id."\">[" . $track . "]</a>"; - echo " <a title=\"Click to jump to '".$entry['Title']."'\" href='".conf('web_path')."/amp-mpd.php?action=skipto&val=".$id."'>$song_name</a>"; + echo " <a title=\"Click to remove ".htmlspecialchars($entry['Title'])."\" href=\"".conf('web_path')."/amp-mpd.php?action=rem&id=".$id."\">[" . $track . "]</a>"; + echo " <a title=\"Click to jump to ".htmlspecialchars($entry['Title'])."\" href=\"".conf('web_path')."/amp-mpd.php?action=skipto&val=".$id."\">$song_name</a>"; echo "<br />\n"; } } @@ -141,8 +141,8 @@ $web_path = conf('web_path'); ?> </td></tr> <?php if ( $myMpd->playlist_count > 0 ) { ?> -<tr height="20"> - <td align="center"> +<tr> + <td align="center" height="20"> [<a title="<?php echo _("Click to shuffle (randomize) the playlist"); ?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=shuffle"><?php echo _("shuffle"); ?></a>] [<a title="<?php echo _("Click the clear the playlist"); ?>" href="<?php echo conf('web_path'); ?>/amp-mpd.php?action=clear"><?php echo _("clear"); ?></a>] </td> diff --git a/templates/show_now_playing.inc b/templates/show_now_playing.inc index 875b1771..c4c39be2 100644 --- a/templates/show_now_playing.inc +++ b/templates/show_now_playing.inc @@ -43,13 +43,13 @@ if (conf('use_auth')) { echo "\t<td valign=\"center\">$np_user->fullname</td>\n"; } - echo "\t<td><a title=\"$song->title\" href=\"$web_path/song.php?action=m3u&song=$song->id\">$text</a></td>\n"; - echo "\t<td><a title=\"$song->f_artist\" href=\"$web_path/artists.php?action=show&artist=$song->artist\">$song->f_artist</a> / "; - echo "\t<a title=\"$album\" href=\"$web_path/albums.php?action=show&album=$song->album\">$song->f_album</a></td>"; + echo "\t<td><a title=\"" . htmlspecialchars($song->title) . "\" href=\"$web_path/song.php?action=m3u&song=$song->id\">$text</a></td>\n"; + echo "\t<td><a title=\"" . htmlspecialchars($song->f_artist) . "\" href=\"$web_path/artists.php?action=show&artist=$song->artist\">$song->f_artist</a> / "; + echo "\t<a title=\"" . htmlspecialchars($album) . "\" href=\"$web_path/albums.php?action=show&album=$song->album\">$song->f_album</a></td>"; if (conf('play_album_art')) { echo "\t<td align=\"center\">"; echo "<a target=\"_blank\" href=\"" . conf('web_path') . "/albumart.php?id=" . $song->album . "\">"; - echo "<img align=\"center\" border=\"0\" src=\"" . conf('web_path') . "/albumart.php?id=" . $song->album . "&fast=1\" alt=\"Album Art\" height=\"75\">"; + echo "<img align=\"middle\" border=\"0\" src=\"" . conf('web_path') . "/albumart.php?id=" . $song->album . "&fast=1\" alt=\"Album Art\" height=\"75\" />"; echo "</a>\n"; echo "\t</td>\n"; echo "</tr>\n"; @@ -60,6 +60,5 @@ } // if it's a song } // while we're getting songs ?> - </tr> </table> <? } ?> diff --git a/templates/show_play_selected.inc.php b/templates/show_play_selected.inc.php index 7c3107fb..38d4c62d 100644 --- a/templates/show_play_selected.inc.php +++ b/templates/show_play_selected.inc.php @@ -20,7 +20,7 @@ */ ?> -<script language=javascript> +<script type="text/javascript" language="javascript"> <!-- function ToPlaylist(action) { diff --git a/templates/show_preferences.inc b/templates/show_preferences.inc index 35982178..b4a83176 100644 --- a/templates/show_preferences.inc +++ b/templates/show_preferences.inc @@ -30,7 +30,7 @@ <div class="header1"> <?php echo _("Editing"); ?> <?php echo $fullname; ?> <?php echo _("preferences"); ?> <?php if ($user->has_access(100)) { ?> - [<a href="<?php echo conf('web_path'); ?>/admin/preferences.php?action=fix_preferences&user_id=<?php echo $user_id; ?>"><?php echo _("Rebuild Preferences"); ?></a>] + [<a href="<?php echo conf('web_path'); ?>/admin/preferences.php?action=fix_preferences&user_id=<?php echo $user_id; ?>"><?php echo _("Rebuild Preferences"); ?></a>] <? } ?> </div> <form method="post" name="preferences" action="<?php echo conf('web_path'); ?><?php echo $target; ?>" enctype="multipart/form-data"> @@ -64,9 +64,9 @@ <tr> <td><?php create_preference_input($pref->name,$pref->value); ?></td> <?php if(preg_match('/Color/',$pref->description)) { ?> - <td><table width="40" height="20" border=3 bgcolor="<?php echo $pref->value;?>"><tr><td></td></tr></table></td> + <td><table width="40" height="20" border="3" bgcolor="<?php echo $pref->value;?>"><tr><td></td></tr></table></td> <?php } else { ?> - <td><table></table></td> + <td></td> <?php } ?> </tr> </table> diff --git a/templates/show_search.inc b/templates/show_search.inc index 78433854..0e4d3532 100644 --- a/templates/show_search.inc +++ b/templates/show_search.inc @@ -40,7 +40,7 @@ <tr class="<?php echo flip_class(); ?>"> <td><?php echo _("Object Type"); ?>:</td> <td> - <?php + <?php $search_type = $_REQUEST['search_field']; if (isset($_REQUEST['search_field'])) { $search_field = $_REQUEST['search_field']; @@ -59,22 +59,22 @@ } ?> <select name="search_field"> - <option value="artist" <?php if ($artist) { echo "SELECTED"; } ?>>Artist</option> - <option value="album" <?php if ($album) { echo "SELECTED"; } ?>>Album</option> - <option value="song_title" <?php if ($song_title) { echo "SELECTED"; } ?>>Song Title</option> - <option value="song_genre" <?php if ($song_genre) { echo "SELECTED"; } ?>>Song Genre</option> - <option value="song_year" <?php if ($song_year) { echo "SELECTED"; } ?>>Song Year</option> - <option value="song_bitrate" <?php if ($song_bitrate) { echo "SELECTED"; } ?>>Song Bitrate</option> - <option value="song_min_bitrate" <?php if ($song_min_bitrate) { echo "SELECTED"; } ?>>Minimum Bitrate</option> - <option value="song_filename" <?php if ($song_filename) { echo "SELECTED"; } ?>>Song Filename</option> + <option <?php if ($artist) { echo "selected=\"selected\""; } ?> value="artist" > Artist</option> + <option <?php if ($album) { echo "selected=\"selected\""; } ?> value="album" > Album</option> + <option <?php if ($song_title) { echo "selected=\"selected\""; } ?> value="song_title" > Song Title</option> + <option <?php if ($song_genre) { echo "selected=\"selected\""; } ?> value="song_genre" > Song Genre</option> + <option <?php if ($song_year) { echo "selected=\"selected\""; } ?> value="song_year" > Song Year</option> + <option <?php if ($song_bitrate) { echo "selected=\"selected\""; } ?> value="song_bitrate" > Song Bitrate</option> + <option <?php if ($song_min_bitrate) { echo "selected=\"selected\""; } ?> value="song_min_bitrate" > Minimum Bitrate</option> + <option <?php if ($song_filename) { echo "selected=\"selected\""; } ?> value="song_filename" > Song Filename</option> </select> </td> </tr> <tr class="<?php echo flip_class(); ?>"> <td><?php echo _("Search Type"); ?>:</td> <td> - <input type="radio" name="search_type" value="exact" <?php if ($_REQUEST['search_type'] === 'exact') { echo "CHECKED"; } ?>>Exact<br /> - <input type="radio" name="search_type" value="fuzzy" <?php if ($_REQUEST['search_type'] !== 'exact') { echo "CHECKED"; } ?>>Fuzzy<br /> + <input type="radio" name="search_type" value="exact" <?php if ($_REQUEST['search_type'] === 'exact') { echo "checked=\"checked\"";}?> /> Exact<br /> + <input type="radio" name="search_type" value="fuzzy" <?php if ($_REQUEST['search_type'] !== 'exact') { echo "checked=\"checked\"";}?> /> Fuzzy<br /> </td> </tr> <tr class="<?php echo flip_class(); ?>"> diff --git a/templates/show_songs.inc b/templates/show_songs.inc index 13819f3e..447956e8 100644 --- a/templates/show_songs.inc +++ b/templates/show_songs.inc @@ -23,7 +23,7 @@ $web_path = conf('web_path'); ?> -<form name="songs" method="post" enctype="multipart/form-data"> +<form name="songs" method="post" enctype="multipart/form-data" action=""> <table border="0"> <tr><td colspan="2"> <table class="border" cellspacing="0" cellpadding="0" border="0"> @@ -33,7 +33,7 @@ $web_path = conf('web_path'); <th><?php echo _("Song title"); ?></th> <th><?php echo _("Artist"); ?></th> <th><?php echo _("Album"); ?></th> - <th><?php echo _("Track"); ?></td> + <th><?php echo _("Track"); ?></th> <th><?php echo _("Time"); ?></th> <th><?php echo _("Size"); ?></th> <th><?php echo _("Bitrate"); ?></th> @@ -69,13 +69,13 @@ $web_path = conf('web_path'); } ?> <td> - <a href="<?php echo $web_path; ?>/song.php?action=m3u&song=<?php echo $song->id; ?>" title="<?php echo $song->title; ?>" <?php echo $text_class; ?>> <?php echo $song->f_title; ?> </a> + <a href="<?php echo $web_path; ?>/song.php?action=m3u&song=<?php echo $song->id; ?>" title="<?php echo htmlspecialchars($song->title); ?>" <?php echo $text_class; ?>> <?php echo htmlspecialchars($song->f_title); ?> </a> </td> <td> - <a href="<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo $song->artist; ?>" title="<?php echo $song->f_artist_full; ?>" <?php echo $text_class; ?>> <?php echo $song->f_artist; ?> </a> + <a href="<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo htmlspecialchars($song->artist); ?>" title="<?php echo htmlspecialchars($song->f_artist_full); ?>" <?php echo $text_class; ?>> <?php echo htmlspecialchars($song->f_artist); ?> </a> </td> <td> - <a href="<?php echo $web_path; ?>/albums.php?album=<?php echo $song->album; ?>" title="<?php echo $song->f_album_full; ?>" <?php echo $text_class; ?>> <?php echo $song->f_album; ?> </a> + <a href="<?php echo $web_path; ?>/albums.php?album=<?php echo htmlspecialchars($song->album); ?>" title="<?php echo htmlspecialchars($song->f_album_full); ?>" <?php echo $text_class; ?>> <?php echo htmlspecialchars($song->f_album); ?> </a> </td> <td align="right"> <?php echo $song->track; ?> @@ -83,7 +83,7 @@ $web_path = conf('web_path'); <td align="right"> <?php echo $song->f_time; ?> </td> - <td align="right" nowrap> + <td align="right" nowrap="nowrap"> <?php echo $song->f_size; ?> MB </td> <td align="right"> @@ -99,9 +99,9 @@ $web_path = conf('web_path'); <?php if ($user->has_access('100')) { ?> <a href="<?php echo $web_path; ?>/admin/song.php?action=edit&song=<?php echo $song->id; ?>">Edit</a> | <a href="<?php echo $web_path; ?>/flag.php?song=<?php echo $song->id; ?>&action=flag">Flag</a> | <?php if ($song->status === 'enabled') { ?> - <a href="<?php echo $web_path; ?>/admin/song.php?action=disable&song_ids=<?php echo $song->id; ?>">Disable</a> + <a href="<?php echo $web_path; ?>/admin/song.php?action=disable&song_ids=<?php echo $song->id; ?>">Disable</a> <?php } else { ?> - <a href="<?php echo $web_path; ?>/admin/song.php?action=enabled&song_ids=<?php echo $song->id; ?>">Enable</a> + <a href="<?php echo $web_path; ?>/admin/song.php?action=enabled&song_ids=<?php echo $song->id; ?>">Enable</a> <?php } //status ?> <?php } else { ?> <a href="<?php echo $web_path; ?>/flag.php?song=<?php echo $song->id; ?>&action=flag">Flag</a> @@ -110,10 +110,8 @@ $web_path = conf('web_path'); | <a href="<?php echo $web_path; ?>/download/index.php?action=download&song_id=<?php echo $song->id; ?>&fn=<?php echo rawurlencode($song->f_artist_full . " - " . $song->title . "." . $song->type); ?>"><?php echo _("Download"); ?></a> <?php } ?> <?php if ($user->prefs['direct_link']) { ?> - | <a href="<?php echo $web_path; ?>/play/index.php?song=<?php echo $song->id; ?>&uid=<?php echo $user->id . "&sid=" . session_id(); ?>&fn=<?php echo rawurlencode($song->f_artist_full . " - " . $song->title . "." . $song->type); ?>"> - <?php echo _("Direct Link"); ?> + | <a href="<?php echo $web_path; ?>/play/index.php?song=<?php echo $song->id; ?>&uid=<?php echo $user->id . "&sid=" . session_id(); ?>&fn=<?php echo rawurlencode($song->f_artist_full . " - " . $song->title . "." . $song->type); ?>"><?php echo _("Direct Link"); ?></a> <?php } ?> - </a> </td> </tr> <? @@ -131,11 +129,11 @@ $web_path = conf('web_path'); <td></td> <?php if (isset($playlist_id) && $playlist_id != 0 && ($user->id == $pluser->id || $user->access === 'admin')) { ?> <td></td> <?php } ?> <td><?php echo _("Total"); ?>:</td> - <td nowrap><?php echo $num; ?> song(s)</td> + <td nowrap="nowrap"><?php echo $num; ?> song(s)</td> <td></td> <td></td> - <td align="right" nowrap><?php echo $time; ?></td> - <td align="right" nowrap><?php echo $megs; ?> MB</td> + <td align="right" nowrap="nowrap"><?php echo $time; ?></td> + <td align="right" nowrap="nowrap"><?php echo $megs; ?> MB</td> <td></td> <td></td> <td></td> diff --git a/templates/show_users.inc b/templates/show_users.inc index 3822947d..3108b079 100644 --- a/templates/show_users.inc +++ b/templates/show_users.inc @@ -39,7 +39,7 @@ $admin_menu = "admin/"; <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&keep_view=true&sort_type=username&sort_order=0"> <b><?php echo _("Username"); ?></b> </a> - <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&keep_view=true&sort_type=fullname&sort_order=0" + <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&keep_view=true&sort_type=fullname&sort_order=0"> <b>(<?php echo _("Fullname"); ?>)</b> </a> </td> @@ -123,8 +123,7 @@ while ( $results = mysql_fetch_object($db_result) ) { else { echo "<td bgcolor=\"red\"> </td>"; } -} // end while ?> - </td> </tr> +<?php } ?> </table> diff --git a/templates/song_edit.inc b/templates/song_edit.inc index c4eab4a7..f3becdea 100644 --- a/templates/song_edit.inc +++ b/templates/song_edit.inc @@ -24,61 +24,63 @@ $filename = htmlspecialchars($short[1]); $target = conf('web_path').'/admin/flags.php'; ?> -<form name="update_song" method="post" action="<?= $target; ?>"> +<form name="update_song" method="post" action="<?php echo $target; ?>"> + <table class="tabledata" cellspacing="0" cellpadding="0" border="0"> <tr> <td>File:</td> - <td colspan="2"><?= $filename; ?></td> + <td colspan="2"><?php echo $filename; ?></td> </tr> + <tr> <td>Title:</td> - <td><input type="text" name="title" size="60" value="<?= $song->title; ?>"></td> + <td> <input type="text" name="title" size="60" value="<?php echo $song->title; ?>"></input></td> </tr> + <tr> <td>Artist:</td> - <td> -<?php show_artist_pulldown($song->artist); ?> - </td> - <td>or <input type="text" name="new_artist" size="30" value=""></td> + <td> <?php show_artist_pulldown($song->artist); ?> </td> + <td>or <input type="text" name="new_artist" size="30" value=""></input></td> </tr> <tr> <td>Album:</td> - <td> -<?php show_album_pulldown($song->album); ?> - </td> - <td>or <input type="text" name="new_album" size="30" value=""></td> + <td> <?php show_album_pulldown($song->album); ?> </td> + <td>or <input type="text" name="new_album" size="30" value=""></input></td> </tr> + <tr> <td>Track:</td> - <td><input type="text" size="4" maxlength="4" name="track" value="<?=$song->track?>"></input></td> + <td> <input type="text" size="4" maxlength="4" name="track" value="<?php echo $song->track;?>"></input> </td> </tr> + <tr> <td>Genre:</td> - <td> -<?php show_genre_pulldown($song->genre, 1); ?> + <td> <?php show_genre_pulldown($song->genre, 1); ?> </td> + </tr> + <tr> - <td>Year</td> - <td><input type="text" size="4" maxlength="4" name="year" value="<?=$song->year?>"></input></td> + <td> <input type="text" size="4" maxlength="4" name="year" value="<?php echo $song->year;?>"></input> </td> </tr> <tr> <td> </td> - <td><input type="checkbox" name="update_id3" value="yes" checked="checked"> Update id3 tags</input></td> + <td> <input type="checkbox" name="update_id3" value="yes" checked="checked"> Update id3 tags</input> </td> <td> </td> </tr> + <tr> <td> </td> - <td> <input type=hidden name="song" value="<?=$song->id?>"> - <input type=hidden name="flag" value="<?=$flagid?>"> - <input type=hidden name="current_artist_id" value="<?=$song->artist?>"> + <td> <input type="hidden" name="song" value="<?php echo $song->id;?>"></input> + <input type="hidden" name="flag" value="<?php echo $flagid;?>"></input> + <input type="hidden" name="current_artist_id" value="<?php echo $song->artist;?>"></input> <?php if(count($_SESSION['edit_queue'])){ ?> - <input type=submit name="action" value="Next"></input> - <input type=submit name="action" value="Skip"></input> + <input type="submit" name="action" value="Next"></input> + <input type="submit" name="action" value="Skip"></input> <input type="submit" name="action" value="Clear Edit List"></input></td> <?php } else { ?> - <input type=submit name="action" value="Done"> </td> + <input type="submit" name="action" value="Done"></input></td> <?php } ?> </tr> </table> diff --git a/templates/tool_box.inc b/templates/tool_box.inc index a81e6b15..36df59c4 100644 --- a/templates/tool_box.inc +++ b/templates/tool_box.inc @@ -27,8 +27,8 @@ ?> -<table class="border" cellspacing=1 cellpadding=3> - <tr class="table-header" align=center> +<table class="border" cellspacing="1" cellpadding="3"> + <tr class="table-header" align="center"> <td><?php echo $title; ?></td> </tr> <tr> |