1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 18:29:40 +02:00

removed images that were not being used, added icons and started the iconification!

This commit is contained in:
Karl 'vollmerk' Vollmer 2006-09-28 06:49:29 +00:00
parent ebdb7573bf
commit cad6aca40f
22 changed files with 78 additions and 66 deletions

View file

@ -1,8 +1,7 @@
<?php <?php
/* /*
Copyright (c) 2001 - 2005 Ampache.org Copyright (c) 2001 - 2006 Ampache.org
All rights reserved. All rights reserved.
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
@ -29,7 +28,7 @@
require_once ('../lib/init.php'); require_once ('../lib/init.php');
if (!$user->has_access(100)) { if (!$GLOBALS['user']->has_access(100)) {
access_denied(); access_denied();
} }
@ -43,17 +42,16 @@ $user_id = scrub_in($_REQUEST['user']);
$temp_user = new User($user_id); $temp_user = new User($user_id);
switch ($action) { switch ($action) {
case 'edit': case 'edit':
if (conf('demo_mode')) { break; } if (conf('demo_mode')) { break; }
show_user_form($temp_user->username, $username = $temp_user->username;
$temp_user->fullname, $fullname = $temp_user->fullname;
$temp_user->email, $email = $temp_user->email;
$temp_user->access, $access = $temp_user->access;
'edit_user', $id = $temp_user->id;
''); require_once(conf('prefix') . '/templates/show_edit_user.inc.php');
break; break;
case 'update_user':
case 'update_user':
if (conf('demo_mode')) { break; } if (conf('demo_mode')) { break; }
/* Clean up the variables */ /* Clean up the variables */
@ -162,20 +160,19 @@ switch ($action) {
show_user_form('','','','','new_user',''); show_user_form('','','','','new_user','');
break; break;
case 'update': case 'update':
case 'disabled': case 'disabled':
if (conf('demo_mode')) { break; } if (conf('demo_mode')) { break; }
$level = scrub_in($_REQUEST['level']); $level = scrub_in($_REQUEST['level']);
$thisuser = new User($_REQUEST['user']); $thisuser = new User($_REQUEST['user']);
if ($GLOBALS['user']->has_access(100)) { if ($GLOBALS['user']->has_access(100)) {
$thisuser->update_access($level); $thisuser->update_access($level);
} }
show_manage_users(); show_manage_users();
break;
default:
show_manage_users();
break; break;
default:
show_manage_users();
} }
/* Show the footer */ /* Show the footer */

BIN
images/icon_delete.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 B

BIN
images/icon_disable.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

BIN
images/icon_download.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

BIN
images/icon_edit.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

BIN
images/icon_enable.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

BIN
images/icon_flag.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

BIN
images/icon_link.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

BIN
images/icon_preferences.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

BIN
images/icon_statistics.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

View file

@ -1312,4 +1312,27 @@ function show_box_bottom() {
} // show_box_bottom } // show_box_bottom
/**
* get_user_icon
* this function takes a name and a returns either a text representation
* or an <img /> tag
*/
function get_user_icon($name) {
$icon_name = 'icon_' . $name . '.gif';
if (file_exists(conf('prefix') . '/themes/' . $GLOBALS['theme']['path'] . '/images/' . $icon_name)) {
$img_url = conf('web_path') . conf('theme_path') . '/images/' . $icon_name;
}
else {
$img_url = conf('web_path') . '/images/' . $icon_name;
}
$string = "<img src=\"$img_url\" border=\"0\" alt=\"$name\" title=\"$name\" />";
return $string;
} // show_icon
?> ?>

View file

