Beispiel #1
0
     if ($s_menu_id) {
         # get the item
         $o_menu = $flot->datastore->get_menu_data($s_menu_id);
         # get the oncology
         # render a form
         $Menu = new Menu($o_menu);
         $html_main_admin_content .= $Menu->html_edit_form();
         // make left menu smaller, to give more focus to editing
         $s_body_class = "smaller_left";
     } else {
         $html_main_admin_content .= "flot couln't find that menu :(";
     }
     break;
 case 'list':
     # list all pages that can be edited (pagination ?)
     $oa_menus = $flot->oa_menus();
     $hmtl_menus_ui = "";
     $hmtl_menus_ui .= '<a class="btn btn-default btn-sm" href="' . S_BASE_EXTENSION . 'flot-admin/admin/index.php?section=menus&action=new"><i class="glyphicon glyphicon-plus"></i> add a new menu</a><hr/>';
     if (count($oa_menus) > 0) {
         $hmtl_menus_ui .= '<table id="admin_table_list" class="table table-hover"><thead><tr><th>menu name</th><th>delete</th></tr></thead><tbody>';
         foreach ($oa_menus as $o_menu) {
             $s_id = urldecode($o_menu->id);
             $s_title = urldecode($o_menu->title);
             # code...
             $hmtl_menus_ui .= '<tr><td><a class="btn btn-view" href="' . S_BASE_EXTENSION . 'flot-admin/admin/index.php?section=menus&menu=' . $s_id . '&action=edit">';
             $hmtl_menus_ui .= $s_title;
             $hmtl_menus_ui .= '</a></td>';
             $hmtl_menus_ui .= '<td><a href="' . S_BASE_EXTENSION . 'flot-admin/admin/index.php?section=menus&menu=' . $o_menu->id . '&action=delete" class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i> delete</a></td></tr>';
         }
         $hmtl_menus_ui .= '</tbody></table>';
     } else {