상단 위치표시 코드 수정 및 파일명 변경
This commit is contained in:
35
shop/navigation.inc.php
Normal file
35
shop/navigation.inc.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if ($ca_id)
|
||||
{
|
||||
$navigation = $bar = "";
|
||||
$len = strlen($ca_id) / 2;
|
||||
for ($i=1; $i<=$len; $i++)
|
||||
{
|
||||
$code = substr($ca_id,0,$i*2);
|
||||
|
||||
$sql = " select ca_name from {$g4['shop_category_table']} where ca_id = '$code' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$sct_here = '';
|
||||
if ($ca_id == $code) // 현재 분류와 일치하면
|
||||
$sct_here = 'sct_here';
|
||||
|
||||
if ($i != $len) // 현재 위치의 마지막 단계가 아니라면
|
||||
$sct_bg = 'sct_bg';
|
||||
else $sct_bg = '';
|
||||
|
||||
$navigation .= $bar.'<a href="./list.php?ca_id='.$code.'" class="'.$sct_here.' '.$sct_bg.'">'.$row['ca_name'].'</a>';
|
||||
}
|
||||
}
|
||||
else
|
||||
$navigation = $g4['title'];
|
||||
|
||||
//if ($it_id) $navigation .= " > $it[it_name]";
|
||||
?>
|
||||
|
||||
<div id="sct_location">
|
||||
<a href='<?php echo G4_SHOP_URL; ?>/' class="sct_bg">Home</a>
|
||||
<?php echo $navigation; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user