コード例 #1
0
if (isset($_GET["start"])) {
    $start = $_GET['start'];
}
if (isset($_GET['type'])) {
    $is_gp = $_GET['type'];
} else {
    $is_gp = 0;
}
$params = array('min' => $start, 'max' => $start + $maxperpage, 'filter' => $_GET["filter"]);
if (isset($_GET['favourite'])) {
    $params['canShow'] = true;
    $params['localSidebar'] = true;
}
if ($is_gp == 1) {
    # Profile
    $list = getAllProfiles($params);
    $count = countAllProfiles($params);
} else {
    $list = getAllGroups($params);
    $count = countAllGroups($params);
}
$filter = $_GET["filter"];
$ids = array();
$name = array();
$type = array();
$show = array();
$action_delete = array();
if ($is_gp != 1) {
    // Simple Group
    $delete = new ActionPopupItem(_T("Delete this group", 'dyngroup'), "delete_group", "delete", "id", "base", "computers");
} else {
コード例 #2
0
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * MMC is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MMC.  If not, see <http://www.gnu.org/licenses/>.
 */
/* Add new sidemenu item */
require_once "modules/dyngroup/includes/includes.php";
require_once "modules/pulse2/includes/profiles_xmlrpc.inc.php";
if (isProfilesEnable() && areProfilesPossible()) {
    $sidemenu->addSideMenuItem(new SideMenuItem(_T("All imaging groups", "dyngroup"), "imaging", "manage", "list_profiles", "img/machines/icn_allGroups_active.gif", "img/machines/icn_allGroups_ro.gif"));
    $sidemenu->addSideMenuItem(new SideMenuItem(_T("Add an imaging group", "dyngroup"), "imaging", "manage", "computersprofilecreator", "img/machines/icn_addMachines_active.gif", "img/machines/icn_addMachines_ro.gif"));
}
if (isProfilesEnable()) {
    $items = array();
    $profiles = getAllProfiles(array('canShow' => true));
    foreach ($profiles as $profile) {
        $isA = $profile->isDyn() ? !$profile->isRequest() ? _T('Imaging group:', 'dyngroup') : _T('Dynamic imaging group:', 'dyngroup') : _T('Imaging group:', 'dyngroup');
        $s = new SideMenuItemNoAclCheck(sprintf("%s<br />%s", $isA, $profile->getName()), "imaging", "manage", "display&gid=" . $profile->id . "&type=1&groupname=" . $profile->name);
        $items[$profile->id] = $s;
        $sidemenu->addSideMenuItem($items[$profile->id]);
    }
}
?>

コード例 #3
0
ファイル: menu_group_action.php プロジェクト: psyray/mmc
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MMC.  If not, see <http://www.gnu.org/licenses/>.
 */
$paramArray = array('id' => isset($_GET['id']) ? $_GET['id'] : $_GET['gid'], 'gid' => isset($_GET['gid']) ? $_GET['gid'] : "", 'groupname' => isset($_GET['groupname']) ? $_GET['groupname'] : "", 'type' => isset($_GET['type']) ? $_GET['type'] : "");
$actions = array();
if (isset($_GET['type'])) {
    $is_gp = $_GET['type'] == 'group' ? 1 : $_GET['type'];
} else {
    $is_gp = 0;
}
if ($is_gp && $is_gp == 1) {
    # Profile
    $list = getAllProfiles(array());
} else {
    $list = getAllGroups(array());
}
if ($is_gp != 1) {
    $delete = new ActionPopupItem(_T("Delete this group", 'dyngroup'), "delete_group", "delete", "id", "base", "computers");
} else {
    $delete = new ActionPopupItem(_T("Delete this profile", 'dyngroup'), "delete_group", "delete", "id", "base", "computers");
}
if ($is_gp != 1) {
    // Simple group
    $actions['displayGroup'] = new ActionItem(_T("Display this group's content", 'dyngroup'), "display", "display", "id", "base", "computers");
    if (in_array("inventory", $_SESSION["supportModList"])) {
        $actions['inventory'] = new ActionItem(_T("Inventory on this group", "dyngroup"), "groupinvtabs", "inventory", "inventory", "base", "computers");
    } else {
        # TODO implement the glpi inventory on groups
コード例 #4
0
ファイル: AllUsers.php プロジェクト: Rahim373/MySocialSite
    <body>
        <header>
            <?php 
include 'include/menu.php';
?>
        </header>


        <section>
            <div class="mainbox">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="well"><p>All Profiles</p></div>
                        
                        <?php 
$result = getAllProfiles();
while ($profile = mysqli_fetch_assoc($result)) {
    ?>
                            <div class="box row">
                                <div class="seeprofile">
                                    <div class="head">
                                        <div class="photo">
                                            <img src="<?php 
    echo getProfilePhoto($profile['Profile_Id']);
    ?>
">
                                        </div>
                                        <div class="seeprofilecontent">
                                            <a href="Profile.php?id=<?php 
    echo $profile['Profile_Id'];
    ?>