Пример #1
0
		} else {
			$feed = $_POST['feed'];
			$message = 'feed updated';
		}

		update_feed($feed, $module, array_keys($_POST['cat']));

		header('Location: ' . implode('/', array(WWW_ROOT, 'module', $module, feed_id_encode($feed))));
		message($message);

		return;
	}
	$feed = !empty($request_parts[2]) ? feed_id_decode($request_parts[2]) : NULL;
	$args = array(
		'module' => $module, 
		'filters' => get_filters($module),
		'feed' => $feed,
		'feed_cats' => get_feed_cats($feed)
	);

	if ($feed) {
		$args['title'] = module_name($module) . ' ' . feed_id_encode($feed);
		$args['feed_items'] = get_feed_items($module, $feed);
		template('module', $args);
	} else {
		$args['title'] = module_name($module);
		template('module', $args);
	}
}

http_response_code(404);
Пример #2
0
function index()
{
    $app = \Slim\Slim::getInstance();
    $app->view()->appendData(array("items" => get_feed_items()));
    $app->render('landing.twig.html');
}