Esempio n. 1
0
</p>
EOD;
        }
    } else {
        $next_entry = '';
    }
    if ($row) {
        $row = convert_to_utf8($row);
        format_date($row_name = 'date');
        $title_date = $formatted_date;
        $article_box = display_article_box($row);
        $contents = <<<EOD
<div class="section">
{$next_entry}
<h2 class="date-title">{$title_date}</h2>
{$article_box}
</div>
EOD;
    } else {
        header('Location: ' . $http . '://' . $_SERVER['HTTP_HOST'] . $cfg['root_path'] . 'var/contents/index.php?id=error404');
        exit;
    }
} else {
    $id_form = display_by_id_form('article');
    $contents = <<<EOD
<div class="section">
{$id_form}
</div>
EOD;
}
xhtml_output('log');
Esempio n. 2
0
require_once './include/fnc_admin.inc.php';
session_control();
// switch blog mode and binary mode
if ($session_status == 'on') {
    if (isset($_REQUEST['id']) && $_REQUEST['id'] !== NULL) {
        $id = $_REQUEST['id'];
        // query to pull out the recent articles.
        $sql = 'SELECT' . " `id`, `href`, `name`, `date`, DATE_FORMAT(`mod`, '%Y-%m-%d %T') as `mod`, `comment`, `category`, `draft`" . " FROM `{$log_table}` WHERE `id` = '{$id}'";
        $res = mysql_query($sql);
        $row = mysql_fetch_array($res);
        $row = convert_to_utf8($row);
        if ($cfg['show_date_title'] == 'yes') {
            format_date($row_name = 'date');
            $title_date = $formatted_date;
            $date_section_begin = '<div class="section">' . "\n" . '<h2 class="date-title">' . $title_date . "</h2>\n";
            $date_section_end = "\n</div><!-- End .section -->";
        } else {
            $date_section_begin = '';
            $date_section_end = '';
        }
        $contents = $date_section_begin;
        $contents .= display_article_box($row);
        $contents .= $date_section_end;
    } else {
        $contents = display_by_id_form('article');
    }
    xhtml_output('');
} else {
    header('Location: ' . $http . '://' . $_SERVER['HTTP_HOST'] . $cfg['root_path'] . 'index.php');
    exit;
}
Esempio n. 3
0
<span class="prev"><a href="./article.php?id={$row_prev['id']}" title="&quot;{$prev_title}&quot;">{$lang['prev']}</a></span>
<span class="next"><a href="./article.php?id={$row_next['id']}" title="&quot;{$next_title}&quot;">{$lang['next']}</a></span>
</p>
EOD;
        }
    } else {
        $next_entry = '';
    }
    if ($row) {
        $row = convert_to_utf8($row);
        $binary_box = display_binary_box($row);
        $contents = <<<EOD
<div class="section">
{$next_entry}
<h2>{$lang['file']} ID : {$id}</h2>
{$binary_box}
</div>
EOD;
    } else {
        header('Location: ' . $http . '://' . $_SERVER['HTTP_HOST'] . $cfg['root_path'] . 'var/index.php?id=error404');
        exit;
    }
} else {
    $id_form = display_by_id_form('article_bin');
    $contents = <<<EOD
<div class="section">
{$id_form}
</div>
EOD;
}
xhtml_output('file');