function showForm($target)
{
global $DB;
$rand = mt_rand();
$query = "SELECT *\n FROM `" . $this->getTable() . "`\n ORDER BY `states_id` ASC ";
if ($result = $DB->query($query)) {
$number = $DB->numrows($result);
if ($number != 0) {
echo "<div align='center'><form method='post' name='massiveaction_form{$rand}' id='massiveaction_form{$rand}' action=\"{$target}\">";
echo "<table class='tab_cadre_fixe' cellpadding='5'>";
echo "<tr>";
echo "<th></th><th>" . _n('Status', 'Statuses', 2) . "</th>";
echo "</tr>";
while ($ligne = $DB->fetch_array($result)) {
$ID = $ligne["id"];
echo "<tr class='tab_bg_1'>";
echo "<td width='10' class='center'>";
echo "<input type='hidden' name='id' value='{$ID}'>";
echo "<input type='checkbox' name='item[{$ID}]' value='1'>";
echo "</td>";
echo "<td>" . Dropdown::getDropdownName("glpi_states", $ligne["states_id"]) . "</td>";
echo "</tr>";
}
Html::openArrowMassives("massiveaction_form{$rand}", true);
Html::closeArrowMassives(array('delete_state' => __('Delete permanently')));
echo "</table>";
Html::closeForm();
echo "</div>";
}
}
}