Ejemplo n.º 1
0
     $lbl = "RSS Group";
     if (isset($_REQUEST['label']) && $_REQUEST['label'] != "") {
         $lbl = $_REQUEST['label'];
     }
     if (isset($_REQUEST['rss']) && isset($_REQUEST['url'])) {
         $mngr->change($_REQUEST['rss'], $_REQUEST['url'], $lbl);
     }
     break;
 case "clearhistory":
     $mngr->clearHistory();
     break;
 case "refresh":
     if (isset($_REQUEST['rss'])) {
         $mngr->updateRSS($_REQUEST['rss']);
     } else {
         $mngr->update(true);
     }
     break;
 case "refreshgroup":
     if (isset($_REQUEST['rss'])) {
         $mngr->updateRSSGroup($_REQUEST['rss']);
     }
     break;
 case "toggle":
     if (isset($_REQUEST['rss'])) {
         $mngr->toggleStatus($_REQUEST['rss']);
     }
     break;
 case "setgroupstate":
     if (isset($_REQUEST['rss'])) {
         $mngr->setStatusGroup($_REQUEST['rss'], $_REQUEST['state']);
Ejemplo n.º 2
0
<?php

set_time_limit(0);
$path = dirname(realpath($argv[0]));
if (chdir($path)) {
    if (count($argv) > 1) {
        $_SERVER['REMOTE_USER'] = $argv[1];
    }
    require_once '../../php/lock.php';
    if ($lock = rLock::obtain('rss/update')) {
        require_once 'rss.php';
        $mngr = new rRSSManager();
        $mngr->update();
        $lock->release();
    }
}