コード例 #1
0
ファイル: podcast.class.php プロジェクト: RH-Code/opencaching
 static function fromUUID($uuid)
 {
     $podcastid = podcast::podcastIdFromUUID($uuid);
     if ($podcastid == 0) {
         return null;
     }
     return new podcast($podcastid);
 }
コード例 #2
0
ファイル: Post.php プロジェクト: polypodes/EuradioNantes.eu
 public function getMediaPodcast()
 {
     if ($this->podcast != NULL) {
         return $this->podcast->getFilePodcast();
     }
 }
コード例 #3
0
ファイル: podcast.php プロジェクト: RH-Code/opencaching
                if ($podcast->save()) {
                    if ($redirect == '') {
                        $redirect = 'viewcache.php?cacheid=' . urlencode($podcast->getCacheId());
                    }
                    $tpl->redirect($redirect);
                } else {
                    $tpl->assign('errorfile', ERROR_UPLOAD_UNKNOWN);
                    $bError = true;
                }
            }
        }
    }
} else {
    if ($action == 'edit' || $action == 'delete') {
        $uuid = isset($_REQUEST['uuid']) ? $_REQUEST['uuid'] : 0;
        $podcast = podcast::fromUUID($uuid);
        if ($podcast === null) {
            $tpl->error(ERROR_PODCAST_NOT_EXISTS);
        }
        if ($redirect == '') {
            $redirect = 'viewcache.php?cacheid=' . urlencode($podcast->getCacheId());
        }
        if ($podcast->allowEdit() == false) {
            $tpl->error(ERROR_NO_ACCESS);
        }
        if ($action == 'edit') {
            if (isset($_REQUEST['ok'])) {
                // overwrite values
                $title = isset($_REQUEST['title']) ? $_REQUEST['title'] : $podcast->getTitle();
                if ($title == '') {
                    $tpl->assign('errortitle', true);
コード例 #4
0
        $podcast->loadPodcasts();
        $podcast->runExt($f3, $extension);
    }, $f3->get('CDURATION'));
}
foreach ($firtz->extensions as $slug => $extension) {
    if ($extension->type != 'output') {
        continue;
    }
    $slug = $extension->slug;
    $f3->route("GET|HEAD /@podcast/{$slug}", function ($f3, $params) use($slug) {
        $firtz = $f3->get('firtz');
        $extension = $firtz->extensions[$slug];
        $arguments = array();
        $arguments_ext = $extension->arguments;
        foreach ($arguments_ext as $argname) {
            $arguments[$argname] = "";
            $f3->set($argname, "");
        }
        $extension->arguments = $arguments;
        $podcastslug = $params['podcast'];
        if (!in_array($params['podcast'], $f3->get('podcasts'))) {
            $f3->error(404);
        }
        $BASEPATH = $f3->get('PODCASTDIR') . '/' . $params['podcast'];
        $podcastCONFIG = $BASEPATH . '/directory.cfg';
        $podcast = new podcast($f3, $podcastslug, $podcastCONFIG);
        $podcast->findPodcasts();
        $podcast->loadPodcasts();
        $podcast->runExt($f3, $extension);
    }, $f3->get('CDURATION'));
}
コード例 #5
0
ファイル: podcast.php プロジェクト: RobMacKay/Ennui-CMS
<?php

$obj = new podcast(NULL, array('podcast'));
$podcast = $obj->createFeedChannel();
echo $podcast;
コード例 #6
0
ファイル: clone.php プロジェクト: Podbe/Podbe_V4-firtz-node
                 dir_recurse_copy($src . '/' . $file, $dst . '/' . $file);
             } else {
                 copy($src . '/' . $file, $dst . '/' . $file);
             }
         }
     }
     closedir($dir);
 }
 $f3->set('clonemode', true);
 $f3->set('extxml', '.xml');
 $f3->set('exthtml', '.html');
 # CLI mode... create static pages
 foreach ($f3->get('podcasts') as $slug) {
     $podcastPATH = $f3->get('PODCASTDIR') . '/' . $slug;
     $podcastCONFIG = $podcastPATH . '/directory.cfg';
     $podcast = new podcast($f3, $slug, $podcastCONFIG);
     if ($podcast->attr['cloneurl'] == '' || $podcast->attr['clonepath'] == '') {
         continue;
     }
     $DEST = $podcast->attr['clonepath'];
     if (!file_exists($DEST)) {
         @mkdir($DEST);
         if (!file_exists($DEST)) {
             echo "could not create destination path {$DEST}";
             exit;
         }
     }
     if (!is_writable($DEST)) {
         echo "no permissions to write to {$DEST}!";
         exit;
     }