<?php /** * SUMO MODULE: Groups | Delete Group * * @version 0.4.0 * @link http://sumoam.sourceforge.net SUMO Access Manager * @author Alberto Basso <*****@*****.**> * @copyright Copyright © 2003-2009, Alberto Basso * @package SUMO * @category Console */ $tab = sumo_get_group_info($_GET['id']); $delete = sumo_delete_group($_GET['id']); //if($delete) $tpl['MESSAGE:L'] = sumo_get_message('GroupDeleted', $_POST['usergroup']); //else //$tpl['MESSAGE:H'] = $language['GroupNotDeleted']; $_SESSION['action'] = 'list'; require "action.list.php";
/** * Get num users for group */ function sumo_get_group_users($id) { $id = intval($id); if ($id > 0) { global $SUMO; $tab = sumo_get_group_info($id); $query = "SELECT COUNT(id) FROM " . SUMO_TABLE_USERS . "\r\n\t \t WHERE (\r\n\t \t \tusergroup LIKE '" . $tab['usergroup'] . ":%' \r\n\t\t\t\t \tOR usergroup LIKE '%;" . $tab['usergroup'] . ":%'\r\n\t\t\t\t \tOR usergroup LIKE 'sumo:%'\r\n\t\t\t\t \tOR usergroup LIKE '%;sumo:%'\r\n\t\t\t\t \t)\r\n\t\t\t\t \tAND username<>'sumo'"; $rs = $SUMO['DB']->CacheExecute(30, $query); $users = $rs->FetchRow(); return $users[0]; } else { return false; } }