コード例 #1
0
ファイル: view.php プロジェクト: rair/yacs
 * @reference
 * @license http://www.gnu.org/copyleft/lesser.txt GNU Lesser General Public License
 */
// common definitions and initial processing
include_once '../shared/global.php';
include_once 'dates.php';
// look for the id
$id = NULL;
if (isset($_REQUEST['id'])) {
    $id = $_REQUEST['id'];
} elseif (isset($context['arguments'][0])) {
    $id = $context['arguments'][0];
}
$id = strip_tags($id);
// get the item from the database
$item = Dates::get($id);
// get the related anchor, if any
$anchor = NULL;
if (isset($item['anchor']) && $item['anchor']) {
    $anchor = Anchors::get($item['anchor']);
}
// load the skin, maybe with a variant
load_skin('dates', $anchor);
// current item
if (isset($item['id'])) {
    $context['current_item'] = 'date:' . $item['id'];
}
// the path to this page
if (is_object($anchor)) {
    $context['path_bar'] = $anchor->get_path_bar();
} else {