<?php
$template = <<<END
<!-- kids7: 特別なお知らせ -->
<section class="oshirase kids7_special">
<div>{val item/date}　<a href="{val item/link}">{val item/title}</a></div>
<img src="user_data/{val item/image_file}" alt="" class="img1 updown">
</section>
END;

$kids7_special = array(
		"title" => "kids7 特別なお知らせ",
		"name" => "kids7_special",			// 名称、重複すると正しく動作しません
		"template" => $template,		// ブロックのテンプレート
		"input" => array(
		"help" => array(
			"title" => "使い方",
			"type" => "comment",
			"link" => DOCUMENT1 . "/?act=kids7_special",
			"class" => "notice",
		),
			"coment1" => array(
				"title" => "出力位置固定のブロックです",
				"type" => "comment",
			),
			"title" => array(
				"title" => "タイトル",
				"type" => "text",
			),
			"date" => array(
				"title" => "日付",
				"type" => "date",
			),
			"link" => array(
				"title" => "リンク",
				"type" => "text",
			),
			"image" => array(
				"title" => "ポイント画像",
				"type" => "image",
			),
		),
		"output" => "special",
//		"func" => "func_kids7_special",		// 処理プログラム（指定がない物は標準処理）
	);

block_add($kids7_special);

// ギャラリー
function func_kids7_special($def, $info)
{
	$ary = array();
	for ($i = 1; $i <= 10; $i++) {
		unset($item);
		if ($info["image" . $i]) {
			$item["image"] = $info["image" . $i . "_file"];
			$item["link"] = $info["link" . $i];
			$ary[] = $item;
		}
	}
	$info["ary"] = $ary;
	return $info;
}
