示例#1
0
文件: single.php 项目: VSG24/ccms
<?php

getHeaderCUSTOM();
$posts = new Posts();
$comments = new Comments(URI::getPageId());
$row = $posts->getPost(URI::getParams_single()['id']);
$posts->handlePostViewsById(URI::getPageId());
?>
        <?php 
include_once 'sidebar.php';
?>

        <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 col-md-offset-1 col-lg-offset-1 div_white_left">
            <article class="post">
                <a href="<?php 
echo $posts->getPostPermLink($row['ID'], $row['post_type'], $row['link_title']);
?>
"><h3 style="font-weight: bold;"><?php 
echo strip_tags($row['post_title']);
?>
</h3></a>&nbsp;&nbsp;<span style="color: #808080;"><i style="vertical-align: middle;" class="mdi mdi-calendar"></i>&nbsp;<?php 
echo englishConvertDate($row['post_date']);
?>
&nbsp;<i style="vertical-align: middle;" class="mdi mdi-file"></i>&nbsp;<?php 
echo getCategoryById(getPostCategories($row['ID'])[0]);
?>
</span>
                <p><?php 
echo $row['post_excerpt'];
?>
</p>
示例#2
0
文件: comments.php 项目: VSG24/ccms
    <script src="<?php 
echo THEME_BASE;
?>
comment_submit.js"></script>
    <div id="comment_form">
        <?php 
$a = commentFormCheck($comment_status);
if ($a == 2 && getCurrentUser() == '') {
    ?>
            Log in to comment.
        <?php 
} elseif ($a == 1 || $a == 2 && getCurrentUser() != '') {
    ?>
            <form id="comment_form" action="comment_submit.php" method="POST">
                <input name="post_id" type="hidden" value="<?php 
    echo URI::getPageId();
    ?>
">
                <input name="user_id" type="hidden" value="<?php 
    echo getCurrentUser('id');
    ?>
">
                <?php 
    if (getCurrentUser() != '') {
        ?>
                    <p>Comment as <strong><?php 
        echo getCurrentUser('username');
        ?>
</strong>:</p>
                <?php 
    }