<?php
  include("./control/session.inc");
  $p = $_GET["p"];

function thema_top()
{

//一覧表示HTML

  $content1 = <<<EOD
<div id="main_r1">
<h2> テーマに関連するファイル一覧</h2>
EOD;
  print $content1;

//ファイル一覧の取得

  $thema = <<<EOD
<div id="border_box">
<div class="but1"><div class="fi-page"> thema.php</div></div>
<a href="./AYANASU_control.php?cname=creating_thema&name=thema" class="but1"><div class="fi-page-edit"> 編集更新</div></a>
</div>

EOD;

  print $thema;

  foreach(glob('./thema/*.css') as $file)
  {

  $array1 = explode("/", $file);
  $list1 = ($array1[count($array1) -1] ); 
  $array2 = explode(".", $list1);
  $list2 = ($array2[count($array2) -2] );

  $css = '<div id="border_box">
<div class="but1"><div class="fi-page"> '.$list1.'</div></div>'
.'<a href="./AYANASU_control.php?cname=creating_thema&name='.$list2.'" class="but1"><div class="fi-page-edit"> 編集更新</div></a>'.PHP_EOL
.'</div>'.PHP_EOL;
  print $css;

  }

//一覧表示HTML


  $content2 = "</div>";
  print("$content2");

}

?>

