We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 8ffbcdb2 authored by mattl's avatar mattl

added user list function

parents 405f4885 2a033b02
......@@ -21,7 +21,7 @@
require_once('database.php');
require_once('data/User.php');
require_once($install_path . '/../turtle/temp-utils.php'); // this is extremely dodgy and shameful
require_once($install_path . '/temp-utils.php'); // this is extremely dodgy and shameful
session_start();
if(isset($_COOKIE['session_id'])) {
......
......@@ -29,7 +29,7 @@ require_once($install_path . '/utils/linkeddata.php');
require_once($install_path . '/utils/arc/ARC2.php');
require_once($install_path . '/utils/resolve-external.php');
require_once($install_path . '/utils/licenses.php');
require_once($install_path . '/../turtle/temp-utils.php'); // this is extremely dodgy and shameful
require_once($install_path . '/temp-utils.php'); // this is extremely dodgy and shameful
/**
* Provides access to server-wide data
......
<?php
/* GNUkebox -- a free software server for recording your listening habits
Copyright (C) 2009 Free Software Foundation, Inc
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once('database.php'); // include the database connection string
// these functions should be short-lived while things go through a transition
function username_to_uniqueid($username) {
global $adodb;
$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
try {
$uniqueid = $adodb->GetOne('SELECT uniqueid from Users where lower(username) = lower('.$adodb->qstr($username).')');
} catch (exception $e) {
return 0;
}
return $uniqueid;
}
function uniqueid_to_username($uniqueid) {
global $adodb;
$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
try {
$username = $adodb->GetOne('SELECT username from Users where uniqueid = '.($uniqueid));
} catch (exception $e) {
return "BROKEN($uniqueid)";
}
return $username;
}
?>
......@@ -33,9 +33,3 @@
<div class="yui-u first">
<p><b>We're doing some work on the site, regular design will return shortly.</b></p>
{if !empty($errors)}
<div id="errors">
<p>{$errors}</p>
</div>
{/if}
{include file='header.tpl'}
{if isset($errors)}
<div id="errors">
{section loop=$errors name=error}
<p>{$errors[error]}</p>
{/section}
</div>
{/if}
<div id='user-edit'>
<h2 property='dc:title'>Edit your profile</h2>
......
......@@ -123,17 +123,14 @@ if ($_POST['submit'])
header('Location: ' . $this_user->getURL());
exit;
}
if (isset($errors[0]))
{
header('Content-Type: text/plain');
//($errors);
exit;
}
}
if(isset($this_user->name))
{
if (isset($errors[0]))
{
$smarty->assign('errors', $errors);
}
# Stuff which cannot be changed.
$smarty->assign('acctid', $this_user->acctid);
$smarty->assign('avatar', $this_user->getAvatar());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment