summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/add_catalog.inc109
-rw-r--r--templates/admin_menu.inc54
-rw-r--r--templates/catalog.inc110
-rw-r--r--templates/customize_catalog.inc74
-rw-r--r--templates/flag.inc149
-rw-r--r--templates/header.inc130
-rw-r--r--templates/javascript_refresh.inc41
-rw-r--r--templates/list_duplicates.inc87
-rw-r--r--templates/list_flagged.inc92
-rw-r--r--templates/list_header.inc99
-rw-r--r--templates/menu.inc85
-rw-r--r--templates/show_access_list.inc72
-rw-r--r--templates/show_add_access.inc76
-rw-r--r--templates/show_admin_index.inc35
-rw-r--r--templates/show_album.inc67
-rw-r--r--templates/show_albums.inc82
-rw-r--r--templates/show_artist.inc96
-rw-r--r--templates/show_artists.inc76
-rw-r--r--templates/show_box.inc43
-rw-r--r--templates/show_confirm_action.inc.php32
-rw-r--r--templates/show_confirmation.inc.php33
-rw-r--r--templates/show_disabled_songs.inc67
-rw-r--r--templates/show_import_playlist.inc.php53
-rw-r--r--templates/show_install.inc82
-rw-r--r--templates/show_install_account.inc.php76
-rw-r--r--templates/show_install_config.inc136
-rw-r--r--templates/show_localplay.inc68
-rw-r--r--templates/show_login_form.inc83
-rw-r--r--templates/show_mpd.inc97
-rw-r--r--templates/show_mpdplay.inc152
-rw-r--r--templates/show_now_playing.inc65
-rw-r--r--templates/show_play_selected.inc.php65
-rw-r--r--templates/show_preferences.inc92
-rw-r--r--templates/show_search.inc89
-rw-r--r--templates/show_songs.inc150
-rw-r--r--templates/show_test.inc271
-rw-r--r--templates/show_upload.inc83
-rw-r--r--templates/show_user.inc.php93
-rw-r--r--templates/show_user_registration.inc.php73
-rw-r--r--templates/show_users.inc130
-rw-r--r--templates/song_edit.inc86
-rw-r--r--templates/style.inc256
-rw-r--r--templates/tool_box.inc43
-rw-r--r--templates/userform.inc108
44 files changed, 4060 insertions, 0 deletions
diff --git a/templates/add_catalog.inc b/templates/add_catalog.inc
new file mode 100644
index 00000000..57ee6a9e
--- /dev/null
+++ b/templates/add_catalog.inc
@@ -0,0 +1,109 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+$default_id3 = "/usr/bin/id3v2 -a &quot;%a&quot; -A &quot;%A&quot; -t &quot;%t&quot; -g %g -y %y -T %T -c &quot;%c&quot; %filename";
+$default_rename = "%a - %T - %t";
+$default_sort = "%a/%A";
+
+?>
+
+<p class="header2"><?php echo _("Add a Catalog"); ?></p>
+
+<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>
+
+<div class="text-box">
+<form name="update_catalog" method="post" action="<?php echo conf('web_path'); ?>/admin/catalog.php" enctype="multipart/form-data">
+<table class="tabledata" cellpadding="0" border="0" cellspacing="0">
+<tr>
+ <td><?php echo _("Catalog Name"); ?>: </td>
+ <td><input size="60" type="text" name="name" value="<?php echo $_REQUEST['name']; ?>" size="30" /></td>
+ <td style="vertical-align:top; font-family: monospace;" rowspan="6">
+ <strong><?php echo _("Auto-inserted Fields"); ?>:</strong><br />
+ %A = <?php echo _("album name"); ?><br />
+ %a = <?php echo _("artist name"); ?><br />
+ %c = <?php echo _("id3 comment"); ?><br />
+ %g = <?php echo _("genre"); ?><br />
+ %T = <?php echo _("track number (padded with leading 0)"); ?><br />
+ %t = <?php echo _("song title"); ?><br />
+ %y = <?php echo _("year"); ?><br />
+ %o = <?php echo _("other"); ?><br />
+
+ </td>
+
+</tr>
+<tr>
+ <td><?php echo _("Path"); ?>: </td>
+ <td><input size="60" type="text" name="path" value="<?php echo $_REQUEST['path']; ?>" size="30" /></td>
+</tr>
+<tr>
+ <td><?php echo _("Catalog Type"); ?>: </td>
+ <td>
+ <select name="type">
+ <option value="local"><?php echo _("Local"); ?></option>
+ <option value="remote"><?php echo _("Remote"); ?></option>
+ </select>
+ </td>
+</tr>
+<tr>
+ <td><?php echo _("ID3 Set Command"); ?>: </td>
+ <td><input size="60" type="text" name="id3set_command" value="<?php echo $default_id3; ?>" size="30" /></td>
+</tr>
+<tr>
+ <td><?php echo _("Filename Pattern"); ?>: </td>
+ <td><input size="60" type="text" name="rename_pattern" value="<?php echo $default_rename; ?>" size="30" /></td>
+</tr>
+<tr>
+ <td><?php echo _("Folder Pattern"); ?>:<br /><?php echo _("(no leading or ending '/')"); ?></td>
+ <td valign="top"><input size="60" type="text" name="sort_pattern" value="<?php echo $default_sort; ?>" size="30" /></td>
+</tr>
+<tr>
+ <td valign="top"><?php echo _("Gather Album Art"); ?>:</td>
+ <td><input type="checkbox" onclick="flipField('artextra1');flipField('artextra2');flipField('artextra3');" name="gather_art" value="1" /><br />
+ <table border="0" width="100%" cellpadding="0" cellspacing="0">
+ <tr class="even">
+ <td><?php echo _("ID3V2 Tags"); ?>:</td>
+ <td><input id="artextra1" disabled="disabled" type="checkbox" name="art_id3v2" value="1" /></td></tr>
+ <tr class="even">
+ <td><?php echo _("Amazon"); ?>:</td>
+ <td><input id="artextra2" disabled="disabled" type="checkbox" name="art_amazon" value="1" /></td></tr>
+ <tr class="even">
+ <td><?php echo _("File Folder"); ?>:</td>
+ <td><input id="artextra3" disabled="disabled" type="checkbox" name="art_folder" value="1" /></td></tr>
+ </table>
+ <br />
+ </td>
+</tr>
+<tr>
+ <td valign="top"><?php echo _("Build Playlists from m3u Files"); ?>:</td>
+ <td><input type="checkbox" name="parse_m3u" value="1" /></td>
+</tr>
+<tr>
+ <td>&nbsp;</td>
+ <td>
+ <input type="hidden" name="action" value="add_catalog" />
+ <input class="button" type="submit" value="<?php echo _("Add Catalog"); ?>" />&nbsp;&nbsp;
+ <input class="button" type="submit" name="action" value="Cancel" />
+ </td>
+</tr>
+</table>
+</form>
+</div>
+
diff --git a/templates/admin_menu.inc b/templates/admin_menu.inc
new file mode 100644
index 00000000..0d875e70
--- /dev/null
+++ b/templates/admin_menu.inc
@@ -0,0 +1,54 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*
+
+ @header
+ A template file
+
+*/
+
+$web_path = conf('web_path');
+
+$items = array(
+ _("Users") => "$web_path/admin/users.php",
+ _("Mail Users") => "$web_path/admin/mail.php",
+ _("Catalog") => "$web_path/admin/catalog.php",
+ _("Admin Preferences") => "$web_path/admin/preferences.php",
+ _("Access Lists") => "$web_path/admin/access.php"
+ );
+
+?>
+<ul id="adminmenu">
+
+ <?php
+ foreach ( array_keys($items) as $item ) {
+ if ( $admin_highlight == $item ) {
+ echo "<li class=\"active\"><a class=\"active\" href=\"$items[$item]\">$item</a></li>\n";
+ }
+ else {
+ echo "<li><a href=\"$items[$item]\">$item</a></li>\n";
+ }
+ }
+
+ ?>
+</ul>
diff --git a/templates/catalog.inc b/templates/catalog.inc
new file mode 100644
index 00000000..79030725
--- /dev/null
+++ b/templates/catalog.inc
@@ -0,0 +1,110 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+/*
+
+ @header
+ A template file
+
+*/
+
+?>
+
+<br />
+<?php if (!function_exists('iconv')) { ?>
+ <div class="fatalerror"><?php echo _("Error: ICONV not found, ID3V2 Tags will not import correctly. See <a href=\"http://php.oregonstate.edu/iconv\">Iconv</a> for information on getting ICONV"); ?></div>
+<?php } ?>
+<table cellpadding="5" border="0" cellspacing="0">
+<tr>
+ <td valign="top"><?php show_local_catalog_info(); ?></td>
+ <td valign="top">
+ <form name="catalog" method="post" action="<?php echo conf('web_path'); ?>/admin/catalog.php" enctype="multipart/form-data">
+ <table class="border" cellspacing="1" cellpadding="3">
+ <tr class="table-header" align="center">
+ <td colspan="4"><?php echo _("Update Catalogs"); ?></td>
+ </tr>
+ <?php
+ $catalogs = $catalog->get_catalogs();
+
+ if ( $catalogs ) {
+ foreach ($catalogs as $catalog) {
+ print("<tr class=\"even\"><td>".
+ "<input type=\"checkbox\" name=\"catalogs[]\" value=\"$catalog->id\"></input></td>".
+ "<td>".
+ "<a href=\"". conf('web_path') ."/admin/catalog.php?action=show_customize_catalog&amp;catalog_id=$catalog->id\">".
+ "$catalog->path".
+ "</a>".
+ "</td>".
+ "<td>".
+ date("H:i - m/d/y",$catalog->last_update).
+ "</td>".
+ "<td>".
+ "<a href=\"" . conf('web_path') . "/admin/catalog.php?action=show_delete_catalog&amp;catalog_id=$catalog->id\">" . _("Delete") . "</a>".
+ "</td></tr>\n");
+ } // end foreach
+ ?>
+ <tr>
+ <td class="even" colspan="4">
+ <input class="button" type="submit" name="action" value="<?php echo _("Add to Catalog(s)"); ; ?>" />&nbsp;&nbsp;
+ <input class="button" type="submit" name="action" value="<?php echo _("Add to all Catalogs"); ; ?>" /><br />
+ <?php echo _("Fast Add"); ; ?>:<input type="checkbox" name="update_type" value="fast_add" />
+ </td>
+ </tr>
+ <tr>
+ <td class="even" colspan="4">
+ <input class="button" type="submit" name="action" value="<?php echo _("Update Catalog(s)"); ; ?>" />&nbsp;&nbsp;&nbsp;
+ <input class="button" type="submit" name="action" value="<?php echo _("Update All Catalogs"); ; ?>" /><br />
+ <?php echo _("Fast Update"); ; ?>:<input type="checkbox" name="update_type" value="fast_update" /><br />
+ </td>
+ </tr>
+ <tr>
+ <td class="even" colspan="4">
+ <input class="button" type="submit" name="action" value="<?php echo _("Clean Catalog(s)"); ; ?>" />&nbsp;&nbsp;&nbsp;
+ <input class="button" type="submit" name="action" value="<?php echo _("Clean All Catalogs"); ; ?>" /><br />
+ </td>
+ </tr>
+ <?php
+ } // end if catalogs
+ else {
+ print("<tr class=\"even\"><td colspan=\"4\" >".
+ _("You don't have any catalogs.") .
+ "</td></tr>");
+ }
+ ?>
+ </table>
+ </form>
+ </td>
+ <td valign="top">
+ <?php
+ $tools = array(_("Add a catalog") => conf('web_path') . "/admin/catalog.php?action=show_add_catalog",
+ _("Access Lists") => conf('web_path') . "/admin/access.php",
+ _("Show Duplicate Songs") => conf('web_path') . "/admin/duplicates.php",
+ _("Show Disabled Songs") => conf('web_path') . "/admin/catalog.php?action=show_disabled",
+ _("Clear Catalog Stats") => conf('web_path') . "/admin/catalog.php?action=clear_stats",
+ _("Clear Now Playing") => conf('web_path') . "/admin/catalog.php?action=clear_now_playing",
+ _("Dump Album Art") => conf('web_path') . "/admin/catalog.php?action=dump_album_art",
+ _("Gather Album Art") => conf('web_path') . "/admin/catalog.php?action=gather_album_art",
+ _("View flagged songs") => conf('web_path') . "/admin/flags.php");
+ show_tool_box(_("Catalog Tools"), $tools);
+ ?>
+ </td>
+ </tr>
+</table>
diff --git a/templates/customize_catalog.inc b/templates/customize_catalog.inc
new file mode 100644
index 00000000..243e66ae
--- /dev/null
+++ b/templates/customize_catalog.inc
@@ -0,0 +1,74 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+?>
+<br />
+<div class="header2"><?php echo _("Settings for catalog in"); ?> <?php echo $catalog->path; ?></div><br />
+<div class="text-box">
+<form method="get" action="<?php echo conf('web_path'); ?>/admin/catalog.php" enctype="multipart/form-data">
+<table class="tabledata" cellspacing="0" cellpadding="0" border="0">
+<tr>
+ <td><?php echo _("Name"); ?>:</td>
+ <td><input size="60" type="text" name="name" value="<?= htmlspecialchars($catalog->name);?>"></input></td>
+ <td style="vertical-align:top; font-family: monospace;" rowspan="5">
+ <strong><?php echo _("Auto-inserted Fields"); ?>:</strong><br />
+ %A = <?php echo _("album name"); ?><br />
+ %a = <?php echo _("artist name"); ?><br />
+ %C = <?php echo _("catalog path"); ?><br />
+ %c = <?php echo _("id3 comment"); ?><br />
+ %g = <?php echo _("genre"); ?><br />
+ %T = <?php echo _("track number (padded with leading 0)"); ?><br />
+ %t = <?php echo _("song title"); ?><br />
+ %y = <?php echo _("year"); ?><br />
+ %o = <?php echo _("other"); ?><br />
+ </td>
+</tr>
+<tr>
+ <td><?php echo _("ID3 set command"); ?>:</td>
+ <td>
+ <input size="60" type="text" name="id3_set_command" value="<?php echo htmlspecialchars($catalog->id3_set_command); ?>" />
+ </td>
+</tr>
+<tr>
+ <td><?php echo _("Filename pattern"); ?>:</td>
+ <td>
+ <input size="60" type="text" name="rename_pattern" value="<?php echo htmlspecialchars($catalog->rename_pattern); ?>" />
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("Folder Pattern"); ?>:<br /><?php echo _("(no leading or ending '/')"); ?>
+ </td>
+ <td>
+ <input size="60" type="text" name="sort_pattern" value="<?php echo htmlspecialchars($catalog->sort_pattern);?>" />
+ </td>
+</tr>
+<tr>
+ <td>&nbsp;</td>
+ <td>
+ <input type="hidden" name="catalog_id" value="<?php echo $catalog->id; ?>">
+ <input type="hidden" name="action" value="update_catalog_settings" />
+ <input type="submit" value="<?php echo _("Save Catalog Settings"); ?>" />
+ </td>
+</tr>
+</table>
+</form>
+</div>
diff --git a/templates/flag.inc b/templates/flag.inc
new file mode 100644
index 00000000..2e9e50cf
--- /dev/null
+++ b/templates/flag.inc
@@ -0,0 +1,149 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header
+
+ A template file
+
+*/
+
+// let's put a couple of things in this file
+
+if ( $type == 'show_flagged_form' ) {
+ $song = new Song($song_id);
+ $song->format_song();
+ if(!preg_match('/\.mp3$/',$song->file))
+ {
+ echo "<p>Ampache can only edit MP3 file tags currently.<br/>";
+ echo "<a href=\"".$_SERVER['HTTP_REFERER']."\">Back</a>";
+ return;
+ }
+?>
+
+<p style="font-size: 10pt; font-weight: bold;"><?php echo _("Flag song"); ?></p>
+
+<p><?php echo _("Flag the following song as having one of the problems listed below. Site admins will then take the appropriate action for the flagged files."); ?></p>
+
+<?php if ( $flag_text ) { ?>
+<p style="color: red;"><?php echo $flag_text ; ?></p>
+<?php } ?>
+
+<form name="flag_song" method="post" action="<?php echo $_SERVER['PHP_SELF'];; ?>">
+<table class="tabledata" cellpadding="3" cellspacing="1">
+ <tr class="even">
+ <td>File:</td>
+ <td><?php echo $song->file ; ?></td>
+ </tr>
+ <tr class="even">
+ <td><?php echo _("Song"); ?>:</td>
+ <td><b><?php echo $song->f_title ; ?></b> by <?php echo $song->f_artist_full; ; ?></td>
+ </tr>
+ <tr class="even">
+ <td><?php echo _("Reason to flag"); ?>:</td>
+ <td><?php show_flagged_popup($reason); ?></td>
+ </tr>
+ <tr class="even">
+ <td><?php echo _("Comment"); ?>:</td>
+ <td><input name="comment" type="text" size="50" value="<?php echo $comment ; ?>"></input>
+ </td>
+ </tr>
+ <tr class="odd">
+ <td> &nbsp; </td>
+ <td>
+ <input type="submit" value="<?php echo _("Flag Song"); ?>" />
+ <input type="hidden" name="action" value="flag_song" />
+ </td>
+ </tr>
+</table>
+<input type="hidden" name="song" value="<?php echo $song->id ; ?>">
+</form>
+
+<?php
+
+}
+elseif ( $type == 'show_flagged_songs' ) {
+ $flags = get_flagged();
+?>
+
+<p style="font-size: 10pt; font-weight: bold;">View Flagged Songs</p>
+
+<p>This is the list of songs that have been flagged by your Ampache users. Use
+this list to determine what songs you need to re-rip or tags you need to update.</p>
+
+<?php if ( $flags ) { ?>
+<form name="flag_update" action="<?php echo $_SERVER['PHP_SELF'];; ?>" method="post">
+
+<table class="tabledata" cellspacing="0" cellpadding="0" border="1">
+ <tr class="table-header">
+ <td>&nbsp;</td>
+ <td>Song</td>
+ <td>Flag</td>
+ <td>New Flag:</td>
+ <td>Flagged by</td>
+ <td>ID3 Update:</td>
+ </tr>
+<?php
+ foreach ($flags as $flag) {
+ $song = new Song($flag->song);
+ $song->format_song();
+ $alt_title = $song->title;
+
+ $artist = $song->f_artist;
+ $alt_artist = $song->f_full_artist;
+
+ echo "<tr class=\"even\">".
+ "<td><input type=\"checkbox\" id=\"flag_".$flag->id."\" name=\"flag[]\" value=\"".$flag->id."\"></input></td>".
+ "<td><a href=\"".conf('web_path')."/song.php?song=$flag->song\" title=\"$alt_title\">$song->f_title</a> by ".
+ "<a href=\"".conf('web_path')."/artist.php?action=show&amp;artist=$song->artist_id\" title=\"$alt_artist\">$artist</a></td>".
+ "<td>$flag->type</td>";
+ echo "<td>";
+ $onchange = "onchange=\"document.getElementById('flag_".$flag->id."').checked='checked';\"";
+ show_flagged_popup($flag->type,'type',$flag->id."_newflag", $onchange);
+ echo "</td>";
+ echo "<td>".$flag->username."<br />".date('m/d/y',$flag->date)."</td>";
+/* echo "<td><a href=\"catalog.php?action=fixed&flag=$flag->id\">Fixed</a></td></tr>\n";*/
+ if($flag->type === 'newid3')
+ {
+ echo "<td>";
+ echo "<input type=\"radio\" name=\"accept_".$flag->id."\" value=\"accept\" />Accept";
+ echo "<input type=\"radio\" name=\"accept_".$flag->id."\" value=\"reject\" />Reject";
+ echo "</td>";
+ }
+ else echo "<td><a href=\"".conf('web_path')."/admin/song.php?action=edit&amp;song=".$flag->song."\">edit/view</a></td>";
+ echo "</tr>\n";
+
+ }
+?>
+<tr class="even"><td colspan="6"><input type="submit" name="action" value="Update Flags"></input></td></tr>
+</table>
+</form>
+<?php } else { ?>
+
+<p> You don't have any flagged songs. </p>
+
+<?php } ?>
+
+<?php
+
+}
+?>
diff --git a/templates/header.inc b/templates/header.inc
new file mode 100644
index 00000000..67041227
--- /dev/null
+++ b/templates/header.inc
@@ -0,0 +1,130 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+$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">
+<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>
+</head>
+<body>
+<script type="text/javascript" language="javascript">
+<!-- Begin
+function disableField(element) {
+ var element_id = document.getElementById(element);
+ element_id.disabled=true;
+ element_id.value='';
+ element_id.checked=false;
+}
+function enableField(element) {
+ var element_id = document.getElementById(element);
+ element_id.disabled=false;
+
+}
+function flipField(element) {
+ var element_id = document.getElementById(element);
+ if (element_id.disabled == false) {
+ element_id.disabled=true;
+ }
+ else {
+ element_id.disabled=false;
+ }
+}
+ var checkflag_song = "false";
+
+ function check_songs() {
+ if (checkflag_song == "false") {
+ if (document.forms.songs.elements["song[]"].length == undefined) {
+ document.forms.songs.elements["song[]"].checked = true;
+ }
+ else {
+ for (i = 0; i < document.forms.songs.elements["song[]"].length; i++) {
+ document.forms.songs.elements["song[]"][i].checked = true;
+ }
+ }
+ checkflag_song = "true";
+ return "Unselect All";
+ }
+ else {
+ if (document.forms.songs.elements["song[]"].length == undefined) {
+ document.forms.songs.elements["song[]"].checked = false;
+ }
+ else {
+ for (i = 0; i < document.forms.songs.elements["song[]"].length; i++) {
+ document.forms.songs.elements["song[]"][i].checked = false;
+ }
+ }
+ checkflag_song = "false";
+ return "Select All";
+ }
+ }
+
+ var checkflag_results = "false";
+
+ function check_results() {
+ if (checkflag_results == "false") {
+ if (document.results.elements["results[]"].length == undefined) {
+ document.results.elements["results[]"].checked = true;
+ }
+ else {
+ for (i = 0; i < document.results.elements["results[]"].length; i++) {
+ document.results.elements["results[]"][i].checked = true;
+ }
+ }
+ checkflag_results = "true";
+ return "Unselect All";
+ }
+ else {
+ if (document.results.elements["results[]"].length == undefined) {
+ document.results.elements["results[]"].checked = false;
+ }
+ else {
+ for (i = 0; i < document.results.elements["results[]"].length; i++) {
+ document.results.elements["results[]"][i].checked = false;
+ }
+ }
+ checkflag_results = "false";
+ return "Select All";
+ }
+ }
+// End -->
+</script>
+
+<div id="pageheader">
+<a href="http://www.ampache.org">
+ <img src="<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache.gif" border="0" title="Ampache: For the love of music" alt="Ampache: For the love of music" />
+</a>
+</div>
+<?php
+ if( isset( $_REQUEST['amp_error'] ) ) {
+ $msg = scrub_in( $_REQUEST['amp_error'] );
+ echo( "<font class=\"error\">Error:\t$msg</font><br><br>" );
+ if (conf('debug')) { log_event($_SESSION['userdata']['username'],' general_error ',"Error: $msg"); }
+ }
+show_clear();
+?>
diff --git a/templates/javascript_refresh.inc b/templates/javascript_refresh.inc
new file mode 100644
index 00000000..2b04e46e
--- /dev/null
+++ b/templates/javascript_refresh.inc
@@ -0,0 +1,41 @@
+<script language="JavaScript">
+// Set refresh interval (in seconds)
+var refreshinterval=<?= conf('refresh_limit'); ?>
+
+// Display the countdown inside the status bar?
+// Set "1" for yes or "0" for no
+var displaycountdown=0
+
+// main-code
+var starttime
+var nowtime
+var reloadseconds=0
+var secondssinceloaded=0
+
+function starttime() {
+ starttime=new Date()
+ starttime=starttime.getTime()
+ countdown()
+}
+
+function countdown() {
+ nowtime= new Date()
+ nowtime=nowtime.getTime()
+ secondssinceloaded=(nowtime-starttime)/1000
+
+reloadseconds=Math.round(refreshinterval-secondssinceloaded)
+ if (refreshinterval>=secondssinceloaded) {
+ var timer=setTimeout("countdown()",1000)
+ if (displaycountdown=="1") {
+ window.status="Page refreshing in "+reloadseconds+
+" seconds"
+ }
+ } else {
+ clearTimeout(timer)
+ window.location.reload(true)
+ }
+}
+
+// start with page-load
+window.onload=starttime
+</script>
diff --git a/templates/list_duplicates.inc b/templates/list_duplicates.inc
new file mode 100644
index 00000000..ec1a8632
--- /dev/null
+++ b/templates/list_duplicates.inc
@@ -0,0 +1,87 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+
+/*!
+ @header
+ A template file for listing duplicate songs
+
+*/
+?>
+
+<?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">
+ <tr class="table-header">
+ <td>Disable</td>
+ <td>Song</td>
+ <td>Artist</td>
+ <td>Album</td>
+ <td>Length</td>
+ <td>Bitrate</td>
+ <td>Size</td>
+ <td>Filename</td>
+ </tr>
+<?php
+ $class="odd";
+ foreach ($flags as $flag) {
+ $song = new Song($flag['song']);
+ $song->format_song();
+ $class = (++$i%2)?'odd':'even';
+ $alt_title = $song->title;
+ $formated_title = $song->f_title;
+
+ $artist = $song->f_artist;
+ $alt_artist = $song->f_full_artist;
+
+ $dinfolist = get_duplicate_info($song,$search_type);
+ 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><a href=\"".conf('web_path')."/artists.php?action=show&amp;artist=".$dinfo['artistid']."\" title=\"".$dinfo['artist']."\">".$dinfo['artist']."</a> </td>".
+ "<td><a href=\"".conf('web_path')."/albums.php?action=show&amp;album=".$dinfo['albumid']."\" title=\"".$dinfo['album']."\">".$dinfo['album']."</a> </td>".
+ "<td>".floor($dinfo['time']/60).":".sprintf("%02d", ($dinfo['time']%60) )."</td>".
+ "<td>".intval($dinfo['bitrate']/1000)."</td>".
+ "<td>".sprintf("%.2f", ($dinfo['size']/1000000))."Mb</td>".
+ "<td>".$dinfo['file']."</td>";
+ echo "</tr>\n";
+
+ }
+
+
+ }
+?>
+<tr>
+<td colspan="8" class="<?php echo $class; ?>"><input height="15px" type="submit" value="Disable Songs" /></td>
+</tr>
+</table>
+<?php } else { ?>
+
+<p> You don't have any duplicate songs. </p>
+
+<?php } ?>
+
diff --git a/templates/list_flagged.inc b/templates/list_flagged.inc
new file mode 100644
index 00000000..607206b5
--- /dev/null
+++ b/templates/list_flagged.inc
@@ -0,0 +1,92 @@
+<?php
+/*
+
+ Copyright (c) 2004 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header
+ A template file
+
+*/
+?>
+
+<p style="font-size: 10pt; font-weight: bold;">View Flagged Songs</p>
+
+<p>This is the list of songs that have been flagged by you or other Ampache users. Use
+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">
+
+<table class="tabledata" cellspacing="0" cellpadding="0" border="1">
+ <tr class="table-header">
+ <td><a href="#" onclick="check_songs(); return false;">Select</a></td>
+ <td><?php echo _("Song"); ?></td>
+ <td><?php echo _("Flag"); ?></td>
+ <td><?php echo _("New Flag"); ?>:</td>
+ <td><?php echo _("Flagged by"); ?></td>
+ <td><?php echo _("ID3 Update"); ?>:</td>
+ <td><?php echo _("Comment"); ?>:</td>
+ </tr>
+<?php
+ foreach ($flags as $flag) {
+ $song = new Song($flag['song']);
+ $song->format_song();
+ $alt_title = $song->title;
+
+ $artist = $song->f_artist;
+ $alt_artist = $song->artist;
+
+ echo "<tr class=\"even\">" .
+ "<td><input type=\"checkbox\" name=\"song[]\" id=\"flag_".$flag['song']."\" value=\"".$flag['song']."\"></input></td>" .
+ "<td><a href=\"".conf('web_path')."/song.php?song=".$flag['song']."\" title=\"$alt_title\">$song->f_title</a> by " .
+ "<a href=\"".conf('web_path')."/artist.php?action=show&amp;artist=$song->artist_id\" title=\"$alt_artist\">$artist</a></td>" .
+ "<td>".$flag['type']."</td>";
+ echo "<td>";
+ $onchange = "onchange=\"document.getElementById('flag_".$flag['song']."').checked='checked';\"";
+ show_flagged_popup($flag['type'],'type',$flag['song']."_newflag", $onchange);
+ echo "</td>";
+ echo "<td>".$flag['username']."<br />".date('m/d/y',$flag['date'])."</td>";
+ if($flag['type'] === 'newid3') {
+ echo "<td>";
+ echo "<input type=\"radio\" name=\"".$flag['song']."_accept\" value=\"accept\" $onchange />" . _("Accept") . "<br />";
+ echo "<input type=\"radio\" name=\"".$flag['song']."_accept\" value=\"reject\" $onchange />" . _("Reject");
+ echo "</td>";
+ }
+ else {
+ echo "<td><a href=\"".conf('web_path')."/admin/song.php?action=edit&amp;song=".$flag['song']."\">edit/view</a></td>";
+ }
+ echo "<td>" . $flag['comment'] . "</td>";
+ echo "</tr>\n";
+ }
+?>
+<tr class="even"><td colspan="7">
+ <input type="submit" name="action" value="Update Flags"></input>
+ <input type="submit" name="action" value="Edit Selected"></input>
+ <input type="submit" name="action" value="Clear Edit List"></input>
+ </td></tr>
+</table>
+</form>
+<?php } else { ?>
+
+<p><?php echo ("You don't have any flagged songs"); ?>. </p>
+
+<?php } ?>
+
diff --git a/templates/list_header.inc b/templates/list_header.inc
new file mode 100644
index 00000000..658d0972
--- /dev/null
+++ b/templates/list_header.inc
@@ -0,0 +1,99 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header
+ The default pager widget for moving through a list of many items.
+
+ This relies heavily on the View object to get pieces about how
+ to layout this page.
+
+*/
+
+if (!$total_items) { $total_items = $_SESSION['view_total_items']; }
+// do some math here
+if ( $view->offset >= $view->offset_limit ) {
+ $offset2 = $view->offset - 25;
+}
+else {
+ $offset2 = $view->offset;
+ if (!$view->offset) { $offset2 = "0"; }
+}
+
+// Get the prev page offset
+$offset1 = $view->offset - $view->offset_limit;
+if ($offset1 < 1) { $offset1 = 0; }
+
+
+// since we have an array of objects, let's build a purdy thingie
+$pages = ceil($total_items/$view->offset_limit);
+
+$offset4 = ($pages - 1);
+$offset4 = ($offset4 * $view->offset_limit);
+
+//We do this one last to make sure we don't go beyond offset4
+$offset3 = $view->offset + $view->offset_limit;
+if ($offset3 >= $offset4) { $offset3 = $offset4; }
+
+
+//setup the next action
+preg_match("/.*\/(.+\.php)$/",$_SERVER['SCRIPT_NAME'],$matches);
+
+$action = "action=" . scrub_in($_REQUEST['action']);
+$script = conf('web_path') . "/" . $admin_menu . $matches[1];
+
+// are there enough items to even need this view?
+if ( $pages > 1 && $_SESSION['view_script']) {
+?>
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tr>
+ <td align="center" valign="top">
+ <a href="<?php echo $script; ?>?<?php echo $action; ?>&amp;offset=<?php echo $offset1; ?>&amp;keep_view=true">[&nbsp;<?php echo _("Prev"); ?>&nbsp;]</a>&nbsp;
+ </td>
+ <td align="center">
+ <?php
+ $counter = 1;
+ $offset_pages = 0;
+
+ while ( $counter <= $pages ) {
+ if ( $view->offset == $offset_pages ) {
+ ?>
+ <a href="<?php echo $script; ?>?<?php echo $action ; ?>&amp;sort_type=<?php echo $view->sort_type ; ?>&amp;offset=<?php echo $offset_pages ; ?>&amp;keep_view=true"><b><?php echo $counter; ?></b></a>&nbsp;
+ <?php
+ } else {
+ ?>
+ <a href="<?php echo $script; ?>?<?php echo $action; ?>&amp;sort_type=<?php echo $view->sort_type; ?>&amp;offset=<?php echo $offset_pages; ?>&amp;keep_view=true"><?php echo $counter; ?></a>&nbsp;
+ <?php
+ }
+ $offset_pages += $view->offset_limit;
+ $counter++;
+ }
+ ?>
+ </td>
+ <td align="center" valign="top">
+ <a href="<?php echo $script; ?>?<?php echo $action; ?>&amp;offset=<?php echo $offset3; ?>&amp;keep_view=true">[&nbsp;<?php echo _("Next"); ?>&nbsp;]</a>&nbsp;
+ </td>
+ </tr>
+</table>
+
+<?php } // if ?>
diff --git a/templates/menu.inc b/templates/menu.inc
new file mode 100644
index 00000000..c98658dd
--- /dev/null
+++ b/templates/menu.inc
@@ -0,0 +1,85 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header
+ A template file
+
+*/
+
+$items = array(
+ _("Home") => htmlspecialchars(conf('web_path') . "/index.php"),
+ _("Albums") => htmlspecialchars(conf('web_path') . "/albums.php"),
+ _("Artists") => htmlspecialchars(conf('web_path') . "/artists.php"),
+ _("Playlists") => htmlspecialchars(conf('web_path') . "/playlist.php"),
+ _("Search") => htmlspecialchars(conf('web_path') . "/search.php"),
+ _("Preferences") => htmlspecialchars(conf('web_path') . "/preferences.php")
+ );
+if ($GLOBALS['user']->prefs['upload']) {
+ $items = array_merge($items, array(_("Upload") => conf('web_path') . "/upload.php"));
+}
+
+
+?>
+
+<ul id="mainmenu">
+<?
+ foreach ( array_keys($items) as $item ) {
+ if ( $high == $item ) {
+ print("\t\t<li class=\"active\"><a class=\"active\" href=\"$items[$item]\">$item</a></li>\n");
+ }
+ else {
+ print("\t\t<li><a href=\"$items[$item]\">$item</a></li>\n");
+ }
+ } // end foreach items
+
+
+ if (!conf('use_auth') || $GLOBALS['user']->has_access(100) ) {
+ if ( $high == 'Admin' ) {
+ print("\t\t<li class=\"active\"><a class=\"active\" href=\"" . conf('web_path') . "/admin/\">" . _("Admin") . "</a></li>\n");
+ }
+ else {
+ print("\t\t<li><a href=\"" . conf('web_path') . "/admin/\">" . _("Admin") . "</a></li>\n");
+ }
+ } // if we aren't using auth or 100
+
+ // now do the user specific stuff
+ if (conf('use_auth')) {
+ if ( $high == 'Stats' || $high == 'Profile' ) {
+ print("\t\t<li class=\"active\">".$GLOBALS['user']->username.": <a class=\"active\" href=\"".conf('web_path')."/user.php?action=show_edit_profile\">" . _("Account") . "</a> |".
+ " <a class=\"active\" href=\"".conf('web_path')."/stats.php\">" . _("Stats") . "</a> |".
+ " <a class=\"active\" href=\"".conf('web_path')."/logout.php\">" . _("Logout") . "</a> </li>\n");
+ } // if stats or profile
+ else {
+ echo "\t\t<li>".$GLOBALS['user']->username.": " .
+ "<a href=\"".conf('web_path')."/user.php?action=show_edit_profile\">" . _("Account") . "</a> |".
+ " <a href=\"".conf('web_path')."/stats.php\">" . _("Stats") . "</a> |".
+ " <a href=\"".conf('web_path')."/logout.php\">" . _("Logout") . "</a> </li>\n";
+ } // 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");
+ } // else no user
+?>
+
+ </ul>
diff --git a/templates/show_access_list.inc b/templates/show_access_list.inc
new file mode 100644
index 00000000..b5c7207b
--- /dev/null
+++ b/templates/show_access_list.inc
@@ -0,0 +1,72 @@
+<?php
+/*
+
+ Copyright (c) 2004 Ampache.org
+ All rights reserved.
+
+ $CVSHeader: ampache/modules/class/song.php,v 1.7 2004/01/12 08:27:26 vollmerk Exp $
+ $Source: /data/cvsroot/ampache/modules/class/song.php,v $
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header show access list
+ @discussion default display for access admin page
+
+*/
+$row_classes = array('even','odd');
+?>
+
+<p style="font-size: 10pt; font-weight: bold;"><?php print _("Host Access to Your Catalog"); ?></p>
+
+<p>Since your catalog can be accessed remotely you may want to limit the access from
+remote sources so you are not in violation of copyright laws. By default your
+server will allow anyone with an account to stream music. It will not allow any
+other Ampache servers to connect to it to share catalog information. Use tool below
+to add any server's IP address that you want to access your Ampache catalog or be able to
+stream from this server.</p>
+
+<p><a href="<?php print conf('web_path'); ?>/admin/access.php?action=show_add_host"><?php print _("Add Entry"); ?></a></p>
+
+<table cellspacing="1" cellpadding="3" class="border">
+ <tr class="table-header" align="center">
+ <td><?php print _("Name"); ?></td>
+ <td><?php print _("Start Address"); ?></td>
+ <td><?php print _("End Address"); ?></td>
+ <td><?php print _("Level"); ?></td>
+ <td><?php print _("Action"); ?></td>
+ </tr>
+<?php
+if (count($list)) {
+/* Start foreach List Item */
+foreach ($list as $access) {
+?>
+<tr class="<?php print $row_classes[0]; ?>">
+ <td><?php print $access->name; ?></td>
+ <td><?php print int2ip($access->start); ?></td>
+ <td><?php print int2ip($access->end); ?></td>
+ <td><?php print $access->get_level_name(); ?></td>
+ <td>
+ Edit |
+ <a href="<?php print conf('web_path'); ?>/admin/access.php?action=show_confirm_delete&amp;access_id=<?php print $access->id; ?>"><?php print _("Revoke"); ?></a>
+ </td>
+</tr>
+<?php $row_classes = array_reverse($row_classes); ?>
+<?php } // end foreach ?>
+<?php } // end if count ?>
+</table>
+
diff --git a/templates/show_add_access.inc b/templates/show_add_access.inc
new file mode 100644
index 00000000..89ea79e5
--- /dev/null
+++ b/templates/show_add_access.inc
@@ -0,0 +1,76 @@
+<?php
+/*
+
+ Copyright (c) 2004 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header Add Access List Entry
+ A template file
+
+*/
+
+?>
+
+<p style="font-size: 10pt; font-weight: bold;"><?php print _("Add Access for a Host"); ?></p>
+
+<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">
+ </td>
+ </tr>
+ <tr>
+ <td><?php print _("Start IP Address"); ?>:</td>
+ <td>
+ <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">
+ </td>
+ </tr>
+ <tr>
+ <td><?php print _("Level"); ?>:</td>
+ <td>
+ <select name="level">
+ <option value="5" SELECTED>Demo</option>
+ <option value="25">Stream</option>
+ <option value="50">Stream/Download</option>
+ <option value="75">XML-RPC</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>
+ <input type="hidden" name="action" value="add_host">
+ <input type="submit" value="<?php print _("Add Host"); ?>">
+ </td>
+ </tr>
+</table>
+</form>
diff --git a/templates/show_admin_index.inc b/templates/show_admin_index.inc
new file mode 100644
index 00000000..edf39b5b
--- /dev/null
+++ b/templates/show_admin_index.inc
@@ -0,0 +1,35 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+/*!
+ @header Show Admin Index
+ @discussion shows the admin index
+*/
+?>
+<p><font size="+1"><?php print _("Admin Section"); ?>:</font></p>
+<dl>
+ <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>
+
diff --git a/templates/show_album.inc b/templates/show_album.inc
new file mode 100644
index 00000000..e5934c05
--- /dev/null
+++ b/templates/show_album.inc
@@ -0,0 +1,67 @@
+<?php
+/*
+
+ Copyright (c) 2004 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+/*!
+ @header Show Album
+ @discussion shows a single album
+*/
+
+// Build array of the table classes we are using
+$row_classes = array('even','odd');
+
+//FIXME: I hate having to create this here again... LAME
+$user = new User($_SESSION['userdata']['username']);
+?>
+<br />
+<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>
+ </td>
+</tr>
+<tr class="even">
+ <td width="140" align="center">
+ <?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 "</a>\n";
+ }
+ ?>
+ </td>
+ <td valign="top">
+ <b>Actions:</b><br />
+ &nbsp;&nbsp;<a href="<?php echo conf('web_path'); ; ?>/song.php?action=m3u&album=<?php echo $album->id; ; ?>"><?php echo _("Play Album"); ; ?></a><br />
+ &nbsp;&nbsp;<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 />
+ &nbsp;&nbsp;<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 />
+ &nbsp;&nbsp;<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')) { ?>
+ &nbsp;&nbsp;<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() ) { ?>
+ &nbsp;&nbsp;<a href="<?php echo conf('web_path'); ; ?>/batch.php?action=alb&id=<?php echo $album->id; ; ?>"><?php echo _("Download"); ?></a><br />
+ <?php } ?>
+
+ </td>
+</tr>
+</table>
+<br />
diff --git a/templates/show_albums.inc b/templates/show_albums.inc
new file mode 100644
index 00000000..24cc4497
--- /dev/null
+++ b/templates/show_albums.inc
@@ -0,0 +1,82 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+/*!
+ @header Show Albums
+ @discussion shows a list of albums
+*/
+
+// Build array of the table classes we are using
+$total_items = $view->total_items;
+?>
+<table class="border" cellspacing="0" cellpadding="0" border="0">
+<tr class="even" align="center">
+ <td colspan="5">
+ <?php if ($view->offset_limit) { require (conf('prefix') . "/templates/list_header.inc"); } ?>
+ </td>
+</tr>
+<tr class="table-header">
+ <td>
+ <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.name&amp;sort_order=0"><?php echo _("Album"); ?></a>
+ </td>
+ <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']; ?>&amp;keep_view=true&amp;sort_type=album.year&amp;sort_order=0"><?php echo _("Year"); ?></>
+ </td>
+ <td> <?php echo _("Action"); ?> </td>
+
+</tr>
+<?php
+/* Foreach through the albums */
+foreach ($albums as $album) {
+?>
+<tr class="<?php echo flip_class(); ?>">
+ <td><?php echo $album->f_name; ?></td>
+ <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>
+ <?php if( batch_ok() ) { ?>
+ | <a href="<?php echo conf('web_path'); ?>/batch.php?action=alb&id=<?php echo $album->id; ?>"><?php echo _("Download"); ?></a>
+ <?php } ?>
+ </td>
+</tr>
+<?php } ?>
+<tr class="table-header">
+ <td>
+ <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=album.name&amp;sort_order=0"><?php echo _("Album"); ?></a>
+ </td>
+ <td> <?php echo _("Artist"); ?> </td>
+ <td> <?php echo _("Songs"); ?> </td>
+ <td> <?php echo _("Year"); ?> </td>
+ <td> <?php echo _("Action"); ?> </td>
+
+</tr>
+<tr class="even" align="center">
+ <td colspan="5">
+ <?php if ($view->offset_limit) { require (conf('prefix') . "/templates/list_header.inc"); } ?>
+ </td>
+</tr>
+</table>
+<br />
diff --git a/templates/show_artist.inc b/templates/show_artist.inc
new file mode 100644
index 00000000..1b6609d6
--- /dev/null
+++ b/templates/show_artist.inc
@@ -0,0 +1,96 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+//FIXME: I don't like having to re-create this friggin object.. :(
+global $user;
+$artist_id = $artist->id;
+?>
+<br />
+<table class="text-box">
+<tr>
+ <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>
+ <?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>
+ <?php } ?>
+</ul>
+ </td>
+</tr>
+</table>
+<!-- *** Multi-Album Art Display Thx MrBlahh Updated by clader *** -->
+<br />
+<form name="songs" method="post" enctype="multipart/form-data">
+
+<table class="border" cellspacing="0" cellpadding="0" border="0">
+ <tr class="table-header">
+ <th align="center">
+ &nbsp;&nbsp;<a href="#" onclick="check_songs(); return false;"><?php print _("Select"); ?></a>
+ </th>
+ <th><?php print _("Cover"); ?></th>
+ <th><?php print _("Album Name"); ?></th>
+ <th><?php print _("Album Year"); ?></th>
+ <th><?php print _("Total Tracks"); ?></th>
+ <th><?php print _("Action"); ?></th>
+ </tr>
+
+<?php
+ foreach ($albums as $album) {
+ $id = $album->id;
+ $album_name = $album->name;
+ $count = $album->songs;
+?>
+
+ <tr class="<?php echo flip_class(); ?>">
+ <td align="center">
+ <input name="song[]" value="<?php print $id; ?>" type="checkbox" />
+ </td>
+ <td height="87">
+ <a href="<?php print $web_path; ?>/albums.php?album=<?php print $id; ?>&amp;artist=<?php print $artist_id; ?>">
+ <img border="0" src="<?php print $web_path; ?>/albumart.php?id=<?php print $id; ?>&amp;fast=1" alt="<?php print $album_name; ?>" title="<?php print $album_name; ?>" height="75" width="75">
+ </a>
+ </td>
+ <td><a href="<?php print $web_path; ?>/albums.php?album=<?php print $id; ?>&amp;artist=<?php print $artist_id; ?>"><?php print $album_name; ?></a></td>
+ <td><?php print $album->year; ?></td>
+ <td><?php print $count; ?></td>
+ <td>
+ <a href="<?php print $web_path; ?>/song.php?action=m3u&album=<?php print $id; ?>"><?php print _("Play"); ?></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>
+ <?php } ?>
+ </td>
+
+
+ </td>
+ </tr>
+<?php } ?>
+</table>
+ <br /><br />
+
+<?php show_play_selected(); ?>
+<input type="hidden" name="type" value="album" />
+<input type="hidden" name="artist_id" value="<?php print $artist_id; ?>" />
+</form>
+
diff --git a/templates/show_artists.inc b/templates/show_artists.inc
new file mode 100644
index 00000000..068f1655
--- /dev/null
+++ b/templates/show_artists.inc
@@ -0,0 +1,76 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+/*!
+ @header Show Artists
+ Shows multiple artists.... takes an array of artist objects
+
+*/
+
+// Build array of the table classes we are using
+$total_items = $view->total_items;
+?>
+<table class="border" cellspacing="0" cellpadding="0" border="0">
+<tr class="even" align="center">
+ <td colspan="5">
+ <?php if ($view->offset_limit) { require (conf('prefix') . "/templates/list_header.inc"); } ?>
+ </td>
+</tr>
+<tr class="table-header">
+ <td>
+ <a href="<?php print conf('web_path'); ?>/<?php print $_SESSION['view_script']; ?>?action=<?php print $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=artist.name&amp;sort_order=0"> <?php print _("Artist"); ?> </a>
+ </td>
+ <td> <?php print _("Songs"); ?> </td>
+ <td> <?php print _("Albums"); ?> </td>
+ <td> <?php print _("Action"); ?> </td>
+</tr>
+<?php
+/* Foreach through every artist that has been passed to us */
+//FIXME: These should come in as objects...
+foreach ($artists as $artist) {
+?>
+<tr class="<?php echo flip_class(); ?>">
+ <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>
+</tr>
+<?php } ?>
+<tr class="table-header">
+ <td>
+ <a href="<?php print conf('web_path'); ?>/<?php print $_SESSION['view_script']; ?>?action=<?php print $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=artist.name&amp;sort_order=0"> <?php print _("Artist"); ?> </a>
+ </td>
+ <td> <?php print _("Songs"); ?> </td>
+ <td> <?php print _("Albums"); ?> </td>
+
+ <td> <?php print _("Action"); ?> </td>
+
+</tr>
+<tr class="even" align="center">
+ <td colspan="4">
+ <?php if ($view->offset_limit) { require (conf('prefix') . "/templates/list_header.inc"); } ?>
+ </td>
+</tr>
+</table>
+
diff --git a/templates/show_box.inc b/templates/show_box.inc
new file mode 100644
index 00000000..c3c1dfa3
--- /dev/null
+++ b/templates/show_box.inc
@@ -0,0 +1,43 @@
+<?php
+/*
+
+ Copyright (c) 2004 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+/*!
+ @header
+ A template file
+
+*/
+
+?>
+
+<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>
+ <td class="even">
+ <?
+ foreach ($items as $item) {
+ echo $item;
+ }
+ ?>
+ </td>
+ </tr>
+</table>
diff --git a/templates/show_confirm_action.inc.php b/templates/show_confirm_action.inc.php
new file mode 100644
index 00000000..89730057
--- /dev/null
+++ b/templates/show_confirm_action.inc.php
@@ -0,0 +1,32 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+?>
+
+<br />
+<div class="text-box" style="margin-right:25%;text-align:center;margin-left:25%;">
+<form name="confirm" method="post" action="<?php echo $web_path; ?>/<?php echo $script; ?>?<?php echo $arg; ?>" enctype="multpart/form-data">
+ <p><?php echo $text; ?></p>
+ <p>
+ <input type="submit" name="confirm" value="<?php echo _("Yes"); ?>" />
+ <input type="submit" name="confirm" value="<?php echo _("No"); ?>" />
+ </p>
+</form>
+</div>
diff --git a/templates/show_confirmation.inc.php b/templates/show_confirmation.inc.php
new file mode 100644
index 00000000..0268a081
--- /dev/null
+++ b/templates/show_confirmation.inc.php
@@ -0,0 +1,33 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+?>
+<br />
+<table class="text-box" align="center" cellspacing="7">
+<tr><td align="center">
+ <span class="header1"><?php echo $title; ?></span>
+ <br />
+ <?php echo $text; ?>
+</td></tr>
+<tr><td>
+ [ <a href="<?php echo $path; ?>"><?php echo _("Continue"); ?></a> ]
+ <br />
+</td></tr>
+</table>
diff --git a/templates/show_disabled_songs.inc b/templates/show_disabled_songs.inc
new file mode 100644
index 00000000..6f40c082
--- /dev/null
+++ b/templates/show_disabled_songs.inc
@@ -0,0 +1,67 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+/*!
+ @header Disabled Songs
+
+*/
+
+
+?>
+<br />
+<form name="songs" method="post" action="<?php echo conf('web_path'); ?>/admin/catalog.php" enctype="multipart/form-data" style="Display:inline">
+<table class="tabledata" cellspacing="0" cellpadding="3" border="0" width="100%">
+<tr class="table-header">
+ <td class="table-header"><a href="#" onclick="check_songs(); return false;">Select</a></td>
+ <td>Title</td>
+ <td>Album</td>
+ <td>Artist</td>
+ <td>Filename</td>
+ <td>Addition Time</td>
+</tr>
+<?php foreach ($songs as $song) {
+ $class = (++$i%2)?'odd':'even';
+?>
+<tr class="<?php echo $class; ?>">
+ <td><input type="checkbox" name="song[]" value="<?php echo $song->id; ?>" /></td>
+ <td><?php echo $song->title; ?></td>
+ <td><?php echo $song->get_album_name($song->album); ?></td>
+ <td><?php echo $song->get_artist_name($song->album); ?></td>
+ <td><?php echo $song->file; ?></td>
+ <td><?php echo date("h:i:s, m/d/y",$song->addition_time); ?></td>
+
+</tr>
+<?php } ?>
+<?php $class = (++$i%2)?'odd':'even'; ?>
+<tr class="<?php echo $class; ?>">
+ <td>&nbsp;</td>
+ <td colspan="10">
+ <input type="submit" value="Remove" />&nbsp;&nbsp;
+ <input type="reset" value="Reset Form" />
+ <input type="hidden" name="action" value="remove_disabled" />
+ </td>
+</tr>
+<tr>
+ <td colspan="10" class="table-header">&nbsp;</td>
+</tr>
+</table>
+</form>
+
diff --git a/templates/show_import_playlist.inc.php b/templates/show_import_playlist.inc.php
new file mode 100644
index 00000000..b8ea3a94
--- /dev/null
+++ b/templates/show_import_playlist.inc.php
@@ -0,0 +1,53 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+?>
+<form method="post" name="import_playlist" action="<?php echo conf('web_path'); ?>/playlist.php" enctype="multipart/form-data">
+<table border="0" cellpadding="0" cellspacing="0" class="border">
+<tr class="table-header" >
+ <td colspan="2" align="center"><?php echo _("Importing a Playlist from a File"); ?></td></tr>
+<tr class="<?php echo flip_class(); ?>">
+ <td>
+ <?php echo _("Filename"); ?>:
+ <?php $GLOBALS['error']->print_error('filename'); ?>
+ </td>
+ <td><input type="textbox" name="filename" value="<?php echo $_REQUEST['filename']; ?>" size="45" /></td>
+</tr>
+<tr class="<?php echo flip_class(); ?>">
+ <td>
+ <?php echo _("Playlist Type"); ?>
+ </td>
+ <td>
+ <select name="playlist_type">
+ <option name="m3u">M3U</option>
+<!-- <option name="pls">PLS</option> -->
+ </select>
+ </td>
+</tr>
+<tr class="<?php echo flip_class(); ?>">
+ <td>&nbsp;</td>
+ <td>
+ <input type="hidden" name="action" value="import_playlist" />
+ <input type="submit" value="<?php echo _("Import Playlist"); ?>" />
+ </td>
+</tr>
+</table>
+</form>
diff --git a/templates/show_install.inc b/templates/show_install.inc
new file mode 100644
index 00000000..ea1666b6
--- /dev/null
+++ b/templates/show_install.inc
@@ -0,0 +1,82 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+/*!
+ @header Show Install Form and instructions
+
+*/
+?>
+<html>
+<head>
+<title>Ampache :: For The Love Of Music - Install</title>
+</head>
+<body>
+<?php require_once(conf('prefix') . "/templates/style.inc"); ?>
+<div class="text-box">
+<span class="header1"><?php echo _("Ampache Installation"); ?></span>
+<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 pre-requisits"); ?>
+</br />
+<ul>
+ <li><?php echo _("A MySQL Server with a username and password that can create/modify databases"); ?></li>
+ <li><?php echo _("Your webserver has read access to the /sql/ampache.sql file and the /config/ampache.cfg.php.dist file"); ?></li>
+</ul>
+<?php echo _("Once you have ensured that you have the above requirements 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 /config/ampache.cfg.php"); ?>
+</p>
+</div>
+<div class="text-box">
+<b><?php echo _("Step 1 - Creating and Inserting the Ampache Database"); ?></b><br />
+<dl>
+ <dd><?php echo _("This step creates and inserts the Ampache database, as such please provide a mysql account with database creation rights. This step may take a while depending upon the speed of your computer"); ?></dd>
+</dl>
+<?php echo _("Step 2 - Creating the Ampache.cfg.php file"); ?><br />
+<?php echo _("Step 3 - Setup Initial Account"); ?><br />
+<br /><br />
+<span class="header2">Insert Ampache Database</span>
+<form method="post" action="<?php echo $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?action=create_db"; ?>" enctype="multipart/form-data" >
+<table cellpadding="5" cellspacing="0" border="0">
+<tr>
+ <td><?php echo _("Desired Database Name"); ?></td>
+ <td><input type="textbox" name="local_db" value="ampache" /></td>
+</tr>
+<tr>
+ <td><?php echo _("MySQL Hostname"); ?></td>
+ <td><input type="textbox" name="local_host" value="localhost" /></td>
+</tr>
+<tr>
+ <td><?php echo _("MySQL Administrative Username"); ?></td>
+ <td><input type="textbox" name="local_username" value="root" /></td>
+</tr>
+<tr>
+ <td><?php echo _("MySQL Administrative Password"); ?></td>
+ <td><input type="password" name="local_pass" /></td>
+</tr>
+<tr>
+ <td>&nbsp;</td>
+ <td><input type="submit" value="<?php echo _("Insert Database"); ?>" /></td>
+</tr>
+
+</table>
+</form>
+</div>
+
+</body>
+</html>
diff --git a/templates/show_install_account.inc.php b/templates/show_install_account.inc.php
new file mode 100644
index 00000000..014e48dc
--- /dev/null
+++ b/templates/show_install_account.inc.php
@@ -0,0 +1,76 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+/*!
+ @header Show Install Config File
+
+*/
+
+?>
+<html>
+<head>
+<title>Ampache :: For The Love Of Music - Install</title>
+</head>
+<body>
+<?php require_once(conf('prefix') . "/templates/style.inc"); ?>
+<div class="text-box">
+<span class="header1"><?php echo _("Ampache Installation"); ?></span>
+<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 pre-requisits"); ?>
+</br />
+<ul>
+ <li><?php echo _("A MySQL Server with a username and password that can create/modify databases"); ?></li>
+ <li><?php echo _("Your webserver has read access to the /sql/ampache.sql file and the /config/ampache.cfg.dist.php file"); ?></li>
+</ul>
+<?php echo _("Once you have ensured that you have the above requirements 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 /config/ampache.cfg.php"); ?>
+</p>
+</div>
+
+<div class="text-box">
+<?php echo _("Step 1 - Creating and Inserting the Ampache Database"); ?><br />
+<?php echo _("Step 2 - Creating the ampache.cfg.php file"); ?><br />
+<b><?php echo _("Step 3 - Setup Initial Account"); ?></b><br />
+<dl>
+ <dd><?php echo _("This step creates your initial Ampache admin account. Once your admin account has been created you will be directed to the login page"); ?></dd>
+</dl>
+<br /><br />
+<span class="header2">Create Admin Account</span>
+<form method="post" action="<?php echo $_SERVER['PHP_SELF'] . "?action=create_account"; ?>" enctype="multipart/form-data" >
+<table cellpadding="5" cellspacing="0" border="0">
+<tr>
+ <td><?php echo _("Username"); ?></td>
+ <td><input type="textbox" name="local_username" value="admin" /></td>
+</tr>
+<tr>
+ <td><?php echo _("Password"); ?></td>
+ <td><input type="password" name="local_pass" value="" /></td>
+</tr>
+<tr>
+ <td>&nbsp;</td>
+ <td><input type="submit" value="<?php echo _("Create Account"); ?>" /></td>
+</tr>
+</table>
+</form>
+</div>
+
+</body>
+</html>
+
diff --git a/templates/show_install_config.inc b/templates/show_install_config.inc
new file mode 100644
index 00000000..28544569
--- /dev/null
+++ b/templates/show_install_config.inc
@@ -0,0 +1,136 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+/*!
+ @header Show Install Config File
+
+*/
+
+?>
+<html>
+<head>
+<title>Ampache :: For The Love Of Music - Install</title>
+</head>
+<body>
+<?php require_once(conf('prefix') . "/templates/style.inc"); ?>
+<div class="text-box">
+<span class="header1"><?php echo _("Ampache Installation"); ?></span>
+<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 pre-requisits"); ?>
+</br />
+<ul>
+ <li><?php echo _("A MySQL Server with a username and password that can create/modify databases"); ?></li>
+ <li><?php echo _("Your webserver has read access to the /sql/ampache.sql file and the /config/ampache.cfg.php.dist file"); ?></li>
+</ul>
+<?php echo _("Once you have ensured that you have the above requirements 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 /config/ampache.cfg.php"); ?>
+</p>
+</div>
+
+<div class="text-box">
+<?php echo _("Step 1 - Creating and Inserting the Ampache Database"); ?><br />
+<b><?php echo _("Step 2 - Creating the Ampache.cfg.php file"); ?></b><br />
+<dl>
+ <dd><?php echo _("This steps takes the basic config values, and first attempts to write them out directly to your webserver. If access is denied it will prompt you to download the config file. Please put the downloaded config file in /config"); ?></dd>
+</dl>
+<?php echo _("Step 3 - Setup Initial Account"); ?></a><br />
+<br /><br />
+<span class="header2">Generate Config File</span>
+<form method="post" action="<?php echo $_SERVER['PHP_SELF'] . "?action=create_config"; ?>" enctype="multipart/form-data" >
+<table cellpadding="5" cellspacing="0" border="0">
+<tr>
+ <td><?php echo _("Web Path"); ?></td>
+ <td><input type="textbox" name="web_path" value="<?php echo $web_path; ?>" /></td>
+</tr>
+<tr>
+ <td><?php echo _("Desired Database Name"); ?></td>
+ <td><input type="textbox" name="local_db" value="<?php echo $_REQUEST['local_db']; ?>" /></td>
+</tr>
+<tr>
+ <td><?php echo _("MySQL Hostname"); ?></td>
+ <td><input type="textbox" name="local_host" value="<?php echo $_REQUEST['local_host']; ?>" /></td>
+</tr>
+<tr>
+ <td><?php echo _("MySQL Username"); ?></td>
+ <td><input type="textbox" name="local_username" value="username" /></td>
+</tr>
+<tr>
+ <td><?php echo _("MySQL Password"); ?></td>
+ <td><input type="password" name="local_pass" value="" /></td>
+</tr>
+<tr>
+ <td>&nbsp;</td>
+ <td><input type="submit" value="<?php echo _("Write Config"); ?>" /></td>
+</tr>
+</table>
+</form>
+<br />
+<table border="0" cellpadding="0">
+<tr>
+ <td valign="top"><?= _("Ampache.cfg.php Exists"); ?></td>
+ <td valign="top">[
+ <?
+ if (!read_config_file($configfile)) {
+ $status['read_config'] = 'false';
+ echo " <font color=\"red\">ERROR</font> ";
+ }
+ else {
+ $status['read_config'] = 'true';
+ echo " <font color=\"green\">&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp&nbsp;&nbsp;</font> ";
+ }
+ ?>
+ ]
+ </td>
+</tr>
+<tr>
+ <td valign="top">
+ <?= _("Ampache.cfg.php Configured?"); ?>
+ </td>
+ <td valign="top">[
+ <?
+ $results = read_config($configfile, 0, 0);
+ if (!check_config_values($results)) {
+ $status['parse_config'] = 'false';
+ echo " <font color=\"red\">ERROR</font> ";
+ }
+ else {
+ $status['parse_config'] = 'true';
+ echo " <font color=\"green\">&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;&nbsp;</font> ";
+ }
+ ?>
+ ]
+ </td>
+</tr>
+<tr>
+ <td>&nbsp;</td>
+ <td>
+ <a href="<?php echo $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; ?>?action=show_create_config&local_db=<?php echo $_REQUEST['local_db']; ?>&local_host=<?php echo $_REQUEST['local_host']; ?>">[<?php echo _("Check for Config"); ?>]</a>
+ </td>
+</tr>
+</table>
+<br />
+<form method="post" action="<?php echo $_SERVER['PHP_SELF'] . "?action=show_create_account"; ?>" enctype="multipart/form-data">
+<input type="Submit" value="Continue to Step 3" />
+</form>
+</div>
+
+</body>
+</html>
+
diff --git a/templates/show_localplay.inc b/templates/show_localplay.inc
new file mode 100644
index 00000000..93e5be14
--- /dev/null
+++ b/templates/show_localplay.inc
@@ -0,0 +1,68 @@
+<?php
+/*
+
+ Copyright (c) 2004 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header Show localplay form
+*/
+$web_path = conf('web_path');
+?>
+ <table class="border" cellspacing="1" cellpadding="3" width="100%" border="0">
+ <tr class="table-header">
+ <td colspan="2"><?php echo _("Local Play Control"); ?></td>
+ </tr>
+ <tr class="even"><td>
+ <table border="0" cellpadding="0" cellspacing="0"><tr>
+ <td>
+ <?php echo _("Playback") . ":"; ?>
+ </td>
+ <td>
+ <form action="<?php echo $web_path; ?>/localplay.php" method="post" name="playcontrol" style="display:inline;">
+ <input type="submit" title="<?php echo _("Prev"); ?>" name="submit" value="|&lt; ">
+ <input type="submit" title="<?php echo _("Stop"); ?>" name="submit" value=" X ">
+ <input type="submit" title="<?php echo _("Play"); ?>" name="submit" value=" &gt; ">
+ <input type="submit" title="<?php echo _("Pause"); ?>" name="submit" value=" = ">
+ <input type="submit" title="<?php echo _("Next"); ?>" name="submit" value=" &gt;|">
+ </form>
+ </td>
+ </tr>
+ <tr class="even">
+ <td>
+ <?php echo _("Volume") . ":"; ?>
+ </td>
+ <td>
+ <form action="<?php echo $web_path; ?>/localplay.php" method="post" name="playcontrol" style="display:inline;">
+ <input type="submit" title="<?php echo _("Increase Volume"); ?>" name="submit" value=" +1 ">
+ <input type="submit" title="<?php echo _("Increase Volume"); ?>" name="submit" value=" +5 ">
+ <input type="submit" title="<?php echo _("Decrease Volume"); ?>" name="submit" value=" -1 ">
+ <input type="submit" title="<?php echo _("Decrease Volume"); ?>" name="submit" value=" -5 ">
+ </form>
+ </td>
+ </tr>
+ <tr class="even">
+ <td colspan="2">
+ <a href="<?php echo $web_path; ?>/localplay.php?submit=clear"><?php echo _("Clear queue"); ?></a><br />
+ <?php @system(conf('localplay_status')) ?>
+ </td></tr>
+ </table>
+ </td>
+ </tr>
+ </table>
diff --git a/templates/show_login_form.inc b/templates/show_login_form.inc
new file mode 100644
index 00000000..b1e4e9a2
--- /dev/null
+++ b/templates/show_login_form.inc
@@ -0,0 +1,83 @@
+<?php
+/*
+ Copyright (c) 2001 - 2005 Ampache.org
+ All Rights Reserved
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header Login Template
+Login Template
+
+*/
+
+$referrer = $_SERVER['HTTP_REFERER'];
+
+$subject = "/ampache.com/";
+
+if (preg_match($subject,$_SERVER['HTTP_HOST'])) {
+ $show_copyright = 1;
+}
+
+?>
+<br /><br />
+<p align="center">
+ <a href="http://www.ampache.org"><img src="<?php echo conf('web_path'); ?>
+ <?php echo conf('theme_path'); ?>/images/ampache.gif" title="<?php echo conf('site_title'); ?>" border="0" />
+ </a>
+</p>
+<form name="login" method="post" enctype="multipart/form-data" action="<?php echo conf('web_path'); ; ?>/login.php" style="Display:inline">
+<table bgcolor="<?php echo conf('base_color2'); ?>" border="0" align="center">
+ <tr>
+ <td align="center" colspan="2"><?php echo conf('login_message'); ; ?>&nbsp;</td>
+ </tr>
+ <tr>
+ <td><?php echo _("Login"); ; ?>:</td>
+ <td><input type="text" name="username" value="<?php echo $_REQUEST['username']; ; ?>" /></td>
+ </tr>
+ <tr>
+ <td><?php echo _("Password"); ; ?>:</td>
+ <td><input type="password" name="password" value="" /></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="checkbox" name="rememberme" />
+ <?php echo _("Remember Me"); ?></td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center">
+ <input class="button" type="submit" value="<?php echo _("Login"); ?>" />
+ <input type="hidden" name="referrer" value="<?php echo $referrer; ?>" />
+ <input type="hidden" name="action" value="login" />
+ </td>
+ </tr>
+</table>
+</form>
+<?php if ($show_copyright == 1) { ?>
+<p align="center">
+ <font color="red" size="+2">
+ <a href="http://www.ampache.org/donations.php">Ampache.org</a><br />
+ Ampache.com Domain Squatter<br />
+ All Rights Reserved, Copyright &copy; 2005<br />
+ </font>
+</p>
+<? } ?>
+<?php if (isset($auth['error'])) { ?>
+<p align="center">
+ <font color="red"><?php echo trim($auth['error']); ?></font>
+</p>
+<?php } ?>
diff --git a/templates/show_mpd.inc b/templates/show_mpd.inc
new file mode 100644
index 00000000..bac3b8de
--- /dev/null
+++ b/templates/show_mpd.inc
@@ -0,0 +1,97 @@
+<?php
+/*
+
+ Copyright (c) 2004 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header Show mpd form
+*/
+?>
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="0">
+<tr>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0" bgcolor="<?php conf('base_color1'); ?>" width="100%">
+ <TR><TD CLASS="content">
+State: <?php
+ switch ($myMpd->state) {
+ case MPD_STATE_PLAYING: echo "<B>Playing</B> [<A HREF='".$_SERVER[PHP_SELF]."?m=pause'>Pause</A>] [<A HREF='".$_SERVER[PHP_SELF]."?m=stop'>Stop</A>]"; break;
+ case MPD_STATE_PAUSED: echo "<B>Paused</B> [<A HREF='".$_SERVER[PHP_SELF]."?m=pause'>Unpause</A>]"; break;
+ case MPD_STATE_STOPPED: echo "<B>Idle</B> [<A HREF='".$_SERVER[PHP_SELF]."?m=play'>Play</A>]"; break;
+ default: echo "(Unknown State!)"; break;
+ } ?>
+ </TD></TR>
+ <TR><TD CLASS="content">
+ Loop: <?php
+ switch ($myMpd->repeat) {
+ case 0: echo "<B>Loop is off</B> [<A HREF='".$_SERVER[PHP_SELF]."?m=loop&val=1'>On</A>]"; break;
+ case 1: echo "<B>Loop is on</B> [<A HREF='".$_SERVER[PHP_SELF]."?m=loop&val=0'>Off</A>]"; break;
+ default: echo "(Unknown State!)"; break;
+ } ?>
+ </TD></TR>
+ <TR><TD CLASS="content">
+ &nbsp;
+ </TD></TR>
+ </TABLE>
+ </TR></TD>
+<?php if ( $myMpd->state == MPD_STATE_PLAYING or $myMpd->state == MPD_STATE_PAUSED ) { ?>
+ <TR><TD>
+ <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR="WHITE" WIDTH="100%">
+ <TR><TD CLASS="content">Now Playing: (<?php echo (round(($myMpd->current_track_position/$myMpd->current_track_length),2)*100) ?>% cmpl.)</TD></TR>
+ <TR><TD CLASS="content" ALIGN=CENTER><SPAN CLASS=SongPlaying><?php echo $myMpd->playlist[$myMpd->current_track_id]['Artist']." - ".$myMpd->playlist[$myMpd->current_track_id]['Title'] ?> </SPAN></TD></TR>
+ </TABLE>
+ </TD></TR>
+<?php } ?>
+ <TR><TD>
+ <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR="WHITE" WIDTH="100%">
+ <TR><TD CLASS="content" ALIGN=CENTER>[ <A TITLE="Refresh the Playlist Window" HREF="<?php echo $_SERVER[PHP_SELF] ?>">refresh now</A> ]</TD></TR>
+ </TABLE>
+ </TD></TR>
+</TABLE>
+<BR>
+<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=<?php echo $PG_WIDTH ?>>
+ <TR><TD ALIGN="CENTER"><B>Server Playlist</B></TD></TR>
+ <TR><TD>
+ <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR="WHITE" WIDTH="100%">
+<?php
+ $pl = $myMpd->GetPlaylist();
+ if ( is_null($pl) ) echo "ERROR: " .$myMpd->errStr."\n";
+ else {
+ foreach ($pl as $id => $entry) {
+ $tblClass = ( $id == $myMpd->current_track_id ? "SongPlaying" : "Song" );
+ echo "<TR HEIGHT=35><TD CLASS=\"content\"><SPAN CLASS=\"".$tblClass."\">";
+ echo "<A TITLE=\"Click to remove '".$entry['Title']."' from playlist\" HREF='".$_SERVER[PHP_SELF]."?m=rem&val=".$id."'>".($id+1)."</A>" . ". <A TITLE=\"Click to jump to '".$entry['Title']."' from playlist\" HREF='".$_SERVER[PHP_SELF]."?m=skipto&id=".$id."'>".$entry['Artist']." - ".$entry['Title']."</A>";
+ echo "</SPAN></TD></TR>";
+ echo "\n"; // make it perty
+ }
+ }
+ if ( $myMpd->playlist_count == 0 ) {
+ echo "<TR><TD CLASS=\"content\" ALIGN=CENTER><SPAN CLASS=\"Song\"><I>(Playlist is empty)</I></SPAN></TD></TR>";
+ }
+?>
+ </TABLE>
+ </TD></TR>
+<?php if ( $myMpd->playlist_count > 0 ) { ?>
+ <TR HEIGHT=20><TD ALIGN=CENTER>[<A TITLE="Click to shuffle (randomize) the playlist" HREF="<?php echo $_SERVER[PHP_SELF] ?>?m=shuffle">shuffle</A>] [<A TITLE="Click the clear the playlist" HREF="<?php echo $_SERVER[PHP_SELF] ?>?m=clear">clear</A>]</TD></TR>
+<?php } ?>
+</TABLE>
+</DIV>
+<!-- MPD-Class version: <?php echo $myMpd->mpd_class_version ?> -->
+</BODY></HTML>
diff --git a/templates/show_mpdplay.inc b/templates/show_mpdplay.inc
new file mode 100644
index 00000000..2825547c
--- /dev/null
+++ b/templates/show_mpdplay.inc
@@ -0,0 +1,152 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header Show mpd controls, this doesn't
+ include the playlist, status and what have you.
+ this looks a goodbit like local_play
+*/
+$web_path = conf('web_path');
+?>
+<div align="center">
+<table border="0" cellpadding="3" cellspacing="0">
+<tr class="table-header">
+ <td colspan="2"><?php echo _("MPD Play Control"); ?></td>
+</tr>
+<tr class="even"><td>
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td>
+<?php
+ ${$myMpd->state} = "style=\"background-color: black;color:white;\"";
+?>
+ <form action="<?php echo $web_path; ?>/amp-mpd.php" method="post" name="playcontrol" style="display:inline;">
+ <input class="button" type="submit" title="<?php echo _("Prev"); ?>" name="action" value="|&lt; " />
+ <input class="button" type="submit" title="<?php echo _("Stop"); ?>" name="action" value=" X " <?php echo $stop; ?> />
+ <input class="button" type="submit" title="<?php echo _("Play"); ?>" name="action" value=" &gt; " <?php echo $play; ?> />
+ <input class="button" type="submit" title="<?php echo _("Pause"); ?>" name="action" value=" = " <?php echo $paused; ?> />
+ <input class="button" type="submit" title="<?php echo _("Next"); ?>" name="action" value= " &gt;|" />
+ </form>
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("Loop"); ?>:
+ <form action="<?php echo $web_path; ?>/amp-mpd.php?action=loop" method="post" name="repeatcontrol" style="display:inline;">
+ <?php
+ $repeat_name = "repeat_" . intval($myMpd->repeat);
+ ${$repeat_name} = "style=\"background-color: black;color:white;\"";
+ ?>
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ <input class="button" type="submit" title="<?php echo _("On"); ?>" name="val" value="On" <?php echo $repeat_1; ?> />
+ <input class="button" type="submit" title="<?php echo _("Off"); ?>" name="val" value="Off" <?php echo $repeat_0; ?> />
+ </form>
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("Random"); ?>:
+ <form action="<?php echo $web_path; ?>/amp-mpd.php?action=random" method="post" name="randomcontrol" style="display:inline;">
+ <?php
+ $random_name = "random_" . intval($myMpd->random);
+ ${$random_name} = "style=\"background-color: black;color:white;\"";
+ ?>
+ <input class="button" type="submit" title="<?php echo _("On"); ?>" name="val" value="On" <?php echo $random_1; ?> />
+ <input class="button" type="submit" title="<?php echo _("Off"); ?>" name="val" value="Off" <?php echo $random_0; ?> />
+ </form>
+ </td>
+</tr>
+<tr>
+ <td class="content">
+ &nbsp;
+ </td>
+</tr>
+</table>
+</tr>
+ </td>
+<?php if ( $myMpd->state == MPD_STATE_PLAYING or $myMpd->state == MPD_STATE_PAUSED ) { ?>
+ <tr><td>
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td><?php echo _("Now Playing"); ?>: (<?php echo (round(($myMpd->current_track_position/$myMpd->current_track_length),2)*100) ?>% cmpl.)
+ </td>
+ </tr>
+ <tr>
+ <td align="center"><?php echo $myMpd->playlist[$myMpd->current_track_id]['Artist']." - ".$myMpd->playlist[$myMpd->current_track_id]['Title'] ?></td>
+ </tr>
+ </table>
+ </td></tr>
+<?php } ?>
+<tr>
+ <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>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
+<br />
+<table border="0" cellpadding="0" cellspacing="0" WIDTH=<?php echo $PG_WIDTH ?>>
+ <tr><td align="center"><b><?php echo _("Server Playlist"); ?></b></td></tr>
+ <tr><td>
+<?php
+ $pl = $myMpd->GetPlaylist();
+ if ( is_null($pl) ) echo "ERROR: " .$myMpd->errStr."\n";
+ else {
+ $maxlen = strlen(count($pl));
+ foreach ($pl as $id => $entry) {
+ $tblClass = ( $id == $myMpd->current_track_id ? "SongPlaying" : "Song" );
+ $track = $id+1;
+
+ // Make all number lengths equal
+ $len = strlen($track);
+
+ while ($len < $maxlen) {
+ $track = "0" . $track;
+ $len++;
+ }
+
+ $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 "<br />\n";
+ }
+ }
+ if ( $myMpd->playlist_count == 0 ) {
+ echo "<i>(Playlist is empty)</i><br />\n";
+ }
+?>
+ </td></tr>
+<?php if ( $myMpd->playlist_count > 0 ) { ?>
+<tr height="20">
+ <td align="center">
+ [<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>
+</tr>
+<?php } ?>
+</table>
+</div>
diff --git a/templates/show_now_playing.inc b/templates/show_now_playing.inc
new file mode 100644
index 00000000..875b1771
--- /dev/null
+++ b/templates/show_now_playing.inc
@@ -0,0 +1,65 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+/*!
+ @header Show Now Playing
+
+*/
+
+?>
+<?php if (count($results)) { ?>
+<table class="border" cellspacing="1" cellpadding="3" border="0" width="100%">
+ <tr class="table-header">
+ <td colspan="4"><?php echo _("Now Playing"); ?></td>
+ </tr>
+<?php
+ foreach($results as $item) {
+ $song = $item['song'];
+ $np_user = $item['user'];
+ if (is_object($song)) {
+ $artist = $song->f_artist;
+ $album = $song->get_album_name();
+ $text = "$song->f_title";
+ if (!$np_user->fullname) { $np_user->fullname = "Unknown User"; }
+ echo "<tr class=\"even\">\n";
+ 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>";
+ 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 . "&amp;fast=1\" alt=\"Album Art\" height=\"75\">";
+ echo "</a>\n";
+ echo "\t</td>\n";
+ echo "</tr>\n";
+ } // if album art on now playing
+ else {
+ echo "\n</tr>";
+ }
+ } // 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
new file mode 100644
index 00000000..7c3107fb
--- /dev/null
+++ b/templates/show_play_selected.inc.php
@@ -0,0 +1,65 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+?>
+<script language=javascript>
+<!--
+function ToPlaylist(action)
+{
+ document.songs.action = "<?php echo conf('web_path'); ?>/playlist.php?action=" + action;
+ document.songs.submit(); // Submit the page
+ return true;
+}
+
+function ToSong(action)
+{
+ document.songs.action = "<?php echo conf('web_path'); ?>/song.php?action=" + action;
+ document.songs.submit(); // Submit the page
+ return true;
+}
+-->
+</script>
+<table border="0" cellpadding="14" cellspacing="0" class="text-box">
+<tr align="left">
+ <td>
+ <input class="button" type="button" name="super_action" value="<?php echo _("Play Selected"); ?>" onclick="return ToSong('play_selected');" />
+<!-- <input class="button" type="button" name="super_action" value="<?php echo _("Flag Selected"); ?>" />
+ <input class="button" type="button" name="super_action" value="<?php echo _("Edit Selected"); ?>" />
+-->
+ </td>
+</tr>
+<?php if ($GLOBALS['playlist_id']) { ?>
+<tr>
+ <td>
+ <input class="button" type="button" name="super_action" value="<?php echo _("Set Track Numbers"); ?>" onclick="return ToPlaylist('set_track_numbers');" />
+ <input class="button" type="button" name="super_action" value="<?php echo _("Remove Selected Tracks"); ?>" onclick="return ToPlaylist('remove_song');" />
+ </td>
+</tr>
+<?php } ?>
+<tr align="center">
+ <td colspan="2">
+ <?php echo _("Playlist"); ?>: <input type="button" name="super_action" value="<?php echo _("Add to"); ?>" onclick="return ToPlaylist('add_to');" />
+ <?php show_playlist_dropdown($GLOBALS['playlist_id']); ?>
+ <input class="button" type="button" name="super_action" value="<?php echo _("View"); ?>" onclick="return ToPlaylist('view');" />
+ <input class="button" type="button" name="super_action" value="<?php echo _("Edit"); ?>" onclick="return ToPlaylist('edit');" />
+ </td>
+</tr>
+</table>
diff --git a/templates/show_preferences.inc b/templates/show_preferences.inc
new file mode 100644
index 00000000..35982178
--- /dev/null
+++ b/templates/show_preferences.inc
@@ -0,0 +1,92 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header Show Preferences
+ @discussion shows edit page for preferences
+
+*/
+?>
+
+<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>]
+ <? } ?>
+</div>
+<form method="post" name="preferences" action="<?php echo conf('web_path'); ?><?php echo $target; ?>" enctype="multipart/form-data">
+<table class="border" border="0" cellpadding="0" cellspacing="0">
+<tr class="table-header">
+ <th><?php echo _("Preference"); ?></th>
+ <th><?php echo _("Value"); ?></th>
+ <?php if ($user->has_access(100) AND $user_id == '0') { ?>
+ <th><?php echo _("Type"); ?></th>
+ <th><?php echo _("Apply to All"); ?></th>
+ <?php } ?>
+</tr>
+<?php
+
+ foreach ($preferences as $pref) {
+ if ($pref->type == "system") {
+ $table_break = 1;
+ }
+ if ($pref->type == "user" AND $table_break == '1') {
+ $table_break = 0;
+ ?>
+ <tr class="table-header">
+ <td colspan="4" style="background:<?php echo conf('bg_color1'); ?>;">&nbsp;</td>
+ </tr>
+ <?php
+ }
+?>
+<tr class="<?php echo flip_class(); ?>">
+ <td><?php echo _($pref->description); ?></td>
+ <td><table>
+ <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>
+ <?php } else { ?>
+ <td><table></table></td>
+ <?php } ?>
+ </tr>
+ </table>
+ </td>
+
+ <?php if ($user->has_access(100) AND $user_id == '0') { ?>
+ <td><?php echo $pref->type; ?></td>
+ <td align="center"><input type="checkbox" name="check_<?php echo $pref->name; ?>" value="1" /></td>
+ <?php } ?>
+</tr>
+<?php } ?>
+<tr class="<?php echo flip_class(); ?>">
+ <td colspan="4">
+ <input class="button" type="submit" value="<?php echo _("Update Preferences"); ?>" />
+ <input type="hidden" name="action" value="update_preferences" />
+ <input type="hidden" name="user_id" value="<?php echo $user_id; ?>" />
+ &nbsp;&nbsp;
+ <input class="button" type="submit" name="action" value="<?php echo _("Cancel"); ?>" />
+ </td>
+</tr>
+</table>
+</form>
+<br /><br />
diff --git a/templates/show_search.inc b/templates/show_search.inc
new file mode 100644
index 00000000..78433854
--- /dev/null
+++ b/templates/show_search.inc
@@ -0,0 +1,89 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+
+/*!
+ @header search template
+ @discussion This is the template for the searches... amazing!
+
+*/
+
+?>
+<form name="search" method="post" action="<?php echo conf('web_path'); ?>/search.php" enctype="multipart/form-data" style="Display:inline">
+<table class="tabledata" cellspacing="0" cellpadding="3" border="0" width="450px" style="clear:both;">
+<tr class="table-header">
+ <td colspan="2"><b><?php echo _("Search Ampache"); ?>...</b></td>
+</tr>
+<tr class="<?php echo flip_class(); ?>">
+ <td><?php echo _("Search"); ?>:</td>
+ <td><input type="text" name="search_string" value="<?php echo $_REQUEST['search_string']; ?>" /></td>
+</tr>
+<tr class="<?php echo flip_class(); ?>">
+ <td><?php echo _("Object Type"); ?>:</td>
+ <td>
+ <?php
+ $search_type = $_REQUEST['search_field'];
+ if (isset($_REQUEST['search_field'])) {
+ $search_field = $_REQUEST['search_field'];
+ ${$search_field} = 1;
+ } else {
+ $search_field = conf('search_field');
+ ${$search_field} = 1;
+ }
+
+ if (isset($_REQUEST['search_type'])) {
+ $search_type = $_REQUEST['search_type'];
+ ${$search_type} = 1;
+ } else {
+ $search_type = conf('search_type');
+ ${$search_type} = 1;
+ }
+ ?>
+ <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>
+ </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 />
+ </td>
+</tr>
+<tr class="<?php echo flip_class(); ?>">
+ <td>&nbsp;</td>
+ <td>
+ <input type="submit" value="<?php echo _("Search"); ; ?>" />&nbsp;&nbsp;
+ <input type="reset" value="Reset Form" />
+ <input type="hidden" name="action" value="search" />
+ </td>
+</tr>
+</table>
+</form>
diff --git a/templates/show_songs.inc b/templates/show_songs.inc
new file mode 100644
index 00000000..13819f3e
--- /dev/null
+++ b/templates/show_songs.inc
@@ -0,0 +1,150 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+$web_path = conf('web_path');
+?>
+
+
+<form name="songs" method="post" enctype="multipart/form-data">
+<table border="0">
+ <tr><td colspan="2">
+ <table class="border" cellspacing="0" cellpadding="0" border="0">
+ <tr class="table-header">
+ <th>&nbsp;&nbsp;<a href="#" onclick="check_songs(); return false;">Select</a></th>
+ <?php if (isset($playlist_id) && $playlist_id != 0 && ($user->id == $pluser->id || $user->has_access('100'))) { $tab = 1; ?> <th><?php echo _("Track"); ?></th> <?php } ?>
+ <th><?php echo _("Song title"); ?></th>
+ <th><?php echo _("Artist"); ?></th>
+ <th><?php echo _("Album"); ?></th>
+ <th><?php echo _("Track"); ?></td>
+ <th><?php echo _("Time"); ?></th>
+ <th><?php echo _("Size"); ?></th>
+ <th><?php echo _("Bitrate"); ?></th>
+ <th><?php echo _("Genre"); ?></th>
+ <th><?php echo _("Flag"); ?></th>
+ <th><?php echo _("Action"); ?></th>
+ </tr>
+ <?php
+ foreach ($song_ids as $song_id) {
+
+ unset($text_class);
+ $song = new Song($song_id);
+ $song->format_song();
+
+ // Still needed crap
+ $totalsize += $song->size;
+ $totaltime += $song->time;
+ if ($song->status == "disabled") { $text_class = "class=\"disabled\""; }
+ ?>
+ <tr class="<?php echo flip_class(); ?>">
+ <td align="center">
+ <input type="checkbox" name="song[]" value="<?php echo $song->id; ?>" id="song_<?php echo $song->id; ?>"></input>
+ </td>
+ <?php
+ if (isset($playlist_id) && $playlist_id != 0 && ($user->id == $pluser->id || $user->has_access('100'))) {
+ $tracknum = get_playlist_track_from_song($playlist_id, $song->id);
+ ?>
+ <td>
+ <input type="text" tabindex="<?php echo $tab; ?>" size="3" name="<?php echo "tr_" . $song->id; ?>" value="<?php echo $tracknum ?>" onchange="<?php echo "document.getElementById('song_" . $song->id . "').checked='checked';"; ?>" />
+ </td>
+ <?php
+ $tab++;
+ }
+ ?>
+ <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>
+ </td>
+ <td>
+ <a href="<?php echo $web_path; ?>/artists.php?action=show&amp;artist=<?php echo $song->artist; ?>" title="<?php echo $song->f_artist_full; ?>" <?php echo $text_class; ?>> <?php echo $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>
+ </td>
+ <td align="right">
+ <?php echo $song->track; ?>
+ </td>
+ <td align="right">
+ <?php echo $song->f_time; ?>
+ </td>
+ <td align="right" nowrap>
+ <?php echo $song->f_size; ?> MB
+ </td>
+ <td align="right">
+ <?php echo $song->f_bitrate; ?>
+ </td>
+ <td>
+ <?php echo $song->f_genre; ?>
+ </td>
+ <td <?php echo $song->f_style; ?> title="<?php echo $song->flagcomment; ?>">
+ <?php echo $song->flagtype; ?>
+ </td>
+ <td>
+ <?php if ($user->has_access('100')) { ?>
+ <a href="<?php echo $web_path; ?>/admin/song.php?action=edit&amp;song=<?php echo $song->id; ?>">Edit</a> | <a href="<?php echo $web_path; ?>/flag.php?song=<?php echo $song->id; ?>&amp;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>
+ <?php } else { ?>
+ <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; ?>&amp;action=flag">Flag</a>
+ <?php } //access ?>
+ <?php if ($user->prefs['download']) { ?>
+ | <a href="<?php echo $web_path; ?>/download/index.php?action=download&amp;song_id=<?php echo $song->id; ?>&amp;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(); ?>&amp;fn=<?php echo rawurlencode($song->f_artist_full . " - " . $song->title . "." . $song->type); ?>">
+ <?php echo _("Direct Link"); ?>
+ <?php } ?>
+ </a>
+ </td>
+ </tr>
+ <?
+ }// foreach loop
+
+ //
+ // Another here doc
+ //
+ $time = floor($totaltime/60) . ":" . sprintf("%02d", ($totaltime%60) );
+ $megs = sprintf("%.2f", ($totalsize/1048576));
+ $num = count($song_ids);
+
+ ?>
+ <tr class="table-header">
+ <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></td>
+ <td></td>
+ <td align="right" nowrap><?php echo $time; ?></td>
+ <td align="right" nowrap><?php echo $megs; ?> MB</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td colspan="2"></td>
+ </tr>
+ </table>
+</td></tr>
+</table>
+<br />
+<?php show_play_selected(); ?>
+</form>
+
diff --git a/templates/show_test.inc b/templates/show_test.inc
new file mode 100644
index 00000000..6bafa1da
--- /dev/null
+++ b/templates/show_test.inc
@@ -0,0 +1,271 @@
+<?php
+/*
+
+ this program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+$row_classes = array('even','odd');
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>Ampache -- Debug Page</title>
+</head>
+<body bgcolor="#f0f0f0">
+<h2><?php echo _("Ampache Debug"); ?></h2>
+<p><?php echo _("You've reached this page because a configuration error has occured. Debug Information below"); ?></p>
+
+<table border="0" cellpadding="3" cellspacing="0">
+<tr>
+ <td><font size="+1"><?php echo _("CHECK"); ?></font></td>
+ <td>
+ <font size="+1"><?php echo _("STATUS"); ?></font>
+ </td>
+ <td><font size="+1"><?php echo _("DESCRIPTION"); ?></font></td>
+</tr>
+<tr>
+ <td valign="top"><?php echo _("PHP Version"); ?></td>
+ <td valign="top">[
+ <?
+ if (!check_php_ver()) {
+ $status['php_ver'] = 'false';
+ echo " <font color=\"red\">ERROR</font> ";
+ }
+ else {
+ $status['php_ver'] = 'true';
+ echo " <font color=\"green\">&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;&nbsp;</font> ";
+ }
+ ?>
+ ]
+ </td>
+ <td>
+ <?php echo _("This tests to make sure that you are running a version of PHP that is known to work with Ampache."); ?>
+ </td>
+</tr>
+<tr>
+ <td valign="top"><?php echo _("Mysql for PHP"); ?></td>
+ <td valign="top">[
+ <?
+ if (!check_php_mysql()) {
+ $status['mysql_php'] = 'false';
+ echo " <font color=\"red\">ERROR</font> ";
+ }
+ else {
+ $status['mysql_php'] = 'true';
+ echo " <font color=\"green\">&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;&nbsp;</font> ";
+ }
+ ?>
+ ]
+ </td>
+ <td>
+ <?php echo _("This test checks to see if you have the mysql extensions loaded for PHP. These are required for Ampache to work."); ?>
+ </td>
+</tr>
+<tr>
+ <td valign="top"><?php echo _("PHP Session Support"); ?></td>
+ <td valign="top">[
+ <?
+ if (!check_php_session()) {
+ $status['session_php'] = 'false';
+ echo " <font color=\"red\">ERROR</font> ";
+ }
+ else {
+ $status['session_php'] = 'true';
+ echo " <font color=\"green\">&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;&nbsp;</font> ";
+ }
+ ?>
+ ]
+ </td>
+ <td>
+ <?php echo _("This test checks to make sure that you have PHP session support enabled. Sessions are required for Ampache to work."); ?>
+ </td>
+</tr>
+<tr>
+ <td valing="top"><?php echo _("PHP ICONV Support"); ?></td>
+ <td valing="top">[
+ <?
+ if (!check_php_iconv()) {
+ $status['iconv_php'] = 'false';
+ echo " <font color=\"red\">ERROR</font> ";
+ }
+ else {
+ $status['iconv_php'] = 'true';
+ echo "<font color=\"green\">&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;&nbsp;</font> ";
+ }
+ ?>]
+ </td>
+ <td>
+ <?php echo _("This test checks to make sure you have Iconv support installed. Iconv support is not required for Ampache, but it is highly recommended"); ?>
+ </td>
+</tr>
+<tr>
+ <td valign="top"><?php echo _("Ampache.cfg.php Exists"); ?></td>
+ <td valign="top">[
+ <?
+ if (!read_config_file($configfile)) {
+ $status['read_config'] = 'false';
+ echo " <font color=\"red\">ERROR</font> ";
+ }
+ else {
+ $status['read_config'] = 'true';
+ echo " <font color=\"green\">&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp&nbsp;&nbsp;</font> ";
+ }
+ ?>
+ ]
+ </td>
+ <td width="350px">
+ <?php echo _("This attempts to read /config/ampache.cfg.php If this fails either the ampache.cfg.php is not in the correct locations or
+ it is not currently readable by your webserver."); ?>
+ </td>
+</tr>
+<tr>
+ <td valign="top">
+ <?php echo _("Ampache.cfg.php Configured?"); ?>
+ </td>
+ <td valign="top">[
+ <?
+ $results = read_config($configfile, 0, 0);
+ if (!check_config_values($results)) {
+ $status['parse_config'] = 'false';
+ echo " <font color=\"red\">ERROR</font> ";
+ }
+ else {
+ $status['parse_config'] = 'true';
+ echo " <font color=\"green\">&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;&nbsp;</font> ";
+ }
+ ?>
+ ]
+ </td>
+ <td>
+ <?php echo _("This test makes sure that you have set all of the required config variables and that we are able to
+ compleatly parse your config file"); ?>
+ </td>
+</tr>
+<tr>
+ <td valign="top">
+ <?php echo _("Ampache.cfg.php Up to Date?"); ?>
+ </td>
+ <td valign="top">[
+ <?php
+ $difference = debug_compare_configs($configfile,$configfile . ".dist");
+ if (count($difference)) {
+ $status['check_config_uptodate'] = 'false';
+ echo " <font color=\"red\">ERROR</font> ";
+ }
+ else {
+ $status['check_config_uptodate'] = 'true';
+ echo " <font color=\"green\">&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;&nbsp;</font> ";
+ }
+ ?>
+ ]
+ </td>
+ <td>
+ <?php if (count($difference)) {
+ if (!count($difference['conf'])) { $difference['conf'] = array(); }
+ if (!count($difference['libglue'])) { $difference['libglue'] = array(); }
+ echo _("Ampache.cfg.php is missing the following:");
+ echo "<br />" . _("Under CONF") . "<br /><dl>\n";
+ foreach ($difference['conf'] as $key=>$value) {
+ echo "\t<dd>$key = \"$value\"</dd>\n";
+ }
+ echo "</dl>\n<br />" . _("Under LIBGLUE") . "<br /><dl>\n";
+ foreach ($difference['libglue'] as $key=>$value) {
+ echo "\t<dd>$key = \"$value\"</dd>\n";
+ }
+ echo "</dl><br />\n";
+ } else { ?>
+
+ <?php } ?>
+ </td>
+</tr>
+<tr>
+ <td valign="top"><?php echo _("DB Connection"); ?></td>
+ <td valign="top">[
+ <?
+ $db = check_database($results['libglue']['local_host'], $results['libglue']['local_username'], $results['libglue']['local_pass'],$results['libglue']['local_db']);
+ if (!$db) {
+ $status['check_db'] = 'false';
+ echo " <font color=\"red\">ERROR</font> ";
+ }
+ else {
+ $status['check_db'] = 'true';
+ echo " <font color=\"green\">&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;&nbsp;</font> ";
+ }
+ ?>
+ ]
+ </td>
+ <td>
+ <?php echo _("This attempts to connect to your database using the values from your ampache.cfg.php"); ?>
+ </td>
+</tr>
+<tr>
+ <td valign="top">DB Inserted</td>
+ <td valign="top">[
+ <?
+ $db_inserted = check_database_inserted($db,$results['libglue']['local_db']);
+ if (!$db_inserted) {
+ $status['check_db_insert'] = 'false';
+ echo " <font color=\"red\">ERROR</font> ";
+ }
+ else {
+ $status['check_db_insert'] = 'true';
+ echo " <font color=\"green\">&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;&nbsp;</font> ";
+ }
+ ?>
+ ]
+ </td>
+ <td>
+ This checks a few key tables to make sure that you have successfully inserted the ampache database and
+ that the user has access to the database
+ </td>
+</tr>
+<tr>
+
+ <td valign="top">Web Path</td>
+ <td valign="top">[
+ <?
+ /*
+ Check to see if this is Http or https
+ */
+ if ($_SERVER['HTTPS'] == 'on') {
+ $http_type = "https://";
+ }
+ else {
+ $http_type = "http://";
+ }
+ $results['conf']['web_path'] = $http_type . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $results['conf']['web_path'];
+ if ($status['parse_config']) {
+ echo "<img src=\"" . $results['conf']['web_path'] ."/images/ampache.gif\" width=\"80\" height=\"15\"/>";
+ }
+ else {
+ $status['check_webpath'] = false;
+ echo "<font color=\"red\">ERROR</font>";
+ }
+
+ ?>
+ ]
+ </td>
+ <td>
+ This test makes sure that your web_path variable is set correctly and that we are able to get to the index page. If you do not see the ampache
+ logo here then your web_path is not set correctly.
+ </td>
+</tr>
+
+</table>
+
+
+
diff --git a/templates/show_upload.inc b/templates/show_upload.inc
new file mode 100644
index 00000000..94ec45bc
--- /dev/null
+++ b/templates/show_upload.inc
@@ -0,0 +1,83 @@
+<?php
+/*
+
+ Copyright (c) 2004 Ampache.org
+ All rights reserved.
+
+ *Created by Lamar*
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+?>
+<center>
+ <h3>
+ <?php echo _("Please Ensure All Files Are Tagged Correctly"); ?>!!<br>
+ </h3>
+ <p>
+ <?php echo _("Ampache relies on id3 tags to sort data. If your file is not tagged it may be deleted."); ?>
+ </p>
+
+<form action="<?php echo conf('web_path'); ?>/upload.php?" method="post" name="upload_form" enctype="multipart/form-data" id="upload_form">
+ <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo _("max_upload_size"); ?>" />
+ <table class="tabledata" cellspacing="0" cellpadding="0" border="0" width="90%" align="center">
+ <tr align="center">
+ <td>
+ <input size=40 type="file" name="ul_path1" id="ul_path1">
+ </td>
+ </tr>
+ <tr align="center">
+ <td>
+ <input size=40 type="file" name="ul_path2" id="ul_path2">
+ </td>
+ </tr>
+ <tr align="center">
+ <td>
+ <input size=40 type="file" name="ul_path3" id="ul_path3">
+ </td>
+ </tr>
+ <tr align="center">
+ <td>
+ <input size=40 type="file" name="ul_path4" id="ul_path4">
+ </td>
+ </tr>
+ <tr align="center">
+ <td>
+ <input type="hidden" name="action" value="upload_now">
+ <input type="submit" value="<?php echo _("Upload"); ?>">
+ </td>
+ </tr>
+ </table>
+</form>
+
+<p>
+<table align="center" border = "0">
+ <tr>
+ <td>
+ Acceptable formats include:
+ <li>.mp3</li>
+ <li>.ogg</li>
+ <li>.wma</li>
+ <li>.flac</li>
+ </td>
+ </tr>
+</table>
+</p>
+<!--
+<p>
+ Minimum Accepted Bitrate is <?= $site->prefs['upload_bitrate'] ?> kbps
+</p>
+-->
+</center>
diff --git a/templates/show_user.inc.php b/templates/show_user.inc.php
new file mode 100644
index 00000000..239543a4
--- /dev/null
+++ b/templates/show_user.inc.php
@@ -0,0 +1,93 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+?>
+<br /><br />
+<div class="text-box">
+<form name="change_password" method="post" action="<?php echo conf('web_path'); ?>/user.php?action=update_user" enctype="multipart/form-data" >
+<p class="header2">Changing User Information for <?php echo $this_user->fullname; ?></p>
+<table>
+
+<tr>
+ <td>
+ <?php echo _("Name"); ?>:
+ </td>
+ <td>
+ <input type="text" name="fullname" size="30" value="<?php echo $this_user->fullname; ?>" />
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <?php echo _("E-mail"); ?>:
+ </td>
+ <td>
+ <input type="text" name="email" size="30" value="<?php echo $this_user->email; ?>" />
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("View Limit"); ?>:
+ </td>
+ <td>
+ <input type="text" name="offset_limit" size="5" value="<?php echo $this_user->offset_limit; ?>" />
+ </td>
+</tr>
+</table>
+ <input type="hidden" name="user_id" value="<?php echo $this_user->username; ?>" />
+ <input type="submit" name="action" value="<?php echo _("Update Profile"); ?>" />
+</form>
+</div>
+<br />
+<div class="text-box">
+<form name="change_password" method="post" action="<?php echo conf('web_path'); ?>/user.php?action=change_password" enctype="multipart/form-data" >
+<span class="header2">Changing User Password</span>
+<?php $GLOBALS['error']->print_error('password'); ?>
+<table border="0" cellpadding="5" cellspacing="0">
+<tr>
+ <td>
+ <?php echo _("Enter password"); ?>:
+ </td>
+ <td>
+ <input type="password" name="password" size="30" />
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("Confirm Password"); ?>:
+ </td>
+ <td>
+ <input type="password" name="confirm_password" size="30" />
+ </td>
+</tr>
+</table>
+ <input type="hidden" name="user_id" value="<?php echo $this_user->username; ?>" />
+ <input type="submit" name="action" value="<?php echo _("Change Password"); ?>" />
+</form>
+</div>
+<br />
+<div class="text-box">
+<form name="clear_statistics" method="post" action="<?php echo conf('web_path'); ?>/user.php?action=clear_stats" enctype="multipart/form-data">
+<span class="header2">Delete Your Personal Statistics</span><br />
+<input type="hidden" name="user_id" value="<?php echo $this_user->username; ?>" />
+<input type="submit" value="<?php echo _("Clear Stats"); ?>">
+</form>
+</div>
diff --git a/templates/show_user_registration.inc.php b/templates/show_user_registration.inc.php
new file mode 100644
index 00000000..e3e9f3a4
--- /dev/null
+++ b/templates/show_user_registration.inc.php
@@ -0,0 +1,73 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+?>
+
+<form name="update_user" method="post" action="<?php echo conf('web_path'); ?>/register.php" enctype="multipart/form-data">
+<table class="tabledata" cellspacing="0" cellpadding="0" border="0" width="90%">
+<tr>
+ <td>
+ <?php echo _("Username"); ?>:
+ </td>
+ <td>
+ <input type="textbox" name="username" value="<?php echo $_REQUEST['username']; ?>" />
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("Full Name"); ?>:
+ </td>
+ <td>
+ <input type="textbox" name="fullname" size="30" value="<?php echo $_REQUEST['fullname']; ?>" />
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("E-mail"); ?>:
+ </td>
+ <td>
+ <input type="textbox" name="email" size="30" value="<?php echo $_REQUEST['email']; ?>" />
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("Password"); ?> :
+ </td>
+ <td>
+ <input type="password" name="password_1" size="30" value="" />
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("Confirm Password"); ?>:
+ </td>
+ <td>
+ <input type="password" name="password_2" size="30" value="" />
+ </td>
+</tr>
+<tr>
+ <td colspan="2">
+ <input type="hidden" name="action" value="add_user" />
+ <input type="submit" value="<?php echo _("Register User"); ?>" />
+ </td>
+</tr>
+</table>
+</form>
diff --git a/templates/show_users.inc b/templates/show_users.inc
new file mode 100644
index 00000000..3822947d
--- /dev/null
+++ b/templates/show_users.inc
@@ -0,0 +1,130 @@
+<?php
+/*
+
+ Copyright (c) 2004 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+/*!
+ @header Show Users (admin section)
+
+*/
+$total_items = $view->total_items;
+$admin_menu = "admin/";
+?>
+
+
+<table class="tabledata" cellpadding="0" cellspacing="0" border="0">
+<tr class="even" align="center">
+ <td colspan="8">
+ <?php if ($view->offset_limit) { require (conf('prefix') . "/templates/list_header.inc"); } ?>
+ </td>
+</tr>
+<tr class="table-header">
+ <td align="center">
+ <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=username&amp;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']; ?>&amp;keep_view=true&amp;sort_type=fullname&amp;sort_order=0"
+ <b>(<?php echo _("Fullname"); ?>)</b>
+ </a>
+ </td>
+ <td align="center">
+ <a href="<?php echo conf('web_path'); ?>/<?php echo $_SESSION['view_script']; ?>?action=<?php echo $_REQUEST['action']; ?>&amp;keep_view=true&amp;sort_type=last_seen&amp;sort_order=0">
+ <b><?php echo _("Last Seen"); ?></b>
+ </a>
+ </td>
+ <td align="center">
+ <b><?php echo _("Edit"); ?></b>
+ </td>
+ <td align="center">
+ <b><?php echo _("Prefs"); ?></b>
+ </td>
+ <td align="center">
+ <b><?php echo _("Delete"); ?></b>
+ </td>
+ <td align="center">
+ <b><?php echo _("Set Access"); ?></b>
+ </td>
+ <td align="center">
+ <b><?php echo _("Disable"); ?></b>
+ </td>
+ <td align="center">
+ <b><?php echo _("On-line"); ?></b>
+ </td>
+</tr>
+<?php
+
+while ( $results = mysql_fetch_object($db_result) ) {
+ $user = new User($results->username);
+ $last_seen = date("m\/d\/Y - H:i",$user->last_seen);
+ if (!$user->last_seen) { $last_seen = "Never"; }
+
+?>
+<tr class="even">
+ <td>
+ <a href="<?php echo conf('web_path'); ?>/admin/users.php?action=edit&amp;user=<?php echo $user->username; ?>">
+ <?php echo $user->fullname; ?> (<?php echo $user->username; ?>)
+ </a>
+ </td>
+ <td align="center">
+ <?php echo $last_seen; ?>
+ </td>
+ <td>
+ <a href="<?php echo conf('web_path'); ?>/admin/users.php?action=edit&amp;user=<?php echo $user->username; ?>">
+ <?php echo _("edit"); ?>
+ </a>
+ </td>
+ <td>
+ <a href="<?php echo conf('web_path'); ?>/admin/preferences.php?action=user&amp;user_id=<?php echo $user->id; ?>">
+ <?php echo _("prefs"); ?>
+ </a>
+ </td>
+ <td>
+ <a href="<?php echo conf('web_path'); ?>/admin/users.php?action=delete&amp;user=<?php echo $user->username; ?>">
+ <?php echo _("delete"); ?>
+ </a>
+ </td>
+ <?php
+ //FIXME: Fix this for the extra permission levels
+ if ($user->access == 'admin') {
+ echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=user\">" . _("set to user") . "</a></td>";
+ echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=disabled\">" . _("disable") . "</a></td>";
+ }
+ elseif ($user->access == 'user') {
+ echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=admin\">" . _("set to admin") . "</a></td>";
+ echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=disabled\">" . _("disable") . "</a></td>";
+ }
+ elseif ($user->access == 'disabled') {
+ echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&user=$user->username&amp;level=admin\">" . _("set to admin") . "</a></td>";
+ echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=user\">" . _("set to user") . "</a></td>";
+ }
+ elseif ($user->access == '1') {
+ echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&user=$user->username&amp;level=user\">" . _("set to user") . "</a></td>";
+ echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=disabled\">" . _("disable") ."</a></td>";
+ }
+ if ( $user->is_logged_in() and $user->is_online() ) {
+ echo "<td bgcolor=\"green\"> &nbsp; </td>";
+ }
+ else {
+ echo "<td bgcolor=\"red\"> &nbsp; </td>";
+ }
+} // end while
+?>
+ </td>
+</tr>
+</table>
diff --git a/templates/song_edit.inc b/templates/song_edit.inc
new file mode 100644
index 00000000..c4eab4a7
--- /dev/null
+++ b/templates/song_edit.inc
@@ -0,0 +1,86 @@
+<?php
+/*
+
+ Copyright (c) 2004 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+preg_match("/^.*\/(.*?)$/",$song->file, $short);
+$filename = htmlspecialchars($short[1]);
+$target = conf('web_path').'/admin/flags.php';
+?>
+
+<form name="update_song" method="post" action="<?= $target; ?>">
+<table class="tabledata" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td>File:</td>
+ <td colspan="2"><?= $filename; ?></td>
+ </tr>
+ <tr>
+ <td>Title:</td>
+ <td><input type="text" name="title" size="60" value="<?= $song->title; ?>"></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>
+ </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>
+ </tr>
+ <tr>
+ <td>Track:</td>
+ <td><input type="text" size="4" maxlength="4" name="track" value="<?=$song->track?>"></input></td>
+ </tr>
+ <tr>
+ <td>Genre:</td>
+ <td>
+<?php show_genre_pulldown($song->genre, 1); ?>
+ <tr>
+ <td>Year</td>
+ <td><input type="text" size="4" maxlength="4" name="year" value="<?=$song->year?>"></input></td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="checkbox" name="update_id3" value="yes" checked="checked">&nbsp;Update id3 tags</input></td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td> &nbsp; </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?>">
+
+<?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="Clear Edit List"></input></td>
+<?php } else { ?>
+ <input type=submit name="action" value="Done"> </td>
+<?php } ?>
+ </tr>
+</table>
+</form>
+
diff --git a/templates/style.inc b/templates/style.inc
new file mode 100644
index 00000000..e6810f0e
--- /dev/null
+++ b/templates/style.inc
@@ -0,0 +1,256 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header Style File
+ @discussion this is the css that is included on every page of
+ ampache, mod this to change the look and feel of the site
+*/
+?>
+<style type="text/css">
+<!--
+ body
+ {
+ padding-top: 5px;
+ background: <?php echo conf('bg_color1'); ?>;
+ font-family: <?php echo conf('font') ?>;
+ font-size: <?php echo conf('font_size'); ?>px;
+ color: <?php echo conf('font_color2'); ?>;
+ }
+
+ p
+ {
+ color: <?php echo conf('font_color2'); ?>;
+ font-family: <?php echo conf('font')?>;
+ font-size: <?php echo conf('font_size'); ?>px;
+ }
+ a
+ {
+ color: <?php echo conf('font_color2') ?>;
+ font-family: <?php echo conf('font')?>;
+ }
+ a:visited
+ {
+ color: <?php echo conf('font_color2') ?>;
+ font-family: <?php echo conf('font')?>;
+ }
+ a:active
+ {
+ color: <?php echo conf('font_color2') ?>;
+ font-family: <?php echo conf('font')?>;
+ }
+ .text-box
+ {
+ padding-left:5px;
+ padding-top:5px;
+ margin-bottom:10px;
+ background-color: <?php echo conf('base_color1'); ?>;
+ border-right:2px solid <?php echo conf('bg_color2'); ?>;
+ border-bottom:2px solid <?php echo conf('bg_color2'); ?>;
+ border-left:2px solid <?php echo conf('bg_color2'); ?>;
+ border-top:2px solid <?php echo conf('bg_color2'); ?>;
+ }
+ table.tabledata
+ {
+ }
+
+ td
+ {
+ padding: 0px 8px 0px 8px;
+ color: <?php echo conf('font_color2') ?>;
+ font-family: <?php echo conf('font')?>;
+ font-size: <?php echo conf('font_size'); ?>px;
+ }
+ th
+ {
+ padding-right: 10px;
+ }
+ input
+ {
+ color: <?php echo conf('font_color2'); ?>;
+ font-family: <?php echo conf('font'); ?>;
+ font-size: <?php echo conf('font_size'); ?>px;
+ font-weight: bold;
+ background-color: <?php echo conf('base_color2') ?>;
+ margin: 2px 2px 2px 2px;
+ }
+ select {
+ color: <?php echo conf('font_color2'); ?>;
+ font-family: <?php echo conf('font')?>;
+ font-size: <?php echo conf('font_size'); ?>px;
+ background-color: <?php echo conf('base_color2'); ?>;
+ }
+ textarea
+ {
+ background-color: <?php echo conf('base_color2'); ?>;
+ color: <?php echo conf('font_color2') ?>;
+ font-family: <?php echo conf('font')?>;
+ font-size: <?php echo conf('font_size'); ?>px;
+ }
+ .table-header
+ {
+ background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-light-bg.gif) <?php echo conf('base_color2')?> repeat-x;
+ vertical-align: top;
+ }
+/*************** Main Menu *****************/
+ #mainmenu {
+ float: left;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ border-top: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-right: 1px solid #000;
+ border-left: 1px solid #000;
+ background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-light-bg.gif) <?php echo conf('base_color2');?> repeat-x;
+ }
+ #mainmenu li {
+ float: left;
+ margin: 0;
+ padding: 0 10px 0 10px;
+ border-right: 1px solid #000;
+ display: inline;
+ background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-light-bg.gif) <?php echo conf('base_color2');?> repeat-x;
+ }
+ #mainmenu li.active {
+ background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-dark-bg.gif) <?php echo conf('base_color2');?> repeat-x;
+ }
+ #mainmenu a {
+ text-decoration: none;
+ }
+ #mainmenu a:hover {
+ color: #000;
+ }
+ #mainmenu a:active {
+ color: #00a;
+ }
+/*************** END Main Menu *************/
+/*************** Admin Menu *************/
+ #adminmenu {
+ float: left;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ border-bottom: 1px solid #000;
+ border-right: 1px solid #000;
+ border-left: 1px solid #000;
+ border-top: 1px solid #000;
+ background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-light-bg.gif) <?php echo conf('base_color2')?> repeat;
+ }
+ #adminmenu li {
+ float: left;
+ margin: 0;
+ padding: 0 20px 0 20px;
+ border-right: 1px solid #000;
+ display: inline;
+ background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-light-bg.gif) <?php echo conf('base_color2');?> repeat-x;
+ }
+ #adminmenu li.active {
+ background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-dark-bg.gif) <?php echo conf('base_color2');?> repeat-x;
+ }
+ #adminmenu a {
+ text-decoration: none;
+ }
+ #adminmenu a:hover {
+ color: #000;
+ }
+ #adminmenu a:active {
+ color: #000;
+ }
+/*************** END Main Menu *************/
+/*************** Page Header *********************/
+ #pageheader {
+ background: <?php echo conf('bg_color1');?>;
+ }
+/*************** END Page Header *****************/
+ .header1
+ {
+ color: <?php echo conf('font_color2'); ?>;
+ font-family: <?php echo conf('font'); ?>;
+ font-size: <?php echo conf('font_size') + 6; ?>px;
+ font-weight: 900;
+ }
+ .header2
+ {
+ color: <?php echo conf('font_color2'); ?>;
+ font-family: <?php echo conf('font'); ?>;
+ font-size: <?php echo conf('font_size') + 2; ?>px;
+ font-weight: 900;
+ }
+ .headrow
+ {
+ background:<?php echo conf('row_color1'); ?>;
+ font-size: <?php echo conf('font_size'); ?>px;
+ }
+ .odd
+ {
+ background:<?php echo conf('row_color2'); ?>;
+ font-size: <?php echo conf('font_size'); ?>px;
+ }
+ .even
+ {
+ background:<?php echo conf('row_color3'); ?>;
+ font-size: <?php echo conf('font_size'); ?>px;
+ }
+ .blank
+ {
+ background: #fff;
+ }
+ .border
+ {
+ background:<?php echo conf('bg_color2'); ?>;
+ }
+ .header
+ {
+ font-size: <?php echo conf('font_size'); ?>px;
+ }
+ .error
+ {
+ color: <?php echo conf('error_color'); ?>;
+ }
+ .fatalerror
+ {
+ padding-top: 3px;
+ padding-bottom: 3px;
+ color: <?php echo conf('error_color'); ?>;
+ border-right:4px solid <?php echo conf('error_color'); ?>;
+ border-bottom:4px solid <?php echo conf('error_color'); ?>;
+ border-left:4px solid <?php echo conf('error_color'); ?>;
+ border-top:4px solid <?php echo conf('error_color'); ?>;
+ font-size: <?php echo conf('font_size')+2; ?>px;
+ font-weight: 900;
+ text-align: center;
+ }
+ .disabled
+ {
+ text-decoration: line-through;
+ }
+ .alphabet
+ {
+ font-size: <?php echo conf('font_size'); ?>px;
+ font-weight: normal;
+ }
+-->
+</style>
+
diff --git a/templates/tool_box.inc b/templates/tool_box.inc
new file mode 100644
index 00000000..a81e6b15
--- /dev/null
+++ b/templates/tool_box.inc
@@ -0,0 +1,43 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+/*!
+ @header
+ A template file
+
+*/
+
+?>
+
+<table class="border" cellspacing=1 cellpadding=3>
+ <tr class="table-header" align=center>
+ <td><?php echo $title; ?></td>
+ </tr>
+ <tr>
+ <td class="even">
+ <?
+ foreach (array_keys($items) as $item) {
+ print("\t\t\t>> <a href=\"$items[$item]\"> $item</a><br />\n");
+ }
+ ?>
+ </td>
+ </tr>
+</table>
diff --git a/templates/userform.inc b/templates/userform.inc
new file mode 100644
index 00000000..3e487355
--- /dev/null
+++ b/templates/userform.inc
@@ -0,0 +1,108 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2005 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+if ($type === 'new_user') {
+ $userfield = "<input type=\"text\" name=\"new_username\" size=\"30\" value=\"$username\" />";
+ $title = _("Adding a New User");
+}
+else {
+ $userfield = "$username";
+ $title = _("Editing existing User");
+}
+?>
+
+<br />
+<div class="header2"><?php echo $title; ?></div>
+<?php $GLOBALS['error']->print_error('general'); ?>
+<form name="update_user" method="post" action="<?php echo conf('web_path') . "/admin/users.php"; ?>">
+<table class="text-box" cellspacing="0" cellpadding="0" border="0">
+
+<tr>
+ <td>
+ <?php echo _("Username"); ; ?>:
+ </td>
+ <td>
+ <?php echo $userfield; ?>
+ <?php $GLOBALS['error']->print_error('username'); ?>
+ </td>
+</tr>
+<tr>
+ <td><?php echo _("Full Name"); ; ?>:</td>
+ <td>
+ <input type="text" name="new_fullname" size="30" value="<?php echo $fullname; ?>" />
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("E-mail"); ?>:
+ </td>
+ <td>
+ <input type="text" name="new_email" size="30" value="<?php echo $email; ?>" />
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("Password"); ?> :
+ </td>
+ <td>
+ <input type="password" name="new_password_1" size="30" value="" />
+ <?php $GLOBALS['error']->print_error('password'); ?>
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("Confirm Password"); ?>:
+ </td>
+ <td>
+ <input type="password" name="new_password_2" size="30" value="" />
+ </td>
+</tr>
+<tr>
+ <td>
+ <?php echo _("User Access Level"); ; ?>:
+ </td>
+ <td>
+ <select name="user_access">
+ <option value="1" <?php if($access==='1') echo "selected=\"selected\""; ?>>Guest</option>
+ <option value="user" <?php if($access==='user') echo "selected=\"selected\""; ?>>User</option>
+ <option value="admin" <?php if($access==='admin') echo "selected=\"selected\""; ?>>Admin</option>
+ <option value="disabled" <?php if($access==='diabled') echo "selected=\"selected\""; ?>>Disabled</option>
+ </select>
+ </td>
+</tr>
+</table>
+<?php
+
+ if ( $type == 'new_user' )
+ {
+ echo "<input type=\"hidden\" name=\"action\" value=\"add_user\" />";
+ echo "<input type=\"submit\" value=\"" . _("Add User") . "\" />";
+ }
+ else
+ {
+ echo "<input type=\"hidden\" name=\"action\" value=\"update_user\" />\n";
+ echo "<input type=\"submit\" value=\"" . _("Update User") . "\" />\n";
+ echo "<input type=\"hidden\" name=\"new_username\" value=\"$username\" />";
+ }
+
+?>
+</form>