function webdictionary_list()
{
    global $events;
    global $website;
    $navibars = new navibars();
    $navitable = new navitable("webdictionary_list");
    $navibars->title(t(21, 'Dictionary'));
    if (count($website->languages) > 0) {
        foreach ($website->languages as $wslg_code => $wslg) {
            $wslg_links[] = '<a href="?fid=' . $_REQUEST['fid'] . '&act=edit_language&code=' . $wslg_code . '"><i class="fa fa-fw fa-caret-right"></i> ' . language::name_by_code($wslg_code) . '</a>';
        }
        $events->add_actions('blocks', array('item' => null, 'navibars' => &$navibars), $wslg_links, '<a class="content-actions-submenu-trigger" href="#"><img height="16" align="absmiddle" width="16" src="img/icons/silk/comment_edit.png"> ' . t(602, 'Edit language') . ' &#9662;</a>');
    }
    $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=edit"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>', 'search_form'));
    $navitable->setQuickSearchURL('?fid=' . $_REQUEST['fid'] . '&act=json&_search=true&quicksearch=');
    if ($_REQUEST['quicksearch'] == 'true') {
        $navitable->setInitialURL("?fid=" . $_REQUEST['fid'] . '&act=json&_search=true&quicksearch=' . $_REQUEST['navigate-quicksearch']);
    }
    $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=json');
    $navitable->sortBy('node_id');
    $navitable->setDataIndex('node_id');
    $navitable->setEditUrl('node_id', '?fid=' . $_REQUEST['fid'] . '&act=edit&id=', 'path');
    $navitable->max_rows = 500;
    $navitable->addCol("#id#", 'id', "40", "true", "left", NULL, "true");
    // ghost (unique) ID
    $navitable->addCol("ID", 'node_id', "90", "true", "left");
    // textual ID
    $navitable->addCol(t(191, 'Source'), 'source', "60", "true", "left");
    $navitable->addCol(t(46, 'Language'), 'lang', "50", "true", "left");
    $navitable->addCol(t(54, 'Text'), 'text', "400", "true", "left");
    $navitable->addCol("Path", "path", 0, "false", "left", NULL, "true");
    $navibars->add_content($navitable->generate());
    return $navibars->generate();
}
Example #2
0
function block_groups_list()
{
    global $user;
    global $DB;
    global $website;
    $navibars = new navibars();
    $navitable = new navitable('block_groups_list');
    $navibars->title(t(23, 'Blocks') . ' / ' . t(506, 'Groups'));
    $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/brick.png"> ' . t(23, 'Blocks') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=block_types_list"><img height="16" align="absmiddle" width="16" src="img/icons/silk/brick_edit.png"> ' . t(167, 'Types') . '</a>'));
    $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=block_group_edit"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=block_groups_list"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>'));
    $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=block_groups_json');
    $navitable->sortBy('id');
    $navitable->setDataIndex('id');
    $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=block_group_edit&id=');
    $navitable->setGridNotesObjectName("block_group");
    $navitable->addCol("ID", 'id', "80", "true", "left");
    $navitable->addCol(t(237, 'Code'), 'code', "120", "true", "left");
    $navitable->addCol(t(67, 'Title'), 'title', "200", "true", "left");
    $navitable->addCol(t(23, 'Blocks'), 'blocks', "80", "true", "left");
    $navitable->addCol(t(168, 'Notes'), 'note', "50", "false", "center");
    $navibars->add_content($navitable->generate());
    return $navibars->generate();
}
Example #3
0
function items_list()
{
    global $layout;
    global $user;
    $navibars = new navibars();
    $navitable = new navitable("items_list");
    $navibars->title(t(22, 'Items'));
    $navibars->add_actions(array($user->permission("items.create") == 'false' ? '' : '<a href="?fid=' . $_REQUEST['fid'] . '&act=2"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=list"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>', 'search_form'));
    if ($_REQUEST['quicksearch'] == 'true') {
        $navitable->setInitialURL("?fid=" . $_REQUEST['fid'] . '&act=json&_search=true&quicksearch=' . $_REQUEST['navigate-quicksearch']);
    }
    $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=json');
    $navitable->sortBy('date_modified', 'DESC');
    $navitable->setDataIndex('id');
    $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=edit&id=');
    $navitable->enableSearch();
    if ($user->permission("items.delete") == 'true') {
        $navitable->enableDelete();
    }
    $navitable->setGridNotesObjectName("item");
    $navitable->addCol("ID", 'id', "40", "true", "left");
    $navitable->addCol(t(67, 'Title'), 'title', "320", "true", "left");
    $navitable->addCol(t(309, 'Social'), 'comments', "50", "true", "center");
    $navitable->addCol(t(78, 'Category'), 'category', "210", "true", "left");
    //$navitable->addCol(t(266, 'Author'), 'author_username', "80", "true", "left");
    $navitable->addCol(t(551, 'Date to display'), 'date_to_display', "60", "true", "center");
    $navitable->addCol(t(85, 'Date published'), 'dates', "100", "true", "center");
    $navitable->addCol(t(68, 'Status'), 'permission', "80", "true", "center");
    $navitable->addCol(t(168, 'Notes'), 'note', "50", "false", "center");
    $navitable->setLoadCallback('
        $("td[aria-describedby=\'items_list_category\']").truncate({
            "width": "auto",
            "token": "…",
            "side": "center",
            "addtitle": true
        });

        if($("#jqgh_items_list_category button").length < 1)
        {
            $("#jqgh_items_list_category").prepend("<button><i class=\\"fa fa-bars\\"></i></button>");
            $("#jqgh_items_list_category button")
            	.button()
            	.css(
            	{
                	"float": "right",
                	"margin-top": "0px",
                	"padding": "0px"
            	})
            	.on("click", items_list_choose_categories);

            $("#jqgh_items_list_category span.ui-button-text").css({"padding-top": "0", "padding-bottom": "0"});
        }
    ');
    // add categories filter
    $hierarchy = structure::hierarchy();
    $hierarchy = structure::hierarchyListClasses($hierarchy);
    $navibars->add_content('<div id="filter_categories_window" style="display: none;">' . $hierarchy . '</div>');
    $layout->add_script('$("#filter_categories_window ul").attr("data-name", "filter_categories_field");');
    $layout->add_script('
        $("#filter_categories_window ul").jAutochecklist({
            popup: false,
            absolutePosition: true,
            width: 0,
            listWidth: 400,
            listMaxHeight: 400,
            onItemClick: function(nval, li, selected_before, selected_after)
            {
                selected_after = selected_after.join(",");
                var filters = {
                    "groupOp" : "AND",
                    "rules": [
                        {
                            "field" : "category",
                            "op" : "in",
                            "data" : selected_after
                        },
                        {
                            "field" : "title",
                            "op" : "cn",
                            "data" : $("#navigate-quicksearch").val()
                        }
                    ]
                };

                $("#items_list").jqGrid(
                    "setGridParam",
                    {
                        search: true,
                        postData: { "filters": filters }
                    }
                ).trigger("reloadGrid");
            }
        });');
    $layout->add_script('
        function items_list_choose_categories()
        {
            $("#navigate-quicksearch").parent().on("submit", function(){
                $("#filter_categories_window ul").jAutochecklist("deselectAll");
            });

            $("#filter_categories_window ul").jAutochecklist("open");
            $(".jAutochecklist_list").css({"position": "absolute"});
            $(".jAutochecklist_list").css($("#jqgh_items_list_category button").offset());
            $(".jAutochecklist_dropdown_wrapper").hide();
            $(".jAutochecklist_list").css({
                "border-radius": "8px",
                "margin-left": "-373px",
                "margin-top": "16px"
            });
            $(".jAutochecklist_list").addClass("navi-ui-widget-shadow ui-menu ui-widget ui-widget-content ui-corner-all");

            return false;
        }
    ');
    $navibars->add_content($navitable->generate());
    return $navibars->generate();
}
Example #4
0
function profiles_list()
{
    $navibars = new navibars();
    $navitable = new navitable("profiles_list");
    $navibars->title(t(243, 'Profiles'));
    $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=2"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>', 'search_form'));
    if ($_REQUEST['quicksearch'] == 'true') {
        $navitable->setInitialURL("?fid=" . $_REQUEST['fid'] . '&act=1&_search=true&quicksearch=' . $_REQUEST['navigate-quicksearch']);
    }
    $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=1');
    $navitable->sortBy('id');
    $navitable->setDataIndex('id');
    $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=2&id=');
    $navitable->addCol("ID", 'id', "80", "true", "left");
    $navitable->addCol(t(159, 'Name'), 'name', "400", "true", "left");
    $navibars->add_content($navitable->generate());
    return $navibars->generate();
}
Example #5
0
function webuser_groups_list()
{
    global $user;
    global $DB;
    global $website;
    $navibars = new navibars();
    $navitable = new navitable('webuser_groups_list');
    $navibars->title(t(24, 'Web users') . ' / ' . t(506, 'Groups'));
    $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/user.png"> ' . t(24, 'Web users') . '</a>'));
    $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=webuser_group_edit"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=webuser_groups_list"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>'));
    $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=webuser_groups_json');
    $navitable->sortBy('id');
    $navitable->setDataIndex('id');
    $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=webuser_group_edit&id=');
    $navitable->addCol("ID", 'id', "80", "true", "left");
    $navitable->addCol(t(237, 'Code'), 'code', "100", "true", "left");
    $navitable->addCol(t(159, 'Name'), 'name', "300", "true", "left");
    $navibars->add_content($navitable->generate());
    return $navibars->generate();
}
Example #6
0
function websites_list()
{
    global $user;
    $navibars = new navibars();
    $navitable = new navitable("websites_list");
    $navibars->title(t(241, 'Websites'));
    $navibars->add_actions(array($user->permission('websites.edit') == 'true' ? '<a href="?fid=' . $_REQUEST['fid'] . '&act=edit"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>' : '', '<a href="?fid=' . $_REQUEST['fid'] . '&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>', 'search_form'));
    if ($_REQUEST['quicksearch'] == 'true') {
        $navitable->setInitialURL("?fid=" . $_REQUEST['fid'] . '&act=1&_search=true&quicksearch=' . $_REQUEST['navigate-quicksearch']);
    }
    $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=1');
    $navitable->sortBy('id');
    $navitable->setDataIndex('id');
    $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=2&id=');
    $navitable->addCol("ID", 'id', "80", "true", "left");
    $navitable->addCol(t(328, 'Favicon'), 'favicon', "32", "true", "center");
    $navitable->addCol(t(159, 'Name'), 'name', "200", "true", "left");
    $navitable->addCol(t(187, 'Homepage'), 'homepage', "300", "true", "center");
    $navitable->addCol(t(68, 'Status'), 'permission', "100", "true", "center");
    $navibars->add_content($navitable->generate());
    return $navibars->generate();
}
Example #7
0
function themes_sample_content_export_form()
{
    // templates, blocks, files, properties
    global $user;
    global $DB;
    global $website;
    global $layout;
    global $theme;
    $navibars = new navibars();
    $naviforms = new naviforms();
    $navibars->title(t(367, 'Themes') . ' / ' . t(480, 'Export sample content'));
    $layout->navigate_media_browser();
    // we can use media browser in this function
    $navibars->add_actions(array('<a href="#" onclick="javascript: navigate_media_browser();" title="Ctrl+M"><img height="16" align="absmiddle" width="16" src="img/icons/silk/images.png"> ' . t(36, 'Media') . '</a>'));
    $navibars->add_actions(array('<a href="#" onclick="navigate_tabform_submit(0);"><img height="16" align="absmiddle" width="16" src="img/icons/silk/accept.png"> ' . t(34, 'Save') . '</a>'));
    $navibars->form();
    /*
    $navibars->add_tab(t(43, "Main"));
    
    $navibars->add_tab_content_row(array(
        '<label>'.t(67, 'Title').'</label>',
        $naviforms->textfield('theme-title', $website->name)
    ));
    */
    $navibars->add_tab(t(16, "Structure"));
    // select structure points to export
    $hierarchy = structure::hierarchy(0);
    $categories_list = structure::hierarchyList($hierarchy);
    $navibars->add_tab_content_row(array('<label>' . t(330, 'Categories') . '<br /></label>', '<div class="category_tree" id="category-tree-parent">
            <img src="img/icons/silk/world.png" align="absmiddle" /> ' . $website->name . '<div class="tree_ul">' . $categories_list . '</div>' . '</div>', '<label>&nbsp;</label>', '<button id="theme_export_sample_content_select_all_categories">' . t(481, 'Select all') . '</button>'));
    $navibars->add_tab_content($naviforms->hidden('categories', ''));
    $layout->add_script('        
        $("#category-tree-parent .tree_ul").jstree({
            plugins: ["changed", "types", "checkbox"],
            "types" :
            {
                "default":  {   "icon": "img/icons/silk/folder.png"    },
                "leaf":     {   "icon": "img/icons/silk/page_white.png"      }
            },
            "checkbox":
            {
                three_state: false,
                cascade: "undetermined"
            },
            "core":
            {
                dblclick_toggle: false
            }
        })
        .on("dblclick.jstree", function(e)
        {
            e.preventDefault();
            e.stopPropagation();
        
            var li = $(e.target).closest("li");
            $("#category-tree-parent .tree_ul").jstree("open_node", "#" + li[0].id);
        
            var children_nodes = new Array();
            children_nodes.push(li);
            $(li).find("li").each(function() {
                children_nodes.push("#" + $(this)[0].id);
            });
        
            $("#category-tree-parent .tree_ul").jstree("select_node", children_nodes);
        
            return false;
        })
        .on("changed.jstree", function(e, data)
        {        
            var i, j, r = [];
            var categories = new Array();
            $("#categories").val("");       
        
            for(i = 0, j = data.selected.length; i < j; i++)
            {
                var id = data.instance.get_node(data.selected[i]).data.nodeId;
                categories.push(id);
            }
            
            if(categories.length > 0)
                $("#categories").val(categories);                                                                
        });

        $("#theme_export_sample_content_select_all_categories").on("click", function(e)
        {
            e.stopPropagation();
            e.preventDefault();
            $("#category-tree-parent .tree_ul").jstree("select_all");
            return false;
        });
	');
    $navibars->add_tab(t(22, "Elements"));
    // select elements to export
    $navitable_items = new navitable("items_list");
    $navitable_items->setURL('?fid=items&act=1');
    $navitable_items->sortBy('date_modified', 'DESC');
    $navitable_items->setDataIndex('id');
    $navitable_items->max_rows = 9999999;
    $navitable_items->addCol("ID", 'id', "40", "true", "left");
    $navitable_items->addCol(t(67, 'Title'), 'title', "350", "true", "left");
    $navitable_items->addCol(t(309, 'Social'), 'comments', "80", "true", "center");
    $navitable_items->addCol(t(78, 'Category'), 'category', "150", "true", "center");
    $navitable_items->addCol(t(266, 'Author'), 'author_username', "100", "true", "left");
    $navitable_items->addCol(t(85, 'Date published'), 'dates', "100", "true", "center");
    $navitable_items->addCol(t(80, 'Permission'), 'permission', "80", "true", "center");
    $navitable_items->after_select_callback = ' $("#elements").val(navitable_items_list_selected_rows); ';
    $navitable_items->setLoadCallback('
        if(!themes_export_first_select_elements) 
        {
            $("#cb_items_list").trigger("click");
            themes_export_first_select_elements = true; 
        }
    ');
    $navibars->add_tab_content($naviforms->hidden('elements', ''));
    $navibars->add_tab_content($navitable_items->generate());
    $navibars->add_tab(t(544, "Block groups"));
    // select blocks to export
    $navitable_block_groups = new navitable("block_groups_list");
    $navitable_block_groups->setURL('?fid=blocks&act=block_groups_json');
    $navitable_block_groups->sortBy('id', 'DESC');
    $navitable_block_groups->setDataIndex('id');
    $navitable_items->max_rows = 9999999;
    $navitable_block_groups->addCol("ID", 'id', "80", "true", "left");
    $navitable_block_groups->addCol(t(237, 'Code'), 'code', "120", "true", "left");
    $navitable_block_groups->addCol(t(67, 'Title'), 'title', "200", "true", "left");
    $navitable_block_groups->addCol(t(23, 'Blocks'), 'blocks', "80", "true", "left");
    $navitable_block_groups->after_select_callback = ' $("#block_groups").val(navitable_block_groups_list_selected_rows); ';
    $navitable_block_groups->setLoadCallback('
        if(!themes_export_first_select_blockgrp) 
        {
            $("#cb_block_groups_list").trigger("click");
            themes_export_first_select_blockgrp = true; 
        }
    ');
    $navibars->add_tab_content($naviforms->hidden('block_groups', ''));
    $navibars->add_tab_content($navitable_block_groups->generate());
    $navibars->add_tab(t(23, "Blocks"));
    // select blocks to export
    $navitable_blocks = new navitable("blocks_list");
    $navitable_blocks->setURL('?fid=blocks&act=1');
    $navitable_blocks->sortBy('id', 'DESC');
    $navitable_blocks->setDataIndex('id');
    $navitable_items->max_rows = 9999999;
    $navitable_blocks->addCol("ID", 'id', "40", "true", "left");
    $navitable_blocks->addCol(t(160, 'Type'), 'type', "120", "true", "center");
    $navitable_blocks->addCol(t(67, 'Title'), 'title', "400", "true", "left");
    $navitable_blocks->addCol(t(85, 'Date published'), 'dates', "100", "true", "center");
    $navitable_blocks->addCol(t(364, 'Access'), 'access', "40", "true", "center");
    $navitable_blocks->addCol(t(65, 'Enabled'), 'enabled', "40", "true", "center");
    $navitable_blocks->after_select_callback = ' $("#blocks").val(navitable_blocks_list_selected_rows); ';
    $navitable_blocks->setLoadCallback('
        if(!themes_export_first_select_blocks) 
        {
            $("#cb_blocks_list").trigger("click"); 
            themes_export_first_select_blocks = true; 
        }
    ');
    $navibars->add_tab_content($naviforms->hidden('blocks', ''));
    $navibars->add_tab_content($navitable_blocks->generate());
    $navibars->add_tab(t(250, "Comments"));
    // select comments to export
    $navitable_comments = new navitable("comments_list");
    $navitable_comments->setURL('?fid=comments&act=1');
    $navitable_comments->sortBy('date_created', 'desc');
    $navitable_comments->setDataIndex('id');
    $navitable_items->max_rows = 9999999;
    $navitable_comments->addCol("ID", 'id', "80", "true", "left");
    $navitable_comments->addCol(t(180, 'Item'), 'item', "200", "true", "left");
    $navitable_comments->addCol(t(226, 'Date created'), 'date_created', "100", "true", "left");
    $navitable_comments->addCol(t(1, 'User'), 'user', "100", "true", "left");
    $navitable_comments->addCol(t(54, 'Text'), 'message', "200", "true", "left");
    $navitable_comments->addCol(t(68, 'Status'), 'status', "80", "true", "center");
    $navitable_comments->after_select_callback = ' $("#comments").val(navitable_comments_list_selected_rows); ';
    $navitable_comments->setLoadCallback('
        if(!themes_export_first_select_comments) 
        {
            $("#cb_comments_list").trigger("click"); 
            themes_export_first_select_comments = true; 
        }
    ');
    $navibars->add_tab_content($naviforms->hidden('comments', ''));
    $navibars->add_tab_content($navitable_comments->generate());
    $navibars->add_tab(t(89, "Files"));
    $navibars->add_tab_content_row(array('<label>' . t(141, 'Folder') . '</label>', $naviforms->dropbox('folder', 0, 'folder')));
    $navibars->add_tab_content_row('<div class="subcomment"><span class="ui-icon ui-icon-info" style="float: left;"></span> ' . t(482, 'All sample files should be placed in a folder. Navigate CMS will also add files used in contents.') . '</div>');
    // auto-select everything on load
    $layout->add_script('
        themes_export_first_select_elements = false;
        themes_export_first_select_blockgrp = false;
        themes_export_first_select_blocks   = false;
        themes_export_first_select_comments = false;

        $("#theme_export_sample_content_select_all_categories").trigger("click");               
    ');
    return $navibars->generate();
}
Example #8
0
function users_list()
{
    $navibars = new navibars();
    $navitable = new navitable("users_list");
    $navibars->title(t(15, 'Users'));
    $navibars->add_actions(array('<a href="?fid=users&act=2"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=users&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>', 'search_form'));
    if ($_REQUEST['quicksearch'] == 'true') {
        $navitable->setInitialURL("?fid=users&act=1&_search=true&quicksearch=" . $_REQUEST['navigate-quicksearch']);
    }
    $navitable->setURL('?fid=users&act=1');
    $navitable->sortBy('id', 'DESC');
    $navitable->setDataIndex('id');
    $navitable->setEditUrl('id', '?fid=users&act=2&id=');
    $navitable->enableDelete();
    $navitable->addCol("ID", 'id', "80", "true", "left");
    $navitable->addCol(t(1, 'User'), 'username', "150", "true", "left");
    $navitable->addCol(t(44, 'E-Mail'), 'email', "150", "true", "left");
    $navitable->addCol(t(45, 'Profile'), 'profile', "100", "true", "left");
    $navitable->addCol(t(46, 'Language'), 'language', "80", "true", "left");
    $navitable->addCol(t(47, 'Blocked'), 'blocked', "50", "true", "center");
    $navibars->add_content($navitable->generate());
    return $navibars->generate();
}
Example #9
0
function functions_list()
{
    $navibars = new navibars();
    $navitable = new navitable("functions_list");
    $navibars->title(t(240, 'Functions'));
    $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=2"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>', 'search_form'));
    if ($_REQUEST['quicksearch'] == 'true') {
        $navitable->setInitialURL("?fid=" . $_REQUEST['fid'] . '&act=1&_search=true&quicksearch=' . $_REQUEST['navigate-quicksearch']);
    }
    $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=1');
    $navitable->sortBy('id');
    $navitable->setDataIndex('id');
    $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=2&id=');
    $navitable->addCol("ID", 'id', "80", "true", "left");
    $navitable->addCol(t(78, 'Category'), 'category', "100", "true", "left");
    $navitable->addCol(t(237, 'Code'), 'codename', "100", "true", "left");
    $navitable->addCol(t(242, 'Icon'), 'icon', "50", "true", "center");
    $navitable->addCol(t(67, 'Title'), 'lid', "200", "true", "left");
    $navitable->addCol(t(65, 'Enabled'), 'enabled', "80", "true", "center");
    $navibars->add_content($navitable->generate());
    return $navibars->generate();
}
Example #10
0
function backups_list()
{
    $navibars = new navibars();
    $navitable = new navitable("backups_list");
    $navibars->title(t(329, 'Backups'));
    $navibars->add_actions(array('<a href="#" onclick="navigate_restore_dialog();"><img height="16" align="absmiddle" width="16" src="img/icons/silk/database_refresh.png"> ' . t(412, 'Restore') . '</a> '));
    $navibars->add_actions(array('<a href="?fid=backups&act=2"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=backups&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>', 'search_form'));
    if ($_REQUEST['quicksearch'] == 'true') {
        $navitable->setInitialURL("?fid=backups&act=1&_search=true&quicksearch=" . $_REQUEST['navigate-quicksearch']);
    }
    $navitable->setURL('?fid=backups&act=1');
    $navitable->sortBy('id');
    $navitable->setDataIndex('id');
    $navitable->setEditUrl('id', '?fid=backups&act=2&id=');
    $navitable->addCol("ID", 'id', "80", "true", "left");
    $navitable->addCol(t(196, 'Date and time'), 'date_created', "150", "true", "center");
    $navitable->addCol(t(67, 'Title'), 'title', "400", "true", "left");
    $navitable->addCol(t(409, 'Size'), 'size', "80", "true", "center");
    $navitable->addCol(t(68, 'Status'), 'status', "150", "true", "left");
    $navibars->add_content($navitable->generate());
    return $navibars->generate();
}
Example #11
0
function comments_list()
{
    $navibars = new navibars();
    $navitable = new navitable("comments_list");
    $navibars->title(t(250, 'Comments'));
    $navibars->add_actions(array('<a href="#" onclick="navigate_delete_dialog();"><img height="16" align="absmiddle" width="16" src="img/icons/silk/comments_delete.png"> ' . t(522, 'Remove Spam') . '</a>'));
    $delete_html = array();
    $delete_html[] = '<div id="navigate-delete-dialog" class="hidden">';
    $delete_html[] = t(60, 'Do you really want to delete the selected items?') . "<br /><br />";
    $delete_html[] = t(523, 'This function can NOT be undone.');
    $delete_html[] = '</div>';
    $delete_html[] = '<script language="javascript" type="text/javascript">';
    $delete_html[] = 'function navigate_delete_dialog()';
    $delete_html[] = '{';
    $delete_html[] = '$("#navigate-delete-dialog").removeClass("hidden");';
    $delete_html[] = '$("#navigate-delete-dialog").dialog({
							resizable: true,
							height: 150,
							width: 300,
							modal: true,
							title: "' . t(522, 'Remove Spam') . '",
							buttons: {
								"' . t(35, 'Delete') . '": function() {
									$(this).dialog("close");
									window.location.href = "?fid=' . $_REQUEST['fid'] . '&act=remove_spam";
								},
								"' . t(58, 'Cancel') . '": function() {
									$(this).dialog("close");
								}
							}
						});';
    $delete_html[] = '}';
    $delete_html[] = '</script>';
    $navibars->add_content(implode("\n", $delete_html));
    $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=2"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>', 'search_form'));
    if ($_REQUEST['quicksearch'] == 'true') {
        $navitable->setInitialURL("?fid=" . $_REQUEST['fid'] . '&act=1&_search=true&quicksearch=' . $_REQUEST['navigate-quicksearch']);
    }
    $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=1');
    $navitable->sortBy('date_created', 'desc');
    $navitable->setDataIndex('id');
    $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=2&id=');
    $navitable->enableDelete();
    $navitable->addCol("ID", 'id', "80", "true", "left");
    $navitable->addCol(t(180, 'Item'), 'item', "200", "true", "left");
    $navitable->addCol(t(226, 'Date created'), 'date_created', "100", "true", "left");
    $navitable->addCol(t(1, 'User'), 'user', "100", "true", "left");
    $navitable->addCol(t(54, 'Text'), 'message', "200", "true", "left");
    $navitable->addCol(t(68, 'Status'), 'status', "80", "true", "center");
    $navibars->add_content($navitable->generate());
    return $navibars->generate();
}
Example #12
0
function templates_list()
{
    $navibars = new navibars();
    $navitable = new navitable("templates_list");
    $navibars->title(t(20, 'Templates'));
    $navibars->add_actions(array('<a href="?fid=' . $_REQUEST['fid'] . '&act=2"><img height="16" align="absmiddle" width="16" src="img/icons/silk/add.png"> ' . t(38, 'Create') . '</a>', '<a href="?fid=' . $_REQUEST['fid'] . '&act=0"><img height="16" align="absmiddle" width="16" src="img/icons/silk/application_view_list.png"> ' . t(39, 'List') . '</a>', 'search_form'));
    if ($_REQUEST['quicksearch'] == 'true') {
        $navitable->setInitialURL("?fid=" . $_REQUEST['fid'] . '&act=json&_search=true&quicksearch=' . $_REQUEST['navigate-quicksearch']);
    }
    $navitable->setURL('?fid=' . $_REQUEST['fid'] . '&act=json');
    $navitable->sortBy('id');
    $navitable->setDataIndex('id');
    $navitable->setEditUrl('id', '?fid=' . $_REQUEST['fid'] . '&act=load&id=');
    $navitable->disableSelect();
    $navitable->addCol("ID", 'id', "60", "true", "left");
    $navitable->addCol(t(67, 'Title'), 'title', "260", "true", "left");
    $navitable->addCol(t(368, 'Theme'), 'theme', "180", "false", "left");
    $navitable->addCol(t(68, 'Status'), 'permission', "80", "true", "center");
    $navitable->addCol(t(65, 'Enabled'), 'enabled', "60", "true", "center");
    $navibars->add_content($navitable->generate());
    return $navibars->generate();
}