当前位置: 首页>>代码示例>>PHP>>正文


PHP deleteGroup函数代码示例

本文整理汇总了PHP中deleteGroup函数的典型用法代码示例。如果您正苦于以下问题:PHP deleteGroup函数的具体用法?PHP deleteGroup怎么用?PHP deleteGroup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了deleteGroup函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    //global variables
    global $arrConf;
    global $arrConfModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    $pDB = new paloDB($arrConf['elastix_dsn']['elastix']);
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    //user credentials
    global $arrCredentials;
    $userLevel1 = $arrCredentials['userlevel'];
    $userAccount = $_SESSION['elastix_user'];
    $idOrganization = $arrCredentials['id_organization'];
    $action = getAction();
    $content = "";
    switch ($action) {
        case "new_group":
            $content = viewFormGroup($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $userLevel1, $userAccount, $idOrganization);
            break;
        case "view":
            $content = viewFormGroup($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $userLevel1, $userAccount, $idOrganization);
            break;
        case "view_edit":
            $content = viewFormGroup($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $userLevel1, $userAccount, $idOrganization);
            break;
        case "save_new":
            $content = saveNewGroup($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $userLevel1, $userAccount, $idOrganization);
            break;
        case "save_edit":
            $content = saveEditGroup($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $userLevel1, $userAccount, $idOrganization);
            break;
        case "delete":
            $content = deleteGroup($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $userLevel1, $userAccount, $idOrganization);
            break;
        default:
            // report
            $content = reportGroup($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $userLevel1, $userAccount, $idOrganization);
            break;
    }
    return $content;
}
开发者ID:lordbasex,项目名称:elastix-gui,代码行数:42,代码来源:index.php

示例2: json_RemoveGroup

 public function json_RemoveGroup()
 {
     $data = json_decode(file_get_contents('php://input'), true);
     $data['username'] = user_decrypt($data['username']);
     $check = $this->checkInput($data, array('username', 'gid'));
     if ($check == '') {
         $return['error'] = deleteGroup($data['gid'], $data['username']);
         if ($return['error'] == 0) {
             $return['value'] = "Successfully removed";
         } elseif ($return['error'] == -1) {
             $return['value'] = "Cannot remove: Don't have owner privileges";
         } elseif ($return['error'] == -2) {
             $return['value'] = "Not a member of this group";
         } else {
             $return['value'] = "Something has gone terribly wrong";
         }
     } else {
         $return['error'] = -3;
         $return['value'] = $check;
     }
     $jsonstring = json_encode($return);
     echo $jsonstring;
 }
开发者ID:tonyward,项目名称:Teameet,代码行数:23,代码来源:group.php

示例3: mysql_close

"></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";
开发者ID:AwelEshetu,项目名称:school_projects,代码行数:31,代码来源:edit_groups.php

