Skip to content

Instantly share code, notes, and snippets.

@tony1223
Created October 17, 2012 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tony1223/3906856 to your computer and use it in GitHub Desktop.
Save tony1223/3906856 to your computer and use it in GitHub Desktop.
<?php include("_site_header.php"); ?>
<div class="container article-view">
<?php include("_content_nav.php") ?>
<!-- content -->
<div class="content">
<table class="table table-bordered">
<tr>
<td>作者</td>
<td><?=htmlspecialchars($article->Account)?></td>
</tr>
<tr>
<td>標題</td>
<td><?=htmlspecialchars($article->Title)?></td>
</tr>
<tr>
<td> 內容 </td>
<td><?=nl2br(htmlspecialchars($article->Content))?></td>
</tr>
<?php if(isset($_SESSION["user"]) && $_SESSION["user"]!= null
&& $_SESSION["user"]->UserID == $article->Author ) { ?>
<tr>
<td colspan="2">
<a href="<?=site_url("article/edit/".$article->ArticleID)?>">編輯此文章</a>
</td
</tr>
<?php } ?>
</table>
</div>
</div>
<?php include("_site_footer.php"); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment