Location: PHPKode > projects > Brunhilde Media Server > brunhilde/sample.php
<?php

### sample.php ###
// previews the theme's settings on a generic page
// nothing should need to be changed on this script if you follow
// the pattern on the default them when building this theme

// sets encoded and decoded variables for the rest of the script
$theme = stripslashes(rawurldecode($theme));
$theme_url = rawurlencode($theme);

// quick script to make this page point to itself
$this = "sample.php?theme=$theme_url";

include("global.php");
include("$THEME_DIR$theme/theme.php");

echo "

<head>
<SCRIPT Language=Javascript>
  function SelectAll() {
    for(var i=0;i<document.songs.elements.length;i++) {
      if(document.songs.elements[i].type == \"checkbox\") {
        if(document.songs.elements[i].name != \"add\" && 
           document.songs.elements[i].name != \"shuffle\") {
          document.songs.elements[i].checked = true;
        }
      }
    }
  }
</SCRIPT>
<SCRIPT Language=Javascript>
  function DeselectAll() {
    for(var i=0;i<document.songs.elements.length;i++) {
      if(document.songs.elements[i].type == \"checkbox\") {
        if(document.songs.elements[i].name != \"add\" && 
           document.songs.elements[i].name != \"shuffle\") {
          document.songs.elements[i].checked = false;
        }
      }
    }
  }
</SCRIPT>
<title>Brunhilde Theme Preview</title>
</head>
<body $BACKGROUND $TEXT><font size=2 face=helvettica,arial><link rel=\"stylesheet\" href=$STYLESHEET>
 <TABLE border=0 width=100% $BACKGROUND>
  <TBODY>
  <TR>
   <TD width=20% valign=bottom align=left><a href=themes.php><B>Back&nbsp;To&nbsp;Themes</B></a>&nbsp;
   </TD>
   <TD width=60% align=center>
    <a href=http://www.coreyo.net/projects/brunhilde/index.php><img src=$LOGO border=0></a>
   </TD>
   <TD width=20% valign=bottom align=right>
<a href=set_theme.php?theme=$theme_url><B>Select&nbsp;This&nbsp;Theme</B></a>
   </TD>
  </TR>
  </TBODY>
 </TABLE>
 <!-- Begin Playlist Table -->
 <TABLE border=0 cellpadding=0 cellspacing=2 width=100% $BORDER>
  <TBODY>
  <TR>
   <TD>
    <TABLE border=0 cellpadding=1 cellspacing=1 width=100% $BODY>
     <TBODY>
     <TR $TITLE>
      <TD align=center>
       <B>Playlists:</B>
      </TD>
     </TR>
     <TR>
      <TD>
       <TABLE border=0 width=100% cellpadding=0 cellspacing=0>
        <TBODY>
        <TR>
         <TD width=1%><a href=$this>
	  <img src=$EDIT_ICON alt=\"Edit Playlist\"></a>&nbsp;
	 </TD>
	 <TD width=99%>
	  <a href=$this>My Favorite Ditties</a><br>
	 </TD>
	</TR>
        </TBODY>
       </TABLE>
      </TD>
     </TR>
     </TBODY>
    </TABLE>
   </TD>
  </TR>
  </TBODY>
 </TABLE>
 <BR>
<!-- End Playlist Table -->

