if (!$deleted) { $msg = "Database Error: {$ax['grp_not_deleted']}"; break; } $msg = $ax['grp_deleted']; } while (false); return $msg; } //Control logic if ($privs >= 4) { //manager or admin $msg = ''; if (isset($_POST['addExe'])) { $msg = addGroup($group); } elseif (isset($_POST['updExe'])) { $msg = updateGroup($group); } elseif (isset($_GET['delExe'])) { $msg = deleteGroup($group); } echo "<p class='error'>{$msg}</p>\n\t\t<div class='scrollBoxAd'>\n\t\t<div class='centerBox'>\n"; if (!$mode or isset($_POST["back"])) { showGroups(); //no add / no edit } else { editGroup($group); //add or edit } echo "</div>\n</div>\n"; } else { echo "<p class='error'>{$ax['no_way']}</p>\n"; }
} if (empty($error)) { if ($action == "insert") { $insert_data = array('name' => $name, 'permission' => $permission); $insert_query = insertGroup($insert_data); if ($insert_query) { $_SESSION['success'] = $lang['success_insert']; header('Location:user_group.html'); } else { $error_warning = $lang['error_query']; } } else { if ($action == "update") { echo "y" . $group_id; $edit_data = array('groupId' => $gid, 'name' => $name, 'permission' => $permission); $edit_query = editGroup($edit_data); if ($edit_query) { $_SESSION['success'] = $lang['success_edit']; header('Location:user_group.html'); } else { $error_warning = $lang['error_query']; } } } } else { $error_name = $error['name']; } } ?> <div id="content"> <div class="breadcrumb">
if ($step || $install == 1) { $task = 'install'; } if ($mode == 'manage_users' && $task != 'help' && $task != 'assign_users' && $task != 'unassign_users') { $task = $mode; } switch ($task) { ##-- GROUPS ------------- case 'list_groups': showGroups($option); break; case 'group_add': editGroup(false); break; case 'group_edit': editGroup(true); break; case 'group_save': case 'group_apply': saveGroup(); break; case 'group_publish': publishItem('#__community_acl_groups', $cid, 1); break; case 'group_unpublish': publishItem('#__community_acl_groups', $cid, 0); break; case 'group_delete': deleteItem('#__community_acl_groups', $cid); break; case 'group_sync':
"></p> </form> <?php } if (!$_SESSION["user_id"]) { mysql_close($link); header("Location: " . $path . "login.php?return_to=" . $PHP_SELF); } else { include "includes/header.php"; $query = mysql_query("SELECT add_groups from " . $table_prefix . "users where user_id = " . $_SESSION["user_id"] . " limit 1"); $row = mysql_fetch_row($query); if ($row[0] == 1) { $edit = true; } else { echo "<p class=\"warning\">" . $lang["not_authorized_edit_groups"] . "</p>\n"; } } if ($edit) { switch ($_REQUEST["mode"]) { case "edit_group": editGroup($id); break; case "delete_group": deleteGroup($id); break; default: showGroups(); break; } } include "includes/footer.php";
editDepartment($_POST["dep_id"], $_POST["dep_newName"]); } } } //################ Job Group Functions ############## //add group if ($_POST["procedure"] == "ADD_GROUP") { addGroup($_POST["grp_name"], $_POST["dep_id"]); //delete group } else { if ($_POST["procedure"] == "DELETE_GROUP") { deleteGroup($_POST["grp_id"]); //edit group } else { if ($_POST["procedure"] == "EDIT_GROUP") { editGroup($_POST["grp_id"], $_POST["grp_newName"]); } } } $pageTitle = "Manage Jobs"; $javascript = "manageJobs.js"; require 'includes/adminHeader.php'; ?> <br> <div class="tabs"> <ul> <li id="1_tab"<?php if ($_POST["tabID"] <= "1") { ?>
* @version $Id: groups.php 1050 2009-12-14 17:32:05Z mathias $ * @category DOCman * @package DOCman15 * @copyright Copyright (C) 2003 - 2009 Johan Janssens and Mathias Verraes. All rights reserved. * @license GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> * @link http://www.joomladocman.org */ defined('_JEXEC') or die('Restricted access'); include_once dirname(__FILE__) . '/groups.html.php'; JArrayHelper::toInteger($cid); switch ($task) { case "new": editGroup($option, 0); break; case "edit": editGroup($option, $cid[0]); break; case "remove": removeGroup($cid); break; case "apply": case "saveg": case "save": saveGroup($option); break; case "cancel": cancelGroup($option); break; case "emailgroup": emailGroup($gid); break;
* Update Users */ ?> <html> <style type="text/css"> @import url(zivStyle.css); </style> <script language="javascript" src="javascripts/javaScriptFunctions.js"></script> <head></head> <body> <!-- DISPLAY THE ACTIVITY GROUP LIST --> <?php updates(); if (isset($_POST[editGroup]) && $allowEditing) { //if editing a group editGroup($_POST[editGroup]); } else { //else.. drawGroupsForm($allowEditing); } ?> </body> </html> <?php /******************************************************************************* *Name: updates *Discription: This function check if any updates realated to GROUPS where made *input: none *output: none *Author: Amit Eitan *Date: 9/10/2008 17:30
$instances = readInstances($conn); $paths = readPaths($conn); $categories = readCategories($conn); $instanceTypes = readInstanceTypes($conn); $message = "Login successful"; } else { if ($type == "readRulesets") { $rulesets = readRulesets($conn); $message = "Rules read."; } else { if ($type == "addGroup") { $message = addGroup($conn); $groups = readGroups($conn); } else { if ($type == "editGroup") { $message = editGroup($conn); $groups = readGroups($conn); $players = readPlayers($conn); $records = readRecords($conn); } else { if ($type == "deleteGroup") { $message = deleteGroup($conn); $groups = readGroups($conn); } else { if ($type == "addPlayer") { $message = addPlayer($conn); $players = readPlayers($conn); } else { if ($type == "editPlayer") { $message = editPlayer($conn); $players = readPlayers($conn);