@ -51,17 +51,6 @@ function show_manage_users () {
} // show_manage_users() } // show_manage_users()
/*!
@function show_user_form
@discussion shows the user form
*/
function show_user_form ($username, $fullname, $email, $access, $type, $error) {
require(conf('prefix').'/templates/userform.inc');
} // show_user_form()
/* /*
* show_change_password * show_change_password
* *

View file

@ -21,23 +21,23 @@
*/ */
if ($type === 'new_user') { if ($type === 'new_user') {
$userfield = "<input type=\"text\" name=\"new_username\" size=\"30\" value=\"$username\" />"; $userfield = "<input type=\"text\" name=\"new_username\" size=\"30\" value=\"" . scrub_out($username) . "\" />";
$title = _("Adding a New User"); $title = _('Adding a New User');
} }
else { else {
$userfield = $username; $userfield = scrub_out($username);
$title = _("Editing existing User"); $title = _('Editing existing User');
} }
?> ?>
<br /> <br />
<div class="header2"><?php echo $title; ?></div> <?php show_box_top($title); ?>
<?php $GLOBALS['error']->print_error('general'); ?> <?php $GLOBALS['error']->print_error('general'); ?>
<form name="update_user" method="post" action="<?php echo conf('web_path') . "/admin/users.php"; ?>"> <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"> <table cellspacing="0" cellpadding="0" border="0">
<tr> <tr>
<td> <td>
<?php echo _("Username"); ; ?>: <?php echo _('Username'); ?>:
</td> </td>
<td> <td>
<?php echo $userfield; ?> <?php echo $userfield; ?>
@ -45,22 +45,22 @@ else {
</td> </td>
</tr> </tr>
<tr> <tr>
<td><?php echo _("Full Name"); ; ?>:</td> <td><?php echo _('Full Name'); ?>:</td>
<td> <td>
<input type="text" name="new_fullname" size="30" value="<?php echo $fullname; ?>" /> <input type="text" name="new_fullname" size="30" value="<?php echo scrub_out($fullname); ?>" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<?php echo _("E-mail"); ?>: <?php echo _('E-mail'); ?>:
</td> </td>
<td> <td>
<input type="text" name="new_email" size="30" value="<?php echo $email; ?>" /> <input type="text" name="new_email" size="30" value="<?php echo scrub_out($email); ?>" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<?php echo _("Password"); ?> : <?php echo _('Password'); ?> :
</td> </td>
<td> <td>
<input type="password" name="new_password_1" size="30" value="" /> <input type="password" name="new_password_1" size="30" value="" />
@ -69,7 +69,7 @@ else {
</tr> </tr>
<tr> <tr>
<td> <td>
<?php echo _("Confirm Password"); ?>: <?php echo _('Confirm Password'); ?>:
</td> </td>
<td> <td>
<input type="password" name="new_password_2" size="30" value="" /> <input type="password" name="new_password_2" size="30" value="" />
@ -77,7 +77,7 @@ else {
</tr> </tr>
<tr> <tr>
<td> <td>
<?php echo _("User Access Level"); ; ?>: <?php echo _('User Access Level'); ?>:
</td> </td>
<td> <td>
<select name="user_access"> <select name="user_access">
@ -91,12 +91,13 @@ else {
<?php <?php
if ($type == 'new_user') { if ($type == 'new_user') {
echo "<input type=\"hidden\" name=\"action\" value=\"add_user\" />"; echo "<input type=\"hidden\" name=\"action\" value=\"add_user\" />";
echo "<input type=\"submit\" value=\"" . _("Add User") . "\" />"; echo "<input type=\"submit\" value=\"" . _('Add User') . "\" />";
} }
else { else {
echo "<input type=\"hidden\" name=\"action\" value=\"update_user\" />\n"; echo "<input type=\"hidden\" name=\"action\" value=\"update_user\" />\n";
echo "<input type=\"submit\" value=\"" . _("Update User") . "\" />\n"; echo "<input type=\"submit\" value=\"" . _('Update User') . "\" />\n";
echo "<input type=\"hidden\" name=\"new_username\" value=\"$username\" />"; echo "<input type=\"hidden\" name=\"new_username\" value=\"$id\" />";
} }
?> ?>
</form> </form>
<?php show_box_bottom(); ?>

View file

@ -54,7 +54,8 @@ $admin_menu = "admin/";
<b><?php echo _("Registration Date"); ?></b> <b><?php echo _("Registration Date"); ?></b>
</a> </a>
</td> </td>
<td colspan="5">&nbsp;</td>
<!--
<td align="center"> <td align="center">
<b><?php echo _("Edit"); ?></b> <b><?php echo _("Edit"); ?></b>
</td> </td>
@ -70,6 +71,7 @@ $admin_menu = "admin/";
<td align="center"> <td align="center">
<b><?php echo _("Delete"); ?></b> <b><?php echo _("Delete"); ?></b>
</td> </td>
-->
<td align="center"> <td align="center">
<b><?php echo _("On-line"); ?></b> <b><?php echo _("On-line"); ?></b>
</td> </td>
@ -83,46 +85,46 @@ while ($results = mysql_fetch_object($db_result)) {
if (!$user->create_date) { $create_date = "Unknown"; } if (!$user->create_date) { $create_date = "Unknown"; }
?> ?>
<tr class="<?php echo flip_class(); ?>"> <tr class="<?php echo flip_class(); ?>" align="center">
<td> <td align="left">
<a href="<?php echo $web_path; ?>/admin/users.php?action=edit&amp;user=<?php echo $user->username; ?>"> <a href="<?php echo $web_path; ?>/admin/users.php?action=edit&amp;user=<?php echo $user->id; ?>">
<?php echo $user->fullname; ?> (<?php echo $user->username; ?>) <?php echo $user->fullname; ?> (<?php echo $user->username; ?>)
</a> </a>
</td> </td>
<td align="center"> <td>
<?php echo $last_seen; ?> <?php echo $last_seen; ?>
</td> </td>
<td align="center"> <td>
<?php echo $create_date; ?> <?php echo $create_date; ?>
</td> </td>
<td> <td>
<a href="<?php echo $web_path; ?>/admin/users.php?action=edit&amp;user=<?php echo $user->username; ?>"> <a href="<?php echo $web_path; ?>/admin/users.php?action=edit&amp;user=<?php echo $user->username; ?>">
<?php echo _("Edit"); ?> <?php echo get_user_icon('edit'); ?>
</a> </a>
</td> </td>
<td> <td>
<a href="<?php echo $web_path; ?>/admin/preferences.php?action=user&amp;user_id=<?php echo $user->username; ?>"> <a href="<?php echo $web_path; ?>/admin/preferences.php?action=user&amp;user_id=<?php echo $user->username; ?>">
<?php echo _("Prefs"); ?> <?php echo get_user_icon('preferences'); ?>
</a> </a>
</td> </td>
<td> <td>
<a href="<?php echo $web_path; ?>/stats.php?user_id=<?php echo $user->username; ?>"> <a href="<?php echo $web_path; ?>/stats.php?user_id=<?php echo $user->username; ?>">
<?php echo _("Stats"); ?> <?php echo get_user_icon('statistics'); ?>
</a> </a>
</td> </td>
<?php <?php
//FIXME: Fix this for the extra permission levels //FIXME: Fix this for the extra permission levels
if ($user->disabled == '1') { if ($user->disabled == '1') {
echo "<td><a href=\"".$web_path."/admin/users.php?action=update&amp;user=$user->username&amp;level=enabled\">" . _("Enable") . "</a></td>"; echo "<td><a href=\"".$web_path."/admin/users.php?action=update&amp;user=$user->username&amp;level=enabled\">" . get_user_icon('enable') . "</a></td>";
} }
else { else {
echo "<td><a href=\"".$web_path."/admin/users.php?action=update&amp;user=$user->username&amp;level=disabled\">" . _("Disable") ."</a></td>"; echo "<td><a href=\"".$web_path."/admin/users.php?action=update&amp;user=$user->username&amp;level=disabled\">" . get_user_icon('disable') ."</a></td>";
} }
?> ?>
<td> <td>
<a href="<?php echo $web_path; ?>/admin/users.php?action=delete&amp;user=<?php echo $user->username; ?>"> <a href="<?php echo $web_path; ?>/admin/users.php?action=delete&amp;user=<?php echo $user->username; ?>">
<?php echo _("delete"); ?> <?php echo get_user_icon('delete'); ?>
</a> </a>
</td> </td>
<?php <?php

Binary file not shown.

Before

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB