Esempio n. 1
0
    if (isset($_GET['type']) && $_GET['type']) {
        $currentPage->setSection(intval($_GET['type']));
    }
    if (isset($_GET['tag']) && $_GET['tag']) {
        $currentPage->setTag($_GET['tag']);
    }
    if (isset($_GET['list']) && $_GET['list']) {
        $currentPage->setListType($_GET['list']);
    }
    if (isset($_GET['region']) && $_GET['region']) {
        $currentPage->setRegion(intval($_GET['region']));
    }
    /**
     * Translate readable dates 
     */
    $date_values = AMP_date_from_url();
    foreach ($date_values as $token => $value) {
        $_GET['date'][$token] = $value;
    }
    /**
     * Activate Preview Mode if requested
     * TODO: Preview mode should only be available to authenticated admin users
     */
    if (!defined('AMP_DISPLAYMODE_PREVIEW')) {
        define('AMP_DISPLAYMODE_PREVIEW', isset($_GET['preview']) && $_GET['preview']);
    }
} else {
    /**
     * Initialize all other kinds of pages 
     */
    $currentPage->setIntroText($intro_id);
Esempio n. 2
0
 function getListNameSuffix()
 {
     return AMP_format_date_from_array(AMP_date_from_url());
 }