$gDossier = Dossier::id(); echo HtmlInput::button("Add_plugin", _("Ajout d'un plugin"), "onclick=add_plugin({$gDossier})"); echo HtmlInput::button("Add_menu", _("Ajout d'un menu"), "onclick=create_menu({$gDossier})"); echo '<table class="result" id="menu_tb">'; echo '<tr>'; echo '<th>' . $table->get_header(0) . '</th>'; echo '<th>' . $table->get_header(1) . '</th>'; echo '<th>' . $table->get_header(2) . '</th>'; echo '<th>' . $table->get_header(3) . HtmlInput::infobulle(33) . '</th>'; echo '<th>' . $table->get_header(4) . '</th>'; echo '<th>' . $table->get_header(5) . '</th>'; echo '<th>' . $table->get_header(6) . '</th>'; echo '<th>' . $table->get_header(7) . '</th>'; echo '</tr>'; for ($i = 0; $i < Database::num_row($ret); $i++) { $row = $menu->get_object($ret, $i); $js = $row->me_code; switch ($row->me_type) { case 'PL': $js = sprintf('<A class="line" href="javascript:void(0)" onclick="mod_plugin(\'%s\',\'%s\')">%s</A>', $gDossier, $row->me_code, $row->me_code); break; case 'ME': $js = sprintf('<A class="line" href="javascript:void(0)" onclick="modify_menu(\'%s\',\'%s\')">%s</A>', $gDossier, $row->me_code, $row->me_code); break; } $class = $i % 2 == 0 ? $class = ' class="odd"' : ($class = ' class="even"'); echo "<tr {$class}>"; echo td($js); echo td(_($row->me_menu)); echo td(h(_($row->me_description))); echo td(h($row->me_type));