<?php

function skin_dir($skin,$len='')
{

  $result_array = array();
  $dirname = "../skin/board/";
  $handle  = opendir($dirname);
  while ($file = readdir($handle))
  {
    if($file == "."||$file == "..") continue;
    
    if(is_dir($dirname.$file)) $result_array[] = $file;
  }
  closedir($handle);
  sort($result_array);
  
  return $result_array;
}

function shop_skin($skin,$len='')
{

  $result_array = array();
  $dirname = "../skin/$skin";
  $handle  = opendir($dirname);
  while ($file = readdir($handle))
  {
    if($file == "."||$file == "..") continue;
    
    if(is_dir($dirname.$file)) $result_array[] = $file;
  }
  closedir($handle);
  sort($result_array);
  
  return $result_array;
}

function shop_file($skin,$len='')
{

  $result_array = array();
  $dirname = "../skin/$skin";
  $handle  = opendir($dirname);
  while ($file = readdir($handle))
  {
    if($file == "."||$file == "..") continue;
    
    $result_array[] = $file;
  }
  closedir($handle);
  sort($result_array);
  
  return $result_array;
}


function skin_dir1($skin,$len='')
{

  $result_array = array();
  $dirname = "../skin/inventory/";
  $handle  = opendir($dirname);
  while ($file = readdir($handle))
  {
    if($file == "."||$file == "..") continue;
    
    if(is_dir($dirname.$file)) $result_array[] = $file;
  }
  closedir($handle);
  sort($result_array);
  
  return $result_array;
}

function category($skin_file="")
{


    if ($skin_dir)
        include_once ("../m_shop/skin/category/$skin_dir");
    else
        include_once ("../m_shop/skin/category/basic.php");

    return $content;
}  




?>