<!-- Subdirectories Table -->
 <TABLE border=0 cellpadding=0 cellspacing=2 width=100% $BORDER>
  <TBODY
  <TR>
   <TD>
    <TABLE border=0 cellpadding=1 cellspacing=1 width=100% $BODY>
    <TBODY>
    <TR $TITLE>
     <TD align=center>
      <B>Subdirectories:</B>
     </TD>
    </TR>
    <TR>
     <TD>
      <!-- Begin Subdirectory Entries -->
      <TABLE border=0 cellspacing=0 cellpadding=0 width=100%>
       <TBODY>
       <TR>
        <TD width=1%>
	 <a href=$this><img src=$SUBDIR_ICON border=0></a>&nbsp;
	</TD>
	<TD width=99%><a href=/brunhilde/$this>Artist Formerly Known as Bob, The/</a>
	</TD>
       </TR>
       </TBODY>
      </TABLE>
      <TABLE border=0 cellspacing=0 cellpadding=0 width=100%>
       <TBODY>
       <TR>
        <TD width=1%>
	 <a href=$this><img src=$SUBDIR_ICON border=0></a>&nbsp;
	</TD>
	<TD width=99%><a href=/brunhilde/$this>Tony and the Flatulates/</a>
	</TD>
       </TR>
       </TBODY>
      </TABLE>
      <TABLE border=0 cellspacing=0 cellpadding=0 width=100%>
       <TBODY>
       <TR>
        <TD width=1%>
	 <a href=$this><img src=$SUBDIR_ICON border=0></a>&nbsp;
	</TD>
	<TD width=99%><a href=/brunhilde/$this>Rappa G/</a>
	</TD>
       </TR>
       </TBODY>
      </TABLE>
      <TABLE border=0 cellspacing=0 cellpadding=0 width=100%>
       <TBODY>
       <TR>
        <TD width=1%>
	 <a href=$this><img src=$SUBDIR_ICON border=0></a>&nbsp;
	</TD>
	<TD width=99%><a href=/brunhilde/$this>DJ Vacuum Cleaner/</a>
	</TD>
       </TR>
       </TBODY>
      </TABLE>
     <!-- End Subdirectory Entries -->

     </TD>
    </TR>
   </TABLE>
  </TD>
 </TR>
 </TBODY>
</TABLE>
<BR>
<!-- End Subdirectories Table -->

<form name=songs method=post action=$this>

<!-- Begin Songs Table -->
<TABLE border=0 cellpadding=0 cellspacing=2 width=100% $BORDER>
 <TBODY>
 <TR>
  <TD>
   <TABLE border=0 cellpadding=1 cellspacing=1 width=100% $BODY>
    <TBODY>
    <TR $TITLE>
     <TD align=center>
      <B>Songs:</B>
     </TD>
    </TR>
    <TR>
     <TD>
      <Table border=0 width=100% cellpadding=1 cellspacing=1>
       <TBODY>

       <!-- Begin Songs Posts -->

       <TR valign=center>
        <TD width=1% valign=top>
	 <input type=checkbox name=selected[] value=0>&nbsp;
	</TD>
	<TD width=1% align=right>
	 &nbsp;1.&nbsp;
	</TD>
	<TD width=1%>
	 <a href=$this><img src=$ID3_ICON alt=\"View File Info\" align=top></a>&nbsp;
	</TD>
	<TD width=97%>
	 <a href=$this>Pacific Islander - Ode to Walls.mp3</a>&nbsp;&nbsp;&nbsp;<a href=$this><img src=$DOWNLOAD_ICON></a>
	</TD>
	 </input>
       </TR>
