function pages_page_denied()
{
    pages_header_status(503);
    $page = new StdClass();
    $page->title = __gettext('Access denied');
    $page->content = pages_html_wrap('p', __gettext('You do not have access to this page'));
    return $page;
}
示例#2
0
function pages_menu_add($name, $title, $url, $weight = 10)
{
    global $PAGE;
    $clean_name = 'menu_' . clean_filename($name);
    $link = pages_html_a($url, $title);
    $menu = array('name' => $name, 'html' => pages_html_wrap('li', $link, array('class' => $clean_name)));
    array_insert($PAGE->menu, $weight, array($menu));
}
function elggadmin_tpltextarea($tplname, $title = null, $attrs = null)
{
    $output = '';
    $_attrs = array('name' => $tplname, 'style' => 'width:95%;height:300px;margin:0px 10px 20px 10px;');
    if (is_string($title)) {
        $output .= pages_html_wrap('h2', $title);
    }
    if (!($tpl = elggadmin_loadtpl($tplname))) {
        elgg_messages_add(__gettext("Can't load <code>{$tplname}</code> file."));
    }
    if (is_array($attrs)) {
        $_attrs = array_merge($attrs, $_attrs);
    }
    $output .= pages_html_wrap('textarea', empty($tpl) ? ' ' : $tpl, $_attrs);
    return $output;
}