diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-12-27 00:18:59 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-12-27 00:18:59 +0000 |
commit | 6b0b77f12b6873204bfd73a250621115b1f539a0 (patch) | |
tree | 36aa24da3e984a3b38e0f1f11fc4a8a2ffdd1973 /templates | |
parent | 380a8615ae97295f650699e8ecdf478e54f75d74 (diff) | |
download | ampache-6b0b77f12b6873204bfd73a250621115b1f539a0.tar.gz ampache-6b0b77f12b6873204bfd73a250621115b1f539a0.tar.bz2 ampache-6b0b77f12b6873204bfd73a250621115b1f539a0.zip |
new coolness from sigger
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_login_form.inc | 7 | ||||
-rw-r--r-- | templates/show_songs.inc | 1 | ||||
-rw-r--r-- | templates/show_user_registration.inc.php | 191 | ||||
-rw-r--r-- | templates/sidebar.inc.php | 72 | ||||
-rw-r--r-- | templates/style.inc | 239 |
5 files changed, 274 insertions, 236 deletions
diff --git a/templates/show_login_form.inc b/templates/show_login_form.inc index 09612512..119110a0 100644 --- a/templates/show_login_form.inc +++ b/templates/show_login_form.inc @@ -65,6 +65,13 @@ if (preg_match($subject,$_SERVER['HTTP_HOST'])) { <input type="hidden" name="action" value="login" /> </td> </tr> + <?php if(conf('allow_public_registration')==true){ ?> + <tr> + <td colspan=3 height=25 align=center> + <a href='register.php'>Register</a><br> + </td> + </tr> + <?php } ?> </table> </form> <p align="center"> diff --git a/templates/show_songs.inc b/templates/show_songs.inc index 5dd22f10..e3d1cae5 100644 --- a/templates/show_songs.inc +++ b/templates/show_songs.inc @@ -65,7 +65,6 @@ $username=$GLOBALS['user']->username; $totalsize += $song->size; $totaltime += $song->time; if ($song->status == "disabled") { $text_class = "class=\"disabled\""; } - include("get_song_ratings.inc"); ?> <tr class="<?php echo flip_class(); ?>"> <td align="center"> diff --git a/templates/show_user_registration.inc.php b/templates/show_user_registration.inc.php index e3e9f3a4..1f4bb6a5 100644 --- a/templates/show_user_registration.inc.php +++ b/templates/show_user_registration.inc.php @@ -21,53 +21,144 @@ */ ?> -<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> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" 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'); ?> - <?php echo $location['title']; ?></title> +</head> +<body> +<script src="<?php echo conf('web_path'); ?>/lib/general.js" language="javascript" type="text/javascript"></script> + +<div id="maincontainer"> +<!-- This is the topbar row --> +<div id="topbar"> + <div id="topbarleft"> + <a href="http://www.ampache.org"> + <img class="pageheader" 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> +</div> +<br><br> +<?php + +$action = scrub_in($_REQUEST['action']); +$fullname = scrub_in($_REQUEST['full_name']); +$username = scrub_in($_REQUEST['username']); +$password = scrub_in($_REQUEST['password']); +echo "$password"; + +?> + +<div align="center"> + <table class="border" width=600 cellpadding=0 cellspacing=0 border=0> + <tr class="table-header"> + <td> + <font size="2"><b><u>Ampache New User Registration</u></b></font> + </td> + </tr> + <form name="update_user" method="post" action="<?php echo conf('web_path'); ?>/register.php" enctype="multipart/form-data"> + <?php + // USER AGREEMENT + if(conf('user_agreement')==true){ ?> + <tr> + <td height=15 bgcolor="<?php print conf('base_color2'); ?>"> + </td> + </tr> + <tr> + <td bgcolor="<?php print conf('base_color2'); ?>" align=center valign=top> + <table width=100% border=0 cellpadding=0 cellspacing=0> + <tr class="table-header"> + <td align=center> + <font size="1"><b><u>User Agreement</u></b></font> + </td> + </tr> + <tr> + <td> + <?php include("templates/user_agreement.php"); ?> + </td> + </tr> + <tr> + <td align=center height=35 valign=center> + <input type='checkbox' name='accept_agreement'> I Accept + </td> + </tr> + </table> + </td> + </tr> + <? } ?> + <tr> + <td height=15 bgcolor="<?php print conf('base_color2'); ?>"> + </td> + </tr> + <tr> + <td bgcolor="<?php print conf('base_color2'); ?>" align=center valign=top> + <table width=100% cellpadding=0 cellspacing=0 border=0> + <tr class="table-header"> + <td align=center> + <font size="1"><b><u>User Information</u></b></font> + </td> + </tr> + </table> + <br> + <table width=60% cellpadding=0 cellspacing=0 border=0> + <tr> + <td align=right> + <?php echo _("Username"); ?>: + </td> + <td> + <font color=red>*</font> <input type='text' name='username' id='username'> + </td> + </tr> + <tr> + <td align=right> + <?php echo _("Full Name"); ?>: + </td> + <td> + <font color=red>*</font> <input type='text' name='fullname' id='fullname'> + </td> + </tr> + <tr> + <td align=right> + <?php echo _("E-mail"); ?>: + </td> + <td> + <font color=red>*</font> <input type='text' name='email' id='email'> + </td> + </tr> + <tr> + <td align=right> + <?php echo _("Password"); ?>: + </td> + <td> + <font color=red>*</font> <input type='password' name='password_1' id='password_1'> + </td> + </tr> + <tr> + <td align=right> + <?php echo _("Confirm Password"); ?>: + </td> + <td> + <font color=red>*</font> <input type='password' name='password_2' id='password_2'> + </td> + </tr> + <tr> + <td colspan=2 align=center height=20> + <font color=red>*</font>Required fields + </td> + </tr> + <tr> + <td colspan=2 align=center height=50> + <input type="hidden" name="action" value="add_user" /> + <input type='reset' name='clear_info' id='clear_info' value='Clear Info'> + <input type='submit' name='submit_registration' id='submit_registration' value='<?php echo _("Register User"); ?>'> + </td> + </tr> + </form> + </table> + </td> + </tr> + </table> +</div> diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php index 60ac95a9..79a62283 100644 --- a/templates/sidebar.inc.php +++ b/templates/sidebar.inc.php @@ -35,10 +35,11 @@ $admin_items[] = array('title'=>'Access List','url'=>'admin/access.php','active' $browse_items[] = array('title'=>'Albums','url'=>'albums.php','active'=>''); $browse_items[] = array('title'=>'Artists','url'=>'artists.php','active'=>''); $browse_items[] = array('title'=>'Genre','url'=>'browse.php?action=genre','active'=>''); +$browse_items[] = array('title'=>'Lists','url'=>'browse.php','active'=>''); //$browse_items[] = array('title'=>'File','url'=>'files.php','active'=>''); ?> -<div id="navcontainer"> +<!-- <div id="navcontainer"> --> <!--sigger: appears this div is not neccesary and duplicates #sidebar --> <ul id="navlist"> <li id="active"> <a href="<?php echo conf('web_path'); ?>/index.php" id="current"><?php echo _("Home"); ?></a> @@ -46,15 +47,17 @@ $browse_items[] = array('title'=>'Genre','url'=>'browse.php?action=genre','activ <?php if ($GLOBALS['user']->has_access(100)) { ?> <li> <a href="<?php echo conf('web_path'); ?>/admin/index.php"><?php echo _("Admin"); ?></a> - <?php - if ($location['section'] == 'admin') { - if ($GLOBALS['theme']['orientation'] == 'vertical') { echo "\t</li>"; } - show_submenu($admin_items); - if ($GLOBALS['theme']['orientation'] != 'vertical') { echo "\t</li>"; } + <?php + if ($GLOBALS['theme']['submenu'] != 'simple') { + show_submenu($admin_items); + echo "\t</li>\n"; + } + else { + if ($location['section'] == 'admin') { + echo "\t</li>\n"; + show_submenu($admin_items); + } } // end if browse sub menu - else { - echo "\t</li>"; - } } // end if access ?> @@ -62,15 +65,17 @@ $browse_items[] = array('title'=>'Genre','url'=>'browse.php?action=genre','activ <a href="<?php echo conf('web_path'); ?>/preferences.php"><?php echo _("Preferences"); ?></a> </li> <li> - <a href="<?php echo conf('web_path'); ?>/browse.php"><?php echo _("Browse"); ?></a> + <a href="<?php echo conf('web_path'); ?>/browse.php"><?php echo _("Browse"); ?></a> <?php - if ($location['section'] == 'browse') { - if ($GLOBALS['theme']['orientation'] == 'vertical') { echo "\t</li>"; } + if ($GLOBALS['theme']['submenu'] != 'simple') { show_submenu($browse_items); - if ($GLOBALS['theme']['orientation'] != 'vertical') { echo "\t</li>"; } - } // end if browse sub menu - else { - echo "\t</li>"; + echo "\t</li>\n"; + } + else { + if ($location['section'] == 'browse') { + echo "\t</li>\n"; + show_submenu($browse_items); + } } ?> <?php if ($GLOBALS['user']->prefs['upload']) { ?> @@ -88,31 +93,24 @@ $browse_items[] = array('title'=>'Genre','url'=>'browse.php?action=genre','activ <?php } ?> <li> <a href="<?php echo conf('web_path'); ?>/search.php"><?php echo _("Search"); ?></a> - </li> - </ul> <?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?> - <ul class="subnavside"> - <li class="subnavbutton"> + <li> <form name="sub_search" method="post" action="<?php echo conf('web_path'); ?>/search.php" enctype="multipart/form-data" style="Display:inline"> - <input type="text" name="search_string" value="<?php echo scrub_out($_REQUEST['search_string']); ?>" size="8" /> - <input class="smallbutton" type="submit" value="<?php echo _("Search"); ?>" /> + <input type="text" name="search_string" value="<?php echo scrub_out($_REQUEST['search_string']); ?>" size="5" /> + <input class="smallbutton" type="submit" value="<?php echo _("Search"); ?>" /> <input type="hidden" name="action" value="quick_search" /> <input type="hidden" name="method" value="fuzzy" /> <input type="hidden" name="object_type" value="song" /> <input type="hidden" name="search_object[]" value="all" /> </form> </li> - </ul> <?php } ?> - <ul> <li> <a href="<?php echo conf('web_path'); ?>/randomplay.php"><?php echo _("Random Play"); ?></a> </li> - </ul> - <?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?> - <ul class="subnavside"> - <li class="subnavbutton"> - <form name="sub_random" method="post" enctype="multipart/form-data" action="<?php echo conf('web_path'); ?>/song.php" style="Display:inline"> + <?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?> + <li> + <form name="random" method="post" enctype="multipart/form-data" action="<?php echo conf('web_path'); ?>/song.php" style="Display:inline"> <input type="hidden" name="action" value="m3u" /> <select name="random" style="width:110px;"> <option value="1">1</option> @@ -126,7 +124,8 @@ $browse_items[] = array('title'=>'Genre','url'=>'browse.php?action=genre','activ <option value="1000">1000</option> <option value="-1"><?php echo _("All"); ?></option> </select> - <br /> + <?php show_genre_pulldown('genre','','','13','width:110px;'); ?> + <br /> <select name="Quantifier" style="width:110px;"> <option value="Songs"><?php echo _("Songs"); ?></option> <option value="Minutes"><?php echo _("Minutes"); ?></option> @@ -134,16 +133,15 @@ $browse_items[] = array('title'=>'Genre','url'=>'browse.php?action=genre','activ <option value="Albums"><?php echo _("Albums"); ?></option> <option value="Less Played"><?php echo _("Less Played"); ?></option> </select> - <br /> - <?php show_catalog_pulldown('catalog','width:110px;'); ?> - <br /> + <br /> <input type="hidden" name="aaction" value="Play!" /> <input class="smallbutton" type="submit" name="aaction" value="<?php echo _("Enqueue"); ?>" /> </form> </li> - </ul> - <?php } ?> + <?php } ?> <?php if (conf('use_auth')) { ?> - <ul><li><a href="<?php echo conf('web_path'); ?>/logout.php">Logout</a></li></ul> + <li><a href="<?php echo conf('web_path'); ?>/logout.php">Logout</a></li> <?php } ?> -</div> + </li> </ul> + +<!-- </div> --> diff --git a/templates/style.inc b/templates/style.inc index cf8cdec1..730554c3 100644 --- a/templates/style.inc +++ b/templates/style.inc @@ -26,6 +26,25 @@ ampache, mod this to change the look and feel of the site */ ?> + +<script type="text/javascript" language="javascript"> +<!-- Begin Suckerfish hover menu JS +// function needed for IE. attaches mouseover/out events to give/remove css class .sfhover (fake hover) +sfHover = function(navlist) { +var sfEls = document.getElementById("navlist").getElementsByTagName("LI"); +for (var i=0; i <sfEls.length; i++) { + sfEls[i].onmouseover=function() { + this.className+=" sfhover"; + } + sfEls[i].onmouseout=function() { + this.className=this.className.replace(new RegExp("sfhover\\b"), ""); + } +} // end for +} // end function for sfHover +if (window.attachEvent) window.attachEvent("onload", sfHover); +// End Suckerfish hover menu JS--> +</script> + <style type="text/css"> <!-- body @@ -72,6 +91,11 @@ border-left:2px solid <?php echo conf('bg_color2'); ?>; border-top:2px solid <?php echo conf('bg_color2'); ?>; } + + .npsong + { + background-color: #FFFF66; + } table.tabledata { } @@ -114,79 +138,6 @@ 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: #8B8B8B; - } -/*************** END Page Header *****************/ .header1 { color: <?php echo conf('font_color2'); ?>; @@ -270,7 +221,6 @@ padding-right:0px; padding-top: 0px; padding-left: 0px; - width:160px; background: <?php echo conf('base_color2'); ?>; } /** @@ -278,15 +228,15 @@ * These define how the page is layed out, be careful with these as changes to them * can cause drastic layout changes */ - #maincontrainer + #maincontainer { - margin:0px; + margin: 0px; } #topbar { - margin-left: 5px; - margin-top: 5px; height: 80px; + padding-top:10px; + padding-left:10px; background-color: <?php echo conf('bg_color1'); ?>; } #topbarright @@ -297,89 +247,82 @@ { float: left; } - #sidebar - { - clear: both; - height: 100%; - margin-left: 5px; - margin-top:0px; - float: left; - width: 170px; - } - - #sidebar ul - { - margin-left:0px; - margin-top:0px; - margin-bottom:0px; - margin-right: 10px; - padding: 0px; - list-style-type: none; - font-family: verdana, arial, Helvetica, sans-serif; - } - - #sidebar li { - margin: 0 0 1px 0; - padding-top:0px; - padding-bottom:0px; - } - - #sidebar a, .navbutton - { - display: block; - padding: 5px 10px; - color: <?php echo conf('font_color1'); ?>; - background-color: <?php echo conf('row_color2'); ?>; - text-decoration: none; - } - - #sidebar a:hover - { - color: <?php echo conf('font_color1'); ?>; - background-color: <?php echo conf('row_color3'); ?>; - text-decoration: none; - } - - #sidebar ul ul li { margin: 0 0 1px 0; } - - #sidebar ul ul a - { - display: block; - padding: 5px 5px 5px 30px; - width: 125px; - color: <?php echo conf('font_color1'); ?>; - background-color: <?php echo conf('row_color1'); ?>; - text-decoration: none; - } - #navcontainer ul li { - float:left; - width:100%; + float:left; + width:100%; } .subnavbutton { - background-color: <?php echo conf('row_color1'); ?>; - text-align:center; - text-decoration: none; - color: <?php echo conf('font_color2'); ?>; + background-color: <?php echo conf('row_color1'); ?>; + text-align:center; + text-decoration: none; + color: <?php echo conf('font_color2'); ?>; } - #sidebar ul ul a:hover - { - color: <?php echo conf('font_color2'); ?>; - background-color: <?php echo conf('row_color3'); ?>; - text-decoration: none; - } #content { + float: left; margin-left:0px; - padding-top:10px; - padding-left:10px; - vertical-align:top; } /** + * Experimental for menus (Thx Sigger) + * TO DO: Fill in 1px border around menus & submenu items + * Make padding appply to the li, not just an a. Moving paddng: to li throws off the dropdown menu alignment. + */ + #sidebar { + clear: both; + height: 100%; + margin: 0; + float: left; + /* width: 110px; /* this controls the width of the sidebar. horizontal menu needs more width */ + padding: 0; + list-style: none; + border: 1px solid #000; + line-height: 1; + } + #sidebar ul { + margin: 0px; + list-style: none; + padding: 0px; + font-family: verdana, arial, Helvetica, sans-serif; + line-height: 1; + } + #sidebar li { +/* margin: 0 0 1px 0; */ + margin: 0; + display: block; + border-bottom: 1px solid white; + border-left: 1px solid white; + border-right: 1px solid white; + padding: 5px 0px 5px 10px; + width: 10em; + background-color: <?php echo conf('row_color2'); ?>; + } + #sidebar a, .navbutton { + display: block; /*Not sure why this is neccesary, but it is for IE*/ + text-decoration: none; + } + #sidebar li:hover, #sidebar li.sfhover { + color: <?php echo conf('font_color2'); ?>; + background-color: <?php echo conf('row_color3'); ?>; + } + #sidebar li:active { + background-color: <?php echo conf('row_color1'); ?>; + } + #sidebar li ul { + float: left; + position: absolute; + width: 12em; + margin: -1.5em 0 0 10em; +/* -2em 0 0 10em for vertical menu puts the submenu back up and to the right of the hovered menu item by "the right amount"*/ + left: -999em; /* this puts the submenu item way off to the left until it's called back by a hover (below) */ + } + #sidebar li:hover ul, #sidebar li.sfhover ul { + left: auto; /* this calls the submenu back when the parent li is hovered. */ + } +/** * End Div Definitions * This is the end of the main structure def's */ |