테스트 사이트 - 개발 중인 베타 버전입니다

css 질문입니다ㅠ 채택완료

우주열차 5년 전 조회 2,168

초보 퍼블리셔입니다ㅠ https://sir.kr/qa/131842">https://sir.kr/qa/131842 여기 링크의 답변글을 참고했구요

 

lib/common.lib.php

</strong></p>

<p>$list['icon_secret'] = '';

    if (strstr($list['wr_option'], 'secret'))

        $list['icon_secret'] = '<img src="'.$skin_url.'/img/icon_secret.gif" alt="비밀글">';</p>

<p><strong>

여기 밑에

</strong></p>

<p>$list['register_ing'] = '';

           if($list['wr_3'] < date("Y-m-d", G5_SERVER_TIME))

               $list['register_ing'] = '<div class="end">종료</div>';</p>

<p>           $list['register_end'] = '';

           if($list['wr_3'] > date("Y-m-d", G5_SERVER_TIME))

               $list['register_end'] = '<div class="ing">진행중</div>';</p>

<p><strong>

이렇게 추가하였구요..

 

쓰고자 하는 스킨의 list.skin.php에

</strong></p>

<p><!-- 진행중 or 종료 -->

<?if (isset($list[$i]['register_end'])) echo $list[$i]['register_end'];?>

<?if (isset($list[$i]['register_ing'])) echo $list[$i]['register_ing'];?></p>

<p><strong>

이렇게 추가하고 스타일도 적용했습니다. 

 

질문1. 클래스명이 td_won_percen인 파란부분에도 진행중(초록색) 종료(검정색)일때에 따라 글자 색상을 다르게 주고싶은데

이렇게 시도를 해봤지만 

반응이 없습니다... 어떻게 하면 좋을까요? 벌써 2시간째 씨름중이네유ㅠㅠ 고수님들의 답변을 기다립니다.

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트

common.lib.php 파일안에 굳이 추가 하실필요가 있나요? 개인적인생각;;

 

노출되는 파일쪽 상단에  구분용으로 넣고 타이틀 색상 넣으면 될거같은데요


$show_ing_end_title = '';
$show_add_color  = '';
if($list[$i]['wr_3'] < date("Y-m-d", G5_SERVER_TIME)){
 $show_ing_end_title = '<div class="end">종료</div>';
 $show_add_color  = '#88888';
}else if($list[$i]['wr_3'] > date("Y-m-d", G5_SERVER_TIME)){
 $show_ing_end_title = '<div class="ing">진행중</div>';
 $show_add_color  = '#8fc11f';
}

 

<!-- 상단 진행 or 종료 -->
<?php echo $show_ing_end_title; ?>


<!-- 색상 -->
<div class='' ><span style="color:<?php echo $show_add_color; ?>"> 퍼센트 </span></div>

 

 

이렇게 하면 되지 않을가요?

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

우주열차
5년 전
답변해주셔서 정말 감사합니다. 이런 방법도 있었군요 ^0^ 한번 참고해보겠습니다.

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인