diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-02-08 21:19:24 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-02-08 21:19:24 +0000 |
commit | bbf79a59703ef3ba4ed63c8143f97d9da5a73b8d (patch) | |
tree | 05f6f2d03208da257d5ad4864a93a6797cc499c3 /lib/ui.lib.php | |
parent | aa0c57afc44b8f804c2f553d2d264ed62fc16121 (diff) | |
download | ampache-bbf79a59703ef3ba4ed63c8143f97d9da5a73b8d.tar.gz ampache-bbf79a59703ef3ba4ed63c8143f97d9da5a73b8d.tar.bz2 ampache-bbf79a59703ef3ba4ed63c8143f97d9da5a73b8d.zip |
* Initial Database Changes for 3.4, many things are now broken
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r-- | lib/ui.lib.php | 54 |
1 files changed, 12 insertions, 42 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php index f676adc5..8a928e3b 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -119,38 +119,6 @@ function access_denied() { } // access_denied /** - * show_users - * shows all users (admin function) - */ -function show_users () { - - $dbh = dbh(); - - // Setup the View Ojbect - $view = new View(); - $view->import_session_view(); - - // if we are returning - if ($_REQUEST['keep_view']) { - $view->initialize(); - } - // If we aren't keeping the view then initlize it - else { - $sql = "SELECT username FROM user"; - $db_results = mysql_query($sql, $dbh); - $total_items = mysql_num_rows($db_results); - if ($match != "Show_all") { $offset_limit = $_SESSION['userdata']['offset_limit']; } - $view = new View($sql, 'admin/users.php','fullname',$total_items,$offset_limit); - } - - $db_result = mysql_query($view->sql, $dbh); - // wow this is stupid - $GLOBALS['view'] = $view; - require(conf('prefix') . "/templates/show_users.inc"); - -} // show_users() - -/** * return_referer * returns the script part of the referer address passed by the web browser * this is not %100 accurate. Also because this is not passed by us we need @@ -1421,19 +1389,21 @@ function xml_get_footer($type){ } //xml_get_footer /** - * show_manage_users - * This is the admin page for showing all of the users + * get_users + * This returns an array of user objects and takes an sql statement */ -function show_manage_users() { +function get_users($sql) { - show_box_top(_('Manage Users')); - echo "<ul>\n\t<li><a href=\"".conf('web_path') . "/admin/users.php?action=show_add_user\">" . _('Add a new user') . "</a></li>\n</ul>\n"; - show_box_bottom(); + $db_results = mysql_query($sql,dbh()); + + $results = array(); - /* Show the Users */ - show_users(); + while ($u = mysql_fetch_assoc($db_results)) { + $results[] = new User($u['id']); + } -} // show_manage_users + return $results; +} // get_users ?> |