• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getGroup函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getGroup

function getGroup($id)
{
    global $db;
    $query_select = $db->query("SELECT * FROM catalog_groups WHERE `id`='{$id}'");
    $res = $db->fetch_assoc($query_select);
    if ($res["parent"] == 0) {
        $result[$res['id']] = $res;
    } else {
        $result = getGroup($res["parent"]);
    }
    return $result;
}
开发者ID:progervlad,项目名称:utils,代码行数:12,代码来源:subs.php


示例2: createGroup

function createGroup($params)
{
    if (is_array($error = secureRequest($params, TRUE))) {
        return $error;
    }
    global $groupEnforceGroupPerms, $requestingAgent, $uuidZero, $groupDBCon;
    $groupID = $params["GroupID"];
    $name = addslashes($params["Name"]);
    $charter = addslashes($params["Charter"]);
    $insigniaID = $params["InsigniaID"];
    $founderID = $params["FounderID"];
    $membershipFee = $params["MembershipFee"];
    $openEnrollment = $params["OpenEnrollment"];
    $showInList = $params["ShowInList"];
    $allowPublish = $params["AllowPublish"];
    $maturePublish = $params["MaturePublish"];
    $ownerRoleID = $params["OwnerRoleID"];
    $everyonePowers = $params["EveryonePowers"];
    $ownersPowers = $params["OwnersPowers"];
    // Create group
    $sql = "INSERT INTO osgroup\n                (GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList, AllowPublish, MaturePublish, OwnerRoleID)\n                VALUES\n                ('{$groupID}', '{$name}', '{$charter}', '{$insigniaID}', '{$founderID}', {$membershipFee}, {$openEnrollment}, {$showInList}, {$allowPublish}, {$maturePublish}, '{$ownerRoleID}')";
    if (!mysql_query($sql, $groupDBCon)) {
        return array('error' => "Could not successfully run query ({$sql}) from DB: " . mysql_error(), 'params' => var_export($params, TRUE));
    }
    // Create Everyone Role
    // NOTE: FIXME: This is a temp fix until the libomv enum for group powers is fixed in OpenSim
    $result = _addRoleToGroup(array('GroupID' => $groupID, 'RoleID' => $uuidZero, 'Name' => 'Everyone', 'Description' => 'Everyone in the group is in the everyone role.', 'Title' => "Member of {$name}", 'Powers' => $everyonePowers));
    if (isset($result['error'])) {
        return $result;
    }
    // Create Owner Role
    $result = _addRoleToGroup(array('GroupID' => $groupID, 'RoleID' => $ownerRoleID, 'Name' => 'Owners', 'Description' => "Owners of {$name}", 'Title' => "Owner of {$name}", 'Powers' => $ownersPowers));
    if (isset($result['error'])) {
        return $result;
    }
    // Add founder to group, will automatically place them in the Everyone Role, also places them in specified Owner Role
    $result = _addAgentToGroup(array('AgentID' => $founderID, 'GroupID' => $groupID, 'RoleID' => $ownerRoleID));
    if (isset($result['error'])) {
        return $result;
    }
    // Select the owner's role for the founder
    $result = _setAgentGroupSelectedRole(array('AgentID' => $founderID, 'RoleID' => $ownerRoleID, 'GroupID' => $groupID));
    if (isset($result['error'])) {
        return $result;
    }
    // Set the new group as the founder's active group
    $result = _setAgentActiveGroup(array('AgentID' => $founderID, 'GroupID' => $groupID));
    if (isset($result['error'])) {
        return $result;
    }
    return getGroup(array("GroupID" => $groupID));
}
开发者ID:priest,项目名称:flotsam,代码行数:52,代码来源:xmlrpc.php


示例3: isUserInRole

function isUserInRole($group)
{
    $g = getGroup();
    if ($group == 'admin') {
        return $g == 'admin';
    }
    if ($group == 'user') {
        return $g == 'admin' || $g == 'user';
    }
    if ($group == 'guest') {
        return $g == 'admin' || $g == 'user' || $g == 'guest';
    }
    return false;
}
开发者ID:hackyourlife,项目名称:evoc,代码行数:14,代码来源:session.php


