This commit is contained in:
shim
2023-04-17 11:06:08 +09:00
parent d0b393aa97
commit 76264e09ad
4686 changed files with 552713 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
//카테고리출력
function getMenuShowSelect($site,$table,$j,$parent,$depth,$uid,$hidden,$id)
{
global $cat,$_isUid;
static $j;
$CD=getDbSelect($table,($site?'site='.$site.' and ':'').'depth='.($depth+1).' and parent='.$parent.($hidden ? ' and hidden=0':'').' order by gid asc','*');
while($C=db_fetch_array($CD))
{
$nId = ($id?$id.'/':'').$C[$_isUid.'id'];
$j++;
echo '<option class="selectcat'.$C['depth'].'" value="'.$nId.'"'.($nId==$cat?' selected':'').'>';
for($i=1;$i<$C['depth'];$i++) echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if ($C['depth'] > 1) echo 'ㄴ';
echo $C['name'].($C['num']?' ('.$C['num'].')':'').'</option>';
if ($C['is_child']) getMenuShowSelect($site,$table,$j,$C['uid'],$C['depth'],$uid,$hidden,$nId);
}
}
function getMenuShowSelectCode($site,$table,$j,$parent,$depth,$uid,$hidden,$id)
{
global $cat,$_isUid;
static $j;
$CD=getDbSelect($table,($site?'site='.$site.' and ':'').'depth='.($depth+1).' and parent='.$parent.($hidden ? ' and hidden=0':'').' order by gid asc','*');
while($C=db_fetch_array($CD))
{
$nId = $C[$_isUid.'id'];
$j++;
echo '<option class="selectcat'.$C['depth'].'" value="'.$nId.'"'.($nId==$cat?' selected':'').'>';
for($i=1;$i<$C['depth'];$i++) echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if ($C['depth'] > 1) echo 'ㄴ';
echo $C['name'].($C['num']?' ('.$C['num'].')':'').'</option>';
if ($C['is_child']) getMenuShowSelectCode($site,$table,$j,$C['uid'],$C['depth'],$uid,$hidden,$nId);
}
}
?>