ȸ¿ø°¡ÀԡžÆÀ̵ð/ºñ¹øã±â
ȨÀ¸·Î


ÇöÀç µð·ºÅ丮(Æú´õ) ÆÄÀÏ ¸ñ·Ï º¸±â, PHP¼Ò½º
12³â Àü
ÇöÀç µð·ºÅ丮(Æú´õ)¿¡ ÀÖ´Â ÆÄÀÏµé ¸ñ·ÏÀ» º¸¿©ÁÖ°í ¸µÅ©¸¦ ´Þ¾ÆÁÖ´Â ÀÛÀº PHP+JAVASCRIPT ÄÚµåÀÔ´Ï´Ù. º¸¿©ÁÙ ÆÄÀÏ È®ÀåÀÚ¸¦ Á¦ÇÑÇÒ ¼ö ÀÖ°í ¼±ÅÃÀûÀ¸·Î º¸¿©ÁÙ ¼ö ÀÖµµ·Ï µÇ¾î ÀÖ½À´Ï´Ù. PHP ·Î µð·ºÅ丮¿Í ÆÄÀϵéÀ» ¾î¶»°Ô ´Ù·ê ¼ö ÀÖ´Â Áö ¾Ë ¼ö ÀÖ´Â ¼Ò½ºÄÚµåÀ̸ç Àû´çÈ÷ °¡°øÇؼ­ ½Ç¹«¿¡µµ »ç¿ëÇÒ ¼öµµ ÀÖ°Ú½À´Ï´Ù.

