Permalink
Browse files

도서관/이너포스트가 있을때만 출력되게함

  • Loading branch information...
sugarui committed Dec 8, 2012
1 parent 95e6038 commit d9d972adfb68ff9f7397a2c0ac9767e12d562259
Showing with 26 additions and 33 deletions.
  1. +1 −7 index_work.php
  2. +6 −25 post.php
  3. +18 −0 post_inner.php
  4. +1 −1 style/style.css
View
@@ -27,13 +27,7 @@
<!---------------DB접속및 리소스획득--------------->
<?php
include_once ('../db.php');
// 이것도 걍 접속정보로 보내 버리
//mysql_query("set session character_set_connection=utf8;");
//mysql_query("set session character_set_results=utf8;");
//mysql_query("set session character_set_client=utf8;");
$sql = 'SELECT * FROM `su_post_01` ORDER BY id ASC LIMIT 5 '; //쿼리문
$sql = 'SELECT * FROM `su_post_01` ORDER BY id DESC LIMIT 5 '; //쿼리문
$result = mysql_query($sql); //쿼리문 보냄
?>
View
@@ -24,37 +24,18 @@
<div class="text">
<p>
<?php
// 링크를 걸어야 하니까 스페설챠는 뺄게
// echo htmlspecialchars("{$row['text']}" . "\n");
echo $row['text'];
echo $row['text']; // 링크를 걸어야 하니까 스페설챠는 뺄게
?>
</p>
</div>
<!------------ post_inner ------------>
<div class="post_inner">
<div class="text">
<?php
echo htmlspecialchars($row['inner_desc']);
?>
</div>
<div class="dogear">
<img src="./image/dogear_01.png">
</div>
<div class="post_inner_btn">
<img src="./image/post_inner_btn_01.png">
</div>
<div class="border_1"> </div>
<div class="border_2"> </div>
<div class="title_inner">
<h3>
<?php
echo htmlspecialchars($row['inner_title']);
?>
</h3>
</div>
<div class="border_1"> </div>
<div class="border_2"> </div>
<?php
if($row['inner_title']){
include ('./post_inner.php');
}
?>
</div>
<!-- end of post_inner-->
View
@@ -0,0 +1,18 @@
<div class="text">
<?php echo htmlspecialchars($row['inner_desc']); ?>
</div>
<div class="dogear">
<img src="./image/dogear_01.png">
</div>
<div class="post_inner_btn">
<img src="./image/post_inner_btn_01.png">
</div>
<div class="border_1"></div>
<div class="border_2"></div>
<div class="title_inner">
<h3>
<?php echo htmlspecialchars($row['inner_title']); ?>
</h3>
</div>
<div class="border_1"></div>
<div class="border_2"></div>
View
@@ -175,7 +175,7 @@
.post_inner{
margin-bottom:30px; /*다음 이너포스트 설명글과의 간격은 넓어야 하므로*/
}
.post_inner .text{
.post_inner .text{
margin-bottom:10px; /*이너포스트 설명글과 이너포스트간 간격은 좁아야 하므로*/
}
.post_inner h3{

1 comment on commit d9d972a

@sugarui

This comment has been minimized.

Show comment
Hide comment
@sugarui

sugarui Dec 8, 2012

Owner

8일에 한건데.. 깃헙 외국시간쓰나보다. ㅠㅠ

Owner

sugarui commented on d9d972a Dec 8, 2012

8일에 한건데.. 깃헙 외국시간쓰나보다. ㅠㅠ

Please sign in to comment.