summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-07-26 07:43:18 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-07-26 07:43:18 +0000
commit392354df0a4f2c21aabad2f1b527448251a60f99 (patch)
treeab34820cef4990e4139326ccd2e507c5731d216c /templates
parent975af37b254ebc74533f1562005dccf75ef0f021 (diff)
downloadampache-392354df0a4f2c21aabad2f1b527448251a60f99.tar.gz
ampache-392354df0a4f2c21aabad2f1b527448251a60f99.tar.bz2
ampache-392354df0a4f2c21aabad2f1b527448251a60f99.zip
switched to sha() password encryption not using sha2 because of limitations of amarok, also added some caching and fixed some misc bugs
Diffstat (limited to 'templates')
-rw-r--r--templates/footer.inc.php5
-rw-r--r--templates/show_account.inc.php8
-rw-r--r--templates/show_index.inc.php1
-rw-r--r--templates/show_preferences.inc.php11
-rw-r--r--templates/sidebar_home.inc.php2
5 files changed, 13 insertions, 14 deletions
diff --git a/templates/footer.inc.php b/templates/footer.inc.php
index cef63c28..38090bfb 100644
--- a/templates/footer.inc.php
+++ b/templates/footer.inc.php
@@ -21,9 +21,10 @@
*/
?>
<div style="clear:both;"></div>
+<?php if ($_SESSION['userdata']['password'] == 'old') {?>
+ <span class="fatalerror"><?php echo _('Using Old Password Encryption, Please Reset your Password'); ?></span>
+<?php } ?>
</div> <!-- end id="content"-->
-<!-- I really hate IE
-</td></tr></table> -->
</div> <!-- end id="maincontainer"-->
<div id="footer">
<a href="http://www.ampache.org/index.php">Ampache v.<?php echo Config::get('version'); ?></a><br />
diff --git a/templates/show_account.inc.php b/templates/show_account.inc.php
index 256898f7..eb371443 100644
--- a/templates/show_account.inc.php
+++ b/templates/show_account.inc.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -19,10 +19,9 @@
*/
// Because this is a reset of the persons password make the form a little more secure
-$form_string = generate_password('32');
-$_SESSION['forms']['account'] = $form_string;
?>
<?php Error::display('general'); ?>
+<form method="post" name="preferences" action="<?php echo Config::get('web_path'); ?>/preferences.php?action=update_user" enctype="multipart/form-data">
<table class="tabledata">
<tr>
<td><?php echo _('Name'); ?>:</td>
@@ -58,8 +57,7 @@ $_SESSION['forms']['account'] = $form_string;
</table>
<div class="formValidation">
<input type="hidden" name="user_id" value="<?php echo scrub_out($client->id); ?>" />
- <input type="hidden" name="action" value="update_user" />
+ <?php echo Core::form_register('update_user'); ?>
<input type="hidden" name="tab" value="<?php echo scrub_out($_REQUEST['tab']); ?>" />
- <input type="hidden" name="form_string" value="<?php echo $form_string; ?>" />
<input class="button" type="submit" value="<?php echo _('Update Account'); ?>" />
</div>
diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php
index 605b4d42..497b1b3b 100644
--- a/templates/show_index.inc.php
+++ b/templates/show_index.inc.php
@@ -41,6 +41,7 @@
<div id="recently_played">
<?php
$data = Song::get_recently_played();
+ Song::build_cache(array_keys($data));
show_box_top(_('Recently Played'));
require_once Config::get('prefix') . '/templates/show_recently_played.inc.php';
show_box_bottom();
diff --git a/templates/show_preferences.inc.php b/templates/show_preferences.inc.php
index af331ab4..89fe61b8 100644
--- a/templates/show_preferences.inc.php
+++ b/templates/show_preferences.inc.php
@@ -26,17 +26,16 @@
?>
<?php show_box_top(_('Editing') . ' ' . $fullname . ' ' . _('preferences'),'box box_preferences'); ?>
-<form method="post" name="preferences" action="<?php echo Config::get('web_path'); ?>/preferences.php?action=update_preferences" enctype="multipart/form-data">
-<?php
-if ($_REQUEST['tab'] != 'account' && $_REQUEST['tab'] != 'modules') {
- show_preference_box($preferences[$_REQUEST['tab']]);
+<?php if ($_REQUEST['tab'] != 'account' && $_REQUEST['tab'] != 'modules') { ?>
-?>
+<form method="post" name="preferences" action="<?php echo Config::get('web_path'); ?>/preferences.php?action=update_preferences" enctype="multipart/form-data">
+<?php show_preference_box($preferences[$_REQUEST['tab']]); ?>
<div class="formValidation">
<input class="button" type="submit" value="<?php echo _('Update Preferences'); ?>" />
+ <?php echo Core::form_register('update_preference'); ?>
<input type="hidden" name="tab" value="<?php echo scrub_out($_REQUEST['tab']); ?>" />
<input type="hidden" name="method" value="<?php echo scrub_out($_REQUEST['action']); ?>" />
- <?php if ($GLOBALS['user']->has_access('100')) { ?>
+ <?php if (Access::check('interface','100')) { ?>
<input type="hidden" name="user_id" value="<?php echo scrub_out($_REQUEST['user_id']); ?>" />
<?php } ?>
</div>
diff --git a/templates/sidebar_home.inc.php b/templates/sidebar_home.inc.php
index 1a44da06..ed059ece 100644
--- a/templates/sidebar_home.inc.php
+++ b/templates/sidebar_home.inc.php
@@ -70,6 +70,7 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path');
<?php } // if playlist_type ?>
</div>
</li>
+<?php } ?>
<li><h4><?php echo _('Playlist'); ?></h4>
<ul class="sb3" id="sb_home_info">
<li id="sb_home_info_CurrentlyPlaying"><a href="<?php echo $web_path; ?>/index.php"><?php echo _('Currently Playing'); ?></a></li>
@@ -95,5 +96,4 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path');
<li id="sb_home_random_advanced"><a href="<?php echo $web_path; ?>/random.php?action=advanced"><?php echo _('Advanced'); ?></a></li>
</ul>
</li>
-<?php } ?>
</ul>