コード例 #1
0
ファイル: index.php プロジェクト: schutterskwartier/flot
     # menu items; purge from cache, preview, regenerate, delete
     if ($s_element_id) {
         # get the item
         $o_element = $flot->datastore->get_element_data($s_element_id);
         $o_full_element = $flot->datastore->o_get_full_element($s_element_id);
         # render a form
         $Element = new Element($o_element);
         $Element->_set_full_element($o_full_element);
         $html_main_admin_content .= $Element->html_edit_form();
         // make left menu smaller, to give more focus to editing
         $s_body_class = "smaller_left";
     }
     break;
 case 'list':
     # list all elements
     $oa_elements = $flot->oa_elements();
     $hmtl_pages_ui = "";
     $hmtl_pages_ui .= '<div class="btn-group edit_item_general_toolbar"><a class="btn btn-default btn-sm" href="' . S_BASE_EXTENSION . 'flot-admin/admin/index.php?section=elements&action=new"><i class="glyphicon glyphicon-plus"></i> add a new element</a></div><hr/>';
     if (count($oa_elements) > 0) {
         $hmtl_pages_ui .= '<table id="admin_table_list" class="table table-hover"><thead><tr><th>Edit element&nbsp;<i class="glyphicon glyphicon-edit"></i></th><th class="hidden-xs hidden-sm">last changed</th><th class="hidden-xs hidden-sm">author</th><th>published</th><th><a class="btn btn-danger btn-xs item_delete_start"><i class="glyphicon glyphicon-trash"></i><span class="hidden-xs">&nbsp;Delete</span></a><a class="btn btn-success btn-xs item_delete_done"><i class="glyphicon glyphicon-ok"></i><span class="hidden-xs">&nbsp;Done</span></a></th></tr></thead><tbody>';
         foreach ($oa_elements as $o_element) {
             //
             // get data
             //
             $s_id = urldecode($o_element->id);
             $s_title = urldecode($o_element->title);
             $s_author = urldecode($o_element->author);
             $s_date_modified = urldecode($o_element->date_modified);
             $s_published = urldecode($o_element->published) === "true" ? '<i class="green glyphicon glyphicon-ok"></i>' : '<i class="red glyphicon glyphicon-remove"></i>';
             //
             // sanitise data if necessary