if(empty($_GET["id"])){
header("index.php");
exit();
}else{
$worktype=array("restaurant","shop","display","office","other");
$id=addslashes($_GET["id"]);
if(!in_array($id,$worktype)){
header("index.php");
exit();
}
}
?>
B.HEARTS / Works - echo $id; ?>
//--ヘッダー始点 -- ?>
echo' '.htmlspecialchars($id,ENT_QUOTES,'UTF-8'); ?>
function xml2array($nodes){
$ary = array();
foreach($nodes as $node){$ary[] = $node;}return $ary;}
//
$doc = simplexml_load_file("xml/".$id.".xml");
$datas=$doc->data;
unset($doc);
$datas = xml2array($datas);
foreach($datas as $data) {
$number=(string)$data->number;
$name=(string)$data->name;
$photo=(string)$data->photo;
$address=(string)$data->address;
$link=(string)$data->link;
//
echo '- ';
$v='img/'.$id.'/thumb/'.$number.'.gif';
if(!file_exists($v)){
$v='img/'.$id.'/thumb/'.$number.'.jpg';
}
echo '';
echo '
';
}
?>
BACK