<TR valign=center>
        <TD width=1% valign=top>
	 <input type=checkbox name=selected[] value=0>&nbsp;
	</TD>
	<TD width=1% align=right>
	 &nbsp;2.&nbsp;
	</TD>
	<TD width=1%>
	 <a href=$this><img src=$ID3_ICON alt=\"View File Info\" align=top></a>&nbsp;
	</TD>
	<TD width=97%>
	 <a href=$this>BoyZ, The - Witty Album.mp3</a>&nbsp;&nbsp;&nbsp;<a href=$this><img src=$DOWNLOAD_ICON></a>
	</TD>
	 </input>
       </TR>
       
       <TR valign=center>
        <TD width=1% valign=top>
	 <input type=checkbox name=selected[] value=0>&nbsp;
	</TD>
	<TD width=1% align=right>
	 &nbsp;3.&nbsp;
	</TD>
	<TD width=1%>
	 <a href=$this><img src=$ID3_ICON alt=\"View File Info\" align=top></a>&nbsp;
	</TD>
	<TD width=97%>
	 <a href=$this>Cammy_O - The Bucket Dropping Song.mp3</a>&nbsp;&nbsp;&nbsp;<a href=$this><img src=$DOWNLOAD_ICON></a>
	</TD>
	 </input>
       </TR>
       
       <TR valign=center>
        <TD width=1% valign=top>
	 <input type=checkbox name=selected[] value=0>&nbsp;
	</TD>
	<TD width=1% align=right>
	 &nbsp;4.&nbsp;
	</TD>
	<TD width=1%>
	 <a href=$this><img src=$ID3_ICON alt=\"View File Info\" align=top></a>&nbsp;
	</TD>
	<TD width=97%>
	 <a href=$this>Sweet Baby Ray - BURF.mp3</a>&nbsp;&nbsp;&nbsp;<a href=$this><img src=$DOWNLOAD_ICON></a>
	</TD>
	 </input>
       </TR>
       
       <TR valign=center>
        <TD width=1% valign=top>
	 <input type=checkbox name=selected[] value=0>&nbsp;
	</TD>
	<TD width=1% align=right>
	 &nbsp;5.&nbsp;
	</TD>
	<TD width=1%>
	 <a href=$this><img src=$ID3_ICON alt=\"View File Info\" align=top></a>&nbsp;
	</TD>
	<TD width=97%>
	 <a href=$this>Rabbi Tucker - Jews and Jello.mp3</a>&nbsp;&nbsp;&nbsp;<a href=$this><img src=$DOWNLOAD_ICON></a>
	</TD>
	 </input>
       </TR>
      <!-- End Song Posts -->

       
       </TBODY>
      </TABLE>
     </TD>
    </TR>
    </TBODY>
   </TABLE>
  </TD>
 </TR>
</TABLE>
<!-- End of Song Table -->

<input type=button value=\"Select All\" onclick=SelectAll();>&nbsp;<input type=button value=\"Deselect All\" onclick=DeselectAll();><br></p>

<!-- Recursive Functions -->
<TABLE>
 <TBODY>
 <TR>
  <TD width=1% align=left>
   <a href=$this>Play&nbsp;All&nbsp;Songs&nbsp;Recursively&nbsp;&nbsp;</a>
  </TD>
  <TD width=1% align=left>
   <a href=$this>Shuffle&nbsp;All&nbsp;Songs&nbsp;Recursively&nbsp;&nbsp;</a>
  </TD>
  <TD width=1% align=left>
   <a href=$this>Add&nbsp;All&nbsp;Songs&nbsp;To&nbsp;Playlist&nbsp;Recursively</a>
  </TD>
 </TR>
 </TBODY>
</TABLE>
<!-- End Recursive Functions -->
<br>

<input type=checkbox name=shuffle>&nbsp;Shuffle
<br>
<br>
<input type=checkbox name=add>&nbsp;Add&nbsp;To&nbsp;Playlist
<select name=pladd>
	<option value=new>New</option>
	<option value=blah>My Favorite Ditties</option>
</select>
<br>
<br>
<input type=submit value=\"Submit List\"><br>
</form>

<TABLE width=100% border=0><tr><td width=30% align=left valign=bottom>
 <TBODY>
  <TR>
   <TD>
    <!-- link to go back to the themes page -->
    <a href=themes.php><font size=3><B>Back&nbsp;To&nbsp;Themes</B></font</a>
  
  </TD>
  <TD align=center valign=bottom width=40%>
   <a href=$this><font size=3><B>help</B></font></a>
  </TD>
  <TD align=right valign=bottom width=30%>
   <a href=set_theme.php?theme=$theme_url><B>Select&nbsp;This&nbsp;Theme</B></a>
  </TD>
 </TR>
 </TBODY>
</TABLE>
 <br>&nbsp;<br>
</body></html>

";

?>
Return current item: Brunhilde Media Server