Permalink
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (27 sloc) 906 Bytes
<?php
require_once( 'AMP/Base/Config.php');
require_once( 'AMP/Controller/Sections.php');
require_once( 'AMP/Content/Page.inc.php' );
if ( $cached_output = AMP_cached_request( )) {
print $cached_output;
exit;
}
$section_id = ( isset( $_REQUEST['id']) && intval( $_REQUEST['id'])) ? intval( $_REQUEST['id']) : false;
//also accept list=type&type=x
if( !$section_id ) {
$section_id = ( isset( $_REQUEST['type']) && intval( $_REQUEST['type'])) ? intval( $_REQUEST['type']) : false;
}
if( !$section_id && isset( $_GET['list']) ) {
ampredirect( AMP_url_update( AMP_CONTENT_URL_ARTICLE, $_GET ));
exit;
}
if( $section_id ) {
$controller = new AMP_Controller_Sections();
$controller->set_action( 'show' );
$controller->set_params( array( 'id' => $section_id ));
$controller->execute( );
} else {
include( '404.php');
exit;
}
require_once("AMP/BaseFooter.php");