Ejemplo n.º 1
0
 public function get($name, $default = NULL)
 {
     if (stristr($name, '/')) {
         $one = str_bis($name, '/');
         $two = str_nach($name, '/');
         return $this->get($one)->get($two);
     } else {
         if (isset($this->values[$name])) {
             if ($this->types[$name] == 'array') {
                 return new varArray($this->values[$name]);
             }
             return $this->values[$name];
         } else {
             if ($default === NULL) {
                 return new varArray(array());
             } else {
                 return $default;
             }
         }
     }
 }
Ejemplo n.º 2
0
     $tplContent->setVariable("sets", $sets);
     $html = $tplContent->get('tpl.overview.php');
     break;
 case 'discover':
     $list = $own->getPublics(me(), 100, 'i_pk DESC');
     $tplContent->setVariable("list", $list);
     $html = $tplContent->get('tpl.discover.php');
     break;
 case 'discoverglobal':
     $list = $own->getPublicRemotes(100);
     $tplContent->setVariable("list", $list);
     $html = $tplContent->get('tpl.discoverglobal.php');
     break;
 case 'discoverflickr':
     $rss = file_get_contents('http://api.flickr.com/services/feeds/photos_public.gne');
     $rss = str_nach($rss, '<entry>');
     $entry = explode('</entry>', $rss);
     $list = array();
     for ($i = 0; $i < count($entry) - 1; $i++) {
         $L = array();
         $L['gi_title'] = str_zwischen($entry[$i], '<title>', '</title>');
         $L['gi_date'] = str_zwischen($entry[$i], '<published>', '</published>');
         $L['gl_url'] = str_zwischen($entry[$i], '<published>', '</published>');
         $L['gl_content'] = htmlspecialchars_decode(str_zwischen($entry[$i], '<content type="html">', '</content>'));
         $L['gl_content'] = str_replace('<a href', '<a target=_blank href', $L['gl_content']);
         $list[] = $L;
     }
     $tplContent->setVariable("list", $list);
     $html = $tplContent->get('tpl.discoverflickr.php');
     break;
 case 'delete':
Ejemplo n.º 3
0
function str_zwischen($haystack, $needle1, $needle2)
{
    $s = str_nach($haystack, $needle1);
    $s = str_bis($s, $needle2);
    return $s;
}