Exemplo n.º 1
0
function html_get_forum_uri($append_path = null)
{
    $uri_array = html_get_forum_domain(true);
    if (!isset($uri_array['path'])) {
        if (isset($_SERVER['PATH_INFO']) && strlen(trim($_SERVER['PATH_INFO'])) > 0) {
            $path = @parse_url($_SERVER['PATH_INFO']);
        } else {
            $path = @parse_url($_SERVER['PHP_SELF']);
        }
        if (isset($path['path'])) {
            $uri_array['path'] = $path['path'];
        }
    }
    $uri_array['path'] = str_replace(DIRECTORY_SEPARATOR, '/', dirname(rtrim($uri_array['path'], '/') . '/a'));
    if (strlen(trim($append_path)) > 0) {
        $uri_array['path'] = rtrim($uri_array['path'], '/') . '/' . $append_path;
    }
    $server_uri = isset($uri_array['scheme']) ? "{$uri_array['scheme']}://" : '';
    $server_uri .= isset($uri_array['host']) ? "{$uri_array['host']}" : '';
    $server_uri .= isset($uri_array['port']) ? ":{$uri_array['port']}" : '';
    $server_uri .= isset($uri_array['path']) ? "{$uri_array['path']}" : '';
    return $server_uri;
}
Exemplo n.º 2
0
function pm_export_html_top($message = null)
{
    $html = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    $html .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
    $html .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"" . gettext('en-gb') . "\" lang=\"" . gettext('en-gb') . "\" dir=\"" . gettext('ltr') . "\">\n";
    $html .= "<head>\n";
    if (isset($message['SUBJECT']) && isset($message['MID'])) {
        $html .= sprintf("<title>%s - %s</title>\n", gettext("Message"), htmlentities_array($message['SUBJECT']));
    } else {
        $html .= "<title>" . gettext("Messages") . "</title>\n";
    }
    if ($user_style = html_get_style_file('style.css')) {
        $html .= "<link rel=\"stylesheet\" href=\"" . html_get_forum_domain() . $user_style . "\" type=\"text/css\" media=\"screen\" />";
    }
    $html .= "</head>\n";
    $html .= "<body>\n";
    return $html;
}