<html>
<head>
<title>ÇöÀç Æú´õ ÆäÀÌÁö ¸ñ·Ï</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<style type="text/css">
A:link {color:#3366CC; text-decoration:none;}
A:active {color:#1F3174; text-decoration:none;}
A:visited {color:#999999; text-decoration:none;}
A:hover {color:#FF9966; text-decoration:underline;}
IMG { border: 0; }
body {margin:0px; padding:0px}
span {color:#7C9CA7; font:11px µ¸¿ò; line-height:19px;}
</style>

<body leftmargin="0" topmargin="0">
<table border=0 cellpadding=0 cellspacing=0><tr>
<td width=10></td>
<?
$start_page = "page_list.php";
$ext_array = array("php", "html", "htm", "gif", "jpg", "png");
$ext_max = count($ext_array);
$path = "./";

for ($n=0;$n<$ext_max;$n++) {
echo "<td><input type='checkbox' name='add_" . $ext_array[$n] . "' checked onclick='redisplay_page()'></td><td width=30><span>" . $ext_array[$n] . "</span></td>";
}
?>
</tr></table>

<script>
var files = Array();
<?

if ($dir = opendir($path)) {
while ($file = readdir($dir)){
  if (is_dir($path.$file)) {
   if ($file != '.' && $file != '..') {
     if (file_exists("$file/$start_page")) {
      echo "files[files.length]='$file/$start_page';\n";
     }
   } else {
   }
  } else {
   if ($file!=$start_page){
    $name_array = pathinfo($file);
    $ext = $name_array['extension'];
    if (strlen(str_replace($ext_array,"",$ext))==0) echo "files[files.length]='$file';\n";
   }
  }
}
closedir($dir);
}
?>


var stagex=10,stagey=20,x,y,n,z,cellw=220,cellh=20,obj,n;

function display_page() {
files.sort();
var i = 0, pass;
for (n=0;n<files.length;n++){
  temp_arr = (files[n].replace(/ /gi,"%20").replace(/\\/gi,"/")).split(".");
  temp_ext = temp_arr[temp_arr.length-1];
  pass = 0;
  switch (temp_ext){
   <?
   for ($n=0;$n<$ext_max;$n++) {
    echo "case '".$ext_array[$n]."': if (!document.getElementsByName('add_".$ext_array[$n]."')[0].checked) pass = 1; break;\n";
   }
   ?>
   default : pass=1; break;
  }
  if (pass) continue;
  //x = stagex + 1+(n % 4)*cellw;
  //y = stagey + 1+ Math.floor(n/4) * cellh;
  x = stagex + 1+ Math.floor(i/30) * cellw;
  y = stagey + 1+ (i % 30) * cellh;
  document.write('<div id="block_'+n+'" style="position:absolute; background-color:#efefef; z-index:'+z+'; left:'+x+'px; top:'+y+'px; width:'+(cellw-1)+'px; height:'+(cellh-1)+'px; padding-left:5px; display:block"><span>'+(10001+i).toString().substring(1)+': <a href="'+files[n]+'">'+files[n].replace('<?=$start_page;?>','')+'</a> <a href="'+files[n]+'" target=_blank>¡ã</a></span></div>');
  i++;
}
}

function redisplay_page() {
var i = 0, pass, obj;
for (n=0;n<files.length;n++){
  temp_arr = (files[n].replace(/ /gi,"%20").replace(/\\/gi,"/")).split(".");
  temp_ext = temp_arr[temp_arr.length-1];
  pass = 1;
  switch (temp_ext){
   <?
   for ($n=0;$n<$ext_max;$n++) {
    echo "case '".$ext_array[$n]."': if (!document.getElementsByName('add_".$ext_array[$n]."')[0].checked) pass = 0; break;\n";
   }
   ?>
   default : pass=1; break;
  }
  if (pass) {
   //x = stagex + 1+(n % 4)*cellw;
   //y = stagey + 1+ Math.floor(n/4) * cellh;
   x = stagex + 1+ Math.floor(i/30) * cellw;
   y = stagey + 1+ (i % 30) * cellh;
   obj = document.getElementById('block_'+n);
   obj.style.display='block';
   obj.style.left = x;
   obj.style.top = y;
   i++;
  } else {
   document.getElementById('block_'+n).style.display='none';
  }
}
}

display_page();

</script>
</body>
</html>
ÃßõÃßõ : 554 Ãßõ ¸ñ·Ï
¹øÈ£ Á¦¸ñ
215
ÀÏÁ¤½Ã°£ ÀÌ Áö³­ °Ô½Ã¹° Á¤¸®Çϱâ
214
RSS¸¦ ÀÌ¿ëÇÑ ÃֱٰԽù° »Ì±â
213
°£´ÜÇÑ ±ÝÁö´Ü¾î ÇÊÅ͸µ
212
ÁÖ¿ä»çÀÌÆ®µéÀÇ ¸µÅ©Àα⵵ ¸¦ °¡Á®¿Í¼­ º¸¿©ÁÖ±â
211
ÆÄÀÏ À̸§¿¡¼­ È®ÀåÀÚ ÃßÃâ
210
http://ȨÁÖ¼Ò/?mode=xxx Çϴ¹æ¹ý
209
»çÀÌÆ® ¹æ¹®°æ·Î¿Í °Ë»öÇÑ ´Ü¾î ¾Ë±â
208
ÆäÀÌ¡- ´ÙÁß Á¤·Ä : ¿À¸§, ³»¸², º¸Åë
ÇöÀç µð·ºÅ丮(Æú´õ) ÆÄÀÏ ¸ñ·Ï º¸±â, PHP¼Ò½º
206
MySQL¿¡ ÀÖ´Â ·¹Äڵ带 php¸¦ »ç¿ëÇؼ­ XML·Î º¯È¯Çϱâ
205
±Ý¾×À» Çѱ۷Πǥ±â ÇØÁÖ´Â ½ºÅ©¸³Æ®
204
ȨÆäÀÌÁö µ¿½ÃÁ¢¼ÓÀÚ¼ö ±¸ÇöÀ» À§ÇÑ PHP ¼Ò½º ÄÚµå
203
¿©·¯ °Ô½ÃÆÇÀÇ °ªµéÀ» °¡Á®¿Í¼­ Á¤·ÄÇϱâ
202
Áֹεî·Ï¹øÈ£°¡ Æ÷ÇÔµÇ¸é °æ°í
201
¾ÆÀ̵𿡠ÇÑ±Û ¹× Ư¼ö¹®ÀÚ Á¦ÇÑ ½±°Ô
200
´ë·® ¸ÞÀÏ ¹ß¼Û ¼Ò½º
199
±âº»ÀûÀÎ ÆäÀÌ¡
198
»çÁø Ä«·¹¸¶ Á¤º¸ exif Ŭ·¡½º
197
display:inlineÀÇ À߸øµÈ ¿ÀÇØ
196
[jQuery] $(document).ready(function(){});
195
phpquery
194
IE6ºÎÅÍ IE9±îÁö ´ëÀÀÇϱâ.
193
HTML ű׸¦ ¸·±â
192
jquery ajax, $.get(), $.post() »ç¿ë¹æ¹ý
191
jquery form - ajaxForm
190
jquery ÃֽŠ¹öÀü ¿¬°áÇϱâ
189
¸ð¹ÙÀÏÀ¥À¸·Î Æ÷¿öµùÇÏ´Â ½ºÅ©¸³Æ®
188
JQuery ±âº» ¿¹Á¦ ¸ðÀ½
187
¸®´ª½º ƯÁ¤ ¹®ÀÚ¿­ ã±â
186
grep perl Á¶ÇÕÀ¸·Î ÆÄÀϳ» ¹®ÀÚ¿­À» ÇѲ¨¹ø¿¡ º¯°æÇϱâ
¸ñ·Ï
¹ÂÁ÷Æ®·ÎÆ® ºÎ»ê±¤¿ª½Ã ºÎ»êÁø±¸ °¡¾ßµ¿ ¤Ó °³ÀÎÁ¤º¸Ãë±Þ¹æħ
Copyright ¨Ï musictrot All rights reserved.