コード例 #1
0
ファイル: index.php プロジェクト: scoutman57/rangitaki
        $blogintro = "no";
    }
}
// Fetching necessary information about the current article
// Set blog to "main" if on main blog, else to $getblog.
// This variable is needed later
if ($getblog == "") {
    $blog = "main";
} else {
    $blog = $getblog;
}
// generate a variable with the articles directory
$articlesdir = "./articles/{$blog}/";
// Fetching the articles title
if (isset($getarticle)) {
    $articletitle = ArticleGenerator::getTitle($articlesdir, $getarticle . '.md');
}
// Make sure that the entry has a title, because main.md hasn't one
if (empty($blogmainname)) {
    $blogmaintitle = $blogtitle;
} else {
    $blogmaintitle = $blogmainname;
}
if (isset($getblog)) {
    $subblogtitle = BlogListGenerator::getName('./blogs/' . $getblog . '.md');
} else {
    $subblogtitle = $blogmaintitle;
}
// Generate title for the html head
if (isset($getarticle)) {
    $hd_subblog_title = $articletitle . ' - ' . $subblogtitle;
コード例 #2
0
ファイル: index.php プロジェクト: scoutman57/rangitaki
<div class="header">
    <a href="../" class="title">Rangitaki Control Center</a>
</div>
<div class="main">
    <?php 
session_start();
if ($_SESSION['login']) {
    include_once "../../res/php/ArticleGenerator.php";
    $directory = "./../../articles/" . $_GET['blog'] . "/";
    $article = $_GET['post'] . ".md";
    ?>
        <section class="card">
            <div class="headline">Edit Post</div>
            <p>Title:<br><br><input type="text" class="itextfield"
                                    value="<?php 
    echo ArticleGenerator::getTitle($directory, $article);
    ?>
"
                                    name="title"
                                    id="title"/>
            </p>

            <p>Date:<br><br><input type="text" class="itextfield"
                                   value="<?php 
    echo ArticleGenerator::getDate($directory, $article);
    ?>
" name="date"
                                   id="date"/>
            </p>

            <p>Author:<br><br><input type="text"