summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-12-27 09:30:09 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-12-27 09:30:09 +0000
commitf16eed74ae62d939289420bf113e9b17694f984d (patch)
tree54fc7adb22f9abc52928bea2abb8cc35e65f45cd
parent5414825a71213e9643785492c54cb5288699a67b (diff)
downloadampache-f16eed74ae62d939289420bf113e9b17694f984d.tar.gz
ampache-f16eed74ae62d939289420bf113e9b17694f984d.tar.bz2
ampache-f16eed74ae62d939289420bf113e9b17694f984d.zip
last commit before the alpha4 release
-rw-r--r--config/ampache.cfg.php.dist1
-rwxr-xr-xdocs/CHANGELOG25
-rwxr-xr-xdocs/INSTALL2
-rwxr-xr-xdocs/README14
-rw-r--r--lib/ui.lib.php89
-rw-r--r--modules/init.php2
-rw-r--r--register.php4
-rw-r--r--templates/show_login_form.inc21
8 files changed, 125 insertions, 33 deletions
diff --git a/config/ampache.cfg.php.dist b/config/ampache.cfg.php.dist
index 021c5fda..77a134d3 100644
--- a/config/ampache.cfg.php.dist
+++ b/config/ampache.cfg.php.dist
@@ -158,7 +158,6 @@ id3tag_order = "id3v1"
use_auth = "yes"
# 5 Star Ratings
-# CURRENTLY BROKEN!!!!!
# These are disabled by default, to turn them on remove the
# comment before the value flash requires flash player and
# will cause longer load times.
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 3bdd75ed..962511bb 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -3,11 +3,13 @@
--------------------------------------------------------------------------
--------------------------------------------------------------------------
- v.3.3.2-Alpha4
+ v.3.3.2-Alpha4 12/27/2005
+ - Fixed Registration system sort of. It still needs massive
+ improvement, but it works.. kinda (Thx SoundOfEmotion)
- Added Rating system, currently only non-flash works.
- (Thx SoundOfEmotion for origional code)
- - Added pop-up submenus to classic Theme (Thx Sigger)
- - Fixed genre pulldown so it's a good bit faster (1/2 the sql calls)
+ (Thx SoundOfEmotion for original code)
+ - Added pop-up sub-menus to classic Theme (Thx Sigger)
+ - Fixed genre pull-down so it's a good bit faster (1/2 the sql calls)
- Updated Preferences (yet again) maybe it's better, maybe it's not
we'll never know...
- Fixed Classic Theme view in IE (had spaces)
@@ -16,8 +18,9 @@
- Added initial Italian translation (Thx Michele)
- Updated Burgundy theme to take advantage of div format so that
it acts like the old 'horizontal' menu
- - Introduced new 'vertical' interface that uses <divs>
- - Fixed a problem where downsampled songs wouldn't get recorded
+ - Introduced new 'vertical' interface that uses <divs>. Interface
+ should load a faster now.
+ - Fixed a problem where down-sampled songs wouldn't get recorded
in stats due to their diminished size
- Fixed column typo on Admin User page
- Fixed a problem with the no_symlinks setting which could
@@ -56,10 +59,10 @@
- Fixed problem where Add to Playlist from mpd.php only works for
file method (Thx Rosensama)
- Added 'Simple' Genre Bar (Thx sigger)
- - Added initial TV page for viewing of nowplaying and additional
+ - Added initial TV page for viewing of now playing and additional
information (Thx sigger)
- Updated Archive library to 2.1 Released 08/13/2005
- - Corrected math error with automagic downsampling (Thx J)
+ - Corrected math error with automatic down-sampling (Thx J)
- Corrected some of the no_auth preference problems
- Fixed a problem where Clearing the catalog stats, didn't actually
do anything
@@ -71,9 +74,9 @@
rather than a list of songs.
- Fixed Lock Songs always returning false and thus preventing
any playback when enabled. (Thx J)
- - Fixed a flaw in the downsampling which would allow you to set
+ - Fixed a flaw in the down-sampling which would allow you to set
invalid bitrates. (Thx J)
- - Fixed a few problems with WMP, downsampling and now playing
+ - Fixed a few problems with WMP, down-sampling and now playing
information. This is not a final fix for WMP but it's
better than before.
- Fixed problem where played wasn't getting set correctly.
@@ -122,7 +125,7 @@
- Added Spanish Translation (Thx ros)
- Fixed Menu Highlight when using a Translation
- More HTML cleanup (Thx Xgizzmo)
- - Added inital Browse Pages and Supporting Functions
+ - Added initial Browse Pages and Supporting Functions
- Added Genre Stats Tracking
- Moved files into more logical areas, added .lib and .class
suffix to library and class files, also started using
diff --git a/docs/INSTALL b/docs/INSTALL
index 7efd24dc..f045298d 100755
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -152,7 +152,7 @@
the appropriate information
- 3.4 Sorting and updating files (Under Development)
+ 3.4 Sorting and updating files *EXPERIMENTAL* (Use this at your own risk)
When updating catalog preferences new fields added in v3.1 include
ID3 set command
Filename pattern
diff --git a/docs/README b/docs/README
index a1b718df..631b62d2 100755
--- a/docs/README
+++ b/docs/README
@@ -56,8 +56,10 @@ Contents:
- simple m3u
- standard pls
- ASX
+ - RAM
- Realtime Downsampled
- Automatic Downsampling based on load
+ - On the Fly Transcoding
- Localplay using Moosic
- Localplay using MPD
- Icecast2 Stream
@@ -76,6 +78,7 @@ Contents:
- Dutch (nl_NL)
- Chinese (zh_CN)
- UK English (en_GB)
+ - Italian (it_IT)
- French (fr_FR) *Partial
D) A Special Thanks:
@@ -83,7 +86,8 @@ Contents:
Scott Kveton - Head Nacho, inventer of all that is Ampache
Robert Hopson - Libglue, Playlists, Ogg support.. and much more
Andy Morgan - Protagonist
- RosenSama - Developer
+ RosenSama - Previous Developer
+ Ben Shields - Graphics Boy
Randall Ehren (Initial XML-RPC)
s1amson (lots of beta testing)
Caleb Crome (bug fixes and enhancements)
@@ -101,12 +105,12 @@ Contents:
2. Getting all the components
Apache >= 1.3.19 http://www.apache.org OR other webserver
- PHP >= 4.1.2 http://www.php.net
+ PHP >= 4.3.x http://www.php.net
PHP4-Mysql
PHP4-Session
PHP4-gd (recommended)
PHP4 ICONV & ZLIB support (recommended)
- MySQL >= 3.23 http://www.mysql.com
+ MySQL >= 4.x http://www.mysql.com
16MB of Ram
3. Setting Up
@@ -125,7 +129,6 @@ Contents:
will be handled by the /update.php script. There is no need to insert
the /sql/ampache.sql if you have an existing installation.
-
4. License
This Application falls under the Standard GPL. See Licence
@@ -147,7 +150,8 @@ Contents:
Public SVN: https://svn.ampache.org/
IRC: irc.ampache.org #ampache (Freenode)
Forums: http://ampache.org/forums
- Bugs: http://bugs.ampache.org
+ Bugs: https://ampache.bountysource.com
+ Wiki: https://ampache.bountysource.com/wiki/
Demo: http://ampache.org/demo
Ampache Development Team
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index de906ed3..1f1665d6 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -1103,5 +1103,94 @@ function show_genre_pulldown ($name,$selected='',$size=1,$width=0,$style='') {
} // show_genre_pulldown
+function username_exists($check_user){
+
+ $check_user = sql_escape($check_user);
+
+ $sql = "SELECT * FROM user WHERE username='$check_user'";
+ $db_results = mysql_query($sql, dbh());
+
+ if ($r = mysql_fetch_assoc($db_results)) {
+ return true;
+ }
+ else {
+ return false;
+ }
+} // username_exists
+
+/**
+ * new_user
+ * FIXME: This needs to be done right... I don't know how right is
+ * but my guess is this isn't it, so anyway this just creates a new user
+ * this should really use the built in functions rather than creating
+ * a new one
+ */
+function new_user($username, $fullname, $email, $password) {
+
+ /* First lets clean up the fields... */
+ $username = sql_escape($username);
+ $fullname = sql_escape($fullname);
+ $email = sql_escape($email);
+ $access = '5';
+ if(conf('auto_user')){
+ $access='25';
+ }
+
+ /* Check to see if the user exists... */
+ //FIXME: Use the error class
+ if(username_exists($username)){
+ return false;
+ }
+
+ /* Uhh let's not auto-pass through in this fashion FIXME */
+ else {
+ /* Apparently it's a new user, now insert the user into the database*/
+ $sql = "INSERT INTO user (username, fullname, email, password, access) VALUES" .
+ " ('$username','$fullname','$email',PASSWORD('$password'),'$access')";
+ $db_results = mysql_query($sql, dbh());
+ show_template('style');
+ show_confirmation('Registration Complete','You have registered succesfully','/login.php');
+ }
+
+ return true;
+
+} // new_user
+
+/**
+ * good_email
+ * Don't get me started... I'm sure the indenting is still wrong on this
+ * it shouldn't be named this, it should be documented, yea this needs
+ * some serious MOJO work
+ */
+function good_email($email) {
+ // First check that there's one @ symbol, and that the lengths are good
+ if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) {
+ // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.
+ return false;
+ }
+
+ // Split it into sections
+ $email_array = explode("@", $email);
+ $local_array = explode(".", $email_array[0]);
+ for ($i = 0; $i < sizeof($local_array); $i++) {
+ if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) {
+ return false;
+ }
+ }
+ if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name
+ $domain_array = explode(".", $email_array[1]);
+ if (sizeof($domain_array) < 2) {
+ return false; // Not enough parts to domain
+ }
+ for ($i = 0; $i < sizeof($domain_array); $i++) {
+ if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) {
+ return false;
+ }
+ }
+ }
+ return true;
+} //good_email
+
+
?>
diff --git a/modules/init.php b/modules/init.php
index 48e71fe7..2349ea7b 100644
--- a/modules/init.php
+++ b/modules/init.php
@@ -83,7 +83,7 @@ if (!$results['conf']['allow_stream_playback']) {
}
$results['conf']['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['conf']['web_path'];
-$results['conf']['version'] = '3.3.2-Alpha4 (Build 005)';
+$results['conf']['version'] = '3.3.2-Alpha4';
$results['conf']['catalog_file_pattern']= 'mp3|mpc|m4p|m4a|mp4|aac|ogg|rm|wma|asf|flac|spx';
$results['libglue']['local_table'] = 'session';
$results['libglue']['local_sid'] = 'id';
diff --git a/register.php b/register.php
index 410f2e96..806f06bc 100644
--- a/register.php
+++ b/register.php
@@ -117,9 +117,5 @@ switch ($action) {
}
-echo "<br /><br />";
?>
-
-</body>
-</html>
diff --git a/templates/show_login_form.inc b/templates/show_login_form.inc
index 119110a0..cc5d8bc2 100644
--- a/templates/show_login_form.inc
+++ b/templates/show_login_form.inc
@@ -1,6 +1,6 @@
<?php
/*
- Copyright (c) 2001 - 2005 Ampache.org
+ Copyright (c) 2001 - 2006 Ampache.org
All Rights Reserved
This program is free software; you can redistribute it and/or
@@ -24,10 +24,10 @@
Login Template
*/
+$subject = "/ampache\.com/";
$referrer = $_SERVER['HTTP_REFERER'];
-$subject = "/ampache.com/";
if (preg_match($subject,$_SERVER['HTTP_HOST'])) {
$show_copyright = 1;
@@ -65,15 +65,15 @@ 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>
+ <?php if(conf('allow_public_registration')){ ?>
+ <p align="center">
+ [<a class="header2" href="<?php echo conf('web_path'); ?>/register.php"><?php echo _("Register"); ?></a>]
+ </p>
+ <?php } ?>
+
+<!--
<p align="center">
<a href="http://validator.w3.org/check/referer">
<img style="padding:0;border:0;" src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" />
@@ -82,12 +82,13 @@ if (preg_match($subject,$_SERVER['HTTP_HOST'])) {
<img style="padding:0;border:0;" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" />
</a>
</p>
+-->
<?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 />
+ All Rights Reserved, Copyright &copy; 2006<br />
</font>
</p>
<?php } ?>