示例4: getUsersGroups

function getUsersGroups($mysqli, $userId)
{
    if (doesUserExist($mysqli, $userId)) {
        if ($stmt = $mysqli->prepare("SELECT group_id FROM members_groups WHERE member_id = ?")) {
            $stmt->bind_param("i", $userId);
            $stmt->execute();
            $stmt->store_result();
            $stmt->bind_result($groupId);
            $result = array();
            while ($stmt->fetch()) {
                $group = getGroup($mysqli, $groupId);
                if (is_array($group)) {
                    array_push($result, $group);
                }
            }
            return $result;
        } else {
            return "Faulty MYSQLI Statement";
        }
    } else {
        return "User does not exist";
    }
}
开发者ID:DXPower,项目名称:Afterschool,代码行数:23,代码来源:functions.php


示例5: getUser

        $user = getUser($R_user['user_id'], true);
        echo '	<tr>' . chr(10);
        echo '		<td>' . '<a href="user.php?user_id=' . $user['user_id'] . '">' . iconHTML('user') . ' ' . $user['user_name'] . '</a>' . '</td>' . chr(10);
        echo '		<td>' . $user['user_name_short'] . '</td>' . chr(10);
        echo '		<td>';
        $area_user = getArea($user['user_area_default']);
        if (!count($area_user)) {
            $area_user['area_name'] = '';
        }
        echo $area_user['area_name'];
        echo '</td>' . chr(10);
        echo '	</tr>' . chr(10) . chr(10);
    }
    echo '</table>' . chr(10);
} else {
    $group = getGroup($_GET['gid']);
    if (count($group)) {
        echo '<b>Viser brukergruppen ' . $group['group_name'] . '</b><br />' . chr(10);
        echo '<a href="telefonliste.php?gid=' . $group['group_id'] . '">Vis som telefonliste</a><br />';
        if (!count($group['users'])) {
            echo '<i>Ingen brukere p&aring; denne listen</i>';
        } else {
            echo '<table class="prettytable">';
            echo '	<tr>' . chr(10);
            echo '		<th>Navn</th>' . chr(10);
            echo '		<th>Telefon</th>' . chr(10);
            echo '		<th>Stilling</th>' . chr(10);
            echo '	</tr>' . chr(10);
            foreach ($group['users'] as $user) {
                $user = getUser($user);
                if (count($user) && !$user['deactivated']) {
开发者ID:hnJaermuseet,项目名称:JM-booking,代码行数:31,代码来源:user_list.php


示例6: getGroup

?>
 <b
                        class="caret"></b></a>
                <ul class="dropdown-menu">
                    <li>
                        <a href="profile.php"><i class="fa fa-fw fa-user"></i> Profile</a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="logout.php"><i class="fa fa-fw fa-power-off"></i> Log Out</a>
                    </li>
                </ul>
            </li>
        </ul>
        <?php 
$data = getGroup($_SESSION["login_user"]);
?>
        <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
        <div class="collapse navbar-collapse navbar-ex1-collapse">
            <ul class="nav navbar-nav side-nav">
                <li class="active">
                    <a href="dashboard.php"><i class="fa fa-fw fa-dashboard"></i> Dashboard</a>
                </li>
                <li>
                    <a href="javascript:" data-toggle="collapse" data-target="#demo"><i
                            class="fa fa-fw fa-arrows-v"></i> My Groups <i class="fa fa-fw fa-caret-down"></i></a>
                    <ul id="demo" class="collapse">

                        <?php 
foreach ($data as $oneGroup) {
    //echo "<li><form action='grouppage.php' method='post'><input type='submit' name='groupname' value='$oneGroup[0]'/></form></li>";
开发者ID:blingenau,项目名称:StudyBuddy-Plus,代码行数:31,代码来源:dashboard.php


示例7: getUsersForDataFileName

/**
 * Usage: Look for a certain file (param filename) for all users of this group.
 * Return a list of users that have this file
 * 1. Get the group the user is a member of
 * 2a. User is in a group
 *    - search all users if the have the file (param filename)
 * 2b. User is not in a group
 *    - search for the file for this user only (param user)
 * @param type $user Example 'John'
 * @param type $excludeRequestingUser exclude the requesting user (example 'John') from the returned result
 * @param type $fileName Example: '2013-03-18.gpx'
 * @return string String containing all found user names separated by a newline char
 * (every line contains one user)
 */
function getUsersForDataFileName($user, $fileName, $excludeRequestingUser)
{
    if (!writeAllGpxFromCsvForGroup($user)) {
        return '';
    }
    $users = '';
    $group = getGroup($user);
    if ($group == '') {
        if (!isNullOrEmptyString($excludeRequestingUser)) {
            if ($user == $excludeRequestingUser) {
                return $users;
            }
        }
        $dataFile = USER_DIR . DIRECTORY_SEPARATOR . $user . DIRECTORY_SEPARATOR . $fileName;
        if (is_file($dataFile)) {
            $users = $user;
        }
    } else {
        if ($handle = opendir(USER_DIR)) {
            while (false !== ($entry = readdir($handle))) {
                if ($entry == $excludeRequestingUser) {
                    continue;
                }
                $userDir = USER_DIR . DIRECTORY_SEPARATOR . $entry;
                if (is_dir($userDir)) {
                    $groupFile = $userDir . DIRECTORY_SEPARATOR . GROUP_FILE;
                    if (is_file($groupFile)) {
                        $foundGroup = file_get_contents($groupFile);
                        if ($foundGroup == $group) {
                            $userDataFile = $userDir . DIRECTORY_SEPARATOR . $fileName;
                            if (is_file($userDataFile)) {
                                if (!isNullOrEmptyString($users)) {
                                    $users .= PHP_EOL;
                                }
                                $users .= $entry;
                            }
                        }
                    }
                }
            }
            closedir($handle);
        }
    }
    return $users;
}
开发者ID:einervonvielen,项目名称:mushrooms,代码行数:59,代码来源:util.php


示例8: die

    die('Direct access not permitted');
}
?>

<body>
  <main>
    <?php 
include "header.inc";
?>
    <div class="content">
      <!-- make sure theyre in a group -->
      <?php 
if ($group == 0) {
    echo "<h2>You're not in a group yet!</h2>";
} else {
    $myGroup = getGroup($db, $group);
    ?>

      <h1><?php 
    echo getGroupName($group, $db);
    ?>
</h1>
      <h2 class="subtitle">
      <?php 
    echo getGroupDescription($group, $db) . "<br>" . getGroupType($group, $db) . "<br>" . sizeof($myGroup);
    ?>
 members</h2>
      <br>
      <?php 
    if ($groupLeader == 1) {
        ?>
开发者ID:ruslan-a,项目名称:teamworker,代码行数:31,代码来源:list.php


示例9: adminmsg

     } else {
         adminmsg('operate_success', "{$basename}");
     }
     /* 勋章管理-勋章编辑 */
 } elseif ($type == 'edit') {
     S::gp(array('id'));
     $id = (int) $id;
     if ($id < 1) {
         adminmsg('operate_error', "{$basename}");
     }
     $medal = $medalService->getMedal($id);
     //获取medal信息
     if ($medal['type'] == 0) {
         adminmsg('medal_system_is_not_edit', "{$basename}");
     }
     $creategroup = getGroup($medal['allow_group']);
     //获取用户组
     $openMedal = $medalService->getAllOpenAutoMedals();
     //获取所有开启的勋章
     $openMedal = getMedalJson($openMedal);
     require_once PrintApp('admin_medal_add');
     /* 勋章管理-勋章编辑操作 */
 } elseif ($type == 'editdo') {
     S::gp(array('name', 'image', 'descrip', 'day', 'confine', 'allow_group', 'id'));
     $id = (int) $id;
     if ($id < 1) {
         adminmsg('operate_error', "{$basename}&type=add");
     }
     if ($name == '') {
         adminmsg('勋章名称不得为空', "{$basename}&type=add");
     }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:manage.php


示例10: Table

/**
 * 初始化推广单元
 */
$conn = new Table("local189");
$conn->query("TRUNCATE TABLE  `tianyunzi`.`baidu_group`");
$id = 0;
while (1) {
    $jihuaArr = $conn->findAll("select * from tianyunzi.baidu_jihua where id > '{$id}' order by id asc limit 100");
    if (empty($jihuaArr)) {
        exit("所有计划已经过完\n");
    }
    foreach ($jihuaArr as $value) {
        $id = $value["id"];
        /* 获取当前计划下单元信息 */
        $groupArr = getGroup($value["id"]);
        if (empty($groupArr) || !isset($groupArr["body"]["data"])) {
            echo "计划 " . $value["name"] . " 下没有获取到单元信息\n";
            continue;
        }
        foreach ($groupArr["body"]["data"] as $value1) {
            echo "新增计划[" . $value["name"] . "],单元[" . $value1["adgroupName"] . "]\n";
            $conn->insert(array("id" => $value1["adgroupId"], "groupname" => $value1["adgroupName"], "jihuaId" => $value1["campaignId"], "jihuaname" => $value["name"], "status" => 31), "tianyunzi.baidu_group");
            continue;
        }
    }
}
function getGroup($jihuaId)
{
    $data = array("header" => array("token" => "1f888ce6fb38730a14a6afe7437fc3b4", "username" => "郑州悉知", "password" => "GCWgcd7232275"), "body" => array("adgroupFields" => array("adgroupId", "campaignId", "adgroupName", "status"), "ids" => array($jihuaId), "idType" => 3));
    $ch = curl_init();
开发者ID:tianyunchong,项目名称:php,代码行数:30,代码来源:initGroup.php


示例11: print_r

if (!$statement->execute()) {
    print_r($statement->errorInfo());
    return false;
} else {
    $result = $statement->fetchAll(PDO::FETCH_ASSOC);
}
?>
 

    <h2>Students</h2>
    <div class="scrollContainer">
    <table>
        <tr>    <th>Name</th>   <th>Area of Expertise</th>  <th>Actions</th>    </tr>
        <?php 
// start looping through group members
foreach (getGroup($db, $group) as $a) {
    ?>
          <tr>
            <td>
              <a href="/?page=viewProfile&amp;id=<?php 
    echo $a['id'];
    ?>
">
              <?php 
    if ($a['displayName'] == "") {
        echo $a['name'];
    } else {
        echo $a['displayName'];
    }
    ?>
              </a>
开发者ID:ruslan-a,项目名称:teamworker,代码行数:31,代码来源:adminHome.php


示例12: getDebateViewingStats

/**
 * Return an object with the Debate viewing stats.
 *
 * @param nodeid the nodeid of the Issue node to get the viewing stats for.
 * @param style, the style of node to return - how much data it has (defaults to 'mini' can also be 'long' or 'short')
 * @return 	debateviewingstats class containing properties: groupmembercount, viewingmembercount.
 *  or an Error.
 */
function getDebateViewingStats($nodeid, $groupid)
{
    $group = getGroup($groupid);
    $userset = $group->members;
    $members = $userset->users;
    $memberscount = count($members);
    $node = getNode($nodeid, 'shortactivity');
    $activitySet = $node->activity;
    $activities = $activitySet->activities;
    $count = count($activities);
    $userCheck = array();
    for ($i = 0; $i < $count; $i++) {
        $next = $activities[$i];
        if ($next->type == 'View') {
            if (isset($next->userid) && $next->userid != "" && !in_array($next->userid, $userCheck)) {
                array_push($userCheck, $next->userid);
            }
        }
    }
    class debateviewingstats
    {
        public $groupmembercount = 0;
        public $viewingmembercount = 0;
    }
    $stats = new debateviewingstats();
    $stats->groupmembercount = $memberscount;
    $stats->viewingmembercount = count($userCheck);
    return $stats;
}
开发者ID:uniteddiversity,项目名称:DebateHub,代码行数:37,代码来源:apilib.php


示例13: getGroup

<form method="post" action="#" enctype="multipart/form-data">
    <?php 
$results = getGroup();
?>
    <table>
        <tr>
            <td>
                Group:
            </td>
            <td>
                <select name="address_id">
            <?php 
foreach ($results as $row) {
    ?>
                <option value="<?php 
    echo $row['address_group_id'];
    ?>
">
                    <?php 
    echo $row['address_group'];
    ?>
                </option>
            <?php 
}
?>
            </select>
            </td>
        </tr>
        <tr>
            <td>
                First Name:
开发者ID:rjedwards95,项目名称:PHPClassWinter2016,代码行数:31,代码来源:add-form.php


示例14: PDO

$servername = "104.236.200.134";
$d_username = "buddy";
$d_password = "";
$db_name = "studybuddyplus";
$db_handle = new PDO("mysql:host={$servername};dbname={$db_name}", "{$d_username}", "{$d_password}");
$search_stmt = $db_handle->prepare("SELECT * FROM login WHERE username=?;");
$search_stmt->bindParam(1, $user);
$search_stmt->execute();
$userinfo = $search_stmt->fetchAll();
$firstname = $userinfo[0]['firstname'];
$lastname = $userinfo[0]['lastname'];
$count_stmt = $db_handle->prepare("SELECT COUNT(*) FROM posts WHERE student=?;");
$count_stmt->bindParam(1, $user);
$count_stmt->execute();
$count = $count_stmt->fetchAll();
$groups = getGroup($user);
?>
                    <div class="col-lg-4">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title"><i class="fa fa-info-circle fa-fw"></i>Your Information</h3>
                            </div>
                            <div class="panel-body">
                                <div class="list-group">
                                    <a href="#" class="list-group-item">
                                        <i class="fa fa-fw fa-user"></i> Username: <?php 
echo $userinfo[0]['username'];
?>
                                    </a>
                                    <a href="#" class="list-group-item">
                                        <i class="fa fa-fw fa-male"></i> Your real name: <?php 
开发者ID:blingenau,项目名称:StudyBuddy-Plus,代码行数:31,代码来源:profile.php


示例15: session_start

<?php

session_start();
include "conn/conn.php";
include "inc/func.php";
$sqlstr = "select id,u_name,u_depart,is_on from tb_users where u_user = '" . $_POST[username] . "' and u_pwd = '" . $_POST[pwd] . "'";
$result = mysql_query($sqlstr, $conn);
$record = mysql_fetch_row($result);
if ($record != "" and $record[3] == 1) {
    if (getGroup($conn, $record[1], $_POST[u_group])) {
        $_SESSION["id"] = $record[0];
        $_SESSION["u_name"] = $_POST[username];
        $_SESSION["u_depart"] = read_field($conn, "tb_depart", "d_name", $record[2]);
        $_SESSION["u_group"] = read_field($conn, "tb_group", "u_group", $_POST[u_group]);
        w_log($_POST[action]);
        echo "<script>alert('��ӭ����');location='pub_main.php';</script>";
    } else {
        echo "<script>alert('�û������������');history.go(-1);</script>";
    }
} else {
    echo "<script>alert('�û������������');history.go(-1);</script>";
}
开发者ID:noikiy,项目名称:web,代码行数:22,代码来源:index_ok.php


示例16: loadAlerts

function loadAlerts()
{
    global $ThisUsername;
    //gain access to the curent username
    global $ThisUsers;
    //gain access to the current user data
    global $ThisSchools;
    //gain access to the current school data
    global $ThisGroups;
    //gain access to the current group data
    global $ThisOrders;
    //gain access to the current order data
    global $ThisProjects;
    //gain access to the current project data
    global $alertHtml;
    //gain access to the alert html variable (end display html)
    global $alertRemovedA;
    //gain access to the array of removed alerts
    global $alertA;
    //gain access to the array of all alerts
    getUser($ThisUsername);
    //load the current user data based upon the user's username
    getSchool($ThisUsers['School Code']);
    //load the current school data for this user
    getGroup($ThisUsers['Group Code']);
    //load the current group data for this user
    getOrder($ThisGroups['Order Code']);
    //load the current order data for this group
    getProject($ThisOrders['Doc Code']);
    //load the current project data for this order
    $userDBAlertsA = explode("&&&", $ThisUsers['Alerts']);
    //split the user alert data string by &&& and store this array
    if (count($userDBAlertsA) == 2) {
        //if this array has two parts, (one &&& seperator)
        $alertRemovedA = explode(",,,", $userDBAlertsA[0]);
        //split the first part by ,,, and make these items the removed alerts (add the user removed alerts)
        addAlerts($userDBAlertsA[1]);
        //and process the other part using the addAlerts function (add the user alerts with respect to the removed alerts)
    }
    addAlerts($ThisSchools['Alerts']);
    //add the school alerts with respect to the removed alerts
    addAlerts($ThisGroups['Alerts']);
    //add the group alerts with respect to the removed alerts
    addAlerts($ThisOrders['Alerts']);
    //add the order alerts with respect to the removed alerts
    addAlerts($ThisProjects['Alerts']);
    //add the project alerts with respect to the removed alerts
    addAlerts("13,,,12,,,0,,,This is an alert! these can be sent to peeples' dashboards! They can be sent per group, school, individual, etc. ! This one should be blueish! Dale and Erik, you can make it look basicly however you want as long as it is stackable in this right pane!");
    //example alert
    addAlerts("23,,,22,,,1,,,Alerts basicly go away forever when you dismiss them.. these are just for testing.. This should be yellow-ish!");
    //example alert
    addAlerts("34,,,33,,,2,,,This one should be red-sih! WARNING! THE WORLD HAS ENDED!");
    //example alert
    $alertHtml = "";
    //set the alert html to be blank
    for ($i = 0; $i < count($alertA); $i++) {
        //for each alert that is to be printed,
        $thisAlertA = $alertA[$i];
        //create a temporary variable to store the data for this alert
        $alertHtml = $alertHtml . '<div class="alert-item-outer color-' . $thisAlertA[2] . '" id="alert-' . $thisAlertA[0] . '"><p align="left">' . $thisAlertA[3] . '</p><p align="right"><a style="color:#606060;" href="#" onclick="dismissAlert(' . "'" . $thisAlertA[0] . "'" . ');">Dismiss</a></p></div>';
        //add this alert
    }
    if ($alertHtml == '') {
        //if no alerts were added
        $alertHtml = '<p style="margin-top:3em;color:#ffffff;font-size: 300%;">No new alerts at this time</p>';
        //display the no new alerts text
    }
}
开发者ID:radiotech,项目名称:BetaBox,代码行数:68,代码来源:misc.php


示例17: sec_session_start

<?php

include_once 'includes/functions.php';
include_once 'includes/db_connect.php';
sec_session_start();
$id = $_GET['id'];
$group = getGroup($mysqli, $id);
$members = getMembersInGroup($mysqli, $group["id"]);
$school = $group["school"];
$schoolName = $school["name"];
$schoolLocation = $school["location"];
$messages = getBoardMessages($mysqli, $id, 'group');
?>

<!DOCTYPE html>
<html>
    <head>
        <title>After School</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="css/main.css" />
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>  
        <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-7s5uDGW3AHqw6xtJmNNtr+OBRJUlgkNJEo78P4b0yRw= sha512-nNo+yCHEyn0smMxSswnf/OnX6/KwJuZTlNZBjauKhTK0c+zT+q5JOCx0UFhXQ6rJR9jg6Es8gPuD2uZcYDLqSw==" crossorigin="anonymous">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha256-KXn5puMvxCw+dAYznun+drMdG1IFl3agK0p/pqT9KAo= sha512-2e8qq0ETcfWRI4HJBzQiA3UoyFk6tbNyG+qSaIBZLyW9Xf3sWZHN/lxe9fTh1U45DpPf07yj94KsUHHWe4Yk1A==" crossorigin="anonymous"></script>
        <script src="js/groupAjax.js"></script>
    </head>
    <body>
        <h1><?php 
echo $group["name"];
?>
开发者ID:DXPower,项目名称:Afterschool,代码行数:31,代码来源:group.php


示例18: Group_delete

 /**
  \brief Gruppe löschen
 
  Löscht eine Gruppe.
 */
 function Group_delete()
 {
     if (!$this->userdata['rights']['groupedit']) {
         #no permission
         $this->_header("", "no permission");
     }
     $data = $_SESSION['steps'];
     #information message, step 2
     if ($data['deletegroup']) {
         #save step
         unset($data['deletegroup']);
         $_SESSION['steps'] = $data;
         $this->forms['information']['url'] = $this->backtracking->backlink();
         $this->forms['information']['title'] = "Gruppe löschen";
         $this->forms['information']['message'] = "Gruppe erfolgreich gelöscht";
         $this->forms['information']['style'] = "green";
         $this->show('message_information', "Gruppe löschen");
     }
     $id = param_num("id");
     if (!$id) {
         $this->_header("", "id fehlt");
     }
     $return = getGroup($id);
     if (!$return) {
         $this->_header("", "ungültige Gruppe");
     }
     #deletegroup, send
     if ($_REQUEST['send']) {
         if ($_REQUEST['yes_x']) {
             addToLogfile("Gruppe " . $return['name'] . " gelöscht", "Admin", $this->userdata['uid']);
             deletegroup($return['gid']);
             #save step
             $data['deletegroup'] = 1;
             $_SESSION['steps'] = $data;
             $this->_header("admin.php?action=deletegroup&send");
         } else {
             $this->_header();
         }
     } else {
         $this->forms['information']['url'] = "admin.php?id=" . $return['gid'];
         $this->forms['information']['action'] = "deletegroup";
         $this->forms['information']['title'] = "Gruppe löschen";
         $this->forms['information']['message'] = "Gruppe <b>" . $return['name'] . "</b> löschen ?";
         if ($return['gid'] == $this->userdata['gid']) {
             $this->forms['information']['message'] .= "\n          <br><br><b>WARNUNG!!</b><br>\n          <b>Sie sind im Begriff ihre eigene Gruppe zu löschen,<br>\n          Sie könnten dadurch wichtige Rechte unwiederbringlich verlieren!<b/><br>\n          ";
         }
         $this->forms['information']['style'] = "red";
         $this->show('message_question', "Gruppe löschen");
     }
 }
开发者ID:Bobsel,项目名称:gn-tic,代码行数:55,代码来源:admin.class.php


示例19: getGroup

<table>
    <tr>
        <td>
            <form method="POST" action="#">
                Select Group: 
                <select name="address_group_id">
            <?php 
$groups = getGroup();
foreach ($groups as $group) {
    ?>
                <option 
                    <?php 
    if (!empty($selectedGroup) && $selectedGroup == $group['address_group_id']) {
        ?>
                    selected="selected"
                    <?php 
    }
    ?>
                    value="<?php 
    echo $group['address_group_id'];
    ?>
">
                    <?php 
    echo $group['address_group'];
    ?>
                </option>
            <?php 
}
?>
            </select>
                <input type="submit" value="Sort"/>
开发者ID:rjedwards95,项目名称:PHPClassWinter2016,代码行数:31,代码来源:search-bar.php


示例20: rules_read

function rules_read($search = '')
{
    global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH;
    $admintpl->set("rules_add", false, true);
    $admintpl->set("language", $language);
    $admintpl->set("groups", cat_combo_search($_POST['rules_id']));
    $append = '';
    if (strlen($search) > 0 && strlen($_POST['rules_id']) > 0) {
        $append = " AND cat_id = " . sqlesc($_POST['rules_id']) . "";
        $admintpl->set("frm_action", "index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=serch");
    }
    $cres = genrelistrules($append);
    for ($i = 0; $i < count($cres); $i++) {
        $cres[$i]["name"] = format_comment(unesc($cres[$i]["text"]));
        $cres[$i]["sort_index"] = unesc($cres[$i]["sort_index"]);
        $cres[$i]["id"] = unesc($cres[$i]["id"]);
        $cres[$i]["group_name"] = unesc(getGroup($cres[$i]["cat_id"]));
        $cres[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=edit&amp;id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $cres[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=delete&amp;id=" . $cres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
    }
    $admintpl->set("categories", $cres);
    $admintpl->set("rules_add_new", "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=add\">" . $language["RULES_ADD"] . "</a>");
    unset($cres);
}
开发者ID:wilian32,项目名称:xbtit,代码行数:24,代码来源:admin.rules.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getGroupDepsForConditions函数代码示例发布时间:2022-05-15
下一篇:
PHP getGravatar函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap