Пример #1
0
    public static function html_start($title)
    {
        $title = REST::htmlspecialchars($title);
        $t_index = REST::urlencode(dirname($_SERVER['REQUEST_URI']));
        if ($t_index != '/') {
            $t_index .= '/';
        }
        $t_index = REST::htmlspecialchars($t_index);
        $portalurl = REST::htmlspecialchars(self::portalURL());
        $retval = REST::xml_header() . <<<EOS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
  <title>{$title}</title>
  <link rel="stylesheet" type="text/css" href="{$portalurl}style.css" />
  <link rel="index" rev="child" type="application/xhtml+xml" href="{$t_index}" />
</head><body>
<div id="header"><p><a rel="index" rev="child" href="{$t_index}"><img border="0" src="{$portalurl}dirup.png"/> UP</a></p>
<h1>{$title}</h1></div>
EOS;
        return $retval;
    }
Пример #2
0
    /**
     * @param $title string Title in UTF-8
     * @return string a piece of UTF-8 encoded XHTML, including XML and DOCTYPE
     * headers.
     */
    public static function html_start($title)
    {
        if (self::$html_start !== null) {
            return call_user_func(self::$html_start, $title);
        }
        $t_title = htmlspecialchars($title, ENT_COMPAT, 'UTF-8');
        $t_index = REST::urlencode(dirname($_SERVER['REQUEST_URI']));
        if ($t_index != '/') {
            $t_index .= '/';
        }
        $t_stylesheet = self::$STYLESHEET ? self::$STYLESHEET : "{$t_index}style.css";
        return REST::xml_header() . <<<EOS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
  <title>{$t_title}</title>
  <link rel="stylesheet" type="text/css" href="{$t_stylesheet}" />
  <link rel="index" rev="child" type="application/xhtml+xml" href="{$t_index}"/>
</head><body>
<div id="div_header">
<div id="div_index"><a rel="index" rev="child" href="{$t_index}">index</a></div>
<h1 id="h1_title">{$t_title}</h1>
</div>
EOS;
    }
Пример #3
0
    /**
     * @param $title string title in UTF-8
     */
    public static function html_start($title)
    {
        $t_title = htmlspecialchars($title, ENT_COMPAT, "UTF-8");
        $t_index = REST::urlencode(dirname($_SERVER['REQUEST_URI']));
        if ($t_index != '/') {
            $t_index .= '/';
        }
        $t_stylesheet = self::urlbase() . 'style.css';
        $t_icon = self::urlbase() . 'favicon.png';
        return REST::xml_header() . <<<EOS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
  <title>{$t_title}</title>
  <link rel="stylesheet" type="text/css" href="{$t_stylesheet}" />
  <link rel="index" rev="child" type="application/xhtml+xml" href="{$t_index}"/>
  <link rel="icon" type="image/png" href="{$t_icon}" />
</head><body>
<div id="div_header">
<div id="div_index"><a rel="index" rev="child" href="{$t_index}">index</a></div>
<h1>{$t_title}</h1>
</div>
EOS;
    }