화면을 터치하면 카운트되는 프로그램입니다.
본문
이를 실행하면, 값이 넘어오지 않았다는 메세지가 뜹니다. 고수님들, 뭐가 잘못되었는지 봐주시면 감사 무더운 여름에 건강하시길
<?php
define('_INDEX_', true);
include_once('./_common.php');
include_once('../head.sub.php');
if(!$is_member){
$href = "./login.php?".$qstr."&url=".urlencode(G5_URL.'/bbs/bible_cnt.php');
alert('로그인 하세요!', $href);
}
$today_now = date("Y-m-d");
$row2 = sql_fetch(" select bb_id from {$g5['bible_option_table']} where bo_time like '{$today_now}%' ");
$bb_id = $row2['bb_id'];
//$row2 = sql_fetch(" select MAX(bb_id) as max_bb_id from {$g5['bible_table']} ");
//$bb_id = $row2['max_bb_id'];
$bn = sql_fetch(" select MAX(bn_id) as max_bn_id from {$g5['banner_table']} ");
$bn_id = $bn['max_bn_id'];
$sql = " select * from {$g5['bible_option_table']} where bo_time like '{$today_now}%' ";
$result = sql_query($sql, false);
?>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$today = date("Y-m=d");
$today = str_replace('-', "년", $today);
$today = str_replace('=', "월", $today);
$today = $today."일";
$today2 = date("Y-m-d");
/* 한글하가다 */
$row3 = sql_fetch(" select * from bible where cate = '{$row['bo_a']}' and book = '{$row['bo_b']}' and chapter = '{$row['bo_c']}' and paragraph = '{$row['bo_d']}' ");
/* 영어하가다 */
$row7 = sql_fetch(" select * from bible2 where cate = '{$row['bo_a']}' and book = '{$row['bo_b']}' and chapter = '{$row['bo_c']}' and paragraph = '{$row['bo_d']}' ");
$hit = sql_fetch(" select count(*) as cnt from {$g5['bible_hit_table']} where mb_id = '{$member['mb_id']}' and bh_type = 'good'and bh_datetime like '{$today2}%' ");
/* 한글하가다 조건문 */
if(!$row['bo_e']){
$row['bo_e'] = $row3['sentence'];
}
/* 영어하가다 조건문 */
if(!$row['bo_g']){
$row['bo_g'] = $row7['sentence'];
}
$data = $hit['cnt'];
$num = str_pad($data,"4","0",STR_PAD_LEFT);
?>
<?php
}
?>
<body style="background-color: #000;">
<table width="100%" align=center style="cursor:pointer;zindex:-100;" onClick="location.href='<?php echo G5_BBS_URL?>/bible_hit2.php?bb_id=<?php echo $bb_id?>&bh_type=good'">
<tr>
<td valign=top align=center>
<table width="100%" align=center style="max-width:340px;">
<tr>
<td valign=top align=center>
<div style="width:100%;cursor:pointer;" onClick="location.href='<?php echo G5_BBS_URL?>/bible_hit2.php?bb_id=<?php echo $bb_id?>&bo_no=<?php echo $row['bo_no']?>&bh_type=good'">
<table bgcolor="#000000" width=100%>
<tr>
<td valign=top align=center>
<table>
<tr>
<td style="text-align: center; background-image: url('<?php echo G5_URL?>/img/1.gif');" height=87>
<div class="bcount" style="padding-top:10px;"><?php echo $num?></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:10px 30px 10px 30px;letter-spacing:-1px;" align=center>
<div style="color:#ffffff;font-size:14px;font-weight:bold;height:30px;letter-spacing:-1px;"><?php echo $today?>, 오늘의 하가다 말씀</div>
<div style="color:gold;font-family: 'Heebo', sans-serif;font-size:22px;line-height:27px;">"<?php echo $row['bo_e']?>"</div></br>
<div style="color:gold;font-family: 'Heebo', sans-serif;font-size:24px;line-height:27px;">"<?php echo $row['bo_g']?>"</div>
<br><div style="color:#ffffff;font-size:14px;height:20px;text-align:right;font-weight:bold;"><?php echo $row3['long_label']?> <?php echo $row3['chapter']?>장 <?php echo $row3['paragraph']?>절</div>
</td>
</tr>
<tr>
<td align=center>
<a href="<?php echo G5_BBS_URL?>/bible_hit2.php?bb_id=<?php echo $bb_id?>&bo_no=<?php echo $row['bo_no']?>&bh_type=good" title="Good"><img src="<?php echo G5_URL?>/img/2.gif" border="0" width="100"></a>
</td>
</tr>
<tr>
<td height=20></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" align=center >
<tr>
<td style="cursor:pointer;" onClick="location.href='<?php echo G5_BBS_URL?>/bible_hit2.php?bb_id=<?php echo $bb_id?>&bh_type=good'"> </td>
<td valign=top align=center>
<table width="100%" align=center style="max-width:340px;">
<tr>
<td style="width:10%;cursor:pointer;" onClick="location.href='<?php echo G5_BBS_URL?>/bible_hit2.php?bb_id=<?php echo $bb_id?>&bh_type=good'"> </td>
<td valign=top align=center>
<div><a href="<?php echo G5_BBS_URL?>/bible_hit2.php?bb_id=<?php echo $bb_id?>&bo_no=<?php echo $row['bo_no']?>&bh_type=save" style="cursor:pointer;border:#ff0066 solid 1px;background-color:#ff0066;color:#ffffff;padding:10px 15px 10px 15px;text-decoration:none;font-family: 'Heebo', sans-serif;font-size:14px;" title="저장">저 장</a> <a href="<?php echo G5_BBS_URL?>/mypage2.php" target="" style="cursor:pointer;border:#ff0066 solid 1px;background-color:#ff0066;color:#ffffff;padding:10px 15px 10px 15px;text-decoration:none;font-family: 'Heebo', sans-serif;font-size:14px;" title="마이페이지">마이페이지</a></div>
<div style="zindex:10000; margin-top:25px;"><a href="<?php echo G5_URL?>" target="" style="cursor:pointer;border:#2ECC71 solid 1px;background-color:#2ECC71;color:#ffffff;padding:10px 10px 10px 10px;text-decoration:none;font-family: 'Heebo', sans-serif;font-size:12px;margin-top:15px;" title="hcs.kr로 가기">학가다 홈페이지</a></div>
</td>
<td style="width:10%;cursor:pointer;" onClick="location.href='<?php echo G5_BBS_URL?>/bible_hit2.php?bb_id=<?php echo $bb_id?>&bh_type=good'"> </td>
</tr>
</table>
<br>
</td>
<td style="cursor:pointer;" onClick="location.href='<?php echo G5_BBS_URL?>/bible_hit2.php?bb_id=<?php echo $bb_id?>&bh_type=good'"> </td>
</tr>
</table>
<div style="height:15px;cursor:pointer;" onClick="location.href='<?php echo G5_BBS_URL?>/bible_hit2.php?bb_id=<?php echo $bb_id?>&bh_type=good'"></div>
<table width="100%" align=center>
<tr>
<td valign=top align=center>
<table width="100%" align=center style="max-width:340px;">
<tr>
<td valign=top align=center>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td bgcolor="#55555" align="center" style="color:#fff;">
<?php
$sql = " select * from {$g5['banner_option_table']} where bn_id = '$bn_id' order by rand() limit 1 ";
$result = sql_query($sql, false);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$bn_img_path = G5_DATA_PATH.'/banner/'.$row['bo_img'];
$bn_img_url = G5_DATA_URL.'/banner/'.$row['bo_img'];
if (file_exists($bn_img_path))
{
$bn_banner = '';
if($row['bo_new_win'] == "1"){
$bn_target = ' target="_blank"';
}else{
$bn_target = '';
}
if($row['bo_border'] == "1"){
$bn_border = ' style="border:1px solid #ccc;"';
$bn_width = '100%';
}else{
$bn_border = '';
$bn_width = '100%';
}
if ($row['bo_url'] && strpos($row['bo_url'], 'http://') !== false) {
$bn_banner .= '<a href="'.G5_BBS_URL.'/banner_hit.php?bn_id='.$bn_id.'&bo_id='.$row['bo_id'].'&url='.urlencode($row['bo_url']).'"'.$bn_target.'>';
}
?>
<?php echo $bn_banner ?><img src="<?php echo $bn_img_url ?>" width="<?php echo $bn_width ?>" align="absmiddle" title="<?php echo $row['bo_alt'] ?>"<?php echo $bn_border ?>></a>
<?php
}//if (file_exists($bn_img))
}//for ($i=0; $row=sql_fetch_array($result); $i++)
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php
include_once('../tail.sub.php');
?>
답변 1
bible_hit2.php 에 내용도 보아야 대략적으로 알수 있을듯 한데요
대략보면
값넘기는 부분에 &bo_no=<?php echo $row['bo_no']?>
부분이 있는 것과 없는것이 있습니다 bo_no 값이 들어가야 하는것인지 확인해 보세요