dropdownUnder() static public method

Dropdown profiles which have rights under the active one
static public dropdownUnder ( $options = [] )
$options array of possible options: - name : string / name of the select (default is profiles_id) - value : integer / preselected value (default 0)
Exemplo n.º 1
0
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     global $CFG_GLPI;
     switch ($input['action']) {
         case "change_authtype":
             $rand = Auth::dropdown(array('name' => 'authtype'));
             $paramsmassaction = array('authtype' => '__VALUE__');
             Ajax::updateItemOnSelectEvent("dropdown_authtype{$rand}", "show_massiveaction_field", $CFG_GLPI["root_doc"] . "/ajax/dropdownMassiveActionAuthMethods.php", $paramsmassaction);
             echo "<span id='show_massiveaction_field'><br><br>";
             echo "<input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Post') . "'>";
             echo "</span>\n";
             return true;
         case "add_user_group":
             $gu = new Group_User();
             return $gu->showSpecificMassiveActionsParameters($input);
         case "add_userprofile":
             Entity::dropdown(array('entity' => $_SESSION['glpiactiveentities']));
             echo ".&nbsp;" . _n('Profile', 'Profiles', 1) . "&nbsp;";
             Profile::dropdownUnder();
             echo ".&nbsp;" . __('Recursive') . "&nbsp;";
             Dropdown::showYesNo("is_recursive", 0);
             echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Add') . "'>";
             return true;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
Exemplo n.º 2
0
 /**
  * Print the user form
  *
  * @param $ID        integer : Id of the user
  * @param $options   array
  *     - target form target
  *     - withtemplate boolean : template or basic item
  *
  * @return boolean : user found
  **/
 function showForm($ID, $options = array())
 {
     global $CFG_GLPI;
     // Affiche un formulaire User
     if ($ID != Session::getLoginUserID() && !self::canView()) {
         return false;
     }
     $this->initForm($ID, $options);
     if ($ID) {
         $caneditpassword = $this->currentUserHaveMoreRightThan($ID);
     } else {
         // can edit on creation form
         $caneditpassword = true;
     }
     $extauth = !($this->fields["authtype"] == Auth::DB_GLPI || $this->fields["authtype"] == Auth::NOT_YET_AUTHENTIFIED && !empty($this->fields["password"]));
     $options['formoptions'] = " enctype='multipart/form-data'";
     $this->showFormHeader($options);
     $rand = mt_rand();
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . __('Login') . "</td>";
     // si on est dans le cas d'un ajout , cet input ne doit plus etre hidden
     if ($this->fields["name"] == "") {
         echo "<td><input name='name' value=\"" . $this->fields["name"] . "\"></td>";
         // si on est dans le cas d'un modif on affiche la modif du login si ce n'est pas une auth externe
     } else {
         if (!empty($this->fields["password"]) || $this->fields["authtype"] == Auth::DB_GLPI) {
             echo "<td>";
             echo "<input name='name' value=\"" . $this->fields["name"] . "\"></td>";
         } else {
             echo "<td class='b'>" . $this->fields["name"];
             echo "<input type='hidden' name='name' value=\"" . $this->fields["name"] . "\"></td>";
         }
     }
     if (!empty($this->fields["name"])) {
         echo "<td rowspan='3'>" . __('Picture') . "</td>";
         echo "<td rowspan='3'>";
         echo "<div class='user_picture_border_small' id='picture{$rand}'>";
         echo "<img class='user_picture_small' alt=\"" . __s('Picture') . "\" src='" . User::getThumbnailURLForPicture($this->fields['picture']) . "'>";
         //         echo "<img src='".self::getURLForPicture($this->fields["picture"])."' class='user_picture'/>";
         echo "</div>";
         $full_picture = "<div class='user_picture_border'>";
         $full_picture .= "<img class='user_picture' alt=\"" . __s('Picture') . "\" src='" . User::getURLForPicture($this->fields['picture']) . "'>";
         $full_picture .= "</div>";
         Html::showTooltip($full_picture, array('applyto' => "picture{$rand}"));
         echo "<input type='file' name='picture' accept='image/*'>";
         echo "<input type='checkbox' name='_blank_picture'>&nbsp;" . __('Clear');
         echo "</td>";
     } else {
         echo "<td rowspan='3'></td>";
         echo "<td rowspan='3'></td>";
     }
     echo "</tr>";
     echo "<tr class='tab_bg_1'><td>" . __('Surname') . "</td><td>";
     Html::autocompletionTextField($this, "realname");
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'><td>" . __('First name') . "</td><td>";
     Html::autocompletionTextField($this, "firstname");
     echo "</td></tr>";
     //do some rights verification
     if (self::canUpdate() && (!$extauth || empty($ID)) && $caneditpassword) {
         echo "<tr class='tab_bg_1'>";
         echo "<td>" . __('Password') . "</td>";
         echo "<td><input id='password' type='password' name='password' value='' size='20'\n                    autocomplete='off' onkeyup=\"return passwordCheck();\"></td>";
         echo "<td rowspan='2'>" . __('Password security policy') . "</td>";
         echo "<td rowspan='2'>";
         Config::displayPasswordSecurityChecks();
         echo "</td></tr>";
         echo "<tr class='tab_bg_1'>";
         echo "<td>" . __('Password confirmation') . "</td>";
         echo "<td><input type='password' name='password2' value='' size='20' autocomplete='off'>";
         echo "</td></tr>";
     }
     echo "<tr class='tab_bg_1'>";
     if (!GLPI_DEMO_MODE) {
         echo "<td>" . __('Active') . "</td><td>";
         Dropdown::showYesNo('is_active', $this->fields['is_active']);
         echo "</td>";
     } else {
         echo "<td colspan='2'></td>";
     }
     echo "<td>" . _n('Email', 'Emails', Session::getPluralNumber());
     UserEmail::showAddEmailButton($this);
     echo "</td><td>";
     UserEmail::showForUser($this);
     echo "</td>";
     echo "</tr>";
     if (!GLPI_DEMO_MODE) {
         echo "<tr class='tab_bg_1'>";
         echo "<td>" . __('Valid since') . "</td><td>";
         Html::showDateTimeField("begin_date", array('value' => $this->fields["begin_date"], 'timestep' => 1, 'maybeempty' => true));
         echo "</td>";
         echo "<td>" . __('Valid until') . "</td><td>";
         Html::showDateTimeField("end_date", array('value' => $this->fields["end_date"], 'timestep' => 1, 'maybeempty' => true));
         echo "</td></tr>";
     }
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . __('Phone') . "</td><td>";
     Html::autocompletionTextField($this, "phone");
     echo "</td>";
     //Authentications information : auth method used and server used
     //don't display is creation of a new user'
     if (!empty($ID)) {
         if (Session::haveRight(self::$rightname, self::READAUTHENT)) {
             echo "<td>" . __('Authentication') . "</td><td>";
             echo Auth::getMethodName($this->fields["authtype"], $this->fields["auths_id"]);
             if (!empty($this->fields["date_sync"])) {
                 //TRANS: %s is the date of last sync
                 echo '<br>' . sprintf(__('Last synchronization on %s'), HTML::convDateTime($this->fields["date_sync"]));
             }
             if (!empty($this->fields["user_dn"])) {
                 //TRANS: %s is the user dn
                 echo '<br>' . sprintf(__('%1$s: %2$s'), __('User DN'), $this->fields["user_dn"]);
             }
             if ($this->fields['is_deleted_ldap']) {
                 echo '<br>' . __('User missing in LDAP directory');
             }
             echo "</td>";
         } else {
             echo "<td colspan='2'>&nbsp;</td>";
         }
     } else {
         echo "<td colspan='2'><input type='hidden' name='authtype' value='1'></td>";
     }
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . __('Mobile phone') . "</td><td>";
     Html::autocompletionTextField($this, "mobile");
     echo "</td>";
     echo "<td>" . __('Category') . "</td><td>";
     UserCategory::dropdown(array('value' => $this->fields["usercategories_id"]));
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . __('Phone 2') . "</td><td>";
     Html::autocompletionTextField($this, "phone2");
     echo "</td>";
     echo "<td rowspan='4' class='middle'>" . __('Comments') . "</td>";
     echo "<td class='center middle' rowspan='4'>";
     echo "<textarea cols='45' rows='6' name='comment' >" . $this->fields["comment"] . "</textarea>";
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'><td>" . __('Administrative number') . "</td><td>";
     Html::autocompletionTextField($this, "registration_number");
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'><td>" . _x('person', 'Title') . "&nbsp;:</td><td>";
     UserTitle::dropdown(array('value' => $this->fields["usertitles_id"]));
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'>";
     if (!empty($ID)) {
         echo "<td>" . __('Location') . "</td><td>";
         $entities = Profile_User::getUserEntities($ID, true);
         if (count($entities) <= 0) {
             $entities = -1;
         }
         Location::dropdown(array('value' => $this->fields["locations_id"], 'entity' => $entities));
         echo "</td>";
     }
     echo "</tr>";
     if (empty($ID)) {
         echo "<tr class='tab_bg_1'>";
         echo "<th colspan='2'>" . _n('Authorization', 'Authorizations', 1) . "</th>";
         echo "<td>" . __('Recursive') . "</td><td>";
         Dropdown::showYesNo("_is_recursive", 0);
         echo "</td></tr>";
         echo "<tr class='tab_bg_1'>";
         echo "<td>" . __('Profile') . "</td><td>";
         Profile::dropdownUnder(array('name' => '_profiles_id', 'value' => Profile::getDefault()));
         echo "</td><td>" . __('Entity') . "</td><td>";
         Entity::dropdown(array('name' => '_entities_id', 'display_emptychoice' => false, 'entity' => $_SESSION['glpiactiveentities']));
         echo "</td></tr>";
     } else {
         if ($caneditpassword) {
             echo "<tr class='tab_bg_1'>";
             echo "<td>" . __('Default profile') . "</td><td>";
             $options = Dropdown::getDropdownArrayNames('glpi_profiles', Profile_User::getUserProfiles($this->fields['id']));
             Dropdown::showFromArray("profiles_id", $options, array('value' => $this->fields["profiles_id"], 'display_emptychoice' => true));
             echo "</td><td>" . __('Default entity') . "</td><td>";
             $entities = Profile_User::getUserEntities($this->fields['id'], 1);
             Entity::dropdown(array('value' => $this->fields["entities_id"], 'entity' => $entities));
             echo "</td></tr>";
         }
         echo "<tr class='tab_bg_1'>";
         echo "<td colspan='2' class='center'>";
         //TRANS: %s is the date
         printf(__('Last update on %s'), HTML::convDateTime($this->fields["date_mod"]));
         echo "<br>";
         printf(__('Last login on %s'), HTML::convDateTime($this->fields["last_login"]));
         echo "</td><td colspan='2'class='center'>";
         if ($ID > 0) {
             echo "<a target='_blank' href='" . $CFG_GLPI["root_doc"] . "/front/user.form.php?getvcard=1&amp;id={$ID}'>" . __('Vcard') . "</a>";
         }
         echo "</td></tr>";
     }
     $this->showFormButtons($options);
     return true;
 }
 /**
  * Show users of an entity
  *
  * @param $entity Entity object
  **/
 static function showForEntity(Entity $entity)
 {
     global $DB, $CFG_GLPI, $LANG;
     $ID = $entity->getField('id');
     if (!$entity->can($ID, "r")) {
         return false;
     }
     $canedit = $entity->can($ID, "w");
     $canshowuser = haveRight("user", "r");
     $nb_per_line = 3;
     $rand = mt_rand();
     if ($canedit) {
         echo "<form name='entityuser_form{$rand}' id='entityuser_form{$rand}' method='post' action='";
         echo getItemTypeFormURL(__CLASS__) . "'>";
         $headerspan = $nb_per_line * 2;
     } else {
         $headerspan = $nb_per_line;
     }
     if ($canedit) {
         echo "<div class='firstbloc'>";
         echo "<table class='tab_cadre_fixe'>";
         echo "<tr class='tab_bg_1'><th colspan='5'>" . $LANG['setup'][605] . "</tr>";
         echo "<tr><td class='tab_bg_2 center'>" . $LANG['common'][34] . "&nbsp;:&nbsp;";
         echo "<input type='hidden' name='entities_id' value='{$ID}'>";
         User::dropdown(array('right' => 'all'));
         echo "</td><td class='tab_bg_2 center'>" . $LANG['profiles'][22] . "&nbsp;:&nbsp;";
         Profile::dropdownUnder(array('value' => Profile::getDefault()));
         echo "</td><td class='tab_bg_2 center'>" . $LANG['profiles'][28] . "&nbsp;:&nbsp;";
         Dropdown::showYesNo("is_recursive", 0);
         echo "</td><td class='tab_bg_2 center'>";
         echo "<input type='submit' name='add' value=\"" . $LANG['buttons'][8] . "\" class='submit'>";
         echo "</td></tr>";
         echo "</table></div>";
     }
     echo "<div class='spaced'>";
     echo "<table class='tab_cadre_fixehov'>";
     echo "<tr><th colspan='{$headerspan}'>" . $LANG['Menu'][14] . " (D=" . $LANG['profiles'][29] . ", R=" . $LANG['profiles'][28] . ")</th></tr>";
     $query = "SELECT DISTINCT `glpi_profiles`.`id`, `glpi_profiles`.`name`\n                FROM `glpi_profiles_users`\n                LEFT JOIN `glpi_profiles`\n                     ON (`glpi_profiles_users`.`profiles_id` = `glpi_profiles`.`id`)\n                LEFT JOIN `glpi_users` ON (`glpi_users`.`id` = `glpi_profiles_users`.`users_id`)\n                WHERE `glpi_profiles_users`.`entities_id` = '{$ID}'\n                      AND `glpi_users`.`is_deleted` = '0'";
     $result = $DB->query($query);
     if ($DB->numrows($result) > 0) {
         initNavigateListItems('User', $LANG['entity'][0] . " = " . $entity->fields['name']);
         while ($data = $DB->fetch_array($result)) {
             echo "<tr><th colspan='{$headerspan}'>" . $LANG['profiles'][22] . "&nbsp;: " . $data["name"];
             echo "</th></tr>";
             $query = "SELECT `glpi_users`.*,\n                             `glpi_profiles_users`.`id` AS linkID,\n                             `glpi_profiles_users`.`is_recursive`,\n                             `glpi_profiles_users`.`is_dynamic`\n                      FROM `glpi_profiles_users`\n                      LEFT JOIN `glpi_users`\n                           ON (`glpi_users`.`id` = `glpi_profiles_users`.`users_id`)\n                      WHERE `glpi_profiles_users`.`entities_id` = '{$ID}'\n                            AND `glpi_users`.`is_deleted` = '0'\n                            AND `glpi_profiles_users`.`profiles_id` = '" . $data['id'] . "'\n                      ORDER BY `glpi_profiles_users`.`profiles_id`,\n                               `glpi_users`.`name`,\n                               `glpi_users`.`realname`,\n                               `glpi_users`.`firstname`";
             $result2 = $DB->query($query);
             if ($DB->numrows($result2) > 0) {
                 $i = 0;
                 while ($data2 = $DB->fetch_array($result2)) {
                     addToNavigateListItems('User', $data2["id"]);
                     if ($i % $nb_per_line == 0) {
                         if ($i != 0) {
                             echo "</tr>";
                         }
                         echo "<tr class='tab_bg_1'>";
                     }
                     if ($canedit) {
                         echo "<td width='10'>";
                         echo "<input type='checkbox' name='item[" . $data2["linkID"] . "]' value='1'>";
                         echo "</td>";
                     }
                     echo "<td>";
                     echo formatUserName($data2["id"], $data2["name"], $data2["realname"], $data2["firstname"], $canshowuser);
                     if ($data2["is_dynamic"] || $data2["is_recursive"]) {
                         echo "<strong>&nbsp;(";
                         if ($data2["is_dynamic"]) {
                             echo "D";
                         }
                         if ($data2["is_dynamic"] && $data2["is_recursive"]) {
                             echo ", ";
                         }
                         if ($data2["is_recursive"]) {
                             echo "R";
                         }
                         echo ")</strong>";
                     }
                     echo "</td>";
                     $i++;
                 }
                 while ($i % $nb_per_line != 0) {
                     echo "<td>&nbsp;</td>";
                     if ($canedit) {
                         echo "<td>&nbsp;</td>";
                     }
                     $i++;
                 }
                 echo "</tr>";
             } else {
                 echo "<tr colspan='{$headerspan}'>" . $LANG['common'][54] . "</tr>";
             }
         }
     }
     echo "</table>";
     if ($canedit) {
         openArrowMassive("entityuser_form{$rand}", true);
         closeArrowMassive('delete', $LANG['buttons'][6]);
         echo "</form>";
     }
     echo "</div>";
 }
Exemplo n.º 4
0
 /**
  * Show users of an entity
  *
  * @param $entity Entity object
  **/
 static function showForEntity(Entity $entity)
 {
     global $DB;
     $ID = $entity->getField('id');
     if (!$entity->can($ID, READ)) {
         return false;
     }
     $canedit = $entity->canEdit($ID);
     $canshowuser = User::canView();
     $nb_per_line = 3;
     $rand = mt_rand();
     if ($canedit) {
         $headerspan = $nb_per_line * 2;
     } else {
         $headerspan = $nb_per_line;
     }
     if ($canedit) {
         echo "<div class='firstbloc'>";
         echo "<form name='entityuser_form{$rand}' id='entityuser_form{$rand}' method='post' action='";
         echo Toolbox::getItemTypeFormURL(__CLASS__) . "'>";
         echo "<table class='tab_cadre_fixe'>";
         echo "<tr class='tab_bg_1'><th colspan='6'>" . __('Add an authorization to a user') . "</tr>";
         echo "<tr class='tab_bg_1'><td class='tab_bg_2 center'>" . __('User') . "&nbsp;";
         echo "<input type='hidden' name='entities_id' value='{$ID}'>";
         User::dropdown(array('right' => 'all'));
         echo "</td><td class='tab_bg_2 center'>" . self::getTypeName(1) . "</td><td>";
         Profile::dropdownUnder(array('value' => Profile::getDefault()));
         echo "</td><td class='tab_bg_2 center'>" . __('Recursive') . "</td><td>";
         Dropdown::showYesNo("is_recursive", 0);
         echo "</td><td class='tab_bg_2 center'>";
         echo "<input type='submit' name='add' value=\"" . _sx('button', 'Add') . "\" class='submit'>";
         echo "</td></tr>";
         echo "</table>";
         Html::closeForm();
         echo "</div>";
     }
     $query = "SELECT DISTINCT `glpi_profiles`.`id`, `glpi_profiles`.`name`\n                FROM `glpi_profiles_users`\n                LEFT JOIN `glpi_profiles`\n                     ON (`glpi_profiles_users`.`profiles_id` = `glpi_profiles`.`id`)\n                LEFT JOIN `glpi_users` ON (`glpi_users`.`id` = `glpi_profiles_users`.`users_id`)\n                WHERE `glpi_profiles_users`.`entities_id` = '{$ID}'\n                     AND `glpi_users`.`is_deleted` = '0'";
     $result = $DB->query($query);
     $nb = $DB->numrows($result);
     echo "<div class='spaced'>";
     if ($canedit && $nb) {
         Html::openMassiveActionsForm('mass' . __CLASS__ . $rand);
         $massiveactionparams = array('container' => 'mass' . __CLASS__ . $rand, 'specific_actions' => array('purge' => _x('button', 'Delete permanently')));
         Html::showMassiveActions($massiveactionparams);
     }
     echo "<table class='tab_cadre_fixehov'>";
     echo "<thead><tr>";
     echo "<th class='noHover' colspan='{$headerspan}'>";
     printf(__('%1$s (%2$s)'), _n('User', 'Users', Session::getPluralNumber()), __('D=Dynamic, R=Recursive'));
     echo "</th></tr></thead>";
     if ($nb) {
         Session::initNavigateListItems('User', sprintf(__('%1$s = %2$s'), Entity::getTypeName(1), $entity->getName()));
         while ($data = $DB->fetch_assoc($result)) {
             echo "<tbody><tr class='noHover'>";
             $reduce_header = 0;
             if ($canedit && $nb) {
                 echo "<th width='10'>";
                 echo Html::checkAllAsCheckbox("profile" . $data['id'] . "_{$rand}");
                 echo "</th>";
                 $reduce_header++;
             }
             echo "<th colspan='" . ($headerspan - $reduce_header) . "'>";
             printf(__('%1$s: %2$s'), __('Profile'), $data["name"]);
             echo "</th></tr></tbody>";
             echo "<tbody id='profile" . $data['id'] . "_{$rand}'>";
             $query = "SELECT `glpi_users`.*,\n                             `glpi_profiles_users`.`id` AS linkID,\n                             `glpi_profiles_users`.`is_recursive`,\n                             `glpi_profiles_users`.`is_dynamic`\n                      FROM `glpi_profiles_users`\n                      LEFT JOIN `glpi_users`\n                           ON (`glpi_users`.`id` = `glpi_profiles_users`.`users_id`)\n                      WHERE `glpi_profiles_users`.`entities_id` = '{$ID}'\n                            AND `glpi_users`.`is_deleted` = '0'\n                            AND `glpi_profiles_users`.`profiles_id` = '" . $data['id'] . "'\n                      ORDER BY `glpi_profiles_users`.`profiles_id`,\n                               `glpi_users`.`name`,\n                               `glpi_users`.`realname`,\n                               `glpi_users`.`firstname`";
             $result2 = $DB->query($query);
             if ($DB->numrows($result2) > 0) {
                 $i = 0;
                 while ($data2 = $DB->fetch_assoc($result2)) {
                     Session::addToNavigateListItems('User', $data2["id"]);
                     if ($i % $nb_per_line == 0) {
                         if ($i != 0) {
                             echo "</tr>";
                         }
                         echo "<tr class='tab_bg_1'>";
                     }
                     if ($canedit) {
                         echo "<td width='10'>";
                         Html::showMassiveActionCheckBox(__CLASS__, $data2["linkID"]);
                         echo "</td>";
                     }
                     $username = formatUserName($data2["id"], $data2["name"], $data2["realname"], $data2["firstname"], $canshowuser);
                     if ($data2["is_dynamic"] || $data2["is_recursive"]) {
                         $username = sprintf(__('%1$s %2$s'), $username, "<span class='b'>(");
                         if ($data2["is_dynamic"]) {
                             $username = sprintf(__('%1$s%2$s'), $username, __('D'));
                         }
                         if ($data2["is_dynamic"] && $data2["is_recursive"]) {
                             $username = sprintf(__('%1$s%2$s'), $username, ", ");
                         }
                         if ($data2["is_recursive"]) {
                             $username = sprintf(__('%1$s%2$s'), $username, __('R'));
                         }
                         $username = sprintf(__('%1$s%2$s'), $username, ")</span>");
                     }
                     echo "<td>" . $username . "</td>";
                     $i++;
                 }
                 while ($i % $nb_per_line != 0) {
                     echo "<td>&nbsp;</td>";
                     if ($canedit) {
                         echo "<td>&nbsp;</td>";
                     }
                     $i++;
                 }
                 echo "</tr>";
                 echo "</tbody>";
             } else {
                 echo "<tr colspan='{$headerspan}'>" . __('Item not found') . "</tr>";
             }
         }
     }
     echo "</table>";
     if ($canedit && $nb) {
         $massiveactionparams['ontop'] = false;
         Html::showMassiveActions($massiveactionparams);
         Html::closeForm();
     }
     echo "</div>";
 }
     break;
 case "connect_to_computer":
     Dropdown::showAllItems("connect_item", 0, 0, $_SESSION["glpiactive_entity"], array('Monitor', 'Peripheral', 'Phone', 'Printer'), true);
     echo "&nbsp;<input type='submit' name='massiveaction' class='submit' value='" . $LANG['buttons'][2] . "'>";
     break;
 case "disconnect":
     echo "<input type='submit' name='massiveaction' class='submit' value='" . $LANG['buttons'][2] . "'>";
     break;
 case "add_group":
     Dropdown::show('Group');
     echo "&nbsp;<input type='submit' name='massiveaction' class='submit' value='" . $LANG['buttons'][2] . "'>";
     break;
 case "add_userprofile":
     Dropdown::show('Entity', array('entity' => $_SESSION['glpiactiveentities']));
     echo ".&nbsp;" . $LANG['profiles'][22] . "&nbsp;:&nbsp;";
     Profile::dropdownUnder();
     echo ".&nbsp;" . $LANG['profiles'][28] . "&nbsp;:&nbsp;";
     Dropdown::showYesNo("is_recursive", 0);
     echo "&nbsp;<input type='submit' name='massiveaction' class='submit' value='" . $LANG['buttons'][2] . "'>";
     break;
 case "add_document":
     Document::dropdown(array('name' => 'docID'));
     echo "&nbsp;<input type='submit' name='massiveaction' class='submit' value='" . $LANG['buttons'][2] . "'>";
     break;
 case "add_contract":
     Contract::dropdown(array('name' => "conID"));
     echo "&nbsp;<input type='submit' name='massiveaction' class='submit' value='" . $LANG['buttons'][2] . "'>";
     break;
 case "add_contact":
     Dropdown::show('Contact', array('name' => "conID"));
     echo "&nbsp;<input type='submit' name='massiveaction' class='submit' value='" . $LANG['buttons'][2] . "'>";