|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 'header': |
|
|
case 'header': |
|
|
array_shift($request); |
|
|
array_shift($request); |
|
|
$conf = array('path', $this->folder); |
|
|
|
|
|
$v = $this->read_config(); |
|
|
|
|
|
|
|
|
$conf = array('path' => $this->folder); |
|
|
|
|
|
//$v = $this->read_config(); |
|
|
switch (array_shift($request)) { |
|
|
switch (array_shift($request)) { |
|
|
case 'event': |
|
|
case 'event': |
|
|
$el = new CEvent($v,$conf); |
|
|
|
|
|
|
|
|
$el = new CEvent($this->config,$conf); |
|
|
$el->set_layout('archive'); |
|
|
$el->set_layout('archive'); |
|
|
$new = $el; |
|
|
$new = $el; |
|
|
break; |
|
|
break; |
|
|
case 'concert': |
|
|
case 'concert': |
|
|
$el = new CConcert($v,$conf); |
|
|
|
|
|
|
|
|
$el = new CConcert($this->config,$conf); |
|
|
$el->set_layout('header'); |
|
|
$el->set_layout('header'); |
|
|
$new = $el; |
|
|
$new = $el; |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
implode("\n",$fff->content['default'])); |
|
|
implode("\n",$fff->content['default'])); |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 'audio': |
|
|
|
|
|
case 'video': |
|
|
|
|
|
$video = $request[1]; |
|
|
|
|
|
$style = $request[2]; |
|
|
|
|
|
|
|
|
|
|
|
$a = explode("/", $video); |
|
|
|
|
|
$full_name = array_pop($a); |
|
|
|
|
|
$b = explode('.',$full_name); |
|
|
|
|
|
$ext = array_pop($b); |
|
|
|
|
|
$name = implode('.', $b); |
|
|
|
|
|
|
|
|
|
|
|
foreach($this->structs as $domain=>$destination) { |
|
|
|
|
|
if(array_key_exists($name, $this->structs[$domain]['pic'])) { |
|
|
|
|
|
$image = $this->structs[$domain]['pic'][$name]; |
|
|
|
|
|
unset($this->structs[$domain]['pic'][$name]); |
|
|
|
|
|
unset($this->content[$this->domains[$domain]][$name."10image"]); |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
$image2 = "/".$image; |
|
|
|
|
|
foreach(['png','PNG','jpg','JPG','jpeg','JPEG'] as $picext) { |
|
|
|
|
|
$candidate=$this->folder.implode("/",$a)."/".$name.".".$picext; |
|
|
|
|
|
if (is_file($candidate)) { |
|
|
|
|
|
$image2 = $candidate; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$cached = new CachedImage($image); |
|
|
|
|
|
$cached2 = new CachedImage($image2); |
|
|
|
|
|
|
|
|
|
|
|
foreach ($body as $k=>$line) { |
|
|
|
|
|
if (strpos($line,"©") !== FALSE |
|
|
|
|
|
|| strpos($line,"©") !== FALSE) { |
|
|
|
|
|
$body[$k] = sprintf("<span class=\"copyright\">%s</span>",$line); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$ratio=false; |
|
|
|
|
|
if ($request[0] == 'audio') { |
|
|
|
|
|
$asd = new \Image($image2); |
|
|
|
|
|
if ($asd) { |
|
|
|
|
|
$ratio=sprintf("%s:%s",$asd->width(),$asd->height()); |
|
|
|
|
|
unset($asd); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$vid = new \Modules\CVideo([ |
|
|
|
|
|
'TARGET'=>$video, |
|
|
|
|
|
'STILL'=>$cached, |
|
|
|
|
|
'STILL2' => $cached2->get_src(1400), |
|
|
|
|
|
'NAME' =>$name, |
|
|
|
|
|
'CAPTION' => $md->text(implode("\n",$body)), |
|
|
|
|
|
'STYLE' => $style, |
|
|
|
|
|
'RATIO' => $ratio |
|
|
|
|
|
],['path'=>"/".$this->folder]); |
|
|
|
|
|
|
|
|
|
|
|
if ($request[0] == 'audio') { |
|
|
|
|
|
$vid->set_layout('audio'); |
|
|
|
|
|
} else { |
|
|
|
|
|
$vid->set_layout('lightbox'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$new = sprintf("%s", |
|
|
|
|
|
$vid |
|
|
|
|
|
); |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
case 'youtube': |
|
|
case 'youtube': |
|
|
array_shift($request); |
|
|
array_shift($request); |
|
|
$vid=array_shift($request); |
|
|
$vid=array_shift($request); |