<?PHP
//include "header.php";
include "config.php";

//変数をゲット
global $xoopsDB;
$submitter=$_GET['submitter'];
$cid=$_GET['cid'];

//title_abcをゲット
//$sql1 = "SELECT title_abc WHERE cid = ".$cid." and submitter=".$submitter."";
$sql1 = "SELECT title_abc FROM ".$xoopsDB->prefix("myhtml_cat")." WHERE cid = ".$cid."";
$result1=$xoopsDB->query($sql1);
$title_abc=mysql_result($result1,0,"title_abc");

//uname,nameをゲット
$sql2 = "SELECT uname,name FROM ".$xoopsDB->prefix("users")." where uid=".$submitter."";
$result2=$xoopsDB->query($sql2);
//list($uname,$name)=$xoopsDB->fetchRow($resu]lt);
$uname=mysql_result($result2,0,"uname");

//$dir="/upload/".$title_abc."/".$uname."";
$dir=$title_abc."/".$uname."";
$dir1=$auth_dir."/".$dir;
//$dir1=$auth_dir."/upload/".$title_abc."/".$uname."";
//echo $dir1;
//echo $uname.":".$name.'さんのファイルの一覧を表示しています。<br><br>';
$file= opendir($dir1);
	while(($file = readdir()) !== FALSE){ 
 		if($file==".." or $file=="."){
		}
		else{
		echo "<a href=file.php".$auth_delimiter.$dir."/".$file.">".$file.'<br>';
		}
	}
closedir($dir1); 

/*
*/
//include XOOPS_ROOT_PATH."/footer.php";
?>