Beispiel #1
0
 function compose($o)
 {
     if ($this->get->id) {
         $this->expires = 'onmaxage';
         Patchwork::setPrivate();
         if (function_exists('upload_progress_meter_get_info')) {
             $o = (object) @upload_progress_meter_get_info($this->get->id);
         } else {
             if (function_exists('uploadprogress_get_info')) {
                 $o = (object) @uploadprogress_get_info($this->get->id);
             }
         }
     } else {
         $this->maxage = -1;
     }
     return $o;
 }
    static function loadAgent($agent)
    {
        p::setMaxage(-1);
        p::setPrivate();
        p::setExpires('onmaxage');
        $a = p::agentArgs($agent);
        $a = implode(',', array_map('jsquote', $a));
        $agent = jsquote('agent_index' === $agent ? '' : p\Superloader::class2file(substr($agent, 6)));
        $lang = p::__LANG__();
        $appId = p::$appId;
        $base = p::__BASE__();
        if (PATCHWORK_I18N) {
            ob_start();
            self::writeAgent(new \loop_altLang());
            $b = substr(ob_get_clean(), 4, -1);
        } else {
            $b = '0';
        }
        $lang = $lang ? " lang=\"{$lang}\"" : '';
        $uri = p::__URI__();
        $uri .= (false === strpos($uri, '?') ? '?' : '&') . 'p:=serverside';
        false !== strpos($uri, '<') && ($uri = str_replace('<', '%3C', $uri));
        false !== strpos($uri, '>') && ($uri = str_replace('>', '%3E', $uri));
        echo $a = <<<EOHTML
<!doctype html>
<!--[if lt IE 7]><html{$lang} class="lt-ie9 lt-ie8 lt-ie7 ie6"><![endif]-->
<!--[if IE 7]><html{$lang} class="lt-ie9 lt-ie8 ie7"><![endif]-->
<!--[if IE 8]><html{$lang} class="lt-ie9 ie8"><![endif]-->
<!--[if gt IE 8]><!--><html{$lang}><!--<![endif]-->
<meta charset="utf-8">
<noscript><meta http-equiv="refresh" content="0; url={$uri}"></noscript>
<script name="w\$">a=[{$agent},[{$a}],{$appId},{$b}]</script>
<!--[if !IE]><!--><script name="w\$" src="data:text/javascript,a[4]=1"></script><!--<![endif]-->
<script src="{$base}js/w?{$appId}"></script>
EOHTML;
    }
Beispiel #3
0
 static function getLastseen()
 {
     p::setPrivate();
     return self::$lastseen;
 }