¿©±â¼ ´Ù¿î¹ÞÀº Æ®¸®±¸Á¶ ÀÚ¹Ù½ºÅ©¸³Æ® ÀÔ´Ï´Ù. asp DB¿Í ¿¬µ¿Çؼ ³»¿ëµéÀ» ³Ö´ÂÁßÀä,, Áú¹®µÎ°¡Áö°¡ ÀÖ½À´Ï´Ù.
ù°, ÀÌ ¼Ò½º¿¡ ¸ðµÎ¿±â, ¸ðµÎ´Ý±â ¹öÆ°À» ³Ö¾î¼ ½ÇÇàÇÏ·Á°í Çϴµ¥¿ä,, ¾îµð¿¡ ¾î¶»°Ô ³Ö¾îÁà¾ßÇϳª¿ä?
µÑ°, óÀ½ ÆäÀÌÁö¸¦ ¿¸é ¸ðµç Ž»ö±â°¡ ´ÝÇôÀִµ¥¿ä,, ÇØ´ç ÄÚµå¹øÈ£(.asp?mem_code=111)·Î ¸µÅ©°É·Á¼ µé¾î°¡¸é ÀÚµ¿À¸·Î ±× ºÎºÐÀÌ ¿¸®°Ô ÇÏ´Â°Ç ¾î¶»°Ô Çϳª¿ä?
¾îÂîÇؼ Æ®¸®ºÎºÐ¿¡ ³»¿ëÀ» ³Ö±ä Çߴµ¥ ÀÚ¹Ù½ºÅ©¸³Æ® ºÎºÐÀº Çϳªµµ ¸ð¸£°Ú½À´Ï´Ù.
<link href="../include/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function tree(tm0,tm1) {
this.tm2 = tm1;
this.tm3 = tm0;
this.tm4 = this;
this.tm5 = [];
this.tm6 = null;
this.tm7 = -1;
var tm8 = new Image();
var tm9 = new Image();
tm8.src = tm1['icon_e'];
tm9.src = tm1['icon_l'];
tm1['im_e'] = tm8;
tm1['im_l'] = tm9;
for(var i=0; i<64; i++) {
if(tm1['icon_'+i]) {
var tmA = new Image();
tm1['im_'+i] = tmA;
tmA.src = tm1['icon_'+i];
}
}
this.tmB = function(tmC) {
var tmD = this.tm5[tmC];tmD.tmE(tmD.tmF);
}
this.tmG = function(tmC) {
return this.tm5[tmC].tmG();
}
this.tmH = function(tmC) {
this.tm5[tmC].tmI(true);
}
this.tmJ = function(tmC) {
this.tm5[tmC].tmI();
}
this.tmK = [];
for(var i=0; i<tm0.length; i++) {
new tmL(this,i);
}
this.tmC = trees.length;
trees[this.tmC] = this;
for(var i=0;i<this.tmK.length;i++) {
document.write(this.tmK[i].tmM());
this.tmK[i].tmE();
}
}
function tmL(tmN,tmO){
this.tm7 = tmN.tm7+1;
this.tm3 = tmN.tm3[tmO+(this.tm7?2:0)];
if(!this.tm3) {
return;
}
this.tm4 = tmN.tm4;
this.tmN = tmN;
this.tmO = tmO;
this.tmF = !this.tm7;
this.tmC = this.tm4.tm5.length;
this.tm4.tm5[this.tmC] = this;
tmN.tmK[tmO] = this;
this.tmK = [];
for(var i=0; i<this.tm3.length-2; i++) {
new tmL(this,i);
}
this.tmP = tmQ;
this.tmE = tmR;
this.tmG = tmS;
this.tmM = tmT;
this.tmI = tmU;
this.tmV = function() {
return this.tmO == this.tmN.tmK.length-1;
}
}
function tmR(tmW) {
var tmX = tmY('i_div'+this.tm4.tmC+'_'+this.tmC);
if(!tmX) {
return;
}
if(!tmX.innerHTML) {
var tmK = [];
for(var i=0; i<this.tmK.length; i++) {
tmK[i] = this.tmK[i].tmM();
}
tmX.innerHTML = tmK.join('');
}
tmX.style.display = (tmW?'none':'block');
this.tmF = !tmW;
var tmZ = document.images['j_img'+this.tm4.tmC+'_'+this.tmC];
var tma = document.images['i_img'+this.tm4.tmC+'_'+this.tmC];
if(tmZ) {
tmZ.src = this.tmP(true);
}
if(tma) {
tma.src = this.tmP();
}
this.tmI();
}
function tmS(tmb) {
if(!tmb) {
var tmc = this.tm4.tm6;
this.tm4.tm6 = this;
if(tmc) {
tmc.tmG(true);
}
}
var tma = document.images['i_img'+this.tm4.tmC+'_'+this.tmC];
if(tma) {
tma.src = this.tmP();
}
tmY('i_txt'+this.tm4.tmC+'_'+this.tmC).style.fontWeight = tmb?'normal':'bold';
this.tmI();
return Boolean(this.tm3[1]);
}
function tmU(tmd){
window.setTimeout('window.status="'+(tmd?'':this.tm3[0]+(this.tm3[1]?' ('+this.tm3[1]+')':''))+'"',10);
}
function tmT() {
var tme = [];
var tmf = this.tmN;
for(var i=this.tm7; i>1; i--) {
tme[i] = '<img src="'+this.tm4.tm2[tmf.tmV()?'icon_e':'icon_l']+'" border="0" align="absbottom">';
tmf = tmf.tmN;
}
return '<table cellspacing="0" cellpadding="0" border="0"><tr><td nowrap>'+
(this.tm7?tme.join('')+(this.tmK.length?
'<a href="javascript: trees['+this.tm4.tmC+'].tmB('+this.tmC+')" onmouseover="trees['+this.tm4.tmC+'].tmJ('+this.tmC+')" onmouseout="trees['+this.tm4.tmC+'].tmH('+this.tmC+')">'+
'<img src="'+this.tmP(true)+'" border="0" align="absbottom" name="j_img'+this.tm4.tmC+'_'+this.tmC+'"></a>':
'<img src="'+this.tmP(true)+'" border="0" align="absbottom">'):'')+
'<a href="'+this.tm3[1]+'" target="'+this.tm4.tm2['target']+'" onclick="return trees['+this.tm4.tmC+'].tmG('+this.tmC+')" ondblclick="trees['+this.tm4.tmC+'].tmB('+this.tmC+')" onmouseover="trees['+this.tm4.tmC+'].tmJ('+this.tmC+')" onmouseout="trees['+this.tm4.tmC+'].tmH('+this.tmC+')" class="t'+this.tm4.tmC+'i" id="i_txt'+this.tm4.tmC+'_'+this.tmC+'">'+
'<img src="'+this.tmP()+'" border="0" align="absbottom" name="i_img'+this.tm4.tmC+'_'+this.tmC+'" class="t'+this.tm4.tmC+'im">'+this.tm3[0]+'</a>'+
'</td></tr></table>'+(this.tmK.length?'<div id="i_div'+this.tm4.tmC+'_'+this.tmC+'" style="display:none"></div>':'');
}
function tmQ(tmg) {
return this.tm4.tm2['icon_'+((this.tm7?0:32)+(this.tmK.length?16:0)+(this.tmK.length&&this.tmF?8:0)+(!tmg&&this.tm4.tm6==this?4:0)+(tmg?2:0)+(tmg&&this.tmV()?1:0))];
}
var trees=[];
tmY=document.all?function(tmh) {
return document.all[tmh];
}:
function(tmh) {
return document.getElementById(tmh);
}
// ¸Þ´º ±¸¼ººÎºÐ
// ¸Þ´º±¸¼º ¹æ¹ý¿¡¼ ÁÖÀÇÇÒ°Ç ,(ÄÞ¸¶)¸¦ Âï´Â°Å¸¸ ÁÖÀÇÇϼ¼¿ä.. ^^
// [±×·ì¸Þ´º ŸÀÌƲ, ÁÖ¼Ò,
// [ÇÏÀ§¸Þ´º ŸÀÌƲ 1, ÁÖ¼Ò],
// ['ÇÏÀ§¸Þ´º ŸÀÌƲ 2', ÁÖ¼Ò],
// ],
// ÁÖ¼Ò¿¡¼ ¿øÇÏ´Â ÁÖ¼Ò¸¦ ÀûÀ¸¸é ¾Æ·¡ ¾ÆÀÌÄÜ ¸®½ºÆ®¿¡ ÁöÁ¤µÈ Ÿ°ÙÀ¸·Î
// ÆäÀÌÁö°¡ ¿¸®¸ç nullÀ» ÀûÀ¸¸é ¾î¶² ÆäÀÌÁö À̵¿µµ ÀϾÁö ¾Ê½À´Ï´Ù.
// ¾Æ.. nullÀÇ ¾Õ/µÚ¿£ '(Ȭµû¿ÈÇ¥)³ª "(½Öµû¿ÈÇ¥)°¡ ¾ø¾î¾ß ÇÕ´Ï´Ù.
var TREE_ITEMS = [
['¹Ú¸»»ï', 'null',
<%
sql = "select mem_code, name from member where mem_code like '63%' order by mem_code asc"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open SQL, conn, 3
while not Rs.EOF
%>
['<%=rs("name")%> [<%=w_name%>]', 'http://milyangpark.com/menu03/cy_mem_die.asp?mem_code=<%=rs("mem_code")%>',],
<%
Rs.MoveNext
wend
%>
]
];
var icon_imgpath = 'images/'; // ¾ÆÀÌÄÜ À̹ÌÁö °æ·Î
// Ÿ°Ù°ú ¾ÆÀÌÄÜ ±¸¼ººÎºÐ
// °¢ ¶óÀο¡ ÀûÇôÁø ÁÖ¼®´ë·Î À̹ÌÁö °æ·Î¸¦ ÀûÀ¸¸é µË´Ï´Ù..
// ¾Æ.. ¿µ¾î ÁÖ¼®Àº.. Á¦°¡ ¾î¶² ºÎºÐ¿¡ ÇØ´çµÇ´Â °æ·ÎÀÎÁö ¸øã¾Æ¼ ¿ø¹® ±×´ë·Î µ×½À´Ï´Ù.. ;;
var tree_tpl = {
'target' : '_blank', // Ÿ°Ù
'icon_e' : icon_imgpath+'empty.gif', // ºó À̹ÌÁö
'icon_l' : icon_imgpath+'line.gif', // ¸Þ´º¸¦ ÆîÃÆÀ»½Ã ¹Ù(bar/?;;) À̹ÌÁö
'icon_32' : icon_imgpath+'base.gif', // root leaf icon normal
'icon_36' : icon_imgpath+'base.gif', // root leaf icon selected
'icon_48' : icon_imgpath+'base.gif', // root icon normal
'icon_52' : icon_imgpath+'base.gif', // ÇÏÀ§ ¸ÞÆ©¸¦ °¨ÃèÀ»½Ã ·çÆ® ¾ÆÀÌÄÜ À̹ÌÁö
'icon_56' : icon_imgpath+'base.gif', // ÆäÀÌÁö ·Îµù½Ã ·çÆ® ¾ÆÀÌÄÜ À̹ÌÁö
'icon_60' : icon_imgpath+'base.gif', // ·çÆ® ¸Þ´º¸¦ ¼±ÅÃÇßÀ»½Ã ¾ÆÀÌÄÜ À̹ÌÁö
'icon_16' : icon_imgpath+'folder.gif', // ±×·ì(Æú´õ) ¾ÆÀÌÄÜ
'icon_20' : icon_imgpath+'folderopen.gif', // ±×·ì ¸Þ´º¸¦ ¼±ÅÃÇßÀ»½Ã ¾ÆÀÌÄÜ À̹ÌÁö
'icon_24' : icon_imgpath+'folderopen.gif', // ÇÏÀ§ ¸Þ´º¸¦ ¼±ÅÃÇßÀ»½Ã ±×·ì ¾ÆÀÌÄÜ À̹ÌÁö
'icon_28' : icon_imgpath+'folderopen.gif', // ÇÏÀ§¸Þ´º¸¦ ¿¾îµÐ »óÅ·Π±×·ìÀÇ Å¸ÀÌƲÀ» ¼±ÅÃÇßÀ»½Ã ¾Æ¹ÌÄÜ À̹ÌÁö
'icon_0' : icon_imgpath+'page.gif', // ÆäÀÌÁö ¾ÆÀÌÄÜ À̹ÌÁö
'icon_4' : icon_imgpath+'page.gif', // ÆäÀÌÁö¸¦ ¼±ÅÃÇßÀ»½Ã ¾ÆÀÌÄÜ À̹ÌÁö
'icon_2' : icon_imgpath+'joinbottom.gif', // Á¡¼± ¾ÆÀÌÄÜ À̹ÌÁö
'icon_3' : icon_imgpath+'join.gif', // °¡Àå ¸¶Áö¸·ÀÇ Á¡¼± ¾ÆÀÌÄÜ À̹ÌÁö
'icon_18' : icon_imgpath+'plusbottom.gif', // +¾ÆÀÌÄÜ À̹ÌÁö
'icon_19' : icon_imgpath+'plus.gif', // °¡Àå ¸¶Áö¸· ±×·ìÀÇ +¾ÆÀÌÄÜ À̹ÌÁö
'icon_26' : icon_imgpath+'minusbottom.gif',// ÇÏÀ§ ±×·ìÀ» ¿¾úÀ»½Ã -¾ÆÀÌÄÜ À̹ÌÁö
'icon_27' : icon_imgpath+'minus.gif' // °¡Àå ¸¶Áö¸· ÇÏÀ§±×·ìÀ» ¿¿´À»½Ã -¾ÆÀÌÄÜ À̹ÌÁö
};
//-->
</script>
<script language="JavaScript">
<!--
// ¸Þ´º ±¸¼º - ¿øÇÏ´Â ºÎºÐ¿¡ ¾Æ·¡ Äڵ带 ºÙÀÓ
// new tree(¸Þ´º ¸®½ºÆ®, ¸Þ´º ¾ÆÀÌÄÜ ¸®½ºÆ®);
new tree(TREE_ITEMS, tree_tpl);
//-->
</script>