コード例 #1
0
ファイル: post.php プロジェクト: pmeth/autoCMS
<?php

include_once 'header.php';
$blogData = new BlogData();
$fields = $blogData->getPostFields();
$openGraphTypes = $blogData->getPostOGTypes();
?>
<div class="container">
    <div class="row">
        <div class="col-lg-12">
            <h2 class="page-header">Post</h2>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <form action="/admin/blog/<?php 
echo $post_id;
?>
/update/" method="post" class="form-horizontal" enctype="multipart/form-data">
                <?php 
if (!empty($openGraphTypes)) {
    ?>
                    <?php 
    foreach ($openGraphTypes as $key) {
        ?>
                        <div class="form-group">
                            <label class="col-lg-2 col-sm-2 control-label">
                                <?php 
        echo $key;
        ?>
コード例 #2
0
ファイル: blog.php プロジェクト: pmeth/autoCMS
 function post($post_id = null, $action = null)
 {
     $users = new UsersData();
     if (is_null($post_id)) {
         include_once '404.html';
     } else {
         if ($users->checkPass() && !$users->authNeeded()) {
             $blogData = new BlogData();
             if ($action == 'update') {
                 $blogData->updateBlogPost($post_id, $_POST, isset($_POST['publish']));
                 $media = new MediaData();
                 $media->uploadFiles($post_id, true);
             }
             $blogData->orderBlog();
             header('Location: /admin/blog/?updated=true');
         } else {
             include_once '401.html';
         }
     }
 }
コード例 #3
0
ファイル: dashboard.php プロジェクト: pmeth/autoCMS
 function post($action = null)
 {
     $users = new UsersData();
     if ($action == 'process' && $users->checkPass() && !$users->authNeeded()) {
         DashboardUtils::backupFiles($_POST['files']);
         MinimizeTools::minimizeHTMLFiles($_POST['files']);
         new AnalyticsData();
         new MediaData();
         new SettingsData();
         $rss = new RSSData();
         $rss->buildDataFile($_POST['files']);
         $nav = new NavigationData();
         $nav->buildDataFile($_POST['files']);
         $blog = new BlogData();
         $blog->buildDataFile($_POST['files']);
         $footer = new FooterData();
         $footer->buildDataFile($_POST['files']);
         $pages = new PagesData();
         $pages->buildDataFile($_POST['files']);
         DashboardUtils::renameFiles($_POST['files']);
         DashboardUtils::copyApacheConfig();
         DashboardUtils::createXMLSiteMap();
         $logsData = new LogsData();
         $logsData->addToLog('has initiated the CMS on the following files:', implode(" ", $_POST['files']));
         header('Location: /admin/');
     } else {
         include_once '401.html';
     }
 }
コード例 #4
0
ファイル: blog.php プロジェクト: pmeth/autoCMS
<?php

include_once 'header.php';
$blogData = new BlogData();
$blogList = $blogData->getBlogList();
?>
<div class="container">
    <div class="row">
        <div class="col-lg-12">
            <h2 class="page-header">Blog</h2>
        </div>
    </div>
    <div class="row">
        <div class="col-md-3 col-sm-3 col-xs-4"><h4>Title</h4></div>
        <div class="col-md-2 col-sm-2 col-xs-4" style="text-align: center"><h4>Creator</h4></div>
        <div class="col-md-2 hidden-sm hidden-xs" style="text-align: center"><h4>Created</h4></div>
        <div class="col-md-2 col-sm-3 col-xs-4" style="text-align: center"><h4>Published</h4></div>
        <div class="col-lg-2 col-md-3 col-sm-4 hidden-xs" style="text-align: center"><h4>Options</h4></div>
    </div>
    <hr>
    <?php 
foreach ($blogList as $key => $blog) {
    ?>
        <div class="row">
            <div class="col-md-3 col-sm-3 col-xs-4"><?php 
    echo $blog['title'];
    ?>
</div>
            <div class="col-md-2 col-sm-2 col-xs-4" style="text-align: center"><?php 
    echo $blog['creator'];
    ?>