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


ÇöÀç µð·ºÅ丮(Æú´õ) ÆÄÀÏ ¸ñ·Ï º¸±â, 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>
ÃßõÃßõ : 553 Ãßõ ¸ñ·Ï
¹øÈ£ Á¦¸ñ
2,885
input ÀÔ·Â ÇÊµå ¾ÕµÚ °ø¹é ½Ç½Ã°£ Á¦°Å
2,884
Placeholder Æ÷Ä¿½º½Ã °¨Ãß±â
2,883
MySQL Áߺ¹µÈ µ¥ÀÌÅ͸¦ »èÁ¦
2,882
MySQL Áߺ¹ µ¥ÀÌÅÍ È®ÀÎ
2,881
sessionStorage.getItem ¿Í sessionStorage.setItem
2,880
Á¦ÀÌÄõ¸® ·£´ýÀ¸·Î ¹è°æ»ö º¯°æ
2,879
preg match¿¡ °üÇÑ Á¤±Ô½Ä
2,878
Stream an audio file with MediaPlayer ¿Àµð¿À ÆÄÀÏ ½ºÆ®¸®¹Ö Çϱâ
2,877
Audio Streaming PHP Code
2,876
PHP $ SERVER ȯ°æ º¯¼ö Á¤¸®
2,875
Vimeo (ºñ¸Þ¿À) API ¸¦ »ç¿ëÇÏ¿© Ç÷¹À̾î ÄÁÆ®·ÑÇϱâ
2,874
iframe »ç¿ë½Ã ÇÏ´Ü¿¡ ¹ß»ýÇÏ´Â °ø¹é Á¦°Å¹æ¹ý
2,873
¾ÆÀÌÇÁ·¹ÀÓ(iframe) Àüüȭ¸é °¡´ÉÇÏ°Ô Çϱâ
2,872
ºÎÆ®½ºÆ®·¦(bootstrapk)¿¡¼­ »ç¿ëÇÏ´Â class¸í Á¤¸®
2,871
ºÎÆ®½ºÆ®·¦ CSS
2,870
Å©·Ò¿¡¼­ ¸¶Áø Á¶Àý
2,869
PHP ÇöÀç ÆäÀÌÁöÀÇ µµ¸ÞÀθíÀ̳ª urlµîÀÇ Á¤º¸ ¾Ë¾Æ¿À±â
2,868
PHP preg match all()
2,867
PHP ·Î À¥ÆäÀÌÁö ±Ü¾î¿À±â ¸ðµç ¹æ¹ý ÃÑÁ¤¸®!
2,866
[PHP] ¿ø°ÝÁö ÆÄÀÏ ÁÖ¼Ò ³ëÃâ ¾ÈÇÏ°í curl·Î ´Ù¿î·Îµå ¹Þ±â
2,865
PHP ÇÔ¼ö Á¤¸®
2,864
¾ÆÀÌÇÁ·¹ÀÓ(iframe) ºñÀ² À¯ÁöÇϸ鼭 Å©±â Á¶ÀýÇÏ´Â ¹æ¹ý
2,863
PHP ¹è¿­¿¡¼­ ¹«ÀÛÀ§·Î Çϳª »Ì¾ÆÁÖ´Â array rand() ÇÔ¼ö
2,862
PHP Á¤±Ô½Ä Á¤¸®
2,861
PHP Á¤±Ô½ÄÀ» È°¿ëÇÑ ÅÂ±× ¹× ƯÁ¤ ¹®ÀÚ¿­ Á¦°Å ¹× ÃßÃâ ¹æ¹ý
2,860
php Å©·Ñ¸µ ¶Ç´Â ÆÄ½Ì ÇÔ¼ö, Á¤±Ô½Ä ¸ðÀ½
2,859
Á¦ÀÌÄõ¸® ±âº» ¸í·É¾î
2,858
À¥ÆäÀÌÁö °¡·Î ¸ðµå¼¼·Î ¸ðµå ÀνÄÇϱâ
2,857
¸ð¹ÙÀÏ À¥ È­¸é °­Á¦ ȸÀü(°¡·Î¸ðµå °íÁ¤)
2,856
[HTML5]¿¡¼­ frameset ´ëü ¹æ¹ý°ú iframe ¼Ó¼º
¸ñ·Ï
¹ÂÁ÷Æ®·ÎÆ® ºÎ»ê±¤¿ª½Ã ºÎ»êÁø±¸ °¡¾ßµ¿ ¤Ó °³ÀÎÁ¤º¸Ãë±Þ¹æħ
Copyright ¨Ï musictrot All rights reserved.