Vergleich admin/modules/user/admin_permissions.php - 1.6.10 - 1.6.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: admin_permissions.php 5297 2010-12-28 22:01:14Z Tomm $

 * $Id$

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 177Zeile 177
	
if($uid > 0)
{

	
if($uid > 0)
{

		$query = $db->query("
SELECT u.uid, u.username, g.cancp, g.gid
FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."usergroups g ON (u.usergroup=g.gid)
WHERE u.uid='$uid'
AND g.cancp=1
LIMIT 1
");

















		switch($db->type)
{
case "pgsql":
case "sqlite":
$query = $db->query("
SELECT u.uid, u.username, g.cancp, g.gid
FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."usergroups g ON (((','|| u.additionalgroups|| ',' LIKE '%,'|| g.gid|| ',%') OR u.usergroup = g.gid))
WHERE u.uid='$uid'
AND g.cancp=1
LIMIT 1
");
break;
default:
$query = $db->query("
SELECT u.uid, u.username, g.cancp, g.gid
FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."usergroups g ON (((CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', g.gid, ',%')) OR u.usergroup = g.gid))
WHERE u.uid='$uid'
AND g.cancp=1
LIMIT 1
");
}


		$admin = $db->fetch_array($query);
$permission_data = get_admin_permissions($uid, $admin['gid']);
$title = $admin['username'];

		$admin = $db->fetch_array($query);
$permission_data = get_admin_permissions($uid, $admin['gid']);
$title = $admin['username'];