<?php
define('_FEXEC', 1);
require('includes/application_top.php');

$page_id = isset($_GET['page_id']) ? (int)$_GET['page_id'] : 0;
$language_id = isset($_GET['language_id']) ? (int)$_GET['language_id'] : 1;

if ($page_id > 0) {
    $query = tep_db_query("SELECT description FROM main_page_description WHERE page_id = '" . tep_db_input($page_id) . "' AND language_id = '" . tep_db_input($language_id) . "'");
    if ($page = tep_db_fetch_array($query)) {
        echo $page['description'];
    } else {
        echo "No static page found for ID " . $page_id;
    }
} else {
    echo "Invalid page ID.";
}
?>
