Location: PHPKode > projects > ProNuke. Postnuke To Oracle > postnuke/html/includes/blocks/ephem.php
<?php
// File: $Id: ephem.php,v 1.16 2001/12/04 00:50:22 gregorrothfuss Exp $ $Name:  $
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2001 by the Post-Nuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file: Francisco Burzi
// Purpose of file:
// ----------------------------------------------------------------------
$blocks_modules['ephem'] = array(
    'func_display' => 'blocks_ephem_block',
    'text_type' => 'Ephemerids',
    'text_type_long' => 'Ephemerids',
    'allow_multiple' => false,
    'form_content' => false,
    'form_refresh' => false,
    'show_preview' => true
);

// Uses security schema 'Ephemerids'

function blocks_ephem_block($row) { /* ML added globals and querylang */
    global $pntable, $dbconn, $multilingual, $currentlang;


    if (!authorised(0, 'Ephemerids::', '::', ACCESS_READ)) {
        return;
    }

//FTO : Add IS NULL clause for Oracle
//ORACLEDONE

    if ($multilingual == 1) {
        $column = &$pntable['ephem_column'];
        $querylang = "AND ($column[elanguage]='$currentlang' OR $column[elanguage]='' OR $column[elanguage] IS NULL )";
    } else {
        $querylang = "";
    }
    $today = getdate();
    $eday = $today['mday'];
    $emonth = $today['mon'];
    $column = &$pntable['ephem_column'];
    $result = $dbconn->Execute("SELECT $column[yid], $column[content]
                              FROM $pntable[ephem]
                              WHERE $column[did]='$eday' AND $column[mid]='$emonth' $querylang");
    $boxstuff = "<font class=\"pn-normal\"><b>"._ONEDAY."</b></font><br>";

    while(list($yid, $content) = $result->fields) {

        $result->MoveNext();
        $boxstuff .= "<br><br>";
        $boxstuff .= "<b>$yid</b><br>$content";
    }
    $row['title'] = _EPHEMERIDS;
    $row['content'] = $boxstuff;
    themesideblock($row);
}
?>
Return current item: ProNuke. Postnuke To Oracle