示例4: readRulesets

 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);
                         $characters = readCharacters($conn);
                     } else {
                         if ($type == "deletePlayer") {
                             $message = deletePlayer($conn);
                             $players = readPlayers($conn);
                         } else {
开发者ID:Wethospu,项目名称:gw2dungeons,代码行数:31,代码来源:interface_exec.php

示例5: deleteGroup

<?php

//falta por aqui algum html para perguntar se o gajo quer mm apagar a poll
include 'database/polls_fetch.php';
include 'database/polls_modify.php';
$group_id = $_POST['group_id'];
deleteGroup($group_id);
header("Location:manage_polls.php");
开发者ID:filipedgb,项目名称:Polly,代码行数:8,代码来源:delete_poll.php

示例6: deleteGroup

<?php

\OCP\User::checkLoggedIn();
\OCP\App::checkAppEnabled('ownnote');

require_once 'ownnote/lib/backend.php';

echo deleteGroup("Notes", $_POST['group']);

?>
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:10,代码来源:deletegroup.php

示例7: deleteRack

function deleteRack()
{
    assertUIntArg('rack_id');
    $rackData = spotEntity('rack', $_REQUEST['rack_id']);
    ###############################################################################################
    # delete zabbix group
    $result = deleteGroup($rackData["name"]);
    if (isset($result["error"])) {
        showError("Deleting zabbix group is failed. Error message:" . $result["error"]);
    }
    # END
    ###############################################################################################
    amplifyCell($rackData);
    if (count($rackData['mountedObjects'])) {
        showFuncMessage(__FUNCTION__, 'ERR1');
        return;
    }
    releaseFiles('rack', $_REQUEST['rack_id']);
    destroyTagsForEntity('rack', $_REQUEST['rack_id']);
    usePreparedDeleteBlade('RackSpace', array('rack_id' => $_REQUEST['rack_id']));
    commitDeleteObject($_REQUEST['rack_id']);
    resetRackSortOrder($rackData['row_id']);
    showFuncMessage(__FUNCTION__, 'OK', array($rackData['name']));
    ##############################################################################################
    # delete position information from DB
    usePreparedDeleteBlade('rack_position', array('rack_id' => $_REQUEST["rack_id"]));
    # delete airconditioner information from DB
    usePreparedDeleteBlade('rack_airconditioner', array('rack_id' => $_REQUEST["rack_id"]));
    ##############################################################################################
    return buildRedirectURL('rackspace', 'default');
}
开发者ID:micromachine,项目名称:RackTables-ZABBIX-bridge,代码行数:31,代码来源:ophandlers.php

示例8: vtlib_purify

<?php

/*+********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
 * ("License"); You may not use this file except in compliance with the License
 * The Original Code is:  vtiger CRM Open Source
 * The Initial Developer of the Original Code is vtiger.
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
 ********************************************************************************/
require_once 'include/utils/UserInfoUtil.php';
global $adb;
$del_id = vtlib_purify($_REQUEST['delete_group_id']);
$transfer_group_id = vtlib_purify($_REQUEST['transfer_group_id']);
$assignType = vtlib_purify($_REQUEST['assigntype']);
if ($assignType == 'T') {
    $transferId = vtlib_purify($_REQUEST['transfer_group_id']);
} elseif ($assignType == 'U') {
    $transferId = vtlib_purify($_REQUEST['transfer_user_id']);
}
//Updating the user2 vtiger_role vtiger_table
deleteGroup($del_id, $transferId);
header("Location: index.php?action=listgroups&module=Settings&parenttab=Settings");
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:23,代码来源:DeleteGroup.php

示例9: clearVariable

		}
?>
<form action="?category=admin/groups" method="post"><p>Nazwa grupy: <input type="text" maxlength="30" size="16" name="group" /> <input type="submit" name="addgroup" value="Dodaj" /></p></form>

<hr />
<hr />
<h3>Istniejące grupy</h3>

<?php
    if ($action == 'delete') {
        if (!empty($_GET['id'])) {
		        $id = clearVariable($_GET['id']);
                $deleteStatus;

                include('php/deletegroup.php');
		        $deleteStatus = deleteGroup($id);

                echo $deleteStatus;        
        }
    }
?>

<table cellpadding="0" cellspacing="2">
<tr>
<th>Id</th>
<th>Nazwa grupy</th>
<th>Ilość użyt.</th>
</tr>
<?php		
		// wywołanie funkcji łączącej się z bazą
		$database = connectDatabase();
开发者ID:nirme,项目名称:dominatrix2000,代码行数:31,代码来源:groups.php

示例10: array

     $options['owner'] = "zhangsan";
     $options['members'] = array("wangwu", "lisi");
     var_dump(createGroup($options));
     break;
 case 45:
     //修改群组信息
     $group_id = "124113058216804760";
     $options['groupname'] = "group002";
     $options['description'] = "修改群描述";
     $options['maxusers'] = 300;
     var_dump(modifyGroupInfo($group_id, $options));
     break;
 case 46:
     //删除群组
     $group_id = "124113058216804760";
     var_dump(deleteGroup($group_id));
     break;
 case 47:
     //获取群组中的成员
     $group_id = "122633509780062768";
     var_dump(getGroupUsers($group_id));
     break;
 case 48:
     //群组单个加人-----------
     $group_id = "122633509780062768";
     $username = "lisi";
     var_dump(addGroupMember($group_id, $username));
     break;
 case 49:
     //群组批量加人
     $group_id = "122633509780062768";
开发者ID:lzstg,项目名称:emchat,代码行数:31,代码来源:easemobtest.php

示例11: array

     $rv = array();
     $rv['result'] = array();
     //result
     foreach ($data['group']['defs'] as $recID => $rt) {
         array_push($rv['result'], updateUserGroup('group', $colNames, $recID, null, $rt));
     }
     break;
 case 'deleteGroup':
     $rv = array();
     if (!$recID) {
         $rv['error'] = "invalid or not ID sent with deleteGroup method call to saveUsergrps.php";
     } else {
         if (intval($recID) == 2) {
             $rv['error'] = "Can't delete system group 'Database Managers'";
         } else {
             $rv = deleteGroup($recID);
         }
     }
     break;
 case 'changeRole':
     $recIds = @$_REQUEST['recIDs'];
     $newRole = @$_REQUEST['role'];
     $oldRole = @$_REQUEST['oldrole'];
     if (!$recID || !$recIds || !$newRole) {
         $rv = array();
         $rv['error'] = "invalid or not IDs sent with changeRole method call to saveUsergrps.php";
     } else {
         $rv = changeRole($recID, $recIds, $newRole, $oldRole, true, true);
         if (!array_key_exists('error', $rv)) {
             //$rv['rectypes'] = getAllRectypeStructures();
         }
开发者ID:beoutsports,项目名称:heurist-v3-1,代码行数:31,代码来源:saveUsergrps.php

示例12: deleteDepartment

        deleteDepartment($_POST["dep_id"]);
        //edit category
    } else {
        if ($_POST["procedure"] == "EDIT_DEPARTMENT") {
            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">
开发者ID:kumarkvk,项目名称:kumar_shifts,代码行数:31,代码来源:manageJobs.php

示例13: header

<?php

include "adminapi.php";
$id = $_GET['id'];
if (!isset($_POST["id"])) {
    if (!isset($_GET["id"])) {
        return header("Location: index.php");
    }
} else {
    $rs = deleteGroup($id);
    if ($rs == true) {
        header("Location: index.php");
    }
}
$form = findGroupById($id);
$pageTitle = "Deleting Group: {$form['name']}";
$pageInfo = "";
$submitPage = $_SERVER["REQUEST_URI"];
$submitLabel = "Delete Group";
include 'header.php';
?>
<body id="edit_organization" class="organizations">
	<?php 
make_navbar('Groups');
?>
	<div id="body" class="wrap">
		<h3><?php 
echo $pageTitle;
?>
</h3>
		<form name="viewGroupForm" method="post" action="<?php 
开发者ID:mainakbiswas,项目名称:openqwaq,代码行数:31,代码来源:deletegroup.php

示例14: groupManagementForm


//.........这里部分代码省略.........
\t\t\t\t\t\t</script>

\t\t\t\t\t\t<input type="submit" name="btnAddUserToGroup" value="Add User to Group" />
\t\t\t\t\t</form>
\t\t\t\t</fieldset>
GROUPEDITFORM;
        }
        $groupEditForm .= <<<GROUPEDITFORM
\t\t\t<br />
\t\t\t<fieldset style="padding: 8px">
\t\t\t\t<legend>{$ICONS['Group Associate Form']['small']}Associate With Form</legend>
\t\t\t\t<form name="groupassociationform" action="./+admin&subaction=editgroups&subsubaction=associateform&groupname={$groupRow['group_name']}" method="POST">
\t\t\t\t\t{$associateForm}
\t\t\t\t</form>
\t\t\t</fieldset>
GROUPEDITFORM;
        return $groupEditForm;
    }
    if ($subAction == 'editgrouppriorities') {
        $modifiableCount = count($modifiableGroups);
        $userMaxPriority = $maxPriorityGroup = 1;
        if ($modifiableCount != 0) {
            $userMaxPriority = max($modifiableGroups[0]['group_priority'], $modifiableGroups[$modifiableCount - 1]['group_priority']);
            $maxPriorityGroup = $modifiableGroups[0]['group_priority'] > $modifiableGroups[$modifiableCount - 1]['group_priority'] ? $modifiableGroups[0]['group_id'] : $modifiableGroups[$modifiableCount - 1]['group_id'];
        }
        if (isset($_GET['dowhat']) && !is_null($groupId)) {
            if ($_GET['dowhat'] == 'incrementpriority' || $_GET['dowhat'] == 'decrementpriority') {
                shiftGroupPriority($currentUserId, $groupRow['group_name'], $_GET['dowhat'] == 'incrementpriority' ? 'up' : 'down', $userMaxPriority, true);
            } elseif ($_GET['dowhat'] == 'movegroupup' || $_GET['dowhat'] == 'movegroupdown') {
                shiftGroupPriority($currentUserId, $groupRow['group_name'], $_GET['dowhat'] == 'movegroupup' ? 'up' : 'down', $userMaxPriority, false);
            } elseif ($_GET['dowhat'] == 'emptygroup') {
                emptyGroup($groupRow['group_name']);
            } elseif ($_GET['dowhat'] == 'deletegroup') {
                if (deleteGroup($groupRow['group_name'])) {
                    $virtue = '';
                    $maxPriorityGroup = getMaxPriorityGroup($pagePath, $currentUserId, array_reverse(getGroupIds($currentUserId)), $virtue);
                    $modifiableGroups = getModifiableGroups($currentUserId, $maxPriorityGroup, $ordering = 'asc');
                }
            }
            $modifiableGroups = reevaluateGroupPriorities($modifiableGroups);
        } elseif (isset($_GET['dowhat']) && $_GET['dowhat'] == 'addgroup') {
            if (isset($_POST['txtGroupName']) && isset($_POST['txtGroupDescription']) && isset($_POST['selGroupPriority'])) {
                $existsQuery = 'SELECT `group_id` FROM `' . MYSQL_DATABASE_PREFIX . "groups` WHERE `group_name` = '" . escape($_POST['txtGroupName']) . "'";
                $existsResult = mysql_query($existsQuery);
                if (trim($_POST['txtGroupName']) == '') {
                    displayerror('Cannot create a group with an empty name. Please type in a name for the new group.');
                } elseif (mysql_num_rows($existsResult) >= 1) {
                    displayerror('A group with the name you specified already exists.');
                } else {
                    $idQuery = 'SELECT MAX(`group_id`) FROM `' . MYSQL_DATABASE_PREFIX . 'groups`';
                    $idResult = mysql_query($idQuery);
                    $idRow = mysql_fetch_row($idResult);
                    $newGroupId = 2;
                    if (!is_null($idRow[0])) {
                        $newGroupId = $idRow[0] + 1;
                    }
                    $newGroupPriority = 1;
                    if ($_POST['selGroupPriority'] <= $userMaxPriority && $_POST['selGroupPriority'] > 0) {
                        $newGroupPriority = escape($_POST['selGroupPriority']);
                    }
                    $addGroupQuery = 'INSERT INTO `' . MYSQL_DATABASE_PREFIX . 'groups` (`group_id`, `group_name`, `group_description`, `group_priority`) ' . "VALUES({$newGroupId}, '" . escape($_POST['txtGroupName']) . "', '" . escape($_POST['txtGroupDescription']) . "', '{$newGroupPriority}')";
                    $addGroupResult = mysql_query($addGroupQuery);
                    if ($addGroupResult) {
                        displayinfo('New group added successfully.');
                        if (isset($_POST['chkAddMe'])) {
                            $insertQuery = 'INSERT INTO `' . MYSQL_DATABASE_PREFIX . "usergroup`(`user_id`, `group_id`) VALUES ('{$currentUserId}', '{$newGroupId}')";
开发者ID:nobelium,项目名称:pragyan,代码行数:67,代码来源:admin.lib.php

示例15: lang

                    $errors[] = lang("GROUP_USER_ADD_FAILED");
                }
            }
        }
    } else {
        if ($form == "deleteUser") {
            $user_id = $_POST["userId"];
            $deleted = deleteGroupMember($groupId, $user_id);
            if ($deleted) {
                $successes[] = lang("GROUP_USER_UNSUBSCRIBE");
            } else {
                $errors[] = lang("GROUP_USER_UNSUBSCRIBE_FAILED");
            }
        } else {
            if ($form == "deleteGroup") {
                $deleted = deleteGroup($groupId);
                if ($deleted) {
                    $successes[] = lang("GROUP_DELETED");
                } else {
                    $errors[] = lang("GROUP_DELETE_FAILED");
                }
            }
        }
    }
}
//Fetch information of specific group
$groupData = fetchGroupDetail($loggedInUser->user_id, $groupId);
//Fetch member of specific group
$memberData = fetchGroupMember($groupId);
require_once "{$path}/models/header.php";
?>
开发者ID:ArnaudParant,项目名称:santaLetter,代码行数:31,代码来源:group_members.php


注:本文中的deleteGroup函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。